ATLAS Offline Software
Loading...
Searching...
No Matches
ExtrapolationTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSGEOMETRY_ACTSEXTRAPOLATIONTOOL_H
6#define ACTSGEOMETRY_ACTSEXTRAPOLATIONTOOL_H
7
8// ATHENA
11#include "GaudiKernel/IInterface.h"
12#include "GaudiKernel/ServiceHandle.h"
13#include "Gaudi/Property.h"
14#include "GaudiKernel/EventContext.h"
17
18// Need to include this early; otherwise, we run into errors with
19// ReferenceWrapperAnyCompat in clang builds due the is_constructable
20// specialization defined there getting implicitly instantiated earlier.
21#include "Acts/Propagator/Propagator.hpp"
22
23// PACKAGE
27
28// ACTS
29#include "Acts/MagneticField/ConstantBField.hpp"
30#include "Acts/MagneticField/MagneticFieldContext.hpp"
31#include "Acts/Propagator/detail/SteppingLogger.hpp"
32#include "Acts/Propagator/StandardAborters.hpp"
33#include "Acts/Propagator/SurfaceCollector.hpp"
34#include "Acts/Utilities/Result.hpp"
35#include "Acts/Definitions/Units.hpp"
36#include "Acts/Utilities/Helpers.hpp"
37#include "Acts/Utilities/Logger.hpp"
38#include "Acts/Definitions/Tolerance.hpp"
39
40#include <cmath>
41
42namespace Acts {
43class Surface;
44class BoundaryCheck;
45class Logger;
46}
47
48
52
53namespace ActsTrk {
54class ExtrapolationTool : public extends<AthAlgTool, IExtrapolationTool>
55{
56public:
57 virtual StatusCode initialize() override;
58
59 ExtrapolationTool(const std::string& type,
60 const std::string& name,
61 const IInterface* parent);
62
63
65
66 virtual Acts::Result<PropagationOutput>
67 propagationSteps(const EventContext& ctx,
68 const Acts::BoundTrackParameters& startParameters,
69 Acts::Direction navDir = Acts::Direction::Forward(),
70 double pathLimit = std::numeric_limits<double>::max()) const override;
71
72 virtual
73 Acts::Result<Acts::BoundTrackParameters>
74 propagate(const EventContext& ctx,
75 const Acts::BoundTrackParameters& startParameters,
76 Acts::Direction navDir = Acts::Direction::Forward(),
77 double pathLimit = std::numeric_limits<double>::max()) const override;
78
79 virtual Acts::Result<PropagationOutput>
80 propagationSteps(const EventContext& ctx,
81 const Acts::BoundTrackParameters& startParameters,
82 const Acts::Surface& target,
83 Acts::Direction navDir = Acts::Direction::Forward(),
84 double pathLimit = std::numeric_limits<double>::max()) const override;
85
86 virtual
87 Acts::Result<Acts::BoundTrackParameters>
88 propagate(const EventContext& ctx,
89 const Acts::BoundTrackParameters& startParameters,
90 const Acts::Surface& target,
91 Acts::Direction navDir = Acts::Direction::Forward(),
92 double pathLimit = std::numeric_limits<double>::max()) const override;
93
94
95 virtual
96 Acts::MagneticFieldContext
97 getMagneticFieldContext(const EventContext& ctx) const override;
98
99 private:
100 const Acts::Logger& logger() const { return *m_logger; }
101
102 std::unique_ptr<const ActsExtrapolationDetail::VariantPropagator> m_varProp;
103 std::unique_ptr<const Acts::Logger> m_logger{nullptr};
104
105 SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
106
107 PublicToolHandle<ActsTrk::ITrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", "ActsTrackingGeometryTool"};
108
109 Gaudi::Property<std::string> m_fieldMode{this, "FieldMode", "ATLAS", "Either ATLAS or Constant or StraightLine"};
110 Gaudi::Property<std::vector<double>> m_constantFieldVector{this, "ConstantFieldVector", {0, 0, 0}, "Constant field value to use if FieldMode == Constant"};
111
112 Gaudi::Property<double> m_ptLoopers{this, "PtLoopers", 300, "PT loop protection threshold. Will be converted to Acts MeV unit"};
113 Gaudi::Property<double> m_maxStepSize{this, "MaxStepSize", 10, "Max step size in Acts m unit"};
114 Gaudi::Property<unsigned> m_maxStep{this, "MaxSteps", 100000, "Max number of steps"};
115 Gaudi::Property<unsigned> m_maxSurfSkip{this, "MaxSurfaceSkip" ,100, "Maximum number of surfaces to be tried by the navigator"};
116 Gaudi::Property<double> m_surfTolerance{this, "OnSurfaceTolerance", Acts::s_onSurfaceTolerance,
117 "Tolerance to consider track parameters on surface"};
118 Gaudi::Property<unsigned> m_pathLimit{this, "PathLimit", 50, "Maximum path length to be considered during propagation in Acts m unit"};
119 // Material inteaction option
120 Gaudi::Property<bool> m_interactionMultiScatering{this, "InteractionMultiScatering", false, "Whether to consider multiple scattering in the interactor"};
121 Gaudi::Property<bool> m_interactionEloss{this, "InteractionEloss", false, "Whether to consider energy loss in the interactor"};
122 Gaudi::Property<bool> m_interactionRecord{this, "InteractionRecord", false, "Whether to record all material interactions"};
123
124 template<typename OptionsType>
125 OptionsType
126 prepareOptions( const Acts::GeometryContext& gctx,
127 const Acts::MagneticFieldContext& mctx,
128 const Acts::BoundTrackParameters& startParameters,
129 Acts::Direction navDir,
130 double pathLimit) const;
131};
132}
133#endif
std::unique_ptr< const Acts::Logger > m_logger
Gaudi::Property< unsigned > m_maxSurfSkip
Gaudi::Property< std::vector< double > > m_constantFieldVector
Gaudi::Property< unsigned > m_pathLimit
const Acts::Logger & logger() const
ExtrapolationTool(const std::string &type, const std::string &name, const IInterface *parent)
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
Gaudi::Property< std::string > m_fieldMode
virtual Acts::Result< Acts::BoundTrackParameters > propagate(const EventContext &ctx, const Acts::BoundTrackParameters &startParameters, Acts::Direction navDir=Acts::Direction::Forward(), double pathLimit=std::numeric_limits< double >::max()) const override
Gaudi::Property< bool > m_interactionMultiScatering
virtual Acts::Result< PropagationOutput > propagationSteps(const EventContext &ctx, const Acts::BoundTrackParameters &startParameters, Acts::Direction navDir=Acts::Direction::Forward(), double pathLimit=std::numeric_limits< double >::max()) const override
Gaudi::Property< double > m_maxStepSize
Gaudi::Property< double > m_surfTolerance
Gaudi::Property< bool > m_interactionEloss
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Gaudi::Property< unsigned > m_maxStep
virtual StatusCode initialize() override
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
virtual Acts::MagneticFieldContext getMagneticFieldContext(const EventContext &ctx) const override
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...