1 #ifndef TOPOLOGY_CALOTOPOLOGY_CALOSUBDETECTORTOPOLOGY_H
2 #define TOPOLOGY_CALOTOPOLOGY_CALOSUBDETECTORTOPOLOGY_H 1
27 virtual bool valid(
const DetId& )
const {
return false; };
33 virtual unsigned int ncells()
const {
return 1; }
40 virtual std::vector<DetId>
east(
const DetId&
id)
const = 0;
42 virtual std::vector<DetId>
west(
const DetId&
id)
const = 0;
44 virtual std::vector<DetId>
north(
const DetId&
id)
const = 0;
46 virtual std::vector<DetId>
south(
const DetId&
id)
const = 0;
48 virtual std::vector<DetId>
up(
const DetId&
id)
const = 0;
50 virtual std::vector<DetId>
down(
const DetId&
id)
const = 0;
55 std::vector<DetId> ids =
east(
id);
56 return ids.empty() ?
DetId() : ids[0];
59 std::vector<DetId> ids =
west(
id);
60 return ids.empty() ?
DetId() : ids[0];
63 std::vector<DetId> ids =
north(
id);
64 return ids.empty() ?
DetId() : ids[0];
67 std::vector<DetId> ids =
south(
id);
68 return ids.empty() ?
DetId() : ids[0];
71 std::vector<DetId> ids =
up(
id);
72 return ids.empty() ?
DetId() : ids[0];
75 std::vector<DetId> ids =
down(
id);
76 return ids.empty() ?
DetId() : ids[0];
83 std::vector<DetId> aNullVector;
102 throw cms::Exception(
"getNeighboursError") <<
"Unsopported direction";
108 virtual std::vector<DetId>
getWindow(
const DetId&
id,
const int& northSouthSize,
const int& eastWestSize)
const;
148 throw cms::Exception(
"getWindowError") <<
"Unsopported direction";
virtual DetId goSouth(const DetId &id) const
virtual DetId goWest(const DetId &id) const
virtual DetId denseId2detId(unsigned int) const
return a linear packed id
virtual std::vector< DetId > getNeighbours(const DetId &id, const CaloDirection &dir) const
virtual std::vector< DetId > getAllNeighbours(const DetId &id) const
std::pair< int, int > Coordinate
virtual int topoVersion() const
return a version which identifies the given topology
virtual std::vector< DetId > west(const DetId &id) const =0
virtual ~CaloSubdetectorTopology()
virtual destructor
virtual DetId goEast(const DetId &id) const
virtual unsigned int detId2denseId(const DetId &) const
return a linear packed id
virtual DetId goUp(const DetId &id) const
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
CellInfo(bool a_visited, const DetId &a_cell)
virtual DetId goNorth(const DetId &id) const
Coordinate getNeighbourIndex(const Coordinate &coord, const CaloDirection &dir) const
virtual std::vector< DetId > north(const DetId &id) const =0
virtual DetId goDown(const DetId &id) const
virtual std::vector< DetId > up(const DetId &id) const =0
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
virtual bool valid(const DetId &) const
is this detid present in the Topology?
virtual bool denseIdConsistent(int topoVer) const
return whether this topology is consistent with the numbering in the given topology ...
virtual std::vector< DetId > south(const DetId &id) const =0
volatile std::atomic< bool > shutdown_flag false
CaloDirection
Codes the local directions in the cell lattice.
CaloSubdetectorTopology()
standard constructor
virtual std::vector< DetId > east(const DetId &id) const =0
virtual std::vector< DetId > down(const DetId &id) const =0