test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~CheckSecondary();
34 
35 private:
36  CheckSecondary(const CheckSecondary&); // stop default
38 
39  // observer classes
40  TTree * bookTree(std::string);
41  void endTree();
42  void update(const BeginOfEvent * evt);
43  void update(const BeginOfTrack * trk);
44  void update(const G4Step * step);
45  void update(const EndOfEvent * evt);
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
const CheckSecondary & operator=(const CheckSecondary &)
std::vector< std::string > * procs
std::vector< double > * pz
std::vector< double > * deltae
std::vector< int > * nsec
G4ProcessTypeEnumerator * typeEnumerator
TTree * bookTree(std::string)
void update(const BeginOfEvent *evt)
This routine will be called when the appropriate signal arrives.
virtual ~CheckSecondary()
std::vector< double > * py
CheckSecondary(const edm::ParameterSet &p)
std::vector< int > * procids
std::vector< double > * px
TreatSecondary * treatSecondary
std::vector< double > * mass