test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ZDCLogicalMapEntry Class Reference

#include <HcalMappingEntry.h>

Public Member Functions

const DetId getDetId () const
 
const HcalElectronicsId getHcalElectronicsId () const
 
const uint32_t getLinearIndex () const
 
char * printLMapLine ()
 
 ZDCLogicalMapEntry ()
 
 ZDCLogicalMapEntry (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, std::string in_s_det, int in_sid, int in_dep, int in_x, int in_y, int in_dx, int in_det_ch, int in_cab, int in_rm, int in_qie, int in_adc, int in_rm_fi)
 
 ~ZDCLogicalMapEntry ()
 

Private Attributes

uint32_t hcalEID_
 
uint32_t hcalZDCDetID_
 
int myadc_
 
int mycable_
 
int mydet_ch_
 
int mydx_
 
int myqie_
 
int myrm_
 
int myrm_fi_
 
int myx_
 
int myy_
 

Detailed Description

Definition at line 129 of file HcalMappingEntry.h.

Constructor & Destructor Documentation

ZDCLogicalMapEntry::ZDCLogicalMapEntry ( )
inline

Definition at line 137 of file HcalMappingEntry.h.

137 {}
ZDCLogicalMapEntry::ZDCLogicalMapEntry ( 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,
std::string  in_s_det,
int  in_sid,
int  in_dep,
int  in_x,
int  in_y,
int  in_dx,
int  in_det_ch,
int  in_cab,
int  in_rm,
int  in_qie,
int  in_adc,
int  in_rm_fi 
)

Definition at line 289 of file HcalMappingEntry.cc.

References HcalZDCDetId::EM, HcalZDCDetId::HAD, HcalZDCDetId::LUM, HcalElectronicsId::rawId(), DetId::rawId(), HcalElectronicsId::setHTR(), and HcalZDCDetId::Unknown.

295 {
296  int mytopbot;
297  (in_s_fpga=="bot") ? mytopbot = 0 : mytopbot = 1;
298 
299  myx_ = in_x;
300  myy_ = in_y;
301  mydx_ = in_dx;
302  mycable_ = in_cab;
303  myrm_ = in_rm;
304  myqie_ = in_qie;
305  myadc_ = in_adc;
306  myrm_fi_ = in_rm_fi;
307 
308  // create the hcal electronics id
309  HcalElectronicsId heid( in_fi_ch, in_htr_fi, in_spigot, in_fed - 700 );
310  heid.setHTR( in_cr, in_htr, mytopbot );
311 
312  //create the hcal det id
313  bool myzdccheck;
314  HcalZDCDetId::Section myzdcsec;
315  if (in_s_det=="ZDC_EM") myzdcsec = HcalZDCDetId::EM;
316  else if (in_s_det=="ZDC_HAD") myzdcsec = HcalZDCDetId::HAD;
317  else if (in_s_det=="ZDC_LUM") myzdcsec = HcalZDCDetId::LUM;
318  else myzdcsec = HcalZDCDetId::Unknown;
319 
320  (in_sid > 0) ? myzdccheck = true : myzdccheck = false;
321  HcalZDCDetId hzdcdid( myzdcsec, myzdccheck, in_det_ch );
322 
323  // store the different ids
324  hcalEID_ = heid.rawId();
325  hcalZDCDetID_ = hzdcdid.rawId();
326 
327 }
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
ZDCLogicalMapEntry::~ZDCLogicalMapEntry ( )
inline

Definition at line 145 of file HcalMappingEntry.h.

145 { }

Member Function Documentation

const DetId ZDCLogicalMapEntry::getDetId ( ) const
inline

Definition at line 150 of file HcalMappingEntry.h.

References hcalZDCDetID_.

150 {return DetId(hcalZDCDetID_);}
Definition: DetId.h:18
const HcalElectronicsId ZDCLogicalMapEntry::getHcalElectronicsId ( ) const
inline

Definition at line 149 of file HcalMappingEntry.h.

References hcalEID_.

149 {return HcalElectronicsId(hcalEID_);}
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
const uint32_t ZDCLogicalMapEntry::getLinearIndex ( ) const
inline

Definition at line 148 of file HcalMappingEntry.h.

References hcalEID_, and HcalElectronicsId::linearIndex().

Referenced by HcalLogicalMapGenerator::buildZDCMap().

int linearIndex() const
get a fast, compact, unique index for linear lookups (maximum value = 16384)
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
char * ZDCLogicalMapEntry::printLMapLine ( )

Definition at line 329 of file HcalMappingEntry.cc.

References HcalZDCDetId::channel(), HcalElectronicsId::dccid(), HcalZDCDetId::depth(), HcalElectronicsId::fiberChanId(), HcalElectronicsId::fiberIndex(), HcalElectronicsId::htrSlot(), HcalElectronicsId::htrTopBottom(), HcalElectronicsId::readoutVMECrateId(), HcalZDCDetId::section(), HcalElectronicsId::spigot(), and HcalZDCDetId::zside().

329  {
330 
331  static char myline[512];
332 
333  HcalElectronicsId hcaleid(hcalEID_);
334  HcalZDCDetId hcalzdcid(hcalZDCDetID_);
335  HcalGenericDetId hcalgenid(hcalZDCDetID_);
336 
337  int mydcc_sl = -1;
338  int mydcc = -1;
339  if ((hcaleid.dccid()%2)==1) {
340  mydcc_sl = 20;
341  mydcc = 2;
342  }
343  else {
344  mydcc_sl = 10;
345  mydcc = 1;
346  }
347 
348  string myfpga ="";
349  string mydet ="ZDC_";
350  HcalZDCDetId::Section myzdcsec = hcalzdcid.section();
351 
352  if (myzdcsec==0) mydet += "Unknown";
353  else if (myzdcsec==1) mydet += "EM";
354  else if (myzdcsec==2) mydet += "HAD";
355  else mydet += "LUM";
356 
357  (hcaleid.htrTopBottom()==0) ? myfpga = "bot" : myfpga = "top";
358 
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);
362 
363  return myline;
364 }
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...

Member Data Documentation

uint32_t ZDCLogicalMapEntry::hcalEID_
private

Definition at line 154 of file HcalMappingEntry.h.

Referenced by getHcalElectronicsId(), and getLinearIndex().

uint32_t ZDCLogicalMapEntry::hcalZDCDetID_
private

Definition at line 155 of file HcalMappingEntry.h.

Referenced by getDetId().

int ZDCLogicalMapEntry::myadc_
private

Definition at line 158 of file HcalMappingEntry.h.

int ZDCLogicalMapEntry::mycable_
private

Definition at line 158 of file HcalMappingEntry.h.

int ZDCLogicalMapEntry::mydet_ch_
private

Definition at line 158 of file HcalMappingEntry.h.

int ZDCLogicalMapEntry::mydx_
private

Definition at line 158 of file HcalMappingEntry.h.

int ZDCLogicalMapEntry::myqie_
private

Definition at line 158 of file HcalMappingEntry.h.

int ZDCLogicalMapEntry::myrm_
private

Definition at line 158 of file HcalMappingEntry.h.

int ZDCLogicalMapEntry::myrm_fi_
private

Definition at line 158 of file HcalMappingEntry.h.

int ZDCLogicalMapEntry::myx_
private

Definition at line 158 of file HcalMappingEntry.h.

int ZDCLogicalMapEntry::myy_
private

Definition at line 158 of file HcalMappingEntry.h.