Geant4
10.01.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
//
26
//
27
// $Id: PhysicsList.cc 66892 2013-01-17 10:57:59Z gunter $
28
//
29
//
30
31
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33
34
#include "
PhysicsList.hh
"
35
#include "
G4SystemOfUnits.hh
"
36
37
#include "
G4ProcessManager.hh
"
38
39
#include "
G4BosonConstructor.hh
"
40
#include "
G4LeptonConstructor.hh
"
41
#include "
G4MesonConstructor.hh
"
42
#include "
G4BosonConstructor.hh
"
43
#include "
G4BaryonConstructor.hh
"
44
#include "
G4IonConstructor.hh
"
45
46
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
47
48
PhysicsList::PhysicsList
():
G4VUserPhysicsList
()
49
{
50
defaultCutValue
= 1.0*
mm
;
51
SetVerboseLevel
(1);
52
}
53
54
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
55
56
PhysicsList::~PhysicsList
()
57
{}
58
59
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
60
61
void
PhysicsList::ConstructParticle
()
62
{
63
// In this method, static member functions should be called
64
// for all particles which you want to use.
65
// This ensures that objects of these particle types will be
66
// created in the program.
67
68
G4BosonConstructor
pBosonConstructor;
69
pBosonConstructor.
ConstructParticle
();
70
71
G4LeptonConstructor
pLeptonConstructor;
72
pLeptonConstructor.
ConstructParticle
();
73
74
G4MesonConstructor
pMesonConstructor;
75
pMesonConstructor.
ConstructParticle
();
76
77
G4BaryonConstructor
pBaryonConstructor;
78
pBaryonConstructor.
ConstructParticle
();
79
80
G4IonConstructor
pIonConstructor;
81
pIonConstructor.
ConstructParticle
();
82
}
83
84
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85
86
void
PhysicsList::ConstructProcess
()
87
{
88
AddTransportation
();
89
ConstructEM
();
90
ConstructDecay
();
91
}
92
93
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
94
95
#include "
G4PhysicsListHelper.hh
"
96
97
#include "
G4ComptonScattering.hh
"
98
#include "
G4GammaConversion.hh
"
99
#include "
G4PhotoElectricEffect.hh
"
100
101
#include "
G4eMultipleScattering.hh
"
102
#include "
G4eIonisation.hh
"
103
#include "
G4eBremsstrahlung.hh
"
104
#include "
G4eplusAnnihilation.hh
"
105
106
#include "
G4MuMultipleScattering.hh
"
107
#include "
G4MuIonisation.hh
"
108
#include "
G4MuBremsstrahlung.hh
"
109
#include "
G4MuPairProduction.hh
"
110
111
#include "
G4hMultipleScattering.hh
"
112
#include "
G4hIonisation.hh
"
113
#include "
G4hBremsstrahlung.hh
"
114
#include "
G4hPairProduction.hh
"
115
116
#include "
G4ionIonisation.hh
"
117
118
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119
120
void
PhysicsList::ConstructEM
()
121
{
122
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
123
124
theParticleIterator
->reset();
125
while
( (*
theParticleIterator
)() ){
126
G4ParticleDefinition
* particle =
theParticleIterator
->value();
127
G4String
particleName = particle->
GetParticleName
();
128
129
if
(particleName ==
"gamma"
) {
130
// gamma
131
ph->
RegisterProcess
(
new
G4PhotoElectricEffect
, particle);
132
ph->
RegisterProcess
(
new
G4ComptonScattering
, particle);
133
ph->
RegisterProcess
(
new
G4GammaConversion
, particle);
134
135
}
else
if
(particleName ==
"e-"
) {
136
//electron
137
ph->
RegisterProcess
(
new
G4eMultipleScattering
, particle);
138
ph->
RegisterProcess
(
new
G4eIonisation
, particle);
139
//ph->RegisterProcess(new G4eBremsstrahlung, particle);
140
141
}
else
if
(particleName ==
"e+"
) {
142
//positron
143
ph->
RegisterProcess
(
new
G4eMultipleScattering
, particle);
144
ph->
RegisterProcess
(
new
G4eIonisation
, particle);
145
//ph->RegisterProcess(new G4eBremsstrahlung, particle);
146
ph->
RegisterProcess
(
new
G4eplusAnnihilation
, particle);
147
148
}
else
if
( particleName ==
"mu+"
||
149
particleName ==
"mu-"
) {
150
//muon
151
ph->
RegisterProcess
(
new
G4MuMultipleScattering
, particle);
152
ph->
RegisterProcess
(
new
G4MuIonisation
, particle);
153
ph->
RegisterProcess
(
new
G4MuBremsstrahlung
, particle);
154
ph->
RegisterProcess
(
new
G4MuPairProduction
, particle);
155
156
}
else
if
( particleName ==
"proton"
||
157
particleName ==
"pi-"
||
158
particleName ==
"pi+"
) {
159
//proton
160
ph->
RegisterProcess
(
new
G4hMultipleScattering
, particle);
161
ph->
RegisterProcess
(
new
G4hIonisation
, particle);
162
ph->
RegisterProcess
(
new
G4hBremsstrahlung
, particle);
163
ph->
RegisterProcess
(
new
G4hPairProduction
, particle);
164
165
}
else
if
( particleName ==
"alpha"
||
166
particleName ==
"He3"
) {
167
//alpha
168
ph->
RegisterProcess
(
new
G4hMultipleScattering
, particle);
169
ph->
RegisterProcess
(
new
G4ionIonisation
, particle);
170
171
}
else
if
( particleName ==
"GenericIon"
) {
172
//Ions
173
ph->
RegisterProcess
(
new
G4hMultipleScattering
, particle);
174
ph->
RegisterProcess
(
new
G4ionIonisation
, particle);
175
176
}
else
if
((!particle->
IsShortLived
()) &&
177
(particle->
GetPDGCharge
() != 0.0) &&
178
(particle->
GetParticleName
() !=
"chargedgeantino"
)) {
179
//all others charged particles except geantino
180
ph->
RegisterProcess
(
new
G4hMultipleScattering
, particle);
181
ph->
RegisterProcess
(
new
G4hIonisation
, particle);
182
}
183
}
184
}
185
186
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
187
188
#include "
G4Decay.hh
"
189
190
void
PhysicsList::ConstructDecay
()
191
{
192
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
193
194
// Add Decay Process
195
G4Decay
* theDecayProcess =
new
G4Decay
();
196
theParticleIterator
->reset();
197
while
( (*
theParticleIterator
)() ){
198
G4ParticleDefinition
* particle =
theParticleIterator
->value();
199
if
(theDecayProcess->
IsApplicable
(*particle)) {
200
ph->
RegisterProcess
(theDecayProcess, particle);
201
}
202
}
203
}
204
205
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
206
207
void
PhysicsList::SetCuts
()
208
{
209
if
(
verboseLevel
>0){
210
G4cout
<<
"PhysicsList::SetCuts:"
;
211
G4cout
<<
"CutLength : "
<<
G4BestUnit
(
defaultCutValue
,
"Length"
) <<
G4endl
;
212
}
213
214
// set cut values for gamma at first and for e- second and next for e+,
215
// because some processes for e+/e- need cut values for gamma
216
//
217
SetCutValue
(
defaultCutValue
,
"gamma"
);
218
SetCutValue
(
defaultCutValue
,
"e-"
);
219
SetCutValue
(
defaultCutValue
,
"e+"
);
220
SetCutValue
(
defaultCutValue
,
"proton"
);
221
222
if
(
verboseLevel
>0)
DumpCutValuesTable
();
223
}
224
225
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
226
G4hMultipleScattering.hh
G4eIonisation.hh
PhysicsList::ConstructParticle
void ConstructParticle()
Definition:
PhysicsList.cc:117
G4MesonConstructor.hh
G4VUserPhysicsList::SetCutValue
void SetCutValue(G4double aCut, const G4String &pname)
Definition:
G4VUserPhysicsList.cc:419
G4PhotoElectricEffect
Definition:
G4PhotoElectricEffect.hh:79
G4BaryonConstructor.hh
G4BaryonConstructor
Definition:
G4BaryonConstructor.hh:39
G4ComptonScattering.hh
G4Decay::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
G4Decay.cc:89
G4hBremsstrahlung.hh
G4hIonisation.hh
G4MesonConstructor
Definition:
G4MesonConstructor.hh:39
G4hPairProduction
Definition:
G4hPairProduction.hh:59
G4VUserPhysicsList::defaultCutValue
G4double defaultCutValue
Definition:
G4VUserPhysicsList.hh:361
G4MuPairProduction.hh
G4hPairProduction.hh
G4eMultipleScattering.hh
G4ComptonScattering
Definition:
G4ComptonScattering.hh:71
G4BestUnit
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
Definition:
G4SteppingVerbose.cc:53
G4BaryonConstructor::ConstructParticle
static void ConstructParticle()
Definition:
G4BaryonConstructor.cc:102
G4IonConstructor.hh
G4MuIonisation.hh
G4PhysicsListHelper.hh
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:111
G4MuBremsstrahlung.hh
G4MesonConstructor::ConstructParticle
static void ConstructParticle()
Definition:
G4MesonConstructor.cc:80
G4ParticleDefinition::GetParticleName
const G4String & GetParticleName() const
Definition:
G4ParticleDefinition.hh:159
G4IonConstructor::ConstructParticle
static void ConstructParticle()
Definition:
G4IonConstructor.cc:59
G4VModularPhysicsList::verboseLevel
G4int verboseLevel
Definition:
G4VModularPhysicsList.hh:146
G4ionIonisation.hh
G4VUserPhysicsList::DumpCutValuesTable
void DumpCutValuesTable(G4int flag=1)
Definition:
G4VUserPhysicsList.cc:813
G4cout
G4GLOB_DLL std::ostream G4cout
PhysicsList::ConstructDecay
void ConstructDecay()
Definition:
PhysicsList.cc:190
G4GammaConversion
Definition:
G4GammaConversion.hh:75
G4BosonConstructor::ConstructParticle
static void ConstructParticle()
Definition:
G4BosonConstructor.cc:53
G4LeptonConstructor.hh
G4hBremsstrahlung
Definition:
G4hBremsstrahlung.hh:61
G4GammaConversion.hh
G4MuMultipleScattering
Definition:
G4MuMultipleScattering.hh:61
G4PhysicsListHelper::RegisterProcess
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
Definition:
G4PhysicsListHelper.cc:413
G4Decay
Definition:
G4Decay.hh:63
G4Decay.hh
G4ProcessManager.hh
G4IonConstructor
Definition:
G4IonConstructor.hh:39
G4PhotoElectricEffect.hh
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:379
G4ionIonisation
Definition:
G4ionIonisation.hh:78
PhysicsList::~PhysicsList
~PhysicsList()
Definition:
PhysicsList.cc:65
G4MuBremsstrahlung
Definition:
G4MuBremsstrahlung.hh:78
PhysicsList::SetCuts
void SetCuts()
Definition:
PhysicsList.cc:219
G4LeptonConstructor::ConstructParticle
static void ConstructParticle()
Definition:
G4LeptonConstructor.cc:60
G4MuIonisation
Definition:
G4MuIonisation.hh:85
G4VUserPhysicsList
Definition:
G4VUserPhysicsList.hh:159
G4ParticleDefinition::IsShortLived
G4bool IsShortLived() const
Definition:
G4ParticleDefinition.hh:196
G4MuMultipleScattering.hh
G4eIonisation
Definition:
G4eIonisation.hh:80
G4eplusAnnihilation.hh
G4VUserPhysicsList::AddTransportation
void AddTransportation()
Definition:
G4VUserPhysicsList.cc:955
PhysicsList::PhysicsList
PhysicsList()
Definition:
PhysicsList.cc:43
G4PhysicsListHelper::GetPhysicsListHelper
static G4PhysicsListHelper * GetPhysicsListHelper()
Definition:
G4PhysicsListHelper.cc:89
G4MuPairProduction
Definition:
G4MuPairProduction.hh:74
G4eBremsstrahlung.hh
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4eplusAnnihilation
Definition:
G4eplusAnnihilation.hh:65
G4eMultipleScattering
Definition:
G4eMultipleScattering.hh:60
G4hMultipleScattering
Definition:
G4hMultipleScattering.hh:62
G4PhysicsListHelper
Definition:
G4PhysicsListHelper.hh:50
G4SystemOfUnits.hh
G4BosonConstructor
Definition:
G4BosonConstructor.hh:39
PhysicsList::ConstructProcess
void ConstructProcess()
Definition:
PhysicsList.cc:170
G4ParticleDefinition::GetPDGCharge
G4double GetPDGCharge() const
Definition:
G4ParticleDefinition.hh:163
PhysicsList.hh
mm
static const double mm
Definition:
G4SIunits.hh:102
G4BosonConstructor.hh
PhysicsList::ConstructEM
void ConstructEM()
Definition:
PhysicsList.cc:120
G4hIonisation
Definition:
G4hIonisation.hh:85
theParticleIterator
#define theParticleIterator
Definition:
G4VUserPhysicsList.hh:153
G4LeptonConstructor
Definition:
G4LeptonConstructor.hh:39
G4String
Definition:
G4String.hh:45
geant4.10.01.p02
environments
g4py
site-modules
physics_lists
ExN03pl
PhysicsList.cc
Generated on Wed Dec 30 2015 22:34:57 for Geant4 by
1.8.8