3#include "DetDescr/DetectorIDInterpreter.h"
5std::ostream& operator<<(std::ostream& s,
const ldmx::HcalID&
id) {
6 s <<
"Hcal(" <<
id.section() <<
',' <<
id.layer() <<
',' <<
id.strip() <<
')';
12void HcalID::createInterpreters() {
14 fields.push_back(
new IDField(
"subdetector", 0, SUBDETECTORID_SHIFT, 31));
16 new IDField(
"section", 1, SECTION_SHIFT,
19 new IDField(
"layer", 2, LAYER_SHIFT,
22 new IDField(
"strip", 3, STRIP_SHIFT,
26 SD_HCAL, HcalAbstractID::BAR_TYPE_MASK << HcalAbstractID::BAR_TYPE_SHIFT,
27 HcalAbstractID::Global << HcalAbstractID::BAR_TYPE_SHIFT, fields);
Class that defines an HCal sensitive detector.
static void registerInterpreter(SubdetectorIDType idtype, const IDField::IDFieldList &fieldList)
Register a new field interpreter for a given subdetector id.
Implements detector ids for HCal subdetector.
static unsigned countOnes(unsigned mask)
Utility for counting number of 1 in a mask.
std::vector< IDField * > IDFieldList
List of fields.