CMS 3D CMS Logo

CaloGeometry.h

Go to the documentation of this file.
00001 #ifndef GEOMETRY_CALOGEOMETRY_CALOGEOMETRY_H
00002 #define GEOMETRY_CALOGEOMETRY_CALOGEOMETRY_H 1
00003 
00004 #include "DataFormats/DetId/interface/DetId.h"
00005 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00006 #include <map>
00007 #include <vector>
00008 
00009 class CaloSubdetectorGeometry;
00010 class CaloCellGeometry;
00011 
00021 class CaloGeometry {
00022 public:
00023   CaloGeometry();
00024     
00026   void setSubdetGeometry(DetId::Detector det, int subdet, const CaloSubdetectorGeometry* geom);
00027     
00029   const GlobalPoint& getPosition(const DetId& id) const;
00030 
00032   const CaloCellGeometry* getGeometry(const DetId& id) const;
00033 
00035   std::vector<DetId> getValidDetIds() const;
00036     
00038   std::vector<DetId> getValidDetIds(DetId::Detector det, int subdet) const;
00039 
00041   bool present(const DetId& id) const;
00042 
00044   const CaloSubdetectorGeometry* getSubdetectorGeometry(const DetId& id) const;
00045     
00047   const CaloSubdetectorGeometry* getSubdetectorGeometry(DetId::Detector det, int subdet) const;
00048 
00049   // Get closest cell, etc...
00050   const DetId getClosestCell(const GlobalPoint& r) const ;
00051 
00052 private:
00053   std::map<int, const CaloSubdetectorGeometry*> theGeometries_;
00054   int makeIndex(DetId::Detector det, int subdet) const;
00055 };
00056 
00057 
00058 
00059 #endif

Generated on Tue Jun 9 17:37:12 2009 for CMSSW by  doxygen 1.5.4