CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DoCastorAnalysis.h
Go to the documentation of this file.
1 // File: DoCastorAnalysis.h
3 // Date: 02.07 Panos Katsas
4 // Description: simulation analysis steering code
5 //
7 #undef debug
8 #ifndef DoCastorAnalysis_h
9 #define DoCastorAnalysis_h
10 
16 
17 #include "G4SDManager.hh"
18 #include "G4Step.hh"
19 #include "G4Track.hh"
20 #include "G4Event.hh"
21 #include "G4PrimaryVertex.hh"
22 #include "G4VProcess.hh"
23 #include "G4HCofThisEvent.hh"
24 #include "G4UserEventAction.hh"
25 #include "CLHEP/Units/GlobalSystemOfUnits.h"
26 #include "CLHEP/Units/GlobalPhysicalConstants.h"
27 
31 
32 #include <cassert>
33 #include <iostream>
34 #include <string>
35 #include <map>
36 #include <cmath>
37 #include <memory>
38 #include <vector>
39 
40 #include <CLHEP/Random/Randomize.h>
41 
42 #include "TROOT.h"
43 #include "TFile.h"
44 #include "TH1.h"
45 #include "TH2.h"
46 #include "TProfile.h"
47 #include "TNtuple.h"
48 #include "TRandom.h"
49 #include "TLorentzVector.h"
50 #include "TUnixSystem.h"
51 #include "TSystem.h"
52 #include "TMath.h"
53 #include "TF1.h"
54 
55 class G4Step;
56 class BeginOfJob;
57 class BeginOfRun;
58 class EndOfRun;
59 class BeginOfEvent;
60 class EndOfEvent;
61 
63  public Observer<const BeginOfJob *>,
64  public Observer<const BeginOfRun *>,
65  public Observer<const EndOfRun *>,
66  public Observer<const BeginOfEvent *>,
67  public Observer<const EndOfEvent *>,
68  public Observer<const G4Step *> {
69 
70 public:
72  virtual ~DoCastorAnalysis();
73 
74 private:
75  // observer classes
76  void update(const BeginOfJob * run);
77  void update(const BeginOfRun * run);
78  void update(const EndOfRun * run);
79  void update(const BeginOfEvent * evt);
80  void update(const EndOfEvent * evt);
81  void update(const G4Step * step);
82 
83 private:
84 
85  int verbosity;
86 
88 
90  TTree* CastorTree;
91 
93 
94  std::vector<double> simhit_x, simhit_y, simhit_z;
95  std::vector<double> simhit_eta, simhit_phi, simhit_energy;
96  std::vector<int> simhit_sector, simhit_module;
97  //std::vector<double> simhit_time;
98 
99  std::vector<double> *psimhit_x, *psimhit_y, *psimhit_z;
100  std::vector<double> *psimhit_eta, *psimhit_phi, *psimhit_energy;
101  std::vector<int> *psimhit_sector, *psimhit_module;
102  //std::vector<double> *psimhit_time;
103 
104  double simhit_etot;
105 
106 };
107 
108 #endif // DoCastorAnalysis_h
109 
std::vector< double > * psimhit_z
std::vector< double > simhit_eta
std::vector< double > * psimhit_x
std::vector< double > * psimhit_energy
std::vector< double > simhit_x
std::vector< double > * psimhit_phi
DoCastorAnalysis(const edm::ParameterSet &p)
virtual ~DoCastorAnalysis()
std::vector< double > simhit_phi
std::vector< double > * psimhit_y
std::vector< double > simhit_y
std::vector< double > * psimhit_eta
TFile * CastorOutputEventFile
void update(const BeginOfJob *run)
This routine will be called when the appropriate signal arrives.
std::vector< int > simhit_sector
std::vector< int > * psimhit_sector
std::string TreeFileName
std::vector< double > simhit_energy
std::vector< int > * psimhit_module
std::vector< int > simhit_module
std::vector< double > simhit_z