ATLAS Offline Software
OnTrackCalibrator.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_ONTRACKCALIBRATOR_H
6 #define ACTSTRACKRECONSTRUCTION_ONTRACKCALIBRATOR_H
7 
8 #include "GaudiKernel/ToolHandle.h"
12 
16 namespace ActsTrk::detail {
17 
18 template <typename traj_t>
19 class OnTrackCalibrator : MeasurementCalibratorBase {
20 public:
21  using TrackStateProxy = typename Acts::MultiTrajectory<traj_t>::TrackStateProxy;
22 
25  using PixelCalibrator = Acts::Delegate<
26  std::pair<PixelPos, PixelCov>(const Acts::GeometryContext&,
27  const Acts::CalibrationContext&,
28  const xAOD::PixelCluster&,
29  const TrackStateProxy&)>;
30 
33  using StripCalibrator = Acts::Delegate<
34  std::pair<StripPos, StripCov>(const Acts::GeometryContext&,
35  const Acts::CalibrationContext&,
36  const xAOD::StripCluster&,
37  const TrackStateProxy&)>;
38 
41  using HGTDCalibrator = Acts::Delegate<
42  std::pair<HgtdPos, HgtdCov>(const Acts::GeometryContext&,
43  const Acts::CalibrationContext&,
44  const xAOD::HGTDCluster &,
45  const TrackStateProxy&)>;
46 
47 
51 
52  static OnTrackCalibrator
53  NoCalibration(const Acts::TrackingGeometry &trackingGeometry,
54  const ActsTrk::DetectorElementToActsGeometryIdMap &detectorElementToGeoId);
55 
56  OnTrackCalibrator(const Acts::TrackingGeometry &trackingGeometry,
57  const ActsTrk::DetectorElementToActsGeometryIdMap &detectorElementToGeoId,
58  const ToolHandle<IOnTrackCalibratorTool<traj_t>> &pixelTool,
59  const ToolHandle<IOnTrackCalibratorTool<traj_t>> &stripTool,
60  const ToolHandle<IOnTrackCalibratorTool<traj_t>> &hgtdTool);
61 
62  void calibrate(const Acts::GeometryContext& geoctx,
63  const Acts::CalibrationContext& cctx,
64  const Acts::SourceLink& link,
65  TrackStateProxy state) const;
66 
67 private:
68 
69  // Support the no-calibration case
70  template <std::size_t Dim, typename Cluster>
71  std::pair<xAOD::MeasVector<Dim>, xAOD::MeasMatrix<Dim>>
72  passthrough(const Acts::GeometryContext& gctx,
73  const Acts::CalibrationContext& /*cctx*/,
74  const Cluster& cluster,
75  const TrackStateProxy& state) const;
76 
77  // Helper to locate surfaces
78  const Acts::TrackingGeometry *m_trackingGeometry {nullptr};
80 };
81 
82 } // namespace ActsTrk
83 
85 
86 #endif
ActsTrk::detail::OnTrackCalibrator::passthrough
std::pair< xAOD::MeasVector< Dim >, xAOD::MeasMatrix< Dim > > passthrough(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &, const Cluster &cluster, const TrackStateProxy &state) const
StripCluster.h
ActsTrk::detail::OnTrackCalibrator::pixelCalibrator
PixelCalibrator pixelCalibrator
Definition: OnTrackCalibrator.h:48
ActsTrk::detail::OnTrackCalibrator::m_trackingGeometry
const Acts::TrackingGeometry * m_trackingGeometry
Definition: OnTrackCalibrator.h:78
ActsTrk::DetectorElementToActsGeometryIdMap
Definition: DetectorElementToActsGeometryIdMap.h:31
HGTDCluster.h
IOnTrackCalibratorTool.h
ActsTrk::detail::OnTrackCalibrator::HGTDCalibrator
Acts::Delegate< std::pair< HgtdPos, HgtdCov >(const Acts::GeometryContext &, const Acts::CalibrationContext &, const xAOD::HGTDCluster &, const TrackStateProxy &)> HGTDCalibrator
Definition: OnTrackCalibrator.h:45
ActsTrk::detail::OnTrackCalibrator::StripCalibrator
Acts::Delegate< std::pair< StripPos, StripCov >(const Acts::GeometryContext &, const Acts::CalibrationContext &, const xAOD::StripCluster &, const TrackStateProxy &)> StripCalibrator
Definition: OnTrackCalibrator.h:37
xAOD::HGTDCluster_v1
Definition: HGTDCluster_v1.h:23
ActsTrk::detail::OnTrackCalibrator::stripCalibrator
StripCalibrator stripCalibrator
Definition: OnTrackCalibrator.h:49
OnTrackCalibrator.icc
ActsTrk::detail::OnTrackCalibrator::PixelCalibrator
Acts::Delegate< std::pair< PixelPos, PixelCov >(const Acts::GeometryContext &, const Acts::CalibrationContext &, const xAOD::PixelCluster &, const TrackStateProxy &)> PixelCalibrator
Definition: OnTrackCalibrator.h:29
ActsTrk::detail::OnTrackCalibrator::calibrate
void calibrate(const Acts::GeometryContext &geoctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &link, TrackStateProxy state) const
PixelCluster.h
ActsTrk::IOnTrackCalibratorTool
Definition: IOnTrackCalibratorTool.h:18
MeasurementCalibratorBase.h
xAOD::StripCluster_v1
Definition: StripCluster_v1.h:17
ActsTrk::detail::OnTrackCalibrator::TrackStateProxy
typename Acts::MultiTrajectory< traj_t >::TrackStateProxy TrackStateProxy
Definition: OnTrackCalibrator.h:21
ActsTrk::detail::OnTrackCalibrator::HgtdCov
xAOD::MeasMatrix< 3 > HgtdCov
Definition: OnTrackCalibrator.h:40
ActsTrk::detail::OnTrackCalibrator::StripCov
xAOD::MeasMatrix< 1 > StripCov
Definition: OnTrackCalibrator.h:32
xAOD::MeasVector
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
Definition: MeasurementDefs.h:52
ActsTrk::detail::OnTrackCalibrator::m_detectorElementToGeoId
const ActsTrk::DetectorElementToActsGeometryIdMap * m_detectorElementToGeoId
Definition: OnTrackCalibrator.h:79
ActsTrk::detail::OnTrackCalibrator::HgtdPos
xAOD::MeasVector< 3 > HgtdPos
Definition: OnTrackCalibrator.h:39
ActsTrk::detail::OnTrackCalibrator::PixelCov
xAOD::MeasMatrix< 2 > PixelCov
Definition: OnTrackCalibrator.h:24
xAOD::PixelCluster_v1
Definition: PixelCluster_v1.h:17
xAOD::MeasMatrix
Eigen::Matrix< float, N, N > MeasMatrix
Definition: MeasurementDefs.h:54
ActsTrk::detail::OnTrackCalibrator
Definition: IOnTrackCalibratorTool.h:14
ActsTrk::detail::OnTrackCalibrator::StripPos
xAOD::MeasVector< 1 > StripPos
Definition: OnTrackCalibrator.h:31
ActsTrk::detail
Definition: Decoration.h:15
ActsTrk::detail::OnTrackCalibrator::OnTrackCalibrator
OnTrackCalibrator(const Acts::TrackingGeometry &trackingGeometry, const ActsTrk::DetectorElementToActsGeometryIdMap &detectorElementToGeoId, const ToolHandle< IOnTrackCalibratorTool< traj_t >> &pixelTool, const ToolHandle< IOnTrackCalibratorTool< traj_t >> &stripTool, const ToolHandle< IOnTrackCalibratorTool< traj_t >> &hgtdTool)
ActsTrk::detail::OnTrackCalibrator::PixelPos
xAOD::MeasVector< 2 > PixelPos
Definition: OnTrackCalibrator.h:23
ActsTrk::detail::OnTrackCalibrator::NoCalibration
static OnTrackCalibrator NoCalibration(const Acts::TrackingGeometry &trackingGeometry, const ActsTrk::DetectorElementToActsGeometryIdMap &detectorElementToGeoId)
DetectorElementToActsGeometryIdMap.h
ActsTrk::detail::OnTrackCalibrator::hgtdCalibrator
HGTDCalibrator hgtdCalibrator
Definition: OnTrackCalibrator.h:50