File indexing completed on 2025-02-23 09:22:17
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
0030
0031
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
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
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
0115
0116
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
0137
0138 #endif