File indexing completed on 2026-04-08 07:53:27
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 SetTrackerMaterialName(const G4String& inputValue) { fTrackerMaterialName = inputValue; }
0084 void SetEmCaloMaterialName(const G4String& inputValue) { fEmCaloMaterialName = inputValue; }
0085 void SetHadCaloMaterialName(const G4String& inputValue) { fHadCaloMaterialName = inputValue; }
0086 void SetCubicVolumeScoringTrackerShell(const G4double inputValue)
0087 {
0088 fCubicVolumeScoringTrackerShell = inputValue;
0089 }
0090 void SetCubicVolumeScoringEmCaloShell(const G4double inputValue)
0091 {
0092 fCubicVolumeScoringEmCaloShell = inputValue;
0093 }
0094 void SetCubicVolumeScoringHadCaloShell(const G4double inputValue)
0095 {
0096 fCubicVolumeScoringHadCaloShell = inputValue;
0097 }
0098 G4int GetPrimaryParticleId() const { return fPrimaryParticleId; }
0099 G4double GetPrimaryParticleEnergy() const { return fPrimaryParticleEnergy; }
0100 G4ThreeVector GetPrimaryParticleDirection() const { return fPrimaryParticleDirection; }
0101 G4String GetTrackerMaterialName() const { return fTrackerMaterialName; }
0102 G4String GetEmCaloMaterialName() const { return fEmCaloMaterialName; }
0103 G4String GetHadCaloMaterialName() const { return fHadCaloMaterialName; }
0104 G4double GetCubicVolumeScoringTrackerShell() const { return fCubicVolumeScoringTrackerShell; }
0105 G4double GetCubicVolumeScoringEmCaloShell() const { return fCubicVolumeScoringEmCaloShell; }
0106 G4double GetCubicVolumeScoringHadCaloShell() const { return fCubicVolumeScoringHadCaloShell; }
0107
0108 void
0109 SetSteppingArray(const std::array<G4double, SteppingAction::fkNumberCombinations>& inputArray);
0110 std::array<G4double, SteppingAction::fkNumberCombinations> GetSteppingArray() const
0111 {
0112 return fSteppingArray;
0113 }
0114
0115
0116
0117 void
0118 SetTrackingArray1(const std::array<G4long, TrackingAction::fkNumberCombinations>& inputArray);
0119 std::array<G4long, TrackingAction::fkNumberCombinations> GetTrackingArray1() const
0120 {
0121 return fTrackingArray1;
0122 }
0123 void
0124 SetTrackingArray2(const std::array<G4double, TrackingAction::fkNumberCombinations>& inputArray);
0125 std::array<G4double, TrackingAction::fkNumberCombinations> GetTrackingArray2() const
0126 {
0127 return fTrackingArray2;
0128 }
0129
0130
0131
0132 private:
0133 G4int fNumEvents;
0134 G4int fPrimaryParticleId;
0135 G4double fPrimaryParticleEnergy;
0136 G4ThreeVector fPrimaryParticleDirection;
0137 G4String fTrackerMaterialName;
0138 G4String fEmCaloMaterialName;
0139 G4String fHadCaloMaterialName;
0140 G4double fCubicVolumeScoringTrackerShell;
0141 G4double fCubicVolumeScoringEmCaloShell;
0142 G4double fCubicVolumeScoringHadCaloShell;
0143 std::array<G4double, SteppingAction::fkNumberCombinations> fSteppingArray;
0144 std::array<G4long, TrackingAction::fkNumberCombinations> fTrackingArray1;
0145 std::array<G4double, TrackingAction::fkNumberCombinations> fTrackingArray2;
0146 };
0147
0148
0149
0150 #endif