]>
Commit | Line | Data |
---|---|---|
2817d3e2 | 1 | // $Id$ |
2 | // Category: physics | |
3 | // | |
e5967ab3 | 4 | // Author: I. Hrivnacova |
5 | // | |
6 | // Class TG4PhysicsManager | |
7 | // ----------------------- | |
2817d3e2 | 8 | // Geant4 implementation of the MonteCarlo interface methods |
e5967ab3 | 9 | // for building Geant4 physics and access to it. |
2817d3e2 | 10 | |
11 | #ifndef TG4_PHYSICS_MANAGER_H | |
12 | #define TG4_PHYSICS_MANAGER_H | |
13 | ||
c39225ec | 14 | #include "TG4Verbose.h" |
15 | #include "TG4PhysicsMessenger.h" | |
e5967ab3 | 16 | #include "TG4ProcessControlMap.h" |
17 | #include "TG4ProcessMCMap.h" | |
2817d3e2 | 18 | #include "TG4NameMap.h" |
67d3db1a | 19 | #include "TG4G3Cut.h" |
20 | #include "TG4G3Control.h" | |
c39225ec | 21 | #include "TG4Globals.h" |
2817d3e2 | 22 | |
3fd152fa | 23 | #include <Rtypes.h> |
24 | #include "AliMCProcess.h" | |
25 | ||
2817d3e2 | 26 | #include <globals.hh> |
27 | ||
b2030327 | 28 | class AliDecayer; |
29 | class TG4ParticlesManager; | |
30 | class TG4G3PhysicsManager; | |
e5967ab3 | 31 | class TG4G3ProcessMap; |
2817d3e2 | 32 | |
33 | class G4ParticleDefinition; | |
d8f723d4 | 34 | class G4VProcess; |
e5967ab3 | 35 | class TG4ModularPhysicsList; |
2817d3e2 | 36 | |
c39225ec | 37 | class TG4PhysicsManager : public TG4Verbose |
2817d3e2 | 38 | { |
39 | public: | |
e5967ab3 | 40 | TG4PhysicsManager(TG4ModularPhysicsList* physicsList); |
2817d3e2 | 41 | // --> protected |
b2030327 | 42 | // TG4PhysicsManager(); |
2817d3e2 | 43 | // TG4PhysicsManager(const TG4PhysicsManager& right); |
44 | virtual ~TG4PhysicsManager(); | |
45 | ||
46 | // static access method | |
47 | static TG4PhysicsManager* Instance(); | |
48 | ||
49 | // methods | |
67d3db1a | 50 | void Gstpar(Int_t itmed, const char *param, Float_t parval); |
2817d3e2 | 51 | |
52 | // set methods | |
53 | void SetCut(const char* cutName, Float_t cutValue); | |
b2030327 | 54 | void SetProcess(const char* controlName, Int_t controlValue); |
2817d3e2 | 55 | Float_t Xsec(char* reac, Float_t energy, Int_t part, Int_t mate); |
b2030327 | 56 | void SetExternalDecayer(AliDecayer* decayer); |
57 | ||
58 | // get methods | |
59 | AliDecayer* Decayer() const; | |
60 | ||
2817d3e2 | 61 | // particle table usage |
62 | Int_t IdFromPDG(Int_t pdgID) const; | |
63 | Int_t PDGFromId(Int_t mcID) const; | |
64 | void DefineParticles(); | |
65 | ||
66 | // | |
67 | // methods for Geant4 only | |
68 | // | |
69 | ||
b2030327 | 70 | void CreatePhysicsConstructors(); |
2817d3e2 | 71 | void SetProcessActivation(); |
d8f723d4 | 72 | AliMCProcess GetMCProcess(const G4VProcess* process); |
c3e6a643 | 73 | AliMCProcess GetOpBoundaryStatus(const G4VProcess* process); |
2817d3e2 | 74 | |
75 | // set methods | |
e5967ab3 | 76 | void SetPhysicsList(TG4ModularPhysicsList* physicsList); |
b2030327 | 77 | void SetEMPhysics(G4bool value); |
c3e6a643 | 78 | void SetMuonPhysics(G4bool value); |
b2030327 | 79 | void SetHadronPhysics(G4bool value); |
c3e6a643 | 80 | void SetOpticalPhysics(G4bool value); |
b2030327 | 81 | void SetSpecialCutsPhysics(G4bool value); |
82 | void SetSpecialControlsPhysics(G4bool value); | |
2817d3e2 | 83 | |
84 | // get methods | |
e5967ab3 | 85 | TG4ModularPhysicsList* GetPhysicsList() const; |
b2030327 | 86 | |
2817d3e2 | 87 | protected: |
b2030327 | 88 | TG4PhysicsManager(); |
2817d3e2 | 89 | TG4PhysicsManager(const TG4PhysicsManager& right); |
90 | ||
91 | // operators | |
92 | TG4PhysicsManager& operator=(const TG4PhysicsManager& right); | |
93 | ||
94 | private: | |
95 | // methods | |
3fd152fa | 96 | void FillProcessMap(); |
67d3db1a | 97 | void GstparCut(G4int itmed, TG4G3Cut par, G4double parval); |
e5967ab3 | 98 | void GstparControl(G4int itmed, TG4G3Control control, |
99 | TG4G3ControlValue parval); | |
2817d3e2 | 100 | |
101 | // static data members | |
102 | static TG4PhysicsManager* fgInstance; //this instance | |
103 | ||
104 | // data members | |
c39225ec | 105 | TG4PhysicsMessenger fMessenger; //messenger |
b2030327 | 106 | TG4ParticlesManager* fParticlesManager; //particles manager |
107 | TG4G3PhysicsManager* fG3PhysicsManager; //G3 physics manager | |
e5967ab3 | 108 | TG4ModularPhysicsList* fPhysicsList; //physics list |
b2030327 | 109 | AliDecayer* fDecayer; //external decayer |
e5967ab3 | 110 | TG4ProcessMCMap fProcessMCMap;//the mapping between G4 process names |
b2030327 | 111 | //and AliMCProcess codes |
e5967ab3 | 112 | TG4ProcessControlMap fProcessControlMap; //the mapping between G4 processes |
113 | //and G3 process controls | |
b2030327 | 114 | G4bool fSetEMPhysics; //electromagnetic physics control |
c3e6a643 | 115 | G4bool fSetMuonPhysics; //muon physics control |
b2030327 | 116 | G4bool fSetHadronPhysics; //hadron physics control |
c3e6a643 | 117 | G4bool fSetOpticalPhysics; //optical physics control |
b2030327 | 118 | G4bool fSetSpecialCutsPhysics; //special cuts process control |
119 | //(under development) | |
120 | G4bool fSetSpecialControlsPhysics;//special controls process control | |
121 | //(under development) | |
2817d3e2 | 122 | }; |
123 | ||
124 | // inline methods | |
125 | ||
126 | inline TG4PhysicsManager* TG4PhysicsManager::Instance() | |
127 | { return fgInstance; } | |
128 | ||
66e4c679 | 129 | inline void TG4PhysicsManager::SetExternalDecayer(AliDecayer* decayer) |
130 | { fDecayer = decayer; } | |
131 | ||
132 | inline AliDecayer* TG4PhysicsManager::Decayer() const | |
133 | { return fDecayer; } | |
134 | ||
e5967ab3 | 135 | inline void TG4PhysicsManager::SetPhysicsList(TG4ModularPhysicsList* physicsList) |
2817d3e2 | 136 | { fPhysicsList = physicsList; } |
137 | ||
b2030327 | 138 | inline void TG4PhysicsManager::SetEMPhysics(G4bool value) |
139 | { fSetEMPhysics = value; } | |
140 | ||
c3e6a643 | 141 | inline void TG4PhysicsManager::SetMuonPhysics(G4bool value) |
142 | { fSetMuonPhysics = value; } | |
2817d3e2 | 143 | |
b2030327 | 144 | inline void TG4PhysicsManager::SetHadronPhysics(G4bool value) |
145 | { fSetHadronPhysics = value; } | |
2817d3e2 | 146 | |
c3e6a643 | 147 | inline void TG4PhysicsManager::SetOpticalPhysics(G4bool value) |
148 | { fSetOpticalPhysics = value; } | |
149 | ||
b2030327 | 150 | inline void TG4PhysicsManager::SetSpecialCutsPhysics(G4bool value) |
151 | { fSetSpecialCutsPhysics = value; } | |
2817d3e2 | 152 | |
b2030327 | 153 | inline void TG4PhysicsManager::SetSpecialControlsPhysics(G4bool value) |
154 | { fSetSpecialControlsPhysics = value; } | |
2817d3e2 | 155 | |
e5967ab3 | 156 | inline TG4ModularPhysicsList* TG4PhysicsManager::GetPhysicsList() const |
b2030327 | 157 | { return fPhysicsList; } |
2817d3e2 | 158 | |
159 | #endif //TG4_PHYSICS_MANAGER_H | |
160 |