ATLAS Offline Software
PlaneSurface.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // PlaneSurface.h, (c) ATLAS Detector software
8 
9 #ifndef TRKSURFACES_PLANESURFACE_H
10 #define TRKSURFACES_PLANESURFACE_H
11 
12 // Trk
15 #include "TrkSurfaces/NoBounds.h"
16 #include "TrkSurfaces/Surface.h"
18 // Amg
21 
22 class MsgStream;
23 class Identifier;
24 template<class SURFACE, class BOUNDS_CNV>
25 class BoundSurfaceCnv_p1;
26 template<class SURFACE, class BOUNDS_CNV>
27 class BoundSurfaceCnv_p2;
28 
29 namespace Trk {
30 
31 class LocalDirection;
32 class LocalParameters;
33 class TrkDetElementBase;
34 class RectangleBounds;
35 class TriangleBounds;
36 class AnnulusBounds;
37 class TrapezoidBounds;
38 class RotatedTrapezoidBounds;
39 class DiamondBounds;
40 class EllipseBounds;
41 class CurvilinearUVT;
42 template<int DIM, class T, class S>
43 class ParametersT;
44 
63 class PlaneSurface : public Surface
64 {
65 public:
68 
70  PlaneSurface();
71 
73  PlaneSurface(const PlaneSurface& psf) = default;
74 
76  PlaneSurface& operator=(const PlaneSurface& psf) = default;
77 
79  PlaneSurface(PlaneSurface&& psf) noexcept = default;
80 
82  PlaneSurface& operator=(PlaneSurface&& psf) noexcept = default;
83 
85  virtual ~PlaneSurface() = default;
86 
88  PlaneSurface(const PlaneSurface& psf, const Amg::Transform3D& transf);
89 
91  PlaneSurface(const Amg::Vector3D& position, const CurvilinearUVT& curvUVT);
92 
94  PlaneSurface(const TrkDetElementBase& detelement,
95  const Amg::Transform3D& transf);
96 
98  PlaneSurface(const TrkDetElementBase& detelement);
99 
102  PlaneSurface(const TrkDetElementBase& detelement,
103  const Identifier& id,
104  const Amg::Transform3D & transf);
105 
108  PlaneSurface(const TrkDetElementBase& detelement,
109  const Identifier& id);
110 
112  PlaneSurface(const Amg::Transform3D& htrans);
113 
114 
116  PlaneSurface(const Amg::Transform3D & htrans, double halephi, double haleta);
117 
119  PlaneSurface(const Amg::Transform3D & htrans,
120  double minhalephi,
121  double maxhalephi,
122  double haleta);
123 
126  PlaneSurface(const Amg::Transform3D & htrans, const Trk::SurfaceBounds* rbounds);
127 
129  PlaneSurface(const Amg::Transform3D& htrans,
131 
133  virtual bool operator==(const Surface& sf) const override;
134  bool operator==(const PlaneSurface& cf) const;
135 
137  virtual PlaneSurface* clone() const override;
138 
140  constexpr virtual SurfaceType type() const override final;
141 
145  double l1,
146  double l2,
147  double phi,
148  double theta,
149  double qop,
150  std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
151 
155  const Amg::Vector3D& position,
157  double charge,
158  std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
159 
163  double l1,
164  double l2,
165  double phi,
166  double theta,
167  double oop,
168  std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
169 
173  const Amg::Vector3D& position,
175  double charge = 0.,
176  std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
177 
179  template<int DIM, class T>
181  double l1,
182  double l2,
183  double phi,
184  double theta,
185  double qop,
186  std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
187 
189  template<int DIM, class T>
191  const Amg::Vector3D& position,
193  double charge,
194  std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
195 
198  virtual const SurfaceBounds& bounds() const override final;
199 
201  virtual bool insideBounds(const Amg::Vector2D& locpos,
202  double tol1 = 0.,
203  double tol2 = 0.) const override;
204 
205  virtual bool insideBoundsCheck(
206  const Amg::Vector2D& locpos,
207  const BoundaryCheck& bchk) const override final;
208 
212  virtual bool isOnSurface(const Amg::Vector3D& glopo,
213  const BoundaryCheck& bchk = true,
214  double tol1 = 0.,
215  double tol2 = 0.) const override final;
216 
219  virtual void localToGlobal(const Amg::Vector2D& locp,
220  const Amg::Vector3D& mom,
221  Amg::Vector3D& glob) const override final;
222 
226  virtual bool globalToLocal(const Amg::Vector3D& glob,
227  const Amg::Vector3D& mom,
228  Amg::Vector2D& loc) const override final;
229 
233  Amg::Vector3D& globdir) const;
234 
238  Trk::LocalDirection& locdir) const;
239 
262  const Amg::Vector3D& pos,
263  const Amg::Vector3D& dir,
264  bool forceDir,
265  Trk::BoundaryCheck bchk) const override final;
266 
269  const Amg::Vector3D& pos,
270  const Amg::Vector3D& dir) const override final;
271 
274  const Amg::Vector3D& pos,
275  const Amg::Vector3D& dir,
276  bool Bound) const override final;
277 
279  virtual std::string name() const override;
280 
281 protected:
282  template<class SURFACE, class BOUNDS_CNV>
283  friend class ::BoundSurfaceCnv_p1;
284  template<class SURFACE, class BOUNDS_CNV>
285  friend class ::BoundSurfaceCnv_p2;
286 
288  static const NoBounds s_boundless;
290 };
291 
292 } // end of namespace
293 
294 #include "TrkSurfaces/PlaneSurface.icc"
295 #endif // TRKSURFACES_PLANESURFACE_H
Trk::PlaneSurface::operator==
virtual bool operator==(const Surface &sf) const override
Equality operator.
Definition: PlaneSurface.cxx:137
Trk::PlaneSurface::globalToLocal
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
Definition: PlaneSurface.cxx:213
Trk::PlaneSurface::localToGlobalDirection
void localToGlobalDirection(const Trk::LocalDirection &locdir, Amg::Vector3D &globdir) const
This method transforms a local direction wrt the plane to a global direction.
Definition: PlaneSurface.cxx:242
Trk::Intersection
Definition: Intersection.h:24
Surface.h
Trk::DistanceSolution
Definition: DistanceSolution.h:25
Trk::Surface::ChargedTrackParametersUniquePtr
std::unique_ptr< ParametersBase< 5, Trk::Charged > > ChargedTrackParametersUniquePtr
Unique ptr types.
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:125
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
Trk::SurfaceBounds
Definition: SurfaceBounds.h:47
BoundSurfaceCnv_p2
Definition: ConeSurface.h:27
taskman.template
dictionary template
Definition: taskman.py:317
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
Trk::SurfaceType
SurfaceType
Definition: SurfaceTypes.h:17
Trk::Surface::NeutralTrackParametersUniquePtr
std::unique_ptr< ParametersBase< 5, Trk::Neutral > > NeutralTrackParametersUniquePtr
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:127
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
Trk::PlaneSurface::PlaneSurface
PlaneSurface(const PlaneSurface &psf)=default
Copy Constructor.
Trk::PlaneSurface::PlaneSurface
PlaneSurface(PlaneSurface &&psf) noexcept=default
Move Constructor.
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
Trk::PlaneSurface::straightLineDistanceEstimate
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override final
fast straight line distance evaluation to Surface
Definition: PlaneSurface.cxx:281
protected
#define protected
Definition: DetDescrConditionsDict_dict_fixes.cxx:14
Trk::PlaneSurface::PlaneSurface
PlaneSurface()
Default Constructor - needed for persistency.
Definition: PlaneSurface.cxx:36
Trk::AmgSymMatrix
AmgSymMatrix(5) &GXFTrackState
Definition: GXFTrackState.h:156
BoundSurfaceCnv_p1
Definition: ConeSurface.h:25
GeoPrimitives.h
Trk::PlaneSurface::insideBounds
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const override
This method calls the inside() method of the Bounds.
SurfaceBounds.h
Trk::PlaneSurface::m_bounds
SharedObject< const SurfaceBounds > m_bounds
bounds (shared)
Definition: PlaneSurface.h:287
skel.l2
l2
Definition: skel.GENtoEVGEN.py:426
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
Trk::PlaneSurface::staticType
static constexpr SurfaceType staticType
The surface type static constexpr.
Definition: PlaneSurface.h:67
Trk::PlaneSurface::s_boundless
static const NoBounds s_boundless
Definition: PlaneSurface.h:289
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
Trk::PlaneSurface::createUniqueParameters
std::unique_ptr< ParametersT< DIM, T, PlaneSurface > > createUniqueParameters(double l1, double l2, double phi, double theta, double qop, std::optional< AmgSymMatrix(DIM)> cov=std::nullopt) const
Use the Surface as a ParametersBase constructor, from local parameters.
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
Trk::theta
@ theta
Definition: ParamDefs.h:72
Trk::PlaneSurface::operator==
bool operator==(const PlaneSurface &cf) const
ParametersT.h
Trk::PlaneSurface::insideBoundsCheck
virtual bool insideBoundsCheck(const Amg::Vector2D &locpos, const BoundaryCheck &bchk) const override final
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::PlaneSurface::operator=
PlaneSurface & operator=(const PlaneSurface &psf)=default
Assignment operator.
Trk::PlaneSurface::globalToLocalDirection
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
Definition: PlaneSurface.cxx:260
Trk::LocalDirection
represents the three-dimensional global direction with respect to a planar surface frame.
Definition: LocalDirection.h:81
SharedObject.h
beamspotman.dir
string dir
Definition: beamspotman.py:623
EventPrimitives.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
Trk::PlaneSurface::createUniqueTrackParameters
virtual Surface::ChargedTrackParametersUniquePtr createUniqueTrackParameters(double l1, double l2, double phi, double theta, double qop, std::optional< AmgSymMatrix(5)> cov=std::nullopt) const override final
Use the Surface as a ParametersBase constructor, from local parameters - charged.
Definition: PlaneSurface.cxx:149
charge
double charge(const T &p)
Definition: AtlasPID.h:494
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::PlaneSurface::straightLineIntersection
virtual Intersection straightLineIntersection(const Amg::Vector3D &pos, const Amg::Vector3D &dir, bool forceDir, Trk::BoundaryCheck bchk) const override final
fast straight line intersection schema - standard: provides closest intersection and (signed) path le...
Definition: PlaneSurface.cxx:223
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::NoBounds
Definition: NoBounds.h:30
Trk::PlaneSurface::operator=
PlaneSurface & operator=(PlaneSurface &&psf) noexcept=default
Move assignment operator.
Trk::SharedObject
std::shared_ptr< T > SharedObject
Definition: SharedObject.h:24
Trk::PlaneSurface::type
constexpr virtual SurfaceType type() const override final
Return the surface type.
Trk::PlaneSurface::createUniqueNeutralParameters
virtual NeutralTrackParametersUniquePtr createUniqueNeutralParameters(double l1, double l2, double phi, double theta, double oop, std::optional< AmgSymMatrix(5)> cov=std::nullopt) const override final
Use the Surface as a ParametersBase constructor, from local parameters - neutral.
Definition: PlaneSurface.cxx:176
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
Trk::CurvilinearUVT
Definition: CurvilinearUVT.h:45
Trk::PlaneSurface::~PlaneSurface
virtual ~PlaneSurface()=default
Destructor.
Trk::PlaneSurface
Definition: PlaneSurface.h:64
Trk::BoundaryCheck
Definition: BoundaryCheck.h:51
Trk::PlaneSurface::bounds
virtual const SurfaceBounds & bounds() const override final
This method returns the bounds by reference, static NoBounds in case of no boundaries.
Trk::SurfaceType::Plane
@ Plane
Trk::phi
@ phi
Definition: ParamDefs.h:81
skel.l1
l1
Definition: skel.GENtoEVGEN.py:425
Trk::PlaneSurface::name
virtual std::string name() const override
Return properly formatted class name for screen output.
Trk::PlaneSurface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
Definition: PlaneSurface.cxx:204
Trk::PlaneSurface::isOnSurface
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const override final
This method returns true if the GlobalPosition is on the Surface for both, within or without check of...
Definition: PlaneSurface.cxx:268
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::PlaneSurface::clone
virtual PlaneSurface * clone() const override
Virtual constructor.
NoBounds.h