75 if (
id.null()) s <<
"(Null Id)";
77 switch (
id.genericSubdet()) {
86 default: s <<
"(Hcal Unknown Id: 0x" << std::hex <<
id.rawId() << std::dec <<
')';
94 int zside=0, ietaAbs=0, ieta=0, iphi=0, depth=0, channel=0, sector=0,
module=0;
109 index = (iphi - 1)*18 + ietaAbs + depth - 2;
110 if (ietaAbs == 16) ++
index;
112 if (zside == -1) index +=
HBhalf;
128 if (ietaAbs == 16 || ietaAbs == 17) index = (iphi - 1)*8 + (iphi/2)*20 + (ietaAbs - 16);
129 if (ietaAbs >= 18 && ietaAbs <= 20) index = (iphi - 1)*8 + (iphi/2)*20 + 2 + 2*(ietaAbs-18) + (depth - 1);
130 if (ietaAbs >= 21 && ietaAbs <= 26) index = (iphi - 1)*8 + (iphi/2)*20 + 8 + 2*(ietaAbs-21) + (depth - 1);
131 if (ietaAbs >= 27 && ietaAbs <= 28) index = (iphi - 1)*8 + (iphi/2)*20 + 20 + 3*(ietaAbs-27) + (depth - 1);
132 if (ietaAbs == 29) index = (iphi - 1)*8 + (iphi/2)*20 + 26 + 2*(ietaAbs-29) + (depth - 1);
138 index = 4*( 14*(iphi-1) + (ietaAbs - 16)) + (depth - 1);
147 if (zside == -1) index +=
HEhalf;
160 index = (iphi - 1)*15 + (ietaAbs - 1);
162 if (zside == -1) index +=
HOhalf;
174 index = ((iphi-1)/4)*4 + ((iphi-1)/2)*22 + 2*(ietaAbs-29) + (depth - 1);
176 if (zside == -1) index +=
HFhalf;
187 if ((iphi-1)%4==0) index = (iphi-1)*32 + (ietaAbs-1) - (12*((iphi-1)/4));
188 else index = (iphi-1)*28 + (ietaAbs-1) + (4*(((iphi-1)/4)+1));
190 if (zside == -1) index +=
HThalf;
208 if (zside == -1) index +=
ZDChalf;
220 index = 14*(sector-1) + (
module-1);
243 index = ((iphi+1)/4-1) + 18*channel + 27*(ieta+1);
249 if (channel>2) channel-=1;
250 index = ((iphi+1)/4-1) + 18*channel + 54*(ieta+1) + 108;
255 if (channel==8) channel = 2;
257 index = (iphi-1)/18 + 4*channel + 6*(ieta+1) + 324;
264 index = (ieta+2) + 420;
269 if (ieta<0) index = ((iphi+1)/12-1) + 36*channel + 6*(ieta+2) + 348;
270 else if (ieta>0) index = ((iphi+1)/12-1) + 36*channel + 6*(ieta+2) + 6 + 348;
271 else index = ((iphi+1)/6-1) + 36*channel + 6*(ieta+2) + 348;
275 std::cout <<
"HCAL Det Id not valid!" << std::endl;
284 if (
abs(ieta)==4) index = ((iphi-1)%36) + (((zside+1)*36)/2) + 72 + 425;
285 else index = (iphi-1) + (36*(zside+1)*2) + 425;
int zside() const
get the z-side of the tower (1/-1)
bool isHcalZDCDetId() const
int hashedId(bool h2mode_=false) const
int sector() const
get the sector (1-16)
CalibDetType calibFlavor() const
get the flavor of this calibration detid
int zside() const
get the z-side of the cell (1/-1)
int zside() const
get the z-side of the cell (1/-1)
int module() const
get the module (1-2 for EM, 1-12 for HAD)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
int ieta() const
get the rbx name (if relevant)
uint32_t rawId() const
get the raw id
int depth() const
get the tower depth
bool isHcalTrigTowerDetId() const
int zside() const
get the z-side of the cell (1/-1)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static const int SubdetectorId
Section section() const
get the section
int ietaAbs() const
get the absolute value of the cell ieta
int iphi() const
get the low-edge iphi (if relevant)
int iphi() const
get the cell iphi
int zside() const
get the sign of ieta (+/-1)
static const int SubdetectorId
bool null() const
is this a null id ?
HcalOtherSubdetector otherSubdet() const
int channel() const
get the channel
int cboxChannel() const
get the calibration box channel (if relevant)
bool isHcalCalibDetId() const
HcalSubdetector hcalSubdet() const
get the HcalSubdetector (if relevant)
bool isHcalCastorDetId() const
HcalGenericSubdetector genericSubdet() const
Detector det() const
get the detector field from this detid
int ietaAbs() const
get the absolute value of the tower ieta
int iphi() const
get the tower iphi