]>
Commit | Line | Data |
---|---|---|
2817d3e2 | 1 | // $Id$ |
2 | // Category: physics | |
3 | // | |
4 | // Geant4 implementation of the MonteCarlo interface methods | |
5 | // for building Geant4 physics and access to it | |
6 | ||
7 | #ifndef TG4_PHYSICS_MANAGER_H | |
8 | #define TG4_PHYSICS_MANAGER_H | |
9 | ||
10 | #include "TG4Globals.h" | |
11 | #include "TG4NameMap.h" | |
12 | #include "TG4IntMap.h" | |
67d3db1a | 13 | #include "TG4G3Cut.h" |
14 | #include "TG4G3Control.h" | |
2817d3e2 | 15 | |
3fd152fa | 16 | #include <Rtypes.h> |
17 | #include "AliMCProcess.h" | |
18 | ||
2817d3e2 | 19 | #include <globals.hh> |
20 | ||
b2030327 | 21 | class AliDecayer; |
22 | class TG4ParticlesManager; | |
23 | class TG4G3PhysicsManager; | |
2817d3e2 | 24 | |
25 | class G4ParticleDefinition; | |
d8f723d4 | 26 | class G4VProcess; |
b2030327 | 27 | class G4VModularPhysicsList; |
2817d3e2 | 28 | |
29 | class TG4PhysicsManager | |
30 | { | |
31 | public: | |
b2030327 | 32 | TG4PhysicsManager(G4VModularPhysicsList* physicsList); |
2817d3e2 | 33 | // --> protected |
b2030327 | 34 | // TG4PhysicsManager(); |
2817d3e2 | 35 | // TG4PhysicsManager(const TG4PhysicsManager& right); |
36 | virtual ~TG4PhysicsManager(); | |
37 | ||
38 | // static access method | |
39 | static TG4PhysicsManager* Instance(); | |
40 | ||
41 | // methods | |
42 | void BuildPhysics(); | |
67d3db1a | 43 | void Gstpar(Int_t itmed, const char *param, Float_t parval); |
2817d3e2 | 44 | |
45 | // set methods | |
46 | void SetCut(const char* cutName, Float_t cutValue); | |
b2030327 | 47 | void SetProcess(const char* controlName, Int_t controlValue); |
2817d3e2 | 48 | Float_t Xsec(char* reac, Float_t energy, Int_t part, Int_t mate); |
b2030327 | 49 | void SetExternalDecayer(AliDecayer* decayer); |
50 | ||
51 | // get methods | |
52 | AliDecayer* Decayer() const; | |
53 | ||
2817d3e2 | 54 | // particle table usage |
55 | Int_t IdFromPDG(Int_t pdgID) const; | |
56 | Int_t PDGFromId(Int_t mcID) const; | |
57 | void DefineParticles(); | |
58 | ||
59 | // | |
60 | // methods for Geant4 only | |
61 | // | |
62 | ||
b2030327 | 63 | void CreatePhysicsConstructors(); |
2817d3e2 | 64 | void SetProcessActivation(); |
d8f723d4 | 65 | AliMCProcess GetMCProcess(const G4VProcess* process); |
2817d3e2 | 66 | |
67 | // set methods | |
b2030327 | 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); | |
2817d3e2 | 74 | |
75 | // get methods | |
b2030327 | 76 | G4VModularPhysicsList* GetPhysicsList() const; |
77 | ||
2817d3e2 | 78 | protected: |
b2030327 | 79 | TG4PhysicsManager(); |
2817d3e2 | 80 | TG4PhysicsManager(const TG4PhysicsManager& right); |
81 | ||
82 | // operators | |
83 | TG4PhysicsManager& operator=(const TG4PhysicsManager& right); | |
84 | ||
85 | private: | |
86 | // methods | |
3fd152fa | 87 | void FillProcessMap(); |
67d3db1a | 88 | void GstparCut(G4int itmed, TG4G3Cut par, G4double parval); |
89 | void GstparControl(G4int itmed, TG4G3Control control, G4double parval); | |
2817d3e2 | 90 | |
91 | // static data members | |
92 | static TG4PhysicsManager* fgInstance; //this instance | |
93 | ||
94 | // data members | |
b2030327 | 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) | |
2817d3e2 | 108 | }; |
109 | ||
110 | // inline methods | |
111 | ||
112 | inline TG4PhysicsManager* TG4PhysicsManager::Instance() | |
113 | { return fgInstance; } | |
114 | ||
66e4c679 | 115 | inline void TG4PhysicsManager::SetExternalDecayer(AliDecayer* decayer) |
116 | { fDecayer = decayer; } | |
117 | ||
118 | inline AliDecayer* TG4PhysicsManager::Decayer() const | |
119 | { return fDecayer; } | |
120 | ||
b2030327 | 121 | inline void TG4PhysicsManager::SetPhysicsList(G4VModularPhysicsList* physicsList) |
2817d3e2 | 122 | { fPhysicsList = physicsList; } |
123 | ||
b2030327 | 124 | inline void TG4PhysicsManager::SetEMPhysics(G4bool value) |
125 | { fSetEMPhysics = value; } | |
126 | ||
127 | inline void TG4PhysicsManager::SetOpticalPhysics(G4bool value) | |
128 | { fSetOpticalPhysics = value; } | |
2817d3e2 | 129 | |
b2030327 | 130 | inline void TG4PhysicsManager::SetHadronPhysics(G4bool value) |
131 | { fSetHadronPhysics = value; } | |
2817d3e2 | 132 | |
b2030327 | 133 | inline void TG4PhysicsManager::SetSpecialCutsPhysics(G4bool value) |
134 | { fSetSpecialCutsPhysics = value; } | |
2817d3e2 | 135 | |
b2030327 | 136 | inline void TG4PhysicsManager::SetSpecialControlsPhysics(G4bool value) |
137 | { fSetSpecialControlsPhysics = value; } | |
2817d3e2 | 138 | |
b2030327 | 139 | inline G4VModularPhysicsList* TG4PhysicsManager::GetPhysicsList() const |
140 | { return fPhysicsList; } | |
2817d3e2 | 141 | |
142 | #endif //TG4_PHYSICS_MANAGER_H | |
143 |