LDMX Software
|
Identifies a location in the Hcal readout chain. More...
#include <HcalElectronicsID.h>
Public Types | |
typedef PackedIndex< 38, 48, 97 > | Index |
Public Types inherited from ldmx::DetectorID | |
typedef uint32_t | RawValue |
Public Member Functions | |
HcalElectronicsID () | |
Empty HCAL id (but not null!) | |
HcalElectronicsID (RawValue rawid) | |
Create from raw number. | |
HcalElectronicsID (const DetectorID id) | |
Create from a DetectorID, but check. | |
HcalElectronicsID (unsigned int fiber, unsigned int elink, unsigned int channel) | |
Create from pieces. | |
int | fiber () const |
Get the value of the fiber from the ID. | |
int | elink () const |
Get the value of the elink from the ID. | |
int | channel () const |
Get the value of the channel from the ID. | |
unsigned int | index () const |
Get the compact index value. | |
Public Member Functions inherited from ldmx::DetectorID | |
DetectorID () | |
Class constructor for a null DetectorID. | |
DetectorID (RawValue rawid) | |
Class constructor from a raw 32-bit integer. | |
DetectorID (SubdetectorIDType sdtype, RawValue raw_subpayload) | |
Class constructor from a subdetector id and a subdetector-specific section (masked to. | |
bool | null () const |
SubdetectorIDType | subdet () const |
RawValue | raw () const |
void | setRawValue (RawValue rawValue) |
Set the raw value of the detector ID. | |
bool | operator< (const DetectorID &id) const |
bool | operator== (const DetectorID &id) const |
bool | operator!= (const DetectorID &id) const |
Static Public Member Functions | |
static HcalElectronicsID | idFromIndex (unsigned int index) |
Construct an electronics id from an index. | |
Static Public Attributes | |
static const RawValue | INDEX_MASK {0xFFFFFF} |
static const unsigned int | MAX_INDEX {38 * 48 * 200} |
Static Public Attributes inherited from ldmx::DetectorID | |
static const RawValue | SUBDETECTORID_MASK {0x3F} |
static const RawValue | SUBDETECTORID_SHIFT {26} |
static const RawValue | SUBDETECTOR_PAYLOAD_MASK {0x3FFFFFF} |
Additional Inherited Members | |
Protected Attributes inherited from ldmx::DetectorID | |
RawValue | id_ |
The raw, packed value of the ID. | |
Identifies a location in the Hcal readout chain.
– fiber : optical fiber number (backend number), range assumed O(0-96) – elink : electronic link number, range assumed O(0-47) – channel : channel-on-elink, range O(0-37)
For transient use only i.e. we use this ID to help translate the digitized data coming off the detector into spatially-important HcalDigiIDs.
TODO update the ranges in the packed index template. These were originally copied from the EcalElectronicsID implementation and may not align with the Hcal readout design.
Definition at line 26 of file HcalElectronicsID.h.
typedef PackedIndex<38, 48, 97> ldmx::HcalElectronicsID::Index |
Definition at line 30 of file HcalElectronicsID.h.
|
inline |
Empty HCAL id (but not null!)
Definition at line 37 of file HcalElectronicsID.h.
|
inline |
Create from raw number.
Definition at line 42 of file HcalElectronicsID.h.
|
inline |
Create from a DetectorID, but check.
Definition at line 49 of file HcalElectronicsID.h.
|
inline |
Create from pieces.
Definition at line 56 of file HcalElectronicsID.h.
References channel(), elink(), fiber(), ldmx::DetectorID::id_, and index().
|
inline |
Get the value of the channel from the ID.
Definition at line 91 of file HcalElectronicsID.h.
References ldmx::DetectorID::id_.
Referenced by dqm::NtuplizeHgcrocDigiCollection::analyze(), and HcalElectronicsID().
|
inline |
Get the value of the elink from the ID.
Definition at line 86 of file HcalElectronicsID.h.
References ldmx::DetectorID::id_.
Referenced by dqm::NtuplizeHgcrocDigiCollection::analyze(), and HcalElectronicsID().
|
inline |
Get the value of the fiber from the ID.
Definition at line 81 of file HcalElectronicsID.h.
References ldmx::DetectorID::id_.
Referenced by dqm::NtuplizeHgcrocDigiCollection::analyze(), and HcalElectronicsID().
|
inlinestatic |
Construct an electronics id from an index.
This looks ugly (and it is) because we already have a constructor that uses the unsigned int type. This means we need a different static method for translating something we know to be an EID index rather than a full DetID raw value.
Definition at line 71 of file HcalElectronicsID.h.
References ldmx::DetectorID::id_, and index().
|
inline |
Get the compact index value.
Definition at line 96 of file HcalElectronicsID.h.
References ldmx::DetectorID::id_.
Referenced by dqm::NtuplizeHgcrocDigiCollection::analyze(), HcalElectronicsID(), and idFromIndex().
|
static |
Definition at line 28 of file HcalElectronicsID.h.
|
static |
Definition at line 32 of file HcalElectronicsID.h.