ATLAS Offline Software
Loading...
Searching...
No Matches
TrackSurfaceIntersection.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6// TrackSurfaceIntersection.h, (c) ATLAS Detector software
8
9#ifndef TRKEXUTILS_TRACKSURFACEINTERSECTION_H
10#define TRKEXUTILS_TRACKSURFACEINTERSECTION_H
11
12// Trk
13#include <memory>
14
16class MsgStream;
17
18namespace Trk {
19
32class TrackSurfaceIntersection final {
33
34 public:
37 public:
38 virtual ~IIntersectionCache() = default;
39 virtual std::unique_ptr<IIntersectionCache> clone() const = 0;
40 };
41
44 double path);
48
51 std::unique_ptr<IIntersectionCache> cache);
53
56
58 const Amg::Vector3D& position() const;
60
62 const Amg::Vector3D& direction() const;
64
66 double pathlength() const;
67 double& pathlength();
68
70 const IIntersectionCache* cache() const;
72
73 private:
76 double m_pathlength{0};
77 std::unique_ptr<IIntersectionCache> m_cache;
78};
79
80inline const Amg::Vector3D& TrackSurfaceIntersection::position() const {
81 return m_position;
82}
83
84inline Amg::Vector3D& TrackSurfaceIntersection::position() {
85 return m_position;
86}
87
88inline const Amg::Vector3D& TrackSurfaceIntersection::direction() const {
89 return m_direction;
90}
91
92inline Amg::Vector3D& TrackSurfaceIntersection::direction() {
93 return m_direction;
94}
95
96inline double TrackSurfaceIntersection::pathlength() const {
97 return m_pathlength;
98}
99
100inline double& TrackSurfaceIntersection::pathlength() {
101 return m_pathlength;
102}
103
104inline const TrackSurfaceIntersection::IIntersectionCache*
105TrackSurfaceIntersection::cache() const {
106 return m_cache.get();
107}
108
109inline TrackSurfaceIntersection::IIntersectionCache*
110TrackSurfaceIntersection::cache() {
111 return m_cache.get();
112}
113
114
117MsgStream& operator<<(MsgStream& sl, const TrackSurfaceIntersection& tsfi);
118std::ostream& operator<<(std::ostream& sl,
119 const TrackSurfaceIntersection& tsfi);
120
121} // namespace Trk
122
123#endif // TRKEXUTILS_TRACKSURFACEINTERSECTION_H
An intersection with a Surface is given by.
virtual std::unique_ptr< IIntersectionCache > clone() const =0
virtual ~IIntersectionCache()=default
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
TrackSurfaceIntersection & operator=(const TrackSurfaceIntersection &other)
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
Amg::Vector3D m_direction
~TrackSurfaceIntersection()=default
Destructor.
TrackSurfaceIntersection(const Amg::Vector3D &pos, const Amg::Vector3D &dir, double path)
Constructor.
Amg::Vector3D m_position
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.
double pathlength() const
Method to retrieve the pathlength propagated till the Intersection.
const IIntersectionCache * cache() const
Retrieve the associated cache block, if it exists.
std::unique_ptr< IIntersectionCache > m_cache
TrackSurfaceIntersection()=default