2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
7 inline bool PlaneSurface::operator==(const PlaneSurface& psf) const
12 bool transfEqual(transform().isApprox(psf.transform(), 10e-8));
13 bool centerEqual = center() == psf.center();
14 bool boundsEqual = bounds() == psf.bounds();
15 return transfEqual && centerEqual && boundsEqual;
18 inline constexpr SurfaceType
19 PlaneSurface::type() const
21 return PlaneSurface::staticType;
24 /** Use the Surface as a ParametersBase constructor, from local parameters */
25 template<int DIM, class T>
26 std::unique_ptr<ParametersT<DIM, T, PlaneSurface>>
27 PlaneSurface::createUniqueParameters(double l1,
32 std::optional<AmgSymMatrix(DIM)> cov) const
34 return std::make_unique<ParametersT<DIM, T, PlaneSurface>>(
35 l1, l2, phi, theta, qop, *this, std::move(cov));
38 /** Use the Surface as a ParametersBase constructor, from global parameters */
39 template<int DIM, class T>
40 std::unique_ptr<ParametersT<DIM, T, PlaneSurface>>
41 PlaneSurface::createUniqueParameters(const Amg::Vector3D& position,
42 const Amg::Vector3D& momentum,
44 std::optional<AmgSymMatrix(DIM)> cov) const
46 return std::make_unique<ParametersT<DIM, T, PlaneSurface>>(
47 position, momentum, charge, *this, std::move(cov));
50 /** Return properly formatted class name for screen output */
52 PlaneSurface::name() const
54 return "Trk::PlaneSurface";
58 PlaneSurface::clone() const
60 return new PlaneSurface(*this);
64 PlaneSurface::insideBounds(const Amg::Vector2D& locpos,
68 return (bounds().inside(locpos, tol1, tol2));
72 PlaneSurface::insideBoundsCheck(const Amg::Vector2D& locpos,
73 const BoundaryCheck& bchk) const
75 return (bounds().inside(locpos, bchk));
78 inline const SurfaceBounds&
79 PlaneSurface::bounds() const
82 return *(m_bounds.get());
83 if (Surface::m_associatedDetElement &&
84 Surface::m_associatedDetElementId.is_valid()) {
85 return m_associatedDetElement->bounds(Surface::m_associatedDetElementId);
87 if (Surface::m_associatedDetElement)
88 return m_associatedDetElement->bounds();