ATLAS Offline Software
Loading...
Searching...
No Matches
RefittingCalibrator.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include "Acts/Definitions/Algebra.hpp"
8#include "Acts/EventData/MeasurementHelpers.hpp"
9#include "Acts/EventData/SourceLink.hpp"
10#include "Acts/Utilities/CalibrationContext.hpp"
11
12namespace ActsTrk::detail {
13
14void RefittingCalibrator::calibrate(const Acts::GeometryContext& /*gctx*/,
15 const Acts::CalibrationContext& /*cctx*/,
16 const Acts::SourceLink& sourceLink,
17 MutableTrackStateProxy trackState) const {
18 const auto& sl = sourceLink.get<RefittingSourceLink>();
19
20 // Reset the original uncalibrated source link on this track state
21 trackState.setUncalibratedSourceLink(sl.state.getUncalibratedSourceLink());
22
23 // Here we construct a measurement by extracting the information available
24 // in the state
25 Acts::visit_measurement(sl.state.calibratedSize(), [&](auto N) {
26 constexpr int Size = decltype(N)::value;
27
28 trackState.allocateCalibrated(
29 sl.state.template calibrated<Size>().eval(),
30 sl.state.template calibratedCovariance<Size>().eval());
31 });
32
33 if (!sl.state.projectorSubspaceIndices().empty()) {
34 trackState.setProjectorSubspaceIndices(sl.state.projectorSubspaceIndices());
35 }
36}
37
38} // namespace ActsTrk::detail
ActsTrk::MutableTrackStateBackend::TrackStateProxy MutableTrackStateProxy
void calibrate(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &sourceLink, MutableTrackStateProxy trackState) const
Athena definition of the Eigen plugin.