File indexing completed on 2026-04-05 07:50:35
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
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
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
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
0111
0112
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
0133
0134 #endif