4 // Author: I. Hrivnacova
6 // Class TG4G3PhysicsManager
7 // -------------------------
8 // This class provides a Geant3 way control
10 // The G3 cuts and process controls are
11 // stored in fCutVector and fControlVector vectors.
12 // These special cuts/controls are activated
13 // by registering their physics constructors
14 // (TG4PhysicsConstructorSpecialCuts, G4PhysicsConstructorSpecialControl)
15 // to the modular physics list (TG4ModularPhysicsList)
16 // by physics manager (TG4PhysicsManager).
18 #ifndef TG4_G3_PHYSICS_MANAGER_H
19 #define TG4_G3_PHYSICS_MANAGER_H
21 #include "TG4Globals.h"
22 #include "TG4G3Defaults.h"
24 #include "TG4G3Control.h"
25 #include "TG4G3ParticleWSP.h"
28 #include "AliMCProcess.h"
33 class TG4G3ControlVector;
35 class G4ParticleDefinition;
38 class TG4G3PhysicsManager
41 TG4G3PhysicsManager();
43 // TG4G3PhysicsManager(const TG4G3PhysicsManager& right);
44 virtual ~TG4G3PhysicsManager();
46 // static access method
47 static TG4G3PhysicsManager* Instance();
52 G4VProcess* FindProcess(G4String processName) const;
53 G4bool CheckCutWithTheVector(
54 G4String name, G4double value, TG4G3Cut& cut);
55 G4bool CheckControlWithTheVector(
56 G4String name, G4double value,
57 TG4G3Control& control, TG4G3ControlValue& controlValue);
58 G4bool CheckCutWithG3Defaults(
59 G4String name, G4double value, TG4G3Cut& cut);
60 G4bool CheckControlWithG3Defaults(
61 G4String name, G4double value,
62 TG4G3Control& control, TG4G3ControlValue& controlValue);
65 void SetCut(TG4G3Cut cut, G4double cutValue);
66 void SetProcess(TG4G3Control control, TG4G3ControlValue controlValue);
67 void SetG3DefaultCuts();
68 void SetG3DefaultControls();
71 G4bool IsSpecialCuts() const;
72 G4bool IsSpecialControls() const;
73 TG4G3CutVector* GetCutVector() const;
74 TG4G3ControlVector* GetControlVector() const;
75 TG4boolVector* GetIsCutVector() const;
76 TG4boolVector* GetIsControlVector() const;
78 TG4G3ParticleWSP GetG3ParticleWSP(G4ParticleDefinition* particle) const;
79 G4String GetG3ParticleWSPName(G4int particleWSP) const;
82 TG4G3PhysicsManager(const TG4G3PhysicsManager& right);
85 TG4G3PhysicsManager& operator=(const TG4G3PhysicsManager& right);
89 void SwitchIsCutVector(TG4G3Cut cut);
90 void SwitchIsControlVector(TG4G3Control control);
92 // static data members
93 static TG4G3PhysicsManager* fgInstance; //this instance
96 TG4G3CutVector* fCutVector; //TG4CutVector
97 TG4G3ControlVector* fControlVector;//TG4ControlVector
98 TG4boolVector* fIsCutVector; //vector of booleans which cuts are set
99 TG4boolVector* fIsControlVector; //vector of booleans which controls are set
100 TG4G3Defaults fG3Defaults; // G3 default cuts/controls
101 G4bool fLock; //if true: cut/control vectors cannot be modified
106 inline TG4G3PhysicsManager* TG4G3PhysicsManager::Instance()
107 { return fgInstance; }
109 inline void TG4G3PhysicsManager::Lock()
112 inline TG4G3CutVector* TG4G3PhysicsManager::GetCutVector() const
113 { return fCutVector; }
115 inline TG4G3ControlVector* TG4G3PhysicsManager::GetControlVector() const
116 { return fControlVector; }
118 inline TG4boolVector* TG4G3PhysicsManager::GetIsCutVector() const
119 { return fIsCutVector; }
121 inline TG4boolVector* TG4G3PhysicsManager::GetIsControlVector() const
122 { return fIsControlVector; }
124 #endif //TG4_PHYSICS_MANAGER_H