#include <HcalMappingEntry.h>
Public Member Functions | |
const DetId | getDetId () const |
const HcalElectronicsId | getHcalElectronicsId () const |
const HcalFrontEndId | getHcalFrontEndId () const |
const uint32_t | getLinearIndex () const |
HOHXLogicalMapEntry (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, std::string in_s_det, int in_sid, int in_et, int in_ph, int in_dep, int in_dph, int in_sec, int in_rm, int in_rm_fi, int in_pix, int in_qie, int in_adc, std::string in_s_rbx, std::string in_s_let) | |
HOHXLogicalMapEntry () | |
char * | printLMapLine () |
~HOHXLogicalMapEntry () | |
Private Attributes | |
uint32_t | hcalDetID_ |
uint32_t | hcalEID_ |
uint32_t | hcalFrontEndID_ |
int | mydphi_ |
std::string | myletter_ |
int | mysector_ |
Definition at line 54 of file HcalMappingEntry.h.
HOHXLogicalMapEntry::HOHXLogicalMapEntry | ( | ) | [inline] |
Definition at line 62 of file HcalMappingEntry.h.
{}
HOHXLogicalMapEntry::HOHXLogicalMapEntry | ( | 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, | ||
std::string | in_s_det, | ||
int | in_sid, | ||
int | in_et, | ||
int | in_ph, | ||
int | in_dep, | ||
int | in_dph, | ||
int | in_sec, | ||
int | in_rm, | ||
int | in_rm_fi, | ||
int | in_pix, | ||
int | in_qie, | ||
int | in_adc, | ||
std::string | in_s_rbx, | ||
std::string | in_s_let | ||
) |
Definition at line 104 of file HcalMappingEntry.cc.
References HcalOuter, HcalFrontEndId::rawId(), HcalElectronicsId::rawId(), DetId::rawId(), and HcalElectronicsId::setHTR().
{ int mytopbot; (in_s_fpga=="bot") ? mytopbot = 0 : mytopbot = 1; mydphi_ = in_dph; mysector_ = in_sec; // string data members myletter_ = in_s_let; // create the hcal electronics id HcalElectronicsId heid( in_fi_ch, in_htr_fi, in_spig, in_fed - 700 ); heid.setHTR( in_cr, in_htr, mytopbot ); if (in_s_det=="HO") { //create the hcal det id in the case of regular HO channel HcalDetId hdid( HcalOuter, in_sid*in_et, in_ph, in_dep ); hcalDetID_ = hdid.rawId(); } else { //create the calib det id in the case of HO cross talk channels HcalCalibDetId hdid( in_sid*in_et, in_ph ); hcalDetID_ = hdid.rawId(); } HcalFrontEndId hrbx( in_s_rbx, in_rm, in_pix, in_rm_fi, in_fi_ch, in_qie, in_adc ); // store the different ids hcalEID_ = heid.rawId(); hcalFrontEndID_ = hrbx.rawId(); }
HOHXLogicalMapEntry::~HOHXLogicalMapEntry | ( | ) | [inline] |
Definition at line 70 of file HcalMappingEntry.h.
{}
const DetId HOHXLogicalMapEntry::getDetId | ( | ) | const [inline] |
Definition at line 75 of file HcalMappingEntry.h.
References hcalDetID_.
Referenced by HcalLogicalMapGenerator::buildHOXMap().
{return DetId(hcalDetID_);}
const HcalElectronicsId HOHXLogicalMapEntry::getHcalElectronicsId | ( | ) | const [inline] |
Definition at line 74 of file HcalMappingEntry.h.
References hcalEID_.
{return HcalElectronicsId(hcalEID_);}
const HcalFrontEndId HOHXLogicalMapEntry::getHcalFrontEndId | ( | ) | const [inline] |
Definition at line 76 of file HcalMappingEntry.h.
References hcalFrontEndID_.
{return HcalFrontEndId(hcalFrontEndID_);}
const uint32_t HOHXLogicalMapEntry::getLinearIndex | ( | ) | const [inline] |
Definition at line 73 of file HcalMappingEntry.h.
References hcalEID_, and HcalElectronicsId::linearIndex().
Referenced by HcalLogicalMapGenerator::buildHOXMap().
{return HcalElectronicsId(hcalEID_).linearIndex();}
char * HOHXLogicalMapEntry::printLMapLine | ( | ) |
Definition at line 142 of file HcalMappingEntry.cc.
References HcalFrontEndId::adc(), HcalElectronicsId::dccid(), HcalDetId::depth(), HcalElectronicsId::fiberChanId(), HcalElectronicsId::fiberIndex(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalElectronicsId::htrSlot(), HcalElectronicsId::htrTopBottom(), HcalCalibDetId::ieta(), HcalDetId::ietaAbs(), HcalCalibDetId::iphi(), HcalDetId::iphi(), HcalGenericDetId::isHcalCalibDetId(), HcalGenericDetId::isHcalDetId(), HcalFrontEndId::pixel(), HcalFrontEndId::qieCard(), HcalFrontEndId::rbx(), HcalElectronicsId::readoutVMECrateId(), HcalFrontEndId::rm(), HcalFrontEndId::rmFiber(), HcalElectronicsId::spigot(), HcalDetId::subdet(), HcalCalibDetId::zside(), and HcalDetId::zside().
{ static char myline[512]; HcalElectronicsId hcaleid(hcalEID_); HcalGenericDetId hcalgenid(hcalDetID_); HcalFrontEndId rbxid(hcalFrontEndID_); int mydcc_sl = 0; int mydcc = 0; if ((hcaleid.dccid()%2)==1) { mydcc_sl = 20; mydcc = 2; } else { mydcc_sl = 10; mydcc = 1; } string myfpga = ""; string mydet = ""; int mydepth = 0; int myside = -2; int myeta = 0; int myphi = -1; if ( hcalgenid.isHcalCalibDetId() ) { HcalCalibDetId hcalcompid(hcalDetID_); mydet = "HOX"; mydepth = 4; myside = hcalcompid.zside(); myeta = hcalcompid.ieta()*myside; myphi = hcalcompid.iphi(); } else if ( hcalgenid.isHcalDetId() ) { HcalDetId hcalcompid(hcalDetID_); HcalSubdetector mysubdet = hcalcompid.subdet(); (mysubdet==HcalBarrel) ? mydet = "HB" : ((mysubdet==HcalEndcap) ? mydet = "HE" : ((mysubdet==HcalOuter) ? mydet = "HO" : ((mysubdet==HcalForward) ? mydet = "HF" : mydet = "invalid"))); mydepth = hcalcompid.depth(); myside = hcalcompid.zside(); myeta = hcalcompid.ietaAbs(); myphi = hcalcompid.iphi(); } ( hcaleid.htrTopBottom()==0 ) ? myfpga = "bot" : myfpga = "top"; 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()); sprintf(myline+strlen(myline),"%6d %6d %6d %6d %8s %6d %6d %6s",rbxid.qieCard(),rbxid.adc(),rbxid.rmFiber(),hcaleid.fiberChanId(),myletter_.c_str(),hcaleid.readoutVMECrateId(),hcaleid.htrSlot(),myfpga.c_str()); sprintf(myline+strlen(myline),"%8d %7d %6d %6d %6d\n",hcaleid.fiberIndex(),mydcc_sl,hcaleid.spigot(),mydcc,hcaleid.dccid()+700); return myline; }
uint32_t HOHXLogicalMapEntry::hcalDetID_ [private] |
Definition at line 81 of file HcalMappingEntry.h.
Referenced by getDetId().
uint32_t HOHXLogicalMapEntry::hcalEID_ [private] |
Definition at line 80 of file HcalMappingEntry.h.
Referenced by getHcalElectronicsId(), and getLinearIndex().
uint32_t HOHXLogicalMapEntry::hcalFrontEndID_ [private] |
Definition at line 82 of file HcalMappingEntry.h.
Referenced by getHcalFrontEndId().
int HOHXLogicalMapEntry::mydphi_ [private] |
Definition at line 85 of file HcalMappingEntry.h.
std::string HOHXLogicalMapEntry::myletter_ [private] |
Definition at line 86 of file HcalMappingEntry.h.
int HOHXLogicalMapEntry::mysector_ [private] |
Definition at line 85 of file HcalMappingEntry.h.