#include <SimG4CMS/HcalTestBeam/interface/HcalTB04XtalNumberingScheme.h>
Public Member Functions | |
virtual uint32_t | getUnitID (const EcalBaseNumber &baseNumber) const |
HcalTB04XtalNumberingScheme () | |
~HcalTB04XtalNumberingScheme () |
Description: Numbering scheme for crystal calorimeter in 2004 test beam
Usage: Sets up unique identifier for crystals in 2004 test beam
Definition at line 25 of file HcalTB04XtalNumberingScheme.h.
HcalTB04XtalNumberingScheme::HcalTB04XtalNumberingScheme | ( | ) |
Definition at line 27 of file HcalTB04XtalNumberingScheme.cc.
: EcalNumberingScheme() { edm::LogInfo("HcalTBSim") << "Creating HcalTB04XtalNumberingScheme"; }
HcalTB04XtalNumberingScheme::~HcalTB04XtalNumberingScheme | ( | ) |
Definition at line 32 of file HcalTB04XtalNumberingScheme.cc.
{ edm::LogInfo("HcalTBSim") << "Deleting HcalTB04XtalNumberingScheme"; }
uint32_t HcalTB04XtalNumberingScheme::getUnitID | ( | const EcalBaseNumber & | baseNumber | ) | const [virtual] |
Implements EcalNumberingScheme.
Definition at line 40 of file HcalTB04XtalNumberingScheme.cc.
References EcalBaseNumber::getCopyNumber(), EcalBaseNumber::getLevels(), LogDebug, and HcalTestNumbering::packHcalIndex().
{ int idx=0, idl=0; if (baseNumber.getLevels()<1) { edm::LogWarning("HcalTBSim") << "HcalTB04XtalNumberingScheme::getUnitID: " << "No level found in EcalBaseNumber " << "Returning 0"; } else { idx = baseNumber.getCopyNumber(0); if (baseNumber.getLevels() > 1) idl = baseNumber.getCopyNumber(1); } int det = 10; uint32_t idunit = HcalTestNumbering::packHcalIndex(det,0,1,idl,idx,1); LogDebug("HcalTBSim") << "HcalTB04XtalNumberingScheme : Crystal " << idx << " Layer " << idl << " UnitID = 0x" << std::hex << idunit << std::dec; return idunit; }