CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/SimG4Core/GeometryProducer/interface/GeometryProducer.h

Go to the documentation of this file.
00001 #ifndef SimG4Core_GeometryProducer_H
00002 #define SimG4Core_GeometryProducer_H
00003 
00004 #include "FWCore/Framework/interface/EDProducer.h"
00005 #include "FWCore/Framework/interface/Event.h"
00006 // #include "DataFormats/Common/interface/Handle.h"
00007 #include "DataFormats/Common/interface/Handle.h"
00008 #include "FWCore/Framework/interface/MakerMacros.h"
00009 #include "FWCore/Framework/interface/EventSetup.h"
00010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00011 
00012  
00013 #include "SimG4Core/Notification/interface/SimActivityRegistry.h"
00014 #include "SimG4Core/SensitiveDetector/interface/AttachSD.h"
00015 #include "SimG4Core/SensitiveDetector/interface/SensitiveDetector.h"
00016 #include "SimG4Core/SensitiveDetector/interface/SensitiveTkDetector.h"
00017 #include "SimG4Core/SensitiveDetector/interface/SensitiveCaloDetector.h"
00018 
00019 #include <memory>
00020 #include "boost/shared_ptr.hpp"
00021 
00022 namespace sim { class FieldBuilder; }
00023 class SimWatcher;
00024 class SimProducer;
00025 class DDDWorld;
00026 class G4RunManagerKernel;
00027 class SimTrackManager;
00028 
00029 class GeometryProducer : public edm::EDProducer
00030 {
00031 public:
00032     typedef std::vector<boost::shared_ptr<SimProducer> > Producers;
00033     explicit GeometryProducer(edm::ParameterSet const & p);
00034     virtual ~GeometryProducer();
00035     virtual void beginJob();
00036     virtual void endJob();
00037     virtual void produce(edm::Event & e, const edm::EventSetup & c);
00038     std::vector<boost::shared_ptr<SimProducer> > producers() const
00039     { return m_producers; }
00040     std::vector<SensitiveTkDetector*>& sensTkDetectors() { return m_sensTkDets; }
00041     std::vector<SensitiveCaloDetector*>& sensCaloDetectors() { return m_sensCaloDets; }
00042 private:
00043     G4RunManagerKernel * m_kernel;
00044     bool m_pUseMagneticField;
00045     edm::ParameterSet m_pField;
00046     bool m_pUseSensitiveDetectors;
00047     SimActivityRegistry m_registry;
00048     std::vector<boost::shared_ptr<SimWatcher> > m_watchers;
00049     std::vector<boost::shared_ptr<SimProducer> > m_producers;    
00050     std::auto_ptr<sim::FieldBuilder> m_fieldBuilder;
00051     std::auto_ptr<SimTrackManager> m_trackManager;
00052     AttachSD * m_attach;
00053     std::vector<SensitiveTkDetector*> m_sensTkDets;
00054     std::vector<SensitiveCaloDetector*> m_sensCaloDets;
00055     edm::ParameterSet m_p;
00056 };
00057 
00058 #endif