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 <string>
16 #include <vector>
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 public:
32  ~CheckSecondary() override;
33 
34 private:
35  CheckSecondary(const CheckSecondary &) = delete; // stop default
36  const CheckSecondary &operator=(const CheckSecondary &) = delete;
37 
38  // observer classes
39  TTree *bookTree(std::string);
40  void endTree();
41  void update(const BeginOfEvent *evt) override;
42  void update(const BeginOfTrack *trk) override;
43  void update(const G4Step *step) override;
44  void update(const EndOfEvent *evt) override;
45 
46 private:
50  int nHad;
51  std::vector<int> *nsec, *procids;
52  std::vector<double> *px, *py, *pz, *mass, *deltae;
53  std::vector<std::string> *procs;
54  TFile *file;
55  TTree *tree;
56 };
57 
58 #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
Definition: StallMonitor.cc:94
std::vector< double > * px
TreatSecondary * treatSecondary
std::vector< double > * mass