ATLAS Offline Software
Loading...
Searching...
No Matches
StraightLineSurface.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// StraightLineSurface.h, (c) ATLAS Detector software
8
9#ifndef TRKSURFACES_STRAIGHTLINESURFACE_H
10#define TRKSURFACES_STRAIGHTLINESURFACE_H
11// Amg
14
15// Trk
17#include <memory>
21#include "TrkSurfaces/Surface.h"
22
23class Identifier;
24class MsgStream;
25template<class SURFACE, class BOUNDS_CNV>
27template<class SURFACE, class BOUNDS_CNV>
29
30namespace Trk {
31
33class LocalParameters;
34template<int DIM, class T, class S>
35class ParametersT;
36
49
51{
52
53public:
57
60
63
65 StraightLineSurface(StraightLineSurface&& slsf) noexcept = default;
66
69
71 virtual ~StraightLineSurface() = default;
72
75
77 StraightLineSurface(const Amg::Transform3D& htrans, double radius, double halez);
78
81 const TrkDetElementBase& detelement,
82 const Identifier& id);
83
86 const StraightLineSurface& slsf,
87 const Amg::Transform3D& transf);
88
90 virtual bool operator==(const Surface& sf) const override;
91 bool operator==(const StraightLineSurface& cf) const;
92
94 virtual StraightLineSurface* clone() const override final;
95
99 double l1,
100 double l2,
101 double phi,
102 double theta,
103 double qop,
104 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
105
109 const Amg::Vector3D& position,
110 const Amg::Vector3D& momentum,
111 double charge,
112 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
113
117 double l1,
118 double l2,
119 double phi,
120 double theta,
121 double qop,
122 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
123
127 const Amg::Vector3D& position,
128 const Amg::Vector3D& momentum,
129 double charge,
130 std::optional<AmgSymMatrix(5)> cov = std::nullopt) const override final;
131
133 template<int DIM, class T>
136 double l1,
137 double l2,
138 double phi,
139 double theta,
140 double qop,
141 std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
142
144 template<int DIM, class T>
147 const Amg::Vector3D& position,
148 const Amg::Vector3D& momentum,
149 double charge,
150 std::optional<AmgSymMatrix(DIM)> cov = std::nullopt) const;
151
157 const Amg::Vector3D& glopos,
158 const Amg::Vector3D& glomom) const override final;
159
161 constexpr virtual SurfaceType type() const override final;
162
165 virtual void localToGlobal(
166 const Amg::Vector2D& locp,
167 const Amg::Vector3D& mom,
168 Amg::Vector3D& glob) const override final;
169
189 virtual bool globalToLocal(
190 const Amg::Vector3D& glob,
191 const Amg::Vector3D& mom,
192 Amg::Vector2D& loc) const override final;
193
197 const Trk::LocalParameters& locpars,
198 const Amg::Vector3D& glomom,
199 double locZ) const;
200
204
236 const Amg::Vector3D& pos,
237 const Amg::Vector3D& dir,
238 bool forceDir,
239 Trk::BoundaryCheck bchk) const override final;
240
243 const Amg::Vector3D& pos,
244 const Amg::Vector3D& dir) const override final;
245
248 const Amg::Vector3D& pos,
249 const Amg::Vector3D& dir,
250 bool Bound) const override final;
251
254 const override final;
255
260 virtual bool isOnSurface(
261 const Amg::Vector3D& glopo,
262 const BoundaryCheck& bchk = true,
263 double tol1 = 0.,
264 double tol2 = 0.) const override final;
265
267 virtual const SurfaceBounds& bounds() const override final;
268
270 virtual bool insideBounds(
271 const Amg::Vector2D& locpos,
272 double tol1 = 0.,
273 double tol2 = 0.) const override final;
274 virtual bool insideBoundsCheck(
275 const Amg::Vector2D& locpos,
276 const BoundaryCheck& bchk) const override final;
277
279 virtual std::string name() const override final;
280
281protected:
282 template<class SURFACE, class BOUNDS_CNV>
283 friend class ::BoundSurfaceCnv_p1;
284 template<class SURFACE, class BOUNDS_CNV>
285 friend class ::BoundSurfaceCnv_p2;
292};
293} // end of namespace
294
295#include "TrkSurfaces/StraightLineSurface.icc"
296#endif // TRKSURFACES_STRAIGHTLINESURFACE_H
double charge(const T &p)
Definition AtlasPID.h:997
Cached value with atomic update.
#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 cylindrical Surface.
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
static const NoBounds s_boundless
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for StraightLineSurface: GlobalToLocal method without dynamic memory allocation This method...
StraightLineSurface & operator=(StraightLineSurface &&slsf) noexcept=default
Move Assignment operator.
virtual constexpr SurfaceType type() const override final
Return the surface type.
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const override final
This surface calls the iside method of the bouns.
virtual bool insideBoundsCheck(const Amg::Vector2D &locpos, const BoundaryCheck &bchk) const override final
virtual StraightLineSurface * clone() const override final
Implicit constructor.
std::unique_ptr< ParametersT< DIM, T, StraightLineSurface > > 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
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 ~StraightLineSurface()=default
Destructor.
virtual Intersection straightLineIntersection(const Amg::Vector3D &pos, const Amg::Vector3D &dir, bool forceDir, Trk::BoundaryCheck bchk) const override final
fast straight line intersection schema - standard: provides closest intersection and (signed) path le...
static constexpr SurfaceType staticType
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const override final
fast straight line distance evaluation to Surface
virtual bool operator==(const Surface &sf) const override
Equality operator.
CxxUtils::CachedValue< Amg::Vector3D > m_lineDirection
bounds (shared)
StraightLineSurface & operator=(const StraightLineSurface &slsf)
Assignment 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.
virtual std::string name() const override final
Return properly formatted class name for screen output.
StraightLineSurface(StraightLineSurface &&slsf) noexcept=default
Move constructor.
std::shared_ptr< const CylinderBounds > m_bounds
NoBounds as return object when no bounds are declared.
virtual double pathCorrection(const Amg::Vector3D &, const Amg::Vector3D &) const override final
the pathCorrection for derived classes with thickness
friend class ::BoundSurfaceCnv_p2
cache of the line direction (speeds up)
bool operator==(const StraightLineSurface &cf) const
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 void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for StraightLineSurface: LocalToGlobal method without dynamic memory allocation.
virtual const SurfaceBounds & bounds() const override final
This method returns the bounds of the Surface by reference.
StraightLineSurface()
Default Constructor - needed for persistency.
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const override final
This method checks if the provided GlobalPosition is inside the assigned straw radius,...
const Amg::Vector3D & lineDirection() const
Special method for StraightLineSurface - provides the Line direction from cache: speedup.
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.
STL class.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Affine3d Transform3D
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
@ locZ
local cylindrical
Definition ParamDefs.h:42
AmgSymMatrix(5) &GXFTrackState
STL namespace.