CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
HcalTB04XtalNumberingScheme Class Reference

#include <SimG4CMS/HcalTestBeam/interface/HcalTB04XtalNumberingScheme.h>

Inheritance diagram for HcalTB04XtalNumberingScheme:
EcalNumberingScheme CaloNumberingScheme

Public Member Functions

virtual uint32_t getUnitID (const EcalBaseNumber &baseNumber) const
 
 HcalTB04XtalNumberingScheme ()
 
 ~HcalTB04XtalNumberingScheme ()
 
- Public Member Functions inherited from EcalNumberingScheme
 EcalNumberingScheme ()
 
virtual ~EcalNumberingScheme ()
 
- Public Member Functions inherited from CaloNumberingScheme
 CaloNumberingScheme (int iv=0)
 Constructor with optional verbosity control. More...
 
void setVerbosity (const int)
 Verbosity setting. More...
 
virtual ~CaloNumberingScheme ()
 

Additional Inherited Members

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

Detailed Description

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.

Constructor & Destructor Documentation

HcalTB04XtalNumberingScheme::HcalTB04XtalNumberingScheme ( )

Definition at line 27 of file HcalTB04XtalNumberingScheme.cc.

27  :
29  edm::LogInfo("HcalTBSim") << "Creating HcalTB04XtalNumberingScheme";
30 }
HcalTB04XtalNumberingScheme::~HcalTB04XtalNumberingScheme ( )

Definition at line 32 of file HcalTB04XtalNumberingScheme.cc.

32  {
33  edm::LogInfo("HcalTBSim") << "Deleting HcalTB04XtalNumberingScheme";
34 }

Member Function Documentation

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

40  {
41 
42  int idx=0, idl=0;
43  if (baseNumber.getLevels()<1) {
44  edm::LogWarning("HcalTBSim") << "HcalTB04XtalNumberingScheme::getUnitID: "
45  << "No level found in EcalBaseNumber "
46  << "Returning 0";
47  } else {
48  idx = baseNumber.getCopyNumber(0);
49  if (baseNumber.getLevels() > 1) idl = baseNumber.getCopyNumber(1);
50  }
51  int det = 10;
52  uint32_t idunit = HcalTestNumbering::packHcalIndex(det,0,1,idl,idx,1);
53 
54  LogDebug("HcalTBSim") << "HcalTB04XtalNumberingScheme : Crystal " << idx
55  << " Layer " << idl << " UnitID = 0x" << std::hex
56  << idunit << std::dec;
57 
58  return idunit;
59 
60 }
#define LogDebug(id)
int getCopyNumber(int level) const
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
int getLevels() const