Go to the documentation of this file.00001
00002
00003
00004
00005
00007 #undef debug
00008 #ifndef ZdcTestAnalysis_h
00009 #define ZdcTestAnalysis_h
00010
00011 #include "SimG4Core/Notification/interface/BeginOfJob.h"
00012 #include "SimG4Core/Notification/interface/BeginOfRun.h"
00013 #include "SimG4Core/Notification/interface/EndOfRun.h"
00014 #include "SimG4Core/Notification/interface/BeginOfEvent.h"
00015 #include "SimG4Core/Notification/interface/EndOfEvent.h"
00016
00017 #include "G4SDManager.hh"
00018 #include "G4Step.hh"
00019 #include "G4Track.hh"
00020 #include "G4Event.hh"
00021 #include "G4PrimaryVertex.hh"
00022 #include "G4VProcess.hh"
00023 #include "G4HCofThisEvent.hh"
00024 #include "G4UserEventAction.hh"
00025 #include "CLHEP/Units/GlobalSystemOfUnits.h"
00026 #include "CLHEP/Units/GlobalPhysicalConstants.h"
00027
00028 #include "SimG4Core/Notification/interface/Observer.h"
00029 #include "SimG4Core/Watcher/interface/SimWatcher.h"
00030 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00031
00032 #include <cassert>
00033 #include <iostream>
00034 #include <string>
00035 #include <map>
00036 #include <cmath>
00037 #include <memory>
00038 #include <vector>
00039
00040 #include <CLHEP/Random/Randomize.h>
00041
00042 #include "TROOT.h"
00043 #include "TFile.h"
00044 #include "TH1.h"
00045 #include "TH2.h"
00046 #include "TProfile.h"
00047 #include "TNtuple.h"
00048 #include "TRandom.h"
00049 #include "TLorentzVector.h"
00050 #include "TUnixSystem.h"
00051 #include "TSystem.h"
00052 #include "TMath.h"
00053 #include "TF1.h"
00054
00055
00056
00057
00058 class G4Step;
00059 class BeginOfJob;
00060 class BeginOfRun;
00061 class EndOfRun;
00062 class BeginOfEvent;
00063 class EndOfEvent;
00064
00065 class ZdcTestAnalysis : public SimWatcher,
00066 public Observer<const BeginOfJob *>,
00067 public Observer<const BeginOfRun *>,
00068 public Observer<const EndOfRun *>,
00069 public Observer<const BeginOfEvent *>,
00070 public Observer<const EndOfEvent *>,
00071 public Observer<const G4Step *> {
00072
00073 public:
00074 ZdcTestAnalysis(const edm::ParameterSet &p);
00075 virtual ~ZdcTestAnalysis();
00076
00077 private:
00078
00079 void update(const BeginOfJob * run);
00080 void update(const BeginOfRun * run);
00081 void update(const EndOfRun * run);
00082 void update(const BeginOfEvent * evt);
00083 void update(const EndOfEvent * evt);
00084 void update(const G4Step * step);
00085
00086 private:
00087
00088 void finish();
00089
00090 int verbosity;
00091 int doNTzdcstep;
00092 int doNTzdcevent;
00093 std::string stepNtFileName;
00094 std::string eventNtFileName;
00095
00096 TFile* zdcOutputEventFile;
00097 TFile* zdcOutputStepFile;
00098
00099 TNtuple* zdcstepntuple;
00100 TNtuple* zdceventntuple;
00101
00102 int eventIndex;
00103 int stepIndex;
00104
00105 Float_t zdcsteparray[18];
00106 Float_t zdceventarray[16];
00107
00108 };
00109
00110 #endif // ZdcTestAnalysis_h