CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalBarrelHardcodedTopology.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_CALOTOPOLOGY_ECALBARRELHARDCODEDTOPOLOGY_H
2 #define GEOMETRY_CALOTOPOLOGY_ECALBARRELHARDCODEDTOPOLOGY_H 1
3 
4 #include <vector>
5 #include <iostream>
8 
10 {
11 
12  public:
15 
17 
19  virtual std::vector<DetId> north(const DetId& id) const
20  {
21  EBDetId nextId=incrementIphi(EBDetId(id));
22  std::vector<DetId> vNeighborsDetId;
23  if (! (nextId==EBDetId(0)))
24  vNeighborsDetId.push_back(DetId(nextId.rawId()));
25  return vNeighborsDetId;
26  }
27 
29  virtual std::vector<DetId> south(const DetId& id) const
30  {
31  EBDetId nextId=decrementIphi(EBDetId(id));
32  std::vector<DetId> vNeighborsDetId;
33  if (! (nextId==EBDetId(0)))
34  vNeighborsDetId.push_back(DetId(nextId.rawId()));
35  return vNeighborsDetId;
36  }
37 
39  virtual std::vector<DetId> east(const DetId& id) const
40  {
41  EBDetId nextId=decrementIeta(EBDetId(id));
42  std::vector<DetId> vNeighborsDetId;
43  if (! (nextId==EBDetId(0)))
44  vNeighborsDetId.push_back(DetId(nextId.rawId()));
45  return vNeighborsDetId;
46  }
47 
49  virtual std::vector<DetId> west(const DetId& id) const
50  {
51  EBDetId nextId=incrementIeta(EBDetId(id));
52  std::vector<DetId> vNeighborsDetId;
53  if (! (nextId==EBDetId(0)))
54  vNeighborsDetId.push_back(DetId(nextId.rawId()));
55  return vNeighborsDetId;
56  }
57 
58  virtual std::vector<DetId> up(const DetId& /*id*/) const
59  {
60  std::cout << "EcalBarrelHardcodedTopology::up() not yet implemented" << std::endl;
61  std::vector<DetId> vNeighborsDetId;
62  return vNeighborsDetId;
63  }
64 
65  virtual std::vector<DetId> down(const DetId& /*id*/) const
66  {
67  std::cout << "EcalBarrelHardcodedTopology::down() not yet implemented" << std::endl;
68  std::vector<DetId> vNeighborsDetId;
69  return vNeighborsDetId;
70  }
71 
72  private:
73 
75  EBDetId incrementIeta(const EBDetId&) const ;
76 
78  EBDetId decrementIeta(const EBDetId&) const ;
79 
81  EBDetId incrementIphi(const EBDetId&) const ;
82 
84  EBDetId decrementIphi(const EBDetId&) const;
85 
86 };
87 
88 #endif
EBDetId incrementIphi(const EBDetId &) const
move the nagivator to larger iphi (wraps around the barrel)
virtual std::vector< DetId > east(const DetId &id) const
move the Topology east (negative ieta)
EBDetId decrementIphi(const EBDetId &) const
move the nagivator to smaller iphi (wraps around the barrel)
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 iphi)
Definition: DetId.h:20
virtual std::vector< DetId > up(const DetId &) const
virtual std::vector< DetId > down(const DetId &) const
virtual std::vector< DetId > west(const DetId &id) const
move the Topology west (positive ieta)
EBDetId incrementIeta(const EBDetId &) const
move the nagivator to larger ieta (more positive z) (stops at end of barrel and returns null) ...
tuple cout
Definition: gather_cfg.py:121
virtual std::vector< DetId > north(const DetId &id) const
move the Topology north (increment iphi)
EcalBarrelHardcodedTopology()
create a new Topology
EBDetId decrementIeta(const EBDetId &) const
move the nagivator to smaller ieta (more negative z) (stops at end of barrel and returns null) ...