EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eASTPhysicsList.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file eASTPhysicsList.hh
1 
2 //
3 // eASTPhysicsList.hh
4 // Geant4 physics list for Electron Ion Collider detector simulation
5 //
6 // History
7 // Jun.21.2018 : original implementation - Dennis H. Wright (SLAC)
8 // May.06.2021 : migration to eAST - Makoto Asai (SLAC)
9 //
11 
12 #ifndef eASTPhysicsList_h
13 #define eASTPhysicsList_h 1
14 
15 #include "G4VModularPhysicsList.hh"
16 #include "globals.hh"
17 
19 class G4Region;
20 class G4ProductionCuts;
21 
22 #include <map>
23 
24 class eASTPhysicsList: public G4VModularPhysicsList
25 {
26  public:
29 
30  virtual void ConstructParticle();
31  virtual void ConstructProcess();
32  virtual void SetCuts();
33 
34  private:
35  void SetupProcesses();
36 
37  private:
38  G4bool processesAreRegistered = false;
40 
41  //G4bool addHP = false; // add Neutron_HP
42  G4bool addRDM = false; // add Radioactive Decay Module
43  G4bool addOptical = false; // add optical physics
44 
45  G4int stepLimit_opt = -1; // step limiter option (0:charged, 1:neutral, 2:all, 3:e+/e-)
46  std::map<G4Region*,G4double> localStepLimits; // map of region name and limit value
47  G4double globalCuts[4]; // for e-, e+ gamma, proton
48  std::map<G4Region*,G4ProductionCuts*> localCuts; // map of region name and cuts
49 
50  public:
51  // Neutron_HP needs further implementation
52  //void AddHP(G4bool val = true) { addHP = val; }
53  //G4bool IfHP() const { return addHP; }
54  void AddRDM(G4bool val = true) { addRDM = val; }
55  G4bool IfRDM() const { return addRDM; }
56  void AddOptical(G4bool val = true) { addOptical = val; }
57  G4bool IfOptical() const { return addOptical; }
58 
59  void AddStepLimit(G4int val = 0) { stepLimit_opt = val; }
60  G4int IfStepLimit() const { return stepLimit_opt; }
61  void SetGlobalStepLimit(G4double);
62  G4double GetGlobalStepLimit() const;
63  G4Region* SetLocalStepLimit(const G4String&,G4double);
64  G4double GetLocalStepLimit(const G4String&) const;
65  void SetGlobalCuts(G4double);
66  G4double GetGlobalCuts() const { return GetGlobalCut(0); }
67  void SetGlobalCut(G4int, G4double);
68  G4double GetGlobalCut(G4int i) const { return globalCuts[i]; }
69  G4Region* SetLocalCuts(const G4String& reg,G4double val)
70  {
71  G4Region* regPtr = nullptr;
72  for(G4int i=0; i<4; i++)
73  {
74  regPtr = SetLocalCut(reg,i,val);
75  if(!regPtr) return regPtr;
76  }
77  return regPtr;
78  }
79  G4double GetLocalCuts(const G4String& reg) const { return GetLocalCut(reg,0); }
80  G4Region* SetLocalCut(const G4String&,G4int,G4double);
81  G4double GetLocalCut(const G4String&,G4int) const;
82 
83  private:
84  G4Region* FindRegion(const G4String&) const;
85 };
86 
87 #endif