00001 // 00002 // $Id: RunAction.hh 169 2008-09-16 16:16:21Z maire $ 00003 // 00004 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00005 00006 #ifndef RunAction_h 00007 #define RunAction_h 1 00008 00009 #include "G4UserRunAction.hh" 00010 #include "globals.hh" 00011 00012 #include <vector> 00013 00014 class G4Run; 00015 class DetectorConstruction; 00016 00017 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00018 00019 class RunAction : public G4UserRunAction 00020 { 00021 public: 00022 RunAction(DetectorConstruction*); 00023 ~RunAction(); 00024 00025 public: 00026 void BeginOfRunAction(const G4Run*); 00027 void EndOfRunAction(const G4Run*); 00028 00029 void SumEvents(G4double e) { m_sumEdep += e; m_sumEdep2 += e*e; m_nbEntry++; }; 00030 void SumDepthDose(G4double,G4double); 00031 00032 void WriteDepthDose(G4String); 00033 00034 private: 00035 DetectorConstruction* m_detector; 00036 00037 G4double m_sumEdep, m_sumEdep2; 00038 G4int m_nbEntry; 00039 00040 std::vector<G4double> m_depthDose; 00041 G4double m_astronautHeight; 00042 G4double m_sliceWidth; 00043 G4int m_nbSlices; 00044 }; 00045 00046 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00047 00048 #endif 00049