Main Page
Namespaces
Classes
Package Documentation
SimG4CMS
HcalTestBeam
src
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/HcalTestBeam/interface/HcalTB04XtalNumberingScheme.h
"
17
#include "
SimG4CMS/Calo/interface/HcalTestNumberingScheme.h
"
18
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
19
20
using namespace
std
;
21
22
//
23
// constructors and destructor
24
//
25
26
HcalTB04XtalNumberingScheme::HcalTB04XtalNumberingScheme
() :
27
EcalNumberingScheme
() {
28
edm::LogInfo
(
"HcalTBSim"
) <<
"Creating HcalTB04XtalNumberingScheme"
;
29
}
30
31
HcalTB04XtalNumberingScheme::~HcalTB04XtalNumberingScheme
() {
32
edm::LogInfo
(
"HcalTBSim"
) <<
"Deleting HcalTB04XtalNumberingScheme"
;
33
}
34
35
//
36
// member functions
37
//
38
39
uint32_t
HcalTB04XtalNumberingScheme::getUnitID
(
const
EcalBaseNumber
& baseNumber)
const
{
40
41
int
idx
=0, idl=0;
42
if
(baseNumber.
getLevels
()<1) {
43
edm::LogWarning
(
"HcalTBSim"
) <<
"HcalTB04XtalNumberingScheme::getUnitID: "
44
<<
"No level found in EcalBaseNumber "
45
<<
"Returning 0"
;
46
}
else
{
47
idx = baseNumber.
getCopyNumber
(0);
48
if
(baseNumber.
getLevels
() > 1) idl = baseNumber.
getCopyNumber
(1);
49
}
50
int
det = 10;
51
uint32_t idunit =
HcalTestNumbering::packHcalIndex
(det,0,1,idl,idx,1);
52
53
LogDebug
(
"HcalTBSim"
) <<
"HcalTB04XtalNumberingScheme : Crystal "
<< idx
54
<<
" Layer "
<< idl <<
" UnitID = 0x"
<< std::hex
55
<< idunit <<
std::dec
;
56
57
return
idunit;
58
59
}
LogDebug
#define LogDebug(id)
Definition:
PFTrackAlgoTools.cc:503
MessageLogger.h
HcalTB04XtalNumberingScheme::HcalTB04XtalNumberingScheme
HcalTB04XtalNumberingScheme()
Definition:
HcalTB04XtalNumberingScheme.cc:26
edm::LogWarning
Definition:
MessageLogger.h:142
std
Definition:
JetResolutionObject.h:76
EcalBaseNumber::getCopyNumber
int getCopyNumber(int level) const
Definition:
EcalBaseNumber.cc:27
HcalTB04XtalNumberingScheme.h
HcalTestNumbering::packHcalIndex
static uint32_t packHcalIndex(int det, int z, int depth, int eta, int phi, int lay)
Definition:
HcalTestNumbering.cc:7
EcalNumberingScheme
Definition:
EcalNumberingScheme.h:14
edm::LogInfo
Definition:
MessageLogger.h:216
EcalBaseNumber
Definition:
EcalBaseNumber.h:12
training_settings.idx
idx
Definition:
training_settings.py:16
HcalTestNumberingScheme.h
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:141
HcalTB04XtalNumberingScheme::getUnitID
uint32_t getUnitID(const EcalBaseNumber &baseNumber) const override
Definition:
HcalTB04XtalNumberingScheme.cc:39
HcalTB04XtalNumberingScheme::~HcalTB04XtalNumberingScheme
~HcalTB04XtalNumberingScheme() override
Definition:
HcalTB04XtalNumberingScheme.cc:31
EcalBaseNumber::getLevels
int getLevels() const
Definition:
EcalBaseNumber.cc:22
Generated for CMSSW Reference Manual by
1.8.11