Geant4-11
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// ====================================================================
27// pyG4VUserPhysicsList.cc
28//
29// 2005 Q
30// ====================================================================
31#include <boost/python.hpp>
32#include "G4VUserPhysicsList.hh"
33
34using namespace boost::python;
35
36// ====================================================================
37// thin wrappers
38// ====================================================================
40
42 G4VUserPhysicsList, wrapper<G4VUserPhysicsList> {
43
45 get_override("ConstructParticle")();
46 }
47
49 get_override("ConstructProcess")();
50 }
51
52 void SetCuts() {
53 get_override("SetCuts")();
54 }
55};
56
57// SetCutValue
61 const G4String&)
63
64// SetParticleCuts
67 G4Region*)
71 G4Region*)
73
74// StorePhysicsTable
76 StorePhysicsTable, 0, 1)
77// SetParticleCuts
80
81}
82
83using namespace pyG4VUserPhysicsList;
84
85// ====================================================================
86// module definition
87// ====================================================================
89{
90 class_<CB_G4VUserPhysicsList, CB_G4VUserPhysicsList*, boost::noncopyable>
91 ("G4VUserPhysicsList", "base class of user physics list")
92 // ---
93 .def("ConstructParticle",
95 .def("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",
107 .def("IsStoredInAscii", &G4VUserPhysicsList::IsStoredInAscii)
108 .def("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",
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}
double G4double
Definition: G4Types.hh:83
void SetDefaultCutValue(G4double newCutValue)
virtual void ConstructProcess()=0
void SetCutValue(G4double aCut, const G4String &pname)
G4bool IsStoredInAscii() const
void SetCutsForRegion(G4double aCut, const G4String &rname)
virtual void ConstructParticle()=0
G4bool StorePhysicsTable(const G4String &directory=".")
void SetVerboseLevel(G4int value)
G4int GetVerboseLevel() const
const G4String & GetPhysicsTableDirectory() const
G4bool IsPhysicsTableRetrieved() const
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=nullptr)
void DumpCutValuesTable(G4int flag=1)
G4bool GetApplyCuts(const G4String &name) const
G4double GetDefaultCutValue() const
void(G4VUserPhysicsList::* f1_SetCutValue)(G4double, const G4String &)
void(G4VUserPhysicsList::* f2_SetParticleCuts)(G4double, G4ParticleDefinition *, G4Region *)
void(G4VUserPhysicsList::* f1_SetParticleCuts)(G4double, G4ParticleDefinition *, G4Region *)
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_StorePhysicsTable, StorePhysicsTable, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_SetParticleCuts
void(G4VUserPhysicsList::* f2_SetCutValue)(G4double, const G4String &, const G4String &)
void export_G4VUserPhysicsList()