Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-05 07:50:35

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