Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
Geometry
CaloTopology
src
EcalEndcapTopology.cc
Go to the documentation of this file.
1
#include "
Geometry/CaloTopology/interface/EcalEndcapTopology.h
"
2
#include "
Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h
"
3
4
5
EEDetId
EcalEndcapTopology::incrementIy(
const
EEDetId
&
id
)
const
{
6
if
(!(*theGeom_).getSubdetectorGeometry(
DetId::Ecal
,
EcalEndcap
)->present(
id
))
7
{
8
return
EEDetId
(0);
9
}
10
EEDetId
nextPoint;
11
if
(
EEDetId::validDetId
(
id
.ix(),
id
.iy()+1,
id
.
zside
()))
12
nextPoint=
EEDetId
(
id
.ix(),
id
.iy()+1,
id
.
zside
());
13
else
14
return
EEDetId
(0);
15
16
if
((*theGeom_).getSubdetectorGeometry(
DetId::Ecal
,
EcalEndcap
)->present(nextPoint))
17
return
nextPoint;
18
else
19
return
EEDetId
(0);
20
}
21
22
23
EEDetId
EcalEndcapTopology::decrementIy(
const
EEDetId
&
id
)
const
{
24
25
if
(!(*theGeom_).getSubdetectorGeometry(
DetId::Ecal
,
EcalEndcap
)->present(
id
))
26
{
27
return
EEDetId
(0);
28
}
29
EEDetId
nextPoint;
30
if
(
EEDetId::validDetId
(
id
.ix(),
id
.iy()-1,
id
.
zside
()))
31
nextPoint=
EEDetId
(
id
.ix(),
id
.iy()-1,
id
.
zside
());
32
else
33
return
EEDetId
(0);
34
35
if
((*theGeom_).getSubdetectorGeometry(
DetId::Ecal
,
EcalEndcap
)->present(nextPoint))
36
return
nextPoint;
37
else
38
return
EEDetId
(0);
39
}
40
41
42
EEDetId
EcalEndcapTopology::incrementIx(
const
EEDetId
&
id
)
const
{
43
if
(!(*theGeom_).getSubdetectorGeometry(
DetId::Ecal
,
EcalEndcap
)->present(
id
))
44
{
45
return
EEDetId
(0);
46
}
47
48
49
EEDetId
nextPoint;
50
if
(
EEDetId::validDetId
(
id
.ix()+1,
id
.iy(),
id
.
zside
()))
51
nextPoint=
EEDetId
(
id
.ix()+1,
id
.iy(),
id
.
zside
());
52
else
53
return
EEDetId
(0);
54
55
if
((*theGeom_).getSubdetectorGeometry(
DetId::Ecal
,
EcalEndcap
)->present(nextPoint))
56
return
nextPoint;
57
else
58
return
EEDetId
(0);
59
}
60
61
62
EEDetId
EcalEndcapTopology::decrementIx(
const
EEDetId
&
id
)
const
{
63
if
(!(*theGeom_).getSubdetectorGeometry(
DetId::Ecal
,
EcalEndcap
)->present(
id
))
64
{
65
return
EEDetId
(0);
66
}
67
68
EEDetId
nextPoint;
69
70
if
(
EEDetId::validDetId
(
id
.ix()-1,
id
.iy(),
id
.
zside
()))
71
nextPoint=
EEDetId
(
id
.ix()-1,
id
.iy(),
id
.
zside
());
72
else
73
return
EEDetId
(0);
74
75
if
((*theGeom_).getSubdetectorGeometry(
DetId::Ecal
,
EcalEndcap
)->present(nextPoint))
76
return
nextPoint;
77
else
78
return
EEDetId
(0);
79
}
80
ecaldqm::zside
int zside(DetId const &)
Definition:
EcalDQMCommonUtils.cc:210
DetId::Ecal
Definition:
DetId.h:24
EEDetId
Definition:
EEDetId.h:15
EcalEndcapTopology.h
CaloSubdetectorGeometry.h
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition:
EEDetId.h:248
EcalEndcap
Definition:
EcalSubdetector.h:11
Generated for CMSSW Reference Manual by
1.8.5