CMS 3D CMS Logo

EcalEndcapHardcodedTopology.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_CALOTOPOLOGY_ECALENDCAPHARDCODEDTOPOLOGY_H
2 #define GEOMETRY_CALOTOPOLOGY_ECALENDCAPHARDCODEDTOPOLOGY_H 1
3 
4 #include <vector>
5 #include <iostream>
9 
11 public:
14 
16 
18  DetId goNorth(const DetId& id) const override { return incrementIy(EEDetId(id)); }
19  std::vector<DetId> north(const DetId& id) const override {
20  EEDetId nextId = goNorth(id);
21  std::vector<DetId> vNeighborsDetId;
22  if (!(nextId == EEDetId(0)))
23  vNeighborsDetId.emplace_back(DetId(nextId.rawId()));
24  return vNeighborsDetId;
25  }
26 
28  DetId goSouth(const DetId& id) const override { return decrementIy(EEDetId(id)); }
29  std::vector<DetId> south(const DetId& id) const override {
30  EEDetId nextId = goSouth(id);
31  std::vector<DetId> vNeighborsDetId;
32  if (!(nextId == EEDetId(0)))
33  vNeighborsDetId.emplace_back(DetId(nextId.rawId()));
34  return vNeighborsDetId;
35  }
36 
38  DetId goEast(const DetId& id) const override { return incrementIx(EEDetId(id)); }
39  std::vector<DetId> east(const DetId& id) const override {
40  EEDetId nextId = goEast(id);
41  std::vector<DetId> vNeighborsDetId;
42  if (!(nextId == EEDetId(0)))
43  vNeighborsDetId.emplace_back(DetId(nextId.rawId()));
44  return vNeighborsDetId;
45  }
46 
48  DetId goWest(const DetId& id) const override { return decrementIx(EEDetId(id)); }
49  std::vector<DetId> west(const DetId& id) const override {
50  EEDetId nextId = goWest(id);
51  std::vector<DetId> vNeighborsDetId;
52  if (!(nextId == EEDetId(0)))
53  vNeighborsDetId.emplace_back(DetId(nextId.rawId()));
54  return vNeighborsDetId;
55  }
56 
57  std::vector<DetId> up(const DetId& /*id*/) const override {
58  edm::LogVerbatim("CaloTopology") << "EcalEndcapHardcodedTopology::up() not yet implemented";
59  std::vector<DetId> vNeighborsDetId;
60  return vNeighborsDetId;
61  }
62 
63  std::vector<DetId> down(const DetId& /*id*/) const override {
64  edm::LogVerbatim("CaloTopology") << "EcalEndcapHardcodedTopology::down() not yet implemented";
65  std::vector<DetId> vNeighborsDetId;
66  return vNeighborsDetId;
67  }
68 
69 private:
71  EEDetId incrementIx(const EEDetId&) const;
72 
74  EEDetId decrementIx(const EEDetId&) const;
75 
77  EEDetId incrementIy(const EEDetId&) const;
78 
80  EEDetId decrementIy(const EEDetId&) const;
81 };
82 
83 #endif
Log< level::Info, true > LogVerbatim
EcalEndcapHardcodedTopology()
create a new Topology
DetId goWest(const DetId &id) const override
move the Topology west (negative ix)
EEDetId decrementIx(const EEDetId &) const
move the nagivator to smaller ix
DetId goSouth(const DetId &id) const override
move the Topology south (decrement iy)
std::vector< DetId > up(const DetId &) const override
DetId goEast(const DetId &id) const override
move the Topology east (positive ix)
EEDetId incrementIx(const EEDetId &) const
move the nagivator to larger ix
DetId goNorth(const DetId &id) const override
move the Topology north (increment iy)
std::vector< DetId > west(const DetId &id) const override
EEDetId incrementIy(const EEDetId &) const
move the nagivator to larger iy
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::vector< DetId > down(const DetId &) const override
std::vector< DetId > south(const DetId &id) const override
std::vector< DetId > east(const DetId &id) const override
std::vector< DetId > north(const DetId &id) const override
EEDetId decrementIy(const EEDetId &) const
move the nagivator to smaller iy