5 #ifndef MEASUREMENTCALIBRATOR2_H
6 #define MEASUREMENTCALIBRATOR2_H
14 #include "Acts/EventData/MultiTrajectory.hpp"
15 #include "Acts/EventData/TrackParameters.hpp"
16 #include "Acts/Geometry/GeometryIdentifier.hpp"
17 #include "Acts/Surfaces/Surface.hpp"
18 #include "Acts/Surfaces/SurfaceBounds.hpp"
19 #include "Acts/Definitions/TrackParametrization.hpp"
20 #include "Acts/Utilities/AlgebraHelpers.hpp"
36 template <std::
size_t N>
53 return ParameterMap<2>{
static_cast<unsigned char>(Acts::eBoundLoc0),
static_cast<unsigned char>(Acts::eBoundLoc1)};
58 unsigned char shift = (volume_id%2) ? 4 : 0;
59 unsigned char idx = volume_id/2;
64 unsigned char shift = (volume_id%2) ? 4 : 0;
65 unsigned char idx = volume_id/2;
73 std::vector<unsigned int> pixel_vol {16, 15, 9, 20, 19, 18, 10, 14, 13, 8};
74 for (
unsigned int vol_id : pixel_vol) {
77 std::vector<unsigned int> strip_vol {23, 22, 24};
78 for (
unsigned int vol_id : strip_vol) {
83 template <std::
size_t DIM>
85 [[maybe_unused]]
const Acts::CalibrationContext&,
86 const Acts::Surface &surface)
const {
88 if constexpr(DIM==2) {
92 else if constexpr(DIM==1) {
94 auto boundType = surface.bounds().type();
95 const std::size_t projector_idx = boundType == Acts::SurfaceBounds::eAnnulus;
99 throw std::runtime_error(
"Unsupported dimension");
113 std::pair<PixelPos, PixelCov>(
const Acts::GeometryContext&,
114 const Acts::CalibrationContext&,
116 const Acts::BoundTrackParameters &)>;
121 std::pair<StripPos, StripCov>(
const Acts::GeometryContext&,
122 const Acts::CalibrationContext&,
124 const Acts::BoundTrackParameters &)>;
134 bool calibrate_after_measurement_selection =
true;
139 if (calibrate_after_measurement_selection) {
140 pixel_preCalibrator.template connect<&MeasurementCalibrator2::passthrough<2, xAOD::PixelCluster>>(
this);
142 strip_preCalibrator.template connect<&MeasurementCalibrator2::passthrough<1, xAOD::StripCluster>>(
this);
151 template <std::
size_t Dim,
typename Cluster>
154 [[maybe_unused]]
const Acts::CalibrationContext& cctx,
155 const Cluster &cluster,
156 const Acts::BoundTrackParameters &)
const
158 return std::make_pair(cluster.template localPosition<Dim>(),
159 cluster.template localCovariance<Dim>());