CMS 3D CMS Logo

StoreSecondary.h
Go to the documentation of this file.
1 #ifndef SimG4Core_CheckSecondary_StoreSecondary_H
2 #define SimG4Core_CheckSecondary_StoreSecondary_H
3 
8 
9 #include <iostream>
10 #include <memory>
11 #include <string>
12 #include <vector>
13 
14 class G4Step;
15 class BeginOfEvent;
16 class BeginOfTrack;
17 class TreatSecondary;
18 
19 class StoreSecondary : public SimProducer,
20  public Observer<const BeginOfEvent *>,
21  public Observer<const BeginOfTrack *>,
22  public Observer<const G4Step *> {
23 public:
25  ~StoreSecondary() override;
26 
27  void produce(edm::Event &, const edm::EventSetup &) override;
28 
29 private:
30  StoreSecondary(const StoreSecondary &) = delete; // stop default
31  const StoreSecondary &operator=(const StoreSecondary &) = delete;
32 
33  // observer classes
34  void update(const BeginOfEvent *evt) override;
35  void update(const BeginOfTrack *trk) override;
36  void update(const G4Step *step) override;
37 
38 private:
40  int nHad;
41  bool storeIt;
42  std::vector<math::XYZTLorentzVector> secondaries;
43  std::vector<int> nsecs;
44  std::vector<std::string> procs;
46 };
47 
48 #endif
TreatSecondary
Definition: TreatSecondary.h:16
Observer
Definition: Observer.h:23
step
step
Definition: StallMonitor.cc:94
SimProducer.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
StoreSecondary::storeIt
bool storeIt
Definition: StoreSecondary.h:41
StoreSecondary::nHad
int nHad
Definition: StoreSecondary.h:40
StoreSecondary::~StoreSecondary
~StoreSecondary() override
Definition: StoreSecondary.cc:34
StoreSecondary::nsecs
std::vector< int > nsecs
Definition: StoreSecondary.h:43
Observer.h
StoreSecondary::killAfter
int killAfter
Definition: StoreSecondary.h:39
BeginOfTrack
Definition: BeginOfTrack.h:6
StoreSecondary::update
void update(const BeginOfEvent *evt) override
This routine will be called when the appropriate signal arrives.
Definition: StoreSecondary.cc:57
edm::ParameterSet
Definition: ParameterSet.h:47
SimProducer
Definition: SimProducer.h:64
StoreSecondary::procs
std::vector< std::string > procs
Definition: StoreSecondary.h:44
StoreSecondary::secondaries
std::vector< math::XYZTLorentzVector > secondaries
Definition: StoreSecondary.h:42
StoreSecondary::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: StoreSecondary.cc:36
LorentzVector.h
BeginOfEvent
Definition: BeginOfEvent.h:6
edm::EventSetup
Definition: EventSetup.h:57
StoreSecondary::operator=
const StoreSecondary & operator=(const StoreSecondary &)=delete
StoreSecondary::StoreSecondary
StoreSecondary(const edm::ParameterSet &p)
Definition: StoreSecondary.cc:22
StoreSecondary::treatSecondary
TreatSecondary * treatSecondary
Definition: StoreSecondary.h:45
StoreSecondary
Definition: StoreSecondary.h:19
ParameterSet.h
edm::Event
Definition: Event.h:73
StoreSecondary::verbosity
int verbosity
Definition: StoreSecondary.h:39