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,
24 std::string in_s_rbx, std::string in_s_slb, std::string in_s_slb2, std::string in_s_slnam, std::string in_s_rctnam
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,
108 std::string in_s_rbx, std::string in_s_let
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,
205 std::string in_s_subdet
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;
234 in_adc = in_fi_ch + ( 3 * ( in_rm_fi - 1 ) );
236 HcalFrontEndId hrbx( in_s_rbx, in_rm, in_pix, in_rm_fi, in_fi_ch, in_qie, in_adc );
239 hcalEID_ = heid.
rawId();
240 hcalCalibDetID_ = hcalibdid.
rawId();
241 hcalFrontEndID_ = hrbx.
rawId();
246 static char myline[512];
255 if ((hcaleid.
dccid()%2)==1) {
271 mydet =
"invalid")));
272 (hcaleid.
htrTopBottom()==0) ? myfpga =
"bot" : myfpga =
"top";
274 sprintf(myline,
"%1d %6d %6d %6d %6d %6s %7s",0,myside_,hcalcalibid.
ieta(),hcalcalibid.
iphi(),mydphi_,mydet.c_str(),rbxid.
rbx().c_str());
276 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());
285 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,
286 std::string in_s_det,
int in_sid,
int in_dep,
287 int in_x,
int in_y,
int in_dx,
int in_det_ch,
int in_cab,
int in_rm,
int in_qie,
288 int in_adc,
int in_rm_fi
292 (in_s_fpga==
"bot") ? mytopbot = 0 : mytopbot = 1;
305 heid.
setHTR( in_cr, in_htr, mytopbot );
315 (in_sid > 0) ? myzdccheck =
true : myzdccheck =
false;
316 HcalZDCDetId hzdcdid( myzdcsec, myzdccheck, in_det_ch );
319 hcalEID_ = heid.
rawId();
320 hcalZDCDetID_ = hzdcdid.
rawId();
326 static char myline[512];
334 if ((hcaleid.
dccid()%2)==1) {
344 string mydet =
"ZDC_";
347 if (myzdcsec==0) mydet +=
"Unknown";
348 else if (myzdcsec==1) mydet +=
"EM";
349 else if (myzdcsec==2) mydet +=
"HAD";
352 (hcaleid.
htrTopBottom()==0) ? myfpga =
"bot" : myfpga =
"top";
354 sprintf(myline,
"%1d %5d %2d %2d %3d %6d %7s %7d",0,hcalzdcid.
zside(),myx_,myy_,mydx_,hcalzdcid.
depth(),mydet.c_str(),hcalzdcid.
channel());
355 sprintf(myline+strlen(myline),
"%7d %3d %4d %4d %6d %6d %6d",mycable_,myrm_,myqie_,myadc_,myrm_fi_,hcaleid.
fiberChanId(),hcaleid.
readoutVMECrateId());
356 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);
365 int in_et,
int in_ph,
366 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,
367 int in_spig,
int in_slb, std::string in_s_slb, std::string in_s_slb2,
int in_ndat,
368 std::string in_s_slnam,
int in_rctcra,
int in_rctcar,
int in_rctcon, std::string in_s_rctnam,
int in_fed
375 myrctcra_ = in_rctcra;
376 myrctcar_ = in_rctcar;
377 myrctcon_ = in_rctcon;
382 myslbin2_ = in_s_slb2;
383 myslnam_ = in_s_slnam;
384 myrctnam_ = in_s_rctnam;
388 in_tb == 1 ? top = 0 : top = 1;
390 HcalElectronicsId hteid( in_ndat, in_slb, in_spig, in_fed - 700, in_cr, in_htr, top );
397 hcalTrigEID_ = hteid.
rawId();
398 hcalTrigDetID_ = htrigdid.
rawId();
403 static char myline[512];
410 if ((hcaltrigeid.
dccid()%2)==1) {
420 ( hcaltrigeid.
htrTopBottom()==0 ) ? myfpga =
"bot" : myfpga =
"top";
422 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());
423 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());
424 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 [1-8] (which of eight fibers carried by a spigot) (valid only for non-trigger-cha...
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)
int dccid() const
get the (Hcal local) DCC id
int fiberChanId() const
get the fiber channel id (which of three channels on a readout fiber) (valid only for non-trigger-cha...
Section section() const
get the section
int spigot() const
get the spigot (input number on DCC)
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 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 trigger-chain ids)
bool isHcalCalibDetId() const
HcalSubdetector hcalSubdet() const
get the HcalSubdetector (if relevant)
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
int iphi() const
get the tower iphi