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