59 const Acts::CalibrationContext& ,
60 const Acts::SourceLink& genericSourceLink ,
61 typename traj_t::TrackStateProxy trackState)
const {
64 assert(m_measurements and
65 "Undefined measurement container in LdmxMeasurementCalibrator");
66 assert((sourceLink.index() < m_measurements->size()) and
67 "Source link index is outside the container bounds in "
68 "LdmxMeasurementCalibrator");
70 auto meas = m_measurements->at(sourceLink.index());
71 Acts::Vector2 local_pos{meas.getLocalPosition()[0],
72 meas.getLocalPosition()[1]};
73 auto tsCal{trackState.template calibrated<2>()};
74 auto tsCalCov{trackState.template calibratedCovariance<2>()};
76 tsCal.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 tsCalCov.block(0, 0, 2, 2) = local_cov;
85 Acts::ActsMatrix<2, 6> projector;
90 trackState.setProjector(projector);
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((sourceLink.index() < m_measurements->size()) and
110 "Source link index is outside the container bounds in "
111 "LdmxMeasurementCalibrator");
113 auto meas = m_measurements->at(sourceLink.index());
115 trackState.allocateCalibrated(1);
116 auto tsCal{trackState.template calibrated<1>()};
117 auto tsCalCov{trackState.template calibratedCovariance<1>()};
120 tsCal(0) = (meas.getLocalPosition())[0];
122 tsCalCov(0, 0) = (meas.getLocalCovariance())[0];
124 Acts::ActsMatrix<2, 6> projector;
126 projector(0, 0) = 1.;
127 projector(1, 1) = 1.;
128 trackState.setProjector(projector.row(0));
129 trackState.setUncalibratedSourceLink(genericSourceLink);