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 202 of file HcalMappingEntry.h.

Constructor & Destructor Documentation

◆ HTLogicalMapEntry() [1/2]

HTLogicalMapEntry::HTLogicalMapEntry ( )
inline

Definition at line 208 of file HcalMappingEntry.h.

208 {}

◆ HTLogicalMapEntry() [2/2]

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 539 of file HcalMappingEntry.cc.

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

559  {
560  myside_ = in_sid;
561  mydphi_ = in_dph;
562  mydepth_ = in_dep;
563  mywedge_ = in_wed;
564  myrctcra_ = in_rctcra;
565  myrctcar_ = in_rctcar;
566  myrctcon_ = in_rctcon;
567 
568  // string data members
569  mydet_ = in_s_chDet;
570  myslbin_ = in_s_slb;
571  myslbin2_ = in_s_slb2;
572  myslnam_ = in_s_slnam;
573  myrctnam_ = in_s_rctnam;
574 
575  // necessary since LMap code makes top = 0, bottom = 1, but det ids have top = 1, bottom = 0
576  int top = 1;
577  in_tb == 1 ? top = 0 : top = 1;
578  //create an hcal electronics id for the trigger tower, idea copied from CalibCalorimetry/HcalAlgos/src/HcalDBASCIIIO.cc
579  HcalElectronicsId hteid(in_ndat, in_slb, in_spig, in_fed - 700, in_cr, in_htr, top);
580  //HcalElectronicsId hteid( slbCh, slb, spigot, dcc, crate, slot, top );
581 
582  //create the hcal trigger tower det id
583  HcalTrigTowerDetId htrigdid(in_et, in_ph);
584 
585  // store the different ids
586  hcalTrigEID_ = hteid.rawId();
587  hcalTrigDetID_ = htrigdid.rawId();
588 }
Readout chain identification for Hcal.

◆ ~HTLogicalMapEntry()

HTLogicalMapEntry::~HTLogicalMapEntry ( )
inline

Definition at line 231 of file HcalMappingEntry.h.

231 {}

Member Function Documentation

◆ getDetId()

const DetId HTLogicalMapEntry::getDetId ( ) const
inline

Definition at line 236 of file HcalMappingEntry.h.

References hcalTrigDetID_.

236 { return DetId(hcalTrigDetID_); }
Definition: DetId.h:17

◆ getHcalTrigElectronicsId()

const HcalElectronicsId HTLogicalMapEntry::getHcalTrigElectronicsId ( ) const
inline

Definition at line 235 of file HcalMappingEntry.h.

References hcalTrigEID_.

235 { return HcalElectronicsId(hcalTrigEID_); }
Readout chain identification for Hcal.

◆ getLinearIndex()

const uint32_t HTLogicalMapEntry::getLinearIndex ( ) const
inline

Definition at line 234 of file HcalMappingEntry.h.

References hcalTrigEID_, and HcalElectronicsId::linearIndex().

constexpr int32_t linearIndex() const
get a fast, compact, unique index for linear lookups
Readout chain identification for Hcal.

◆ printLMapLine()

char * HTLogicalMapEntry::printLMapLine ( )

Definition at line 590 of file HcalMappingEntry.cc.

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

590  {
591  static char myline[512];
592  HcalElectronicsId hcaltrigeid(hcalTrigEID_);
594  HcalGenericDetId hcalgenid(hcalTrigDetID_);
595 
596  int mydcc_sl = 0;
597  int mydcc = 0;
598  if ((hcaltrigeid.dccid() % 2) == 1) {
599  mydcc_sl = 20;
600  mydcc = 2;
601  } else {
602  mydcc_sl = 10;
603  mydcc = 1;
604  }
605 
606  string myfpga = "";
607  (hcaltrigeid.htrTopBottom() == 0) ? myfpga = "bot" : myfpga = "top";
608 
609  sprintf(myline,
610  "%1d %5d %4d %4d %5d %6d %4s %7d %6d ",
611  0,
612  myside_,
613  hcaltrigid.ieta(),
614  hcaltrigid.iphi(),
615  mydphi_,
616  mydepth_,
617  mydet_.c_str(),
618  mywedge_,
619  hcaltrigeid.readoutVMECrateId());
620  sprintf(myline + strlen(myline),
621  "%4d %5s %7d %6d %4d %4d %6s %7s %5d ",
622  hcaltrigeid.htrSlot(),
623  myfpga.c_str(),
624  mydcc_sl,
625  hcaltrigeid.spigot(),
626  mydcc,
627  hcaltrigeid.slbSiteNumber(),
628  myslbin_.c_str(),
629  myslbin2_.c_str(),
630  hcaltrigeid.slbChannelIndex());
631  sprintf(myline + strlen(myline),
632  "%13s %7d %7d %7d %17s %6d\n",
633  myslnam_.c_str(),
634  myrctcra_,
635  myrctcar_,
636  myrctcon_,
637  myrctnam_.c_str(),
638  hcaltrigeid.dccid() + 700);
639 
640  return myline;
641 }
Readout chain identification for Hcal.

Member Data Documentation

◆ hcalTrigDetID_

uint32_t HTLogicalMapEntry::hcalTrigDetID_
private

Definition at line 241 of file HcalMappingEntry.h.

Referenced by getDetId().

◆ hcalTrigEID_

uint32_t HTLogicalMapEntry::hcalTrigEID_
private

Definition at line 240 of file HcalMappingEntry.h.

Referenced by getHcalTrigElectronicsId(), and getLinearIndex().

◆ mydepth_

int HTLogicalMapEntry::mydepth_
private

Definition at line 244 of file HcalMappingEntry.h.

◆ mydet_

std::string HTLogicalMapEntry::mydet_
private

Definition at line 248 of file HcalMappingEntry.h.

◆ mydphi_

int HTLogicalMapEntry::mydphi_
private

Definition at line 244 of file HcalMappingEntry.h.

◆ myrctcar_

int HTLogicalMapEntry::myrctcar_
private

Definition at line 246 of file HcalMappingEntry.h.

◆ myrctcon_

int HTLogicalMapEntry::myrctcon_
private

Definition at line 246 of file HcalMappingEntry.h.

◆ myrctcra_

int HTLogicalMapEntry::myrctcra_
private

Definition at line 246 of file HcalMappingEntry.h.

◆ myrctnam_

std::string HTLogicalMapEntry::myrctnam_
private

Definition at line 248 of file HcalMappingEntry.h.

◆ myside_

int HTLogicalMapEntry::myside_
private

Definition at line 244 of file HcalMappingEntry.h.

◆ myslbin2_

std::string HTLogicalMapEntry::myslbin2_
private

Definition at line 248 of file HcalMappingEntry.h.

◆ myslbin_

std::string HTLogicalMapEntry::myslbin_
private

Definition at line 248 of file HcalMappingEntry.h.

◆ myslnam_

std::string HTLogicalMapEntry::myslnam_
private

Definition at line 248 of file HcalMappingEntry.h.

◆ mywedge_

int HTLogicalMapEntry::mywedge_
private

Definition at line 244 of file HcalMappingEntry.h.