6#include "GeoModelKernel/throwExcept.h"
11 return std::holds_alternative<const xAOD::UncalibratedMeasurement*>(meas) ?
12 std::get<const xAOD::UncalibratedMeasurement*>(meas) :
nullptr;
23 const Acts::CalibrationContext& ,
24 const Acts::SourceLink& sl,
25 MutableTrackStateBackend::TrackStateProxy )
const {
30 const Acts::CalibrationContext& ,
31 const Acts::SourceLink& sl,
32 MutableTrackStateBackend::TrackStateProxy trackState)
const {
37 switch(pMeas->numDimensions()) {
39 setState<1>(pMeas->calibProjector(), pMeas->localPosition<1>(),
40 pMeas->localCovariance<1>(), sl, trackState);
43 setState<2>(pMeas->calibProjector(), pMeas->localPosition<2>(),
44 pMeas->localCovariance<2>(), sl, trackState);
47 setState<3>(pMeas->calibProjector(), pMeas->localPosition<3>(),
48 pMeas->localCovariance<3>(), sl, trackState);
56 const Acts::CalibrationContext & cctx,
57 const Acts::SourceLink& sl,
58 const MutableTrackStateBackend::TrackStateProxy trackState)
const {
63 delegate(gctx, cctx, sl, trackState);
std::variant< std::monostate, const xAOD::UncalibratedMeasurement *, const Trk::PrepRawData *, const Trk::MeasurementBase * > SourceLink_t
Encode the source links supported by the Calibrator class as a variant of the measurement class type ...
void setState(const ProjectorType projector, const pos_t &locpos, const cov_t &cov, Acts::SourceLink link, proxy_t &trackState) const
Copy the local position & covariance into the Acts track state proxy.
std::array< CalibDelegate, s_nMeasTypes > m_calibrators
Dispatch table of the calibrators per measurement type.
Acts::Experimental::Gx2FitterExtensions< MutableTrackStateBackend >::Calibrator CalibDelegate
Abrivation for the calibrator delegate.
void auxillaryCalibrator(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &sl, MutableTrackStateBackend::TrackStateProxy trackState) const
Delegate method for the Auxiliary measurements.
void calibrate(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &sl, const MutableTrackStateBackend::TrackStateProxy trackState) const
: Interface method for the Acts fitter to calibrate the trajectory track states from the source link ...
xAODUncalibMeasCalibrator()
Empty default constructor.
static const xAOD::UncalibratedMeasurement * unpack(const Acts::SourceLink &sl)
Helper method to unpack an Acts source link to an uncalibrated measurement.
void connect(const xAOD::UncalibMeasType type, const Type *instance)
Register a calibrator implementation instance for a given measurement type.
void invalidCalibrator(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &sl, MutableTrackStateBackend::TrackStateProxy trackState) const
Delegate method that's assigned during the construction phase of this class.
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Hash functions to pack the source link into unordered_maps / unordered_sets.
AuxiliaryMeasurement_v1 AuxiliaryMeasurement
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
UncalibMeasType
Define the type of the uncalibrated measurement.
#define THROW_EXCEPTION(MESSAGE)