CMS 3D CMS Logo

EcalEndcapTopology.cc
Go to the documentation of this file.
2 
4  if (!(theGeom_->present(id))) {
5  return EEDetId(0);
6  }
7  EEDetId nextPoint;
8  if (EEDetId::validDetId(id.ix(), id.iy() + 1, id.zside()))
9  nextPoint = EEDetId(id.ix(), id.iy() + 1, id.zside());
10  else
11  return EEDetId(0);
12 
13  if (theGeom_->present(nextPoint))
14  return nextPoint;
15  else
16  return EEDetId(0);
17 }
18 
20  if (!(theGeom_->present(id))) {
21  return EEDetId(0);
22  }
23  EEDetId nextPoint;
24  if (EEDetId::validDetId(id.ix(), id.iy() - 1, id.zside()))
25  nextPoint = EEDetId(id.ix(), id.iy() - 1, id.zside());
26  else
27  return EEDetId(0);
28 
29  if (theGeom_->present(nextPoint))
30  return nextPoint;
31  else
32  return EEDetId(0);
33 }
34 
36  if (!(theGeom_->present(id))) {
37  return EEDetId(0);
38  }
39 
40  EEDetId nextPoint;
41  if (EEDetId::validDetId(id.ix() + 1, id.iy(), id.zside()))
42  nextPoint = EEDetId(id.ix() + 1, id.iy(), id.zside());
43  else
44  return EEDetId(0);
45 
46  if (theGeom_->present(nextPoint))
47  return nextPoint;
48  else
49  return EEDetId(0);
50 }
51 
53  if (!(theGeom_->present(id))) {
54  return EEDetId(0);
55  }
56 
57  EEDetId nextPoint;
58 
59  if (EEDetId::validDetId(id.ix() - 1, id.iy(), id.zside()))
60  nextPoint = EEDetId(id.ix() - 1, id.iy(), id.zside());
61  else
62  return EEDetId(0);
63 
64  if (theGeom_->present(nextPoint))
65  return nextPoint;
66  else
67  return EEDetId(0);
68 }
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
EcalEndcapTopology::incrementIy
EEDetId incrementIy(const EEDetId &id) const
move the nagivator to larger iy
Definition: EcalEndcapTopology.cc:3
EcalEndcapTopology::theGeom_
const CaloSubdetectorGeometry * theGeom_
Definition: EcalEndcapTopology.h:90
EcalEndcapTopology::decrementIy
EEDetId decrementIy(const EEDetId &id) const
move the nagivator to smaller iy
Definition: EcalEndcapTopology.cc:19
EEDetId
Definition: EEDetId.h:14
CaloSubdetectorGeometry::present
virtual bool present(const DetId &id) const
is this detid present in the geometry?
Definition: CaloSubdetectorGeometry.cc:40
EcalEndcapTopology.h
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
EcalEndcapTopology::incrementIx
EEDetId incrementIx(const EEDetId &id) const
move the nagivator to larger ix
Definition: EcalEndcapTopology.cc:35
EcalEndcapTopology::decrementIx
EEDetId decrementIx(const EEDetId &id) const
move the nagivator to smaller ix
Definition: EcalEndcapTopology.cc:52