ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::detail::TrkMeasurementCalibrator Class Reference

Calibrator class that links the legacy Trk::MeasurementBase objects with the Acts MultiTrajectory track state proxies without applying any further calibrating the measurement. More...

#include <TrkMeasurementCalibrator.h>

Inheritance diagram for ActsTrk::detail::TrkMeasurementCalibrator:
Collaboration diagram for ActsTrk::detail::TrkMeasurementCalibrator:

Public Types

enum class  ProjectorType {
  e1DimNoTime = 0 , e1DimRotNoTime = 1 , e2DimNoTime = 2 , e1DimWithTime = 3 ,
  e1DimRotWithTime = 4 , e2DimWithTime = 5
}
 Enum encoding the possible projectors used in ATLAS. More...
using SourceLink_t
 Encode the source links supported by the Calibrator class as a variant of the measurement class type pointer used within Athena.

Public Member Functions

 TrkMeasurementCalibrator ()=default
 Default constructor.
template<Acts::TrackStateProxyConcept proxy_t>
void calibrate (const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &sl, proxy_t trackState) const
 Calibrator delegate implementation to calibrate the ActsTrk fit from Trk::MeasurementBase objects.
template<std::size_t Dim, Acts::TrackStateProxyConcept proxy_t, typename pos_t, typename cov_t>
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.

Static Public Member Functions

static const Trk::MeasurementBaseunpack (const Acts::SourceLink &sl)
 Unpacks the Acts::SourceLink to a Trk measurement.
static SourceLinkType getType (const Acts::SourceLink &sl)
 Returns the enumeration corresponding to the object type cached within the Acts::SourceLink.
static SourceLink_t unpackBase (const Acts::SourceLink &sl)
 Unpack the SourceLink_t from the passed Acts source link.
template<Acts::PointerConcept Ptr_t>
static Acts::SourceLink pack (const Ptr_t &measurement)
 Pack the measurement type pointer to an Acts::SourceLink including the intermediate conversion into a SourceLink_t.
template<Acts::PointerConcept Ptr_t>
static void pack (const std::vector< Ptr_t > &measList, std::vector< Acts::SourceLink > &targetSL)
 Converts a vector measurement pointers to Acts::SourceLinks.

Protected Member Functions

template<std::size_t Dim, Acts::TrackStateProxyConcept proxy_t>
void prepareCalibratedState (const ProjectorType projector, Acts::SourceLink link, proxy_t &trackState) const
 Queries the track proxy to allocate memory for the incoming calibration object.

Static Private Attributes

static constexpr std::array< Acts::BoundSubspaceIndices, 6 > s_boundSpaceIndices
 Array to map the Projector types to the bound index configurations used by the ATLAS detector measurements.

Detailed Description

Calibrator class that links the legacy Trk::MeasurementBase objects with the Acts MultiTrajectory track state proxies without applying any further calibrating the measurement.

Definition at line 18 of file TrkMeasurementCalibrator.h.

Member Typedef Documentation

◆ SourceLink_t

Initial value:
std::variant<std::monostate,
This class is the pure abstract base class for all fittable tracking measurements.
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.

Encode the source links supported by the Calibrator class as a variant of the measurement class type pointer used within Athena.

The std::monostate is used to encode nullptrs or not yet supported types

Definition at line 53 of file MeasurementCalibratorBase.h.

Member Enumeration Documentation

◆ ProjectorType

Enum encoding the possible projectors used in ATLAS.

Their integer representations correspond to the element index in the s_boundSpaceIndices member

Enumerator
e1DimNoTime 
e1DimRotNoTime 

Project out solely the locX (Applies to Itk strips, Rpc, Tgc, sTgc, Mm).

e2DimNoTime 

Project out solely the locY - Complementary projector if the strip plane is rotated (Applies to Itk endcap strips, Rpc, Tgc, sTgc).

e1DimWithTime 

Project out the two spatial coordinates - (Applies to ITk pixel, BI-Rpc, sTgc pad).

e1DimRotWithTime 

Project out the locX & time coordinate - (Applies to Rpc, Tgc, Mm, sTgc).

e2DimWithTime 

Project out the locY & time coordinate - (Applies to Rpc, Tgc, sTgc).

Definition at line 41 of file MeasurementCalibratorBase.h.

41 {
42 e1DimNoTime = 0,
43 e1DimRotNoTime = 1,
45 e2DimNoTime = 2,
46 e1DimWithTime = 3,
47 e1DimRotWithTime = 4,
48 e2DimWithTime = 5,
49 };

Constructor & Destructor Documentation

◆ TrkMeasurementCalibrator()

ActsTrk::detail::TrkMeasurementCalibrator::TrkMeasurementCalibrator ( )
default

Default constructor.

Member Function Documentation

◆ calibrate()

template<Acts::TrackStateProxyConcept proxy_t>
void ActsTrk::detail::TrkMeasurementCalibrator::calibrate ( const Acts::GeometryContext & gctx,
const Acts::CalibrationContext & cctx,
const Acts::SourceLink & sl,
proxy_t trackState ) const

Calibrator delegate implementation to calibrate the ActsTrk fit from Trk::MeasurementBase objects.

Template Parameters
trajectory_tTepmlate parameter of the underlying MultTrajectory container backend
Parameters
gctxGeometry context to access the alignment of the surface
cctxCalibration context to access the calibration constants from the conditions store
slReference to the packed SourceLink
trackStateReference to the multi trajectory track state to fill

◆ getType()

SourceLinkType ActsTrk::detail::MeasurementCalibratorBase::getType ( const Acts::SourceLink & sl)
staticinherited

Returns the enumeration corresponding to the object type cached within the Acts::SourceLink.

The SourceLink must have been created by a MeasurementCalibrator to ensure that the underlying variant is cached. If the variant is a monostate, nTypes is returned

Parameters
slReference to the source link to unpack.

◆ pack() [1/2]

template<Acts::PointerConcept Ptr_t>
Acts::SourceLink ActsTrk::detail::MeasurementCalibratorBase::pack ( const Ptr_t & measurement)
staticinherited

Pack the measurement type pointer to an Acts::SourceLink including the intermediate conversion into a SourceLink_t.

Nullptrs are converted to a std::monostate.

Parameters
measurementPointer to the measurement to transform into a SourceLInk

◆ pack() [2/2]

template<Acts::PointerConcept Ptr_t>
void ActsTrk::detail::MeasurementCalibratorBase::pack ( const std::vector< Ptr_t > & measList,
std::vector< Acts::SourceLink > & targetSL )
staticinherited

Converts a vector measurement pointers to Acts::SourceLinks.

Parameters
measListThe list of measurement pointers for conversion
targetSLThe allocated SourceLink vectors to which the Acts::SourceLink objects are appended.

◆ prepareCalibratedState()

template<std::size_t Dim, Acts::TrackStateProxyConcept proxy_t>
void ActsTrk::detail::MeasurementCalibratorBase::prepareCalibratedState ( const ProjectorType projector,
Acts::SourceLink link,
proxy_t & trackState ) const
protectedinherited

Queries the track proxy to allocate memory for the incoming calibration object.

Defines the projector indices and allocates the source link to the state

Parameters
projectorProjector configuration of the measurement
linkSource link to associate with the state
trackStateRefrence to the track state proxy to write.

◆ setState()

template<std::size_t Dim, Acts::TrackStateProxyConcept proxy_t, typename pos_t, typename cov_t>
void ActsTrk::detail::MeasurementCalibratorBase::setState ( const ProjectorType projector,
const pos_t & locpos,
const cov_t & cov,
Acts::SourceLink link,
proxy_t & trackState ) const
inherited

Copy the local position & covariance into the Acts track state proxy.

Template Parameters
DimDimension of the measurement
trajectory_tData type of the track state proxy backend
pos_tData type of the [Dim x 1] position vector
cov_tData type of the [Dim x Dim] covariance matrix
Parameters
projectorProjector configuration of the measurement
locposCalibrated local postion
covCalibrated local covariance
linkSource link to associate with the state
trackStateRefrence to the track state proxy to write.

◆ unpack()

const Trk::MeasurementBase * ActsTrk::detail::TrkMeasurementCalibrator::unpack ( const Acts::SourceLink & sl)
static

Unpacks the Acts::SourceLink to a Trk measurement.

Definition at line 8 of file TrkMeasurementCalibrator.cxx.

8 {
9 const SourceLink_t& meas = sl.template get<SourceLink_t>();
10 return std::holds_alternative<const Trk::MeasurementBase*>(meas) ?
11 std::get<const Trk::MeasurementBase*>(meas) : nullptr;
12 }
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 ...
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:132

◆ unpackBase()

SourceLink_t ActsTrk::detail::MeasurementCalibratorBase::unpackBase ( const Acts::SourceLink & sl)
staticinherited

Unpack the SourceLink_t from the passed Acts source link.

Parameters
slReference to the source link to unpack.

Member Data Documentation

◆ s_boundSpaceIndices

std::array<Acts::BoundSubspaceIndices, 6> ActsTrk::detail::MeasurementCalibratorBase::s_boundSpaceIndices
staticconstexprprivateinherited
Initial value:
{
Acts::BoundSubspaceIndices{Acts::eBoundLoc0},
Acts::BoundSubspaceIndices{Acts::eBoundLoc1},
Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundLoc1},
Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundTime},
Acts::BoundSubspaceIndices{Acts::eBoundLoc1, Acts::eBoundTime},
Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundTime}
}

Array to map the Projector types to the bound index configurations used by the ATLAS detector measurements.

Definition at line 115 of file MeasurementCalibratorBase.h.

115 {
116 Acts::BoundSubspaceIndices{Acts::eBoundLoc0}, // One dimenion without time
117 Acts::BoundSubspaceIndices{Acts::eBoundLoc1}, // Complementary one dimension without time
118 Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundLoc1},
119 Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundTime}, // One dimension with time
120 Acts::BoundSubspaceIndices{Acts::eBoundLoc1, Acts::eBoundTime}, // Complementary one dimension with time
121 Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundTime}
122 };

The documentation for this class was generated from the following files: