ATLAS Offline Software
TrkMeasurementCalibrator.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "ActsGeometry/ATLASSourceLink.h"
6 
7 namespace ActsTrk::detail {
8 
9  // internal class implementation
10  template <std::size_t DIM>
11  inline const Trk::LocalParameters& TrkMeasurementCalibrator::MeasurementAdapter::localPosition() const
12  {
13  assert( m_measurement and DIM == m_measurement->localParameters().dimension());
14  return m_measurement->localParameters();
15  }
16 
17  template <std::size_t DIM>
18  inline const Amg::MatrixX& TrkMeasurementCalibrator::MeasurementAdapter::localCovariance() const
19  {
20  assert( m_measurement and DIM == m_measurement->localParameters().dimension());
21  return m_measurement->localCovariance();
22  }
23 
24  // class implementation
25  template <typename trajectory_t>
26  void TrkMeasurementCalibrator::calibrate([[maybe_unused]] const Acts::GeometryContext& gctx,
27  [[maybe_unused]] const Acts::CalibrationContext& cctx,
28  const Acts::SourceLink& sl,
29  typename Acts::MultiTrajectory<trajectory_t>::TrackStateProxy trackState) const
30  {
31  auto sourceLink = sl.template get<ATLASSourceLink>();
32  trackState.setUncalibratedSourceLink(Acts::SourceLink{sl});
33  assert(sourceLink);
34  const Acts::Surface &surface = m_converterTool->trkSurfaceToActsSurface(sourceLink->associatedSurface());
35  setStateFromMeasurement<MeasurementAdapter, trajectory_t>(MeasurementAdapter(*sourceLink),
36  surface.bounds().type(),
37  trackState);
38  }
39 
40 } // namespace ActsTrk::detail
41