Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // Gorad (Geant4 Open-source Radiation Analys 27 // 28 // Author : Makoto Asai (SLAC National Accele 29 // 30 // Development of Gorad is funded by NASA Joh 31 // under the contract NNJ15HK11B. 32 // 33 // ******************************************* 34 // 35 // GRPhysicsList.hh 36 // Header file of the Gorad Physics List 37 // 38 // History 39 // September 8th, 2020 : first implementatio 40 // 41 // ******************************************* 42 43 #ifndef GRPhysicsList_H 44 #define GRPhysicsList_H 1 45 46 #include "G4VModularPhysicsList.hh" 47 class G4PhysListFactory; 48 class GRPhysicsListMessenger; 49 class G4Region; 50 class G4ProductionCuts; 51 52 #include <map> 53 54 class GRPhysicsList : public G4VModularPhysics 55 { 56 public: 57 GRPhysicsList(); 58 virtual ~GRPhysicsList(); 59 virtual void ConstructParticle(); 60 virtual void ConstructProcess(); 61 virtual void SetCuts(); 62 63 private: 64 G4String PLName; 65 G4VModularPhysicsList* physList; 66 G4PhysListFactory* factory; 67 GRPhysicsListMessenger* messenger; 68 69 public: 70 const G4String& GetPLName() 71 { return PLName; } 72 73 private: 74 G4String EM_opt; // EM physics option 75 G4String Had_opt; // Hadronic physics opt 76 G4bool addHP; // add Neutron_HP 77 G4bool addRDM; // add Radioactive Deca 78 G4bool addRMC; // add Reverse Monte C 79 G4bool addOptical; // add optical physics 80 G4int stepLimit_opt; // Step limiter optio 81 std::map<G4Region*,G4double> localStepLimi 82 G4double globalCuts[4]; // for e-, e+ gam 83 std::map<G4Region*,G4ProductionCuts*> loca 84 85 public: 86 void SetEM(G4String& val) { EM_opt = val; 87 const G4String& GetEM() const { return EM_ 88 void SetHad(G4String& val) { Had_opt = val 89 const G4String& GetHad() const { return Ha 90 void AddHP(G4bool val = true) { addHP = va 91 G4bool IfHP() const { return addHP; } 92 void AddRDM(G4bool val = true) { addRDM = 93 G4bool IfRDM() const { return addRDM; } 94 void AddRMC(G4bool val = true) { addRMC = 95 G4bool IfRMC() const { return addRMC; } 96 void AddOptical(G4bool val = true) { addOp 97 G4bool IfOptical() const { return addOptic 98 void AddStepLimit(G4int val = 0) { stepLim 99 G4int IfStepLimit() const { return stepLim 100 void SetGlobalStepLimit(G4double); 101 G4double GetGlobalStepLimit() const; 102 G4Region* SetLocalStepLimit(const G4String 103 G4double GetLocalStepLimit(const G4String& 104 void SetGlobalCuts(G4double); 105 G4double GetGlobalCuts() const { return Ge 106 void SetGlobalCut(G4int, G4double); 107 G4double GetGlobalCut(G4int i) const { ret 108 G4Region* SetLocalCuts(const G4String& reg 109 { 110 G4Region* regPtr = nullptr; 111 for(G4int i=0; i<4; i++) 112 { 113 regPtr = SetLocalCut(reg,i,val); 114 if(!regPtr) return regPtr; 115 } 116 return regPtr; 117 } 118 G4double GetLocalCuts(const G4String& reg) 119 G4Region* SetLocalCut(const G4String&,G4in 120 G4double GetLocalCut(const G4String&,G4int 121 122 private: 123 void GeneratePLName(); 124 void GeneratePL(); 125 G4Region* FindRegion(const G4String&) cons 126 127 private: 128 G4bool applyGeomImpBias = false; 129 130 public: 131 void ApplyGeomImpBias(G4bool val = true) 132 { applyGeomImpBias = val; } 133 }; 134 135 #endif 136 137