Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:57:50

0001 ////////////////////////////////////////////////////////////////////////////////
0002 //                             
0003 //  eASTPhysicsList.hh 
0004 //  Geant4 physics list for Electron Ion Collider detector simulation
0005 //                                                                  
0006 //  History                                                        
0007 //    Jun.21.2018 : original implementation - Dennis H. Wright (SLAC) 
0008 //    May.06.2021 : migration to eAST - Makoto Asai (SLAC)
0009 //                                                                      
0010 ////////////////////////////////////////////////////////////////////////////////
0011 
0012 #ifndef eASTPhysicsList_h
0013 #define eASTPhysicsList_h 1
0014 
0015 #include "G4VModularPhysicsList.hh"
0016 #include "globals.hh"
0017 
0018 class eASTPhysicsListMessenger;
0019 class G4Region;
0020 class G4ProductionCuts;
0021 
0022 #include <map>
0023 
0024 class eASTPhysicsList: public G4VModularPhysicsList
0025 {
0026   public:
0027     eASTPhysicsList(G4int verb = 1);
0028     ~eASTPhysicsList();
0029 
0030     virtual void ConstructParticle();
0031     virtual void ConstructProcess();
0032     virtual void SetCuts();
0033 
0034   private:
0035     void SetupProcesses();
0036 
0037   private:
0038     G4bool processesAreRegistered = false;
0039     eASTPhysicsListMessenger* pMessenger;
0040 
0041     //G4bool addHP = false;      // add Neutron_HP
0042     G4bool addRDM = false;     // add Radioactive Decay Module
0043     G4bool addOptical = false; // add optical physics
0044 
0045     G4int stepLimit_opt = -1;  // step limiter option (0:charged, 1:neutral, 2:all, 3:e+/e-)
0046     std::map<G4Region*,G4double> localStepLimits; // map of region name and limit value
0047     G4double globalCuts[4];    // for e-, e+ gamma, proton
0048     std::map<G4Region*,G4ProductionCuts*> localCuts; // map of region name and cuts
0049 
0050   public:
0051     // Neutron_HP needs further implementation
0052     //void AddHP(G4bool val = true) { addHP = val; }
0053     //G4bool IfHP() const { return addHP; }
0054     void AddRDM(G4bool val = true) { addRDM = val; }
0055     G4bool IfRDM() const { return addRDM; }
0056     void AddOptical(G4bool val = true) { addOptical = val; }
0057     G4bool IfOptical() const { return addOptical; }
0058 
0059     void AddStepLimit(G4int val = 0) { stepLimit_opt = val; }
0060     G4int IfStepLimit() const { return stepLimit_opt; }
0061     void SetGlobalStepLimit(G4double);
0062     G4double GetGlobalStepLimit() const;
0063     G4Region* SetLocalStepLimit(const G4String&,G4double);
0064     G4double GetLocalStepLimit(const G4String&) const;
0065     void SetGlobalCuts(G4double);
0066     G4double GetGlobalCuts() const { return GetGlobalCut(0); }
0067     void SetGlobalCut(G4int, G4double);
0068     G4double GetGlobalCut(G4int i) const { return globalCuts[i]; }
0069     G4Region* SetLocalCuts(const G4String& reg,G4double val)
0070     {
0071       G4Region* regPtr = nullptr;
0072       for(G4int i=0; i<4; i++)
0073       {
0074         regPtr = SetLocalCut(reg,i,val);
0075         if(!regPtr) return regPtr;
0076       }
0077       return regPtr;
0078     }
0079     G4double GetLocalCuts(const G4String& reg) const { return GetLocalCut(reg,0); }
0080     G4Region* SetLocalCut(const G4String&,G4int,G4double);
0081     G4double GetLocalCut(const G4String&,G4int) const;
0082     
0083   private:
0084     G4Region* FindRegion(const G4String&) const;
0085 };
0086 
0087 #endif