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 // -- jour3a : duplication of SumDepthDose code for depthDoseSD vector: 00033 void SumDepthDoseSD(G4double,G4double); 00034 00035 void WriteDepthDose(G4String); 00036 00037 private: 00038 DetectorConstruction* m_detector; 00039 00040 G4double m_sumEdep, m_sumEdep2; 00041 G4int m_nbEntry; 00042 00043 std::vector<G4double> m_depthDose; 00044 std::vector<G4double> m_depthDoseSD; 00045 G4double m_astronautHeight; 00046 G4double m_sliceWidth; 00047 G4int m_nbSlices; 00048 }; 00049 00050 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00051 00052 #endif 00053