Project
Loading...
Searching...
No Matches
GlobalLabel Class Reference

#include <AlignmentLabel.h>

Public Types

using T = uint32_t
 

Public Member Functions

 GlobalLabel (T det, T id, bool sens, bool calib=false)
 
constexpr T raw (T dof) const noexcept
 produce the raw Millepede label for a given DOF index (rigid body: calib=0 in label)
 
constexpr int rawGBL (T dof) const noexcept
 
GlobalLabel asCalib () const noexcept
 return a copy of this label with the CALIB bit set (for calibration DOFs on same volume)
 
constexpr T id () const noexcept
 
constexpr T det () const noexcept
 
constexpr bool sens () const noexcept
 
constexpr bool calib () const noexcept
 
std::string asString () const
 
constexpr auto operator<=> (const GlobalLabel &) const noexcept=default
 

Static Public Member Functions

static constexpr T bitMask (int b) noexcept
 

Static Public Attributes

static constexpr int DOF_BITS = 5
 
static constexpr int CALIB_BITS = 1
 
static constexpr int ID_BITS = 22
 
static constexpr int SENS_BITS = 1
 
static constexpr int TOTAL_BITS = sizeof(T) * 8
 
static constexpr int DET_BITS = TOTAL_BITS - (DOF_BITS + CALIB_BITS + ID_BITS + SENS_BITS) - 1
 
static constexpr int DOF_SHIFT = 0
 
static constexpr T DOF_MAX = (T(1) << DOF_BITS) - T(1)
 
static constexpr T DOF_MASK = DOF_MAX << DOF_SHIFT
 
static constexpr int CALIB_SHIFT = DOF_BITS
 
static constexpr T CALIB_MAX = (T(1) << CALIB_BITS) - T(1)
 
static constexpr T CALIB_MASK = CALIB_MAX << CALIB_SHIFT
 
static constexpr int ID_SHIFT = DOF_BITS + CALIB_BITS
 
static constexpr T ID_MAX = (T(1) << ID_BITS) - T(1)
 
static constexpr T ID_MASK = ID_MAX << ID_SHIFT
 
static constexpr int SENS_SHIFT = DOF_BITS + CALIB_BITS + ID_BITS
 
static constexpr T SENS_MAX = (T(1) << SENS_BITS) - T(1)
 
static constexpr T SENS_MASK = SENS_MAX << SENS_SHIFT
 
static constexpr int DET_SHIFT = DOF_BITS + CALIB_BITS + ID_BITS + SENS_BITS
 
static constexpr T DET_MAX = (T(1) << DET_BITS) - T(1)
 
static constexpr T DET_MASK = DET_MAX << DET_SHIFT
 

Detailed Description

Definition at line 19 of file AlignmentLabel.h.

Member Typedef Documentation

◆ T

using GlobalLabel::T = uint32_t

Definition at line 24 of file AlignmentLabel.h.

Constructor & Destructor Documentation

◆ GlobalLabel()

GlobalLabel::GlobalLabel ( T  det,
T  id,
bool  sens,
bool  calib = false 
)
inline

Definition at line 51 of file AlignmentLabel.h.

Member Function Documentation

◆ asCalib()

GlobalLabel GlobalLabel::asCalib ( ) const
inlinenoexcept

return a copy of this label with the CALIB bit set (for calibration DOFs on same volume)

Definition at line 64 of file AlignmentLabel.h.

◆ asString()

std::string GlobalLabel::asString ( ) const
inline

Definition at line 76 of file AlignmentLabel.h.

◆ bitMask()

static constexpr T GlobalLabel::bitMask ( int  b)
inlinestaticconstexprnoexcept

Definition at line 31 of file AlignmentLabel.h.

◆ calib()

constexpr bool GlobalLabel::calib ( ) const
inlineconstexprnoexcept

Definition at line 74 of file AlignmentLabel.h.

◆ det()

constexpr T GlobalLabel::det ( ) const
inlineconstexprnoexcept

Definition at line 72 of file AlignmentLabel.h.

◆ id()

constexpr T GlobalLabel::id ( ) const
inlineconstexprnoexcept

Definition at line 71 of file AlignmentLabel.h.

◆ operator<=>()

constexpr auto GlobalLabel::operator<=> ( const GlobalLabel ) const
constexprdefaultnoexcept

◆ raw()

constexpr T GlobalLabel::raw ( T  dof) const
inlineconstexprnoexcept

produce the raw Millepede label for a given DOF index (rigid body: calib=0 in label)

Definition at line 60 of file AlignmentLabel.h.

◆ rawGBL()

constexpr int GlobalLabel::rawGBL ( T  dof) const
inlineconstexprnoexcept

Definition at line 61 of file AlignmentLabel.h.

◆ sens()

constexpr bool GlobalLabel::sens ( ) const
inlineconstexprnoexcept

Definition at line 73 of file AlignmentLabel.h.

Member Data Documentation

◆ CALIB_BITS

constexpr int GlobalLabel::CALIB_BITS = 1
staticconstexpr

Definition at line 26 of file AlignmentLabel.h.

◆ CALIB_MASK

constexpr T GlobalLabel::CALIB_MASK = CALIB_MAX << CALIB_SHIFT
staticconstexpr

Definition at line 40 of file AlignmentLabel.h.

◆ CALIB_MAX

constexpr T GlobalLabel::CALIB_MAX = (T(1) << CALIB_BITS) - T(1)
staticconstexpr

Definition at line 39 of file AlignmentLabel.h.

◆ CALIB_SHIFT

constexpr int GlobalLabel::CALIB_SHIFT = DOF_BITS
staticconstexpr

Definition at line 38 of file AlignmentLabel.h.

◆ DET_BITS

constexpr int GlobalLabel::DET_BITS = TOTAL_BITS - (DOF_BITS + CALIB_BITS + ID_BITS + SENS_BITS) - 1
staticconstexpr

Definition at line 30 of file AlignmentLabel.h.

◆ DET_MASK

constexpr T GlobalLabel::DET_MASK = DET_MAX << DET_SHIFT
staticconstexpr

Definition at line 49 of file AlignmentLabel.h.

◆ DET_MAX

constexpr T GlobalLabel::DET_MAX = (T(1) << DET_BITS) - T(1)
staticconstexpr

Definition at line 48 of file AlignmentLabel.h.

◆ DET_SHIFT

constexpr int GlobalLabel::DET_SHIFT = DOF_BITS + CALIB_BITS + ID_BITS + SENS_BITS
staticconstexpr

Definition at line 47 of file AlignmentLabel.h.

◆ DOF_BITS

constexpr int GlobalLabel::DOF_BITS = 5
staticconstexpr

Definition at line 25 of file AlignmentLabel.h.

◆ DOF_MASK

constexpr T GlobalLabel::DOF_MASK = DOF_MAX << DOF_SHIFT
staticconstexpr

Definition at line 37 of file AlignmentLabel.h.

◆ DOF_MAX

constexpr T GlobalLabel::DOF_MAX = (T(1) << DOF_BITS) - T(1)
staticconstexpr

Definition at line 36 of file AlignmentLabel.h.

◆ DOF_SHIFT

constexpr int GlobalLabel::DOF_SHIFT = 0
staticconstexpr

Definition at line 35 of file AlignmentLabel.h.

◆ ID_BITS

constexpr int GlobalLabel::ID_BITS = 22
staticconstexpr

Definition at line 27 of file AlignmentLabel.h.

◆ ID_MASK

constexpr T GlobalLabel::ID_MASK = ID_MAX << ID_SHIFT
staticconstexpr

Definition at line 43 of file AlignmentLabel.h.

◆ ID_MAX

constexpr T GlobalLabel::ID_MAX = (T(1) << ID_BITS) - T(1)
staticconstexpr

Definition at line 42 of file AlignmentLabel.h.

◆ ID_SHIFT

constexpr int GlobalLabel::ID_SHIFT = DOF_BITS + CALIB_BITS
staticconstexpr

Definition at line 41 of file AlignmentLabel.h.

◆ SENS_BITS

constexpr int GlobalLabel::SENS_BITS = 1
staticconstexpr

Definition at line 28 of file AlignmentLabel.h.

◆ SENS_MASK

constexpr T GlobalLabel::SENS_MASK = SENS_MAX << SENS_SHIFT
staticconstexpr

Definition at line 46 of file AlignmentLabel.h.

◆ SENS_MAX

constexpr T GlobalLabel::SENS_MAX = (T(1) << SENS_BITS) - T(1)
staticconstexpr

Definition at line 45 of file AlignmentLabel.h.

◆ SENS_SHIFT

constexpr int GlobalLabel::SENS_SHIFT = DOF_BITS + CALIB_BITS + ID_BITS
staticconstexpr

Definition at line 44 of file AlignmentLabel.h.

◆ TOTAL_BITS

constexpr int GlobalLabel::TOTAL_BITS = sizeof(T) * 8
staticconstexpr

Definition at line 29 of file AlignmentLabel.h.


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