CMS 3D CMS Logo

CheckSecondary.h
Go to the documentation of this file.
1 #ifndef SimG4Core_CheckSecondary_CheckSecondary_H
2 #define SimG4Core_CheckSecondary_CheckSecondary_H
3 
9 
10 #include "TFile.h"
11 #include "TTree.h"
12 
13 #include <iostream>
14 #include <memory>
15 #include <vector>
16 #include <string>
17 
18 class G4Step;
19 class BeginOfEvent;
20 class BeginOfTrack;
21 class EndOfEvent;
22 class TreatSecondary;
23 class ProcessTypeEnumerator;
24 
25 class CheckSecondary : public SimWatcher,
26  public Observer<const BeginOfEvent *>,
27  public Observer<const BeginOfTrack *>,
28  public Observer<const EndOfEvent *>,
29  public Observer<const G4Step *> {
30 
31 public:
33  ~CheckSecondary() override;
34 
35 private:
36  CheckSecondary(const CheckSecondary&) = delete; // stop default
37  const CheckSecondary& operator=(const CheckSecondary&) = delete;
38 
39  // observer classes
40  TTree * bookTree(std::string);
41  void endTree();
42  void update(const BeginOfEvent * evt) override;
43  void update(const BeginOfTrack * trk) override;
44  void update(const G4Step * step) override;
45  void update(const EndOfEvent * evt) override;
46 
47 private:
51  int nHad;
52  std::vector<int> *nsec, *procids;
53  std::vector<double> *px, *py, *pz, *mass, *deltae;
54  std::vector<std::string> *procs;
55  TFile *file;
56  TTree *tree;
57 };
58 
59 #endif
std::vector< std::string > * procs
~CheckSecondary() override
std::vector< double > * pz
std::vector< double > * deltae
const CheckSecondary & operator=(const CheckSecondary &)=delete
std::vector< int > * nsec
G4ProcessTypeEnumerator * typeEnumerator
TTree * bookTree(std::string)
std::vector< double > * py
void update(const BeginOfEvent *evt) override
This routine will be called when the appropriate signal arrives.
CheckSecondary(const edm::ParameterSet &p)
std::vector< int > * procids
step
std::vector< double > * px
TreatSecondary * treatSecondary
std::vector< double > * mass