CMS 3D CMS Logo

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

#include <HcalMappingEntry.h>

Public Member Functions

const DetId getDetId () const
 
const HcalElectronicsId getHcalTrigElectronicsId () const
 
const uint32_t getLinearIndex () const
 
 HTLogicalMapEntry ()
 
 HTLogicalMapEntry (int in_et, int in_ph, 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, int in_spig, int in_slb, std::string in_s_slb, std::string in_s_slb2, int in_ndat, std::string in_s_slnam, int in_rctcra, int in_rctcar, int in_rctcon, std::string in_s_rctnam, int in_fed)
 
char * printLMapLine ()
 
 ~HTLogicalMapEntry ()
 

Private Attributes

uint32_t hcalTrigDetID_
 
uint32_t hcalTrigEID_
 
int mydepth_
 
std::string mydet_
 
int mydphi_
 
int myrctcar_
 
int myrctcon_
 
int myrctcra_
 
std::string myrctnam_
 
int myside_
 
std::string myslbin2_
 
std::string myslbin_
 
std::string myslnam_
 
int mywedge_
 

Detailed Description

Definition at line 163 of file HcalMappingEntry.h.

Constructor & Destructor Documentation

HTLogicalMapEntry::HTLogicalMapEntry ( )
inline

Definition at line 171 of file HcalMappingEntry.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

171 {}
HTLogicalMapEntry::HTLogicalMapEntry ( int  in_et,
int  in_ph,
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,
int  in_spig,
int  in_slb,
std::string  in_s_slb,
std::string  in_s_slb2,
int  in_ndat,
std::string  in_s_slnam,
int  in_rctcra,
int  in_rctcar,
int  in_rctcon,
std::string  in_s_rctnam,
int  in_fed 
)

Definition at line 371 of file HcalMappingEntry.cc.

References DetId::rawId(), and HcalElectronicsId::rawId().

377 {
378  myside_ = in_sid;
379  mydphi_ = in_dph;
380  mydepth_ = in_dep;
381  mywedge_ = in_wed;
382  myrctcra_ = in_rctcra;
383  myrctcar_ = in_rctcar;
384  myrctcon_ = in_rctcon;
385 
386  // string data members
387  mydet_ = in_s_chDet;
388  myslbin_ = in_s_slb;
389  myslbin2_ = in_s_slb2;
390  myslnam_ = in_s_slnam;
391  myrctnam_ = in_s_rctnam;
392 
393  // necessary since LMap code makes top = 0, bottom = 1, but det ids have top = 1, bottom = 0
394  int top = 1;
395  in_tb == 1 ? top = 0 : top = 1;
396  //create an hcal electronics id for the trigger tower, idea copied from CalibCalorimetry/HcalAlgos/src/HcalDBASCIIIO.cc
397  HcalElectronicsId hteid( in_ndat, in_slb, in_spig, in_fed - 700, in_cr, in_htr, top );
398  //HcalElectronicsId hteid( slbCh, slb, spigot, dcc, crate, slot, top );
399 
400  //create the hcal trigger tower det id
401  HcalTrigTowerDetId htrigdid( in_et, in_ph );
402 
403  // store the different ids
404  hcalTrigEID_ = hteid.rawId();
405  hcalTrigDetID_ = htrigdid.rawId();
406 
407 }
Readout chain identification for Hcal.
HTLogicalMapEntry::~HTLogicalMapEntry ( )
inline

Definition at line 179 of file HcalMappingEntry.h.

References HBHEHFLogicalMapEntry::printLMapLine().

179 {}

Member Function Documentation

const DetId HTLogicalMapEntry::getDetId ( ) const
inline

Definition at line 184 of file HcalMappingEntry.h.

184 {return DetId(hcalTrigDetID_);}
Definition: DetId.h:18
const HcalElectronicsId HTLogicalMapEntry::getHcalTrigElectronicsId ( ) const
inline

Definition at line 183 of file HcalMappingEntry.h.

Readout chain identification for Hcal.
const uint32_t HTLogicalMapEntry::getLinearIndex ( ) const
inline

Definition at line 182 of file HcalMappingEntry.h.

References HcalElectronicsId::linearIndex().

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

Definition at line 409 of file HcalMappingEntry.cc.

References HcalElectronicsId::dccid(), HcalElectronicsId::htrSlot(), HcalElectronicsId::htrTopBottom(), HcalTrigTowerDetId::ieta(), HcalTrigTowerDetId::iphi(), HcalElectronicsId::readoutVMECrateId(), HcalElectronicsId::slbChannelIndex(), HcalElectronicsId::slbSiteNumber(), and HcalElectronicsId::spigot().

409  {
410  static char myline[512];
411  HcalElectronicsId hcaltrigeid(hcalTrigEID_);
413  HcalGenericDetId hcalgenid(hcalTrigDetID_);
414 
415  int mydcc_sl = 0;
416  int mydcc = 0;
417  if ((hcaltrigeid.dccid()%2)==1) {
418  mydcc_sl = 20;
419  mydcc = 2;
420  }
421  else {
422  mydcc_sl = 10;
423  mydcc = 1;
424  }
425 
426  string myfpga ="";
427  ( hcaltrigeid.htrTopBottom()==0 ) ? myfpga = "bot" : myfpga = "top";
428 
429  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());
430  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());
431  sprintf(myline+strlen(myline),"%13s %7d %7d %7d %17s %6d\n",myslnam_.c_str(),myrctcra_,myrctcar_,myrctcon_,myrctnam_.c_str(),hcaltrigeid.dccid()+700);
432 
433  return myline;
434 }
Readout chain identification for Hcal.

Member Data Documentation

uint32_t HTLogicalMapEntry::hcalTrigDetID_
private

Definition at line 190 of file HcalMappingEntry.h.

uint32_t HTLogicalMapEntry::hcalTrigEID_
private

Definition at line 189 of file HcalMappingEntry.h.

int HTLogicalMapEntry::mydepth_
private

Definition at line 193 of file HcalMappingEntry.h.

std::string HTLogicalMapEntry::mydet_
private

Definition at line 197 of file HcalMappingEntry.h.

int HTLogicalMapEntry::mydphi_
private

Definition at line 193 of file HcalMappingEntry.h.

int HTLogicalMapEntry::myrctcar_
private

Definition at line 195 of file HcalMappingEntry.h.

int HTLogicalMapEntry::myrctcon_
private

Definition at line 195 of file HcalMappingEntry.h.

int HTLogicalMapEntry::myrctcra_
private

Definition at line 195 of file HcalMappingEntry.h.

std::string HTLogicalMapEntry::myrctnam_
private

Definition at line 197 of file HcalMappingEntry.h.

int HTLogicalMapEntry::myside_
private

Definition at line 193 of file HcalMappingEntry.h.

std::string HTLogicalMapEntry::myslbin2_
private

Definition at line 197 of file HcalMappingEntry.h.

std::string HTLogicalMapEntry::myslbin_
private

Definition at line 197 of file HcalMappingEntry.h.

std::string HTLogicalMapEntry::myslnam_
private

Definition at line 197 of file HcalMappingEntry.h.

int HTLogicalMapEntry::mywedge_
private

Definition at line 193 of file HcalMappingEntry.h.