ATLAS Offline Software
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ActsTrk::MeasurementParameterMap Struct Reference

#include <MeasurementCalibrator2.h>

Collaboration diagram for ActsTrk::MeasurementParameterMap:

Public Member Functions

xAOD::UncalibMeasType measurementTypeFromVolumeId (unsigned int volume_id) const
 
void setMeasurementTypeForVolumeId (unsigned int volume_id, xAOD::UncalibMeasType type)
 
 MeasurementParameterMap ()
 
template<std::size_t DIM>
Acts::SubspaceIndices< DIM > parameterMap ([[maybe_unused]] const Acts::GeometryContext &, [[maybe_unused]] const Acts::CalibrationContext &, const Acts::Surface &surface) const
 

Public Attributes

std::array< unsigned char, 128 > m_volumeIdToMeasurementType {}
 

Static Public Attributes

constexpr static std::array< Acts::SubspaceIndices< 1 >, 2 > s_stripSubspaceIndices
 
constexpr static Acts::SubspaceIndices< 2 > s_pixelSubspaceIndices
 
constexpr static Acts::SubspaceIndices< 3 > s_hgtdSubspaceIndices
 

Detailed Description

Definition at line 34 of file MeasurementCalibrator2.h.

Constructor & Destructor Documentation

◆ MeasurementParameterMap()

ActsTrk::MeasurementParameterMap::MeasurementParameterMap ( )
inline

Definition at line 48 of file MeasurementCalibrator2.h.

48  {
49  // @TODO get mapping from converter tool ?
50  std::vector<unsigned int> pixel_vol {16, 15, 9, 20, 19, 18, 10, 14, 13, 8};
51  for (unsigned int vol_id : pixel_vol) {
53  }
54  std::vector<unsigned int> strip_vol {23, 22, 24};
55  for (unsigned int vol_id : strip_vol) {
57  }
58  std::vector<unsigned int> hgtd_vol {2, 25};
59  for (unsigned int vol_id : hgtd_vol) {
61  }
62  }

Member Function Documentation

◆ measurementTypeFromVolumeId()

xAOD::UncalibMeasType ActsTrk::MeasurementParameterMap::measurementTypeFromVolumeId ( unsigned int  volume_id) const
inline

Definition at line 37 of file MeasurementCalibrator2.h.

37  {
38  unsigned char shift = (volume_id%2) ? 4 : 0;
39  unsigned char idx = volume_id/2;
40  return static_cast<xAOD::UncalibMeasType>((m_volumeIdToMeasurementType[idx] >> shift) & 0xf);
41  }

◆ parameterMap()

template<std::size_t DIM>
Acts::SubspaceIndices<DIM> ActsTrk::MeasurementParameterMap::parameterMap ( [[maybe_unused] ] const Acts::GeometryContext &  ,
[[maybe_unused] ] const Acts::CalibrationContext &  ,
const Acts::Surface &  surface 
) const
inline

Definition at line 65 of file MeasurementCalibrator2.h.

67  {
68  // @TODO make interface measurement type aware ?
69  if constexpr(DIM==3) {
70  assert( measurementTypeFromVolumeId(surface.geometryId().volume()) == xAOD::UncalibMeasType::HGTDClusterType );
71  return s_hgtdSubspaceIndices;
72  }
73  else if constexpr(DIM==2) {
74  assert( measurementTypeFromVolumeId(surface.geometryId().volume()) == xAOD::UncalibMeasType::PixelClusterType );
76  }
77  else if constexpr(DIM==1) {
78  assert( measurementTypeFromVolumeId(surface.geometryId().volume()) == xAOD::UncalibMeasType::StripClusterType );
79  auto boundType = surface.bounds().type();
80  const std::size_t projector_idx = boundType == Acts::SurfaceBounds::eAnnulus;
81  return s_stripSubspaceIndices[projector_idx];
82  }
83  else {
84  throw std::runtime_error("Unsupported dimension");
85  }
86 
87  }

◆ setMeasurementTypeForVolumeId()

void ActsTrk::MeasurementParameterMap::setMeasurementTypeForVolumeId ( unsigned int  volume_id,
xAOD::UncalibMeasType  type 
)
inline

Definition at line 42 of file MeasurementCalibrator2.h.

42  {
43  static_assert( static_cast<unsigned int>(xAOD::UncalibMeasType::nTypes) < 16u );
44  unsigned char shift = (volume_id%2) ? 4 : 0;
45  unsigned char idx = volume_id/2;
46  m_volumeIdToMeasurementType[idx] |= ((static_cast<unsigned int>(type) & 0xf) << shift);
47  }

Member Data Documentation

◆ m_volumeIdToMeasurementType

std::array<unsigned char, 128> ActsTrk::MeasurementParameterMap::m_volumeIdToMeasurementType {}

Definition at line 36 of file MeasurementCalibrator2.h.

◆ s_hgtdSubspaceIndices

constexpr static Acts::SubspaceIndices<3> ActsTrk::MeasurementParameterMap::s_hgtdSubspaceIndices
staticconstexpr
Initial value:
= {
Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundTime
}

Definition at line 96 of file MeasurementCalibrator2.h.

◆ s_pixelSubspaceIndices

constexpr static Acts::SubspaceIndices<2> ActsTrk::MeasurementParameterMap::s_pixelSubspaceIndices
staticconstexpr
Initial value:
= {
Acts::eBoundLoc0, Acts::eBoundLoc1
}

Definition at line 93 of file MeasurementCalibrator2.h.

◆ s_stripSubspaceIndices

constexpr static std::array<Acts::SubspaceIndices<1>, 2> ActsTrk::MeasurementParameterMap::s_stripSubspaceIndices
staticconstexpr
Initial value:
= {
{{Acts::eBoundLoc0},
{Acts::eBoundLoc1}}
}

Definition at line 89 of file MeasurementCalibrator2.h.


The documentation for this struct was generated from the following file:
ActsTrk::MeasurementParameterMap::setMeasurementTypeForVolumeId
void setMeasurementTypeForVolumeId(unsigned int volume_id, xAOD::UncalibMeasType type)
Definition: MeasurementCalibrator2.h:42
xAOD::UncalibMeasType::HGTDClusterType
@ HGTDClusterType
ActsTrk::MeasurementParameterMap::s_stripSubspaceIndices
constexpr static std::array< Acts::SubspaceIndices< 1 >, 2 > s_stripSubspaceIndices
Definition: MeasurementCalibrator2.h:89
xAOD::UncalibMeasType::StripClusterType
@ StripClusterType
ActsTrk::MeasurementParameterMap::s_pixelSubspaceIndices
constexpr static Acts::SubspaceIndices< 2 > s_pixelSubspaceIndices
Definition: MeasurementCalibrator2.h:93
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
ActsTrk::MeasurementParameterMap::m_volumeIdToMeasurementType
std::array< unsigned char, 128 > m_volumeIdToMeasurementType
Definition: MeasurementCalibrator2.h:36
ActsTrk::MeasurementParameterMap::measurementTypeFromVolumeId
xAOD::UncalibMeasType measurementTypeFromVolumeId(unsigned int volume_id) const
Definition: MeasurementCalibrator2.h:37
ActsTrk::MeasurementParameterMap::s_hgtdSubspaceIndices
constexpr static Acts::SubspaceIndices< 3 > s_hgtdSubspaceIndices
Definition: MeasurementCalibrator2.h:96
xAOD::UncalibMeasType::nTypes
@ nTypes
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::UncalibMeasType
UncalibMeasType
Define the type of the uncalibrated measurement.
Definition: MeasurementDefs.h:24
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
xAOD::UncalibMeasType::PixelClusterType
@ PixelClusterType