CMS 3D CMS Logo

SimG4FluxProducer.h
Go to the documentation of this file.
1 #ifndef SimG4CMSForwardSimG4FluxProducer_h
2 #define SimG4CMSForwardSimG4FluxProducer_h
3 
9 
10 // to retreive hits
12 
16 
17 #include "G4Step.hh"
18 #include "G4LogicalVolumeStore.hh"
19 #include "G4PhysicalVolumeStore.hh"
20 
21 #include <vector>
22 #include <string>
23 #include <map>
24 
26  public Observer<const BeginOfRun *>,
27  public Observer<const BeginOfEvent *>,
28  public Observer<const G4Step *> {
29 public:
31  ~SimG4FluxProducer() override;
32 
33  void produce(edm::Event &, const edm::EventSetup &) override;
34 
35 private:
36  SimG4FluxProducer(const SimG4FluxProducer &) = delete; // stop default
37  const SimG4FluxProducer &operator=(const SimG4FluxProducer &) = delete;
38 
39  // observer classes
40  void update(const BeginOfRun *run) override;
41  void update(const BeginOfEvent *evt) override;
42  void update(const G4Step *step) override;
43 
44  void endOfEvent(ParticleFlux &pflx, unsigned int k);
45  G4VPhysicalVolume *getTopPV();
46  std::map<G4LogicalVolume *, std::pair<unsigned int, std::string>>::iterator findLV(G4LogicalVolume *plv);
47 
48 private:
49  std::vector<std::string> LVNames_;
50  std::vector<int> LVTypes_;
51  G4VPhysicalVolume *topPV_;
52  std::map<G4LogicalVolume *, std::pair<unsigned int, std::string>> mapLV_;
53 
54  // some private members for ananlysis
55  unsigned int count_;
56  bool init_;
57  std::map<std::pair<G4LogicalVolume *, unsigned int>, ParticleFlux> store_;
58 };
59 
60 #endif
SimG4FluxProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: SimG4FluxProducer.cc:33
SimG4FluxProducer::topPV_
G4VPhysicalVolume * topPV_
Definition: SimG4FluxProducer.h:51
ParticleFlux.h
SimG4FluxProducer::~SimG4FluxProducer
~SimG4FluxProducer() override
Definition: SimG4FluxProducer.cc:31
Observer
Definition: Observer.h:23
step
step
Definition: StallMonitor.cc:94
SimG4FluxProducer::count_
unsigned int count_
Definition: SimG4FluxProducer.h:55
SimProducer.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SimG4FluxProducer::LVTypes_
std::vector< int > LVTypes_
Definition: SimG4FluxProducer.h:50
SimG4FluxProducer::update
void update(const BeginOfRun *run) override
This routine will be called when the appropriate signal arrives.
Definition: SimG4FluxProducer.cc:42
SimG4FluxProducer::operator=
const SimG4FluxProducer & operator=(const SimG4FluxProducer &)=delete
EndOfEvent.h
Observer.h
BeginOfRun.h
SimG4FluxProducer::findLV
std::map< G4LogicalVolume *, std::pair< unsigned int, std::string > >::iterator findLV(G4LogicalVolume *plv)
Definition: SimG4FluxProducer.cc:145
SimG4FluxProducer::getTopPV
G4VPhysicalVolume * getTopPV()
Definition: SimG4FluxProducer.cc:141
dqmdumpme.k
k
Definition: dqmdumpme.py:60
SimG4FluxProducer::endOfEvent
void endOfEvent(ParticleFlux &pflx, unsigned int k)
Definition: SimG4FluxProducer.cc:113
SimG4FluxProducer::LVNames_
std::vector< std::string > LVNames_
Definition: SimG4FluxProducer.h:49
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
SimProducer
Definition: SimProducer.h:64
BeginOfEvent.h
SimG4FluxProducer::init_
bool init_
Definition: SimG4FluxProducer.h:56
BeginOfEvent
Definition: BeginOfEvent.h:6
BeginOfRun
Definition: BeginOfRun.h:6
ParticleFlux
Definition: ParticleFlux.h:11
edm::EventSetup
Definition: EventSetup.h:57
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SimG4FluxProducer
Definition: SimG4FluxProducer.h:25
EventSetup.h
ParameterSet.h
SimG4FluxProducer::SimG4FluxProducer
SimG4FluxProducer(const edm::ParameterSet &p)
Definition: SimG4FluxProducer.cc:18
edm::Event
Definition: Event.h:73
SimG4FluxProducer::store_
std::map< std::pair< G4LogicalVolume *, unsigned int >, ParticleFlux > store_
Definition: SimG4FluxProducer.h:57
SimG4FluxProducer::mapLV_
std::map< G4LogicalVolume *, std::pair< unsigned int, std::string > > mapLV_
Definition: SimG4FluxProducer.h:52