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 "CLHEP/Units/GlobalSystemOfUnits.h"
10
#include <iostream>
11
12
//#define EDM_ML_DEBUG
13
14
HcalNumberingScheme::HcalNumberingScheme
() :
CaloNumberingScheme
(0) {
15
edm::LogInfo
(
"HcalSim"
) <<
"Creating HcalNumberingScheme"
<< std::endl;
16
}
17
18
HcalNumberingScheme::~HcalNumberingScheme
() {
19
edm::LogInfo
(
"HcalSim"
) <<
"Deleting HcalNumberingScheme"
<< std::endl;
20
}
21
22
uint32_t
HcalNumberingScheme::getUnitID
(
const
HcalNumberingFromDDD::HcalID
&
id
){
23
24
int
zside
= 2*(
id
.zside) - 1;
25
int
etaR = zside*(
id
.etaR);
26
HcalSubdetector
subdet = (
HcalSubdetector
)(
id
.subdet);
27
28
//pack it into an integer
29
// to be consistent with HcalDetId convention
30
HcalDetId
hid(subdet,etaR,
id
.phis,
id
.
depth
);
31
uint32_t
index
= hid.
rawId
();
32
33
#ifdef EDM_ML_DEBUG
34
edm::LogInfo
(
"HcalSim"
) <<
"HcalNumberingScheme det = "
<<
id
.subdet
35
<<
" depth/lay = "
<<
id
.depth <<
"/"
<<
id
.lay
36
<<
" zside = "
<<
id
.zside <<
" eta/R = "
<<
id
.etaR
37
<<
" phi = "
<<
id
.phis <<
" oldphi = "
<<
id
.phi
38
<<
" packed index = 0x"
<< std::hex << index
39
<<
std::dec
<<
" "
<< hid <<
" "
<<
HcalDetId
(index)
40
<< std::endl;
41
#endif
42
return
index
;
43
44
}
HcalNumberingScheme::HcalNumberingScheme
HcalNumberingScheme()
Definition:
HcalNumberingScheme.cc:14
CaloNumberingScheme
Definition:
CaloNumberingScheme.h:9
HcalSubdetector.h
HcalNumberingScheme::getUnitID
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
Definition:
HcalNumberingScheme.cc:22
ecaldqm::zside
int zside(DetId const &)
DetId::rawId
uint32_t rawId() const
get the raw id
Definition:
DetId.h:44
HcalNumberingScheme::~HcalNumberingScheme
~HcalNumberingScheme() override
Definition:
HcalNumberingScheme.cc:18
AlignmentPI::index
index
Definition:
AlignmentPayloadInspectorHelper.h:33
HcalDetId
Definition:
HcalDetId.h:12
HcalDetId.h
HcalSubdetector
HcalSubdetector
Definition:
HcalAssistant.h:31
HcalNumberingScheme.h
edm::LogInfo
Definition:
MessageLogger.h:216
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:141
HcalNumberingFromDDD::HcalID
Definition:
HcalNumberingFromDDD.h:23
egammaForCoreTracking_cff.depth
depth
Definition:
egammaForCoreTracking_cff.py:29
Generated for CMSSW Reference Manual by
1.8.11