CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CALIBLogicalMapEntry Class Reference

#include <HcalMappingEntry.h>

Public Member Functions

 CALIBLogicalMapEntry ()
 
 CALIBLogicalMapEntry (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_et, int in_ph, int in_ch_ty, int in_sid, int in_dph, std::string in_s_rbx, int in_wed, int in_rm_fi, std::string in_s_subdet)
 
const DetId getDetId () const
 
const HcalElectronicsId getHcalElectronicsId () const
 
const HcalFrontEndId getHcalFrontEndId () const
 
const uint32_t getLinearIndex () const
 
char * printLMapLine ()
 
 ~CALIBLogicalMapEntry ()
 

Private Attributes

uint32_t hcalCalibDetID_
 
uint32_t hcalEID_
 
uint32_t hcalFrontEndID_
 
std::string mycalibsubdet_
 
int mydphi_
 
int myside_
 
int mywedge_
 

Detailed Description

Definition at line 91 of file HcalMappingEntry.h.

Constructor & Destructor Documentation

CALIBLogicalMapEntry::CALIBLogicalMapEntry ( )
inline

Definition at line 100 of file HcalMappingEntry.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

100 {}
CALIBLogicalMapEntry::CALIBLogicalMapEntry ( 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_et,
int  in_ph,
int  in_ch_ty,
int  in_sid,
int  in_dph,
std::string  in_s_rbx,
int  in_wed,
int  in_rm_fi,
std::string  in_s_subdet 
)

Definition at line 201 of file HcalMappingEntry.cc.

References HcalBarrel, HcalEmpty, HcalEndcap, HcalForward, HcalOuter, HcalFrontEndId::rawId(), DetId::rawId(), HcalElectronicsId::rawId(), and HcalElectronicsId::setHTR().

207 {
208  int mytopbot;
209  (in_s_fpga=="bot") ? mytopbot = 0 : mytopbot = 1;
210 
211  myside_ = in_sid;
212  mydphi_ = in_dph;
213  mywedge_ = in_wed;
214  // string data members
215  mycalibsubdet_ = in_s_subdet;
216 
217  //create the hcal electronics id
218  HcalElectronicsId heid( in_fi_ch, in_htr_fi, in_spig, in_fed - 700 );
219  heid.setHTR( in_cr, in_htr, mytopbot );
220 
221  //create the hcal det id for a calibration unit channel
222  HcalSubdetector mysubdet = HcalEmpty;
223  if (in_s_det=="HB") mysubdet = HcalBarrel;
224  else if (in_s_det=="HE") mysubdet = HcalEndcap;
225  else if (in_s_det=="HO") mysubdet = HcalOuter;
226  else if (in_s_det=="HF") mysubdet = HcalForward;
227 
228  HcalCalibDetId hcalibdid( mysubdet, in_et, in_ph, in_ch_ty );
229 
230  int in_rm, in_pix, in_qie, in_adc;
231  //CM RM in HF is 4 rather than 5
232  if (in_s_det=="HF")
233  in_rm = 4;
234  else
235  in_rm = 5;
236 
237  in_pix = 0;
238  in_qie = 1;
239  in_adc = in_fi_ch + ( 3 * ( in_rm_fi - 1 ) );
240 
241  HcalFrontEndId hrbx( in_s_rbx, in_rm, in_pix, in_rm_fi, in_fi_ch, in_qie, in_adc );
242 
243  //store the different ids
244  hcalEID_ = heid.rawId();
245  hcalCalibDetID_ = hcalibdid.rawId();
246  hcalFrontEndID_ = hrbx.rawId();
247 }
HcalSubdetector
Definition: HcalAssistant.h:31
Readout chain identification for Hcal.
CALIBLogicalMapEntry::~CALIBLogicalMapEntry ( )
inline

Definition at line 108 of file HcalMappingEntry.h.

References HBHEHFLogicalMapEntry::printLMapLine().

108 {}

Member Function Documentation

const DetId CALIBLogicalMapEntry::getDetId ( ) const
inline

Definition at line 113 of file HcalMappingEntry.h.

Referenced by HcalLogicalMapGenerator::buildCALIBMap().

113 {return DetId(hcalCalibDetID_);}
Definition: DetId.h:18
const HcalElectronicsId CALIBLogicalMapEntry::getHcalElectronicsId ( ) const
inline

Definition at line 112 of file HcalMappingEntry.h.

References HBHEHFLogicalMapEntry::hcalEID_.

112 {return HcalElectronicsId(hcalEID_);}
Readout chain identification for Hcal.
const HcalFrontEndId CALIBLogicalMapEntry::getHcalFrontEndId ( ) const
inline
const uint32_t CALIBLogicalMapEntry::getLinearIndex ( ) const
inline

Definition at line 111 of file HcalMappingEntry.h.

References HBHEHFLogicalMapEntry::hcalEID_, and HcalElectronicsId::linearIndex().

Referenced by HcalLogicalMapGenerator::buildCALIBMap().

int linearIndex() const
get a fast, compact, unique index for linear lookups
Readout chain identification for Hcal.
char * CALIBLogicalMapEntry::printLMapLine ( )

Definition at line 249 of file HcalMappingEntry.cc.

References HcalCalibDetId::cboxChannel(), HcalElectronicsId::dccid(), HcalElectronicsId::fiberChanId(), HcalElectronicsId::fiberIndex(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalCalibDetId::hcalSubdet(), HcalElectronicsId::htrSlot(), HcalElectronicsId::htrTopBottom(), HcalCalibDetId::ieta(), HcalCalibDetId::iphi(), HcalFrontEndId::rbx(), HcalElectronicsId::readoutVMECrateId(), HcalFrontEndId::rm(), HcalFrontEndId::rmFiber(), and HcalElectronicsId::spigot().

249  {
250 
251  static char myline[512];
252 
253  HcalElectronicsId hcaleid(hcalEID_);
254  HcalCalibDetId hcalcalibid(hcalCalibDetID_);
257 
258  int mydcc_sl = 0;
259  int mydcc = 0;
260  if ((hcaleid.dccid()%2)==1) {
261  mydcc_sl = 20;
262  mydcc = 2;
263  }
264  else {
265  mydcc_sl = 10;
266  mydcc = 1;
267  }
268 
269  string myfpga = "";
270  string mydet = "";
271  HcalSubdetector mysubdet = hcalcalibid.hcalSubdet();
272  (mysubdet==HcalBarrel) ? mydet = "HB" :
273  ((mysubdet==HcalEndcap) ? mydet = "HE" :
274  ((mysubdet==HcalOuter) ? mydet = "HO" :
275  ((mysubdet==HcalForward) ? mydet = "HF" :
276  mydet = "invalid")));
277  (hcaleid.htrTopBottom()==0) ? myfpga = "bot" : myfpga = "top";
278 
279  sprintf(myline,"%1d %6d %6d %6d %6d %6s %7s",0,myside_,hcalcalibid.ieta(),hcalcalibid.iphi(),mydphi_,mydet.c_str(),rbxid.rbx().c_str());
280  sprintf(myline+strlen(myline),"%8d %6d %6d %6d %6d %4d %5s",mywedge_,rbxid.rm(),rbxid.rmFiber(),hcaleid.fiberChanId(),hcaleid.readoutVMECrateId(),hcaleid.htrSlot(),myfpga.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());
282 
283  return myline;
284 }
HcalSubdetector
Definition: HcalAssistant.h:31
Readout chain identification for Hcal.

Member Data Documentation

uint32_t CALIBLogicalMapEntry::hcalCalibDetID_
private

Definition at line 119 of file HcalMappingEntry.h.

uint32_t CALIBLogicalMapEntry::hcalEID_
private

Definition at line 118 of file HcalMappingEntry.h.

uint32_t CALIBLogicalMapEntry::hcalFrontEndID_
private

Definition at line 120 of file HcalMappingEntry.h.

std::string CALIBLogicalMapEntry::mycalibsubdet_
private

Definition at line 124 of file HcalMappingEntry.h.

int CALIBLogicalMapEntry::mydphi_
private

Definition at line 123 of file HcalMappingEntry.h.

int CALIBLogicalMapEntry::myside_
private

Definition at line 123 of file HcalMappingEntry.h.

int CALIBLogicalMapEntry::mywedge_
private

Definition at line 123 of file HcalMappingEntry.h.