1 #ifndef RecoCaloTools_Navigation_CaloRectangle_H 2 #define RecoCaloTools_Navigation_CaloRectangle_H 27 for(
int i = 0;
i <
std::abs(dIEtaOrIX) && start !=
T(0);
i++) {
28 start = dIEtaOrIX > 0 ? topo.
goEast(start) : topo.
goWest(start);
31 for(
int i = 0;
i <
std::abs(dIPhiOrIY) && start !=
T(0);
i++) {
48 , rectangle_(rectangle)
55 if(iPhiOrIY_ == rectangle_.iPhiOrIYMax) {
56 iPhiOrIY_ = rectangle_.iPhiOrIYMin;
84 , rectangle_(rectangle)
85 , topology_(*topology.getSubdetectorTopology(home))
95 return Iterator(home_, rectangle_.iEtaOrIXMin, rectangle_.iPhiOrIYMin, rectangle_, topology_);
98 return Iterator(home_, rectangle_.iEtaOrIXMax + 1, rectangle_.iPhiOrIYMin, rectangle_, topology_);
virtual DetId goSouth(const DetId &id) const
virtual DetId goWest(const DetId &id) const
CaloSubdetectorTopology const & topology_
CaloTopology const * topology(0)
CaloRectangleRange(int size, T home, CaloTopology const &topology)
const CaloRectangle rectangle_
virtual DetId goEast(const DetId &id) const
CaloRectangleRange(CaloRectangle rectangle, T home, CaloTopology const &topology)
const CaloRectangle rectangle_
auto operator()(T home, CaloTopology const &topology)
virtual DetId goNorth(const DetId &id) const
Abs< T >::type abs(const T &t)
T offsetBy(T start, CaloSubdetectorTopology const &topo, int dIEtaOrIX, int dIPhiOrIY)
Iterator(T const &home, int iEtaOrIX, int iPhiOrIY, CaloRectangle const rectangle, CaloSubdetectorTopology const &topology)
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
bool operator!=(Iterator const &other) const
bool operator==(Iterator const &other) const
CaloSubdetectorTopology const & topology_