ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::MeasurementParameterMap Struct Reference

#include <MeasurementCalibrator.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 (const Acts::GeometryContext &, const Acts::CalibrationContext &, const Acts::Surface &surface) const

Public Attributes

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

Static Public Attributes

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

Detailed Description

Definition at line 37 of file MeasurementCalibrator.h.

Constructor & Destructor Documentation

◆ MeasurementParameterMap()

ActsTrk::MeasurementParameterMap::MeasurementParameterMap ( )
inline

Definition at line 51 of file MeasurementCalibrator.h.

51 {
52 // @TODO get mapping from converter tool ?
53 std::vector<unsigned int> pixel_vol {16, 15, 9, 20, 19, 18, 10, 14, 13, 8};
54 for (unsigned int vol_id : pixel_vol) {
56 }
57 std::vector<unsigned int> strip_vol {23, 22, 24};
58 for (unsigned int vol_id : strip_vol) {
60 }
61 std::vector<unsigned int> hgtd_vol {2, 25};
62 for (unsigned int vol_id : hgtd_vol) {
64 }
65 }
void setMeasurementTypeForVolumeId(unsigned int volume_id, xAOD::UncalibMeasType type)

Member Function Documentation

◆ measurementTypeFromVolumeId()

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

Definition at line 40 of file MeasurementCalibrator.h.

40 {
41 unsigned char shift = (volume_id%2) ? 4 : 0;
42 unsigned char idx = volume_id/2;
43 return static_cast<xAOD::UncalibMeasType>((m_volumeIdToMeasurementType[idx] >> shift) & 0xf);
44 }
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the container.
UncalibMeasType
Define the type of the uncalibrated measurement.
std::array< unsigned char, 128 > m_volumeIdToMeasurementType

◆ parameterMap()

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

Definition at line 68 of file MeasurementCalibrator.h.

70 {
71 // @TODO make interface measurement type aware ?
72 if constexpr(DIM==3) {
73 assert( measurementTypeFromVolumeId(surface.geometryId().volume()) == xAOD::UncalibMeasType::HGTDClusterType );
75 }
76 else if constexpr(DIM==2) {
77 assert( measurementTypeFromVolumeId(surface.geometryId().volume()) == xAOD::UncalibMeasType::PixelClusterType );
79 }
80 else if constexpr(DIM==1) {
81 assert( measurementTypeFromVolumeId(surface.geometryId().volume()) == xAOD::UncalibMeasType::StripClusterType );
82 auto boundType = surface.bounds().type();
83 const std::size_t projector_idx = boundType == Acts::SurfaceBounds::eAnnulus;
84 return s_stripSubspaceIndices[projector_idx];
85 }
86 else {
87 throw std::runtime_error("Unsupported dimension");
88 }
89
90 }
static constexpr Acts::SubspaceIndices< 2 > s_pixelSubspaceIndices
static constexpr std::array< Acts::SubspaceIndices< 1 >, 2 > s_stripSubspaceIndices
static constexpr Acts::SubspaceIndices< 3 > s_hgtdSubspaceIndices
xAOD::UncalibMeasType measurementTypeFromVolumeId(unsigned int volume_id) const

◆ setMeasurementTypeForVolumeId()

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

Definition at line 45 of file MeasurementCalibrator.h.

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

Member Data Documentation

◆ m_volumeIdToMeasurementType

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

Definition at line 39 of file MeasurementCalibrator.h.

39{};

◆ s_hgtdSubspaceIndices

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

Definition at line 99 of file MeasurementCalibrator.h.

99 {
100 Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundTime
101 };

◆ s_pixelSubspaceIndices

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

Definition at line 96 of file MeasurementCalibrator.h.

96 {
97 Acts::eBoundLoc0, Acts::eBoundLoc1
98 };

◆ s_stripSubspaceIndices

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

Definition at line 92 of file MeasurementCalibrator.h.

92 {
93 {{Acts::eBoundLoc0}, // normal strip: x -> l0
94 {Acts::eBoundLoc1}} // annulus strip: y -> l0
95 };

The documentation for this struct was generated from the following file: