CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/Geometry/CaloTopology/interface/CaloTopology.h

Go to the documentation of this file.
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 
00022       typedef std::map<int, const CaloSubdetectorTopology*> TopMap ;
00023 
00024   CaloTopology();
00025 
00026   ~CaloTopology();
00028   void setSubdetTopology(DetId::Detector det, int subdet, const CaloSubdetectorTopology* geom);
00030   const CaloSubdetectorTopology* getSubdetectorTopology(const DetId& id) const;
00032   const CaloSubdetectorTopology* getSubdetectorTopology(DetId::Detector det, int subdet) const;
00034   bool valid(const DetId& id) const;
00035 
00037   std::vector<DetId> east(const DetId& id) const;
00039   std::vector<DetId> west(const DetId& id) const;
00041   std::vector<DetId> north(const DetId& id) const;
00043   std::vector<DetId> south(const DetId& id) const;
00045   std::vector<DetId> up(const DetId& id) const;
00047   std::vector<DetId> down(const DetId& id) const;
00049   std::vector<DetId> getNeighbours(const DetId& id, const CaloDirection& dir) const;
00051   std::vector<DetId> getWindow(const DetId& id, const int& northSouthSize, const int& eastWestSize) const;
00053   std::vector<DetId> getAllNeighbours(const DetId& id) const;
00054 
00055 private:
00056   TopMap theTopologies_;
00057   int makeIndex(DetId::Detector det, int subdet) const;
00058 };
00059 
00060 
00061 
00062 #endif