ATLAS Offline Software
PerigeeSurface.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // PerigeeSurface.h, (c) ATLAS Detector software
8 
9 #ifndef TRKSURFACES_PERIGEESURFACE_H
10 #define TRKSURFACES_PERIGEESURFACE_H
11 
12 // Trk
15 #include "TrkSurfaces/NoBounds.h"
16 #include "TrkSurfaces/Surface.h"
17 // Amg
18 #include "CxxUtils/CachedValue.h"
21 
22 class MsgStream;
23 
24 namespace Trk {
25 
26 class LocalParameters;
27 template<int DIM, class T, class S>
28 class ParametersT;
29 
42 class PerigeeSurface final : public Surface
43 {
44 
45 public:
48 
51 
53  PerigeeSurface(const PerigeeSurface& pesf);
54 
57 
59  PerigeeSurface(PerigeeSurface&& pesf) noexcept = default;
60 
62  PerigeeSurface& operator=(PerigeeSurface&& slsf) noexcept = default;
63 
65  virtual ~PerigeeSurface() = default;
66 
68  PerigeeSurface(const Amg::Vector3D& gp);
69 
71  PerigeeSurface(const Amg::Transform3D& tTransform);
72 
74  PerigeeSurface(const PerigeeSurface& pesf, const Amg::Transform3D& transf);
75 
77  virtual PerigeeSurface* clone() const override final;
78 
80  virtual bool operator==(const Surface& sf) const override;
81  bool operator==(const PerigeeSurface& cf) const;
82 
86  double l1,
87  double l2,
88  double phi,
89  double theta,
90  double qop,
91  std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
92 
96  const Amg::Vector3D& position,
98  double charge,
99  std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
100 
104  double l1,
105  double l2,
106  double phi,
107  double theta,
108  double qop,
109  std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
110 
114  const Amg::Vector3D& position,
116  double charge,
117  std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
118 
120  template<int DIM, class T>
122  double l1,
123  double l2,
124  double phi,
125  double theta,
126  double qop,
127  std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
128 
130  template<int DIM, class T>
132  const Amg::Vector3D& position,
134  double charge,
135  std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
136 
138  constexpr virtual SurfaceType type() const override final;
139 
141  virtual const Amg::Vector3D& normal() const override final;
142 
144  virtual Amg::Vector3D normal(const Amg::Vector2D& lp) const override final;
145 
151  const Amg::Vector3D& glopos,
152  const Amg::Vector3D& glomom) const override final;
153 
161 
169  const Amg::Vector3D& glomom) const;
170 
172  virtual void localToGlobal(const Amg::Vector2D& locp,
173  const Amg::Vector3D& mom,
174  Amg::Vector3D& glob) const override final;
175 
179  virtual bool globalToLocal(const Amg::Vector3D& glob,
180  const Amg::Vector3D& mom,
181  Amg::Vector2D& loc) const override final;
182 
214  const Amg::Vector3D& pos,
215  const Amg::Vector3D& dir,
216  bool forceDir = false,
217  Trk::BoundaryCheck bchk = false) const override final;
218 
221  const Amg::Vector3D& pos,
222  const Amg::Vector3D& dir) const override final;
223 
226  const Amg::Vector3D& pos,
227  const Amg::Vector3D& dir,
228  bool Bound) const override final;
229 
231  virtual double pathCorrection(const Amg::Vector3D&,
232  const Amg::Vector3D&) const override final;
233 
235  virtual bool isOnSurface(const Amg::Vector3D& glopo,
236  const BoundaryCheck& bchk = true,
237  double tol1 = 0.,
238  double tol2 = 0.) const override final;
239 
241  virtual bool insideBounds(const Amg::Vector2D& locpos,
242  double tol1 = 0.,
243  double tol2 = 0.) const override final;
244 
245  virtual bool insideBoundsCheck(
246  const Amg::Vector2D& locpos,
247  const BoundaryCheck& bchk) const override final;
248 
252 
254  virtual const NoBounds& bounds() const override final;
255 
257  virtual std::string name() const override final;
258 
260  virtual MsgStream& dump(MsgStream& sl) const override;
262  virtual std::ostream& dump(std::ostream& sl) const override;
263 
264 protected:
269 };
270 
271 } // end of namespace
272 #include "TrkSurfaces/PerigeeSurface.icc"
273 
274 #endif // TRKSURFACES_PERIGEESURFACE_H
Trk::LocalParameters
Definition: LocalParameters.h:98
Trk::PerigeeSurface::globalToLocal
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
GlobalToLocal method without dynamic memory allocation - boolean checks if on surface.
Definition: PerigeeSurface.cxx:211
Trk::Intersection
Definition: Intersection.h:24
Trk::PerigeeSurface::createUniqueNeutralParameters
virtual NeutralTrackParametersUniquePtr createUniqueNeutralParameters(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 - neutral.
Definition: PerigeeSurface.cxx:125
Surface.h
Trk::DistanceSolution
Definition: DistanceSolution.h:25
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
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::PerigeeSurface::name
virtual std::string name() const override final
Return properly formatted class name for screen output.
taskman.template
dictionary template
Definition: taskman.py:317
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
Trk::PerigeeSurface::m_lineDirection
CxxUtils::CachedValue< Amg::Vector3D > m_lineDirection
< data members cache of the line direction (speeds up)
Definition: PerigeeSurface.h:267
Trk::PerigeeSurface::createUniqueParameters
std::unique_ptr< ParametersT< DIM, T, PerigeeSurface > > 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.
Trk::PerigeeSurface::lineDirection
const Amg::Vector3D & lineDirection() const
Special method for StraightLineSurface - provides the Line direction from cache: speedup.
Trk::PerigeeSurface::operator=
PerigeeSurface & operator=(const PerigeeSurface &slsf)
Assignment operator.
Definition: PerigeeSurface.cxx:76
Trk::PerigeeSurface::isOnSurface
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const override final
This method checks if a globalPosition in on the Surface or not.
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
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Trk::PerigeeSurface::measurementFrame
virtual Amg::RotationMatrix3D measurementFrame(const Amg::Vector3D &glopos, const Amg::Vector3D &glomom) const override final
Return the measurement frame - this is needed for alignment, in particular for StraightLine and Perig...
Definition: PerigeeSurface.cxx:252
Trk::PerigeeSurface::localToGlobal
Amg::Vector3D localToGlobal(const LocalParameters &locpos) const
Local to global method: Take care that by just providing locR and locZ the global position cannot be ...
Definition: PerigeeSurface.cxx:152
Trk::PerigeeSurface::~PerigeeSurface
virtual ~PerigeeSurface()=default
Destructor.
protected
#define protected
Definition: DetDescrConditionsDict_dict_fixes.cxx:14
Trk::PerigeeSurface::dump
virtual MsgStream & dump(MsgStream &sl) const override
Output Method for MsgStream.
Definition: PerigeeSurface.cxx:302
Trk::AmgSymMatrix
AmgSymMatrix(5) &GXFTrackState
Definition: GXFTrackState.h:156
GeoPrimitives.h
GeometryStatics.h
Trk::PerigeeSurface::s_perigeeBounds
static const NoBounds s_perigeeBounds
Definition: PerigeeSurface.h:268
Trk::PerigeeSurface::straightLineIntersection
virtual Intersection straightLineIntersection(const Amg::Vector3D &pos, const Amg::Vector3D &dir, bool forceDir=false, Trk::BoundaryCheck bchk=false) const override final
fast straight line intersection schema - standard: provides closest intersection and (signed) path le...
Definition: PerigeeSurface.cxx:226
skel.l2
l2
Definition: skel.GENtoEVGEN.py:399
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
Trk::theta
@ theta
Definition: ParamDefs.h:66
ParametersT.h
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
CxxUtils
Definition: aligned_vector.h:29
Trk::PerigeeSurface::insideBoundsCheck
virtual bool insideBoundsCheck(const Amg::Vector2D &locpos, const BoundaryCheck &bchk) const override final
Trk::PerigeeSurface::staticType
static constexpr SurfaceType staticType
The surface type static constexpr.
Definition: PerigeeSurface.h:47
Trk::PerigeeSurface::normal
virtual const Amg::Vector3D & normal() const override final
Returns the x global axis.
beamspotman.dir
string dir
Definition: beamspotman.py:623
EventPrimitives.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::SurfaceType::Perigee
@ Perigee
Trk::PerigeeSurface::clone
virtual PerigeeSurface * clone() const override final
Virtual constructor.
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
CachedValue.h
Cached value with atomic update.
charge
double charge(const T &p)
Definition: AtlasPID.h:538
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::NoBounds
Definition: NoBounds.h:30
Trk::PerigeeSurface::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: PerigeeSurface.cxx:98
Trk::PerigeeSurface::operator=
PerigeeSurface & operator=(PerigeeSurface &&slsf) noexcept=default
Assignment operator.
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition: GeoPrimitives.h:49
Trk::BoundaryCheck
Definition: BoundaryCheck.h:51
Trk::PerigeeSurface::type
constexpr virtual SurfaceType type() const override final
Return the surface type.
Trk::phi
@ phi
Definition: ParamDefs.h:75
Trk::PerigeeSurface::pathCorrection
virtual double pathCorrection(const Amg::Vector3D &, const Amg::Vector3D &) const override final
the pathCorrection for derived classes with thickness
skel.l1
l1
Definition: skel.GENtoEVGEN.py:398
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::PerigeeSurface::bounds
virtual const NoBounds & bounds() const override final
Return bounds() method.
Trk::PerigeeSurface::insideBounds
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const override final
This surface calls the iside method of the bounds.
Trk::PerigeeSurface::PerigeeSurface
PerigeeSurface(PerigeeSurface &&pesf) noexcept=default
Copy constructor.
NoBounds.h
Trk::PerigeeSurface::PerigeeSurface
PerigeeSurface()
Default Constructor - needed for persistency.
Definition: PerigeeSurface.cxx:21
Trk::PerigeeSurface::straightLineDistanceEstimate
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override final
fast straight line distance evaluation to Surface
Definition: PerigeeSurface.cxx:269