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"
15 #include "AliMCProcess.h"
20 class TG4ParticlesManager;
21 class TG4G3PhysicsManager;
23 class G4ParticleDefinition;
25 class G4VModularPhysicsList;
27 class TG4PhysicsManager
30 TG4PhysicsManager(G4VModularPhysicsList* physicsList);
32 // TG4PhysicsManager();
33 // TG4PhysicsManager(const TG4PhysicsManager& right);
34 virtual ~TG4PhysicsManager();
36 // static access method
37 static TG4PhysicsManager* Instance();
43 void SetCut(const char* cutName, Float_t cutValue);
44 void SetProcess(const char* controlName, Int_t controlValue);
45 Float_t Xsec(char* reac, Float_t energy, Int_t part, Int_t mate);
46 void SetExternalDecayer(AliDecayer* decayer);
49 AliDecayer* Decayer() const;
51 // particle table usage
52 Int_t IdFromPDG(Int_t pdgID) const;
53 Int_t PDGFromId(Int_t mcID) const;
54 void DefineParticles();
57 // methods for Geant4 only
60 void CreatePhysicsConstructors();
61 void SetProcessActivation();
62 AliMCProcess GetMCProcess(const G4VProcess* process);
65 void SetPhysicsList(G4VModularPhysicsList* physicsList);
66 void SetEMPhysics(G4bool value);
67 void SetOpticalPhysics(G4bool value);
68 void SetHadronPhysics(G4bool value);
69 void SetSpecialCutsPhysics(G4bool value);
70 void SetSpecialControlsPhysics(G4bool value);
73 G4VModularPhysicsList* GetPhysicsList() const;
77 TG4PhysicsManager(const TG4PhysicsManager& right);
80 TG4PhysicsManager& operator=(const TG4PhysicsManager& right);
84 void FillProcessMap();
86 // static data members
87 static TG4PhysicsManager* fgInstance; //this instance
90 TG4ParticlesManager* fParticlesManager; //particles manager
91 TG4G3PhysicsManager* fG3PhysicsManager; //G3 physics manager
92 G4VModularPhysicsList* fPhysicsList; //physics list
93 AliDecayer* fDecayer; //external decayer
94 TG4IntMap fProcessMap; //the mapping between G4 process names
95 //and AliMCProcess codes
96 G4bool fSetEMPhysics; //electromagnetic physics control
97 G4bool fSetOpticalPhysics; //optical physics control
98 G4bool fSetHadronPhysics; //hadron physics control
99 G4bool fSetSpecialCutsPhysics; //special cuts process control
100 //(under development)
101 G4bool fSetSpecialControlsPhysics;//special controls process control
102 //(under development)
107 inline TG4PhysicsManager* TG4PhysicsManager::Instance()
108 { return fgInstance; }
110 inline void TG4PhysicsManager::SetPhysicsList(G4VModularPhysicsList* physicsList)
111 { fPhysicsList = physicsList; }
113 inline void TG4PhysicsManager::SetEMPhysics(G4bool value)
114 { fSetEMPhysics = value; }
116 inline void TG4PhysicsManager::SetOpticalPhysics(G4bool value)
117 { fSetOpticalPhysics = value; }
119 inline void TG4PhysicsManager::SetHadronPhysics(G4bool value)
120 { fSetHadronPhysics = value; }
122 inline void TG4PhysicsManager::SetSpecialCutsPhysics(G4bool value)
123 { fSetSpecialCutsPhysics = value; }
125 inline void TG4PhysicsManager::SetSpecialControlsPhysics(G4bool value)
126 { fSetSpecialControlsPhysics = value; }
128 inline G4VModularPhysicsList* TG4PhysicsManager::GetPhysicsList() const
129 { return fPhysicsList; }
131 #endif //TG4_PHYSICS_MANAGER_H