CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GeometryProducer.h
Go to the documentation of this file.
1 #ifndef SimG4Core_GeometryProducer_H
2 #define SimG4Core_GeometryProducer_H
3 
6 // #include "DataFormats/Common/interface/Handle.h"
11 
12 
18 
19 #include <memory>
20 
21 namespace sim { class FieldBuilder; }
22 class SimWatcher;
23 class SimProducer;
24 class DDDWorld;
25 class G4RunManagerKernel;
26 class SimTrackManager;
27 
29 {
30 public:
31  typedef std::vector<std::shared_ptr<SimProducer> > Producers;
32  explicit GeometryProducer(edm::ParameterSet const & p);
33 // virtual ~GeometryProducer();
34 // virtual void beginJob();
35 // virtual void endJob();
36 // virtual void produce(edm::Event & e, const edm::EventSetup & c);
37  virtual ~GeometryProducer() override;
38  void produce(edm::Event & e, const edm::EventSetup & c);
40 
41  std::vector<std::shared_ptr<SimProducer> > producers() const
42  { return m_producers; }
43  std::vector<SensitiveTkDetector*>& sensTkDetectors() { return m_sensTkDets; }
44  std::vector<SensitiveCaloDetector*>& sensCaloDetectors() { return m_sensCaloDets; }
45 private:
46 
47  void updateMagneticField( edm::EventSetup const& es );
48 
49  G4RunManagerKernel * m_kernel;
54  std::vector<std::shared_ptr<SimWatcher> > m_watchers;
55  std::vector<std::shared_ptr<SimProducer> > m_producers;
56  std::auto_ptr<sim::FieldBuilder> m_fieldBuilder;
57  std::auto_ptr<SimTrackManager> m_trackManager;
59  std::vector<SensitiveTkDetector*> m_sensTkDets;
60  std::vector<SensitiveCaloDetector*> m_sensCaloDets;
62  bool m_firstRun;
63 };
64 
65 #endif
GeometryProducer(edm::ParameterSet const &p)
std::vector< std::shared_ptr< SimProducer > > Producers
edm::ParameterSet m_pField
virtual ~GeometryProducer() override
std::auto_ptr< SimTrackManager > m_trackManager
Definition: sim.h:19
std::vector< SensitiveTkDetector * > & sensTkDetectors()
std::vector< std::shared_ptr< SimWatcher > > m_watchers
G4RunManagerKernel * m_kernel
std::vector< SensitiveCaloDetector * > & sensCaloDetectors()
std::vector< std::shared_ptr< SimProducer > > m_producers
SimActivityRegistry m_registry
void updateMagneticField(edm::EventSetup const &es)
std::vector< std::shared_ptr< SimProducer > > producers() const
std::vector< SensitiveTkDetector * > m_sensTkDets
std::auto_ptr< sim::FieldBuilder > m_fieldBuilder
void beginLuminosityBlock(edm::LuminosityBlock &, edm::EventSetup const &)
edm::ParameterSet m_p
void produce(edm::Event &e, const edm::EventSetup &c)
std::vector< SensitiveCaloDetector * > m_sensCaloDets