Geant4
10.01.p02
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 76884 2013-11-18 12:54:03Z gcosmo $
27
// ====================================================================
28
// pyPhysicsLists.cc
29
//
30
// 2007 Q
31
// ====================================================================
32
#include <boost/python.hpp>
33
#include <vector>
34
#include <algorithm>
35
#include "
FTF_BIC.hh
"
36
#include "
FTFP_BERT.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 "
LBE.hh
"
42
#include "
QBBC.hh
"
43
#include "
QGS_BIC.hh
"
44
#include "
QGSP_BERT.hh
"
45
#include "
QGSP_BERT_HP.hh
"
46
#include "
QGSP_BIC.hh
"
47
#include "
QGSP_BIC_HP.hh
"
48
#include "
QGSP_FTFP_BERT.hh
"
49
#include "
QGSP_INCLXX.hh
"
50
#include "
QGSP_INCLXX_HP.hh
"
51
#include "
Shielding.hh
"
52
53
// macro for adding physics lists
54
#define ADD_PHYSICS_LIST(plname) \
55
class_<plname, plname*, bases<G4VUserPhysicsList>, boost::noncopyable> \
56
(#plname, #plname " physics list") \
57
; \
58
AddPhysicsList(#plname);
59
60
using namespace
boost::python
;
61
62
// ====================================================================
63
// thin wrappers
64
// ====================================================================
65
namespace
pyPhysicsLists
{
66
67
static
std::vector<std::string>
plList
;
68
69
void
AddPhysicsList
(
const
G4String
& plname) {
70
plList.push_back(plname);
71
}
72
73
void
ListPhysicsList
() {
74
for
(
G4int
i=0; i< plList.size(); i++) {
75
G4cout
<< plList[i] <<
G4endl
;
76
}
77
}
78
79
}
80
81
using namespace
pyPhysicsLists
;
82
83
// ====================================================================
84
// module definition
85
// ====================================================================
86
void
export_PhysicsLists
()
87
{
88
def(
"ListPhysicsList"
,
ListPhysicsList
);
89
90
ADD_PHYSICS_LIST
(
FTF_BIC
);
91
ADD_PHYSICS_LIST
(
FTFP_BERT
);
92
ADD_PHYSICS_LIST
(
FTFP_BERT_HP
);
93
ADD_PHYSICS_LIST
(
FTFP_BERT_TRV
);
94
ADD_PHYSICS_LIST
(
FTFP_INCLXX
);
95
ADD_PHYSICS_LIST
(
FTFP_INCLXX_HP
);
96
ADD_PHYSICS_LIST
(
LBE
);
97
ADD_PHYSICS_LIST
(
QBBC
);
98
ADD_PHYSICS_LIST
(
QGS_BIC
);
99
ADD_PHYSICS_LIST
(
QGSP_BERT
);
100
ADD_PHYSICS_LIST
(
QGSP_BERT_HP
);
101
ADD_PHYSICS_LIST
(
QGSP_BIC
);
102
ADD_PHYSICS_LIST
(
QGSP_BIC_HP
);
103
ADD_PHYSICS_LIST
(
QGSP_FTFP_BERT
);
104
ADD_PHYSICS_LIST
(
QGSP_INCLXX
);
105
ADD_PHYSICS_LIST
(
QGSP_INCLXX_HP
);
106
ADD_PHYSICS_LIST
(
Shielding
);
107
108
// sort PL vector
109
std::sort(
plList
.begin(),
plList
.end());
110
}
QGSP_BIC_HP.hh
TQGSP_BIC_HP
Definition:
QGSP_BIC_HP.hh:49
QGSP_INCLXX.hh
pyPhysicsLists
Definition:
pyPhysicsLists.cc:65
FTFP_BERT_HP.hh
TQGSP_BERT_HP
Definition:
QGSP_BERT_HP.hh:48
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:67
QGSP_BERT.hh
QGSP_BERT_HP.hh
export_PhysicsLists
void export_PhysicsLists()
Definition:
pyPhysicsLists.cc:86
FTFP_INCLXX.hh
ADD_PHYSICS_LIST
#define ADD_PHYSICS_LIST(plname)
Definition:
pyPhysicsLists.cc:54
G4endl
#define G4endl
Definition:
G4ios.hh:61
pyPhysicsLists::ListPhysicsList
void ListPhysicsList()
Definition:
pyPhysicsLists.cc:73
python
TQGSP_FTFP_BERT
Definition:
QGSP_FTFP_BERT.hh:48
TLBE
Definition:
LBE.hh:61
QBBC
Definition:
QBBC.hh:44
pyPhysicsLists::AddPhysicsList
void AddPhysicsList(const G4String &plname)
Definition:
pyPhysicsLists.cc:69
TQGS_BIC
Definition:
QGS_BIC.hh:49
LBE.hh
G4String
Definition:
G4String.hh:45
geant4.10.01.p02
environments
g4py
source
physics_lists
pyPhysicsLists.cc
Generated on Wed Dec 30 2015 22:35:08 for Geant4 by
1.8.8