61 const Acts::CalibrationContext& ,
62 const Acts::SourceLink& genericSourceLink ,
63 typename traj_t::TrackStateProxy trackState)
const {
66 assert(m_measurements_ and
67 "Undefined measurement container in LdmxMeasurementCalibrator");
68 assert((source_link.index() < m_measurements_->size()) and
69 "Source link index is outside the container bounds in "
70 "LdmxMeasurementCalibrator");
72 auto meas = m_measurements_->at(source_link.index());
73 Acts::Vector2 local_pos{meas.getLocalPosition()[0],
74 meas.getLocalPosition()[1]};
75 trackState.allocateCalibrated(2);
76 auto ts_cal{trackState.template calibrated<2>()};
77 auto ts_cal_cov{trackState.template calibratedCovariance<2>()};
79 ts_cal.template head<2>() = local_pos;
80 Acts::SquareMatrix2 local_cov;
82 local_cov(0, 0) = meas.getLocalCovariance()[0];
83 local_cov(1, 1) = meas.getLocalCovariance()[1];
86 ts_cal_cov.block(0, 0, 2, 2) = local_cov;
88 trackState.setProjectorSubspaceIndices(
89 std::array<Acts::BoundIndices, 2>{Acts::eBoundLoc0, Acts::eBoundLoc1});
90 trackState.setUncalibratedSourceLink(Acts::SourceLink{genericSourceLink});
101 const Acts::CalibrationContext& ,
102 const Acts::SourceLink& genericSourceLink ,
103 typename traj_t::TrackStateProxy trackState)
const {
107 assert(m_measurements_ and
108 "Undefined measurement container in LdmxMeasurementCalibrator");
109 assert((source_link.index() < m_measurements_->size()) and
110 "Source link index is outside the container bounds in "
111 "LdmxMeasurementCalibrator");
113 auto meas = m_measurements_->at(source_link.index());
115 trackState.allocateCalibrated(1);
116 auto ts_cal{trackState.template calibrated<1>()};
117 auto ts_cal_cov{trackState.template calibratedCovariance<1>()};
120 ts_cal(0) = (meas.getLocalPosition())[0];
121 ts_cal_cov.setZero();
122 ts_cal_cov(0, 0) = (meas.getLocalCovariance())[0];
124 trackState.setProjectorSubspaceIndices(
125 std::array<Acts::BoundIndices, 1>{Acts::eBoundLoc0});
126 trackState.setUncalibratedSourceLink(Acts::SourceLink{genericSourceLink});