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 using PixelCalibrator = Acts::Delegate<
34 std::pair<PixelPos, PixelCov>(const Acts::GeometryContext&,
35 const Acts::CalibrationContext&,
36 const xAOD::PixelCluster&,
37 const TrackStateProxy&)>;
38
41 using StripCalibrator = Acts::Delegate<
42 std::pair<StripPos, StripCov>(const Acts::GeometryContext&,
43 const Acts::CalibrationContext&,
44 const xAOD::StripCluster&,
45 const TrackStateProxy&)>;
46
49 using HGTDCalibrator = Acts::Delegate<
50 std::pair<HgtdPos, HgtdCov>(const Acts::GeometryContext&,
51 const Acts::CalibrationContext&,
52 const xAOD::HGTDCluster &,
53 const TrackStateProxy&)>;
54
55
64 return OnTrackCalibrator(trackGeoTool);
65 }
66
68 OnTrackCalibrator() = default;
69protected:
72public:
82 OnTrackCalibrator(const EventContext &ctx,
83 const ActsTrk::ITrackingGeometryTool* trackGeoTool,
84 const ToolHandle<IPixelOnTrackCalibratorTool<traj_t>> &pixelTool,
85 const ToolHandle<IStripOnTrackCalibratorTool<traj_t>> &stripTool,
86 const ToolHandle<IHGTDOnTrackCalibratorTool<traj_t>> &hgtdTool);
87
93 void calibrate(const Acts::GeometryContext& geoctx,
94 const Acts::CalibrationContext& cctx,
95 const Acts::SourceLink& link,
96 TrackStateProxy state) const;
97
98private:
101
103 boost::container::static_vector<std::unique_ptr<ClusterCalibratorBase >, 3> m_calibrators;
104
105 // Support the no-calibration case
106 template <std::size_t Dim, typename Cluster>
107 std::pair<xAOD::MeasVector<Dim>, xAOD::MeasMatrix<Dim>>
108 passthrough(const Acts::GeometryContext& gctx,
109 const Acts::CalibrationContext& /*cctx*/,
110 const Cluster& cluster,
111 const TrackStateProxy& state) const;
112
113 // connect passThrough calibrator for a certain measurement type
114 template <typename T_CalibratorToolHandle, typename T_Delegate>
115 void connectPassThrough(T_Delegate &delegate);
116
117 // connect the calibrator provided by the given tool or the passthrough calibrator
118 // depending on the enable state of the tool.
119 template<typename T_CalibratorToolHandle, typename T_Delegate>
120 void connect(const EventContext &ctx,
121 const T_CalibratorToolHandle &calibrator_tool,
122 T_Delegate &delegate);
123
124};
125
126} // namespace ActsTrk
127
129
130#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.
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...
std::pair< xAOD::MeasVector< Dim >, xAOD::MeasMatrix< Dim > > passthrough(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &, const Cluster &cluster, const 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...
Acts::Delegate< std::pair< PixelPos, PixelCov >(const Acts::GeometryContext &, const Acts::CalibrationContext &, const xAOD::PixelCluster &, const TrackStateProxy &)> PixelCalibrator
OnTrackCalibrator()=default
Empty default constructor.
typename Acts::MultiTrajectory< traj_t >::TrackStateProxy TrackStateProxy
Acts::Delegate< std::pair< StripPos, StripCov >(const Acts::GeometryContext &, const Acts::CalibrationContext &, const xAOD::StripCluster &, const TrackStateProxy &)> StripCalibrator
Acts::Delegate< std::pair< HgtdPos, HgtdCov >(const Acts::GeometryContext &, const Acts::CalibrationContext &, const xAOD::HGTDCluster &, const TrackStateProxy &)> HGTDCalibrator
void connectPassThrough(T_Delegate &delegate)
boost::container::static_vector< std::unique_ptr< ClusterCalibratorBase >, 3 > m_calibrators
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.
Athena definition of the Eigen plugin.
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
Eigen::Matrix< float, N, N > MeasMatrix
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.
HGTDCluster_v1 HGTDCluster
Define the version of the pixel cluster class.
Definition HGTDCluster.h:13