CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/Geometry/CaloGeometry/interface/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 <vector>
00007 
00008 #include "FWCore/Utilities/interface/GCC11Compatibility.h"
00009 
00010 class CaloSubdetectorGeometry;
00011 class CaloCellGeometry;
00012 
00023 class CaloGeometry 
00024 {
00025    public:
00026 
00027       CaloGeometry() ;
00028     
00030       void setSubdetGeometry( DetId::Detector                det    , 
00031                               int                            subdet , 
00032                               const CaloSubdetectorGeometry* geom    ) ;
00033     
00035       const GlobalPoint& getPosition( const DetId& id ) const ;
00036 
00038       const CaloCellGeometry* getGeometry( const DetId& id ) const ;
00039 
00041       std::vector<DetId> getValidDetIds() const ;
00042     
00044       const std::vector<DetId>& getValidDetIds( DetId::Detector det, int subdet ) const;
00045 
00047       bool present( const DetId& id ) const ;
00048 
00050       const CaloSubdetectorGeometry* getSubdetectorGeometry( const DetId& id ) const ;
00051     
00053       const CaloSubdetectorGeometry* getSubdetectorGeometry( DetId::Detector det    , 
00054                                                              int             subdet   ) const ;
00055 
00056       // Get closest cell, etc...
00057 //not implemented      const DetId getClosestCell( const GlobalPoint& r ) const ;
00058 
00059    private:
00060 
00061       static const std::vector<DetId> k_emptyVec ;
00062 
00063       std::vector< const CaloSubdetectorGeometry* > m_geos ;
00064 
00065       unsigned int makeIndex( DetId::Detector det,
00066                               int             subdet,
00067                               bool&           ok      ) const ;
00068 
00069       enum { kMaxDet = 5 ,
00070              kMinDet = 3 ,
00071              kNDets  = kMaxDet - kMinDet + 1 ,
00072              kMaxSub = 4 ,
00073              kLength = kNDets*kMaxSub } ;
00074 };
00075 
00076 
00077 
00078 #endif