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 );
320 (in_sid > 0) ? myzdccheck =
true : myzdccheck =
false;
321 HcalZDCDetId hzdcdid( myzdcsec, myzdccheck, in_det_ch );
324 hcalEID_ = heid.
rawId();
325 hcalZDCDetID_ = hzdcdid.
rawId();
331 static char myline[512];
339 if ((hcaleid.
dccid()%2)==1) {
349 string mydet =
"ZDC_";
352 if (myzdcsec==0) mydet +=
"Unknown";
353 else if (myzdcsec==1) mydet +=
"EM";
354 else if (myzdcsec==2) mydet +=
"HAD";
357 (hcaleid.
htrTopBottom()==0) ? myfpga =
"bot" : myfpga =
"top";
359 sprintf(myline,
"%1d %5d %2d %2d %3d %6d %7s %7d",0,hcalzdcid.
zside(),myx_,myy_,mydx_,hcalzdcid.
depth(),mydet.c_str(),hcalzdcid.
channel());
360 sprintf(myline+strlen(myline),
"%7d %3d %4d %4d %6d %6d %6d",mycable_,myrm_,myqie_,myadc_,myrm_fi_,hcaleid.
fiberChanId(),hcaleid.
readoutVMECrateId());
361 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);
370 int in_et,
int in_ph,
371 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,
380 myrctcra_ = in_rctcra;
381 myrctcar_ = in_rctcar;
382 myrctcon_ = in_rctcon;
387 myslbin2_ = in_s_slb2;
388 myslnam_ = in_s_slnam;
389 myrctnam_ = in_s_rctnam;
393 in_tb == 1 ? top = 0 : top = 1;
395 HcalElectronicsId hteid( in_ndat, in_slb, in_spig, in_fed - 700, in_cr, in_htr, top );
402 hcalTrigEID_ = hteid.
rawId();
403 hcalTrigDetID_ = htrigdid.
rawId();
408 static char myline[512];
415 if ((hcaltrigeid.
dccid()%2)==1) {
425 ( hcaltrigeid.
htrTopBottom()==0 ) ? myfpga =
"bot" : myfpga =
"top";
427 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());
428 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());
429 sprintf(myline+strlen(myline),
"%13s %7d %7d %7d %17s %6d\n",myslnam_.c_str(),myrctcra_,myrctcar_,myrctcon_,myrctnam_.c_str(),hcaltrigeid.
dccid()+700);
int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
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)
int htrSlot() const
get the htr slot
int ieta() const
get the tower ieta
int ieta() const
get the rbx name (if relevant)
int readoutVMECrateId() const
get the readout VME crate number
uint32_t rawId() const
get the raw id
int depth() const
get the tower depth
int htrTopBottom() const
get the htr top/bottom (1=top/0=bottom), valid for VME
int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
Section section() const
get the section
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 slbChannelIndex() const
get the SLB channel index (valid only for VME trigger-chain ids)
int iphi() const
get the cell iphi
int zside() const
get the sign of ieta (+/-1)
void setHTR(int crate, int slot, int tb)
int depth() const
get the depth (1 for EM, channel + 1 for HAD, not sure yet for LUM, leave as default) ...
int channel() const
get the channel
int cboxChannel() const
get the calibration box channel (if relevant)
int slbSiteNumber() const
get the SLB site number (valid only for VME trigger-chain ids)
bool isHcalCalibDetId() const
HcalSubdetector hcalSubdet() const
get the HcalSubdetector (if relevant)
Readout chain identification for Hcal.
int iphi() const
get the tower iphi