Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4PhysicsManager.h
Go to the documentation of this file.
1#ifndef TG4_PHYSICS_MANAGER_H
2#define TG4_PHYSICS_MANAGER_H
3
4//------------------------------------------------
5// The Geant4 Virtual Monte Carlo package
6// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
17
18#include "TG4G3Control.h"
19#include "TG4G3Cut.h"
20#include "TG4Globals.h"
21#include "TG4NameMap.h"
22#include "TG4Verbose.h"
23
24#include <Rtypes.h>
25#include <TMCParticleType.h>
26#include <TMCProcess.h>
27#include <TString.h>
28
29#include <G4Version.hh>
30#include <globals.hh>
31
32#include <set>
33
35class TG4ProcessMap;
37class TG4G3ProcessMap;
38
40class G4ProcessManager;
41class G4VProcess;
43class G4OpBoundaryProcess;
44
50
52{
53 public:
55 virtual ~TG4PhysicsManager();
56
57 // static access method
59
60 // methods
61 void Gstpar(Int_t itmed, const char* param, Float_t parval);
62
63 // set methods
64 Bool_t SetCut(const char* cutName, Float_t cutValue);
65 Bool_t SetProcess(const char* controlName, Int_t controlValue);
66 Bool_t DefineParticle(Int_t pdg, const char* name, TMCParticleType mcType,
67 Double_t mass, Double_t charge, Double_t lifetime, const TString& pType,
68 Double_t width, Int_t iSpin, Int_t iParity, Int_t iConjugation,
69 Int_t iIsospin, Int_t iIsospinZ, Int_t gParity, Int_t lepton, Int_t baryon,
70 Bool_t stable, Bool_t shortlived = kFALSE, const TString& subType = "",
71 Int_t antiEncoding = 0, Double_t magMoment = 0.0,
72 Double_t excitation = 0.0);
73 Bool_t DefineIon(const char* name, Int_t Z, Int_t A, Int_t Q,
74 Double_t excEnergy, Double_t mass);
75 void SetUserDecay(Int_t pdg);
76 Bool_t SetDecayMode(Int_t pdg, Float_t bratio[6], Int_t mode[6][3]);
77
78 Float_t Xsec(char* reac, Float_t energy, Int_t part, Int_t mate);
79
80 // particle table usage
81 Int_t IdFromPDG(Int_t pdgID) const;
82 Int_t PDGFromId(Int_t mcID) const;
83
84 // get methods
85 TString ParticleName(Int_t pdg) const;
86 Double_t ParticleMass(Int_t pdg) const;
87 Double_t ParticleCharge(Int_t pdg) const;
88 Double_t ParticleLifeTime(Int_t pdg) const;
89 TMCParticleType ParticleMCType(Int_t pdg) const;
90
91 //
92 // methods for Geant4 only
93 //
94
95 void DefineParticles();
98 TMCProcess GetMCProcess(const G4VProcess* process);
99 TMCProcess GetOpBoundaryStatus();
100
101 void SetCutForGamma(G4double cut);
102 void SetCutForElectron(G4double cut);
103 void SetCutForPositron(G4double cut);
104 void SetCutForProton(G4double cut);
105
106 G4double GetCutForGamma() const;
107 G4double GetCutForElectron() const;
108 G4double GetCutForPositron() const;
109 G4double GetCutForProton() const;
110 G4bool IsOpBoundaryProcess() const;
111
112#if G4VERSION_NUMBER == 1100
113 void StoreCerenkovMaxBetaChangeValue();
114 void ApplyCerenkovMaxBetaChangeValue();
115#endif
116
117 private:
122
123 // methods
124 void GstparCut(G4int itmed, TG4G3Cut par, G4double parval);
125 void GstparControl(
126 G4int itmed, TG4G3Control control, TG4G3ControlValue parval);
127 G4ParticleDefinition* GetParticleDefinition(G4int pdgEncoding) const;
128
130 G4ProcessManager* processManager, G4int subType) const;
131
133 G4ProcessManager* processManager, G4int processId, G4bool activation);
136
137 // static data members
139
140 static const G4double fgkDefautCut;
141
144
145 //
146 // data members
147
150
153
155 std::set<TString> fNotImplParNames;
156
158 G4double fCutForGamma;
159
162
165
168
170 G4OpBoundaryProcess* fOpBoundaryProcess;
171
172#if G4VERSION_NUMBER == 1100
174 G4double fCerenkovMaxBetaChange = 0.;
175#endif
176};
177
178// inline methods
179
185
186inline void TG4PhysicsManager::SetCutForGamma(G4double cut)
187{
189 fCutForGamma = cut;
190}
191
193{
195 fCutForElectron = cut;
196}
197
199{
201 fCutForPositron = cut;
202}
203
204inline void TG4PhysicsManager::SetCutForProton(G4double cut)
205{
207 fCutForProton = cut;
208}
209
211{
213 return fCutForGamma;
214}
215
217{
219 return fCutForElectron;
220}
221
223{
225 return fCutForPositron;
226}
227
229{
231 return fCutForProton;
232}
233
235{
237 return (fOpBoundaryProcess != 0);
238}
239
240#endif // TG4_PHYSICS_MANAGER_H
Definition of the enumerations TG4G3Control, TG4G3ControlValue.
Definition of the enumeration TG4G3Cut.
Definition of the TG4Globals class and basic container types.
Definition of the TG4NameMap class.
Definition of the TG4Verbose class.
Provides a Geant3 way control to Geant4 physics.
Provides mapping between TDatabasePDG and Geant4 particles.
Geant4 implementation of the TVirtualMC interface methods for building Geant4 physics and access to i...
TG4ParticlesManager * fParticlesManager
particles manager
Bool_t SetDecayMode(Int_t pdg, Float_t bratio[6], Int_t mode[6][3])
G4double fCutForElectron
range cut for electron
Double_t ParticleCharge(Int_t pdg) const
TMCParticleType ParticleMCType(Int_t pdg) const
G4double fCutForGamma
range cut for gamma
G4double GetCutForPositron() const
Int_t PDGFromId(Int_t mcID) const
void SetCutForProton(G4double cut)
G4double GetCutForProton() const
static TG4PhysicsManager * Instance()
Double_t ParticleMass(Int_t pdg) const
void GstparControl(G4int itmed, TG4G3Control control, TG4G3ControlValue parval)
void SetCutForPositron(G4double cut)
static const G4double fgkDefautCut
the default range cut value
Double_t ParticleLifeTime(Int_t pdg) const
Bool_t SetCut(const char *cutName, Float_t cutValue)
G4double GetCutForElectron() const
void SetUserDecay(Int_t pdg)
G4bool IsOpBoundaryProcess() const
TString ParticleName(Int_t pdg) const
G4double fCutForProton
range cut for proton
TG4G3PhysicsManager * fG3PhysicsManager
G3 physics manager.
std::set< TString > fNotImplParNames
set of not implemented Gstpar parameters
Bool_t DefineIon(const char *name, Int_t Z, Int_t A, Int_t Q, Double_t excEnergy, Double_t mass)
void GstparCut(G4int itmed, TG4G3Cut par, G4double parval)
G4double GetCutForGamma() const
Bool_t SetProcess(const char *controlName, Int_t controlValue)
void SetCutForElectron(G4double cut)
TG4PhysicsManager & operator=(const TG4PhysicsManager &right)
Not implemented.
TMCProcess GetMCProcess(const G4VProcess *process)
G4double fCutForPositron
range cut for positron
Int_t IdFromPDG(Int_t pdgID) const
G4ParticleDefinition * GetParticleDefinition(G4int pdgEncoding) const
TMCProcess GetOpBoundaryStatus()
G4VProcess * GetProcess(G4ProcessManager *processManager, G4int subType) const
void SetCutForGamma(G4double cut)
Bool_t DefineParticle(Int_t pdg, const char *name, TMCParticleType mcType, Double_t mass, Double_t charge, Double_t lifetime, const TString &pType, Double_t width, Int_t iSpin, Int_t iParity, Int_t iConjugation, Int_t iIsospin, Int_t iIsospinZ, Int_t gParity, Int_t lepton, Int_t baryon, Bool_t stable, Bool_t shortlived=kFALSE, const TString &subType="", Int_t antiEncoding=0, Double_t magMoment=0.0, Double_t excitation=0.0)
G4OpBoundaryProcess * fOpBoundaryProcess
optical boundary process
Float_t Xsec(char *reac, Float_t energy, Int_t part, Int_t mate)
static TG4ProcessMap * fgProcessMap
the mapping between G4 processes and G3 process controls
void Gstpar(Int_t itmed, const char *param, Float_t parval)
static TG4PhysicsManager * fgInstance
this instance
TG4PhysicsManager(const TG4PhysicsManager &right)
Not implemented.
Maps G4 process sub types to TMCProcess and TG4G3Control codes.
Base class for defining the verbose level and a common messenger.
Definition TG4Verbose.h:36
TG4G3ControlValue
Enumeration for G3 processes control values.
TG4G3Cut
Enumeration for G3 types of kinetic energy cuts.
Definition TG4G3Cut.h:22
TG4G3Control
Enumeration for G3 types of physics processes controls.