ATLAS Offline Software
Loading...
Searching...
No Matches
IntersectorWrapper.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// wrapper to IIntersector tool to provide IPropagator functionality
7// default configuration wraps the RungeKutta intersector
8// (c) ATLAS Detector software
10
11#ifndef TRKEXRUNGEKUTTAINTERSECTOR_INTERSECTORWRAPPER_H
12#define TRKEXRUNGEKUTTAINTERSECTOR_INTERSECTORWRAPPER_H
13
15#include "GaudiKernel/ToolHandle.h"
19
20namespace Trk {
22
24 : public AthAlgTool
25 , virtual public IPropagator
26{
27
28public:
29 IntersectorWrapper(const std::string& type,
30 const std::string& name,
31 const IInterface* parent);
32 ~IntersectorWrapper(void); // destructor
33
34 virtual StatusCode initialize() override final;
35 virtual StatusCode finalize() override final;
36
46 bool) const override final;
54 const EventContext& ctx,
56 const Surface& sf,
57 PropDirection dir,
58 const BoundaryCheck& bcheck,
60 ParticleHypothesis particle,
61 bool returnCurv,
62 const TrackingVolume*) const override final;
63
69 const EventContext&,
75 std::vector<unsigned int>&,
76 double&,
77 bool,
78 bool,
79 const TrackingVolume*) const override final
80 {
81 ATH_MSG_ERROR("Call to non-implemented propagate");
82 return nullptr;
83 }
84
85 // unimplemented propagateT
86 virtual std::unique_ptr<TrackParameters> propagateT(
87 const EventContext&,
88 const TrackParameters&,
89 std::vector<DestSurf>&,
93 std::vector<unsigned int>&,
94 PathLimit&,
95 TimeLimit&,
96 bool,
97 const TrackingVolume*,
98 std::vector<Trk::HitInfo>*&) const override final
99 {
100 ATH_MSG_ERROR("Call to non-implemented propagate");
101 return nullptr;
102 }
103
107 virtual std::unique_ptr<TrackParameters> propagate(
108 const EventContext& ctx,
109 const TrackParameters&,
110 const Surface&,
112 const BoundaryCheck&,
114 std::optional<TransportJacobian>&,
115 double&,
117 bool,
118 const TrackingVolume*) const override final;
119
123 virtual std::unique_ptr<TrackParameters> propagateParameters(
124 const EventContext& ctx,
125 const TrackParameters& parm,
126 const Surface& sf,
127 PropDirection dir,
128 const BoundaryCheck& bcheck,
129 const MagneticFieldProperties& mprop,
130 ParticleHypothesis particle = pion,
131 bool returnCurv = false,
132 const TrackingVolume* tVol = nullptr) const override final;
133
136 const EventContext& ctx,
138 const Surface& sf,
139 PropDirection dir,
140 const BoundaryCheck& bcheck,
142 std::optional<TransportJacobian>&,
143 ParticleHypothesis particle = pion,
144 bool returnCurv = false,
145 const TrackingVolume* tVol = nullptr) const override final;
146
151 virtual std::optional<Trk::TrackSurfaceIntersection> intersect(
152 const EventContext& ctx,
154 const Surface& sf,
156 ParticleHypothesis particle = pion,
157 const TrackingVolume* tVol = nullptr) const override final;
158
159 // unimplemented globalPositions
160 virtual void globalPositions(const EventContext&,
161 std::deque<Amg::Vector3D>&,
165 double,
167 const TrackingVolume*) const override final
168 {
169 ATH_MSG_ERROR("Call to non-implemented globalPositions");
170 return;
171 }
172
173 // unimplemented intersectSurface
174 virtual std::optional<TrackSurfaceIntersection> intersectSurface(
175 const EventContext&,
176 const Surface&,
178 const double,
180 ParticleHypothesis) const override final
181 {
182 ATH_MSG_ERROR("Call to non-implemented intersectSurface");
183 return std::nullopt;
184 }
185
186 virtual std::unique_ptr<Trk::TrackParameters> propagateM(
187 const EventContext&,
188 const TrackParameters&,
189 std::vector<DestSurf>&,
193 std::vector<unsigned int>&,
194 std::vector<const Trk::TrackStateOnSurface*>*,
195 std::vector<std::pair<std::unique_ptr<Trk::TrackParameters>, int>>*,
196 double&,
197 bool,
198 bool,
199 const Trk::TrackingVolume*,
200 Trk::ExtrapolationCache*) const override final
201 {
202 ATH_MSG_ERROR("Call to non-implemented propagateM");
203 return nullptr;
204 }
205
207 const EventContext&,
208 const MultiComponentState&,
209 const Surface&,
211 const PropDirection,
212 const BoundaryCheck&,
213 const ParticleHypothesis) const override final
214 {
215 ATH_MSG_ERROR("Call to non-implemented multiStatePropagate");
216 return {};
217 }
218
219private:
220 struct Cache
221 {
222 double m_charge;
223 double m_qOverP;
224 std::optional<TrackSurfaceIntersection> m_intersection;
225 std::unique_ptr<TrackParameters> m_parameters;
228
230 : m_charge{}
231 , m_qOverP{}
232 , m_intersection{ std::nullopt }
233 , m_parameters{ nullptr }
234 , m_position{}
235 , m_momentum{}
236 {
237 }
238 };
239 // private methods
240 void createParameters(Cache& cache,
241 const Surface& surface,
242 const BoundaryCheck& boundsCheck,
243 bool curvilinear) const;
244 void findIntersection(Cache& cache,
245 const TrackParameters& parameters,
246 const Surface& surface,
247 PropDirection dir = Trk::anyDirection) const;
248
249 // helpers, managers, tools
250 ToolHandle<IIntersector> m_intersector{this, "Intersector",
251 "Trk::RungeKuttaIntersector/RungeKuttaIntersector"};
252 ToolHandle<IPropagator> m_linePropagator{this, "LinePropagator", ""};
253};
254
255} // end of namespace
256
257#endif // TRKEXRUNGEKUTTAINTERSECTOR_INTERSECTORWRAPPER_H
#define ATH_MSG_ERROR(x)
Eigen::Matrix< double, 3, 1 > Vector3D
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
Bounds for a cylindrical Surface.
Interface class IPropagators It inherits from IAlgTool.
Definition IPropagator.h:55
ToolHandle< IIntersector > m_intersector
virtual std::unique_ptr< TrackParameters > propagateParameters(const EventContext &ctx, const TrackParameters &parm, const Surface &sf, PropDirection dir, const BoundaryCheck &bcheck, const MagneticFieldProperties &mprop, ParticleHypothesis particle=pion, bool returnCurv=false, const TrackingVolume *tVol=nullptr) const override final
Propagation interface without Covariance matrix propagation the pathlength has to be returned for eve...
virtual std::optional< TrackSurfaceIntersection > intersectSurface(const EventContext &, const Surface &, const TrackSurfaceIntersection &, const double, const MagneticFieldProperties &, ParticleHypothesis) const override final
Intersection and Intersector interface:
virtual std::optional< Trk::TrackSurfaceIntersection > intersect(const EventContext &ctx, const TrackParameters &parm, const Surface &sf, const MagneticFieldProperties &mprop, ParticleHypothesis particle=pion, const TrackingVolume *tVol=nullptr) const override final
Intersection interface: The intersection interface might be used by the material service as well to e...
virtual void globalPositions(const EventContext &, std::deque< Amg::Vector3D > &, const TrackParameters &, const MagneticFieldProperties &, const CylinderBounds &, double, ParticleHypothesis, const TrackingVolume *) const override final
GlobalPositions list interface: This is used mostly in pattern recognition in the road finder,...
IntersectorWrapper(const std::string &type, const std::string &name, const IInterface *parent)
void findIntersection(Cache &cache, const TrackParameters &parameters, const Surface &surface, PropDirection dir=Trk::anyDirection) const
void createParameters(Cache &cache, const Surface &surface, const BoundaryCheck &boundsCheck, bool curvilinear) const
virtual std::unique_ptr< Trk::TrackParameters > propagateM(const EventContext &, const TrackParameters &, std::vector< DestSurf > &, PropDirection, const MagneticFieldProperties &, ParticleHypothesis, std::vector< unsigned int > &, std::vector< const Trk::TrackStateOnSurface * > *, std::vector< std::pair< std::unique_ptr< Trk::TrackParameters >, int > > *, double &, bool, bool, const Trk::TrackingVolume *, Trk::ExtrapolationCache *) const override final
unimplemented propagateM
virtual std::unique_ptr< TrackParameters > propagateT(const EventContext &, const TrackParameters &, std::vector< DestSurf > &, PropDirection, const MagneticFieldProperties &, ParticleHypothesis, std::vector< unsigned int > &, PathLimit &, TimeLimit &, bool, const TrackingVolume *, std::vector< Trk::HitInfo > *&) const override final
Propagate parameters and covariance with search of closest surface time included.
virtual StatusCode initialize() override final
virtual std::unique_ptr< NeutralParameters > propagate(const NeutralParameters &, const Surface &, PropDirection, const BoundaryCheck &, bool) const override final
N 0) Neutral parameters method
ToolHandle< IPropagator > m_linePropagator
virtual Trk::MultiComponentState multiStatePropagate(const EventContext &, const MultiComponentState &, const Surface &, const MagneticFieldProperties &, const PropDirection, const BoundaryCheck &, const ParticleHypothesis) const override final
unimplemented multiStatePropagate
virtual StatusCode finalize() override final
magnetic field properties to steer the behavior of the extrapolation
Abstract Base Class for tracking surfaces.
An intersection with a Surface is given by.
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
This class represents the jacobian for transforming initial track parameters to new track parameters ...
STL class.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
PropDirection
PropDirection, enum for direction of the propagation.
@ anyDirection
std::vector< ComponentParameters > MultiComponentState
ParametersBase< NeutralParametersDim, Neutral > NeutralParameters
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
std::pair< const Surface *, BoundaryCheck > DestSurf
typedef for input surfaces, boundary check
Definition IPropagator.h:45
ParametersBase< TrackParametersDim, Charged > TrackParameters
STL namespace.
std::optional< TrackSurfaceIntersection > m_intersection
std::unique_ptr< TrackParameters > m_parameters