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
HOHXLogicalMapEntry Class Reference

#include <HcalMappingEntry.h>

Public Member Functions

const DetId getDetId () const
 
const HcalElectronicsId getHcalElectronicsId () const
 
const HcalFrontEndId getHcalFrontEndId () const
 
const uint32_t getLinearIndex () const
 
 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)
 
char * printLMapLine ()
 
 ~HOHXLogicalMapEntry ()
 

Private Attributes

uint32_t hcalDetID_
 
uint32_t hcalEID_
 
uint32_t hcalFrontEndID_
 
int mydphi_
 
std::string myletter_
 
int mysector_
 

Detailed Description

Definition at line 54 of file HcalMappingEntry.h.

Constructor & Destructor Documentation

HOHXLogicalMapEntry::HOHXLogicalMapEntry ( )
inline

Definition at line 62 of file HcalMappingEntry.h.

62 {}
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().

110 {
111  int mytopbot;
112  (in_s_fpga=="bot") ? mytopbot = 0 : mytopbot = 1;
113 
114  mydphi_ = in_dph;
115  mysector_ = in_sec;
116  // string data members
117  myletter_ = in_s_let;
118 
119  // create the hcal electronics id
120  HcalElectronicsId heid( in_fi_ch, in_htr_fi, in_spig, in_fed - 700 );
121  heid.setHTR( in_cr, in_htr, mytopbot );
122 
123  if (in_s_det=="HO") {
124  //create the hcal det id in the case of regular HO channel
125  HcalDetId hdid( HcalOuter, in_sid*in_et, in_ph, in_dep );
126  hcalDetID_ = hdid.rawId();
127  }
128  else {
129  //create the calib det id in the case of HO cross talk channels
130  HcalCalibDetId hdid( in_sid*in_et, in_ph );
131  hcalDetID_ = hdid.rawId();
132  }
133 
134  HcalFrontEndId hrbx( in_s_rbx, in_rm, in_pix, in_rm_fi, in_fi_ch, in_qie, in_adc );
135 
136  // store the different ids
137  hcalEID_ = heid.rawId();
138  hcalFrontEndID_ = hrbx.rawId();
139 
140 }
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
HOHXLogicalMapEntry::~HOHXLogicalMapEntry ( )
inline

Definition at line 70 of file HcalMappingEntry.h.

70 {}

Member Function Documentation

const DetId HOHXLogicalMapEntry::getDetId ( ) const
inline

Definition at line 75 of file HcalMappingEntry.h.

References hcalDetID_.

Referenced by HcalLogicalMapGenerator::buildHOXMap().

75 {return DetId(hcalDetID_);}
Definition: DetId.h:20
const HcalElectronicsId HOHXLogicalMapEntry::getHcalElectronicsId ( ) const
inline

Definition at line 74 of file HcalMappingEntry.h.

References hcalEID_.

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

Definition at line 76 of file HcalMappingEntry.h.

References 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().

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 * 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(), HcalDetId::iphi(), HcalCalibDetId::iphi(), HcalGenericDetId::isHcalCalibDetId(), HcalGenericDetId::isHcalDetId(), HcalFrontEndId::pixel(), HcalFrontEndId::qieCard(), HcalFrontEndId::rbx(), HcalElectronicsId::readoutVMECrateId(), HcalFrontEndId::rm(), HcalFrontEndId::rmFiber(), HcalElectronicsId::spigot(), HcalDetId::subdet(), HcalDetId::zside(), and HcalCalibDetId::zside().

142  {
143 
144  static char myline[512];
145 
146  HcalElectronicsId hcaleid(hcalEID_);
147  HcalGenericDetId hcalgenid(hcalDetID_);
149 
150  int mydcc_sl = 0;
151  int mydcc = 0;
152  if ((hcaleid.dccid()%2)==1) {
153  mydcc_sl = 20;
154  mydcc = 2;
155  }
156  else {
157  mydcc_sl = 10;
158  mydcc = 1;
159  }
160 
161  string myfpga = "";
162  string mydet = "";
163  int mydepth = 0;
164  int myside = -2;
165  int myeta = 0;
166  int myphi = -1;
167  if ( hcalgenid.isHcalCalibDetId() ) {
168  HcalCalibDetId hcalcompid(hcalDetID_);
169  mydet = "HOX";
170  mydepth = 4;
171  myside = hcalcompid.zside();
172  myeta = hcalcompid.ieta()*myside;
173  myphi = hcalcompid.iphi();
174  }
175  else if ( hcalgenid.isHcalDetId() ) {
176  HcalDetId hcalcompid(hcalDetID_);
177  HcalSubdetector mysubdet = hcalcompid.subdet();
178  (mysubdet==HcalBarrel) ? mydet = "HB" :
179  ((mysubdet==HcalEndcap) ? mydet = "HE" :
180  ((mysubdet==HcalOuter) ? mydet = "HO" :
181  ((mysubdet==HcalForward) ? mydet = "HF" :
182  mydet = "invalid")));
183  mydepth = hcalcompid.depth();
184  myside = hcalcompid.zside();
185  myeta = hcalcompid.ietaAbs();
186  myphi = hcalcompid.iphi();
187  }
188 
189  ( hcaleid.htrTopBottom()==0 ) ? myfpga = "bot" : myfpga = "top";
190 
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());
192  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());
193  sprintf(myline+strlen(myline),"%8d %7d %6d %6d %6d\n",hcaleid.fiberIndex(),mydcc_sl,hcaleid.spigot(),mydcc,hcaleid.dccid()+700);
194 
195  return myline;
196 }
HcalSubdetector
Definition: HcalAssistant.h:32
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...

Member Data Documentation

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.