Main Page
Namespaces
Classes
Package Documentation
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
}
HcalNumberingScheme::HcalNumberingScheme
HcalNumberingScheme()
Definition:
HcalNumberingScheme.cc:13
CaloNumberingScheme
Definition:
CaloNumberingScheme.h:9
HcalSubdetector.h
HcalNumberingScheme::getUnitID
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
Definition:
HcalNumberingScheme.cc:19
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition:
DetId.h:50
ecaldqm::zside
int zside(DetId const &)
HcalNumberingScheme::~HcalNumberingScheme
~HcalNumberingScheme() override
Definition:
HcalNumberingScheme.cc:17
AlignmentPI::index
index
Definition:
AlignmentPayloadInspectorHelper.h:36
HcalDetId
Definition:
HcalDetId.h:13
HcalDetId.h
HcalSubdetector
HcalSubdetector
Definition:
HcalAssistant.h:31
edm::LogVerbatim
Definition:
MessageLogger.h:297
HcalNumberingScheme.h
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:143
HcalNumberingFromDDD::HcalID
Definition:
HcalNumberingFromDDD.h:23
egammaForCoreTracking_cff.depth
depth
Definition:
egammaForCoreTracking_cff.py:29
Generated for CMSSW Reference Manual by
1.8.11