Geant4
10.00.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
PhysicsList.cc
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
28
//
29
//
30
// $Id: PhysicsList.cc 68753 2013-04-05 10:26:04Z gcosmo $
31
//
32
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34
35
#include "PhysicsList.hh"
36
#include "PhysicsListMessenger.hh"
37
38
#include "PhysListEmStandard.hh"
39
#include "
PhysListEmPolarized.hh
"
40
41
#include "
G4LossTableManager.hh
"
42
#include "
G4UnitsTable.hh
"
43
#include "
G4SystemOfUnits.hh
"
44
45
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46
47
PhysicsList::PhysicsList
()
48
:
G4VModularPhysicsList
()
49
{
50
G4LossTableManager::Instance
();
51
52
currentDefaultCut
= 0.1*
mm
;
53
cutForGamma
=
currentDefaultCut
;
54
cutForElectron
=
currentDefaultCut
;
55
cutForPositron
=
currentDefaultCut
;
56
57
pMessenger
=
new
PhysicsListMessenger
(
this
);
58
59
SetVerboseLevel
(1);
60
61
emName
=
"polarized"
;
62
emPhysicsList
=
new
PhysListEmPolarized
();
63
64
}
65
66
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
67
68
PhysicsList::~PhysicsList
()
69
{
70
delete
pMessenger
;
71
}
72
73
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
74
75
// Bosons
76
#include "
G4Gamma.hh
"
77
78
// leptons
79
#include "
G4Electron.hh
"
80
#include "
G4Positron.hh
"
81
82
83
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84
85
void
PhysicsList::ConstructParticle
()
86
{
87
// only QED in this example
88
89
// gamma
90
G4Gamma::GammaDefinition
();
91
92
// leptons
93
G4Electron::ElectronDefinition
();
94
G4Positron::PositronDefinition
();
95
}
96
97
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
98
99
#include "
G4EmProcessOptions.hh
"
100
101
void
PhysicsList::ConstructProcess
()
102
{
103
// Transportation
104
//
105
AddTransportation
();
106
107
// Electromagnetic physics list
108
//
109
emPhysicsList
->
ConstructProcess
();
110
111
// step limitation (as a full process)
112
//
113
AddStepMax
();
114
}
115
116
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
117
118
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
119
{
120
if
(
verboseLevel
>0) {
121
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
122
}
123
124
if
(name ==
emName
)
return
;
125
126
if
(name ==
"standard"
) {
127
128
emName
=
name
;
129
delete
emPhysicsList
;
130
emPhysicsList
=
new
PhysListEmStandard
();
131
132
}
133
if
(name ==
"polarized"
) {
134
135
emName
=
name
;
136
delete
emPhysicsList
;
137
emPhysicsList
=
new
PhysListEmPolarized
();
138
139
}
140
else
{
141
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
142
<<
" is not defined"
143
<<
G4endl
;
144
}
145
}
146
147
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
148
149
#include "
G4ProcessManager.hh
"
150
#include "StepMax.hh"
151
152
void
PhysicsList::AddStepMax
()
153
{
154
// Step limitation seen as a process
155
StepMax
* stepMaxProcess =
new
StepMax
();
156
157
theParticleIterator
->reset();
158
while
((*
theParticleIterator
)()){
159
G4ParticleDefinition
* particle =
theParticleIterator
->value();
160
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
161
162
if
(stepMaxProcess->
IsApplicable
(*particle) && pmanager)
163
pmanager ->AddDiscreteProcess(stepMaxProcess);
164
}
165
}
166
167
168
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
169
170
#include "
G4Gamma.hh
"
171
#include "
G4Electron.hh
"
172
#include "
G4Positron.hh
"
173
174
void
PhysicsList::SetCuts
()
175
{
176
// set cut values for gamma at first and for e- second and next for e+,
177
// because some processes for e+/e- need cut values for gamma
178
SetCutValue
(
cutForGamma
,
"gamma"
);
179
SetCutValue
(
cutForElectron
,
"e-"
);
180
SetCutValue
(
cutForPositron
,
"e+"
);
181
}
182
183
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
184
185
void
PhysicsList::SetCutForGamma
(
G4double
cut)
186
{
187
cutForGamma
= cut;
188
SetParticleCuts
(
cutForGamma
,
G4Gamma::Gamma
());
189
}
190
191
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
192
193
void
PhysicsList::SetCutForElectron
(
G4double
cut)
194
{
195
cutForElectron
= cut;
196
SetParticleCuts
(
cutForElectron
,
G4Electron::Electron
());
197
}
198
199
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
200
201
void
PhysicsList::SetCutForPositron
(
G4double
cut)
202
{
203
cutForPositron
= cut;
204
SetParticleCuts
(
cutForPositron
,
G4Positron::Positron
());
205
}
206
207
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4Electron::ElectronDefinition
static G4Electron * ElectronDefinition()
Definition:
G4Electron.cc:89
PhysicsList::ConstructParticle
void ConstructParticle()
Definition:
PhysicsList.cc:117
G4LossTableManager::Instance
static G4LossTableManager * Instance()
Definition:
G4LossTableManager.cc:112
G4VUserPhysicsList::SetCutValue
void SetCutValue(G4double aCut, const G4String &pname)
Definition:
G4VUserPhysicsList.cc:419
PhysicsList::SetCutForGamma
void SetCutForGamma(G4double)
Definition:
PhysicsList.cc:231
PhysicsList::emPhysicsList
G4VPhysicsConstructor * emPhysicsList
Definition:
PhysicsList.hh:68
name
G4String name
Definition:
TRTMaterials.hh:40
G4UnitsTable.hh
PhysicsList::SetCutForPositron
void SetCutForPositron(G4double)
Definition:
PhysicsList.cc:247
G4LossTableManager.hh
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:111
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
PhysicsList::SetCutForElectron
void SetCutForElectron(G4double)
Definition:
PhysicsList.cc:239
PhysicsList::AddPhysicsList
void AddPhysicsList(const G4String &name)
Definition:
PhysicsList.cc:191
PhysicsList::cutForElectron
G4double cutForElectron
Definition:
PhysicsList.hh:64
G4VModularPhysicsList::verboseLevel
G4int verboseLevel
Definition:
G4VModularPhysicsList.hh:146
G4VUserPhysicsList::SetParticleCuts
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
Definition:
G4VUserPhysicsList.cc:463
StepMax
Definition:
StepMax.hh:46
G4cout
G4GLOB_DLL std::ostream G4cout
G4Positron.hh
G4ProcessManager.hh
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:379
G4Gamma::Gamma
static G4Gamma * Gamma()
Definition:
G4Gamma.cc:86
PhysicsList::~PhysicsList
~PhysicsList()
Definition:
PhysicsList.cc:65
PhysicsList::SetCuts
void SetCuts()
Definition:
PhysicsList.cc:219
PhysicsList::emName
G4String emName
Definition:
PhysicsList.hh:69
PhysicsList::AddStepMax
void AddStepMax()
Definition:
PhysicsList.cc:172
G4Positron::PositronDefinition
static G4Positron * PositronDefinition()
Definition:
G4Positron.cc:89
G4Positron::Positron
static G4Positron * Positron()
Definition:
G4Positron.cc:94
G4Electron.hh
PhysListEmStandard
Definition:
PhysListEmStandard.hh:40
G4VUserPhysicsList::AddTransportation
void AddTransportation()
Definition:
G4VUserPhysicsList.cc:947
PhysListEmPolarized.hh
Definition of the PhysListEmPolarized class.
PhysicsList::PhysicsList
PhysicsList()
Definition:
PhysicsList.cc:43
PhysicsList::cutForGamma
G4double cutForGamma
Definition:
PhysicsList.hh:63
PhysicsList::pMessenger
PhysicsListMessenger * pMessenger
Definition:
PhysicsList.hh:71
StepMax::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
StepMax.cc:51
G4VPhysicsConstructor::ConstructProcess
virtual void ConstructProcess()=0
G4Electron::Electron
static G4Electron * Electron()
Definition:
G4Electron.cc:94
PhysListEmPolarized
Definition:
PhysListEmPolarized.hh:43
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4ProcessManager
Definition:
G4ProcessManager.hh:106
PhysicsList::cutForPositron
G4double cutForPositron
Definition:
PhysicsList.hh:65
G4double
double G4double
Definition:
G4Types.hh:76
G4SystemOfUnits.hh
PhysicsList::ConstructProcess
void ConstructProcess()
Definition:
PhysicsList.cc:170
mm
static const double mm
Definition:
G4SIunits.hh:102
G4EmProcessOptions.hh
PhysicsList::currentDefaultCut
G4double currentDefaultCut
Definition:
PhysicsList.hh:66
theParticleIterator
#define theParticleIterator
Definition:
G4VUserPhysicsList.hh:153
G4Gamma.hh
G4Gamma::GammaDefinition
static G4Gamma * GammaDefinition()
Definition:
G4Gamma.cc:81
G4VModularPhysicsList
Definition:
G4VModularPhysicsList.hh:90
G4String
Definition:
G4String.hh:45
PhysicsListMessenger
Definition:
PhysicsListMessenger.hh:44
geant4.10.00.p02
examples
extended
polarisation
Pol01
src
PhysicsList.cc
Generated on Thu Dec 31 2015 10:39:18 for Geant4 by
1.8.8