File indexing completed on 2025-01-31 09:22:14
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
0035
0036
0037
0038
0039
0040
0041
0042
0043 #ifndef GRPhysicsList_H
0044 #define GRPhysicsList_H 1
0045
0046 #include "G4VModularPhysicsList.hh"
0047 class G4PhysListFactory;
0048 class GRPhysicsListMessenger;
0049 class G4Region;
0050 class G4ProductionCuts;
0051
0052 #include <map>
0053
0054 class GRPhysicsList : public G4VModularPhysicsList
0055 {
0056 public:
0057 GRPhysicsList();
0058 virtual ~GRPhysicsList();
0059 virtual void ConstructParticle();
0060 virtual void ConstructProcess();
0061 virtual void SetCuts();
0062
0063 private:
0064 G4String PLName;
0065 G4VModularPhysicsList* physList;
0066 G4PhysListFactory* factory;
0067 GRPhysicsListMessenger* messenger;
0068
0069 public:
0070 const G4String& GetPLName()
0071 { return PLName; }
0072
0073 private:
0074 G4String EM_opt;
0075 G4String Had_opt;
0076 G4bool addHP;
0077 G4bool addRDM;
0078 G4bool addRMC;
0079 G4bool addOptical;
0080 G4int stepLimit_opt;
0081 std::map<G4Region*,G4double> localStepLimits;
0082 G4double globalCuts[4];
0083 std::map<G4Region*,G4ProductionCuts*> localCuts;
0084
0085 public:
0086 void SetEM(G4String& val) { EM_opt = val; }
0087 const G4String& GetEM() const { return EM_opt; }
0088 void SetHad(G4String& val) { Had_opt = val; }
0089 const G4String& GetHad() const { return Had_opt; }
0090 void AddHP(G4bool val = true) { addHP = val; }
0091 G4bool IfHP() const { return addHP; }
0092 void AddRDM(G4bool val = true) { addRDM = val; }
0093 G4bool IfRDM() const { return addRDM; }
0094 void AddRMC(G4bool val = true) { addRMC = val; }
0095 G4bool IfRMC() const { return addRMC; }
0096 void AddOptical(G4bool val = true) { addOptical = val; }
0097 G4bool IfOptical() const { return addOptical; }
0098 void AddStepLimit(G4int val = 0) { stepLimit_opt = val; }
0099 G4int IfStepLimit() const { return stepLimit_opt; }
0100 void SetGlobalStepLimit(G4double);
0101 G4double GetGlobalStepLimit() const;
0102 G4Region* SetLocalStepLimit(const G4String&,G4double);
0103 G4double GetLocalStepLimit(const G4String&) const;
0104 void SetGlobalCuts(G4double);
0105 G4double GetGlobalCuts() const { return GetGlobalCut(0); }
0106 void SetGlobalCut(G4int, G4double);
0107 G4double GetGlobalCut(G4int i) const { return globalCuts[i]; }
0108 G4Region* SetLocalCuts(const G4String& reg,G4double val)
0109 {
0110 G4Region* regPtr = nullptr;
0111 for(G4int i=0; i<4; i++)
0112 {
0113 regPtr = SetLocalCut(reg,i,val);
0114 if(!regPtr) return regPtr;
0115 }
0116 return regPtr;
0117 }
0118 G4double GetLocalCuts(const G4String& reg) const { return GetLocalCut(reg,0); }
0119 G4Region* SetLocalCut(const G4String&,G4int,G4double);
0120 G4double GetLocalCut(const G4String&,G4int) const;
0121
0122 private:
0123 void GeneratePLName();
0124 void GeneratePL();
0125 G4Region* FindRegion(const G4String&) const;
0126
0127 private:
0128 G4bool applyGeomImpBias = false;
0129
0130 public:
0131 void ApplyGeomImpBias(G4bool val = true)
0132 { applyGeomImpBias = val; }
0133 };
0134
0135 #endif
0136