CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <vector>
12 #include <string>
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 
24 public:
26  virtual ~StoreSecondary();
27 
28  void produce(edm::Event&, const edm::EventSetup&);
29 
30 private:
31  StoreSecondary(const StoreSecondary&); // stop default
33 
34  // observer classes
35  void update(const BeginOfEvent * evt);
36  void update(const BeginOfTrack * trk);
37  void update(const G4Step * step);
38 
39 private:
41  int nHad;
42  bool storeIt;
43  std::vector<math::XYZTLorentzVector> secondaries;
44  std::vector<int> nsecs;
45  std::vector<std::string> procs;
47 };
48 
49 #endif
virtual ~StoreSecondary()
std::vector< int > nsecs
void update(const BeginOfEvent *evt)
This routine will be called when the appropriate signal arrives.
StoreSecondary(const edm::ParameterSet &p)
std::vector< math::XYZTLorentzVector > secondaries
std::vector< std::string > procs
const StoreSecondary & operator=(const StoreSecondary &)
void produce(edm::Event &, const edm::EventSetup &)
TreatSecondary * treatSecondary