SimG4CMS
Calo
src
HcalNumberingScheme.cc
Go to the documentation of this file.
1
// File: HcalNumberingScheme.cc
3
// Description: Numbering scheme for barrel electromagnetic calorimeter
5
#include "
SimG4CMS/Calo/interface/HcalNumberingScheme.h
"
6
#include "
DataFormats/HcalDetId/interface/HcalDetId.h
"
7
#include "
DataFormats/HcalDetId/interface/HcalSubdetector.h
"
8
9
#include <iostream>
10
11
//#define EDM_ML_DEBUG
12
13
HcalNumberingScheme::HcalNumberingScheme
() :
CaloNumberingScheme
(0) {
14
edm::LogVerbatim
(
"HcalSim"
) <<
"Creating HcalNumberingScheme"
;
15
}
16
17
HcalNumberingScheme::~HcalNumberingScheme
() {
edm::LogVerbatim
(
"HcalSim"
) <<
"Deleting HcalNumberingScheme"
; }
18
19
uint32_t
HcalNumberingScheme::getUnitID
(
const
HcalNumberingFromDDD::HcalID
&
id
) {
20
int
zside
= 2 * (
id
.zside) - 1;
21
int
etaR =
zside
* (
id
.etaR);
22
HcalSubdetector
subdet = (
HcalSubdetector
)(
id
.subdet);
23
24
//pack it into an integer
25
// to be consistent with HcalDetId convention
26
HcalDetId
hid(subdet, etaR,
id
.phis,
id
.
depth
);
27
uint32_t
index
= hid.
rawId
();
28
29
#ifdef EDM_ML_DEBUG
30
edm::LogVerbatim
(
"HcalSim"
) <<
"HcalNumberingScheme det = "
<<
id
.subdet <<
" depth/lay = "
<<
id
.depth <<
"/"
31
<<
id
.lay <<
" zside = "
<<
id
.zside <<
" eta/R = "
<<
id
.etaR <<
" phi = "
<<
id
.phis
32
<<
" oldphi = "
<<
id
.phi <<
" packed index = 0x"
<< std::hex <<
index
<<
std::dec
<<
" "
33
<< hid <<
" "
<<
HcalDetId
(
index
);
34
#endif
35
return
index
;
36
}
CaloNumberingScheme
Definition:
CaloNumberingScheme.h:9
HcalNumberingScheme::getUnitID
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
Definition:
HcalNumberingScheme.cc:19
HcalNumberingFromDDD::HcalID
Definition:
HcalNumberingFromDDD.h:21
ecaldqm::zside
int zside(DetId const &)
Definition:
EcalDQMCommonUtils.cc:189
HcalNumberingScheme.h
LEDCalibrationChannels.depth
depth
Definition:
LEDCalibrationChannels.py:65
HcalNumberingScheme::HcalNumberingScheme
HcalNumberingScheme()
Definition:
HcalNumberingScheme.cc:13
HcalDetId.h
HcalDetId
Definition:
HcalDetId.h:12
HcalSubdetector.h
HcalNumberingScheme::~HcalNumberingScheme
~HcalNumberingScheme() override
Definition:
HcalNumberingScheme.cc:17
HcalSubdetector
HcalSubdetector
Definition:
HcalAssistant.h:31
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition:
DetId.h:57
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition:
MessageLogger.h:128
AlignmentPI::index
index
Definition:
AlignmentPayloadInspectorHelper.h:46
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:142
Generated for CMSSW Reference Manual by
1.8.16