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
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.

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

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

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

Definition at line 179 of file HcalMappingEntry.h.

179 {}

Member Function Documentation

const DetId HTLogicalMapEntry::getDetId ( ) const
inline

Definition at line 184 of file HcalMappingEntry.h.

References hcalTrigDetID_.

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

Definition at line 183 of file HcalMappingEntry.h.

References hcalTrigEID_.

Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
const uint32_t HTLogicalMapEntry::getLinearIndex ( ) const
inline

Definition at line 182 of file HcalMappingEntry.h.

References hcalTrigEID_, and HcalElectronicsId::linearIndex().

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 * HTLogicalMapEntry::printLMapLine ( )

Definition at line 407 of file HcalMappingEntry.cc.

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

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

Member Data Documentation

uint32_t HTLogicalMapEntry::hcalTrigDetID_
private

Definition at line 190 of file HcalMappingEntry.h.

Referenced by getDetId().

uint32_t HTLogicalMapEntry::hcalTrigEID_
private

Definition at line 189 of file HcalMappingEntry.h.

Referenced by getHcalTrigElectronicsId(), and getLinearIndex().

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.