]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant4/TG4PhysicsManager.h
changed ordering of includes from Root to avoid compilation error
[u/mrichter/AliRoot.git] / TGeant4 / TG4PhysicsManager.h
CommitLineData
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"
2817d3e2 13
3fd152fa 14#include <Rtypes.h>
15#include "AliMCProcess.h"
16
2817d3e2 17#include <globals.hh>
18
b2030327 19class AliDecayer;
20class TG4ParticlesManager;
21class TG4G3PhysicsManager;
2817d3e2 22
23class G4ParticleDefinition;
d8f723d4 24class G4VProcess;
b2030327 25class G4VModularPhysicsList;
2817d3e2 26
27class TG4PhysicsManager
28{
29 public:
b2030327 30 TG4PhysicsManager(G4VModularPhysicsList* physicsList);
2817d3e2 31 // --> protected
b2030327 32 // TG4PhysicsManager();
2817d3e2 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);
b2030327 44 void SetProcess(const char* controlName, Int_t controlValue);
2817d3e2 45 Float_t Xsec(char* reac, Float_t energy, Int_t part, Int_t mate);
b2030327 46 void SetExternalDecayer(AliDecayer* decayer);
47
48 // get methods
49 AliDecayer* Decayer() const;
50
2817d3e2 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
b2030327 60 void CreatePhysicsConstructors();
2817d3e2 61 void SetProcessActivation();
d8f723d4 62 AliMCProcess GetMCProcess(const G4VProcess* process);
2817d3e2 63
64 // set methods
b2030327 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);
2817d3e2 71
72 // get methods
b2030327 73 G4VModularPhysicsList* GetPhysicsList() const;
74
2817d3e2 75 protected:
b2030327 76 TG4PhysicsManager();
2817d3e2 77 TG4PhysicsManager(const TG4PhysicsManager& right);
78
79 // operators
80 TG4PhysicsManager& operator=(const TG4PhysicsManager& right);
81
82 private:
83 // methods
3fd152fa 84 void FillProcessMap();
2817d3e2 85
86 // static data members
87 static TG4PhysicsManager* fgInstance; //this instance
88
89 // data members
b2030327 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)
2817d3e2 103};
104
105// inline methods
106
107inline TG4PhysicsManager* TG4PhysicsManager::Instance()
108{ return fgInstance; }
109
66e4c679 110inline void TG4PhysicsManager::SetExternalDecayer(AliDecayer* decayer)
111{ fDecayer = decayer; }
112
113inline AliDecayer* TG4PhysicsManager::Decayer() const
114{ return fDecayer; }
115
b2030327 116inline void TG4PhysicsManager::SetPhysicsList(G4VModularPhysicsList* physicsList)
2817d3e2 117{ fPhysicsList = physicsList; }
118
b2030327 119inline void TG4PhysicsManager::SetEMPhysics(G4bool value)
120{ fSetEMPhysics = value; }
121
122inline void TG4PhysicsManager::SetOpticalPhysics(G4bool value)
123{ fSetOpticalPhysics = value; }
2817d3e2 124
b2030327 125inline void TG4PhysicsManager::SetHadronPhysics(G4bool value)
126{ fSetHadronPhysics = value; }
2817d3e2 127
b2030327 128inline void TG4PhysicsManager::SetSpecialCutsPhysics(G4bool value)
129{ fSetSpecialCutsPhysics = value; }
2817d3e2 130
b2030327 131inline void TG4PhysicsManager::SetSpecialControlsPhysics(G4bool value)
132{ fSetSpecialControlsPhysics = value; }
2817d3e2 133
b2030327 134inline G4VModularPhysicsList* TG4PhysicsManager::GetPhysicsList() const
135{ return fPhysicsList; }
2817d3e2 136
137#endif //TG4_PHYSICS_MANAGER_H
138