2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 #include "ActsGeometry/ATLASSourceLink.h"
7 namespace ActsTrk::detail {
9 // internal class implementation
10 template <std::size_t DIM>
11 inline const Trk::LocalParameters& TrkMeasurementCalibrator::MeasurementAdapter::localPosition() const
13 assert( m_measurement and DIM == m_measurement->localParameters().dimension());
14 return m_measurement->localParameters();
17 template <std::size_t DIM>
18 inline const Amg::MatrixX& TrkMeasurementCalibrator::MeasurementAdapter::localCovariance() const
20 assert( m_measurement and DIM == m_measurement->localParameters().dimension());
21 return m_measurement->localCovariance();
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
31 auto sourceLink = sl.template get<ATLASSourceLink>();
32 trackState.setUncalibratedSourceLink(Acts::SourceLink{sl});
34 const Acts::Surface &surface = m_converterTool->trkSurfaceToActsSurface(sourceLink->associatedSurface());
35 setStateFromMeasurement<MeasurementAdapter, trajectory_t>(MeasurementAdapter(*sourceLink),
36 surface.bounds().type(),
40 } // namespace ActsTrk::detail