Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 /// \file electromagnetic/TestEm12/include/Run << 23 // $Id: RunAction.hh,v 1.1 2005/07/22 11:08:48 maire Exp $ 27 /// \brief Definition of the RunAction class << 24 // GEANT4 tag $Name: geant4-08-00-patch-01 $ 28 // << 29 // 25 // 30 //....oooOO0OOooo........oooOO0OOooo........oo 26 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 31 //....oooOO0OOooo........oooOO0OOooo........oo 27 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 32 28 33 #ifndef RunAction_h 29 #ifndef RunAction_h 34 #define RunAction_h 1 30 #define RunAction_h 1 35 31 36 #include "G4UserRunAction.hh" 32 #include "G4UserRunAction.hh" 37 #include "globals.hh" 33 #include "globals.hh" 38 34 39 class Run; << 35 class G4Run; 40 class DetectorConstruction; 36 class DetectorConstruction; 41 class PhysicsList; 37 class PhysicsList; 42 class PrimaryGeneratorAction; 38 class PrimaryGeneratorAction; 43 class HistoManager; 39 class HistoManager; 44 40 45 //....oooOO0OOooo........oooOO0OOooo........oo 41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 46 42 47 class RunAction : public G4UserRunAction 43 class RunAction : public G4UserRunAction 48 { 44 { 49 public: 45 public: 50 RunAction(DetectorConstruction*, PhysicsLi << 46 RunAction(DetectorConstruction*, PhysicsList*,PrimaryGeneratorAction*, 51 ~RunAction() override; << 47 HistoManager*); >> 48 ~RunAction(); 52 49 53 public: 50 public: 54 void BeginOfRunAction(const G4Run*) overri << 51 void BeginOfRunAction(const G4Run*); 55 void EndOfRunAction(const G4Run*) override << 52 void EndOfRunAction(const G4Run*); 56 G4Run* GenerateRun() override; << 53 57 << 54 void AddEdep (G4double e) { Edeposit += e; Edeposit2 += e*e;}; >> 55 void AddTrackLength (G4double t) { trackLen += t; trackLen2 += t*t;}; >> 56 void AddProjRange (G4double x) { projRange += x; projRange2 += x*x;}; >> 57 void AddStepSize (G4int nb, G4double s) >> 58 { nbOfSteps += nb; nbOfSteps2 += nb*nb; >> 59 stepSize += s ; stepSize2 += s*s; }; >> 60 58 private: 61 private: 59 DetectorConstruction* fDetector = nullptr; << 62 DetectorConstruction* detector; 60 PhysicsList* fPhysics = nullptr; << 63 PhysicsList* physics; 61 PrimaryGeneratorAction* fPrimary = nullptr << 64 PrimaryGeneratorAction* kinematic; 62 Run* fRun = nullptr; << 65 HistoManager* histoManager; 63 HistoManager* fHistoManager = nullptr; << 66 >> 67 G4double Edeposit, Edeposit2; >> 68 G4double trackLen, trackLen2; >> 69 G4double projRange, projRange2; >> 70 G4int nbOfSteps, nbOfSteps2; >> 71 G4double stepSize, stepSize2; 64 }; 72 }; 65 73 66 //....oooOO0OOooo........oooOO0OOooo........oo 74 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 67 75 68 #endif 76 #endif >> 77 69 78