File indexing completed on 2026-09-13 08:29:32
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 "SteppingAction.hh"
0033 #include "TrackingAction.hh"
0034
0035 #include "G4Run.hh"
0036 #include "G4ThreeVector.hh"
0037
0038 #include <array>
0039
0040
0041
0042 class Run : public G4Run
0043 {
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057 public:
0058 Run();
0059 ~Run() override = default;
0060
0061 void RecordEvent(const G4Event* anEvent) override;
0062
0063
0064
0065
0066 void Merge(const G4Run* aRun) override;
0067
0068
0069
0070 void PrintInfo() const;
0071
0072
0073
0074 void SetPrimaryParticleId(const G4int inputValue) { fPrimaryParticleId = inputValue; }
0075 void SetPrimaryParticleEnergy(const G4double inputValue)
0076 {
0077 fPrimaryParticleEnergy = inputValue;
0078 }
0079 void SetPrimaryParticleDirection(const G4ThreeVector& inputValue)
0080 {
0081 fPrimaryParticleDirection = inputValue;
0082 }
0083 void SetAbsorberMaterialName(const G4String& inputValue) { fAbsorberMaterialName = inputValue; }
0084 void SetActiveMaterialName(const G4String& inputValue) { fActiveMaterialName = inputValue; }
0085 void SetCubicVolumeScoringUpDown(const G4double inputValue)
0086 {
0087 fCubicVolumeScoringUpDown = inputValue;
0088 }
0089 void SetCubicVolumeScoringSide(const G4double inputValue)
0090 {
0091 fCubicVolumeScoringSide = inputValue;
0092 }
0093 G4int GetPrimaryParticleId() const { return fPrimaryParticleId; }
0094 G4double GetPrimaryParticleEnergy() const { return fPrimaryParticleEnergy; }
0095 G4ThreeVector GetPrimaryParticleDirection() const { return fPrimaryParticleDirection; }
0096 G4String GetAbsorberMaterialName() const { return fAbsorberMaterialName; }
0097 G4String GetActiveMaterialName() const { return fActiveMaterialName; }
0098 G4double GetCubicVolumeScoringUpDown() const { return fCubicVolumeScoringUpDown; }
0099 G4double GetCubicVolumeScoringSide() const { return fCubicVolumeScoringSide; }
0100
0101 void
0102 SetSteppingArray(const std::array<G4double, SteppingAction::fkNumberCombinations>& inputArray);
0103 std::array<G4double, SteppingAction::fkNumberCombinations> GetSteppingArray() const
0104 {
0105 return fSteppingArray;
0106 }
0107
0108
0109
0110 void
0111 SetTrackingArray1(const std::array<G4long, TrackingAction::fkNumberCombinations>& inputArray);
0112 std::array<G4long, TrackingAction::fkNumberCombinations> GetTrackingArray1() const
0113 {
0114 return fTrackingArray1;
0115 }
0116 void
0117 SetTrackingArray2(const std::array<G4double, TrackingAction::fkNumberCombinations>& inputArray);
0118 std::array<G4double, TrackingAction::fkNumberCombinations> GetTrackingArray2() const
0119 {
0120 return fTrackingArray2;
0121 }
0122
0123
0124
0125 private:
0126 G4int fNumEvents;
0127 G4int fPrimaryParticleId;
0128 G4double fPrimaryParticleEnergy;
0129 G4ThreeVector fPrimaryParticleDirection;
0130 G4String fAbsorberMaterialName;
0131 G4String fActiveMaterialName;
0132 G4double fCubicVolumeScoringUpDown;
0133 G4double fCubicVolumeScoringSide;
0134 std::array<G4double, SteppingAction::fkNumberCombinations> fSteppingArray;
0135 std::array<G4long, TrackingAction::fkNumberCombinations> fTrackingArray1;
0136 std::array<G4double, TrackingAction::fkNumberCombinations> fTrackingArray2;
0137 };
0138
0139
0140
0141 #endif