ATLAS Offline Software
Loading...
Searching...
No Matches
OnTrackCalibrator.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_ONTRACKCALIBRATOR_H
6#define ACTSTRACKRECONSTRUCTION_ONTRACKCALIBRATOR_H
7
8#include "GaudiKernel/ToolHandle.h"
13#include "Acts/Geometry/TrackingGeometry.hpp"
14
20#include "boost/container/static_vector.hpp"
22
23namespace ActsTrk::detail {
24
26template <typename traj_t>
28public:
29 using TrackStateProxy = typename Acts::MultiTrajectory<traj_t>::TrackStateProxy;
30
33
36
39
40 template <typename T_Cluster, std::size_t NDIM>
41 using OnTrackCalibratorDelegate = Acts::Delegate<
42 void(const Acts::GeometryContext&,
43 const Acts::CalibrationContext&,
44 const T_Cluster &,
49
58 return OnTrackCalibrator(trackGeoTool);
59 }
60
62 OnTrackCalibrator() = default;
63protected:
66public:
76 OnTrackCalibrator(const EventContext &ctx,
77 const ActsTrk::ITrackingGeometryTool* trackGeoTool,
78 const ToolHandle<IPixelOnTrackCalibratorTool<traj_t>> &pixelTool,
79 const ToolHandle<IStripOnTrackCalibratorTool<traj_t>> &stripTool,
80 const ToolHandle<IHGTDOnTrackCalibratorTool<traj_t>> &hgtdTool);
81
87 void calibrate(const Acts::GeometryContext& geoctx,
88 const Acts::CalibrationContext& cctx,
89 const Acts::SourceLink& link,
90 TrackStateProxy state) const;
91
92private:
93
96
98 boost::container::static_vector<std::unique_ptr<ClusterCalibratorBase >, 3> m_calibrators;
99
100 // Support the no-calibration case
101 template <std::size_t Dim, typename Cluster>
102 void passthrough(const Acts::GeometryContext& gctx,
103 const Acts::CalibrationContext& /*cctx*/,
104 const Cluster& cluster,
105 TrackStateProxy& state) const;
106
107 // connect passThrough calibrator for a certain measurement type
108 template <typename T_CalibratorToolHandle, typename T_Delegate>
109 void connectPassThrough(T_Delegate &delegate);
110
111 // connect the calibrator provided by the given tool or the passthrough calibrator
112 // depending on the enable state of the tool.
113 template<typename T_CalibratorToolHandle, typename T_Delegate>
114 void connect(const EventContext &ctx,
115 const T_CalibratorToolHandle &calibrator_tool,
116 T_Delegate &delegate);
117
118};
119
120} // namespace ActsTrk
121
123
124#endif
Geometry helper tool extending the Tracking geometry service by the data dependency to fetch the geom...
void calibrate(const Acts::GeometryContext &geoctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &link, TrackStateProxy state) const
Function that's hooked to the calibration delegate of the implemented Acts fitters.
OnTrackCalibratorDelegate< const xAOD::StripCluster, 1 > StripCalibrator
OnTrackCalibrator(const EventContext &ctx, const ActsTrk::ITrackingGeometryTool *trackGeoTool, const ToolHandle< IPixelOnTrackCalibratorTool< traj_t > > &pixelTool, const ToolHandle< IStripOnTrackCalibratorTool< traj_t > > &stripTool, const ToolHandle< IHGTDOnTrackCalibratorTool< traj_t > > &hgtdTool)
Standard cosntructor which activates the calibration of the ITk & HGTD measurements based on the best...
void passthrough(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &, const Cluster &cluster, TrackStateProxy &state) const
OnTrackCalibrator(const ActsTrk::ITrackingGeometryTool *trackGeoTool)
create a "NoCalibration" on track calibrator for all measurement types.
static OnTrackCalibrator NoCalibration(const ActsTrk::ITrackingGeometryTool *trackGeoTool)
Constructs a calibrator which copies the local position & covariance of the ITk measurements onto the...
OnTrackCalibrator()=default
Empty default constructor.
typename Acts::MultiTrajectory< traj_t >::TrackStateProxy TrackStateProxy
void connectPassThrough(T_Delegate &delegate)
boost::container::static_vector< std::unique_ptr< ClusterCalibratorBase >, 3 > m_calibrators
OnTrackCalibratorDelegate< const xAOD::PixelCluster, 2 > PixelCalibrator
Acts::Delegate< void(const Acts::GeometryContext &, const Acts::CalibrationContext &, const T_Cluster &, TrackStateProxy &)> OnTrackCalibratorDelegate
OnTrackCalibratorDelegate< const xAOD::HGTDCluster, 3 > HGTDCalibrator
void connect(const EventContext &ctx, const T_CalibratorToolHandle &calibrator_tool, T_Delegate &delegate)
Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.
Hash functions to pack the source link into unordered_maps / unordered_sets.
Eigen::Matrix< float, N, N > MeasMatrix
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.