CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/Fireworks/Geometry/interface/FWTGeoRecoGeometryESProducer.h

Go to the documentation of this file.
00001 #ifndef GEOMETRY_FWTGEORECO_GEOMETRY_ES_PRODUCER_H
00002 # define GEOMETRY_FWTGEORECO_GEOMETRY_ES_PRODUCER_H
00003 
00004 # include "boost/shared_ptr.hpp"
00005 
00006 # include "FWCore/Framework/interface/ESProducer.h"
00007 # include "FWCore/Framework/interface/ESHandle.h"
00008 # include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00009 
00010 namespace edm
00011 {
00012    class ParameterSet;
00013 }
00014 
00015 class CaloGeometry;
00016 class GlobalTrackingGeometry;
00017 class TrackerGeometry;
00018 class FWTGeoRecoGeometry;
00019 class FWTGeoRecoGeometryRecord;
00020 
00021 class TGeoManager;
00022 class TGeoShape;
00023 class TGeoVolume;
00024 class TGeoMaterial;
00025 class TGeoMedium;
00026 class GeomDet;
00027 
00028 class FWTGeoRecoGeometryESProducer : public edm::ESProducer
00029 {
00030 public:
00031   FWTGeoRecoGeometryESProducer( const edm::ParameterSet& );
00032   virtual ~FWTGeoRecoGeometryESProducer( void );
00033   
00034   boost::shared_ptr<FWTGeoRecoGeometry> produce( const FWTGeoRecoGeometryRecord& );
00035 
00036 private:
00037   FWTGeoRecoGeometryESProducer( const FWTGeoRecoGeometryESProducer& );
00038   const FWTGeoRecoGeometryESProducer& operator=( const FWTGeoRecoGeometryESProducer& );
00039 
00040   TGeoManager*      createManager( int level );
00041   TGeoShape*        createShape( const GeomDet *det );
00042   TGeoVolume*       createVolume( const std::string& name, const GeomDet *det, const std::string& matname = "Air" );
00043   TGeoMaterial*     createMaterial( const std::string& name );
00044   const std::string path( TGeoVolume* top, const std::string& name, int copy );
00045 
00046   void addCSCGeometry( TGeoVolume* top, const std::string& name = "CSC", int copy = 1 );
00047   void addDTGeometry( TGeoVolume* top, const std::string& name = "DT", int copy = 1 );
00048   void addRPCGeometry( TGeoVolume* top, const std::string& name = "RPC", int copy = 1 );
00049   void addPixelBarrelGeometry( TGeoVolume* top, const std::string& name = "PixelBarrel", int copy = 1 );
00050   void addPixelForwardGeometry( TGeoVolume* top, const std::string& name = "PixelForward", int copy = 1 );
00051   void addTIBGeometry( TGeoVolume* top, const std::string& name = "TIB", int copy = 1 );
00052   void addTOBGeometry( TGeoVolume* top, const std::string& name = "TOB", int copy = 1 );
00053   void addTIDGeometry( TGeoVolume* top, const std::string& name = "TID", int copy = 1 );
00054   void addTECGeometry( TGeoVolume* top, const std::string& name = "TEC", int copy = 1 );
00055   void addCaloGeometry( void );
00056   
00057   std::map<std::string, TGeoShape*>    m_nameToShape;
00058   std::map<std::string, TGeoVolume*>   m_nameToVolume;
00059   std::map<std::string, TGeoMaterial*> m_nameToMaterial;
00060   std::map<std::string, TGeoMedium*>   m_nameToMedium;
00061 
00062   edm::ESHandle<GlobalTrackingGeometry> m_geomRecord;
00063   edm::ESHandle<CaloGeometry>           m_caloGeom;
00064   const TrackerGeometry* m_trackerGeom;
00065   
00066   boost::shared_ptr<FWTGeoRecoGeometry> m_fwGeometry;
00067 };
00068 
00069 #endif // GEOMETRY_FWTGEORECO_GEOMETRY_ES_PRODUCER_H