ATLAS Offline Software
ActsCalibration/ActsCalibBase/ActsCalibBase/MeasurementCalibratorBase.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <format>
6 namespace ActsTrk::detail {
7 
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>();
19  }
20 } // namespace ActsTrk::detail
21