00001 #ifndef GEOMETRY_CALOTOPOLOGY_CALOTOPOLOGY_H 00002 #define GEOMETRY_CALOTOPOLOGY_CALOTOPOLOGY_H 1 00003 00004 #include "DataFormats/DetId/interface/DetId.h" 00005 #include "Geometry/CaloTopology/interface/CaloDirection.h" 00006 #include <map> 00007 #include <vector> 00008 00009 class CaloSubdetectorTopology; 00010 00019 class CaloTopology { 00020 public: 00021 CaloTopology(); 00022 00023 ~CaloTopology() {}; 00025 void setSubdetTopology(DetId::Detector det, int subdet, const CaloSubdetectorTopology* geom); 00027 const CaloSubdetectorTopology* getSubdetectorTopology(const DetId& id) const; 00029 const CaloSubdetectorTopology* getSubdetectorTopology(DetId::Detector det, int subdet) const; 00031 bool valid(const DetId& id) const; 00032 00034 std::vector<DetId> east(const DetId& id) const; 00036 std::vector<DetId> west(const DetId& id) const; 00038 std::vector<DetId> north(const DetId& id) const; 00040 std::vector<DetId> south(const DetId& id) const; 00042 std::vector<DetId> up(const DetId& id) const; 00044 std::vector<DetId> down(const DetId& id) const; 00046 std::vector<DetId> getNeighbours(const DetId& id, const CaloDirection& dir) const; 00048 std::vector<DetId> getWindow(const DetId& id, const int& northSouthSize, const int& eastWestSize) const; 00050 std::vector<DetId> getAllNeighbours(const DetId& id) const; 00051 00052 private: 00053 std::map<int, const CaloSubdetectorTopology*> theTopologies_; 00054 int makeIndex(DetId::Detector det, int subdet) const; 00055 }; 00056 00057 00058 00059 #endif