ATLAS Offline Software
Loading...
Searching...
No Matches
CylinderSurface.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// CylinderSurface.h, (c) ATLAS Detector software
8
9#ifndef TRKSURFACES_CYLINDERSURFACE_H
10#define TRKSURFACES_CYLINDERSURFACE_H
11
12// Trk
17#include "TrkSurfaces/Surface.h"
18// Amg
21
22#include <memory>
23class MsgStream;
24template<class SURFACE, class BOUNDS_CNV>
26template<class SURFACE, class BOUNDS_CNV>
28
29namespace Trk {
30
31template<int DIM, class T, class S>
32class ParametersT;
33
53
55{
56
57public:
60
63
66
69
71 CylinderSurface(CylinderSurface&& csf) noexcept = default;
72
74 CylinderSurface& operator=(CylinderSurface&& csf) noexcept = default;
75
77 virtual ~CylinderSurface() = default;
78
81 double radius,
82 double hlength);
83
86 double radius,
87 double hphi,
88 double hlength);
89
91 CylinderSurface(const Amg::Transform3D& htrans, std::shared_ptr<const CylinderBounds> cbounds);
92
95 CylinderSurface(const Amg::Transform3D& htrans);
96
99 CylinderSurface(double radius, double hlength);
100
103 CylinderSurface(double radius, double hphi, double hlength);
104
108 CylinderSurface(std::shared_ptr<const CylinderBounds> cbounds);
109
111 CylinderSurface(const CylinderSurface& csf, const Amg::Transform3D& transf);
112
114 virtual bool operator==(const Surface& sf) const override;
115 bool operator==(const CylinderSurface& cf) const;
116
118 virtual CylinderSurface* clone() const override;
119
123 double l1,
124 double l2,
125 double phi,
126 double theta,
127 double qop,
128 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
129
133 const Amg::Vector3D& position,
134 const Amg::Vector3D& momentum,
135 double charge,
136 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
137
141 double l1,
142 double l2,
143 double phi,
144 double theta,
145 double qop,
146 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
147
151 const Amg::Vector3D& position,
152 const Amg::Vector3D& momentum,
153 double charge,
154 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
155
157 template<int DIM, class T>
158 std::unique_ptr<ParametersT<DIM, T, CylinderSurface>> createUniqueParameters(
159 double l1,
160 double l2,
161 double phi,
162 double theta,
163 double qop,
164 std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
165
167 template<int DIM, class T>
168 std::unique_ptr<ParametersT<DIM, T, CylinderSurface>> createUniqueParameters(
169 const Amg::Vector3D& position,
170 const Amg::Vector3D& momentum,
171 double charge,
172 std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
173
179 const Amg::Vector3D& glopos,
180 const Amg::Vector3D& glomom) const override final;
181
183 constexpr virtual SurfaceType type() const override final;
184
189 virtual const Amg::Vector3D& globalReferencePoint() const override final;
190
191 // using from the base class
192 using Trk::Surface::normal;
195 virtual Amg::Vector3D normal(const Amg::Vector2D& locpo) const override final;
196
200
203 virtual const CylinderBounds& bounds() const override final;
204
206
208 virtual bool insideBounds(const Amg::Vector2D& locpos,
209 double tol1 = 0.,
210 double tol2 = 0.) const override;
211
212 virtual bool insideBoundsCheck(const Amg::Vector2D& locpos,
213 const BoundaryCheck& bchk) const override final;
214
217 const LocalParameters& locpars) const override final;
218
221 virtual void localToGlobal(const Amg::Vector2D& locp,
222 const Amg::Vector3D& mom,
223 Amg::Vector3D& glob) const override;
224
227 virtual bool globalToLocal(const Amg::Vector3D& glob,
228 const Amg::Vector3D& mom,
229 Amg::Vector2D& loc) const override;
230
234 virtual bool isOnSurface(const Amg::Vector3D& glopo,
235 const BoundaryCheck& bchk = true,
236 double tol1 = 0.,
237 double tol2 = 0.) const override;
238
259 const Amg::Vector3D& pos,
260 const Amg::Vector3D& dir,
261 bool forceDir = false,
262 Trk::BoundaryCheck bchk = false) const override final;
263
266 const Amg::Vector3D& pos,
267 const Amg::Vector3D& dir) const override;
268
271 const Amg::Vector3D& pos,
272 const Amg::Vector3D& dir,
273 bool bound) const override;
274
276 virtual double pathCorrection(const Amg::Vector3D& pos,
277 const Amg::Vector3D& mom) const override;
278
280 virtual std::string name() const override;
281
282protected:
283 template<class SURFACE, class BOUNDS_CNV>
284 friend class ::BoundSurfaceCnv_p1;
285 template<class SURFACE, class BOUNDS_CNV>
286 friend class ::BoundSurfaceCnv_p2;
287
294};
295
296} // end of namespace
297#include "TrkSurfaces/CylinderSurface.icc"
298
299#endif // TRKSURFACES_CYLINDERSURFACE_H
double charge(const T &p)
Definition AtlasPID.h:997
#define AmgSymMatrix(dim)
#define protected
Eigen::Matrix< double, 3, 1 > Vector3D
CylinderSurface()
Default Constructor.
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
Bounds for a cylindrical Surface.
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.
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override
Specialized for CylinderSurface : LocalToGlobal method without dynamic memory allocation.
CylinderSurface()
Default Constructor.
virtual std::string name() const override
Return properly formatted class name for screen output.
CylinderSurface(CylinderSurface &&csf) noexcept=default
Move constructor.
virtual Amg::Vector3D normal(const Amg::Vector2D &locpo) const override final
Return method for surface normal information at a given local point, overwrites the normal() from bas...
virtual double pathCorrection(const Amg::Vector3D &pos, const Amg::Vector3D &mom) const override
the pathCorrection for derived classes with thickness
std::shared_ptr< const CylinderBounds > m_bounds
The global reference point (== a point on the surface)
virtual const Amg::Vector3D & rotSymmetryAxis() const
Return method for the rotational symmetry axis - the z-Axis of the HepTransform.
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const override
This method calls the inside method of CylinderBounds.
virtual constexpr SurfaceType type() const override final
Return the surface type.
CylinderSurface & operator=(CylinderSurface &&csf) noexcept=default
Move Assignment operator.
static constexpr SurfaceType staticType
The surface type static constexpr.
CxxUtils::CachedUniquePtr< Amg::Vector3D > m_rotSymmetryAxis
CylinderSurface & operator=(const CylinderSurface &csf)
Assignment operator.
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 - provides closest intersection and (signed) path length
bool hasBounds() const
friend class ::BoundSurfaceCnv_p1
< data members
virtual CylinderSurface * clone() const override
Implicit Constructor.
virtual ~CylinderSurface()=default
Destructor.
std::unique_ptr< ParametersT< DIM, T, CylinderSurface > > 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.
virtual bool insideBoundsCheck(const Amg::Vector2D &locpos, const BoundaryCheck &bchk) const override final
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...
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const override
This method returns true if the GlobalPosition is on the Surface for both, within or without check of...
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...
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override
fast distance to Surface
friend class ::BoundSurfaceCnv_p2
bounds (shared)
std::unique_ptr< ParametersT< DIM, T, CylinderSurface > > 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.
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override
Specialized for CylinderSurface : GlobalToLocal method without dynamic memory allocation - boolean ch...
virtual const CylinderBounds & bounds() const override final
This method returns the CylinderBounds by reference (NoBounds is not possible for cylinder)
CxxUtils::CachedUniquePtr< Amg::Vector3D > m_referencePoint
The rotational symmetry axis.
virtual bool operator==(const Surface &sf) const override
Equality operator.
virtual Amg::Vector2D localParametersToPosition(const LocalParameters &locpars) const override final
Specialized for CylinderSurface : LocalParameters to Vector2D.
bool operator==(const CylinderSurface &cf) const
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.
Access to distance solutions.
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition ParametersT.h:49
std::unique_ptr< ParametersBase< 5, Trk::Charged > > ChargedTrackParametersUniquePtr
Unique ptr types.
Surface()
Default Constructor for inheriting classes.
std::unique_ptr< ParametersBase< 5, Trk::Neutral > > NeutralTrackParametersUniquePtr
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
SurfaceType
This enumerator simplifies the persistency & calculations,.
@ theta
Definition ParamDefs.h:66
@ phi
Definition ParamDefs.h:75
STL namespace.