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 &)>;
138 if (pixelCalibratorTool) {
142 if (calibrate_after_measurement_selection)
143 pixel_preCalibrator.template connect<&MeasurementCalibrator::passthrough<2, xAOD::PixelCluster>>(
this);
145 pixel_preCalibrator.template connect<&MeasurementCalibrator::passthrough<2, xAOD::PixelCluster>>(
this);
147 if (stripCalibratorTool) {
151 if (calibrate_after_measurement_selection)
152 strip_preCalibrator.template connect<&MeasurementCalibrator::passthrough<1, xAOD::StripCluster>>(
this);
154 strip_preCalibrator.template connect<&MeasurementCalibrator::passthrough<1, xAOD::StripCluster>>(
this);
157 if (hgtdCalibratorTool) {
161 if(calibrate_after_measurement_selection)
162 hgtd_preCalibrator.template connect<&MeasurementCalibrator::passthrough<3, xAOD::HGTDCluster>>(
this);
164 hgtd_preCalibrator.template connect<&MeasurementCalibrator::passthrough<3, xAOD::HGTDCluster>>(
this);
176 template <std::
size_t Dim,
typename Cluster>
179 [[maybe_unused]]
const Acts::CalibrationContext& cctx,
180 const Cluster &cluster,
181 const Acts::BoundTrackParameters &)
const
183 return std::make_pair(cluster.template localPosition<Dim>(),
184 cluster.template localCovariance<Dim>());
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
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.
UncalibMeasType
Define the type of the uncalibrated measurement.
HGTDCluster_v1 HGTDCluster
Define the version of the pixel cluster class.
const StripCalibrator & stripPostCalibrator() const
xAOD::MeasVector< 3 > hgtdPos
xAOD::MeasMatrix< 1 > StripCov
Acts::Delegate< std::pair< StripPos, StripCov >(const Acts::GeometryContext &, const Acts::CalibrationContext &, const xAOD::StripCluster &, const Acts::BoundTrackParameters &)> StripCalibrator
HGTDCalibrator hgtd_preCalibrator
Acts::Delegate< std::pair< hgtdPos, hgtdCov >(const Acts::GeometryContext &, const Acts::CalibrationContext &, const xAOD::HGTDCluster &, const Acts::BoundTrackParameters &)> HGTDCalibrator
const PixelCalibrator & pixelPreCalibrator() const
const StripCalibrator & stripPreCalibrator() const
const PixelCalibrator & pixelPostCalibrator() const
MeasurementCalibrator(const IOnBoundStateCalibratorTool *pixelCalibratorTool, const IOnBoundStateCalibratorTool *stripCalibratorTool, const IOnBoundStateCalibratorTool *hgtdCalibratorTool)
std::pair< xAOD::MeasVector< Dim >, xAOD::MeasMatrix< Dim > > passthrough(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Cluster &cluster, const Acts::BoundTrackParameters &) const
const HGTDCalibrator & hgtdPreCalibrator() const
PixelCalibrator pixel_preCalibrator
xAOD::MeasMatrix< 3 > hgtdCov
StripCalibrator strip_preCalibrator
xAOD::MeasMatrix< 2 > PixelCov
xAOD::MeasVector< 2 > PixelPos
xAOD::MeasVector< 1 > StripPos
StripCalibrator strip_postCalibrator
Acts::Delegate< std::pair< PixelPos, PixelCov >(const Acts::GeometryContext &, const Acts::CalibrationContext &, const xAOD::PixelCluster &, const Acts::BoundTrackParameters &)> PixelCalibrator
const HGTDCalibrator & hgtdPostCalibrator() const
PixelCalibrator pixel_postCalibrator
HGTDCalibrator hgtd_postCalibrator
void setMeasurementTypeForVolumeId(unsigned int volume_id, xAOD::UncalibMeasType type)
static constexpr Acts::SubspaceIndices< 2 > s_pixelSubspaceIndices
static constexpr std::array< Acts::SubspaceIndices< 1 >, 2 > s_stripSubspaceIndices
Acts::SubspaceIndices< DIM > parameterMap(const Acts::GeometryContext &, const Acts::CalibrationContext &, const Acts::Surface &surface) const
std::array< unsigned char, 128 > m_volumeIdToMeasurementType
static constexpr Acts::SubspaceIndices< 3 > s_hgtdSubspaceIndices
xAOD::UncalibMeasType measurementTypeFromVolumeId(unsigned int volume_id) const
MeasurementParameterMap()