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 
10 
11 #include "TFile.h"
12 #include "TTree.h"
13 
14 #include <iostream>
15 #include <memory>
16 #include <vector>
17 #include <string>
18 
19 class G4Step;
20 class BeginOfEvent;
21 class BeginOfTrack;
22 class EndOfEvent;
23 
24 class CheckSecondary : public SimWatcher,
25  public Observer<const BeginOfEvent *>,
26  public Observer<const BeginOfTrack *>,
27  public Observer<const EndOfEvent *>,
28  public Observer<const G4Step *> {
29 
30 public:
32  virtual ~CheckSecondary();
33 
34 private:
35  CheckSecondary(const CheckSecondary&); // stop default
37 
38  // observer classes
39  TTree * bookTree(std::string);
40  void endTree();
41  void update(const BeginOfEvent * evt);
42  void update(const BeginOfTrack * trk);
43  void update(const G4Step * step);
44  void update(const EndOfEvent * evt);
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
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