CMS 3D CMS Logo

ZdcTestAnalysis.h
Go to the documentation of this file.
1 // File: ZdcTestAnalysis.h
3 // Date: 03.06 Edmundo Garcia
4 // Description: simulation analysis steering code
5 //
7 #undef debug
8 #ifndef ZdcTestAnalysis_h
9 #define ZdcTestAnalysis_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 class ZdcNumberingScheme;
62 
63 class ZdcTestAnalysis : public SimWatcher,
64  public Observer<const BeginOfJob *>,
65  public Observer<const BeginOfRun *>,
66  public Observer<const EndOfRun *>,
67  public Observer<const BeginOfEvent *>,
68  public Observer<const EndOfEvent *>,
69  public Observer<const G4Step *> {
70 public:
72  ~ZdcTestAnalysis() override;
73 
74 private:
75  // observer classes
76  void update(const BeginOfJob *run) override;
77  void update(const BeginOfRun *run) override;
78  void update(const EndOfRun *run) override;
79  void update(const BeginOfEvent *evt) override;
80  void update(const EndOfEvent *evt) override;
81  void update(const G4Step *step) override;
82 
83 private:
84  void finish();
85 
86  int verbosity;
91 
94 
95  TNtuple *zdcstepntuple;
96  TNtuple *zdceventntuple;
97 
99  int stepIndex;
100 
101  Float_t zdcsteparray[18];
102  Float_t zdceventarray[16];
103 
105 };
106 
107 #endif // ZdcTestAnalysis_h
ZdcTestAnalysis::ZdcTestAnalysis
ZdcTestAnalysis(const edm::ParameterSet &p)
Definition: ZdcTestAnalysis.cc:54
Observer
Definition: Observer.h:23
ZdcTestAnalysis::zdceventarray
Float_t zdceventarray[16]
Definition: ZdcTestAnalysis.h:102
BeginOfJob.h
step
step
Definition: StallMonitor.cc:94
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
EndOfEvent.h
ZdcTestAnalysis::theZdcNumScheme
ZdcNumberingScheme * theZdcNumScheme
Definition: ZdcTestAnalysis.h:104
ZdcTestAnalysis::verbosity
int verbosity
Definition: ZdcTestAnalysis.h:86
ZdcTestAnalysis::zdceventntuple
TNtuple * zdceventntuple
Definition: ZdcTestAnalysis.h:96
ZdcTestAnalysis::zdcstepntuple
TNtuple * zdcstepntuple
Definition: ZdcTestAnalysis.h:95
Observer.h
ZdcTestAnalysis::zdcOutputStepFile
TFile * zdcOutputStepFile
Definition: ZdcTestAnalysis.h:93
BeginOfRun.h
SimWatcher.h
ZdcNumberingScheme
Definition: ZdcNumberingScheme.h:13
ZdcTestAnalysis::~ZdcTestAnalysis
~ZdcTestAnalysis() override
Definition: ZdcTestAnalysis.cc:94
BeginOfJob
Definition: BeginOfJob.h:8
EndOfEvent
Definition: EndOfEvent.h:6
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ZdcTestAnalysis::stepNtFileName
std::string stepNtFileName
Definition: ZdcTestAnalysis.h:89
edm::ParameterSet
Definition: ParameterSet.h:47
ZdcTestAnalysis::finish
void finish()
Definition: ZdcTestAnalysis.cc:400
BeginOfEvent.h
ZdcTestAnalysis
Definition: ZdcTestAnalysis.h:63
ZdcTestAnalysis::eventNtFileName
std::string eventNtFileName
Definition: ZdcTestAnalysis.h:90
BeginOfEvent
Definition: BeginOfEvent.h:6
BeginOfRun
Definition: BeginOfRun.h:6
EndOfRun
Definition: EndOfRun.h:6
ZdcTestAnalysis::zdcOutputEventFile
TFile * zdcOutputEventFile
Definition: ZdcTestAnalysis.h:92
SimWatcher
Definition: SimWatcher.h:27
EndOfRun.h
writedatasetfile.run
run
Definition: writedatasetfile.py:27
ZdcTestAnalysis::doNTzdcevent
int doNTzdcevent
Definition: ZdcTestAnalysis.h:88
ZdcTestAnalysis::stepIndex
int stepIndex
Definition: ZdcTestAnalysis.h:99
ZdcTestAnalysis::zdcsteparray
Float_t zdcsteparray[18]
Definition: ZdcTestAnalysis.h:101
ParameterSet.h
ZdcTestAnalysis::doNTzdcstep
int doNTzdcstep
Definition: ZdcTestAnalysis.h:87
ZdcTestAnalysis::eventIndex
int eventIndex
Definition: ZdcTestAnalysis.h:98
ZdcTestAnalysis::update
void update(const BeginOfJob *run) override
This routine will be called when the appropriate signal arrives.
Definition: ZdcTestAnalysis.cc:100