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 bool reverseSearch,
44 const Acts::GeometryContext& geoContext,
45 const Acts::MagneticFieldContext& magFieldContext,
46 const Acts::CalibrationContext& calContext,
47 std::function<const Acts::Surface&(const ActsTrk::Seed& seed, bool useTopSp)> retrieveSurface) const override;
48
49 virtual
50 std::pair<std::optional<Acts::BoundTrackParameters>, EstimationStatus>
52 const ActsTrk::Seed& seed,
53 bool reverseSearch,
54 const Acts::GeometryContext& geoContext,
55 const Acts::MagneticFieldContext& magFieldContext,
56 const Acts::CalibrationContext& calContext,
57 const Acts::Surface& surface,
58 const Acts::Vector3& bField) const override;
59
60 SpacePointIndicesFun_t spacePointIndicesFun() const override;
61
62 bool estimateFromTopSp(bool reverseSearch) const override { return reverseSearch && !m_refitSeeds; }
63
64 // *********************************************************************
65
66 private:
67 ToolHandle<ActsTrk::IFitterTool> m_fitterTool{this, "FitterTool", "", "Fitter Tool for Seeds"};
68 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};
69
70 // Properties
71 Gaudi::Property< double > m_sigmaLoc0 {this, "sigmaLoc0", 1 * Acts::UnitConstants::mm,
72 "Constant term of the loc0 resolution"};
73 Gaudi::Property< double > m_sigmaLoc1 {this, "sigmaLoc1", 1 * Acts::UnitConstants::mm,
74 "Constant term of the loc1 resolution"};
75 Gaudi::Property< double > m_sigmaPhi {this, "sigmaPhi", 0.1 * Acts::UnitConstants::degree,
76 "Phi angular resolution"};
77 Gaudi::Property< double > m_sigmaTheta {this, "sigmaTheta", 0.1 * Acts::UnitConstants::degree,
78 "Theta angular resolution"};
79 Gaudi::Property< double > m_sigmaQOverP {this, "sigmaQOverP", 0.1 * Acts::UnitConstants::e / Acts::UnitConstants::GeV,
80 "q/p resolution"};
81 Gaudi::Property< double > m_sigmaT0 {this, "sigmaT0", 1 * Acts::UnitConstants::ns,
82 "Time resolution"};
83 Gaudi::Property< double > m_initialSigmaPtRel {this, "initialSigmaPtRel", 0.1,
84 "Initial relative pT resolution"};
85 Gaudi::Property< std::vector<double> > m_initialVarInflation {this, "initialVarInflation", {1., 1., 1., 1., 1., 1.},
86 "Inflate track variances"};
87 Gaudi::Property< int > m_parameterEstimationMode {this, "parameterEstimationMode", 2,
88 "0=use 1st 3 SPs, 1=use first,middle,last SPs to improve pT measurement, 2=use for all parameters, "
89 "3=use 1st 3 SPs separated by more than minDeltaR, starting from the innermost SP, "
90 "4=fit all SPs"};
91 Gaudi::Property<int> m_bFieldMode{this, "bFieldMode", 0,
92 "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"};
93 Gaudi::Property<std::size_t> m_firstSp{this, "firstSp", 0ul,
94 "Index of first SP to use"};
95 Gaudi::Property<double> m_minDeltaR{this, "minDeltaR", 15 * Acts::UnitConstants::mm,
96 "Minimum difference in distance from the origin between the SPs used for the estimate (parameterEstimationMode=3)"};
97 Gaudi::Property<bool> m_allowPropagatorFailure{this, "allowPropagatorFailure", false,
98 "Use curvilinear parameters when propagation fails instead of returning null"};
99 Gaudi::Property<std::size_t> m_stripCalibrationIterations{this, "stripCalibrationIterations", 1ul,
100 "Number of strip calibration iterations"};
101 Gaudi::Property<std::size_t> m_geometricRefineIterations{this, "geometricRefineIterations", 0ul,
102 "Number of geometric refinement iterations of the circle fit (parameterEstimationMode=4)"};
103 Gaudi::Property<double> m_spacePointWeightExponent{this, "spacePointWeightExponent", 0.,
104 "Weight each SP in the fit by 1/r^exponent, where 0 gives uniform weights (parameterEstimationMode=4)"};
105 Gaudi::Property<bool> m_refitSeeds{this, "refitSeeds", false, "Run KalmanFitter on seeds"};
106
107 std::optional<Acts::BoundTrackParameters> doRefit(
108 const ActsTrk::Seed &measurement,
109 const Acts::BoundTrackParameters &initialParameters,
110 const Acts::GeometryContext& geometry,
111 const Acts::MagneticFieldContext& magField,
112 const Acts::CalibrationContext& calib,
113 const bool paramsAtOutermostSurface) const;
114
116
117 using Stepper = Acts::SympyStepper;
118 using Navigator = Acts::VoidNavigator;
119 using Extrapolator = Acts::Propagator<Stepper>;
120
121 std::optional<Extrapolator> m_extrapolator;
122
124 const Acts::Logger &logger() const
125 {
126 return *m_logger;
127 }
128
130 std::unique_ptr<const Acts::Logger> m_logger;
131
132 SpacePointIndicesFun_t m_spacePointIndicesFun{};
133 };
134
135} // namespace
136
137#endif
138
Gaudi::Property< std::size_t > m_geometricRefineIterations
bool estimateFromTopSp(bool reverseSearch) const override
const Acts::Logger & logger() const
Private access to the logger.
std::unique_ptr< const Acts::Logger > m_logger
logging instance
virtual std::pair< std::optional< Acts::BoundTrackParameters >, EstimationStatus > estimateTrackParameters(const ActsTrk::Seed &seed, bool reverseSearch, const Acts::GeometryContext &geoContext, const Acts::MagneticFieldContext &magFieldContext, const Acts::CalibrationContext &calContext, std::function< const Acts::Surface &(const ActsTrk::Seed &seed, bool useTopSp)> retrieveSurface) const override
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 bool paramsAtOutermostSurface) const
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)
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...