2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
6inline bool StraightLineSurface::operator==(const StraightLineSurface& slsf) const
11 bool transfEqual(transform().isApprox(slsf.transform(), 10e-8));
12 bool centerEqual = (transfEqual) ? (center() == slsf.center()) : false;
13 bool boundsEqual = (centerEqual) ? (bounds() == slsf.bounds()) : false;
17/** Return the surface type */
18inline constexpr SurfaceType
19StraightLineSurface::type() const
21 return StraightLineSurface::staticType;
24template<int DIM, class T>
25std::unique_ptr<ParametersT<DIM, T, StraightLineSurface>>
26StraightLineSurface::createUniqueParameters(
32 std::optional<AmgSymMatrix(DIM)> cov) const
34 return std::make_unique<ParametersT<DIM, T, StraightLineSurface>>(
35 l1, l2, phi, theta, qop, *this, std::move(cov));
38/** Use the Surface as a ParametersBase constructor, from global parameters */
39template<int DIM, class T>
40std::unique_ptr<ParametersT<DIM, T, StraightLineSurface>>
41StraightLineSurface::createUniqueParameters(
42 const Amg::Vector3D& position,
43 const Amg::Vector3D& momentum,
45 std::optional<AmgSymMatrix(DIM)> cov) const
47 return std::make_unique<ParametersT<DIM, T, StraightLineSurface>>(
48 position, momentum, charge, *this, std::move(cov));
51inline StraightLineSurface*
52StraightLineSurface::clone() const
54 return new StraightLineSurface(*this);
57inline const SurfaceBounds&
58StraightLineSurface::bounds() const
61 return *(m_bounds.get());
62 if (Surface::m_associatedDetElement &&
63 Surface::m_associatedDetElementId.is_valid()) {
64 return m_associatedDetElement->bounds(Surface::m_associatedDetElementId);
66 if (Surface::m_associatedDetElement)
67 return m_associatedDetElement->bounds();
72StraightLineSurface::insideBounds(const Amg::Vector2D& locpos,
76 if (!(m_bounds.get()) && !Surface::m_associatedDetElement)
78 return (std::abs(locpos[locR]) < bounds().r() + tol1 &&
79 bounds().insideLoc2(locpos, tol2));
83StraightLineSurface::insideBoundsCheck(const Amg::Vector2D& locpos,
84 const BoundaryCheck& bchk) const
86 return StraightLineSurface::insideBounds(
87 locpos, bchk.toleranceLoc1, bchk.toleranceLoc2);
90inline const Amg::Vector3D&
91StraightLineSurface::lineDirection() const
93 if (!m_lineDirection.isValid()) {
94 m_lineDirection.set(transform().linear().col(2));
96 return *(m_lineDirection.ptr());
99/** the pathCorrection for derived classes with thickness */
101StraightLineSurface::pathCorrection(const Amg::Vector3D&,
102 const Amg::Vector3D&) const
107/** Return properly formatted class name for screen output */
109StraightLineSurface::name() const
111 return "Trk::StraightLineSurface";