CMS 3D CMS Logo

GeometryProducer.h
Go to the documentation of this file.
1 #ifndef SimG4Core_GeometryProducer_H
2 #define SimG4Core_GeometryProducer_H
3 
11 
17 
18 #include <memory>
19 
20 namespace sim {
21  class FieldBuilder;
22 }
23 
24 class SimWatcher;
25 class SimProducer;
26 class DDDWorld;
27 class G4RunManagerKernel;
28 class SimTrackManager;
29 
30 class GeometryProducer : public edm::one::EDProducer<edm::one::SharedResources, edm::one::WatchRuns> {
31 public:
32  typedef std::vector<std::shared_ptr<SimProducer>> Producers;
33 
34  explicit GeometryProducer(edm::ParameterSet const &p);
35  ~GeometryProducer() override;
36  void beginRun(const edm::Run &r, const edm::EventSetup &c) override;
37  void endRun(const edm::Run &r, const edm::EventSetup &c) override;
38  void produce(edm::Event &e, const edm::EventSetup &c) override;
40 
41  std::vector<std::shared_ptr<SimProducer>> producers() const { return m_producers; }
42  std::vector<SensitiveTkDetector *> &sensTkDetectors() { return m_sensTkDets; }
43  std::vector<SensitiveCaloDetector *> &sensCaloDetectors() { return m_sensCaloDets; }
44 
45 private:
46  void updateMagneticField(edm::EventSetup const &es);
47 
48  G4RunManagerKernel *m_kernel;
53  std::vector<std::shared_ptr<SimWatcher>> m_watchers;
54  std::vector<std::shared_ptr<SimProducer>> m_producers;
55  std::unique_ptr<sim::FieldBuilder> m_fieldBuilder;
56  std::unique_ptr<SimTrackManager> m_trackManager;
58  std::vector<SensitiveTkDetector *> m_sensTkDets;
59  std::vector<SensitiveCaloDetector *> m_sensCaloDets;
61  bool m_firstRun;
62 };
63 
64 #endif
GeometryProducer::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock &, edm::EventSetup const &)
Definition: GeometryProducer.cc:100
SimTrackManager
Definition: SimTrackManager.h:35
Handle.h
GeometryProducer::m_p
edm::ParameterSet m_p
Definition: GeometryProducer.h:60
EDProducer.h
GeometryProducer::m_pUseSensitiveDetectors
bool m_pUseSensitiveDetectors
Definition: GeometryProducer.h:51
GeometryProducer::m_sensCaloDets
std::vector< SensitiveCaloDetector * > m_sensCaloDets
Definition: GeometryProducer.h:59
SensitiveCaloDetector.h
DDDWorld
Definition: DDDWorld.h:14
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
GeometryProducer::m_registry
SimActivityRegistry m_registry
Definition: GeometryProducer.h:52
GeometryProducer::producers
std::vector< std::shared_ptr< SimProducer > > producers() const
Definition: GeometryProducer.h:41
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
GeometryProducer::sensTkDetectors
std::vector< SensitiveTkDetector * > & sensTkDetectors()
Definition: GeometryProducer.h:42
edm::one::EDProducer
Definition: EDProducer.h:30
GeometryProducer::produce
void produce(edm::Event &e, const edm::EventSetup &c) override
Definition: GeometryProducer.cc:109
SensitiveTkDetector.h
SimActivityRegistry.h
MakerMacros.h
Run.h
GeometryProducer::Producers
std::vector< std::shared_ptr< SimProducer > > Producers
Definition: GeometryProducer.h:32
GeometryProducer::m_attach
AttachSD * m_attach
Definition: GeometryProducer.h:57
GeometryProducer::endRun
void endRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: GeometryProducer.cc:107
GeometryProducer::updateMagneticField
void updateMagneticField(edm::EventSetup const &es)
Definition: GeometryProducer.cc:83
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
SimProducer
Definition: SimProducer.h:64
sim
Definition: GeometryProducer.h:20
GeometryProducer::GeometryProducer
GeometryProducer(edm::ParameterSet const &p)
Definition: GeometryProducer.cc:61
GeometryProducer::m_fieldBuilder
std::unique_ptr< sim::FieldBuilder > m_fieldBuilder
Definition: GeometryProducer.h:55
SimWatcher
Definition: SimWatcher.h:33
GeometryProducer::m_kernel
G4RunManagerKernel * m_kernel
Definition: GeometryProducer.h:48
edm::EventSetup
Definition: EventSetup.h:57
GeometryProducer::m_sensTkDets
std::vector< SensitiveTkDetector * > m_sensTkDets
Definition: GeometryProducer.h:58
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
AttachSD.h
alignCSCRings.r
r
Definition: alignCSCRings.py:93
GeometryProducer::sensCaloDetectors
std::vector< SensitiveCaloDetector * > & sensCaloDetectors()
Definition: GeometryProducer.h:43
GeometryProducer::m_producers
std::vector< std::shared_ptr< SimProducer > > m_producers
Definition: GeometryProducer.h:54
GeometryProducer::m_firstRun
bool m_firstRun
Definition: GeometryProducer.h:61
GeometryProducer::beginRun
void beginRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: GeometryProducer.cc:105
SimActivityRegistry
Definition: SimActivityRegistry.h:43
SensitiveDetector.h
EventSetup.h
AttachSD
Definition: AttachSD.h:17
GeometryProducer::m_watchers
std::vector< std::shared_ptr< SimWatcher > > m_watchers
Definition: GeometryProducer.h:53
ParameterSet.h
GeometryProducer
Definition: GeometryProducer.h:30
GeometryProducer::m_trackManager
std::unique_ptr< SimTrackManager > m_trackManager
Definition: GeometryProducer.h:56
edm::Event
Definition: Event.h:73
GeometryProducer::m_pUseMagneticField
bool m_pUseMagneticField
Definition: GeometryProducer.h:49
GeometryProducer::~GeometryProducer
~GeometryProducer() override
Definition: GeometryProducer.cc:78
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
GeometryProducer::m_pField
edm::ParameterSet m_pField
Definition: GeometryProducer.h:50