58 const Acts::CalibrationContext& ,
59 const Acts::SourceLink& genericSourceLink ,
60 typename traj_t::TrackStateProxy trackState)
const {
63 assert(m_measurements_ and
64 "Undefined measurement container in LdmxMeasurementCalibrator");
65 assert((source_link.index() < m_measurements_->size()) and
66 "Source link index is outside the container bounds in "
67 "LdmxMeasurementCalibrator");
69 auto meas = m_measurements_->at(source_link.index());
70 Acts::Vector2 local_pos{meas.getLocalPosition()[0],
71 meas.getLocalPosition()[1]};
72 trackState.allocateCalibrated(2);
73 auto ts_cal{trackState.template calibrated<2>()};
74 auto ts_cal_cov{trackState.template calibratedCovariance<2>()};
76 ts_cal.template head<2>() = local_pos;
77 Acts::SquareMatrix2 local_cov;
79 local_cov(0, 0) = meas.getLocalCovariance()[0];
80 local_cov(1, 1) = meas.getLocalCovariance()[1];
83 ts_cal_cov.block(0, 0, 2, 2) = local_cov;
85 trackState.setProjectorSubspaceIndices(
86 std::array<Acts::BoundIndices, 2>{Acts::eBoundLoc0, Acts::eBoundLoc1});
87 trackState.setUncalibratedSourceLink(Acts::SourceLink{genericSourceLink});
98 const Acts::CalibrationContext& ,
99 const Acts::SourceLink& genericSourceLink ,
100 typename traj_t::TrackStateProxy trackState)
const {
104 assert(m_measurements_ and
105 "Undefined measurement container in LdmxMeasurementCalibrator");
106 assert((source_link.index() < m_measurements_->size()) and
107 "Source link index is outside the container bounds in "
108 "LdmxMeasurementCalibrator");
110 auto meas = m_measurements_->at(source_link.index());
112 trackState.allocateCalibrated(1);
113 auto ts_cal{trackState.template calibrated<1>()};
114 auto ts_cal_cov{trackState.template calibratedCovariance<1>()};
117 ts_cal(0) = (meas.getLocalPosition())[0];
118 ts_cal_cov.setZero();
119 ts_cal_cov(0, 0) = (meas.getLocalCovariance())[0];
121 trackState.setProjectorSubspaceIndices(
122 std::array<Acts::BoundIndices, 1>{Acts::eBoundLoc0});
123 trackState.setUncalibratedSourceLink(Acts::SourceLink{genericSourceLink});