Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
Geometry
EcalCommonData
src
ESTBNumberingScheme.cc
Go to the documentation of this file.
1
#include "
Geometry/EcalCommonData/interface/ESTBNumberingScheme.h
"
2
#include "
DataFormats/EcalDetId/interface/ESDetId.h
"
3
4
#include <iostream>
5
6
ESTBNumberingScheme::ESTBNumberingScheme
() :
EcalNumberingScheme
() {
7
int
ix[30] = {3, 2, 4, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4};
8
int
iy[30] = {4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4};
9
10
int
i
;
11
for
(i = 0; i < 30; ++
i
) {
12
iX
[
i
] = ix[
i
];
13
iY
[
i
] = iy[
i
];
14
}
15
16
edm::LogInfo
(
"EcalGeom"
) <<
"Creating ESTBNumberingScheme"
;
17
}
18
19
ESTBNumberingScheme::~ESTBNumberingScheme
() {
edm::LogInfo
(
"EcalGeom"
) <<
"Deleting ESTBNumberingScheme"
; }
20
21
uint32_t
ESTBNumberingScheme::getUnitID
(
const
EcalBaseNumber
& baseNumber)
const
{
22
int
level
= baseNumber.
getLevels
();
23
uint32_t intIndex = 0;
24
if
(level > 0) {
25
// depth index - silicon layer 1-st or 2-nd
26
int
layer
= 0;
27
if
(baseNumber.
getLevelName
(0) ==
"SFSX"
) {
28
layer = 1;
29
}
else
if
(baseNumber.
getLevelName
(0) ==
"SFSY"
) {
30
layer = 2;
31
}
else
{
32
edm::LogWarning
(
"EcalGeom"
) <<
"ESTBNumberingScheme: Wrong name"
33
<<
" of Presh. Si. Strip : "
<< baseNumber.
getLevelName
(0);
34
}
35
36
// Z index +Z = 1 ; -Z = 2
37
int
zside
= baseNumber.
getCopyNumber
(
"EREG"
);
38
zside = 2 * (1 -
zside
) + 1;
39
// wafer number
40
int
wafer = baseNumber.
getCopyNumber
(3);
41
int
x
= 0,
y
= 0;
42
// strip number inside wafer
43
int
strip
= baseNumber.
getCopyNumber
(0);
44
45
x =
iX
[wafer];
46
y
=
iY
[wafer];
47
48
intIndex =
ESDetId
(strip, x,
y
, layer, zside).
rawId
();
49
50
LogDebug
(
"EcalGeom"
) <<
"ESTBNumberingScheme : zside "
<< zside <<
" layer "
<< layer <<
" wafer "
<< wafer <<
" X "
51
<< x <<
" Y "
<<
y
<<
" strip "
<< strip <<
" UnitID 0x"
<< std::hex << intIndex <<
std::dec
;
52
for
(
int
ich = 0; ich <
level
; ich++) {
53
LogDebug
(
"EcalGeom"
) <<
"Name = "
<< baseNumber.
getLevelName
(ich) <<
" copy = "
<< baseNumber.
getCopyNumber
(ich);
54
}
55
}
56
57
return
intIndex;
58
}
mps_fire.i
i
Definition:
mps_fire.py:428
EcalBaseNumber::getLevelName
std::string const & getLevelName(int level) const
Definition:
EcalBaseNumber.cc:35
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition:
DetId.h:57
EcalBaseNumber::getCopyNumber
int getCopyNumber(int level) const
Definition:
EcalBaseNumber.cc:24
ecaldqm::zside
int zside(DetId const &)
Definition:
EcalDQMCommonUtils.cc:189
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition:
SimplePixelTopology.h:138
EcalNumberingScheme
Definition:
EcalNumberingScheme.h:14
ESTBNumberingScheme::~ESTBNumberingScheme
~ESTBNumberingScheme() override
Definition:
ESTBNumberingScheme.cc:19
ESTBNumberingScheme::iX
int iX[30]
Definition:
ESTBNumberingScheme.h:13
ESTBNumberingScheme::ESTBNumberingScheme
ESTBNumberingScheme()
Definition:
ESTBNumberingScheme.cc:6
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
EcalBaseNumber
Definition:
EcalBaseNumber.h:12
digitizers_cfi.strip
strip
Definition:
digitizers_cfi.py:45
ESDetId
Definition:
ESDetId.h:15
ESTBNumberingScheme::iY
int iY[30]
Definition:
ESTBNumberingScheme.h:14
ESTBNumberingScheme::getUnitID
uint32_t getUnitID(const EcalBaseNumber &baseNumber) const override
Definition:
ESTBNumberingScheme.cc:21
DDAxes::y
ESTBNumberingScheme.h
testEve_cfg.level
tuple level
Definition:
testEve_cfg.py:47
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition:
MessageLogger.h:122
DDAxes::x
ESDetId.h
EcalBaseNumber::getLevels
int getLevels() const
Definition:
EcalBaseNumber.cc:22
TauDecayModes.dec
tuple dec
Definition:
TauDecayModes.py:142
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:233
Generated for CMSSW Reference Manual by
1.8.5