ATLAS Offline Software
Loading...
Searching...
No Matches
DiscSurface.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// DiscSurface.h, (c) ATLAS Detector software
8
9#ifndef TRKSURFACES_DISCSURFACE_H
10#define TRKSURFACES_DISCSURFACE_H
11
12// Trk
13#include <memory>
17#include "TrkSurfaces/Surface.h"
19// Amg
22// std
23#include <cmath> //for cos, sin etc
24
25class MsgStream;
26template<class SURFACE, class BOUNDS_CNV>
28template<class SURFACE, class BOUNDS_CNV>
30
31namespace Trk {
32
33class DiscBounds;
35class AnnulusBounds;
36class AnnulusBoundsPC;
38class LocalParameters;
39
40template<int DIM, class T, class S>
41class ParametersT;
42
52
53class DiscSurface : public Surface
54{
55
56public:
60
62 DiscSurface(const DiscSurface& psf);
63
66
68 DiscSurface(DiscSurface&& psf) noexcept = default;
69
71 DiscSurface& operator=(DiscSurface&& dsf) noexcept = default;
72
74 virtual ~DiscSurface();
75
78 DiscSurface(const Amg::Transform3D& htrans, double rmin, double rmax);
79
82 DiscSurface(const Amg::Transform3D& htrans,
83 double rmin,
84 double rmax,
85 double hphisec);
86
89 DiscSurface(const Amg::Transform3D& htrans,
90 double minhalfx,
91 double maxhalfx,
92 double maxR,
93 double minR,
94 double avephi,
95 double stereo = 0.);
96
98 DiscSurface(const Amg::Transform3D& htrans, std::shared_ptr<const DiscBounds> dbounds);
99
101 DiscSurface(const Amg::Transform3D& htrans, std::shared_ptr<const DiscTrapezoidalBounds> dtbounds);
102
105 DiscSurface(const Amg::Transform3D& htrans, std::shared_ptr<const AnnulusBoundsPC> annpcbounds);
106
119 DiscSurface(const Amg::Transform3D& htrans, const AnnulusBounds& annbounds,
120 const TrkDetElementBase* detElem = nullptr);
121
124 DiscSurface(const Amg::Transform3D& htrans);
125
127 DiscSurface(const TrkDetElementBase& dmnt);
128
130 DiscSurface(const DiscSurface& psf, const Amg::Transform3D& transf);
131
133 virtual bool operator==(const Surface& sf) const override;
134 bool operator==(const DiscSurface& cf) const;
135
137 virtual DiscSurface* clone() const override;
138
142 double l1,
143 double l2,
144 double phi,
145 double theta,
146 double qop,
147 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
148
152 const Amg::Vector3D& position,
153 const Amg::Vector3D& momentum,
154 double charge,
155 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
156
160 double l1,
161 double l2,
162 double phi,
163 double theta,
164 double qop,
165 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
166
170 const Amg::Vector3D& position,
171 const Amg::Vector3D& momentum,
172 double charge,
173 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
174
176 template<int DIM, class T>
177 std::unique_ptr<ParametersT<DIM, T, DiscSurface>> createUniqueParameters(
178 double l1,
179 double l2,
180 double phi,
181 double theta,
182 double qop,
183 std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
184
186 template<int DIM, class T>
187 std::unique_ptr<ParametersT<DIM, T, DiscSurface>> createUniqueParameters(
188 const Amg::Vector3D& position,
189 const Amg::Vector3D& momentum,
190 double charge,
191 std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
192
194 constexpr virtual SurfaceType type() const override final;
195
200 virtual const Amg::Vector3D& globalReferencePoint() const override final;
201
203 const SurfaceBounds& bounds() const override final;
204
206 virtual bool insideBounds(const Amg::Vector2D& locpos,
207 double tol1 = 0.,
208 double tol2 = 0.) const override;
209 virtual bool insideBoundsCheck(
210 const Amg::Vector2D& locpos,
211 const BoundaryCheck& bchk) const override final;
212
216 virtual bool isOnSurface(const Amg::Vector3D& glopo,
217 const BoundaryCheck& bchk = true,
218 double tol1 = 0.,
219 double tol2 = 0.) const override;
220
223 const LocalParameters& locpars) const override final;
224
227 virtual void localToGlobal(const Amg::Vector2D& locp,
228 const Amg::Vector3D& mom,
229 Amg::Vector3D& glob) const override;
230
234 virtual bool globalToLocal(const Amg::Vector3D& glob,
235 const Amg::Vector3D& mom,
236 Amg::Vector2D& loc) const override;
237
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 std::string name() const override;
277
278protected:
279 template<class SURFACE, class BOUNDS_CNV>
280 friend class ::BoundSurfaceCnv_p1;
281 template<class SURFACE, class BOUNDS_CNV>
282 friend class ::BoundSurfaceCnv_p2;
289};
290
291} // end of namespace
292#include "TrkSurfaces/DiscSurface.icc"
293
294#endif // TRKSURFACES_DISCSURFACE_H
double charge(const T &p)
Definition AtlasPID.h:997
#define AmgSymMatrix(dim)
#define protected
Eigen::Matrix< double, 3, 1 > Vector3D
DiscSurface()
Default Constructor.
Class that implements the asymmetric shape of the ITk strip endcap modules.
Bounds for a annulus-like, planar Surface.
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
Class to describe the bounds for a planar DiscSurface.
Definition DiscBounds.h:44
virtual const Amg::Vector3D & globalReferencePoint() const override final
Returns a global reference point: For the Disc this is Where denote the r(), averagePhi() of the Bo...
DiscSurface(DiscSurface &&psf) noexcept=default
Copy Constructor.
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.
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override
Specialized for DiscSurface: LocalToGlobal method without dynamic memory allocation.
static constexpr SurfaceType staticType
Definition DiscSurface.h:57
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 ~DiscSurface()
Destructor.
virtual constexpr SurfaceType type() const override final
Return the surface type.
virtual Amg::Vector2D localParametersToPosition(const LocalParameters &locpars) const override final
Specialized for DiscSurface : LocalParameters to Vector2D.
virtual std::string name() const override
Return properly formatted class name for screen output.
std::unique_ptr< ParametersT< DIM, T, DiscSurface > > 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.
friend class ::BoundSurfaceCnv_p1
< data members
DiscSurface()
Default Constructor.
CxxUtils::CachedUniquePtr< Amg::Vector3D > m_referencePoint
static member for boundless approach
DiscSurface & operator=(const DiscSurface &dsf)
Assignement operator.
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.
std::shared_ptr< const SurfaceBounds > m_bounds
reference Point on the Surface
virtual bool insideBoundsCheck(const Amg::Vector2D &locpos, const BoundaryCheck &bchk) const override final
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...
virtual DiscSurface * clone() const override
Virtual constructor.
const SurfaceBounds & bounds() const override final
This method returns the bounds by reference.
bool operator==(const DiscSurface &cf) const
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override
fast straight line distance evaluation to Surface
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const override
This method calls the inside method of the bounds.
friend class ::BoundSurfaceCnv_p2
bounds (shared)
std::unique_ptr< ParametersT< DIM, T, DiscSurface > > 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 DiscSurface: GlobalToLocal method without dynamic memory allocation - boolean checks ...
static const NoBounds s_boundless
virtual bool operator==(const Surface &sf) const override
Equality operator.
DiscSurface & operator=(DiscSurface &&dsf) noexcept=default
Assignement operator.
Class to describe the bounds for a planar DiscSurface.
Access to distance solutions.
Bounds object for a boundless surface (...)
Definition NoBounds.h:30
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition ParametersT.h:49
Abstract base class for surface bounds to be specified.
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
This is the base class for all tracking detector elements with read-out relevant information.
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.