CMS 3D CMS Logo

HcalTB04XtalNumberingScheme.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalTestBeam
4 // Class : HcalTB04XtalNumberingScheme
5 //
6 // Implementation:
7 // Numbering scheme for crystal calorimeter in 2004 test beam
8 //
9 // Original Author:
10 // Created: Tue 16 10:14:34 CEST 2006
11 //
12 
13 // system include files
14 
15 // user include files
19 
20 //#define EDM_ML_DEBUG
21 
22 //
23 // constructors and destructor
24 //
25 
27 #ifdef EDM_ML_DEBUG
28  edm::LogVerbatim("HcalTBSim") << "Creating HcalTB04XtalNumberingScheme";
29 #endif
30 }
31 
33 #ifdef EDM_ML_DEBUG
34  edm::LogVerbatim("HcalTBSim") << "Deleting HcalTB04XtalNumberingScheme";
35 #endif
36 }
37 
38 //
39 // member functions
40 //
41 
42 uint32_t HcalTB04XtalNumberingScheme::getUnitID(const EcalBaseNumber& baseNumber) const {
43  int idx = 0, idl = 0;
44  if (baseNumber.getLevels() < 1) {
45  edm::LogWarning("HcalTBSim") << "HcalTB04XtalNumberingScheme::getUnitID: "
46  << "No level found in EcalBaseNumber "
47  << "Returning 0";
48  } else {
49  idx = baseNumber.getCopyNumber(0);
50  if (baseNumber.getLevels() > 1)
51  idl = baseNumber.getCopyNumber(1);
52  }
53  int det = 10;
54  uint32_t idunit = HcalTestNumbering::packHcalIndex(det, 0, 1, idl, idx, 1);
55 
56 #ifdef EDM_ML_DEBUG
57  edm::LogVerbatim("HcalTBSim") << "HcalTB04XtalNumberingScheme : Crystal " << idx << " Layer " << idl << " UnitID = 0x"
58  << std::hex << idunit << std::dec;
59 #endif
60  return idunit;
61 }
MessageLogger.h
EcalBaseNumber::getCopyNumber
int getCopyNumber(int level) const
Definition: EcalBaseNumber.cc:23
HcalTB04XtalNumberingScheme::HcalTB04XtalNumberingScheme
HcalTB04XtalNumberingScheme()
Definition: HcalTB04XtalNumberingScheme.cc:26
EcalBaseNumber
Definition: EcalBaseNumber.h:12
HcalTB04XtalNumberingScheme::~HcalTB04XtalNumberingScheme
~HcalTB04XtalNumberingScheme() override
Definition: HcalTB04XtalNumberingScheme.cc:32
training_settings.idx
idx
Definition: training_settings.py:16
HcalTB04XtalNumberingScheme::getUnitID
uint32_t getUnitID(const EcalBaseNumber &baseNumber) const override
Definition: HcalTB04XtalNumberingScheme.cc:42
EcalNumberingScheme
Definition: EcalNumberingScheme.h:14
edm::LogWarning
Definition: MessageLogger.h:141
HcalTestNumbering::packHcalIndex
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
Definition: HcalTestNumbering.cc:7
edm::LogVerbatim
Definition: MessageLogger.h:297
HcalTB04XtalNumberingScheme.h
EcalBaseNumber::getLevels
int getLevels() const
Definition: EcalBaseNumber.cc:21
HcalTestNumberingScheme.h
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143