Geant4
10.03
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
// $Id: pyPhysicsLists.cc 101514 2016-11-18 15:30:57Z gcosmo $
27
// ====================================================================
28
// pyPhysicsLists.cc
29
//
30
// 2007 Q
31
// ====================================================================
32
#include <boost/python.hpp>
33
#include <vector>
34
#include <algorithm>
35
#include "
FTFP_BERT.hh
"
36
#include "
FTFP_BERT_ATL.hh
"
37
#include "
FTFP_BERT_HP.hh
"
38
#include "
FTFP_BERT_TRV.hh
"
39
#include "
FTFP_INCLXX.hh
"
40
#include "
FTFP_INCLXX_HP.hh
"
41
#include "
FTF_BIC.hh
"
42
#include "
LBE.hh
"
43
#include "
NuBeam.hh
"
44
#include "
QBBC.hh
"
45
#include "
QGSP_BERT.hh
"
46
#include "
QGSP_BERT_HP.hh
"
47
#include "
QGSP_BIC.hh
"
48
#include "
QGSP_BIC_AllHP.hh
"
49
#include "
QGSP_BIC_HP.hh
"
50
#include "
QGSP_FTFP_BERT.hh
"
51
#include "
QGSP_INCLXX.hh
"
52
#include "
QGSP_INCLXX_HP.hh
"
53
#include "
QGS_BIC.hh
"
54
#include "
Shielding.hh
"
55
56
57
// macro for adding physics lists
58
#define ADD_PHYSICS_LIST(plname) \
59
class_<plname, plname*, bases<G4VUserPhysicsList>, boost::noncopyable> \
60
(#plname, #plname " physics list") \
61
; \
62
AddPhysicsList(#plname);
63
64
using namespace
boost::python
;
65
66
// ====================================================================
67
// thin wrappers
68
// ====================================================================
69
namespace
pyPhysicsLists
{
70
71
static
std::vector<std::string>
plList
;
72
73
void
AddPhysicsList
(
const
G4String
& plname) {
74
plList.push_back(plname);
75
}
76
77
void
ListPhysicsList
() {
78
for
(
G4int
i=0; i< plList.size(); i++) {
79
G4cout
<< plList[i] <<
G4endl
;
80
}
81
}
82
83
}
84
85
using namespace
pyPhysicsLists
;
86
87
// ====================================================================
88
// module definition
89
// ====================================================================
90
void
export_PhysicsLists
()
91
{
92
def(
"ListPhysicsList"
,
ListPhysicsList
);
93
94
ADD_PHYSICS_LIST
(
FTFP_BERT
);
95
ADD_PHYSICS_LIST
(
FTFP_BERT_ATL
);
96
ADD_PHYSICS_LIST
(
FTFP_BERT_HP
);
97
ADD_PHYSICS_LIST
(
FTFP_BERT_TRV
);
98
ADD_PHYSICS_LIST
(
FTFP_INCLXX
);
99
ADD_PHYSICS_LIST
(
FTFP_INCLXX_HP
);
100
ADD_PHYSICS_LIST
(
FTF_BIC
);
101
ADD_PHYSICS_LIST
(
LBE
);
102
ADD_PHYSICS_LIST
(
NuBeam
);
103
ADD_PHYSICS_LIST
(
QBBC
);
104
ADD_PHYSICS_LIST
(
QGSP_BERT
);
105
ADD_PHYSICS_LIST
(
QGSP_BERT_HP
);
106
ADD_PHYSICS_LIST
(
QGSP_BIC
);
107
ADD_PHYSICS_LIST
(
QGSP_BIC_AllHP
);
108
ADD_PHYSICS_LIST
(
QGSP_BIC_HP
);
109
ADD_PHYSICS_LIST
(
QGSP_FTFP_BERT
);
110
ADD_PHYSICS_LIST
(
QGSP_INCLXX
);
111
ADD_PHYSICS_LIST
(
QGSP_INCLXX_HP
);
112
ADD_PHYSICS_LIST
(
QGS_BIC
);
113
ADD_PHYSICS_LIST
(
Shielding
);
114
115
// sort PL vector
116
std::sort(
plList
.begin(),
plList
.end());
117
}
QGSP_BIC_HP.hh
TQGSP_BIC_AllHP
Definition:
QGSP_BIC_AllHP.hh:44
TQGSP_BIC_HP
Definition:
QGSP_BIC_HP.hh:49
FTFP_BERT_ATL.hh
QGSP_INCLXX.hh
TNuBeam
Definition:
NuBeam.hh:46
pyPhysicsLists
Definition:
pyPhysicsLists.cc:69
FTFP_BERT_HP.hh
TQGSP_BERT_HP
Definition:
QGSP_BERT_HP.hh:48
QGSP_BIC_AllHP.hh
FTFP_BERT_TRV.hh
QGSP_INCLXX_HP.hh
G4int
int G4int
Definition:
G4Types.hh:78
FTFP_INCLXX_HP.hh
QGS_BIC.hh
TShielding
Definition:
Shielding.hh:51
G4cout
G4GLOB_DLL std::ostream G4cout
TFTFP_BERT
Definition:
FTFP_BERT.hh:49
QGSP_BIC.hh
TINCLXXPhysicsListHelper
Definition:
INCLXXPhysicsListHelper.hh:82
FTFP_BERT.hh
TFTF_BIC
Definition:
FTF_BIC.hh:48
TQGSP_BERT
Definition:
QGSP_BERT.hh:48
TFTFP_BERT_HP
Definition:
FTFP_BERT_HP.hh:49
FTF_BIC.hh
Shielding.hh
TFTFP_BERT_TRV
Definition:
FTFP_BERT_TRV.hh:49
QBBC.hh
TQGSP_BIC
Definition:
QGSP_BIC.hh:48
QGSP_FTFP_BERT.hh
pyPhysicsLists::plList
static std::vector< std::string > plList
Definition:
pyPhysicsLists.cc:71
QGSP_BERT.hh
QGSP_BERT_HP.hh
export_PhysicsLists
void export_PhysicsLists()
Definition:
pyPhysicsLists.cc:90
FTFP_INCLXX.hh
ADD_PHYSICS_LIST
#define ADD_PHYSICS_LIST(plname)
Definition:
pyPhysicsLists.cc:58
G4endl
#define G4endl
Definition:
G4ios.hh:61
pyPhysicsLists::ListPhysicsList
void ListPhysicsList()
Definition:
pyPhysicsLists.cc:77
python
TQGSP_FTFP_BERT
Definition:
QGSP_FTFP_BERT.hh:48
TLBE
Definition:
LBE.hh:61
QBBC
Definition:
QBBC.hh:44
NuBeam.hh
TFTFP_BERT_ATL
Definition:
FTFP_BERT_ATL.hh:49
pyPhysicsLists::AddPhysicsList
void AddPhysicsList(const G4String &plname)
Definition:
pyPhysicsLists.cc:73
TQGS_BIC
Definition:
QGS_BIC.hh:49
LBE.hh
G4String
Definition:
G4String.hh:45
geant4.10.03
environments
g4py
source
physics_lists
pyPhysicsLists.cc
Generated on Thu Feb 14 2002 02:27:24 for Geant4 by
1.8.8