]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant4/TG4PhysicsManager.h
New/updated macros.
[u/mrichter/AliRoot.git] / TGeant4 / TG4PhysicsManager.h
CommitLineData
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
14#include "TG4Globals.h"
e5967ab3 15#include "TG4ProcessControlMap.h"
16#include "TG4ProcessMCMap.h"
2817d3e2 17#include "TG4NameMap.h"
67d3db1a 18#include "TG4G3Cut.h"
19#include "TG4G3Control.h"
2817d3e2 20
3fd152fa 21#include <Rtypes.h>
22#include "AliMCProcess.h"
23
2817d3e2 24#include <globals.hh>
25
b2030327 26class AliDecayer;
27class TG4ParticlesManager;
28class TG4G3PhysicsManager;
e5967ab3 29class TG4G3ProcessMap;
2817d3e2 30
31class G4ParticleDefinition;
d8f723d4 32class G4VProcess;
e5967ab3 33class TG4ModularPhysicsList;
2817d3e2 34
35class TG4PhysicsManager
36{
37 public:
e5967ab3 38 TG4PhysicsManager(TG4ModularPhysicsList* physicsList);
2817d3e2 39 // --> protected
b2030327 40 // TG4PhysicsManager();
2817d3e2 41 // TG4PhysicsManager(const TG4PhysicsManager& right);
42 virtual ~TG4PhysicsManager();
43
44 // static access method
45 static TG4PhysicsManager* Instance();
46
47 // methods
67d3db1a 48 void Gstpar(Int_t itmed, const char *param, Float_t parval);
2817d3e2 49
50 // set methods
51 void SetCut(const char* cutName, Float_t cutValue);
b2030327 52 void SetProcess(const char* controlName, Int_t controlValue);
2817d3e2 53 Float_t Xsec(char* reac, Float_t energy, Int_t part, Int_t mate);
b2030327 54 void SetExternalDecayer(AliDecayer* decayer);
55
56 // get methods
57 AliDecayer* Decayer() const;
58
2817d3e2 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
b2030327 68 void CreatePhysicsConstructors();
2817d3e2 69 void SetProcessActivation();
d8f723d4 70 AliMCProcess GetMCProcess(const G4VProcess* process);
2817d3e2 71
72 // set methods
e5967ab3 73 void SetPhysicsList(TG4ModularPhysicsList* physicsList);
b2030327 74 void SetEMPhysics(G4bool value);
75 void SetOpticalPhysics(G4bool value);
76 void SetHadronPhysics(G4bool value);
77 void SetSpecialCutsPhysics(G4bool value);
78 void SetSpecialControlsPhysics(G4bool value);
2817d3e2 79
80 // get methods
e5967ab3 81 TG4ModularPhysicsList* GetPhysicsList() const;
b2030327 82
2817d3e2 83 protected:
b2030327 84 TG4PhysicsManager();
2817d3e2 85 TG4PhysicsManager(const TG4PhysicsManager& right);
86
87 // operators
88 TG4PhysicsManager& operator=(const TG4PhysicsManager& right);
89
90 private:
91 // methods
3fd152fa 92 void FillProcessMap();
67d3db1a 93 void GstparCut(G4int itmed, TG4G3Cut par, G4double parval);
e5967ab3 94 void GstparControl(G4int itmed, TG4G3Control control,
95 TG4G3ControlValue parval);
2817d3e2 96
97 // static data members
98 static TG4PhysicsManager* fgInstance; //this instance
99
100 // data members
b2030327 101 TG4ParticlesManager* fParticlesManager; //particles manager
102 TG4G3PhysicsManager* fG3PhysicsManager; //G3 physics manager
e5967ab3 103 TG4ModularPhysicsList* fPhysicsList; //physics list
b2030327 104 AliDecayer* fDecayer; //external decayer
e5967ab3 105 TG4ProcessMCMap fProcessMCMap;//the mapping between G4 process names
b2030327 106 //and AliMCProcess codes
e5967ab3 107 TG4ProcessControlMap fProcessControlMap; //the mapping between G4 processes
108 //and G3 process controls
b2030327 109 G4bool fSetEMPhysics; //electromagnetic physics control
110 G4bool fSetOpticalPhysics; //optical physics control
111 G4bool fSetHadronPhysics; //hadron physics control
112 G4bool fSetSpecialCutsPhysics; //special cuts process control
113 //(under development)
114 G4bool fSetSpecialControlsPhysics;//special controls process control
115 //(under development)
2817d3e2 116};
117
118// inline methods
119
120inline TG4PhysicsManager* TG4PhysicsManager::Instance()
121{ return fgInstance; }
122
66e4c679 123inline void TG4PhysicsManager::SetExternalDecayer(AliDecayer* decayer)
124{ fDecayer = decayer; }
125
126inline AliDecayer* TG4PhysicsManager::Decayer() const
127{ return fDecayer; }
128
e5967ab3 129inline void TG4PhysicsManager::SetPhysicsList(TG4ModularPhysicsList* physicsList)
2817d3e2 130{ fPhysicsList = physicsList; }
131
b2030327 132inline void TG4PhysicsManager::SetEMPhysics(G4bool value)
133{ fSetEMPhysics = value; }
134
135inline void TG4PhysicsManager::SetOpticalPhysics(G4bool value)
136{ fSetOpticalPhysics = value; }
2817d3e2 137
b2030327 138inline void TG4PhysicsManager::SetHadronPhysics(G4bool value)
139{ fSetHadronPhysics = value; }
2817d3e2 140
b2030327 141inline void TG4PhysicsManager::SetSpecialCutsPhysics(G4bool value)
142{ fSetSpecialCutsPhysics = value; }
2817d3e2 143
b2030327 144inline void TG4PhysicsManager::SetSpecialControlsPhysics(G4bool value)
145{ fSetSpecialControlsPhysics = value; }
2817d3e2 146
e5967ab3 147inline TG4ModularPhysicsList* TG4PhysicsManager::GetPhysicsList() const
b2030327 148{ return fPhysicsList; }
2817d3e2 149
150#endif //TG4_PHYSICS_MANAGER_H
151