CMS 3D CMS Logo

Public Member Functions

HcalTB04XtalNumberingScheme Class Reference

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

Inheritance diagram for HcalTB04XtalNumberingScheme:
EcalNumberingScheme CaloNumberingScheme

List of all members.

Public Member Functions

virtual uint32_t getUnitID (const EcalBaseNumber &baseNumber) const
 HcalTB04XtalNumberingScheme ()
 ~HcalTB04XtalNumberingScheme ()

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.

                                                         : 
  EcalNumberingScheme() {
  edm::LogInfo("HcalTBSim") << "Creating HcalTB04XtalNumberingScheme";
}
HcalTB04XtalNumberingScheme::~HcalTB04XtalNumberingScheme ( )

Definition at line 32 of file HcalTB04XtalNumberingScheme.cc.

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

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(), UserOptions_cff::idx, 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;

}