Geant4
10.02
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 86418 2014-11-11 10:39:38Z gcosmo $
31
//
32
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34
35
#include "PhysicsList.hh"
36
#include "PhysicsListMessenger.hh"
37
38
#include "
G4EmStandardPhysics.hh
"
39
#include "
PhysListEmPolarized.hh
"
40
41
#include "
G4EmParameters.hh
"
42
#include "
G4UnitsTable.hh
"
43
#include "
G4SystemOfUnits.hh
"
44
45
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46
47
PhysicsList::PhysicsList
()
48
:
G4VModularPhysicsList
()
49
{
50
pMessenger
=
new
PhysicsListMessenger
(
this
);
51
52
G4EmParameters::Instance
();
53
54
SetVerboseLevel
(1);
55
56
emName
=
"polarized"
;
57
emPhysicsList
=
new
PhysListEmPolarized
();
58
59
}
60
61
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
62
63
PhysicsList::~PhysicsList
()
64
{
65
delete
pMessenger
;
66
}
67
68
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
69
70
// Bosons
71
#include "
G4Gamma.hh
"
72
73
// leptons
74
#include "
G4Electron.hh
"
75
#include "
G4Positron.hh
"
76
77
78
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79
80
void
PhysicsList::ConstructParticle
()
81
{
82
G4Gamma::GammaDefinition
();
83
G4Electron::ElectronDefinition
();
84
G4Positron::PositronDefinition
();
85
}
86
87
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
88
89
#include "
G4EmProcessOptions.hh
"
90
91
void
PhysicsList::ConstructProcess
()
92
{
93
// Transportation
94
//
95
AddTransportation
();
96
97
// Electromagnetic physics list
98
//
99
emPhysicsList
->
ConstructProcess
();
100
101
// step limitation (as a full process)
102
//
103
AddStepMax
();
104
}
105
106
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
107
108
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
109
{
110
if
(
verboseLevel
>0) {
111
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
112
}
113
114
if
(name ==
emName
)
return
;
115
116
if
(name ==
"standard"
) {
117
118
emName
=
name
;
119
delete
emPhysicsList
;
120
emPhysicsList
=
new
G4EmStandardPhysics
();
121
122
}
else
if
(name ==
"polarized"
) {
123
124
emName
=
name
;
125
delete
emPhysicsList
;
126
emPhysicsList
=
new
PhysListEmPolarized
();
127
128
}
else
{
129
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
130
<<
" is not defined"
131
<<
G4endl
;
132
}
133
}
134
135
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
136
137
#include "
G4ProcessManager.hh
"
138
#include "StepMax.hh"
139
140
void
PhysicsList::AddStepMax
()
141
{
142
// Step limitation seen as a process
143
StepMax
* stepMaxProcess =
new
StepMax
();
144
145
theParticleIterator
->reset();
146
while
((*
theParticleIterator
)()){
147
G4ParticleDefinition
* particle =
theParticleIterator
->value();
148
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
149
150
if
(stepMaxProcess->
IsApplicable
(*particle) && pmanager)
151
pmanager ->AddDiscreteProcess(stepMaxProcess);
152
}
153
}
154
155
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4Electron::ElectronDefinition
static G4Electron * ElectronDefinition()
Definition:
G4Electron.cc:89
PhysicsList::ConstructParticle
void ConstructParticle()
Definition:
PhysicsList.cc:117
PhysicsList::emPhysicsList
G4VPhysicsConstructor * emPhysicsList
Definition:
PhysicsList.hh:68
name
G4String name
Definition:
TRTMaterials.hh:40
G4UnitsTable.hh
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:111
G4EmStandardPhysics.hh
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
PhysicsList::AddPhysicsList
void AddPhysicsList(const G4String &name)
Definition:
PhysicsList.cc:191
G4VModularPhysicsList::verboseLevel
G4int verboseLevel
Definition:
G4VModularPhysicsList.hh:146
StepMax
Definition:
StepMax.hh:46
G4cout
G4GLOB_DLL std::ostream G4cout
G4Positron.hh
G4ProcessManager.hh
G4EmParameters.hh
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:379
PhysicsList::~PhysicsList
~PhysicsList()
Definition:
PhysicsList.cc:65
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
G4Electron.hh
G4VUserPhysicsList::AddTransportation
void AddTransportation()
Definition:
G4VUserPhysicsList.cc:956
PhysListEmPolarized.hh
Definition of the PhysListEmPolarized class.
PhysicsList::PhysicsList
PhysicsList()
Definition:
PhysicsList.cc:43
PhysicsList::pMessenger
PhysicsListMessenger * pMessenger
Definition:
PhysicsList.hh:71
G4EmParameters::Instance
static G4EmParameters * Instance()
Definition:
G4EmParameters.cc:59
StepMax::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
StepMax.cc:51
G4VPhysicsConstructor::ConstructProcess
virtual void ConstructProcess()=0
PhysListEmPolarized
Definition:
PhysListEmPolarized.hh:43
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4ProcessManager
Definition:
G4ProcessManager.hh:106
G4SystemOfUnits.hh
PhysicsList::ConstructProcess
void ConstructProcess()
Definition:
PhysicsList.cc:170
G4EmProcessOptions.hh
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
G4EmStandardPhysics
Definition:
G4EmStandardPhysics.hh:52
geant4.10.02
examples
extended
polarisation
Pol01
src
PhysicsList.cc
Generated on Thu Dec 31 2015 10:42:47 for Geant4 by
1.8.8