ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | List of all members
CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t > Struct Template Reference

#include <CalibratorRegistry.h>

Collaboration diagram for CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >:

Classes

struct  CalibratorType
 

Public Types

template<std::size_t DIM>
using Measurement = typename MeasurementTypeTraits::template Measurement< DIM >
 
template<std::size_t DIM>
using MeasurementCovariance = typename MeasurementTypeTraits::template MeasurementCovariance< DIM >
 
template<std::size_t DIM, typename measurement_t >
using Calibrator = Acts::Delegate< std::pair< Measurement< DIM >, MeasurementCovariance< DIM > >(const Acts::GeometryContext &, const Acts::CalibrationContext &, const measurement_t &, const bound_track_parameters_t &)>
 

Public Member Functions

template<std::size_t DIM, typename T_ValueType >
const Calibrator< DIM, T_ValueType > & calibrator () const
 
template<std::size_t DIM, typename T_ValueType >
void setCalibrator (const Calibrator< DIM, T_ValueType > &calibrator)
 
template<std::size_t DiM, typename T_ValueType >
void setCalibrator (const Calibrator< DiM, T_ValueType > &calibrator)
 
template<std::size_t DIM, typename T_ValueType >
const CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >::template Calibrator< DIM, T_ValueType > & calibrator () const
 

Private Types

using CalibratorVariant = ActsTrk::detail::MakeDerivedVariant::MakeVariant< CalibratorType, measurement_container_variant_t >::variant_type
 

Static Private Member Functions

template<std::size_t DIM, typename T_ValueType , std::size_t N>
static const CalibratorVariantgetCalibratorGeneric (const std::array< CalibratorVariant, std::variant_size_v< measurement_container_variant_t > > &calibrator_arr)
 

Private Attributes

std::array< CalibratorVariant, std::variant_size_v< measurement_container_variant_t > > m_calibrators
 

Detailed Description

template<typename MeasurementTypeTraits, typename bound_track_parameters_t, typename measurement_container_variant_t>
struct CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >

Definition at line 16 of file CalibratorRegistry.h.

Member Typedef Documentation

◆ Calibrator

template<typename MeasurementTypeTraits , typename bound_track_parameters_t , typename measurement_container_variant_t >
template<std::size_t DIM, typename measurement_t >
using CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >::Calibrator = Acts::Delegate< std::pair<Measurement<DIM>,MeasurementCovariance<DIM> > (const Acts::GeometryContext&, const Acts::CalibrationContext&, const measurement_t &, const bound_track_parameters_t &)>

Definition at line 23 of file CalibratorRegistry.h.

◆ CalibratorVariant

template<typename MeasurementTypeTraits , typename bound_track_parameters_t , typename measurement_container_variant_t >
using CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >::CalibratorVariant = ActsTrk::detail::MakeDerivedVariant::MakeVariant< CalibratorType, measurement_container_variant_t >::variant_type
private

Definition at line 57 of file CalibratorRegistry.h.

◆ Measurement

template<typename MeasurementTypeTraits , typename bound_track_parameters_t , typename measurement_container_variant_t >
template<std::size_t DIM>
using CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >::Measurement = typename MeasurementTypeTraits::template Measurement<DIM>

Definition at line 18 of file CalibratorRegistry.h.

◆ MeasurementCovariance

template<typename MeasurementTypeTraits , typename bound_track_parameters_t , typename measurement_container_variant_t >
template<std::size_t DIM>
using CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >::MeasurementCovariance = typename MeasurementTypeTraits::template MeasurementCovariance<DIM>

Definition at line 20 of file CalibratorRegistry.h.

Member Function Documentation

◆ calibrator() [1/2]

template<typename MeasurementTypeTraits , typename bound_track_parameters_t , typename measurement_container_variant_t >
template<std::size_t DIM, typename T_ValueType >
const Calibrator<DIM, T_ValueType>& CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >::calibrator ( ) const

◆ calibrator() [2/2]

template<typename MeasurementTypeTraits , typename bound_track_parameters_t , typename measurement_container_variant_t >
template<std::size_t DIM, typename T_ValueType >
const CalibratorRegistry<MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t>::template Calibrator<DIM, T_ValueType>& CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >::calibrator ( ) const
inline

Definition at line 106 of file CalibratorRegistry.h.

106  {
107  const CalibratorVariant &universal = getCalibratorGeneric< DIM, T_ValueType,std::variant_size_v<measurement_container_variant_t> >(m_calibrators);
108  return std::get<Calibrator<DIM, T_ValueType> >(universal);
109 }

◆ getCalibratorGeneric()

template<typename MeasurementTypeTraits , typename bound_track_parameters_t , typename measurement_container_variant_t >
template<std::size_t DIM, typename T_ValueType , std::size_t N>
const CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >::CalibratorVariant & CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >::getCalibratorGeneric ( const std::array< CalibratorVariant, std::variant_size_v< measurement_container_variant_t > > &  calibrator_arr)
inlinestaticprivate

Definition at line 73 of file CalibratorRegistry.h.

73  {
74  if constexpr(N==1) {
75  return calibrator_arr[0];
76  }
77  else {
78  using Container = std::remove_cv_t<std::remove_pointer_t<decltype( ActsTrk::detail::MakeDerivedVariant::lvalue(std::get<N-1>(measurement_container_variant_t{})))> >;
79  // Container should be ContainerWithDimension<T>, needed is ContainerWithDimension<T>::contaienr_type
80  using ElementType = typename MeasurementTypeTraits::template MeassurementContainerValueType<typename Container::container_type>;
81  using BaseElementType = typename std::remove_cv_t<std::remove_pointer_t< ElementType > >;
82  if constexpr(std::is_same<T_ValueType,BaseElementType>::value && Container::dimension() == DIM) {
83  return calibrator_arr[N-1];
84  }
85  else {
86  return getCalibratorGeneric<DIM, T_ValueType,N-1>(calibrator_arr);
87  }
88  }
89 }

◆ setCalibrator() [1/2]

template<typename MeasurementTypeTraits , typename bound_track_parameters_t , typename measurement_container_variant_t >
template<std::size_t DIM, typename T_ValueType >
void CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >::setCalibrator ( const Calibrator< DIM, T_ValueType > &  calibrator)

◆ setCalibrator() [2/2]

template<typename MeasurementTypeTraits , typename bound_track_parameters_t , typename measurement_container_variant_t >
template<std::size_t DiM, typename T_ValueType >
void CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >::setCalibrator ( const Calibrator< DiM, T_ValueType > &  calibrator)
inline

Definition at line 95 of file CalibratorRegistry.h.

95  {
96  CalibratorVariant universial { calibrator };
97  assert( universial.index() < m_calibrators.size() );
98  m_calibrators.at(universial.index()) = std::move( universial);
99 }

Member Data Documentation

◆ m_calibrators

template<typename MeasurementTypeTraits , typename bound_track_parameters_t , typename measurement_container_variant_t >
std::array< CalibratorVariant, std::variant_size_v<measurement_container_variant_t> > CalibratorRegistry< MeasurementTypeTraits, bound_track_parameters_t, measurement_container_variant_t >::m_calibrators
private

Definition at line 59 of file CalibratorRegistry.h.


The documentation for this struct was generated from the following file:
CalibratorRegistry::CalibratorVariant
ActsTrk::detail::MakeDerivedVariant::MakeVariant< CalibratorType, measurement_container_variant_t >::variant_type CalibratorVariant
Definition: CalibratorRegistry.h:57
taskman.template
dictionary template
Definition: taskman.py:317
athena.value
value
Definition: athena.py:124
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
Container
storage of the time histories of all the cells
CalibratorRegistry::m_calibrators
std::array< CalibratorVariant, std::variant_size_v< measurement_container_variant_t > > m_calibrators
Definition: CalibratorRegistry.h:59
CalibratorRegistry::getCalibratorGeneric
static const CalibratorVariant & getCalibratorGeneric(const std::array< CalibratorVariant, std::variant_size_v< measurement_container_variant_t > > &calibrator_arr)
Definition: CalibratorRegistry.h:73
CalibratorRegistry::calibrator
const Calibrator< DIM, T_ValueType > & calibrator() const