Extension of DetectorID providing access to layer and module number for tracker IDs.
More...
#include <TrackerID.h>
|
typedef uint32_t | RawValue |
|
RawValue | id_ |
| The raw, packed value of the ID.
|
|
Extension of DetectorID providing access to layer and module number for tracker IDs.
Definition at line 20 of file TrackerID.h.
◆ TrackerID() [1/4]
ldmx::TrackerID::TrackerID |
( |
| ) |
|
|
inline |
◆ TrackerID() [2/4]
Create from a DetectorID, but check.
Definition at line 35 of file TrackerID.h.
36 SUBDETECTORID_TEST2("TrackerID", SD_TRACKER_TAGGER, SD_TRACKER_RECOIL);
37 }
DetectorID()
Class constructor for a null DetectorID.
◆ TrackerID() [3/4]
ldmx::TrackerID::TrackerID |
( |
RawValue |
rawid | ) |
|
|
inline |
Create from a raw id, but check.
Definition at line 42 of file TrackerID.h.
43 SUBDETECTORID_TEST2("TrackerID", SD_TRACKER_TAGGER, SD_TRACKER_RECOIL);
44 }
◆ TrackerID() [4/4]
ldmx::TrackerID::TrackerID |
( |
SubdetectorIDType |
system, |
|
|
unsigned int |
layer, |
|
|
unsigned int |
module |
|
) |
| |
|
inline |
Create from values.
Definition at line 48 of file TrackerID.h.
50 id_ |= (
layer & LAYER_MASK) << LAYER_SHIFT;
51 id_ |= (
module & MODULE_MASK) << MODULE_SHIFT;
52 }
RawValue id_
The raw, packed value of the ID.
int layer() const
Get the value of the layer field from the ID.
References ldmx::DetectorID::id_, and layer().
◆ createInterpreters()
void ldmx::TrackerID::createInterpreters |
( |
| ) |
|
|
static |
Definition at line 20 of file TrackerID.cxx.
20 {
22 fields.push_back(new IDField("subdetector", 0, SUBDETECTORID_SHIFT, 31));
23 fields.push_back(
24 new IDField("layer", 1, LAYER_SHIFT,
26 fields.push_back(
27 new IDField("module", 2, MODULE_SHIFT,
29
32}
static void registerInterpreter(SubdetectorIDType idtype, const IDField::IDFieldList &fieldList)
Register a new field interpreter for a given subdetector id.
static unsigned countOnes(unsigned mask)
Utility for counting number of 1 in a mask.
std::vector< IDField * > IDFieldList
List of fields.
◆ layer()
int ldmx::TrackerID::layer |
( |
| ) |
const |
|
inline |
◆ module()
int ldmx::TrackerID::module |
( |
| ) |
const |
|
inline |
◆ LAYER_MASK
const RawValue ldmx::TrackerID::LAYER_MASK {0xFF} |
|
static |
◆ LAYER_SHIFT
const RawValue ldmx::TrackerID::LAYER_SHIFT {0} |
|
static |
◆ MODULE_MASK
const RawValue ldmx::TrackerID::MODULE_MASK {0x1F} |
|
static |
◆ MODULE_SHIFT
const RawValue ldmx::TrackerID::MODULE_SHIFT {8} |
|
static |
The documentation for this class was generated from the following files: