SimG4CMS
HcalTestBeam
plugins
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
16
#include "
SimG4CMS/Calo/interface/HcalTestNumberingScheme.h
"
17
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
18
#include "
HcalTB04XtalNumberingScheme.h
"
19
20
//#define EDM_ML_DEBUG
21
22
//
23
// constructors and destructor
24
//
25
26
HcalTB04XtalNumberingScheme::HcalTB04XtalNumberingScheme
() :
EcalNumberingScheme
() {
27
#ifdef EDM_ML_DEBUG
28
edm::LogVerbatim
(
"HcalTBSim"
) <<
"Creating HcalTB04XtalNumberingScheme"
;
29
#endif
30
}
31
32
HcalTB04XtalNumberingScheme::~HcalTB04XtalNumberingScheme
() {
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:24
HcalTB04XtalNumberingScheme::HcalTB04XtalNumberingScheme
HcalTB04XtalNumberingScheme()
Definition:
HcalTB04XtalNumberingScheme.cc:26
EcalBaseNumber
Definition:
EcalBaseNumber.h:12
HcalTB04XtalNumberingScheme::~HcalTB04XtalNumberingScheme
~HcalTB04XtalNumberingScheme() override
Definition:
HcalTB04XtalNumberingScheme.cc:32
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition:
MessageLogger.h:122
heavyIonCSV_trainingSettings.idx
idx
Definition:
heavyIonCSV_trainingSettings.py:5
HcalTB04XtalNumberingScheme::getUnitID
uint32_t getUnitID(const EcalBaseNumber &baseNumber) const override
Definition:
HcalTB04XtalNumberingScheme.cc:42
EcalNumberingScheme
Definition:
EcalNumberingScheme.h:14
HcalTestNumbering::packHcalIndex
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
Definition:
HcalTestNumbering.cc:7
HcalTB04XtalNumberingScheme.h
EcalBaseNumber::getLevels
int getLevels() const
Definition:
EcalBaseNumber.cc:22
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition:
MessageLogger.h:128
HcalTestNumberingScheme.h
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:143
Generated for CMSSW Reference Manual by
1.8.16