#include <HcalTestNumberingScheme.h>
Public Member Functions | |
virtual uint32_t | getUnitID (const HcalNumberingFromDDD::HcalID id) |
HcalTestNumberingScheme (bool forTB) | |
virtual | ~HcalTestNumberingScheme () |
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 Member Functions | |
HcalTestNumberingScheme () | |
Private Attributes | |
bool | forTBH2 |
Definition at line 11 of file HcalTestNumberingScheme.h.
HcalTestNumberingScheme::HcalTestNumberingScheme | ( | bool | forTB | ) |
Definition at line 11 of file HcalTestNumberingScheme.cc.
References forTBH2.
: HcalNumberingScheme(), forTBH2(forTB) { edm::LogInfo("HcalSim") << "Creating HcalTestNumberingScheme with TB Flag " << forTBH2; }
HcalTestNumberingScheme::~HcalTestNumberingScheme | ( | ) | [virtual] |
Definition at line 17 of file HcalTestNumberingScheme.cc.
{ edm::LogInfo("HcalSim") << "Deleting HcalTestNumberingScheme"; }
HcalTestNumberingScheme::HcalTestNumberingScheme | ( | ) | [private] |
uint32_t HcalTestNumberingScheme::getUnitID | ( | const HcalNumberingFromDDD::HcalID | id | ) | [virtual] |
Reimplemented from HcalNumberingScheme.
Definition at line 21 of file HcalTestNumberingScheme.cc.
References forTBH2, HcalBarrel, getHLTprescales::index, LogDebug, packHcalIndex(), phi, and DetId::rawId().
Referenced by SimG4HcalValidation::fill(), HcalTestAnalysis::fill(), and HcalTestAnalysis::qieAnalysis().
{ //pack it into an integer uint32_t index = 0; if (forTBH2) { // TB H2 Case int etaR = id.etaR; int phi = id.phis; HcalSubdetector subdet = (HcalSubdetector)(id.subdet); if (subdet == HcalBarrel && phi > 4) { // HB2 if (etaR > 4 && etaR < 10) index = HcalDetId(subdet,id.lay,id.phis,1).rawId(); } else { // HB1 index = HcalDetId(subdet,etaR,id.phis,id.depth).rawId(); } } else { // Test case index = HcalTestNumbering::packHcalIndex(id.subdet, id.zside, id.depth, id.etaR, id.phi, id.lay); } LogDebug("HcalSim") << "HcalTestNumberingScheme det = " << id.subdet << " depth/lay = " << id.depth << "/" << id.lay << " zside = " << id.zside << " eta/R = " << id.etaR << " phi = " << id.phi << " packed index = 0x" << std::hex << index << std::dec; return index; }
uint32_t HcalTestNumberingScheme::packHcalIndex | ( | int | det, |
int | z, | ||
int | depth, | ||
int | eta, | ||
int | phi, | ||
int | lay | ||
) | [static] |
Definition at line 53 of file HcalTestNumberingScheme.cc.
Referenced by SimG4HcalValidation::fill(), HcalTestAnalysis::fill(), and getUnitID().
{ return HcalTestNumbering::packHcalIndex(det, z, depth, eta, phi, lay); }
void HcalTestNumberingScheme::unpackHcalIndex | ( | const uint32_t & | idx, |
int & | det, | ||
int & | z, | ||
int & | depth, | ||
int & | eta, | ||
int & | phi, | ||
int & | lay | ||
) | [static] |
Definition at line 59 of file HcalTestNumberingScheme.cc.
Referenced by SimG4HcalValidation::fill(), HcalTestAnalysis::fill(), and HcalTestAnalysis::qieAnalysis().
{ HcalTestNumbering::unpackHcalIndex(idx, det, z, depth, eta, phi, lay); }
bool HcalTestNumberingScheme::forTBH2 [private] |
Definition at line 25 of file HcalTestNumberingScheme.h.
Referenced by getUnitID(), and HcalTestNumberingScheme().