Geant4
10.03.p03
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
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 100257 2016-10-17 08:00:06Z 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
43
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44
45
PhysicsList::PhysicsList
()
46
:
G4VModularPhysicsList
(),
47
fEmPhysicsList(0), fEmName(
"polarized"
), fMessenger(0)
48
{
49
fMessenger =
new
PhysicsListMessenger
(
this
);
50
51
G4EmParameters::Instance
();
52
53
SetVerboseLevel
(1);
54
55
fEmPhysicsList =
new
PhysListEmPolarized
();
56
57
}
58
59
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
60
61
PhysicsList::~PhysicsList
()
62
{
63
delete
fMessenger;
64
}
65
66
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
67
68
#include "
G4BosonConstructor.hh
"
69
#include "
G4LeptonConstructor.hh
"
70
#include "
G4MesonConstructor.hh
"
71
#include "
G4BosonConstructor.hh
"
72
#include "
G4BaryonConstructor.hh
"
73
#include "
G4IonConstructor.hh
"
74
#include "
G4ShortLivedConstructor.hh
"
75
76
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
77
78
void
PhysicsList::ConstructParticle
()
79
{
80
G4BosonConstructor
pBosonConstructor;
81
pBosonConstructor.
ConstructParticle
();
82
83
G4LeptonConstructor
pLeptonConstructor;
84
pLeptonConstructor.
ConstructParticle
();
85
86
G4MesonConstructor
pMesonConstructor;
87
pMesonConstructor.
ConstructParticle
();
88
89
G4BaryonConstructor
pBaryonConstructor;
90
pBaryonConstructor.
ConstructParticle
();
91
92
G4IonConstructor
pIonConstructor;
93
pIonConstructor.
ConstructParticle
();
94
95
G4ShortLivedConstructor
pShortLivedConstructor;
96
pShortLivedConstructor.
ConstructParticle
();
97
98
}
99
100
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101
102
#include "
G4EmProcessOptions.hh
"
103
104
void
PhysicsList::ConstructProcess
()
105
{
106
// Transportation
107
//
108
AddTransportation
();
109
110
// Electromagnetic physics list
111
//
112
fEmPhysicsList->
ConstructProcess
();
113
114
// step limitation (as a full process)
115
//
116
AddStepMax
();
117
}
118
119
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
120
121
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
122
{
123
if
(
verboseLevel
>0) {
124
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
125
}
126
127
if
(name == fEmName)
return
;
128
129
if
(name ==
"standard"
) {
130
131
fEmName =
name
;
132
delete
fEmPhysicsList;
133
fEmPhysicsList =
new
G4EmStandardPhysics
();
134
135
}
else
if
(name ==
"polarized"
) {
136
137
fEmName =
name
;
138
delete
fEmPhysicsList;
139
fEmPhysicsList =
new
PhysListEmPolarized
();
140
141
}
else
{
142
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
143
<<
" is not defined"
144
<<
G4endl
;
145
}
146
}
147
148
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
149
150
#include "
G4ProcessManager.hh
"
151
#include "StepMax.hh"
152
153
void
PhysicsList::AddStepMax
()
154
{
155
// Step limitation seen as a process
156
StepMax
* stepMaxProcess =
new
StepMax
();
157
158
auto
particleIterator
=
GetParticleIterator
();
159
particleIterator
->reset();
160
while
((*
particleIterator
)()){
161
G4ParticleDefinition
* particle =
particleIterator
->value();
162
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
163
164
if
(stepMaxProcess->
IsApplicable
(*particle) && pmanager)
165
pmanager ->AddDiscreteProcess(stepMaxProcess);
166
}
167
}
168
169
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
name
const XML_Char * name
Definition:
expat.h:151
PhysicsList::ConstructParticle
void ConstructParticle()
Definition:
PhysicsList.cc:117
G4MesonConstructor.hh
G4BaryonConstructor.hh
G4BaryonConstructor
Definition:
G4BaryonConstructor.hh:39
G4MesonConstructor
Definition:
G4MesonConstructor.hh:39
G4BaryonConstructor::ConstructParticle
static void ConstructParticle()
Definition:
G4BaryonConstructor.cc:102
G4IonConstructor.hh
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:72
G4ShortLivedConstructor::ConstructParticle
static void ConstructParticle()
Definition:
G4ShortLivedConstructor.cc:58
G4EmStandardPhysics.hh
G4MesonConstructor::ConstructParticle
static void ConstructParticle()
Definition:
G4MesonConstructor.cc:80
PhysicsList::AddPhysicsList
void AddPhysicsList(const G4String &name)
Definition:
PhysicsList.cc:191
G4IonConstructor::ConstructParticle
static void ConstructParticle()
Definition:
G4IonConstructor.cc:59
G4VModularPhysicsList::verboseLevel
G4int verboseLevel
Definition:
G4VModularPhysicsList.hh:146
StepMax
Definition:
StepMax.hh:46
G4cout
G4GLOB_DLL std::ostream G4cout
G4BosonConstructor::ConstructParticle
static void ConstructParticle()
Definition:
G4BosonConstructor.cc:53
G4LeptonConstructor.hh
G4ProcessManager.hh
G4EmParameters.hh
G4IonConstructor
Definition:
G4IonConstructor.hh:39
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:377
PhysicsList::~PhysicsList
~PhysicsList()
Definition:
PhysicsList.cc:65
G4LeptonConstructor::ConstructParticle
static void ConstructParticle()
Definition:
G4LeptonConstructor.cc:60
G4ShortLivedConstructor.hh
PhysicsList::AddStepMax
void AddStepMax()
Definition:
PhysicsList.cc:172
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
Definition:
G4ParticleDefinition.cc:247
G4VUserPhysicsList::AddTransportation
void AddTransportation()
Definition:
G4VUserPhysicsList.cc:953
PhysListEmPolarized.hh
Definition of the PhysListEmPolarized class.
PhysicsList::PhysicsList
PhysicsList()
Definition:
PhysicsList.cc:43
G4EmParameters::Instance
static G4EmParameters * Instance()
Definition:
G4EmParameters.cc:67
StepMax::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
StepMax.cc:51
G4VPhysicsConstructor::ConstructProcess
virtual void ConstructProcess()=0
particleIterator
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition:
G4BigBanger.cc:65
G4VUserPhysicsList::GetParticleIterator
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
Definition:
G4VUserPhysicsList.cc:972
PhysListEmPolarized
Definition:
PhysListEmPolarized.hh:43
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4ProcessManager
Definition:
G4ProcessManager.hh:106
G4ShortLivedConstructor
Definition:
G4ShortLivedConstructor.hh:39
G4BosonConstructor
Definition:
G4BosonConstructor.hh:39
PhysicsList::ConstructProcess
void ConstructProcess()
Definition:
PhysicsList.cc:170
G4EmProcessOptions.hh
G4BosonConstructor.hh
G4LeptonConstructor
Definition:
G4LeptonConstructor.hh:39
G4VModularPhysicsList
Definition:
G4VModularPhysicsList.hh:90
G4String
Definition:
G4String.hh:45
PhysicsListMessenger
Definition:
PhysicsListMessenger.hh:44
G4EmStandardPhysics
Definition:
G4EmStandardPhysics.hh:52
source
geant4.10.03.p03
examples
extended
polarisation
Pol01
src
PhysicsList.cc
Generated on Tue Nov 28 2017 21:43:41 for Geant4 by
1.8.5