#include <SimG4CMS/Calo/interface/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.
00011 : 00012 HcalNumberingScheme(), forTBH2(forTB) { 00013 edm::LogInfo("HcalSim") << "Creating HcalTestNumberingScheme with TB Flag " 00014 << forTBH2; 00015 }
HcalTestNumberingScheme::~HcalTestNumberingScheme | ( | ) | [virtual] |
Definition at line 17 of file HcalTestNumberingScheme.cc.
00017 { 00018 edm::LogInfo("HcalSim") << "Deleting HcalTestNumberingScheme"; 00019 }
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, index, LogDebug, HcalTestNumbering::packHcalIndex(), and phi.
Referenced by SimG4HcalValidation::fill(), HcalTestAnalysis::fill(), and HcalTestAnalysis::qieAnalysis().
00022 { 00023 00024 //pack it into an integer 00025 uint32_t index = 0; 00026 if (forTBH2) { 00027 // TB H2 Case 00028 int etaR = id.etaR; 00029 int phi = id.phis; 00030 HcalSubdetector subdet = (HcalSubdetector)(id.subdet); 00031 if (subdet == HcalBarrel && phi > 4) { // HB2 00032 if (etaR > 4 && etaR < 10) 00033 index = HcalDetId(subdet,id.lay,id.phis,1).rawId(); 00034 } else { // HB1 00035 index = HcalDetId(subdet,etaR,id.phis,id.depth).rawId(); 00036 } 00037 } else { 00038 // Test case 00039 index = HcalTestNumbering::packHcalIndex(id.subdet, id.zside, id.depth, 00040 id.etaR, id.phi, id.lay); 00041 } 00042 00043 LogDebug("HcalSim") << "HcalTestNumberingScheme det = " << id.subdet 00044 << " depth/lay = " << id.depth << "/" << id.lay 00045 << " zside = " << id.zside << " eta/R = " << id.etaR 00046 << " phi = " << id.phi << " packed index = 0x" 00047 << std::hex << index << std::dec; 00048 00049 return index; 00050 00051 }
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.
References HcalTestNumbering::packHcalIndex().
Referenced by SimG4HcalValidation::fill(), and HcalTestAnalysis::fill().
00054 { 00055 00056 return HcalTestNumbering::packHcalIndex(det, z, depth, eta, phi, lay); 00057 }
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.
References HcalTestNumbering::unpackHcalIndex().
Referenced by SimG4HcalValidation::fill(), HcalTestAnalysis::fill(), and HcalTestAnalysis::qieAnalysis().
00062 { 00063 00064 HcalTestNumbering::unpackHcalIndex(idx, det, z, depth, eta, phi, lay); 00065 }
bool HcalTestNumberingScheme::forTBH2 [private] |
Definition at line 25 of file HcalTestNumberingScheme.h.
Referenced by getUnitID(), and HcalTestNumberingScheme().