Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
examples
extended
electromagnetic
TestEm17
src
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$
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 "
MuNuclearBuilder.hh
"
40
41
#include "
G4LossTableManager.hh
"
42
43
#include "
G4Gamma.hh
"
44
#include "
G4Electron.hh
"
45
#include "
G4Positron.hh
"
46
47
#include "
G4BosonConstructor.hh
"
48
#include "
G4LeptonConstructor.hh
"
49
#include "
G4MesonConstructor.hh
"
50
#include "
G4BosonConstructor.hh
"
51
#include "
G4BaryonConstructor.hh
"
52
#include "
G4IonConstructor.hh
"
53
#include "
G4ShortLivedConstructor.hh
"
54
55
#include "
G4SystemOfUnits.hh
"
56
57
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58
59
PhysicsList::PhysicsList
() :
G4VModularPhysicsList
()
60
{
61
SetVerboseLevel
(1);
62
fMessenger =
new
PhysicsListMessenger
(
this
);
63
64
// cuts
65
fCurrentDefaultCut = 1.0*
mm
;
66
fCutForGamma = fCurrentDefaultCut;
67
fCutForElectron = fCurrentDefaultCut;
68
fCutForPositron = fCurrentDefaultCut;
69
70
// EM physics
71
fEmName =
G4String
(
"standard"
);
72
fEmPhysicsList =
new
PhysListEmStandard
(fEmName);
73
74
fMuNuclPhysicsList = 0;
75
76
// instanciate EnergyLossTable
77
G4LossTableManager::Instance
();
78
}
79
80
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81
82
PhysicsList::~PhysicsList
()
83
{
84
delete
fMessenger;
85
}
86
87
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
88
89
void
PhysicsList::ConstructParticle
()
90
{
91
G4BosonConstructor
pBosonConstructor;
92
pBosonConstructor.
ConstructParticle
();
93
94
G4LeptonConstructor
pLeptonConstructor;
95
pLeptonConstructor.
ConstructParticle
();
96
97
G4MesonConstructor
pMesonConstructor;
98
pMesonConstructor.
ConstructParticle
();
99
100
G4BaryonConstructor
pBaryonConstructor;
101
pBaryonConstructor.
ConstructParticle
();
102
103
G4IonConstructor
pIonConstructor;
104
pIonConstructor.
ConstructParticle
();
105
106
G4ShortLivedConstructor
pShortLivedConstructor;
107
pShortLivedConstructor.
ConstructParticle
();
108
}
109
110
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111
112
void
PhysicsList::ConstructProcess
()
113
{
114
// transportation
115
//
116
AddTransportation
();
117
118
// electromagnetic Physics List
119
//
120
fEmPhysicsList->
ConstructProcess
();
121
if
(fMuNuclPhysicsList) fMuNuclPhysicsList->
ConstructProcess
();
122
}
123
124
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
125
126
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
127
{
128
if
(
verboseLevel
>1) {
129
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
130
}
131
132
if
(name == fEmName)
return
;
133
134
if
(name ==
"standard"
&& name != fEmName) {
135
136
fEmName =
name
;
137
delete
fEmPhysicsList;
138
fEmPhysicsList =
new
PhysListEmStandard
(name);
139
140
}
else
if
(name ==
"muNucl"
) {
141
fMuNuclPhysicsList =
new
MuNuclearBuilder
(name);
142
143
}
else
{
144
145
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
146
<<
" is not defined"
147
<<
G4endl
;
148
}
149
}
150
151
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
152
153
void
PhysicsList::SetCuts
()
154
{
155
156
if
(
verboseLevel
>0){
157
G4cout
<<
"PhysicsList::SetCuts:"
;
158
G4cout
<<
"CutLength : "
<<
G4BestUnit
(
defaultCutValue
,
"Length"
) <<
G4endl
;
159
}
160
161
// set cut values for gamma at first and for e- second and next for e+,
162
// because some processes for e+/e- need cut values for gamma
163
SetCutValue
(fCutForGamma,
"gamma"
);
164
SetCutValue
(fCutForElectron,
"e-"
);
165
SetCutValue
(fCutForPositron,
"e+"
);
166
167
if
(
verboseLevel
>0)
DumpCutValuesTable
();
168
}
169
170
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
171
172
#include "
G4Gamma.hh
"
173
#include "
G4Electron.hh
"
174
#include "
G4Positron.hh
"
175
176
void
PhysicsList::SetCutForGamma
(
G4double
cut)
177
{
178
fCutForGamma = cut;
179
SetParticleCuts
(fCutForGamma,
G4Gamma::Gamma
());
180
}
181
182
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
183
184
void
PhysicsList::SetCutForElectron
(
G4double
cut)
185
{
186
fCutForElectron = cut;
187
SetParticleCuts
(fCutForElectron,
G4Electron::Electron
());
188
}
189
190
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
191
192
void
PhysicsList::SetCutForPositron
(
G4double
cut)
193
{
194
fCutForPositron = cut;
195
SetParticleCuts
(fCutForPositron,
G4Positron::Positron
());
196
}
197
198
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
199
Generated on Sat May 25 2013 14:31:57 for Geant4 by
1.8.4