CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/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 #include "DataFormats/Common/interface/EDProduct.h"
00013  
00014 #include "SimG4Core/Notification/interface/SimActivityRegistry.h"
00015 #include "SimG4Core/SensitiveDetector/interface/AttachSD.h"
00016 #include "SimG4Core/SensitiveDetector/interface/SensitiveDetector.h"
00017 #include "SimG4Core/SensitiveDetector/interface/SensitiveTkDetector.h"
00018 #include "SimG4Core/SensitiveDetector/interface/SensitiveCaloDetector.h"
00019 
00020 #include <memory>
00021 #include "boost/shared_ptr.hpp"
00022 
00023 namespace sim { class FieldBuilder; }
00024 class SimWatcher;
00025 class SimProducer;
00026 class DDDWorld;
00027 class G4RunManagerKernel;
00028 class SimTrackManager;
00029 
00030 class GeometryProducer : public edm::EDProducer
00031 {
00032 public:
00033     typedef std::vector<boost::shared_ptr<SimProducer> > Producers;
00034     explicit GeometryProducer(edm::ParameterSet const & p);
00035     virtual ~GeometryProducer();
00036     virtual void beginJob();
00037     virtual void endJob();
00038     virtual void produce(edm::Event & e, const edm::EventSetup & c);
00039     std::vector<boost::shared_ptr<SimProducer> > producers() const
00040     { return m_producers; }
00041     std::vector<SensitiveTkDetector*>& sensTkDetectors() { return m_sensTkDets; }
00042     std::vector<SensitiveCaloDetector*>& sensCaloDetectors() { return m_sensCaloDets; }
00043 private:
00044     G4RunManagerKernel * m_kernel;
00045     bool m_pUseMagneticField;
00046     edm::ParameterSet m_pField;
00047     bool m_pUseSensitiveDetectors;
00048     SimActivityRegistry m_registry;
00049     std::vector<boost::shared_ptr<SimWatcher> > m_watchers;
00050     std::vector<boost::shared_ptr<SimProducer> > m_producers;    
00051     std::auto_ptr<sim::FieldBuilder> m_fieldBuilder;
00052     std::auto_ptr<SimTrackManager> m_trackManager;
00053     AttachSD * m_attach;
00054     std::vector<SensitiveTkDetector*> m_sensTkDets;
00055     std::vector<SensitiveCaloDetector*> m_sensCaloDets;
00056     edm::ParameterSet m_p;
00057 };
00058 
00059 #endif