ATLAS Offline Software
TrackParamsEstimationTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ACTSTRACKRECONSTRUCTION_TRACKPARAMSESTIMATIONTOOL_H
6 #define ACTSTRACKRECONSTRUCTION_TRACKPARAMSESTIMATIONTOOL_H
7 
8 // ATHENA
11 #include "ActsInterop/Logger.h"
12 
13 // ACTS
14 #include "Acts/Propagator/Propagator.hpp"
15 #include "Acts/Propagator/SympyStepper.hpp"
16 
17 namespace ActsTrk {
18 
20  public extends<AthAlgTool, ActsTrk::ITrackParamsEstimationTool> {
21 
22  public:
23  TrackParamsEstimationTool(const std::string& type, const std::string& name,
24  const IInterface* parent);
25  virtual ~TrackParamsEstimationTool() = default;
26 
27  virtual StatusCode initialize() override;
28 
29  virtual
30  std::optional<Acts::BoundTrackParameters>
32  const ActsTrk::Seed& seed,
33  bool useTopSp,
34  const Acts::GeometryContext& geoContext,
35  const Acts::MagneticFieldContext& magFieldContext,
36  std::function<const Acts::Surface&(const ActsTrk::Seed& seed, bool useTopSp)> retrieveSurface) const override;
37 
38  virtual
39  std::optional<Acts::BoundTrackParameters>
41  const ActsTrk::Seed& seed,
42  bool useTopSp,
43  const Acts::GeometryContext& geoContext,
44  const Acts::MagneticFieldContext& magFieldContext,
45  const Acts::Surface& surface,
46  const Acts::Vector3& bField) const override;
47 
48  SpacePointIndicesFun_t spacePointIndicesFun() const override;
49 
50  // *********************************************************************
51 
52  private:
53  // Properties
54  Gaudi::Property< double > m_sigmaLoc0 {this, "sigmaLoc0", 1 * Acts::UnitConstants::mm,
55  "Constant term of the loc0 resolution"};
56  Gaudi::Property< double > m_sigmaLoc1 {this, "sigmaLoc1", 1 * Acts::UnitConstants::mm,
57  "Constant term of the loc1 resolution"};
58  Gaudi::Property< double > m_sigmaPhi {this, "sigmaPhi", 0.1 * Acts::UnitConstants::degree,
59  "Phi angular resolution"};
60  Gaudi::Property< double > m_sigmaTheta {this, "sigmaTheta", 0.1 * Acts::UnitConstants::degree,
61  "Theta angular resolution"};
62  Gaudi::Property< double > m_sigmaQOverP {this, "sigmaQOverP", 0.1 * Acts::UnitConstants::e / Acts::UnitConstants::GeV,
63  "q/p resolution"};
64  Gaudi::Property< double > m_sigmaT0 {this, "sigmaT0", 1 * Acts::UnitConstants::ns,
65  "Time resolution"};
66  Gaudi::Property< double > m_initialSigmaPtRel {this, "initialSigmaPtRel", 0.1,
67  "Initial relative pT resolution"};
68  Gaudi::Property< std::vector<double> > m_initialVarInflation {this, "initialVarInflation", {1., 1., 1., 1., 1., 1.},
69  "Inflate tracks"};
70  Gaudi::Property< int > m_useLongSeeds {this, "useLongSeeds", 2,
71  "0=use 1st 3 SPs, 1=use first,middle,last SPs to improve pT measurement, 2=use for all parameters"};
72  Gaudi::Property<int> m_bFieldMode{this, "bFieldMode", 0,
73  "B-field mode: 0=B-field at first SP in search order; 1=z-component of B-field; 2=B-field at innermost SP, regardless of search direction"};
74  Gaudi::Property<std::size_t> m_firstSp{this, "firstSp", 0ul,
75  "Index of first SP to use"};
76 
77  using Stepper = Acts::SympyStepper;
78  using Navigator = Acts::VoidNavigator;
79  using Extrapolator = Acts::Propagator<Stepper>;
80 
81  std::optional<Extrapolator> m_extrapolator;
82 
84  const Acts::Logger &logger() const
85  {
86  return *m_logger;
87  }
88 
90  std::unique_ptr<const Acts::Logger> m_logger;
91 
92  SpacePointIndicesFun_t m_spacePointIndicesFun{};
93  };
94 
95 } // namespace
96 
97 #endif
98 
ActsTrk::TrackParamsEstimationTool::m_sigmaLoc0
Gaudi::Property< double > m_sigmaLoc0
Definition: TrackParamsEstimationTool.h:54
ActsTrk::TrackParamsEstimationTool::m_extrapolator
std::optional< Extrapolator > m_extrapolator
Definition: TrackParamsEstimationTool.h:81
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:18
ActsTrk::TrackParamsEstimationTool::m_firstSp
Gaudi::Property< std::size_t > m_firstSp
Definition: TrackParamsEstimationTool.h:74
python.SystemOfUnits.mm
float mm
Definition: SystemOfUnits.py:98
ActsTrk::TrackParamsEstimationTool::m_initialSigmaPtRel
Gaudi::Property< double > m_initialSigmaPtRel
Definition: TrackParamsEstimationTool.h:66
ActsTrk::TrackParamsEstimationTool::m_initialVarInflation
Gaudi::Property< std::vector< double > > m_initialVarInflation
Definition: TrackParamsEstimationTool.h:68
ActsTrk::TrackParamsEstimationTool::Extrapolator
Acts::Propagator< Stepper > Extrapolator
Definition: TrackParamsEstimationTool.h:79
ActsTrk::TrackParamsEstimationTool::m_sigmaTheta
Gaudi::Property< double > m_sigmaTheta
Definition: TrackParamsEstimationTool.h:60
ActsTrk::TrackParamsEstimationTool::m_useLongSeeds
Gaudi::Property< int > m_useLongSeeds
Definition: TrackParamsEstimationTool.h:70
ActsTrk::TrackParamsEstimationTool::~TrackParamsEstimationTool
virtual ~TrackParamsEstimationTool()=default
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
ActsTrk::TrackParamsEstimationTool::estimateTrackParameters
virtual std::optional< Acts::BoundTrackParameters > estimateTrackParameters(const ActsTrk::Seed &seed, bool useTopSp, const Acts::GeometryContext &geoContext, const Acts::MagneticFieldContext &magFieldContext, std::function< const Acts::Surface &(const ActsTrk::Seed &seed, bool useTopSp)> retrieveSurface) const override
Definition: TrackParamsEstimationTool.cxx:45
ActsTrk::TrackParamsEstimationTool::m_sigmaLoc1
Gaudi::Property< double > m_sigmaLoc1
Definition: TrackParamsEstimationTool.h:56
ActsTrk::TrackParamsEstimationTool::Navigator
Acts::VoidNavigator Navigator
Definition: TrackParamsEstimationTool.h:78
ActsTrk::TrackParamsEstimationTool::m_sigmaPhi
Gaudi::Property< double > m_sigmaPhi
Definition: TrackParamsEstimationTool.h:58
ActsTrk::TrackParamsEstimationTool
Definition: TrackParamsEstimationTool.h:20
ActsTrk::TrackParamsEstimationTool::m_bFieldMode
Gaudi::Property< int > m_bFieldMode
Definition: TrackParamsEstimationTool.h:72
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ActsTrk::TrackParamsEstimationTool::spacePointIndicesFun
SpacePointIndicesFun_t spacePointIndicesFun() const override
Definition: TrackParamsEstimationTool.cxx:155
ActsTrk::TrackParamsEstimationTool::Stepper
Acts::SympyStepper Stepper
Definition: TrackParamsEstimationTool.h:77
detail::ul
unsigned long ul
Definition: PrimitiveHelpers.h:46
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::TrackParamsEstimationTool::TrackParamsEstimationTool
TrackParamsEstimationTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrackParamsEstimationTool.cxx:14
ActsTrk::TrackParamsEstimationTool::m_logger
std::unique_ptr< const Acts::Logger > m_logger
logging instance
Definition: TrackParamsEstimationTool.h:90
ActsTrk::ActsSeed
Definition: Seed.h:18
ActsTrk::TrackParamsEstimationTool::m_spacePointIndicesFun
SpacePointIndicesFun_t m_spacePointIndicesFun
Definition: TrackParamsEstimationTool.h:92
ActsTrk::TrackParamsEstimationTool::m_sigmaT0
Gaudi::Property< double > m_sigmaT0
Definition: TrackParamsEstimationTool.h:64
ITrackParamsEstimationTool.h
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MSTrackingVolumeBuilder.cxx:24
ActsTrk::TrackParamsEstimationTool::logger
const Acts::Logger & logger() const
Private access to the logger.
Definition: TrackParamsEstimationTool.h:84
ActsTrk::TrackParamsEstimationTool::initialize
virtual StatusCode initialize() override
Definition: TrackParamsEstimationTool.cxx:20
Logger.h
ActsTrk::TrackParamsEstimationTool::m_sigmaQOverP
Gaudi::Property< double > m_sigmaQOverP
Definition: TrackParamsEstimationTool.h:62
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:121
python.SystemOfUnits.ns
float ns
Definition: SystemOfUnits.py:146