ATLAS Offline Software
Loading...
Searching...
No Matches
TrackParamsEstimationTool.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 ACTSTRACKRECONSTRUCTION_TRACKPARAMSESTIMATIONTOOL_H
6#define ACTSTRACKRECONSTRUCTION_TRACKPARAMSESTIMATIONTOOL_H
7
9
10// ATHENA
14#include "ActsInterop/Logger.h"
16
17// ACTS
18#include "Acts/Propagator/Propagator.hpp"
19#include "Acts/Propagator/SympyStepper.hpp"
20
21#include <utility>
22#include <memory>
23#include <string>
24#include <vector>
25#include <optional>
26
27namespace ActsTrk {
28
30 public extends<AthAlgTool, ActsTrk::ITrackParamsEstimationTool> {
31
32 public:
33 TrackParamsEstimationTool(const std::string& type, const std::string& name,
34 const IInterface* parent);
35 virtual ~TrackParamsEstimationTool() = default;
36
37 virtual StatusCode initialize() override;
38
39 virtual
40 std::pair<std::optional<Acts::BoundTrackParameters>, EstimationStatus>
42 const ActsTrk::Seed& seed,
43 const Acts::GeometryContext& geoContext,
44 const Acts::MagneticFieldContext& magFieldContext,
45 const Acts::CalibrationContext& calContext,
46 std::function<const Acts::Surface&(const ActsTrk::Seed& seed)> retrieveSurface) const override;
47
48 virtual
49 std::pair<std::optional<Acts::BoundTrackParameters>, EstimationStatus>
51 const ActsTrk::Seed& seed,
52 const Acts::GeometryContext& geoContext,
53 const Acts::MagneticFieldContext& magFieldContext,
54 const Acts::CalibrationContext& calContext,
55 const Acts::Surface& surface,
56 const Acts::Vector3& bField) const override;
57
58 SpacePointIndicesFun_t spacePointIndicesFun() const override;
59
60 // *********************************************************************
61
62 private:
63 ToolHandle<ActsTrk::IFitterTool> m_fitterTool{this, "FitterTool", "", "Fitter Tool for Seeds"};
64 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};
65
66 // Properties
67 Gaudi::Property< double > m_sigmaLoc0 {this, "sigmaLoc0", 1 * Acts::UnitConstants::mm,
68 "Constant term of the loc0 resolution"};
69 Gaudi::Property< double > m_sigmaLoc1 {this, "sigmaLoc1", 1 * Acts::UnitConstants::mm,
70 "Constant term of the loc1 resolution"};
71 Gaudi::Property< double > m_sigmaPhi {this, "sigmaPhi", 0.1 * Acts::UnitConstants::degree,
72 "Phi angular resolution"};
73 Gaudi::Property< double > m_sigmaTheta {this, "sigmaTheta", 0.1 * Acts::UnitConstants::degree,
74 "Theta angular resolution"};
75 Gaudi::Property< double > m_sigmaQOverP {this, "sigmaQOverP", 0.1 * Acts::UnitConstants::e / Acts::UnitConstants::GeV,
76 "q/p resolution"};
77 Gaudi::Property< double > m_sigmaT0 {this, "sigmaT0", 1 * Acts::UnitConstants::ns,
78 "Time resolution"};
79 Gaudi::Property< double > m_initialSigmaPtRel {this, "initialSigmaPtRel", 0.1,
80 "Initial relative pT resolution"};
81 Gaudi::Property< std::vector<double> > m_initialVarInflation {this, "initialVarInflation", {1., 1., 1., 1., 1., 1.},
82 "Inflate track variances"};
83 Gaudi::Property< int > m_parameterEstimationMode {this, "parameterEstimationMode", 2,
84 "0=use 1st 3 SPs, 1=use first,middle,last SPs to improve pT measurement, 2=use for all parameters, "
85 "3=use 1st 3 SPs separated by more than minDeltaR, starting from the innermost SP, "
86 "4=fit all SPs"};
87 Gaudi::Property<int> m_bFieldMode{this, "bFieldMode", 0,
88 "B-field mode: 0=B-field at the innermost SP; 1=z-component of B-field at the innermost SP"};
89 Gaudi::Property<std::size_t> m_firstSp{this, "firstSp", 0ul,
90 "Index of first SP to use"};
91 Gaudi::Property<double> m_minDeltaR{this, "minDeltaR", 15 * Acts::UnitConstants::mm,
92 "Minimum difference in distance from the origin between the SPs used for the estimate (parameterEstimationMode=3)"};
93 Gaudi::Property<bool> m_allowPropagatorFailure{this, "allowPropagatorFailure", false,
94 "Use curvilinear parameters when propagation fails instead of returning null"};
95 Gaudi::Property<std::size_t> m_stripCalibrationIterations{this, "stripCalibrationIterations", 1ul,
96 "Number of strip calibration iterations"};
97 Gaudi::Property<std::size_t> m_geometricRefineIterations{this, "geometricRefineIterations", 0ul,
98 "Number of geometric refinement iterations of the circle fit (parameterEstimationMode=4)"};
99 Gaudi::Property<double> m_spacePointWeightExponent{this, "spacePointWeightExponent", 0.,
100 "Weight each SP in the fit by 1/r^exponent, where 0 gives uniform weights (parameterEstimationMode=4)"};
101 Gaudi::Property<bool> m_refitSeeds{this, "refitSeeds", false, "Run KalmanFitter on seeds"};
102
103 std::optional<Acts::BoundTrackParameters> doRefit(
104 const ActsTrk::Seed &measurement,
105 const Acts::BoundTrackParameters &initialParameters,
106 const Acts::GeometryContext& geometry,
107 const Acts::MagneticFieldContext& magField,
108 const Acts::CalibrationContext& calib) const;
109
111
112 using Stepper = Acts::SympyStepper;
113 using Navigator = Acts::VoidNavigator;
114 using Extrapolator = Acts::Propagator<Stepper>;
115
116 std::optional<Extrapolator> m_extrapolator;
117
119 const Acts::Logger &logger() const
120 {
121 return *m_logger;
122 }
123
125 std::unique_ptr<const Acts::Logger> m_logger;
126
127 SpacePointIndicesFun_t m_spacePointIndicesFun{};
128 };
129
130} // namespace
131
132#endif
133
std::optional< Acts::BoundTrackParameters > doRefit(const ActsTrk::Seed &measurement, const Acts::BoundTrackParameters &initialParameters, const Acts::GeometryContext &geometry, const Acts::MagneticFieldContext &magField, const Acts::CalibrationContext &calib) const
Gaudi::Property< std::size_t > m_geometricRefineIterations
const Acts::Logger & logger() const
Private access to the logger.
std::unique_ptr< const Acts::Logger > m_logger
logging instance
virtual ~TrackParamsEstimationTool()=default
ToolHandle< ActsTrk::IFitterTool > m_fitterTool
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
SpacePointIndicesFun_t spacePointIndicesFun() const override
TrackParamsEstimationTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual std::pair< std::optional< Acts::BoundTrackParameters >, EstimationStatus > estimateTrackParameters(const ActsTrk::Seed &seed, const Acts::GeometryContext &geoContext, const Acts::MagneticFieldContext &magFieldContext, const Acts::CalibrationContext &calContext, std::function< const Acts::Surface &(const ActsTrk::Seed &seed)> retrieveSurface) const override
Gaudi::Property< std::vector< double > > m_initialVarInflation
Gaudi::Property< std::size_t > m_firstSp
std::optional< Extrapolator > m_extrapolator
detail::xAODUncalibMeasSurfAcc m_uncalibMeasSurfAcc
Gaudi::Property< std::size_t > m_stripCalibrationIterations
Gaudi::Property< double > m_spacePointWeightExponent
Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...