4 // Geant4 implementation of the MonteCarlo interface methods
5 // for building Geant4 physics and access to it
7 #ifndef TG4_PHYSICS_MANAGER_H
8 #define TG4_PHYSICS_MANAGER_H
10 #include "TG4Globals.h"
11 #include "TG4NameMap.h"
12 #include "TG4IntMap.h"
14 #include "TG4G3Control.h"
17 #include "AliMCProcess.h"
22 class TG4ParticlesManager;
23 class TG4G3PhysicsManager;
25 class G4ParticleDefinition;
27 class G4VModularPhysicsList;
29 class TG4PhysicsManager
32 TG4PhysicsManager(G4VModularPhysicsList* physicsList);
34 // TG4PhysicsManager();
35 // TG4PhysicsManager(const TG4PhysicsManager& right);
36 virtual ~TG4PhysicsManager();
38 // static access method
39 static TG4PhysicsManager* Instance();
43 void Gstpar(Int_t itmed, const char *param, Float_t parval);
46 void SetCut(const char* cutName, Float_t cutValue);
47 void SetProcess(const char* controlName, Int_t controlValue);
48 Float_t Xsec(char* reac, Float_t energy, Int_t part, Int_t mate);
49 void SetExternalDecayer(AliDecayer* decayer);
52 AliDecayer* Decayer() const;
54 // particle table usage
55 Int_t IdFromPDG(Int_t pdgID) const;
56 Int_t PDGFromId(Int_t mcID) const;
57 void DefineParticles();
60 // methods for Geant4 only
63 void CreatePhysicsConstructors();
64 void SetProcessActivation();
65 AliMCProcess GetMCProcess(const G4VProcess* process);
68 void SetPhysicsList(G4VModularPhysicsList* physicsList);
69 void SetEMPhysics(G4bool value);
70 void SetOpticalPhysics(G4bool value);
71 void SetHadronPhysics(G4bool value);
72 void SetSpecialCutsPhysics(G4bool value);
73 void SetSpecialControlsPhysics(G4bool value);
76 G4VModularPhysicsList* GetPhysicsList() const;
80 TG4PhysicsManager(const TG4PhysicsManager& right);
83 TG4PhysicsManager& operator=(const TG4PhysicsManager& right);
87 void FillProcessMap();
88 void GstparCut(G4int itmed, TG4G3Cut par, G4double parval);
89 void GstparControl(G4int itmed, TG4G3Control control, G4double parval);
91 // static data members
92 static TG4PhysicsManager* fgInstance; //this instance
95 TG4ParticlesManager* fParticlesManager; //particles manager
96 TG4G3PhysicsManager* fG3PhysicsManager; //G3 physics manager
97 G4VModularPhysicsList* fPhysicsList; //physics list
98 AliDecayer* fDecayer; //external decayer
99 TG4IntMap fProcessMap; //the mapping between G4 process names
100 //and AliMCProcess codes
101 G4bool fSetEMPhysics; //electromagnetic physics control
102 G4bool fSetOpticalPhysics; //optical physics control
103 G4bool fSetHadronPhysics; //hadron physics control
104 G4bool fSetSpecialCutsPhysics; //special cuts process control
105 //(under development)
106 G4bool fSetSpecialControlsPhysics;//special controls process control
107 //(under development)
112 inline TG4PhysicsManager* TG4PhysicsManager::Instance()
113 { return fgInstance; }
115 inline void TG4PhysicsManager::SetExternalDecayer(AliDecayer* decayer)
116 { fDecayer = decayer; }
118 inline AliDecayer* TG4PhysicsManager::Decayer() const
121 inline void TG4PhysicsManager::SetPhysicsList(G4VModularPhysicsList* physicsList)
122 { fPhysicsList = physicsList; }
124 inline void TG4PhysicsManager::SetEMPhysics(G4bool value)
125 { fSetEMPhysics = value; }
127 inline void TG4PhysicsManager::SetOpticalPhysics(G4bool value)
128 { fSetOpticalPhysics = value; }
130 inline void TG4PhysicsManager::SetHadronPhysics(G4bool value)
131 { fSetHadronPhysics = value; }
133 inline void TG4PhysicsManager::SetSpecialCutsPhysics(G4bool value)
134 { fSetSpecialCutsPhysics = value; }
136 inline void TG4PhysicsManager::SetSpecialControlsPhysics(G4bool value)
137 { fSetSpecialControlsPhysics = value; }
139 inline G4VModularPhysicsList* TG4PhysicsManager::GetPhysicsList() const
140 { return fPhysicsList; }
142 #endif //TG4_PHYSICS_MANAGER_H