Geant4  10.02.p01
RunAction.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 // $Id: RunAction.hh 86418 2014-11-11 10:39:38Z gcosmo $
30 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #ifndef RunAction_h
35 #define RunAction_h 1
36 
37 #include "G4UserRunAction.hh"
38 #include "ProcessesCount.hh"
39 #include "globals.hh"
40 #include "g4root.hh"
41 
42 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43 
46 class G4Run;
48 
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50 
51 class RunAction : public G4UserRunAction
52 {
54  public:
57  void EventFinished();
58  void FillData(G4double kinEnergy, G4double costheta,
59  G4double longitudinalPolarization);
60  void PrintResults(G4int totalNumberOfEvents);
61  void Clear();
62  private:
68  };
69 
70 public:
71 
73  virtual ~RunAction();
74 
75  void BeginOfRunAction(const G4Run*);
76  void EndOfRunAction(const G4Run*);
77 
79 
80  void FillData(const G4ParticleDefinition* particle,
81  G4double kinEnergy, G4double costheta, G4double phi,
82  G4double longitudinalPolarization);
83 
84  void EventFinished();
85 
86 private:
87 
88  void BookHisto();
89  void SaveHisto(G4int nevents);
90 
94 
98 
100 
102 
106 };
107 
108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109 
110 #endif
111 
std::vector< OneProcessCount * > ProcessesCount
PrimaryGeneratorAction class.
void BeginOfRunAction(const G4Run *)
Definition: RunAction.cc:57
const G4ParticleDefinition * fPositron
Definition: RunAction.hh:93
Definition of the ProcessesCount class.
G4int totalEventCount
Definition: RunAction.hh:101
int G4int
Definition: G4Types.hh:78
ParticleStatistics electronStats
Definition: RunAction.hh:104
ParticleStatistics photonStats
Definition: RunAction.hh:103
void FillData(G4double kinEnergy, G4double costheta, G4double longitudinalPolarization)
Definition: RunAction.cc:276
ParticleStatistics positronStats
Definition: RunAction.hh:105
void EndOfRunAction(const G4Run *)
Definition: RunAction.cc:260
void PrintResults(G4int totalNumberOfEvents)
Definition: RunAction.cc:291
Definition: G4Run.hh:46
void EventFinished()
Definition: RunAction.cc:243
void CountProcesses(G4String)
Definition: RunAction.cc:91
const G4ParticleDefinition * fElectron
Definition: RunAction.hh:92
void BookHisto()
Definition: RunAction.cc:68
~RunAction()
Definition: RunAction.cc:52
ProcessesCount * ProcCounter
Definition: RunAction.hh:97
G4AnalysisManager * fAnalysisManager
Definition: RunAction.hh:77
PrimaryGeneratorAction * primary
Definition: RunAction.hh:60
DetectorConstruction * detector
Definition: RunAction.hh:59
Detector construction class to demonstrate various ways of placement.
double G4double
Definition: G4Types.hh:76
Run action class.
Definition: RunAction.hh:45
void FillData(const G4ParticleDefinition *particle, G4double kinEnergy, G4double costheta, G4double phi, G4double longitudinalPolarization)
Definition: RunAction.cc:91
const G4ParticleDefinition * fGamma
Definition: RunAction.hh:91
void SaveHisto(G4int nevents)
Definition: RunAction.cc:160