ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
pyG4VUserPhysicsList.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file pyG4VUserPhysicsList.cc
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
// pyG4VUserPhysicsList.cc
28
//
29
// 2005 Q
30
// ====================================================================
31
#include <boost/python.hpp>
32
#include "
G4VUserPhysicsList.hh
"
33
34
using namespace
boost::python;
35
36
// ====================================================================
37
// thin wrappers
38
// ====================================================================
39
namespace
pyG4VUserPhysicsList {
40
41
struct
CB_G4VUserPhysicsList
:
42
G4VUserPhysicsList
, wrapper<G4VUserPhysicsList> {
43
44
void
ConstructParticle
() {
45
get_override(
"ConstructParticle"
)();
46
}
47
48
void
ConstructProcess
() {
49
get_override(
"ConstructProcess"
)();
50
}
51
52
void
SetCuts
() {
53
get_override(
"SetCuts"
)();
54
}
55
};
56
57
// SetCutValue
58
void
(
G4VUserPhysicsList
::*
f1_SetCutValue
)(
G4double
,
const
G4String
&)
59
= &
G4VUserPhysicsList::SetCutValue
;
60
void
(
G4VUserPhysicsList
::*
f2_SetCutValue
)(
G4double
,
const
G4String
&,
61
const
G4String
&)
62
= &
G4VUserPhysicsList::SetCutValue
;
63
64
// SetParticleCuts
65
void
(
G4VUserPhysicsList
::*
f1_SetParticleCuts
)(
G4double
,
66
G4ParticleDefinition
*,
67
G4Region
*)
68
= &
G4VUserPhysicsList::SetParticleCuts
;
69
void
(
G4VUserPhysicsList
::*
f2_SetParticleCuts
)(
G4double
,
70
G4ParticleDefinition
*,
71
G4Region
*)
72
= &
G4VUserPhysicsList::SetParticleCuts
;
73
74
// StorePhysicsTable
75
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS
(f_StorePhysicsTable,
76
StorePhysicsTable, 0, 1)
77
// SetParticleCuts
78
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS
(f_SetParticleCuts,
79
SetParticleCuts
, 2, 3)
80
81
}
82
83
using namespace pyG4VUserPhysicsList;
84
85
// ====================================================================
86
// module definition
87
// ====================================================================
88
void
export_G4VUserPhysicsList
()
89
{
90
class_<CB_G4VUserPhysicsList, CB_G4VUserPhysicsList*, boost::noncopyable>
91
(
"G4VUserPhysicsList"
,
"base class of user physics list"
)
92
// ---
93
.def(
"ConstructParticle"
,
94
pure_virtual(&
G4VUserPhysicsList::ConstructParticle
))
95
.def(
"ConstructProcess"
,
96
pure_virtual(&
G4VUserPhysicsList::ConstructProcess
))
97
.def(
"SetCuts"
,
98
pure_virtual(&
G4VUserPhysicsList::SetCuts
))
99
// ---
100
.def(
"SetDefaultCutValue"
, &
G4VUserPhysicsList::SetDefaultCutValue
)
101
.def(
"GetDefaultCutValue"
, &
G4VUserPhysicsList::GetDefaultCutValue
)
102
// ---
103
.def(
"StorePhysicsTable"
, &
G4VUserPhysicsList::StorePhysicsTable
,
104
f_StorePhysicsTable())
105
.def(
"IsPhysicsTableRetrieved"
,
106
&
G4VUserPhysicsList::IsPhysicsTableRetrieved
)
107
.def(
"IsStoredInAscii"
, &
G4VUserPhysicsList::IsStoredInAscii
)
108
.def(
"GetPhysicsTableDirectory"
,
109
&
G4VUserPhysicsList::GetPhysicsTableDirectory
,
110
return_value_policy<return_by_value>())
111
.def(
"SetStoredInAscii"
, &
G4VUserPhysicsList::SetStoredInAscii
)
112
.def(
"ResetStoredInAscii"
, &
G4VUserPhysicsList::ResetStoredInAscii
)
113
// ---
114
.def(
"DumpList"
, &
G4VUserPhysicsList::DumpList
)
115
116
.def(
"DumpCutValuesTable"
, &
G4VUserPhysicsList::DumpCutValuesTable
)
117
.def(
"DumpCutValuesTableIfRequested"
,
118
&
G4VUserPhysicsList::DumpCutValuesTableIfRequested
)
119
.def(
"SetCutValue"
,
f1_SetCutValue
)
120
.def(
"SetCutValue"
,
f2_SetCutValue
)
121
.def(
"SetParticleCuts"
,
f1_SetParticleCuts
, f_SetParticleCuts())
122
.def(
"SetParticleCuts"
,
f2_SetParticleCuts
, f_SetParticleCuts())
123
// ---
124
.def(
"SetVerboseLevel"
, &
G4VUserPhysicsList::SetVerboseLevel
)
125
.def(
"GetVerboseLevel"
, &
G4VUserPhysicsList::GetVerboseLevel
)
126
.def(
"SetCutsWithDefault"
, &
G4VUserPhysicsList::SetCutsWithDefault
)
127
.def(
"SetCutsForRegion"
, &
G4VUserPhysicsList::SetCutsForRegion
)
128
.def(
"GetApplyCuts"
, &
G4VUserPhysicsList::GetApplyCuts
)
129
;
130
131
// Note that exposed items are limited,
132
// because this class object is mainly for internal uses or obsolete.
133
// Construct
134
// BuildPhysicsTable
135
// PreparePhysicsTable
136
// SetPhysicsTableRetrieved
137
// ReSetPhysicsTableRetrieved
138
// SetApplyCuts
139
// DumpCutValues (obsolete)
140
// ResetCuts;
141
}
geant4
tree
geant4-10.6-release
environments
g4py
source
run
pyG4VUserPhysicsList.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:53
using
1.8.2 with
ECCE GitHub integration