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
LogDebug
(
"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 <<
std::dec
;
38
#endif
39
return
index
;
40
41
}
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:501
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
ecaldqm::zside
int zside(DetId const &)
Definition:
EcalDQMCommonUtils.cc:210
cmsHarvester.index
string index
Definition:
cmsHarvester.py:4378
DetId::rawId
uint32_t rawId() const
get the raw id
Definition:
DetId.h:43
HcalDetId
Definition:
HcalDetId.h:16
HcalDetId.h
HcalSubdetector
HcalSubdetector
Definition:
HcalAssistant.h:31
HcalNumberingScheme.h
edm::LogInfo
Definition:
MessageLogger.h:214
HcalNumberingFromDDD::HcalID
Definition:
HcalNumberingFromDDD.h:27
TauDecayModes.dec
tuple dec
Definition:
TauDecayModes.py:48
Generated for CMSSW Reference Manual by
1.8.5