Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /geant4/examples/extended/medical/fanoCavity/include/Run.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 /// \file Run.hh
0027 /// \brief Definition of the Run class
0028 
0029 #ifndef Run_h
0030 #define Run_h 1
0031 
0032 #include "ProcessesCount.hh"
0033 
0034 #include "G4Run.hh"
0035 #include "globals.hh"
0036 
0037 class G4Run;
0038 class G4Material;
0039 class G4ParticleDefinition;
0040 class DetectorConstruction;
0041 class PrimaryGeneratorAction;
0042 
0043 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0044 
0045 class Run : public G4Run
0046 {
0047   public:
0048     Run(DetectorConstruction*, PrimaryGeneratorAction*);
0049     ~Run();
0050 
0051   public:
0052     virtual void Merge(const G4Run*);
0053     void SurveyConvergence(G4int);
0054 
0055     void EndOfRun();
0056 
0057     void CountProcesses(G4String);
0058     void SumEsecond(G4double e)
0059     {
0060       fEsecondary += e;
0061       fEsecondary2 += e * e;
0062       fNbSec++;
0063     };
0064 
0065     void FlowInCavity(G4int k, G4double e)
0066     {
0067       fEnerFlowCavity[k] += e;
0068       fPartFlowCavity[k]++;
0069     };
0070 
0071     void AddEdepCavity(G4double de)
0072     {
0073       fEdepCavity += de;
0074       fEdepCavity2 += de * de;
0075       fNbEventCavity++;
0076     };
0077     void AddTrakCavity(G4double dt) { fTrkSegmCavity += dt; };
0078 
0079     void StepInWall(G4double s)
0080     {
0081       fStepWall += s;
0082       fStepWall2 += s * s;
0083       fNbStepWall++;
0084     };
0085     void StepInCavity(G4double s)
0086     {
0087       fStepCavity += s;
0088       fStepCavity2 += s * s;
0089       fNbStepCavity++;
0090     };
0091 
0092   private:
0093     DetectorConstruction* fDetector;
0094     PrimaryGeneratorAction* fKinematic;
0095     ProcessesCount* fProcCounter;
0096 
0097     G4double fEsecondary, fEsecondary2;
0098     G4long fNbSec;
0099 
0100     G4long fPartFlowCavity[2];
0101     G4double fEnerFlowCavity[2];
0102     G4double fEdepCavity, fEdepCavity2;
0103     G4double fTrkSegmCavity;
0104     G4long fNbEventCavity;
0105 
0106     G4double fOldEmean, fOldDose;
0107 
0108     G4double fStepWall, fStepWall2;
0109     G4double fStepCavity, fStepCavity2;
0110     G4long fNbStepWall, fNbStepCavity;
0111 
0112   private:
0113     G4double fWallThickness;
0114     G4double fWallRadius;
0115     G4Material* fMateWall;
0116     G4double fDensityWall;
0117 
0118     G4double fCavityThickness;
0119     G4double fCavityRadius;
0120     G4double fSurfaceCavity;
0121     G4double fVolumeCavity;
0122     G4Material* fMateCavity;
0123     G4double fDensityCavity;
0124     G4double fMassCavity;
0125 };
0126 
0127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0128 
0129 #endif