CMS 3D CMS Logo

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 public:
71  ~DoCastorAnalysis() override;
72 
73 private:
74  // observer classes
75  void update(const BeginOfJob *run) override;
76  void update(const BeginOfRun *run) override;
77  void update(const EndOfRun *run) override;
78  void update(const BeginOfEvent *evt) override;
79  void update(const EndOfEvent *evt) override;
80  void update(const G4Step *step) override;
81 
82 private:
83  int verbosity;
84 
86 
88  TTree *CastorTree;
89 
91 
92  std::vector<double> simhit_x, simhit_y, simhit_z;
93  std::vector<double> simhit_eta, simhit_phi, simhit_energy;
94  std::vector<int> simhit_sector, simhit_module;
95  //std::vector<double> simhit_time;
96 
97  std::vector<double> *psimhit_x, *psimhit_y, *psimhit_z;
98  std::vector<double> *psimhit_eta, *psimhit_phi, *psimhit_energy;
99  std::vector<int> *psimhit_sector, *psimhit_module;
100  //std::vector<double> *psimhit_time;
101 
102  double simhit_etot;
103 };
104 
105 #endif // DoCastorAnalysis_h
Observer
Definition: Observer.h:23
DoCastorAnalysis::CastorOutputEventFile
TFile * CastorOutputEventFile
Definition: DoCastorAnalysis.h:87
BeginOfJob.h
step
step
Definition: StallMonitor.cc:94
DoCastorAnalysis::simhit_sector
std::vector< int > simhit_sector
Definition: DoCastorAnalysis.h:94
DoCastorAnalysis::psimhit_sector
std::vector< int > * psimhit_sector
Definition: DoCastorAnalysis.h:99
DoCastorAnalysis
Definition: DoCastorAnalysis.h:62
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
EndOfEvent.h
DoCastorAnalysis::simhit_etot
double simhit_etot
Definition: DoCastorAnalysis.h:102
DoCastorAnalysis::eventIndex
int eventIndex
Definition: DoCastorAnalysis.h:90
Observer.h
DoCastorAnalysis::TreeFileName
std::string TreeFileName
Definition: DoCastorAnalysis.h:85
DoCastorAnalysis::simhit_energy
std::vector< double > simhit_energy
Definition: DoCastorAnalysis.h:93
BeginOfRun.h
SimWatcher.h
DoCastorAnalysis::psimhit_module
std::vector< int > * psimhit_module
Definition: DoCastorAnalysis.h:99
BeginOfJob
Definition: BeginOfJob.h:8
DoCastorAnalysis::simhit_module
std::vector< int > simhit_module
Definition: DoCastorAnalysis.h:94
EndOfEvent
Definition: EndOfEvent.h:6
DoCastorAnalysis::psimhit_z
std::vector< double > * psimhit_z
Definition: DoCastorAnalysis.h:97
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DoCastorAnalysis::verbosity
int verbosity
Definition: DoCastorAnalysis.h:83
DoCastorAnalysis::simhit_z
std::vector< double > simhit_z
Definition: DoCastorAnalysis.h:92
edm::ParameterSet
Definition: ParameterSet.h:47
DoCastorAnalysis::psimhit_x
std::vector< double > * psimhit_x
Definition: DoCastorAnalysis.h:97
DoCastorAnalysis::update
void update(const BeginOfJob *run) override
This routine will be called when the appropriate signal arrives.
Definition: DoCastorAnalysis.cc:92
DoCastorAnalysis::simhit_x
std::vector< double > simhit_x
Definition: DoCastorAnalysis.h:92
BeginOfEvent.h
BeginOfEvent
Definition: BeginOfEvent.h:6
BeginOfRun
Definition: BeginOfRun.h:6
EndOfRun
Definition: EndOfRun.h:6
SimWatcher
Definition: SimWatcher.h:27
DoCastorAnalysis::simhit_eta
std::vector< double > simhit_eta
Definition: DoCastorAnalysis.h:93
DoCastorAnalysis::psimhit_energy
std::vector< double > * psimhit_energy
Definition: DoCastorAnalysis.h:98
DoCastorAnalysis::~DoCastorAnalysis
~DoCastorAnalysis() override
Definition: DoCastorAnalysis.cc:69
EndOfRun.h
DoCastorAnalysis::DoCastorAnalysis
DoCastorAnalysis(const edm::ParameterSet &p)
Definition: DoCastorAnalysis.cc:28
DoCastorAnalysis::CastorTree
TTree * CastorTree
Definition: DoCastorAnalysis.h:88
DoCastorAnalysis::psimhit_phi
std::vector< double > * psimhit_phi
Definition: DoCastorAnalysis.h:98
writedatasetfile.run
run
Definition: writedatasetfile.py:27
DoCastorAnalysis::psimhit_y
std::vector< double > * psimhit_y
Definition: DoCastorAnalysis.h:97
DoCastorAnalysis::simhit_phi
std::vector< double > simhit_phi
Definition: DoCastorAnalysis.h:93
ParameterSet.h
DoCastorAnalysis::simhit_y
std::vector< double > simhit_y
Definition: DoCastorAnalysis.h:92
DoCastorAnalysis::psimhit_eta
std::vector< double > * psimhit_eta
Definition: DoCastorAnalysis.h:98