1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
#include "Geometry/CaloTopology/interface/EcalEndcapTopology.h"
EEDetId EcalEndcapTopology::incrementIy(const EEDetId& id) const {
if (!(theGeom_->present(id))) {
return EEDetId(0);
}
EEDetId nextPoint;
if (EEDetId::validDetId(id.ix(), id.iy() + 1, id.zside()))
nextPoint = EEDetId(id.ix(), id.iy() + 1, id.zside());
else
return EEDetId(0);
if (theGeom_->present(nextPoint))
return nextPoint;
else
return EEDetId(0);
}
EEDetId EcalEndcapTopology::decrementIy(const EEDetId& id) const {
if (!(theGeom_->present(id))) {
return EEDetId(0);
}
EEDetId nextPoint;
if (EEDetId::validDetId(id.ix(), id.iy() - 1, id.zside()))
nextPoint = EEDetId(id.ix(), id.iy() - 1, id.zside());
else
return EEDetId(0);
if (theGeom_->present(nextPoint))
return nextPoint;
else
return EEDetId(0);
}
EEDetId EcalEndcapTopology::incrementIx(const EEDetId& id) const {
if (!(theGeom_->present(id))) {
return EEDetId(0);
}
EEDetId nextPoint;
if (EEDetId::validDetId(id.ix() + 1, id.iy(), id.zside()))
nextPoint = EEDetId(id.ix() + 1, id.iy(), id.zside());
else
return EEDetId(0);
if (theGeom_->present(nextPoint))
return nextPoint;
else
return EEDetId(0);
}
EEDetId EcalEndcapTopology::decrementIx(const EEDetId& id) const {
if (!(theGeom_->present(id))) {
return EEDetId(0);
}
EEDetId nextPoint;
if (EEDetId::validDetId(id.ix() - 1, id.iy(), id.zside()))
nextPoint = EEDetId(id.ix() - 1, id.iy(), id.zside());
else
return EEDetId(0);
if (theGeom_->present(nextPoint))
return nextPoint;
else
return EEDetId(0);
}
|