Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:22:17

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 medical/GammaTherapy/include/Run.hh
0027 /// \brief Definition of the Run class
0028 //
0029 //
0030 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0031 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0032 
0033 #ifndef Run_h
0034 #define Run_h 1
0035 
0036 #include "G4AnalysisManager.hh"
0037 #include "G4DataVector.hh"
0038 #include "G4DynamicParticle.hh"
0039 #include "G4Electron.hh"
0040 #include "G4Gamma.hh"
0041 #include "G4Positron.hh"
0042 #include "G4Run.hh"
0043 #include "G4VPhysicalVolume.hh"
0044 #include "globals.hh"
0045 
0046 class DetectorConstruction;
0047 class HistoManager;
0048 class G4ParticleDefinition;
0049 class G4Track;
0050 
0051 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0052 
0053 class Run : public G4Run
0054 {
0055   public:
0056     Run(DetectorConstruction*, HistoManager*);
0057     ~Run();
0058 
0059   public:
0060     virtual void Merge(const G4Run*);
0061     void EndOfRun();
0062 
0063     void ScoreNewTrack(const G4Track* aTrack);
0064 
0065     void AddPhantomStep(G4double e, G4double r1, G4double z1, G4double r2, G4double z2, G4double r0,
0066                         G4double z0);
0067 
0068     void AddPhantomGamma(G4double e, G4double r);
0069 
0070     bool GetVerbose() const { return fVerbose; }
0071     inline void AddStepInTarget() { ++fNstepTarget; };
0072 
0073   private:
0074     DetectorConstruction* fDetector;
0075     HistoManager* fHistoMgr;
0076     G4AnalysisManager* fAnalysisManager;
0077 
0078     std::vector<G4int> fHistoId;
0079     G4int fNHisto;
0080 
0081     void AddPhantomPhoton(const G4DynamicParticle*);
0082     void AddTargetPhoton(const G4DynamicParticle*);
0083     void AddPhantomElectron(const G4DynamicParticle*);
0084     void AddTargetElectron(const G4DynamicParticle*);
0085 
0086     inline void AddPhoton() { ++fNgam; };
0087     inline void AddElectron() { ++fNelec; };
0088     inline void AddPositron() { ++fNposit; };
0089 
0090     // Parameters retrived from DetectorConstructor
0091     const G4ParticleDefinition* fGamma;
0092     const G4ParticleDefinition* fElectron;
0093     const G4ParticleDefinition* fPositron;
0094 
0095     const G4VPhysicalVolume* fCheckVolume;
0096     const G4VPhysicalVolume* fGasVolume;
0097     const G4VPhysicalVolume* fPhantom;
0098     const G4VPhysicalVolume* fTarget1;
0099     const G4VPhysicalVolume* fTarget2;
0100 
0101     G4int fNBinsR;
0102     G4int fNBinsZ;
0103     G4int fNBinsE;
0104     G4int fScoreBin;
0105 
0106     G4double fScoreZ;
0107     G4double fAbsorberZ;
0108     G4double fAbsorberR;
0109     G4double fMaxEnergy;
0110 
0111     G4double fStepZ;
0112     G4double fStepR;
0113     G4double fStepE;
0114     //  G4double fNormZ;
0115 
0116     // Local histogramming parameters
0117     G4bool fVerbose;
0118     G4double fSumR;
0119 
0120     G4int fNevt;
0121     G4int fNelec;
0122     G4int fNposit;
0123     G4int fNgam;
0124     G4int fNstep;
0125     G4int fNgamPh;
0126     G4int fNgamTar;
0127     G4int fNeTar;
0128     G4int fNePh;
0129     G4int fNstepTarget;
0130 
0131     G4DataVector fVolumeR;
0132     G4DataVector fGammaE;
0133     G4DataVector fEdep;
0134 };
0135 
0136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0137 
0138 #endif