20 int in_fi_ch,
int in_htr_fi,
int in_spig,
int in_fed,
int in_cr,
int in_htr,
std::string in_s_fpga,
21 std::string in_s_det,
int in_sid,
int in_et,
int in_ph,
int in_dep,
22 int in_dph,
int in_wed,
int in_rm,
int in_rm_fi,
int in_pix,
int in_qie,
int in_adc,
23 int in_slb,
int in_rctcra,
int in_rctcar,
int in_rctcon,
28 (in_s_fpga==
"bot") ? mytopbot = 0 : mytopbot = 1;
33 myrctcra_ = in_rctcra;
34 myrctcar_ = in_rctcar;
35 myrctcon_ = in_rctcon;
39 myslbin2_ = in_s_slb2;
40 myslnam_ = in_s_slnam;
41 myrctnam_ = in_s_rctnam;
45 heid.
setHTR( in_cr, in_htr, mytopbot );
49 else if (in_s_det==
"HE") mysubdet =
HcalEndcap;
52 HcalDetId hdid( mysubdet, in_sid*in_et, in_ph, in_dep );
54 HcalFrontEndId hrbx( in_s_rbx, in_rm, in_pix, in_rm_fi, in_fi_ch, in_qie, in_adc );
57 hcalEID_ = heid.
rawId();
58 hcalDetID_ = hdid.
rawId();
59 hcalFrontEndID_ = hrbx.
rawId();
64 static char myline[512];
73 if ((hcaleid.
dccid()%2)==1) {
85 (mysubdet==1) ? mydet =
"HB" :
86 ((mysubdet==2) ? mydet =
"HE" :
87 ((mysubdet==3) ? mydet =
"HO" :
88 ((mysubdet==4) ? mydet =
"HF" :
91 ( hcaleid.
htrTopBottom()==0 ) ? myfpga =
"bot" : myfpga =
"top";
93 sprintf(myline,
"%1d %6d %6d %6d %6d %6d %6s %7s %6d %6d %6d",0,hcaldid.
zside(),hcaldid.
ietaAbs(),hcaldid.
iphi(),mydphi_,hcaldid.
depth(),mydet.c_str(),rbxid.
rbx().c_str(),mywedge_,rbxid.
rm(),rbxid.
pixel());
95 sprintf(myline+strlen(myline),
"%8d %7d %6d %6d %6d %6s",hcaleid.
fiberIndex(),mydcc_sl,hcaleid.
spigot(),mydcc,myslb_,myslbin_.c_str());
96 sprintf(myline+strlen(myline),
"%8s %15s %6d %6d %6d %20s %6d\n",myslbin2_.c_str(),myslnam_.c_str(),myrctcra_,myrctcar_,myrctcon_,myrctnam_.c_str(),hcaleid.
dccid()+700);
105 int in_fi_ch,
int in_htr_fi,
int in_spig,
int in_fed,
int in_cr,
int in_htr,
std::string in_s_fpga,
106 std::string in_s_det,
int in_sid,
int in_et,
int in_ph,
int in_dep,
107 int in_dph,
int in_sec,
int in_rm,
int in_rm_fi,
int in_pix,
int in_qie,
int in_adc,
112 (in_s_fpga==
"bot") ? mytopbot = 0 : mytopbot = 1;
117 myletter_ = in_s_let;
121 heid.
setHTR( in_cr, in_htr, mytopbot );
123 if (in_s_det==
"HO") {
126 hcalDetID_ = hdid.
rawId();
131 hcalDetID_ = hdid.
rawId();
134 HcalFrontEndId hrbx( in_s_rbx, in_rm, in_pix, in_rm_fi, in_fi_ch, in_qie, in_adc );
137 hcalEID_ = heid.
rawId();
138 hcalFrontEndID_ = hrbx.
rawId();
144 static char myline[512];
152 if ((hcaleid.
dccid()%2)==1) {
171 myside = hcalcompid.
zside();
172 myeta = hcalcompid.
ieta()*myside;
173 myphi = hcalcompid.
iphi();
182 mydet =
"invalid")));
183 mydepth = hcalcompid.
depth();
184 myside = hcalcompid.
zside();
186 myphi = hcalcompid.
iphi();
189 ( hcaleid.
htrTopBottom()==0 ) ? myfpga =
"bot" : myfpga =
"top";
191 sprintf(myline,
"%1d %6d %6d %6d %6d %6d %6s %7s %6d %6d %6d",0,myside,myeta,myphi,mydphi_,mydepth,mydet.c_str(),rbxid.
rbx().c_str(),mysector_,rbxid.
rm(),rbxid.
pixel());
193 sprintf(myline+strlen(myline),
"%8d %7d %6d %6d %6d\n",hcaleid.
fiberIndex(),mydcc_sl,hcaleid.
spigot(),mydcc,hcaleid.
dccid()+700);
202 int in_fi_ch,
int in_htr_fi,
int in_spig,
int in_fed,
int in_cr,
int in_htr,
std::string in_s_fpga,
203 std::string in_s_det,
int in_et,
int in_ph,
int in_ch_ty,
204 int in_sid,
int in_dph,
std::string in_s_rbx,
int in_wed,
int in_rm_fi,
209 (in_s_fpga==
"bot") ? mytopbot = 0 : mytopbot = 1;
215 mycalibsubdet_ = in_s_subdet;
219 heid.
setHTR( in_cr, in_htr, mytopbot );
224 else if (in_s_det==
"HE") mysubdet =
HcalEndcap;
225 else if (in_s_det==
"HO") mysubdet =
HcalOuter;
230 int in_rm, in_pix, in_qie, in_adc;
239 in_adc = in_fi_ch + ( 3 * ( in_rm_fi - 1 ) );
241 HcalFrontEndId hrbx( in_s_rbx, in_rm, in_pix, in_rm_fi, in_fi_ch, in_qie, in_adc );
244 hcalEID_ = heid.
rawId();
245 hcalCalibDetID_ = hcalibdid.
rawId();
246 hcalFrontEndID_ = hrbx.
rawId();
251 static char myline[512];
260 if ((hcaleid.
dccid()%2)==1) {
276 mydet =
"invalid")));
277 (hcaleid.
htrTopBottom()==0) ? myfpga =
"bot" : myfpga =
"top";
279 sprintf(myline,
"%1d %6d %6d %6d %6d %6s %7s",0,myside_,hcalcalibid.
ieta(),hcalcalibid.
iphi(),mydphi_,mydet.c_str(),rbxid.
rbx().c_str());
281 sprintf(myline+strlen(myline),
"%8d %7d %6d %4d %6d %8d %9s\n",hcaleid.
fiberIndex(),mydcc_sl,hcaleid.
spigot(),mydcc,hcaleid.
dccid()+700, hcalcalibid.
cboxChannel(), mycalibsubdet_.c_str());
290 int in_fi_ch,
int in_htr_fi,
int in_spigot,
int in_fed,
int in_cr,
int in_htr,
std::string in_s_fpga,
292 int in_x,
int in_y,
int in_dx,
int in_det_ch,
int in_cab,
int in_rm,
int in_qie,
293 int in_adc,
int in_rm_fi
297 (in_s_fpga==
"bot") ? mytopbot = 0 : mytopbot = 1;
310 heid.
setHTR( in_cr, in_htr, mytopbot );
321 (in_sid > 0) ? myzdccheck =
true : myzdccheck =
false;
322 HcalZDCDetId hzdcdid( myzdcsec, myzdccheck, in_det_ch );
325 hcalEID_ = heid.
rawId();
326 hcalZDCDetID_ = hzdcdid.
rawId();
332 static char myline[512];
340 if ((hcaleid.
dccid()%2)==1) {
350 string mydet =
"ZDC_";
353 if (myzdcsec==0) mydet +=
"Unknown";
354 else if (myzdcsec==1) mydet +=
"EM";
355 else if (myzdcsec==2) mydet +=
"HAD";
356 else if (myzdcsec==3) mydet +=
"LUM";
359 (hcaleid.
htrTopBottom()==0) ? myfpga =
"bot" : myfpga =
"top";
361 sprintf(myline,
"%1d %5d %2d %2d %3d %6d %7s %7d",0,hcalzdcid.
zside(),myx_,myy_,mydx_,hcalzdcid.
depth(),mydet.c_str(),hcalzdcid.
channel());
362 sprintf(myline+strlen(myline),
"%7d %3d %4d %4d %6d %6d %6d",mycable_,myrm_,myqie_,myadc_,myrm_fi_,hcaleid.
fiberChanId(),hcaleid.
readoutVMECrateId());
363 sprintf(myline+strlen(myline),
"%5d %5s %7d %7d %6d %4d %6d\n",hcaleid.
htrSlot(),myfpga.c_str(),hcaleid.
fiberIndex(),mydcc_sl,hcaleid.
spigot(),mydcc,hcaleid.
dccid()+700);
372 int in_et,
int in_ph,
373 int in_sid,
int in_dph,
int in_dep,
std::string in_s_chDet,
int in_wed,
int in_cr,
int in_htr,
int in_tb,
382 myrctcra_ = in_rctcra;
383 myrctcar_ = in_rctcar;
384 myrctcon_ = in_rctcon;
389 myslbin2_ = in_s_slb2;
390 myslnam_ = in_s_slnam;
391 myrctnam_ = in_s_rctnam;
395 in_tb == 1 ? top = 0 : top = 1;
397 HcalElectronicsId hteid( in_ndat, in_slb, in_spig, in_fed - 700, in_cr, in_htr, top );
404 hcalTrigEID_ = hteid.
rawId();
405 hcalTrigDetID_ = htrigdid.
rawId();
410 static char myline[512];
417 if ((hcaltrigeid.
dccid()%2)==1) {
427 ( hcaltrigeid.
htrTopBottom()==0 ) ? myfpga =
"bot" : myfpga =
"top";
429 sprintf(myline,
"%1d %5d %4d %4d %5d %6d %4s %7d %6d ",0,myside_,hcaltrigid.
ieta(),hcaltrigid.
iphi(),mydphi_,mydepth_,mydet_.c_str(),mywedge_,hcaltrigeid.
readoutVMECrateId());
430 sprintf(myline+strlen(myline),
"%4d %5s %7d %6d %4d %4d %6s %7s %5d ",hcaltrigeid.
htrSlot(),myfpga.c_str(),mydcc_sl,hcaltrigeid.
spigot(),mydcc,hcaltrigeid.
slbSiteNumber(),myslbin_.c_str(),myslbin2_.c_str(),hcaltrigeid.
slbChannelIndex());
431 sprintf(myline+strlen(myline),
"%13s %7d %7d %7d %17s %6d\n",myslnam_.c_str(),myrctcra_,myrctcar_,myrctcon_,myrctnam_.c_str(),hcaltrigeid.
dccid()+700);
constexpr uint32_t rawId() const
constexpr void setHTR(int crate, int slot, int tb)
HcalSubdetector subdet() const
get the subdetector
int zside() const
get the z-side of the cell (1/-1)
int zside() const
get the z-side of the cell (1/-1)
constexpr uint32_t rawId() const
get the raw id
constexpr int slbChannelIndex() const
get the SLB channel index (valid only for VME trigger-chain ids)
constexpr int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
int ieta() const
get the tower ieta
constexpr int htrTopBottom() const
get the htr top/bottom (1=top/0=bottom), valid for VME
int depth() const
get the tower depth
constexpr int htrSlot() const
get the htr slot
constexpr int readoutVMECrateId() const
get the readout VME crate number
constexpr int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
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
constexpr int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
int zside() const
get the sign of ieta (+/-1)
int depth() const
get the depth (1 for EM, channel + 1 for HAD, 2 for RPD, not sure yet for LUM, leave as default) ...
int channel() const
get the channel
Section section() const
get the section
int cboxChannel() const
get the calibration box channel (if relevant)
bool isHcalCalibDetId() const
constexpr int slbSiteNumber() const
get the SLB site number (valid only for VME trigger-chain ids)
constexpr int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
HcalSubdetector hcalSubdet() const
get the HcalSubdetector (if relevant)
Readout chain identification for Hcal.
int iphi() const
get the tower iphi