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