![]() |
Precalibrated Ion Beam Identification Detector Simulation 1.0
A pilot study detector simulation, written in C++ with Geant4.
|
00001 00012 #ifndef STDIO_H 00013 #define STDIO_H 00014 #include <stdio.h> 00015 #endif 00016 00017 00018 #include "G4Run.hh" 00019 #include "G4RunManager.hh" 00020 #include "G4UnitsTable.hh" 00021 #include "RunActionMessenger.hh" 00022 #include "AllAccumulatedStatistics.hh" 00023 #include "EventHit.hh" 00024 00025 #include "G4UserRunAction.hh" 00026 #include "globals.hh" 00027 00028 00029 #ifndef RunAction_h 00030 #define RunAction_h 1 //!<Inclusion guard. 00031 00032 00033 class G4Run; 00034 class RunActionMessenger; 00035 00038 class RunAction : public G4UserRunAction 00039 { 00040 public: 00041 RunAction(); 00042 virtual ~RunAction(); 00043 00044 void BeginOfRunAction(const G4Run*); 00045 void EndOfRunAction(const G4Run*); 00046 void SetNewResultsFileName(G4String filename 00047 ); 00048 00049 void WriteResultsToFile( 00050 G4int eventID 00051 ,AllAccumulatedStatistics * myEventStatistics 00052 ); 00053 00055 void SetNewVerboseResultsFileName(G4String file 00056 ) {verboseResultsFileName = file;} 00057 00059 void SetVerboseFileUsage(G4bool usage 00060 ) {usingVerboseFile = usage;} 00061 00062 void PrintToVerboseFile(G4String messageToPrint); 00063 00064 void SetParticleZ(G4int newZ); 00065 00066 void SetParticleA(G4int newA); 00067 00068 00069 private: 00070 G4String resultsFileName; 00071 FILE * resultsFile; 00072 00073 G4String verboseResultsFileName; 00074 G4bool usingVerboseFile; 00075 FILE* verboseFile; 00076 00077 G4int particleZ; 00078 00079 G4int particleA; 00080 00081 RunActionMessenger * myMessenger; 00082 }; 00083 00084 #endif 00085