CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalEndcapTopology.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_CALOTOPOLOGY_ECALENDCAPTOPOLOGY_H
2 #define GEOMETRY_CALOTOPOLOGY_ECALENDCAPTOPOLOGY_H 1
3 
8 #include <vector>
9 #include <iostream>
10 
12 
13  public:
16 
18  virtual ~EcalEndcapTopology() { }
19 
22  {
23  }
24 
26  virtual std::vector<DetId> north(const DetId& id) const
27  {
28  EEDetId nextId=incrementIy(EEDetId(id));
29  std::vector<DetId> vNeighborsDetId;
30  if (! (nextId==EEDetId(0)))
31  vNeighborsDetId.push_back(DetId(nextId.rawId()));
32  return vNeighborsDetId;
33  }
34 
36  virtual std::vector<DetId> south(const DetId& id) const
37  {
38  EEDetId nextId=decrementIy(EEDetId(id));
39  std::vector<DetId> vNeighborsDetId;
40  if (! (nextId==EEDetId(0)))
41  vNeighborsDetId.push_back(DetId(nextId.rawId()));
42  return vNeighborsDetId;
43  }
44 
46  virtual std::vector<DetId> east(const DetId& id) const
47  {
48  EEDetId nextId=incrementIx(EEDetId(id));
49  std::vector<DetId> vNeighborsDetId;
50  if (! (nextId==EEDetId(0)))
51  vNeighborsDetId.push_back(DetId(nextId.rawId()));
52  return vNeighborsDetId;
53  }
54 
56  virtual std::vector<DetId> west(const DetId& id) const
57  {
58  EEDetId nextId=decrementIx(EEDetId(id));
59  std::vector<DetId> vNeighborsDetId;
60  if (! (nextId==EEDetId(0)))
61  vNeighborsDetId.push_back(DetId(nextId.rawId()));
62  return vNeighborsDetId;
63  }
64 
65  virtual std::vector<DetId> up(const DetId& id) const
66  {
67  std::cout << "EcalBarrelTopology::up() not yet implemented" << std::endl;
68  std::vector<DetId> vNeighborsDetId;
69  return vNeighborsDetId;
70  }
71 
72  virtual std::vector<DetId> down(const DetId& id) const
73  {
74  std::cout << "EcalBarrelTopology::down() not yet implemented" << std::endl;
75  std::vector<DetId> vNeighborsDetId;
76  return vNeighborsDetId;
77  }
78 
79  private:
80 
82  EEDetId incrementIx(const EEDetId& id) const ;
83 
85  EEDetId decrementIx(const EEDetId& id) const ;
86 
88  EEDetId incrementIy(const EEDetId& id) const ;
89 
91  EEDetId decrementIy(const EEDetId& id) const;
92 
94 };
95 
96 #endif
virtual std::vector< DetId > east(const DetId &id) const
move the Topology east (positive ix)
virtual std::vector< DetId > north(const DetId &id) const
move the Topology north (increment iy)
edm::ESHandle< CaloGeometry > theGeom_
virtual ~EcalEndcapTopology()
virtual destructor
virtual std::vector< DetId > up(const DetId &id) const
EEDetId incrementIy(const EEDetId &id) const
move the nagivator to larger iy
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
virtual std::vector< DetId > south(const DetId &id) const
move the Topology south (decrement iy)
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
virtual std::vector< DetId > down(const DetId &id) const
Definition: DetId.h:20
EcalEndcapTopology(edm::ESHandle< CaloGeometry > theGeom)
create a new Topology from geometry
tuple cout
Definition: gather_cfg.py:41
virtual std::vector< DetId > west(const DetId &id) const
move the Topology west (negative ix)
EcalEndcapTopology()
create a new Topology