ATLAS Offline Software
Loading...
Searching...
No Matches
RungeKuttaPropagator.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// Header file for class RungeKuttaPropagator, (c) ATLAS Detector software
8
9#ifndef RungeKuttaPropagator_H
10#define RungeKuttaPropagator_H
11
13#include "GaudiKernel/ServiceHandle.h"
20#include <list>
21
22// MagField cache
25
26namespace Trk {
27
28class Surface;
30class CylinderBounds;
31class CylinderSurface;
33
129
131 : public AthAlgTool
132 , virtual public IPropagator
133 , virtual public IPatternParametersPropagator
134{
135
136public:
137 RungeKuttaPropagator(const std::string&,
138 const std::string&,
139 const IInterface*);
140 virtual StatusCode initialize() override final;
141 virtual ~RungeKuttaPropagator() = default;
142
144 virtual std::unique_ptr<NeutralParameters> propagate(
145 const NeutralParameters&,
146 const Surface&,
148 const BoundaryCheck&,
149 bool) const override final;
150
152 virtual std::unique_ptr<TrackParameters> propagate(
153 const EventContext& ctx,
154 const TrackParameters&,
155 const Surface&,
156 const PropDirection,
157 const BoundaryCheck&,
159 ParticleHypothesis /*not used*/,
160 bool,
161 const TrackingVolume*) const override final;
162
165 const EventContext& ctx,
166 const MultiComponentState& multiComponentState,
167 const Surface& surface,
168 const MagneticFieldProperties& fieldProperties,
169 const PropDirection direction = Trk::anyDirection,
170 const BoundaryCheck& boundaryCheck = true,
171 const ParticleHypothesis particleHypothesis =
172 nonInteracting) const override final;
173
175 virtual std::unique_ptr<TrackParameters> propagate(
176 const EventContext& ctx,
177 const TrackParameters&,
178 const Surface&,
179 const PropDirection,
180 const BoundaryCheck&,
182 std::optional<TransportJacobian>&,
183 double&,
184 ParticleHypothesis /*not used*/,
185 bool,
186 const TrackingVolume*) const override final;
187
189 virtual std::unique_ptr<TrackParameters> propagate(
190 const EventContext& ctx,
191 const TrackParameters&,
192 std::vector<DestSurf>&,
195 ParticleHypothesis /*not used*/,
196 std::vector<unsigned int>&,
197 double&,
198 bool,
199 bool,
200 const TrackingVolume*) const override final;
201
204 virtual std::unique_ptr<TrackParameters> propagateParameters(
205 const EventContext& ctx,
206 const TrackParameters&,
207 const Surface&,
208 const PropDirection,
209 const BoundaryCheck&,
211 ParticleHypothesis /*not used*/,
212 bool,
213 const TrackingVolume*) const override final;
214
217 virtual std::unique_ptr<TrackParameters> propagateParameters(
218 const EventContext& ctx,
219 const TrackParameters&,
220 const Surface&,
221 const PropDirection,
222 const BoundaryCheck&,
224 std::optional<TransportJacobian>&,
225 ParticleHypothesis /*not used*/,
226 bool,
227 const TrackingVolume*) const override final;
228
231 virtual std::optional<Trk::TrackSurfaceIntersection> intersect(
232 const EventContext& ctx,
233 const TrackParameters&,
234 const Surface&,
236 ParticleHypothesis /*not used*/,
237 const TrackingVolume* tvol = nullptr) const override final;
238
240 virtual void globalPositions(
241 const EventContext& ctx,
242 std::deque<Amg::Vector3D>&,
246 double,
247 ParticleHypothesis /*not used*/,
248 const TrackingVolume* tvol = nullptr) const override final;
249
251 // Public methods for Trk::PatternTrackParameters (from IPattern'Propagator)
253
255 virtual bool propagate(
256 const EventContext& ctx,
258 const Surface&,
262 ParticleHypothesis particle = pion) const override final;
263
265 virtual bool propagate(
266 const EventContext& ctx,
268 const Surface&,
272 double&,
273 ParticleHypothesis particle = pion) const override final;
274
277 const EventContext& ctx,
279 const Surface&,
283 ParticleHypothesis particle = pion) const override final;
284
288 const EventContext& ctx,
290 const Surface&,
294 double&,
295 ParticleHypothesis particle = pion) const override final;
296
297 virtual void globalPositions(
298 const EventContext& ctx,
301 std::vector<std::pair<Amg::Vector3D, double>>&,
303 ParticleHypothesis particle = pion) const override final;
304
307 const EventContext&,
313 std::vector<unsigned int>&,
314 PathLimit&,
315 TimeLimit&,
316 bool,
318 std::vector<Trk::HitInfo>*&) const override final
319 {
320 ATH_MSG_ERROR("Call to non-implemented propagateT");
321 return nullptr;
322 }
323
325 virtual std::unique_ptr<Trk::TrackParameters> propagateM(
326 const EventContext&,
327 const TrackParameters&,
328 std::vector<DestSurf>&,
332 std::vector<unsigned int>&,
333 std::vector<const Trk::TrackStateOnSurface*>*,
334 std::vector<std::pair<std::unique_ptr<Trk::TrackParameters>, int>>*,
335 double&,
336 bool,
337 bool,
338 const Trk::TrackingVolume*,
339 Trk::ExtrapolationCache*) const override final
340 {
341 ATH_MSG_ERROR("Call to non-implemented propagateM");
342 return nullptr;
343 }
344
346 virtual std::optional<Trk::TrackSurfaceIntersection> intersectSurface(
347 const EventContext&,
348 const Surface&,
350 const double,
352 ParticleHypothesis) const override final
353 {
354 ATH_MSG_ERROR("Call to non-implemented intersectSurface");
355 return std::nullopt;
356 }
357
358 struct Cache
359 {
361 double m_field[3];
363 double m_step;
364 double m_maxPath = 10000.;
365 double m_dlt = .000200;
366 double m_helixStep = 1;
367 double m_straightStep = 0.01;
368 bool m_maxPathLimit = false;
369 bool m_mcondition = false;
370 bool m_solenoid = true;
371 bool m_needgradient = false;
372 bool m_newfield = true;
373 bool m_usegradient = false;
374 };
375
376private:
378 // Private methods:
380 Cache getInitializedCache(const EventContext& ctx) const;
381
383 // Private data members:
385
386 // Read handle for conditions object to get the field cache
388 this,
389 "AtlasFieldCacheCondObj",
390 "fieldCondObj",
391 "Name of the Magnetic Field conditions object key"
392 };
393
394 DoubleProperty m_dlt{this, "AccuracyParameter", 0.0002};
395 DoubleProperty m_helixStep{this, "MaxHelixStep", 1.};
396 DoubleProperty m_straightStep{this, "MaxStraightLineStep", 0.01};
397 BooleanProperty m_usegradient{this, "IncludeBgradients", false,
398 "use magnetic field gradient into the error propagation"};
399};
400
401} // end namespace Trk
402#endif // RungeKuttaPropagator_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:
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
The BoundaryCheck class allows to steer the way surface boundaries are used for inside/outside checks...
Bounds for a cylindrical Surface.
Class for a CylinderSurface in the ATLAS detector.
interface for track parameter propagation through the magnetic field, using the Trk::PatternTrackPara...
Interface class IPropagators It inherits from IAlgTool.
Definition IPropagator.h:55
magnetic field properties to steer the behavior of the extrapolation
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
virtual std::unique_ptr< TrackParameters > propagate(const EventContext &ctx, const TrackParameters &, const Surface &, const PropDirection, const BoundaryCheck &, const MagneticFieldProperties &, std::optional< TransportJacobian > &, double &, ParticleHypothesis, bool, const TrackingVolume *) const override final
Main propagation method with transport jacobian production.
virtual StatusCode initialize() override final
virtual std::unique_ptr< TrackParameters > propagate(const EventContext &ctx, const TrackParameters &, std::vector< DestSurf > &, PropDirection, const MagneticFieldProperties &, ParticleHypothesis, std::vector< unsigned int > &, double &, bool, bool, const TrackingVolume *) const override final
The propagation method finds the closest surface.
RungeKuttaPropagator(const std::string &, const std::string &, const IInterface *)
virtual std::unique_ptr< Trk::TrackParameters > propagateT(const EventContext &, const TrackParameters &, std::vector< DestSurf > &, PropDirection, const MagneticFieldProperties &, ParticleHypothesis, std::vector< unsigned int > &, PathLimit &, TimeLimit &, bool, const Trk::TrackingVolume *, std::vector< Trk::HitInfo > *&) const override final
unimplemented propagateT
virtual Trk::MultiComponentState multiStatePropagate(const EventContext &ctx, const MultiComponentState &multiComponentState, const Surface &surface, const MagneticFieldProperties &fieldProperties, const PropDirection direction=Trk::anyDirection, const BoundaryCheck &boundaryCheck=true, const ParticleHypothesis particleHypothesis=nonInteracting) const override final
Main propagation method for Multi Component state.
virtual std::unique_ptr< TrackParameters > propagate(const EventContext &ctx, const TrackParameters &, const Surface &, const PropDirection, const BoundaryCheck &, const MagneticFieldProperties &, ParticleHypothesis, bool, const TrackingVolume *) const override final
Main propagation method without transport jacobian production.
virtual std::unique_ptr< TrackParameters > propagateParameters(const EventContext &ctx, const TrackParameters &, const Surface &, const PropDirection, const BoundaryCheck &, const MagneticFieldProperties &, ParticleHypothesis, bool, const TrackingVolume *) const override final
Main propagation method for parameters only.
virtual std::unique_ptr< TrackParameters > propagateParameters(const EventContext &ctx, const TrackParameters &, const Surface &, const PropDirection, const BoundaryCheck &, const MagneticFieldProperties &, std::optional< TransportJacobian > &, ParticleHypothesis, bool, const TrackingVolume *) const override final
Main propagation method for parameters only with transport jacobian production.
virtual std::optional< Trk::TrackSurfaceIntersection > intersectSurface(const EventContext &, const Surface &, const TrackSurfaceIntersection &, const double, const MagneticFieldProperties &, ParticleHypothesis) const override final
unimplemented intersectSurface
virtual ~RungeKuttaPropagator()=default
virtual std::unique_ptr< NeutralParameters > propagate(const NeutralParameters &, const Surface &, PropDirection, const BoundaryCheck &, bool) const override final
Main propagation method for NeutralParameters.
Cache getInitializedCache(const EventContext &ctx) const
virtual std::optional< Trk::TrackSurfaceIntersection > intersect(const EventContext &ctx, const TrackParameters &, const Surface &, const MagneticFieldProperties &, ParticleHypothesis, const TrackingVolume *tvol=nullptr) const override final
Global position together with direction of the trajectory on the surface.
virtual void globalPositions(const EventContext &ctx, std::deque< Amg::Vector3D > &, const TrackParameters &, const MagneticFieldProperties &, const CylinderBounds &, double, ParticleHypothesis, const TrackingVolume *tvol=nullptr) const override final
GlobalPositions list interface:
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
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,...
STL class.
STL class.
Definition of ATLAS Math & Geometry primitives (Amg)
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.
MagField::AtlasFieldCache m_fieldCache