]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TGeant4/TG4PhysicsManager.h
Access function to local momenta renamed.
[u/mrichter/AliRoot.git] / TGeant4 / TG4PhysicsManager.h
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"
13
14 #include <Rtypes.h>
15 #include "AliMCProcess.h"
16
17 #include <globals.hh>
18
19 class AliDecayer;
20 class TG4ParticlesManager;
21 class TG4G3PhysicsManager;
22
23 class G4ParticleDefinition;
24 class G4VProcess;
25 class G4VModularPhysicsList;
26
27 class TG4PhysicsManager
28 {
29   public:
30     TG4PhysicsManager(G4VModularPhysicsList* physicsList);
31     // --> protected
32     // TG4PhysicsManager();
33     // TG4PhysicsManager(const TG4PhysicsManager& right);
34     virtual ~TG4PhysicsManager();
35
36     // static access method
37     static TG4PhysicsManager* Instance();
38         
39     // methods
40     void BuildPhysics();
41
42     // set methods
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);
47      
48     // get methods
49     AliDecayer* Decayer() const;
50
51         // particle table usage         
52     Int_t IdFromPDG(Int_t pdgID) const;
53     Int_t PDGFromId(Int_t mcID) const;
54     void  DefineParticles();      
55     
56     //
57     // methods for Geant4 only 
58     //
59
60     void CreatePhysicsConstructors();
61     void SetProcessActivation();  
62     AliMCProcess GetMCProcess(const G4VProcess* process);
63
64     // set methods
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);
71     
72     // get methods
73     G4VModularPhysicsList* GetPhysicsList() const; 
74    
75   protected:
76     TG4PhysicsManager();
77     TG4PhysicsManager(const TG4PhysicsManager& right);
78
79     // operators
80     TG4PhysicsManager& operator=(const TG4PhysicsManager& right);
81
82   private:
83     // methods
84     void FillProcessMap();
85
86     // static data members
87     static TG4PhysicsManager*  fgInstance; //this instance
88     
89     // data members
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)
103 };
104
105 // inline methods
106
107 inline TG4PhysicsManager* TG4PhysicsManager::Instance() 
108 { return fgInstance; }
109
110 inline void TG4PhysicsManager::SetPhysicsList(G4VModularPhysicsList* physicsList)
111 { fPhysicsList = physicsList; }
112
113 inline void TG4PhysicsManager::SetEMPhysics(G4bool value)
114 { fSetEMPhysics = value; }
115
116 inline void TG4PhysicsManager::SetOpticalPhysics(G4bool value)
117 { fSetOpticalPhysics = value; }
118
119 inline void TG4PhysicsManager::SetHadronPhysics(G4bool value)
120 { fSetHadronPhysics = value; }
121
122 inline void TG4PhysicsManager::SetSpecialCutsPhysics(G4bool value)
123 { fSetSpecialCutsPhysics = value; }
124
125 inline void TG4PhysicsManager::SetSpecialControlsPhysics(G4bool value)
126 { fSetSpecialControlsPhysics = value; }
127
128 inline G4VModularPhysicsList* TG4PhysicsManager::GetPhysicsList() const
129 { return fPhysicsList; }
130
131 #endif //TG4_PHYSICS_MANAGER_H
132