CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalEndcapTopology.cc
Go to the documentation of this file.
3 
4 
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 
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 
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 
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 
EEDetId incrementIy(const EEDetId &id) const
move the nagivator to larger iy
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.cc:562
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