4 // Author: I. Hrivnacova
6 // Class TG4PhysicsManager
7 // -----------------------
8 // Geant4 implementation of the MonteCarlo interface methods
9 // for building Geant4 physics and access to it.
11 #ifndef TG4_PHYSICS_MANAGER_H
12 #define TG4_PHYSICS_MANAGER_H
14 #include "TG4Verbose.h"
15 #include "TG4PhysicsMessenger.h"
16 #include "TG4ProcessControlMap.h"
17 #include "TG4ProcessMCMap.h"
18 #include "TG4NameMap.h"
20 #include "TG4G3Control.h"
21 #include "TG4Globals.h"
24 #include "AliMCProcess.h"
29 class TG4ParticlesManager;
30 class TG4G3PhysicsManager;
31 class TG4G3ProcessMap;
33 class G4ParticleDefinition;
35 class TG4ModularPhysicsList;
37 class TG4PhysicsManager : public TG4Verbose
40 TG4PhysicsManager(TG4ModularPhysicsList* physicsList);
42 // TG4PhysicsManager();
43 // TG4PhysicsManager(const TG4PhysicsManager& right);
44 virtual ~TG4PhysicsManager();
46 // static access method
47 static TG4PhysicsManager* Instance();
50 void Gstpar(Int_t itmed, const char *param, Float_t parval);
53 void SetCut(const char* cutName, Float_t cutValue);
54 void SetProcess(const char* controlName, Int_t controlValue);
55 Float_t Xsec(char* reac, Float_t energy, Int_t part, Int_t mate);
56 void SetExternalDecayer(AliDecayer* decayer);
59 AliDecayer* Decayer() const;
61 // particle table usage
62 Int_t IdFromPDG(Int_t pdgID) const;
63 Int_t PDGFromId(Int_t mcID) const;
64 void DefineParticles();
67 // methods for Geant4 only
70 void CreatePhysicsConstructors();
71 void SetProcessActivation();
72 AliMCProcess GetMCProcess(const G4VProcess* process);
73 AliMCProcess GetOpBoundaryStatus(const G4VProcess* process);
76 void SetPhysicsList(TG4ModularPhysicsList* physicsList);
77 void SetEMPhysics(G4bool value);
78 void SetMuonPhysics(G4bool value);
79 void SetHadronPhysics(G4bool value);
80 void SetOpticalPhysics(G4bool value);
81 void SetSpecialCutsPhysics(G4bool value);
82 void SetSpecialControlsPhysics(G4bool value);
85 TG4ModularPhysicsList* GetPhysicsList() const;
89 TG4PhysicsManager(const TG4PhysicsManager& right);
92 TG4PhysicsManager& operator=(const TG4PhysicsManager& right);
96 void FillProcessMap();
97 void GstparCut(G4int itmed, TG4G3Cut par, G4double parval);
98 void GstparControl(G4int itmed, TG4G3Control control,
99 TG4G3ControlValue parval);
101 // static data members
102 static TG4PhysicsManager* fgInstance; //this instance
105 TG4PhysicsMessenger fMessenger; //messenger
106 TG4ParticlesManager* fParticlesManager; //particles manager
107 TG4G3PhysicsManager* fG3PhysicsManager; //G3 physics manager
108 TG4ModularPhysicsList* fPhysicsList; //physics list
109 AliDecayer* fDecayer; //external decayer
110 TG4ProcessMCMap fProcessMCMap;//the mapping between G4 process names
111 //and AliMCProcess codes
112 TG4ProcessControlMap fProcessControlMap; //the mapping between G4 processes
113 //and G3 process controls
114 G4bool fSetEMPhysics; //electromagnetic physics control
115 G4bool fSetMuonPhysics; //muon physics control
116 G4bool fSetHadronPhysics; //hadron physics control
117 G4bool fSetOpticalPhysics; //optical physics control
118 G4bool fSetSpecialCutsPhysics; //special cuts process control
119 //(under development)
120 G4bool fSetSpecialControlsPhysics;//special controls process control
121 //(under development)
126 inline TG4PhysicsManager* TG4PhysicsManager::Instance()
127 { return fgInstance; }
129 inline void TG4PhysicsManager::SetExternalDecayer(AliDecayer* decayer)
130 { fDecayer = decayer; }
132 inline AliDecayer* TG4PhysicsManager::Decayer() const
135 inline void TG4PhysicsManager::SetPhysicsList(TG4ModularPhysicsList* physicsList)
136 { fPhysicsList = physicsList; }
138 inline void TG4PhysicsManager::SetEMPhysics(G4bool value)
139 { fSetEMPhysics = value; }
141 inline void TG4PhysicsManager::SetMuonPhysics(G4bool value)
142 { fSetMuonPhysics = value; }
144 inline void TG4PhysicsManager::SetHadronPhysics(G4bool value)
145 { fSetHadronPhysics = value; }
147 inline void TG4PhysicsManager::SetOpticalPhysics(G4bool value)
148 { fSetOpticalPhysics = value; }
150 inline void TG4PhysicsManager::SetSpecialCutsPhysics(G4bool value)
151 { fSetSpecialCutsPhysics = value; }
153 inline void TG4PhysicsManager::SetSpecialControlsPhysics(G4bool value)
154 { fSetSpecialControlsPhysics = value; }
156 inline TG4ModularPhysicsList* TG4PhysicsManager::GetPhysicsList() const
157 { return fPhysicsList; }
159 #endif //TG4_PHYSICS_MANAGER_H