Geant4
9.6.p02
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
geant4_9_6_p02
environments
g4py
source
run
pyG4VUserPhysicsList.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: pyG4VUserPhysicsList.cc,v 1.5 2006-06-29 15:35:30 gunter Exp $
27
// $Name: not supported by cvs2svn $
28
// ====================================================================
29
// pyG4VUserPhysicsList.cc
30
//
31
// 2005 Q
32
// ====================================================================
33
#include <boost/python.hpp>
34
#include "
G4VUserPhysicsList.hh
"
35
36
using namespace
boost::python;
37
38
// ====================================================================
39
// thin wrappers
40
// ====================================================================
41
namespace
pyG4VUserPhysicsList {
42
43
struct
CB_G4VUserPhysicsList
:
44
G4VUserPhysicsList
, wrapper<G4VUserPhysicsList> {
45
46
void
ConstructParticle
() {
47
get_override(
"ConstructParticle"
)();
48
}
49
50
void
ConstructProcess
() {
51
get_override(
"ConstructProcess"
)();
52
}
53
54
void
SetCuts
() {
55
get_override(
"SetCuts"
)();
56
}
57
};
58
59
// SetCutValue
60
void
(
G4VUserPhysicsList
::*
f1_SetCutValue
)(
G4double
,
const
G4String
&)
61
= &
G4VUserPhysicsList::SetCutValue
;
62
void
(
G4VUserPhysicsList
::*
f2_SetCutValue
)(
G4double
,
const
G4String
&,
63
const
G4String
&)
64
= &
G4VUserPhysicsList::SetCutValue
;
65
66
// SetParticleCuts
67
void
(
G4VUserPhysicsList
::*
f1_SetParticleCuts
)(
G4double
,
68
G4ParticleDefinition
*,
69
G4Region
*)
70
= &
G4VUserPhysicsList::SetParticleCuts
;
71
void
(
G4VUserPhysicsList
::*
f2_SetParticleCuts
)(
G4double
,
72
G4ParticleDefinition
*,
73
G4Region
*)
74
= &
G4VUserPhysicsList::SetParticleCuts
;
75
76
// StorePhysicsTable
77
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS
(f_StorePhysicsTable,
78
StorePhysicsTable, 0, 1);
79
// SetParticleCuts
80
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS
(f_SetParticleCuts,
81
SetParticleCuts, 2, 3);
82
83
}
84
85
using namespace
pyG4VUserPhysicsList;
86
87
// ====================================================================
88
// module definition
89
// ====================================================================
90
void
export_G4VUserPhysicsList
()
91
{
92
class_<CB_G4VUserPhysicsList, CB_G4VUserPhysicsList*, boost::noncopyable>
93
(
"G4VUserPhysicsList"
,
"base class of user physics list"
)
94
// ---
95
.def(
"ConstructParticle"
,
96
pure_virtual(&
G4VUserPhysicsList::ConstructParticle
))
97
.def(
"ConstructProcess"
,
98
pure_virtual(&
G4VUserPhysicsList::ConstructProcess
))
99
.def(
"SetCuts"
,
100
pure_virtual(&
G4VUserPhysicsList::SetCuts
))
101
// ---
102
.def(
"SetDefaultCutValue"
, &
G4VUserPhysicsList::SetDefaultCutValue
)
103
.def(
"GetDefaultCutValue"
, &
G4VUserPhysicsList::GetDefaultCutValue
)
104
// ---
105
.def(
"StorePhysicsTable"
, &
G4VUserPhysicsList::StorePhysicsTable
,
106
f_StorePhysicsTable())
107
.def(
"IsPhysicsTableRetrieved"
,
108
&
G4VUserPhysicsList::IsPhysicsTableRetrieved
)
109
.def(
"IsStoredInAscii"
, &
G4VUserPhysicsList::IsStoredInAscii
)
110
.def(
"GetPhysicsTableDirectory"
,
111
&
G4VUserPhysicsList::GetPhysicsTableDirectory
,
112
return_value_policy<return_by_value>())
113
.def(
"SetStoredInAscii"
, &
G4VUserPhysicsList::SetStoredInAscii
)
114
.def(
"ResetStoredInAscii"
, &
G4VUserPhysicsList::ResetStoredInAscii
)
115
// ---
116
.def(
"DumpList"
, &
G4VUserPhysicsList::DumpList
)
117
118
.def(
"DumpCutValuesTable"
, &
G4VUserPhysicsList::DumpCutValuesTable
)
119
.def(
"DumpCutValuesTableIfRequested"
,
120
&
G4VUserPhysicsList::DumpCutValuesTableIfRequested
)
121
.def(
"SetCutValue"
,
f1_SetCutValue
)
122
.def(
"SetCutValue"
,
f2_SetCutValue
)
123
.def(
"SetParticleCuts"
,
f1_SetParticleCuts
, f_SetParticleCuts())
124
.def(
"SetParticleCuts"
,
f2_SetParticleCuts
, f_SetParticleCuts())
125
// ---
126
.def(
"SetVerboseLevel"
, &
G4VUserPhysicsList::SetVerboseLevel
)
127
.def(
"GetVerboseLevel"
, &
G4VUserPhysicsList::GetVerboseLevel
)
128
.def(
"SetCutsWithDefault"
, &
G4VUserPhysicsList::SetCutsWithDefault
)
129
.def(
"SetCutsForRegion"
, &
G4VUserPhysicsList::SetCutsForRegion
)
130
.def(
"GetApplyCuts"
, &
G4VUserPhysicsList::GetApplyCuts
)
131
;
132
133
// Note that exposed items are limited,
134
// because this class object is mainly for internal uses or obsolete.
135
// Construct
136
// BuildPhysicsTable
137
// PreparePhysicsTable
138
// SetPhysicsTableRetrieved
139
// ReSetPhysicsTableRetrieved
140
// SetApplyCuts
141
// DumpCutValues (obsolete)
142
// ResetCuts;
143
}
Generated on Sat May 25 2013 14:32:02 for Geant4 by
1.8.4