LDMX Software
DetectorID.cxx
1#include "DetDescr/DetectorID.h"
2
3#include <iomanip>
4
8#include "DetDescr/SimSpecialID.h"
10#include "DetDescr/TrigScintID.h"
11
12std::ostream& operator<<(std::ostream& s, const ldmx::DetectorID& id) {
13 switch (id.subdet()) {
14 case (ldmx::SD_TRACKER_TAGGER):
15 case (ldmx::SD_TRACKER_RECOIL):
16 return s << ldmx::TrackerID(id);
17 case (ldmx::SD_TRIGGER_SCINT):
18 return s << ldmx::TrigScintID(id);
19 case (ldmx::SD_ECAL):
20 return s << ldmx::EcalAbstractID(id);
21 case (ldmx::SD_HCAL):
22 return s << ldmx::HcalAbstractID(id);
23 case (ldmx::SD_SIM_SPECIAL):
24 return s << ldmx::SimSpecialID(id);
25 case (ldmx::EID_ECAL):
26 return s << ldmx::EcalElectronicsID(id);
27 default:
28 return s << "DetectorID(" << id.subdet() << ":0x" << std::setfill('0')
29 << std::setw(2) << std::right << std::hex
30 << (id.raw() & ldmx::DetectorID::SUBDETECTOR_PAYLOAD_MASK);
31 }
32}
Class that serves as a parent for ECal detector IDs of various types.
Class that identifies a location in the Ecal readout chain.
Class that serves as a parent for HCal detector IDs of various types.
Class that defines a Tracker detector ID with a module number.
Defines a 32-bit packed ID for uniquely identifying hits and detector components.
Definition DetectorID.h:35
Parent of precision and trigger EcalIDs.
Identifies a location in the Ecal readout chain.
Parent of HcalIDs.
Implements detector ids for special simulation-derived hits like scoring planes.
Extension of DetectorID providing access to layer and module number for tracker IDs.
Definition TrackerID.h:20
Class that defines the detector ID of the trigger scintillator.
Definition TrigScintID.h:14