Geant4-11
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
w
y
Enumerations
a
b
c
d
e
f
g
l
m
p
r
s
t
v
y
z
Enumerator
a
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
:
a
b
c
d
g
h
i
o
q
r
s
t
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
z
Enumerations
b
c
d
e
f
g
i
j
l
m
n
p
r
s
t
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
environments
g4py
source
physics_lists
pyPhysicsLists.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
// pyPhysicsLists.cc
28
//
29
// 2007 Q
30
// ====================================================================
31
#include <boost/python.hpp>
32
#include <vector>
33
#include <algorithm>
34
#include "
FTFP_BERT.hh
"
35
#include "
FTFP_BERT_ATL.hh
"
36
#include "
FTFP_BERT_HP.hh
"
37
#include "
FTFP_BERT_TRV.hh
"
38
#include "
FTFP_INCLXX.hh
"
39
#include "
FTFP_INCLXX_HP.hh
"
40
#include "
FTF_BIC.hh
"
41
#include "
LBE.hh
"
42
#include "
NuBeam.hh
"
43
#include "
QBBC.hh
"
44
#include "
QGSP_BERT.hh
"
45
#include "
QGSP_BERT_HP.hh
"
46
#include "
QGSP_BIC.hh
"
47
#include "
QGSP_BIC_AllHP.hh
"
48
#include "
QGSP_BIC_HP.hh
"
49
#include "
QGSP_FTFP_BERT.hh
"
50
#include "
QGSP_INCLXX.hh
"
51
#include "
QGSP_INCLXX_HP.hh
"
52
#include "
QGS_BIC.hh
"
53
#include "
Shielding.hh
"
54
55
56
// macro for adding physics lists
57
#define ADD_PHYSICS_LIST(plname) \
58
class_<plname, plname*, bases<G4VUserPhysicsList>, boost::noncopyable> \
59
(#plname, #plname " physics list"
) \
60
; \
61
AddPhysicsList(#plname);
62
63
using namespace
boost::python;
64
65
// ====================================================================
66
// thin wrappers
67
// ====================================================================
68
namespace
pyPhysicsLists
{
69
70
static
std::vector<std::string>
plList
;
71
72
void
AddPhysicsList
(
const
G4String
& plname) {
73
plList
.push_back(plname);
74
}
75
76
void
ListPhysicsList
() {
77
for
(
const
auto
& p :
plList
) {
78
G4cout
<< p <<
G4endl
;
79
}
80
}
81
82
}
83
84
using namespace
pyPhysicsLists
;
85
86
// ====================================================================
87
// module definition
88
// ====================================================================
89
void
export_PhysicsLists
()
90
{
91
def(
"ListPhysicsList"
,
ListPhysicsList
);
92
93
ADD_PHYSICS_LIST
(
FTFP_BERT
);
94
ADD_PHYSICS_LIST
(
FTFP_BERT_ATL
);
95
ADD_PHYSICS_LIST
(
FTFP_BERT_HP
);
96
ADD_PHYSICS_LIST
(
FTFP_BERT_TRV
);
97
ADD_PHYSICS_LIST
(
FTFP_INCLXX
);
98
ADD_PHYSICS_LIST
(
FTFP_INCLXX_HP
);
99
ADD_PHYSICS_LIST
(
FTF_BIC
);
100
ADD_PHYSICS_LIST
(
LBE
);
101
ADD_PHYSICS_LIST
(
NuBeam
);
102
ADD_PHYSICS_LIST
(
QBBC
);
103
ADD_PHYSICS_LIST
(
QGSP_BERT
);
104
ADD_PHYSICS_LIST
(
QGSP_BERT_HP
);
105
ADD_PHYSICS_LIST
(
QGSP_BIC
);
106
ADD_PHYSICS_LIST
(
QGSP_BIC_AllHP
);
107
ADD_PHYSICS_LIST
(
QGSP_BIC_HP
);
108
ADD_PHYSICS_LIST
(
QGSP_FTFP_BERT
);
109
ADD_PHYSICS_LIST
(
QGSP_INCLXX
);
110
ADD_PHYSICS_LIST
(
QGSP_INCLXX_HP
);
111
ADD_PHYSICS_LIST
(
QGS_BIC
);
112
ADD_PHYSICS_LIST
(
Shielding
);
113
114
// sort PL vector
115
std::sort(
plList
.begin(),
plList
.end());
116
}
FTFP_BERT.hh
FTFP_BERT_ATL.hh
FTFP_BERT_HP.hh
FTFP_BERT_TRV.hh
FTFP_INCLXX.hh
FTFP_INCLXX_HP.hh
FTF_BIC.hh
G4endl
#define G4endl
Definition:
G4ios.hh:57
G4cout
G4GLOB_DLL std::ostream G4cout
LBE.hh
NuBeam.hh
QBBC.hh
QGSP_BERT.hh
QGSP_BERT_HP.hh
QGSP_BIC.hh
QGSP_BIC_AllHP.hh
QGSP_BIC_HP.hh
QGSP_FTFP_BERT.hh
QGSP_INCLXX.hh
QGSP_INCLXX_HP.hh
QGS_BIC.hh
Shielding.hh
FTFP_BERT_ATL
Definition:
FTFP_BERT_ATL.hh:48
FTFP_BERT_HP
Definition:
FTFP_BERT_HP.hh:49
FTFP_BERT_TRV
Definition:
FTFP_BERT_TRV.hh:48
FTFP_BERT
Definition:
FTFP_BERT.hh:47
FTF_BIC
Definition:
FTF_BIC.hh:47
G4String
Definition:
G4String.hh:62
LBE
Definition:
LBE.hh:59
NuBeam
Definition:
NuBeam.hh:42
QBBC
Definition:
QBBC.hh:44
QGSP_BERT_HP
Definition:
QGSP_BERT_HP.hh:45
QGSP_BERT
Definition:
QGSP_BERT.hh:44
QGSP_BIC_AllHP
Definition:
QGSP_BIC_AllHP.hh:43
QGSP_BIC_HP
Definition:
QGSP_BIC_HP.hh:45
QGSP_BIC
Definition:
QGSP_BIC.hh:44
QGSP_FTFP_BERT
Definition:
QGSP_FTFP_BERT.hh:44
QGS_BIC
Definition:
QGS_BIC.hh:46
Shielding
Definition:
Shielding.hh:47
TINCLXXPhysicsListHelper
Definition:
INCLXXPhysicsListHelper.hh:82
pyPhysicsLists
Definition:
pyPhysicsLists.cc:68
pyPhysicsLists::ListPhysicsList
void ListPhysicsList()
Definition:
pyPhysicsLists.cc:76
pyPhysicsLists::plList
static std::vector< std::string > plList
Definition:
pyPhysicsLists.cc:70
pyPhysicsLists::AddPhysicsList
void AddPhysicsList(const G4String &plname)
Definition:
pyPhysicsLists.cc:72
export_PhysicsLists
void export_PhysicsLists()
Definition:
pyPhysicsLists.cc:89
ADD_PHYSICS_LIST
#define ADD_PHYSICS_LIST(plname)
Definition:
pyPhysicsLists.cc:57
Generated by
1.9.3