CMS 3D CMS Logo

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

#include <HcalTestNumberingScheme.h>

Inheritance diagram for HcalTestNumberingScheme:
HcalNumberingScheme CaloNumberingScheme

Public Member Functions

uint32_t getUnitID (const HcalNumberingFromDDD::HcalID &id) override
 
 HcalTestNumberingScheme (bool forTB)
 
 HcalTestNumberingScheme ()=delete
 
 ~HcalTestNumberingScheme () override
 
- Public Member Functions inherited from HcalNumberingScheme
 HcalNumberingScheme ()
 
 ~HcalNumberingScheme () override
 
- Public Member Functions inherited from CaloNumberingScheme
 CaloNumberingScheme (int iv=0)
 Constructor with optional verbosity control. More...
 
void setVerbosity (int)
 Verbosity setting. More...
 
virtual ~CaloNumberingScheme ()
 

Static Public Member Functions

static uint32_t packHcalIndex (int det, int z, int depth, int eta, int phi, int lay)
 
static void unpackHcalIndex (const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
 

Private Attributes

bool forTBH2
 

Additional Inherited Members

- Protected Attributes inherited from CaloNumberingScheme
int verbosity
 Verbosity field: Zero = quiet, increasing integers mean more output. More...
 

Detailed Description

Definition at line 11 of file HcalTestNumberingScheme.h.

Constructor & Destructor Documentation

◆ HcalTestNumberingScheme() [1/2]

HcalTestNumberingScheme::HcalTestNumberingScheme ( bool  forTB)

Definition at line 13 of file HcalTestNumberingScheme.cc.

References forTBH2.

13  : HcalNumberingScheme(), forTBH2(forTB) {
14  edm::LogVerbatim("HcalSim") << "Creating HcalTestNumberingScheme with TB Flag " << forTBH2;
15 }
Log< level::Info, true > LogVerbatim

◆ HcalTestNumberingScheme() [2/2]

HcalTestNumberingScheme::HcalTestNumberingScheme ( )
delete

◆ ~HcalTestNumberingScheme()

HcalTestNumberingScheme::~HcalTestNumberingScheme ( )
override

Definition at line 17 of file HcalTestNumberingScheme.cc.

17  {
18  edm::LogVerbatim("HcalSim") << "Deleting HcalTestNumberingScheme";
19 }
Log< level::Info, true > LogVerbatim

Member Function Documentation

◆ getUnitID()

uint32_t HcalTestNumberingScheme::getUnitID ( const HcalNumberingFromDDD::HcalID id)
overridevirtual

Reimplemented from HcalNumberingScheme.

Definition at line 21 of file HcalTestNumberingScheme.cc.

References TauDecayModes::dec, hcalRecHitTable_cff::depth, forTBH2, HcalBarrel, HcalTestNumbering::packHcalIndex(), phi, DetId::rawId(), and ecaldqm::zside().

21  {
22  //pack it into an integer
23  uint32_t index = 0;
24  if (forTBH2) {
25  // TB H2 Case
26  int etaR = id.etaR;
27  int phi = id.phis;
28  HcalSubdetector subdet = (HcalSubdetector)(id.subdet);
29  if (subdet == HcalBarrel && phi > 4) { // HB2
30  if (etaR > 4 && etaR < 10)
31  index = HcalDetId(subdet, id.lay, id.phis, 1).rawId();
32  } else { // HB1
33  index = HcalDetId(subdet, etaR, id.phis, id.depth).rawId();
34  }
35  } else {
36  // Test case
37  index = HcalTestNumbering::packHcalIndex(id.subdet, id.zside, id.depth, id.etaR, id.phis, id.lay);
38  }
39 #ifdef EDM_ML_DEBUG
40  edm::LogVerbatim("HcalSim") << "HcalTestNumberingScheme det = " << id.subdet << " depth/lay = " << id.depth << "/"
41  << id.lay << " zside = " << id.zside << " eta/R = " << id.etaR << " phi = " << id.phis
42  << " packed index = 0x" << std::hex << index << std::dec << std::endl;
43 #endif
44  return index;
45 }
Log< level::Info, true > LogVerbatim
int zside(DetId const &)
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
HcalSubdetector
Definition: HcalAssistant.h:31
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ packHcalIndex()

uint32_t HcalTestNumberingScheme::packHcalIndex ( int  det,
int  z,
int  depth,
int  eta,
int  phi,
int  lay 
)
static

Definition at line 47 of file HcalTestNumberingScheme.cc.

References hcalRecHitTable_cff::depth, PVValHelper::eta, HcalTestNumbering::packHcalIndex(), phi, and z.

47  {
48  return HcalTestNumbering::packHcalIndex(det, z, depth, eta, phi, lay);
49 }
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)

◆ unpackHcalIndex()

void HcalTestNumberingScheme::unpackHcalIndex ( const uint32_t &  idx,
int &  det,
int &  z,
int &  depth,
int &  eta,
int &  phi,
int &  lay 
)
static

Member Data Documentation

◆ forTBH2

bool HcalTestNumberingScheme::forTBH2
private

Definition at line 21 of file HcalTestNumberingScheme.h.

Referenced by getUnitID(), and HcalTestNumberingScheme().