5 #ifndef MEASUREMENTCALIBRATOR2_H
6 #define MEASUREMENTCALIBRATOR2_H
8 #include "Acts/EventData/Types.hpp"
16 #include "Acts/EventData/MultiTrajectory.hpp"
17 #include "Acts/EventData/TrackParameters.hpp"
18 #include "Acts/Geometry/GeometryIdentifier.hpp"
19 #include "Acts/Surfaces/Surface.hpp"
20 #include "Acts/Surfaces/SurfaceBounds.hpp"
21 #include "Acts/Definitions/TrackParametrization.hpp"
22 #include "Acts/Utilities/AlgebraHelpers.hpp"
38 unsigned char shift = (volume_id%2) ? 4 : 0;
39 unsigned char idx = volume_id/2;
44 unsigned char shift = (volume_id%2) ? 4 : 0;
45 unsigned char idx = volume_id/2;
50 std::vector<unsigned int> pixel_vol {16, 15, 9, 20, 19, 18, 10, 14, 13, 8};
51 for (
unsigned int vol_id : pixel_vol) {
54 std::vector<unsigned int> strip_vol {23, 22, 24};
55 for (
unsigned int vol_id : strip_vol) {
58 std::vector<unsigned int> hgtd_vol {2, 25};
59 for (
unsigned int vol_id : hgtd_vol) {
64 template <std::
size_t DIM>
65 Acts::SubspaceIndices<DIM>
parameterMap([[maybe_unused]]
const Acts::GeometryContext&,
66 [[maybe_unused]]
const Acts::CalibrationContext&,
67 const Acts::Surface &surface)
const {
69 if constexpr(DIM==3) {
73 else if constexpr(DIM==2) {
77 else if constexpr(DIM==1) {
79 auto boundType = surface.bounds().type();
80 const std::size_t projector_idx = boundType == Acts::SurfaceBounds::eAnnulus;
84 throw std::runtime_error(
"Unsupported dimension");
94 Acts::eBoundLoc0, Acts::eBoundLoc1
97 Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundTime
106 std::pair<PixelPos, PixelCov>(
const Acts::GeometryContext&,
107 const Acts::CalibrationContext&,
109 const Acts::BoundTrackParameters &)>;
114 std::pair<StripPos, StripCov>(
const Acts::GeometryContext&,
115 const Acts::CalibrationContext&,
117 const Acts::BoundTrackParameters &)>;
121 std::pair<hgtdPos, hgtdCov>(
const Acts::GeometryContext&,
122 const Acts::CalibrationContext&,
124 const Acts::BoundTrackParameters &)>;
137 bool calibrate_after_measurement_selection =
true;
142 if (calibrate_after_measurement_selection) {
143 pixel_preCalibrator.template connect<&MeasurementCalibrator2::passthrough<2, xAOD::PixelCluster>>(
this);
145 strip_preCalibrator.template connect<&MeasurementCalibrator2::passthrough<1, xAOD::StripCluster>>(
this);
146 hgtd_preCalibrator.template connect<&MeasurementCalibrator2::passthrough<3, xAOD::HGTDCluster>>(
this);
157 template <std::
size_t Dim,
typename Cluster>
160 [[maybe_unused]]
const Acts::CalibrationContext& cctx,
161 const Cluster &cluster,
162 const Acts::BoundTrackParameters &)
const
164 return std::make_pair(cluster.template localPosition<Dim>(),
165 cluster.template localCovariance<Dim>());