ATLAS Offline Software
ConeSurface.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 // ConeSurface.h, (c) ATLAS Detector software
8 
9 #ifndef TRKSURFACES_CONESURFACE_H
10 #define TRKSURFACES_CONESURFACE_H
11 
12 // Trk
16 #include "TrkSurfaces/ConeBounds.h"
17 #include "TrkSurfaces/Surface.h"
18 // Amg
21 
22 class MsgStream;
23 
24 template<class SURFACE, class BOUNDS_CNV>
26 template<class SURFACE, class BOUNDS_CNV>
28 
29 namespace Trk {
30 
31 class LocalParameters;
32 template<int DIM, class T, class S>
33 class ParametersT;
34 
50 class ConeSurface : public Surface
51 {
52 
53 public:
56 
58  ConeSurface();
59 
61  ConeSurface& operator=(const ConeSurface& csf);
62 
64  ConeSurface(const ConeSurface& csf);
65 
67  ConeSurface(ConeSurface&& annbo) = default;
69  ConeSurface& operator=(ConeSurface&& sbo) = default;
70 
72  virtual ~ConeSurface() = default ;
73 
75  ConeSurface(const Amg::Transform3D& htrans,
76  double alpha,
77  bool symmetric = false);
78 
80  ConeSurface(const Amg::Transform3D& htrans,
81  double alpha,
82  double locZmin,
83  double locZmax,
84  double halfPhi = M_PI);
85 
89  ConeSurface(const Amg::Transform3D& htrans, ConeBounds* cbounds);
90 
93  ConeSurface(const Amg::Transform3D& htrans);
94 
96  ConeSurface(const ConeSurface& csf, const Amg::Transform3D& transf);
97 
99  virtual bool operator==(const Surface& sf) const override;
100  bool operator==(const ConeSurface& cf) const;
101 
103  virtual ConeSurface* clone() const override;
104 
108  double l1,
109  double l2,
110  double phi,
111  double theta,
112  double qop,
113  std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
114 
118  const Amg::Vector3D& position,
119  const Amg::Vector3D& momentum,
120  double charge,
121  std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
122 
126  double l1,
127  double l2,
128  double phi,
129  double theta,
130  double qop,
131  std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
132 
137  const Amg::Vector3D& position,
138  const Amg::Vector3D& momentum,
139  double charge,
140  std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
141 
143  template<int DIM, class T>
144  std::unique_ptr<ParametersT<DIM, T, ConeSurface>> createUniqueParameters(
145  double l1,
146  double l2,
147  double phi,
148  double theta,
149  double qop,
150  std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
151 
153  template<int DIM, class T>
154  std::unique_ptr<ParametersT<DIM, T, ConeSurface>> createUniqueParameters(
155  const Amg::Vector3D& position,
156  const Amg::Vector3D& momentum,
157  double charge,
158  std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
159 
161  constexpr virtual SurfaceType type() const override final;
162 
167  const Amg::Vector3D& glopos,
168  const Amg::Vector3D& glomom) const override final;
169 
174  virtual const Amg::Vector3D& globalReferencePoint() const override final;
175 
176  // using from the base class
177  using Trk::Surface::normal;
178 
181  virtual Amg::Vector3D normal(const Amg::Vector2D& locpo) const override final;
182 
185  virtual const Amg::Vector3D& rotSymmetryAxis() const;
186 
189  virtual const ConeBounds& bounds() const override final;
190 
192  virtual bool insideBounds(const Amg::Vector2D& locpos,
193  double tol1 = 0.,
194  double tol2 = 0.) const override;
195  virtual bool insideBoundsCheck(const Amg::Vector2D& locpos,
196  const BoundaryCheck& bchk) const override final;
197 
200  const LocalParameters& locpars) const override final;
201 
204  virtual void localToGlobal(const Amg::Vector2D& locp,
205  const Amg::Vector3D& mom,
206  Amg::Vector3D& glob) const override final;
207 
210  virtual bool globalToLocal(const Amg::Vector3D& glob,
211  const Amg::Vector3D& mom,
212  Amg::Vector2D& loc) const override final;
213 
247  const Amg::Vector3D& pos,
248  const Amg::Vector3D& dir,
249  bool forceDir = false,
250  BoundaryCheck bchk = false) const override final;
251 
254  const Amg::Vector3D& pos,
255  const Amg::Vector3D& dir) const override final;
256 
259  const Amg::Vector3D& pos,
260  const Amg::Vector3D& dir,
261  bool bound) const override final;
262 
264  virtual double pathCorrection(const Amg::Vector3D&,
265  const Amg::Vector3D&) const override;
266 
268  virtual std::string name() const override;
269 
270 protected:
271  template<class SURFACE, class BOUNDS_CNV>
272  friend class ::BoundSurfaceCnv_p1;
273  template<class SURFACE, class BOUNDS_CNV>
274  friend class ::BoundSurfaceCnv_p2;
281 };
282 
283 } // end of namespace
284 #include "TrkSurfaces/ConeSurface.icc"
285 
286 #endif // TRKSURFACES_CONESURFACE_H
Trk::ConeSurface::insideBoundsCheck
virtual bool insideBoundsCheck(const Amg::Vector2D &locpos, const BoundaryCheck &bchk) const override final
Trk::LocalParameters
Definition: LocalParameters.h:98
Trk::Intersection
Definition: Intersection.h:24
Trk::ConeSurface::operator=
ConeSurface & operator=(const ConeSurface &csf)
Assignment operator.
Definition: ConeSurface.cxx:86
CxxUtils::CachedUniquePtr
CachedUniquePtrT< const T > CachedUniquePtr
Definition: CachedUniquePtr.h:114
Surface.h
Trk::ConeSurface::staticType
static constexpr SurfaceType staticType
The surface type static constexpr.
Definition: ConeSurface.h:55
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
BoundSurfaceCnv_p2
Definition: ConeSurface.h:27
Trk::ConeSurface::ConeSurface
ConeSurface()
Default Constructor.
Definition: ConeSurface.cxx:20
Trk::ConeSurface::insideBounds
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const override
This method calls the inside method of ConeBounds.
Trk::ConeSurface::globalReferencePoint
virtual const Amg::Vector3D & globalReferencePoint() const override final
Returns a global reference point: For the Cylinder this is Where denotes the averagePhi() of the cy...
Definition: ConeSurface.cxx:138
Trk::ConeSurface::ConeSurface
ConeSurface(ConeSurface &&annbo)=default
Move constructor.
taskman.template
dictionary template
Definition: taskman.py:317
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
M_PI
#define M_PI
Definition: ActiveFraction.h:11
Trk::ConeSurface::m_rotSymmetryAxis
CxxUtils::CachedUniquePtr< Amg::Vector3D > m_rotSymmetryAxis
Definition: ConeSurface.h:280
Trk::ConeSurface::~ConeSurface
virtual ~ConeSurface()=default
Destructor.
Trk::SurfaceType
SurfaceType
Definition: SurfaceTypes.h:17
Trk::ConeBounds
Definition: ConeBounds.h:44
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::ConeSurface::localParametersToPosition
virtual Amg::Vector2D localParametersToPosition(const LocalParameters &locpars) const override final
Specialized for ConeSurface : LocalParameters to Vector2D.
ParamDefs.h
Trk::ConeSurface::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: ConeSurface.cxx:173
Trk::ConeSurface::bounds
virtual const ConeBounds & bounds() const override final
This method returns the ConeBounds by reference (NoBounds is not possible for cone)
protected
#define protected
Definition: DetDescrConditionsDict_dict_fixes.cxx:14
Trk::AmgSymMatrix
AmgSymMatrix(5) &GXFTrackState
Definition: GXFTrackState.h:156
BoundSurfaceCnv_p1
Definition: ConeSurface.h:25
GeoPrimitives.h
Trk::ConeSurface::m_bounds
SharedObject< const ConeBounds > m_bounds
The global reference point (== a point on thesurface)
Definition: ConeSurface.h:276
skel.l2
l2
Definition: skel.GENtoEVGEN.py:399
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
Trk::ConeSurface::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: ConeSurface.cxx:119
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
Trk::ConeSurface::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: ConeSurface.cxx:100
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::ConeSurface::createUniqueParameters
std::unique_ptr< ParametersT< DIM, T, ConeSurface > > 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::Surface::normal
virtual const Amg::Vector3D & normal() const
Returns the normal vector of the Surface (i.e.
Trk::ConeSurface::type
constexpr virtual SurfaceType type() const override final
Return the surface type.
Trk::SurfaceType::Cone
@ Cone
SharedObject.h
beamspotman.dir
string dir
Definition: beamspotman.py:623
Trk::ConeSurface::pathCorrection
virtual double pathCorrection(const Amg::Vector3D &, const Amg::Vector3D &) const override
the pathCorrection for derived classes with thickness
Definition: ConeSurface.cxx:364
Trk::ConeSurface::clone
virtual ConeSurface * clone() const override
Implicit Constructor.
EventPrimitives.h
Trk::ConeSurface::straightLineIntersection
virtual Intersection straightLineIntersection(const Amg::Vector3D &pos, const Amg::Vector3D &dir, bool forceDir=false, BoundaryCheck bchk=false) const override final
fast straight line intersection schema - provides closest intersection and (signed) path length
Definition: ConeSurface.cxx:217
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::ConeSurface::createUniqueParameters
std::unique_ptr< ParametersT< DIM, T, ConeSurface > > createUniqueParameters(const Amg::Vector3D &position, const Amg::Vector3D &momentum, double charge, std::optional< AmgSymMatrix(DIM)> cov=std::nullopt) const
Use the Surface as a ParametersBase constructor, from global parameters.
charge
double charge(const T &p)
Definition: AtlasPID.h:538
Trk::ConeSurface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specialized for ConeSurface : LocalToGlobal method without dynamic memory allocation.
Definition: ConeSurface.cxx:193
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::ConeSurface::rotSymmetryAxis
virtual const Amg::Vector3D & rotSymmetryAxis() const
Return method for the rotational symmetry axis - the z-Axis of the HepTransform.
Definition: ConeSurface.cxx:162
Trk::SharedObject
std::shared_ptr< T > SharedObject
Definition: SharedObject.h:24
ConeBounds.h
Trk::ConeSurface::m_referencePoint
CxxUtils::CachedUniquePtr< Amg::Vector3D > m_referencePoint
The rotational symmetry axis.
Definition: ConeSurface.h:278
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
Trk::ConeSurface::operator=
ConeSurface & operator=(ConeSurface &&sbo)=default
Move assignment.
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition: GeoPrimitives.h:49
Trk::BoundaryCheck
Definition: BoundaryCheck.h:51
Trk::ConeSurface::operator==
bool operator==(const ConeSurface &cf) const
Trk::ConeSurface
Definition: ConeSurface.h:51
Trk::phi
@ phi
Definition: ParamDefs.h:75
skel.l1
l1
Definition: skel.GENtoEVGEN.py:398
Trk::ConeSurface::globalToLocal
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specialized for ConeSurface : GlobalToLocal method without dynamic memory allocation - boolean checks...
Definition: ConeSurface.cxx:204
Trk::ConeSurface::straightLineDistanceEstimate
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override final
fast straight line distance to Surface
Definition: ConeSurface.cxx:284
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::ConeSurface::operator==
virtual bool operator==(const Surface &sf) const override
Equality operator.
Definition: ConeSurface.cxx:152
Trk::ConeSurface::name
virtual std::string name() const override
Return properly formatted class name for screen output.