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(const StoreSecondary &) = delete; // stop default
26  const StoreSecondary &operator=(const StoreSecondary &) = delete;
27  ~StoreSecondary() override;
28 
29  void produce(edm::Event &, const edm::EventSetup &) override;
30 
31 private:
32  // observer classes
33  void update(const BeginOfEvent *evt) override;
34  void update(const BeginOfTrack *trk) override;
35  void update(const G4Step *step) override;
36 
37 private:
39  int nHad;
40  bool storeIt;
41  std::vector<math::XYZTLorentzVector> secondaries;
42  std::vector<int> nsecs;
43  std::vector<std::string> procs;
45 };
46 
47 #endif
~StoreSecondary() override
std::vector< int > nsecs
void update(const BeginOfEvent *evt) override
This routine will be called when the appropriate signal arrives.
StoreSecondary(const edm::ParameterSet &p)
std::vector< math::XYZTLorentzVector > secondaries
const StoreSecondary & operator=(const StoreSecondary &)=delete
std::vector< std::string > procs
TreatSecondary * treatSecondary
step
Definition: StallMonitor.cc:98
void produce(edm::Event &, const edm::EventSetup &) override