ATLAS Offline Software
Loading...
Searching...
No Matches
ExtrapolationTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSGEOMETRY_ACTSEXTRAPOLATIONTOOL_H
6#define ACTSGEOMETRY_ACTSEXTRAPOLATIONTOOL_H
7
8// ATHENA
11
14
15// Need to include this early; otherwise, we run into errors with
16// ReferenceWrapperAnyCompat in clang builds due the is_constructable
17// specialization defined there getting implicitly instantiated earlier.
18#include "Acts/Propagator/Propagator.hpp"
19
20// PACKAGE
24
26
27// ACTS
28#include "Acts/MagneticField/ConstantBField.hpp"
29#include "Acts/MagneticField/MagneticFieldContext.hpp"
30#include "Acts/Propagator/detail/SteppingLogger.hpp"
31#include "Acts/Propagator/StandardAborters.hpp"
32#include "Acts/Propagator/SurfaceCollector.hpp"
33#include "Acts/Utilities/Result.hpp"
34#include "Acts/Definitions/Units.hpp"
35#include "Acts/Utilities/Helpers.hpp"
36#include "Acts/Utilities/Logger.hpp"
37#include "Acts/Definitions/Tolerance.hpp"
38
39#include <cmath>
40
41namespace Acts {
42class Surface;
43class BoundaryCheck;
44class Logger;
45}
46
47
50}
51
52namespace ActsTrk {
53class ExtrapolationTool : public extends<AthAlgTool, IExtrapolationTool>
54{
55public:
57 virtual StatusCode initialize() override;
58
60 ExtrapolationTool(const std::string& type, const std::string& name, const IInterface* parent);
64 virtual Acts::Result<PropagationOutput>
65 propagationSteps(const EventContext& ctx,
66 const Acts::BoundTrackParameters& startParameters,
67 const Acts::Direction navDir,
68 const double pathLimit) const override final;
69
71 virtual Acts::Result<Acts::BoundTrackParameters>
72 propagate(const EventContext& ctx,
73 const Acts::BoundTrackParameters& startParameters,
74 const Acts::Direction navDir,
75 const double pathLimit) const override final;
76
78 virtual Acts::Result<PropagationOutput>
79 propagationSteps(const EventContext& ctx,
80 const Acts::BoundTrackParameters& startParameters,
81 const Acts::Surface& target,
82 const Acts::Direction navDir,
83 const double pathLimit) const override;
84
86 virtual Acts::Result<Acts::BoundTrackParameters>
87 propagate(const EventContext& ctx,
88 const Acts::BoundTrackParameters& startParameters,
89 const Acts::Surface& target,
90 const Acts::Direction navDir,
91 const double pathLimit) const override;
92
94 virtual Acts::Result<Acts::BoundTrackParameters> propagate(const EventContext& ctx,
95 const Acts::BoundTrackParameters& startParameters,
96 const Acts::TrackingVolume& target,
97 const VolumeAbort stopVolumeFlag,
98 const Acts::Direction navDir,
99 const double pathLimit) const override;
101 virtual Acts::Result<BoundParamVec_t> propagateAndRecord(const EventContext& ctx,
102 const Acts::BoundTrackParameters& startParameters,
103 const SurfaceRecordOptions& recordOpts) const override;
104
105 private:
106 const Acts::Logger& logger() const { return *m_logger; }
107
108 std::unique_ptr<const ActsExtrapolationDetail::VariantPropagator> m_varProp;
109 std::unique_ptr<const Acts::Logger> m_logger{nullptr};
112
113 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};
114
115 Gaudi::Property<std::string> m_fieldMode{this, "FieldMode", "ATLAS", "Either ATLAS or Constant or StraightLine"};
116 Gaudi::Property<std::vector<double>> m_constantFieldVector{this, "ConstantFieldVector", {0, 0, 0}, "Constant field value to use if FieldMode == Constant"};
117
118 Gaudi::Property<double> m_ptLoopers{this, "PtLoopers", 300, "PT loop protection threshold. Will be converted to Acts MeV unit"};
119 Gaudi::Property<double> m_maxStepSize{this, "MaxStepSize", 10, "Max step size in Acts m unit"};
120 Gaudi::Property<unsigned> m_maxStep{this, "MaxSteps", 100000, "Max number of steps"};
121 Gaudi::Property<unsigned> m_maxSurfSkip{this, "MaxSurfaceSkip" ,100, "Maximum number of surfaces to be tried by the navigator"};
122 Gaudi::Property<double> m_surfTolerance{this, "OnSurfaceTolerance", Acts::s_onSurfaceTolerance,
123 "Tolerance to consider track parameters on surface"};
124 // Material inteaction option
125 Gaudi::Property<bool> m_interactionMultiScatering{this, "InteractionMultiScatering", false, "Whether to consider multiple scattering in the interactor"};
126 Gaudi::Property<bool> m_interactionEloss{this, "InteractionEloss", false, "Whether to consider energy loss in the interactor"};
127 Gaudi::Property<bool> m_interactionRecord{this, "InteractionRecord", false, "Whether to record all material interactions"};
128
129 template<typename OptionsType>
130 OptionsType
131 prepareOptions( const Acts::GeometryContext& gctx,
132 const Acts::MagneticFieldContext& mctx,
133 const Acts::BoundTrackParameters& startParameters,
134 Acts::Direction navDir,
135 double pathLimit) const;
136};
137}
138#endif
Utility class to handle the three contexts neeeded in an ACTS reconstruction job 1) GeometryContext -...
std::unique_ptr< const Acts::Logger > m_logger
Gaudi::Property< unsigned > m_maxSurfSkip
Gaudi::Property< std::vector< double > > m_constantFieldVector
const Acts::Logger & logger() const
virtual Acts::Result< PropagationOutput > propagationSteps(const EventContext &ctx, const Acts::BoundTrackParameters &startParameters, const Acts::Direction navDir, const double pathLimit) const override final
Extrapolate the track parameters until the end of the world and record the performed steps & the allo...
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
ExtrapolationTool(const std::string &type, const std::string &name, const IInterface *parent)
Explicitly define the constrcutor due to the variant forward declaration.
ContextUtility m_ctxProvider
Utility to fetch the geometry, magnetic field and calibration context in the event.
std::unique_ptr< const ActsExtrapolationDetail::VariantPropagator > m_varProp
Gaudi::Property< bool > m_interactionRecord
OptionsType prepareOptions(const Acts::GeometryContext &gctx, const Acts::MagneticFieldContext &mctx, const Acts::BoundTrackParameters &startParameters, Acts::Direction navDir, double pathLimit) const
Gaudi::Property< double > m_ptLoopers
virtual Acts::Result< Acts::BoundTrackParameters > propagate(const EventContext &ctx, const Acts::BoundTrackParameters &startParameters, const Acts::Direction navDir, const double pathLimit) const override final
Extrapolates the track parameters from a start to a target surface and returns the extrapolated track...
Gaudi::Property< std::string > m_fieldMode
Gaudi::Property< bool > m_interactionMultiScatering
Gaudi::Property< double > m_maxStepSize
Gaudi::Property< double > m_surfTolerance
Gaudi::Property< bool > m_interactionEloss
~ExtrapolationTool()
Destructor needs to implemented due to the variant.
Gaudi::Property< unsigned > m_maxStep
virtual StatusCode initialize() override
virtual Acts::Result< BoundParamVec_t > propagateAndRecord(const EventContext &ctx, const Acts::BoundTrackParameters &startParameters, const SurfaceRecordOptions &recordOpts) const override
Propagate the track parameters forward throuht the detector and record the surface crossings along th...
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...