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"
21
22namespace ActsTrk::detail {
23
25template <typename traj_t>
27public:
28 using TrackStateProxy = typename Acts::MultiTrajectory<traj_t>::TrackStateProxy;
29
32 using PixelCalibrator = Acts::Delegate<
33 std::pair<PixelPos, PixelCov>(const Acts::GeometryContext&,
34 const Acts::CalibrationContext&,
35 const xAOD::PixelCluster&,
36 const TrackStateProxy&)>;
37
40 using StripCalibrator = Acts::Delegate<
41 std::pair<StripPos, StripCov>(const Acts::GeometryContext&,
42 const Acts::CalibrationContext&,
43 const xAOD::StripCluster&,
44 const TrackStateProxy&)>;
45
48 using HGTDCalibrator = Acts::Delegate<
49 std::pair<HgtdPos, HgtdCov>(const Acts::GeometryContext&,
50 const Acts::CalibrationContext&,
51 const xAOD::HGTDCluster &,
52 const TrackStateProxy&)>;
53
54
63 return OnTrackCalibrator(trackGeoTool);
64 }
65
67 OnTrackCalibrator() = default;
68protected:
71public:
81 OnTrackCalibrator(const EventContext &ctx,
82 const ActsTrk::ITrackingGeometryTool* trackGeoTool,
83 const ToolHandle<IPixelOnTrackCalibratorTool<traj_t>> &pixelTool,
84 const ToolHandle<IStripOnTrackCalibratorTool<traj_t>> &stripTool,
85 const ToolHandle<IHGTDOnTrackCalibratorTool<traj_t>> &hgtdTool);
86
92 void calibrate(const Acts::GeometryContext& geoctx,
93 const Acts::CalibrationContext& cctx,
94 const Acts::SourceLink& link,
95 TrackStateProxy state) const;
96
97private:
100
102 boost::container::static_vector<std::unique_ptr<ClusterCalibratorBase >, 3> m_calibrators;
103
104 // Support the no-calibration case
105 template <std::size_t Dim, typename Cluster>
106 std::pair<xAOD::MeasVector<Dim>, xAOD::MeasMatrix<Dim>>
107 passthrough(const Acts::GeometryContext& gctx,
108 const Acts::CalibrationContext& /*cctx*/,
109 const Cluster& cluster,
110 const TrackStateProxy& state) const;
111
112 // connect passThrough calibrator for a certain measurement type
113 template <typename T_CalibratorToolHandle, typename T_Delegate>
114 void connectPassThrough(T_Delegate &delegate);
115
116 // connect the calibrator provided by the given tool or the passthrough calibrator
117 // depending on the enable state of the tool.
118 template<typename T_CalibratorToolHandle, typename T_Delegate>
119 void connect(const EventContext &ctx,
120 const T_CalibratorToolHandle &calibrator_tool,
121 T_Delegate &delegate);
122};
123
124} // namespace ActsTrk
125
127
128#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