2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
6 namespace ActsTrk::detail {
8 template <std::size_t Dim, typename trajectory_t, typename pos_t, typename cov_t>
9 inline void MeasurementCalibratorBase::setState(const ProjectorType projector,
10 const pos_t& locpos, const cov_t& cov,
11 Acts::SourceLink link,
12 TrackState_t<trajectory_t>& trackState) const {
13 static_assert(Dim>0 && Dim <= 3, "Wrong measurement dimension");
14 trackState.setUncalibratedSourceLink(std::move(link));
15 trackState.allocateCalibrated(Dim);
16 trackState.setProjectorSubspaceIndices(s_boundSpaceIndices[static_cast<int>(projector)]);
17 trackState.template calibrated<Dim>() = locpos.template cast<double>();
18 trackState.template calibratedCovariance<Dim>() = cov.template cast<double>();
20 } // namespace ActsTrk::detail