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
CheckSecondary::deltae
std::vector< double > * deltae
Definition: CheckSecondary.h:52
TreatSecondary
Definition: TreatSecondary.h:16
CheckSecondary::treatSecondary
TreatSecondary * treatSecondary
Definition: CheckSecondary.h:47
Observer
Definition: Observer.h:23
step
step
Definition: StallMonitor.cc:94
CheckSecondary::file
TFile * file
Definition: CheckSecondary.h:54
CheckSecondary::~CheckSecondary
~CheckSecondary() override
Definition: CheckSecondary.cc:66
G4ProcessTypeEnumerator
Definition: G4ProcessTypeEnumerator.h:6
Observer.h
SimWatcher.h
CheckSecondary::storeIt
bool storeIt
Definition: CheckSecondary.h:49
G4ProcessTypeEnumerator.h
CheckSecondary::tree
TTree * tree
Definition: CheckSecondary.h:55
BeginOfTrack
Definition: BeginOfTrack.h:6
EndOfEvent
Definition: EndOfEvent.h:6
CheckSecondary::typeEnumerator
G4ProcessTypeEnumerator * typeEnumerator
Definition: CheckSecondary.h:48
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CheckSecondary::operator=
const CheckSecondary & operator=(const CheckSecondary &)=delete
CheckSecondary::nHad
int nHad
Definition: CheckSecondary.h:50
LorentzVector.h
BeginOfEvent
Definition: BeginOfEvent.h:6
SimWatcher
Definition: SimWatcher.h:27
CheckSecondary::py
std::vector< double > * py
Definition: CheckSecondary.h:52
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CheckSecondary::bookTree
TTree * bookTree(std::string)
Definition: CheckSecondary.cc:91
CheckSecondary::CheckSecondary
CheckSecondary(const edm::ParameterSet &p)
Definition: CheckSecondary.cc:25
CheckSecondary::nsec
std::vector< int > * nsec
Definition: CheckSecondary.h:51
CheckSecondary
Definition: CheckSecondary.h:25
CheckSecondary::procids
std::vector< int > * procids
Definition: CheckSecondary.h:51
CheckSecondary::px
std::vector< double > * px
Definition: CheckSecondary.h:52
CheckSecondary::endTree
void endTree()
Definition: CheckSecondary.cc:107
CheckSecondary::mass
std::vector< double > * mass
Definition: CheckSecondary.h:52
CheckSecondary::pz
std::vector< double > * pz
Definition: CheckSecondary.h:52
CheckSecondary::update
void update(const BeginOfEvent *evt) override
This routine will be called when the appropriate signal arrives.
Definition: CheckSecondary.cc:116
ParameterSet.h
CheckSecondary::saveToTree
bool saveToTree
Definition: CheckSecondary.h:49
CheckSecondary::procs
std::vector< std::string > * procs
Definition: CheckSecondary.h:53