Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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 DebugLog
13
14
HcalNumberingScheme::HcalNumberingScheme
() :
CaloNumberingScheme
(0) {
15
edm::LogInfo
(
"HcalSim"
) <<
"Creating HcalNumberingScheme"
;
16
}
17
18
HcalNumberingScheme::~HcalNumberingScheme
() {
19
edm::LogInfo
(
"HcalSim"
) <<
"Deleting HcalNumberingScheme"
;
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
uint32_t
index
=
HcalDetId
(subdet,etaR,
id
.phis,
id
.
depth
).
rawId
();
31
32
#ifdef DebugLog
33
edm::LogInfo
(
"HcalSim"
) <<
"HcalNumberingScheme det = "
<<
id
.subdet
34
<<
" depth/lay = "
<<
id
.depth <<
"/"
<<
id
.lay
35
<<
" zside = "
<<
id
.zside <<
" eta/R = "
<<
id
.etaR
36
<<
" phi = "
<<
id
.phis <<
" oldphi = "
<<
id
.phi
37
<<
" packed index = 0x"
<< std::hex << index
38
<<
std::dec
<< std::endl;
39
#endif
40
return
index
;
41
42
}
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
HcalNumberingScheme::~HcalNumberingScheme
virtual ~HcalNumberingScheme()
Definition:
HcalNumberingScheme.cc:18
HLT_25ns10e33_v2_cff.depth
tuple depth
Definition:
HLT_25ns10e33_v2_cff.py:10449
ecaldqm::zside
int zside(DetId const &)
Definition:
EcalDQMCommonUtils.cc:210
cmsHarvester.index
string index
Definition:
cmsHarvester.py:4379
DetId::rawId
uint32_t rawId() const
get the raw id
Definition:
DetId.h:43
HcalDetId
Definition:
HcalDetId.h:12
HcalDetId.h
HcalSubdetector
HcalSubdetector
Definition:
HcalAssistant.h:31
HcalNumberingScheme.h
edm::LogInfo
Definition:
MessageLogger.h:214
HcalNumberingFromDDD::HcalID
Definition:
HcalNumberingFromDDD.h:23
TauDecayModes.dec
tuple dec
Definition:
TauDecayModes.py:141
Generated for CMSSW Reference Manual by
1.8.5