CMS 3D CMS Logo

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