Geant4.10
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4.10.00.p01
examples
extended
medical
fanoCavity
src
examples/extended/medical/fanoCavity/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
//
26
/// \file medical/fanoCavity/src/PhysicsList.cc
27
/// \brief Implementation of the PhysicsList class
28
//
29
// $Id: PhysicsList.cc 68459 2013-03-27 18:45:08Z maire $
30
//
31
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33
34
#include "PhysicsList.hh"
35
#include "PhysicsListMessenger.hh"
36
37
#include "PhysListEmStandard_option0.hh"
38
#include "PhysListEmStandard_option3.hh"
39
#include "PhysListEmStandard_GS.hh"
40
#include "PhysListEmStandard_WVI.hh"
41
#include "PhysListEmStandard_SS.hh"
42
43
#include "StepMax.hh"
44
45
#include "
G4ParticleDefinition.hh
"
46
47
#include "
G4ProcessManager.hh
"
48
#include "
G4LossTableManager.hh
"
49
50
// Bosons
51
#include "
G4ChargedGeantino.hh
"
52
#include "
G4Geantino.hh
"
53
#include "
G4Gamma.hh
"
54
55
// leptons
56
#include "
G4Electron.hh
"
57
#include "
G4Positron.hh
"
58
59
// Hadrons
60
#include "
G4Proton.hh
"
61
62
#include "
G4SystemOfUnits.hh
"
63
64
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65
66
PhysicsList::PhysicsList
(
DetectorConstruction
* det)
67
:
G4VModularPhysicsList
(),
68
fDetector(det),fMessenger(0),fEmName(
" "
),fEmPhysicsList(0)
69
{
70
G4LossTableManager::Instance
();
71
fMessenger =
new
PhysicsListMessenger
(
this
);
72
73
// EM physics
74
fEmName =
G4String
(
"standard_opt3"
);
75
fEmPhysicsList =
new
PhysListEmStandard_option3
(fEmName,fDetector);
76
77
defaultCutValue
= 10*
km
;
78
79
SetVerboseLevel
(1);
80
81
G4LossTableManager::Instance
();
82
}
83
84
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85
86
PhysicsList::~PhysicsList
()
87
{
88
delete
fEmPhysicsList;
89
delete
fMessenger;
90
}
91
92
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93
94
void
PhysicsList::ConstructParticle
()
95
{
96
// pseudo-particles
97
G4Geantino::GeantinoDefinition
();
98
G4ChargedGeantino::ChargedGeantinoDefinition
();
99
100
// gamma
101
G4Gamma::GammaDefinition
();
102
103
// leptons
104
G4Electron::ElectronDefinition
();
105
G4Positron::PositronDefinition
();
106
107
// baryons
108
G4Proton::ProtonDefinition
();
109
}
110
111
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
112
113
void
PhysicsList::ConstructProcess
()
114
{
115
AddTransportation
();
116
fEmPhysicsList->
ConstructProcess
();
117
118
AddStepMax
();
119
}
120
121
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
122
123
void
PhysicsList::AddStepMax
()
124
{
125
// Step limitation seen as a process
126
StepMax
* stepMaxProcess =
new
StepMax
();
127
128
theParticleIterator
->reset();
129
while
((*
theParticleIterator
)()){
130
G4ParticleDefinition
* particle =
theParticleIterator
->value();
131
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
132
133
if
(stepMaxProcess->
IsApplicable
(*particle) && !particle->
IsShortLived
())
134
{
135
pmanager ->
AddDiscreteProcess
(stepMaxProcess);
136
}
137
}
138
}
139
140
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
141
142
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
143
{
144
if
(
verboseLevel
>-1) {
145
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
146
}
147
148
if
(name == fEmName)
return
;
149
150
if
(name ==
"standard_opt0"
) {
151
152
fEmName =
name
;
153
delete
fEmPhysicsList;
154
fEmPhysicsList =
new
PhysListEmStandard_option0
(name,fDetector);
155
156
}
else
if
(name ==
"standard_opt3"
) {
157
158
fEmName =
name
;
159
delete
fEmPhysicsList;
160
fEmPhysicsList =
new
PhysListEmStandard_option3
(name,fDetector);
161
162
}
else
if
(name ==
"standard_GS"
) {
163
164
fEmName =
name
;
165
delete
fEmPhysicsList;
166
fEmPhysicsList =
new
PhysListEmStandard_GS
(name,fDetector);
167
168
}
else
if
(name ==
"standard_WVI"
) {
169
170
fEmName =
name
;
171
delete
fEmPhysicsList;
172
fEmPhysicsList =
new
PhysListEmStandard_WVI
(name,fDetector);
173
174
}
else
if
(name ==
"standard_SS"
) {
175
176
fEmName =
name
;
177
delete
fEmPhysicsList;
178
fEmPhysicsList =
new
PhysListEmStandard_SS
(name,fDetector);
179
}
else
{
180
181
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
182
<<
" is not defined"
183
<<
G4endl
;
184
}
185
}
186
187
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
188
189
#include "
G4UnitsTable.hh
"
190
191
void
PhysicsList::SetCuts
()
192
{
193
if
(
verboseLevel
>0){
194
G4cout
<<
"PhysicsList::SetCuts:"
;
195
G4cout
<<
"CutLength : "
<<
G4BestUnit
(
defaultCutValue
,
"Length"
) <<
G4endl
;
196
}
197
198
// set cut values for gamma at first and for e- second and next for e+,
199
// because some processes for e+/e- need cut values for gamma
200
SetCutValue
(
defaultCutValue
,
"gamma"
);
201
SetCutValue
(
defaultCutValue
,
"e-"
);
202
SetCutValue
(
defaultCutValue
,
"e+"
);
203
SetCutValue
(
defaultCutValue
,
"proton"
);
204
}
205
206
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4Geantino::GeantinoDefinition
static G4Geantino * GeantinoDefinition()
Definition:
G4Geantino.cc:82
G4Electron::ElectronDefinition
static G4Electron * ElectronDefinition()
Definition:
G4Electron.cc:89
PhysicsList::ConstructParticle
void ConstructParticle()
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:117
PhysListEmStandard_option0
Definition:
include/PhysListEmStandard_option0.hh:44
G4LossTableManager::Instance
static G4LossTableManager * Instance()
Definition:
G4LossTableManager.cc:112
G4VUserPhysicsList::SetCutValue
void SetCutValue(G4double aCut, const G4String &pname)
Definition:
G4VUserPhysicsList.cc:419
PhysListEmStandard_option3
Definition:
include/PhysListEmStandard_option3.hh:44
python.hepunit.km
km
Definition:
hepunit.py:58
G4ChargedGeantino.hh
G4VUserPhysicsList::defaultCutValue
G4double defaultCutValue
Definition:
G4VUserPhysicsList.hh:361
G4Proton::ProtonDefinition
static G4Proton * ProtonDefinition()
Definition:
G4Proton.cc:88
G4ProcessManager::AddDiscreteProcess
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4UnitsTable.hh
name
const XML_Char * name
Definition:
include/expat.h:151
G4LossTableManager.hh
G4BestUnit
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
Definition:
G4SteppingVerbose.cc:53
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:111
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
PhysicsList::AddPhysicsList
void AddPhysicsList(const G4String &name)
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:191
G4VModularPhysicsList::verboseLevel
G4int verboseLevel
Definition:
G4VModularPhysicsList.hh:146
StepMax
Definition:
electromagnetic/TestEm1/include/StepMax.hh:46
G4cout
G4GLOB_DLL std::ostream G4cout
G4Proton.hh
G4Positron.hh
G4ProcessManager.hh
G4ParticleDefinition.hh
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:379
PhysicsList::~PhysicsList
~PhysicsList()
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:65
PhysicsList::SetCuts
void SetCuts()
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:219
PhysicsList::AddStepMax
void AddStepMax()
Definition:
examples/advanced/microbeam/src/PhysicsList.cc:172
G4Positron::PositronDefinition
static G4Positron * PositronDefinition()
Definition:
G4Positron.cc:89
G4ParticleDefinition::IsShortLived
G4bool IsShortLived() const
Definition:
G4ParticleDefinition.hh:196
G4Electron.hh
G4VUserPhysicsList::AddTransportation
void AddTransportation()
Definition:
G4VUserPhysicsList.cc:947
PhysicsList::PhysicsList
PhysicsList()
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:43
PhysListEmStandard_SS
Definition:
include/PhysListEmStandard_SS.hh:44
StepMax::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
electromagnetic/TestEm1/src/StepMax.cc:51
G4Geantino.hh
G4VPhysicsConstructor::ConstructProcess
virtual void ConstructProcess()=0
G4ChargedGeantino::ChargedGeantinoDefinition
static G4ChargedGeantino * ChargedGeantinoDefinition()
Definition:
G4ChargedGeantino.cc:82
DetectorConstruction
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/DetectorConstruction.hh:46
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4ProcessManager
Definition:
G4ProcessManager.hh:106
PhysListEmStandard_GS
Definition:
include/PhysListEmStandard_GS.hh:44
G4SystemOfUnits.hh
PhysicsList::ConstructProcess
void ConstructProcess()
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:170
PhysListEmStandard_WVI
Definition:
include/PhysListEmStandard_WVI.hh:44
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:
examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4String.hh:45
PhysicsListMessenger
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsListMessenger.hh:44
Generated on Wed Apr 30 2014 15:55:21 for Geant4.10 by
1.8.7