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5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/advanced/gorad/include/GRPhysicsList.hh (Version 11.3.0) and /examples/advanced/gorad/include/GRPhysicsList.hh (Version 10.7.p4)


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