ATLAS Offline Software
Loading...
Searching...
No Matches
ConeSurface.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// ConeSurface.h, (c) ATLAS Detector software
8
9#ifndef TRKSURFACES_CONESURFACE_H
10#define TRKSURFACES_CONESURFACE_H
11
12// Trk
16#include "TrkSurfaces/Surface.h"
17// Amg
20
21#include <memory>
22class MsgStream;
23
24template<class SURFACE, class BOUNDS_CNV>
26template<class SURFACE, class BOUNDS_CNV>
28
29namespace Trk {
30
31class LocalParameters;
32template<int DIM, class T, class S>
33class ParametersT;
34
49
50class ConeSurface : public Surface
51{
52
53public:
56
59
62
64 ConeSurface(const ConeSurface& csf);
65
67 ConeSurface(ConeSurface&& annbo) = 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
87 ConeSurface(const Amg::Transform3D& htrans, std::shared_ptr<const ConeBounds> cbounds);
88
91 ConeSurface(const Amg::Transform3D& htrans);
92
94 ConeSurface(const ConeSurface& csf, const Amg::Transform3D& transf);
95
97 virtual bool operator==(const Surface& sf) const override;
98 bool operator==(const ConeSurface& cf) const;
99
101 virtual ConeSurface* clone() const override;
102
106 double l1,
107 double l2,
108 double phi,
109 double theta,
110 double qop,
111 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
112
116 const Amg::Vector3D& position,
117 const Amg::Vector3D& momentum,
118 double charge,
119 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
120
124 double l1,
125 double l2,
126 double phi,
127 double theta,
128 double qop,
129 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
130
133
135 const Amg::Vector3D& position,
136 const Amg::Vector3D& momentum,
137 double charge,
138 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
139
141 template<int DIM, class T>
142 std::unique_ptr<ParametersT<DIM, T, ConeSurface>> createUniqueParameters(
143 double l1,
144 double l2,
145 double phi,
146 double theta,
147 double qop,
148 std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
149
151 template<int DIM, class T>
152 std::unique_ptr<ParametersT<DIM, T, ConeSurface>> createUniqueParameters(
153 const Amg::Vector3D& position,
154 const Amg::Vector3D& momentum,
155 double charge,
156 std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
157
159 constexpr virtual SurfaceType type() const override final;
160
165 const Amg::Vector3D& glopos,
166 const Amg::Vector3D& glomom) const override final;
167
172 virtual const Amg::Vector3D& globalReferencePoint() const override final;
173
174 // using from the base class
175 using Trk::Surface::normal;
176
179 virtual Amg::Vector3D normal(const Amg::Vector2D& locpo) const override final;
180
184
187 virtual const ConeBounds& bounds() const override final;
188
190 virtual bool insideBounds(const Amg::Vector2D& locpos,
191 double tol1 = 0.,
192 double tol2 = 0.) const override;
193 virtual bool insideBoundsCheck(const Amg::Vector2D& locpos,
194 const BoundaryCheck& bchk) const override final;
195
198 const LocalParameters& locpars) const override final;
199
202 virtual void localToGlobal(const Amg::Vector2D& locp,
203 const Amg::Vector3D& mom,
204 Amg::Vector3D& glob) const override final;
205
208 virtual bool globalToLocal(const Amg::Vector3D& glob,
209 const Amg::Vector3D& mom,
210 Amg::Vector2D& loc) const override final;
211
245 const Amg::Vector3D& pos,
246 const Amg::Vector3D& dir,
247 bool forceDir = false,
248 BoundaryCheck bchk = false) const override final;
249
252 const Amg::Vector3D& pos,
253 const Amg::Vector3D& dir) const override final;
254
257 const Amg::Vector3D& pos,
258 const Amg::Vector3D& dir,
259 bool bound) const override final;
260
262 virtual double pathCorrection(const Amg::Vector3D&,
263 const Amg::Vector3D&) const override;
264
266 virtual std::string name() const override;
267
269 template<class SURFACE, class BOUNDS_CNV>
270 friend class ::BoundSurfaceCnv_p1;
271 template<class SURFACE, class BOUNDS_CNV>
272 friend class ::BoundSurfaceCnv_p2;
279};
280
281} // end of namespace
282#include "TrkSurfaces/ConeSurface.icc"
283
284#endif // TRKSURFACES_CONESURFACE_H
#define M_PI
double charge(const T &p)
Definition AtlasPID.h:997
#define AmgSymMatrix(dim)
#define protected
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Eigen::Matrix< double, 3, 1 > Vector3D
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
Bounds for a conical Surface, the opening angle is stored in and always positively defined.
Definition ConeBounds.h:44
CxxUtils::CachedUniquePtr< Amg::Vector3D > m_rotSymmetryAxis
virtual const ConeBounds & bounds() const override final
This method returns the ConeBounds by reference (NoBounds is not possible for cone)
virtual Amg::Vector2D localParametersToPosition(const LocalParameters &locpars) const override final
Specialized for ConeSurface : LocalParameters to Vector2D.
virtual const Amg::Vector3D & rotSymmetryAxis() const
Return method for the rotational symmetry axis - the z-Axis of the HepTransform.
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 double pathCorrection(const Amg::Vector3D &, const Amg::Vector3D &) const override
the pathCorrection for derived classes with thickness
ConeSurface()
Default Constructor.
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const override
This method calls the inside method of ConeBounds.
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...
bool operator==(const ConeSurface &cf) const
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override final
fast straight line distance to Surface
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.
ConeSurface & operator=(ConeSurface &&sbo)=default
Move assignment.
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.
std::shared_ptr< const ConeBounds > m_bounds
The global reference point (== a point on thesurface)
friend class ::BoundSurfaceCnv_p1
virtual std::string name() const override
Return properly formatted class name for screen output.
ConeSurface(ConeSurface &&annbo)=default
Move constructor.
virtual bool operator==(const Surface &sf) const override
Equality operator.
ConeSurface & operator=(const ConeSurface &csf)
Assignment operator.
virtual bool insideBoundsCheck(const Amg::Vector2D &locpos, const BoundaryCheck &bchk) const override final
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.
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 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...
friend class ::BoundSurfaceCnv_p2
bounds (shared)
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...
virtual constexpr SurfaceType type() const override final
Return the surface type.
virtual ConeSurface * clone() const override
Implicit Constructor.
CxxUtils::CachedUniquePtr< Amg::Vector3D > m_referencePoint
The rotational symmetry axis.
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
static constexpr SurfaceType staticType
The surface type static constexpr.
Definition ConeSurface.h:55
virtual ~ConeSurface()=default
Destructor.
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.
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::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.