File indexing completed on 2025-04-10 08:06: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
0034 #ifndef Run_h
0035 #define Run_h 1
0036
0037 #include "SteppingAction.hh"
0038 #include "TrackingAction.hh"
0039
0040 #include "G4Run.hh"
0041 #include "G4ThreeVector.hh"
0042
0043 #include <array>
0044
0045
0046
0047 class Run : public G4Run
0048 {
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062 public:
0063 Run();
0064 ~Run() override = default;
0065
0066 void RecordEvent(const G4Event* anEvent) override;
0067
0068
0069
0070
0071 void Merge(const G4Run* aRun) override;
0072
0073
0074
0075 void PrintInfo() const;
0076
0077
0078
0079 void SetPrimaryParticleId(const G4int inputValue) { fPrimaryParticleId = inputValue; }
0080 void SetPrimaryParticleEnergy(const G4double inputValue)
0081 {
0082 fPrimaryParticleEnergy = inputValue;
0083 }
0084 void SetPrimaryParticleDirection(const G4ThreeVector& inputValue)
0085 {
0086 fPrimaryParticleDirection = inputValue;
0087 }
0088 void SetTrackerMaterialName(const G4String& inputValue) { fTrackerMaterialName = inputValue; }
0089 void SetEmCaloMaterialName(const G4String& inputValue) { fEmCaloMaterialName = inputValue; }
0090 void SetHadCaloMaterialName(const G4String& inputValue) { fHadCaloMaterialName = inputValue; }
0091 void SetCubicVolumeScoringTrackerShell(const G4double inputValue)
0092 {
0093 fCubicVolumeScoringTrackerShell = inputValue;
0094 }
0095 void SetCubicVolumeScoringEmCaloShell(const G4double inputValue)
0096 {
0097 fCubicVolumeScoringEmCaloShell = inputValue;
0098 }
0099 void SetCubicVolumeScoringHadCaloShell(const G4double inputValue)
0100 {
0101 fCubicVolumeScoringHadCaloShell = inputValue;
0102 }
0103 G4int GetPrimaryParticleId() const { return fPrimaryParticleId; }
0104 G4double GetPrimaryParticleEnergy() const { return fPrimaryParticleEnergy; }
0105 G4ThreeVector GetPrimaryParticleDirection() const { return fPrimaryParticleDirection; }
0106 G4String GetTrackerMaterialName() const { return fTrackerMaterialName; }
0107 G4String GetEmCaloMaterialName() const { return fEmCaloMaterialName; }
0108 G4String GetHadCaloMaterialName() const { return fHadCaloMaterialName; }
0109 G4double GetCubicVolumeScoringTrackerShell() const { return fCubicVolumeScoringTrackerShell; }
0110 G4double GetCubicVolumeScoringEmCaloShell() const { return fCubicVolumeScoringEmCaloShell; }
0111 G4double GetCubicVolumeScoringHadCaloShell() const { return fCubicVolumeScoringHadCaloShell; }
0112
0113 void
0114 SetSteppingArray(const std::array<G4double, SteppingAction::fkNumberCombinations>& inputArray);
0115 std::array<G4double, SteppingAction::fkNumberCombinations> GetSteppingArray() const
0116 {
0117 return fSteppingArray;
0118 }
0119
0120
0121
0122 void
0123 SetTrackingArray1(const std::array<G4long, TrackingAction::fkNumberCombinations>& inputArray);
0124 std::array<G4long, TrackingAction::fkNumberCombinations> GetTrackingArray1() const
0125 {
0126 return fTrackingArray1;
0127 }
0128 void
0129 SetTrackingArray2(const std::array<G4double, TrackingAction::fkNumberCombinations>& inputArray);
0130 std::array<G4double, TrackingAction::fkNumberCombinations> GetTrackingArray2() const
0131 {
0132 return fTrackingArray2;
0133 }
0134
0135
0136
0137 private:
0138 G4int fNumEvents;
0139 G4int fPrimaryParticleId;
0140 G4double fPrimaryParticleEnergy;
0141 G4ThreeVector fPrimaryParticleDirection;
0142 G4String fTrackerMaterialName;
0143 G4String fEmCaloMaterialName;
0144 G4String fHadCaloMaterialName;
0145 G4double fCubicVolumeScoringTrackerShell;
0146 G4double fCubicVolumeScoringEmCaloShell;
0147 G4double fCubicVolumeScoringHadCaloShell;
0148 std::array<G4double, SteppingAction::fkNumberCombinations> fSteppingArray;
0149 std::array<G4long, TrackingAction::fkNumberCombinations> fTrackingArray1;
0150 std::array<G4double, TrackingAction::fkNumberCombinations> fTrackingArray2;
0151 };
0152
0153
0154
0155 #endif