ATLAS Offline Software
Loading...
Searching...
No Matches
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
9
10// ATHENA
14#include "ActsInterop/Logger.h"
16
17// ACTS
18#include "Acts/Propagator/Propagator.hpp"
19#include "Acts/Propagator/SympyStepper.hpp"
20
21namespace ActsTrk {
22
24 public extends<AthAlgTool, ActsTrk::ITrackParamsEstimationTool> {
25
26 public:
27 TrackParamsEstimationTool(const std::string& type, const std::string& name,
28 const IInterface* parent);
29 virtual ~TrackParamsEstimationTool() = default;
30
31 virtual StatusCode initialize() override;
32
33 virtual
34 std::pair<std::optional<Acts::BoundTrackParameters>, EstimationStatus>
36 const ActsTrk::Seed& seed,
37 bool reverseSearch,
38 const Acts::GeometryContext& geoContext,
39 const Acts::MagneticFieldContext& magFieldContext,
40 const Acts::CalibrationContext& calContext,
41 std::function<const Acts::Surface&(const ActsTrk::Seed& seed, bool useTopSp)> retrieveSurface) const override;
42
43 virtual
44 std::pair<std::optional<Acts::BoundTrackParameters>, EstimationStatus>
46 const ActsTrk::Seed& seed,
47 bool reverseSearch,
48 const Acts::GeometryContext& geoContext,
49 const Acts::MagneticFieldContext& magFieldContext,
50 const Acts::CalibrationContext& calContext,
51 const Acts::Surface& surface,
52 const Acts::Vector3& bField) const override;
53
54 SpacePointIndicesFun_t spacePointIndicesFun() const override;
55
56 bool estimateFromTopSp(bool reverseSearch) const override { return reverseSearch && !m_refitSeeds; }
57
58 // *********************************************************************
59
60 private:
61 ToolHandle<ActsTrk::IFitterTool> m_fitterTool{this, "FitterTool", "", "Fitter Tool for Seeds"};
62 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};
63
64 // Properties
65 Gaudi::Property< double > m_sigmaLoc0 {this, "sigmaLoc0", 1 * Acts::UnitConstants::mm,
66 "Constant term of the loc0 resolution"};
67 Gaudi::Property< double > m_sigmaLoc1 {this, "sigmaLoc1", 1 * Acts::UnitConstants::mm,
68 "Constant term of the loc1 resolution"};
69 Gaudi::Property< double > m_sigmaPhi {this, "sigmaPhi", 0.1 * Acts::UnitConstants::degree,
70 "Phi angular resolution"};
71 Gaudi::Property< double > m_sigmaTheta {this, "sigmaTheta", 0.1 * Acts::UnitConstants::degree,
72 "Theta angular resolution"};
73 Gaudi::Property< double > m_sigmaQOverP {this, "sigmaQOverP", 0.1 * Acts::UnitConstants::e / Acts::UnitConstants::GeV,
74 "q/p resolution"};
75 Gaudi::Property< double > m_sigmaT0 {this, "sigmaT0", 1 * Acts::UnitConstants::ns,
76 "Time resolution"};
77 Gaudi::Property< double > m_initialSigmaPtRel {this, "initialSigmaPtRel", 0.1,
78 "Initial relative pT resolution"};
79 Gaudi::Property< std::vector<double> > m_initialVarInflation {this, "initialVarInflation", {1., 1., 1., 1., 1., 1.},
80 "Inflate tracks"};
81 Gaudi::Property< int > m_useLongSeeds {this, "useLongSeeds", 2,
82 "0=use 1st 3 SPs, 1=use first,middle,last SPs to improve pT measurement, 2=use for all parameters"};
83 Gaudi::Property<int> m_bFieldMode{this, "bFieldMode", 0,
84 "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"};
85 Gaudi::Property<std::size_t> m_firstSp{this, "firstSp", 0ul,
86 "Index of first SP to use"};
87 Gaudi::Property<bool> m_allowPropagatorFailure{this, "allowPropagatorFailure", false,
88 "Use curvilinear parameters when propagation fails instead of returning null"};
89 Gaudi::Property<std::size_t> m_stripCalibrationIterations{this, "stripCalibrationIterations", 1ul,
90 "Number of strip calibration iterations"};
91 Gaudi::Property<bool> m_refitSeeds{this, "refitSeeds", false, "Run KalmanFitter on seeds"};
92
93 std::optional<Acts::BoundTrackParameters> doRefit(
94 const ActsTrk::Seed &measurement,
95 const Acts::BoundTrackParameters &initialParameters,
96 const Acts::GeometryContext& geometry,
97 const Acts::MagneticFieldContext& magField,
98 const Acts::CalibrationContext& calib,
99 const bool paramsAtOutermostSurface) const;
100
102
103 using Stepper = Acts::SympyStepper;
104 using Navigator = Acts::VoidNavigator;
105 using Extrapolator = Acts::Propagator<Stepper>;
106
107 std::optional<Extrapolator> m_extrapolator;
108
110 const Acts::Logger &logger() const
111 {
112 return *m_logger;
113 }
114
116 std::unique_ptr<const Acts::Logger> m_logger;
117
118 SpacePointIndicesFun_t m_spacePointIndicesFun{};
119 };
120
121} // namespace
122
123#endif
124
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
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...