Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 76884 2013-11-18 12:54:03Z gcosmo $
27 // ====================================================================
28 // pyG4VUserPhysicsList.cc
29 //
30 // 2005 Q
31 // ====================================================================
32 #include <boost/python.hpp>
33 #include "G4VUserPhysicsList.hh"
34 
35 using namespace boost::python;
36 
37 // ====================================================================
38 // thin wrappers
39 // ====================================================================
40 namespace pyG4VUserPhysicsList {
41 
43  G4VUserPhysicsList, wrapper<G4VUserPhysicsList> {
44 
46  get_override("ConstructParticle")();
47  }
48 
50  get_override("ConstructProcess")();
51  }
52 
53  void SetCuts() {
54  get_override("SetCuts")();
55  }
56 };
57 
58 // SetCutValue
62  const G4String&)
64 
65 // SetParticleCuts
68  G4Region*)
72  G4Region*)
74 
75 // StorePhysicsTable
76 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_StorePhysicsTable,
77  StorePhysicsTable, 0, 1)
78 // SetParticleCuts
81 
82 }
83 
84 using namespace pyG4VUserPhysicsList;
85 
86 // ====================================================================
87 // module definition
88 // ====================================================================
90 {
91  class_<CB_G4VUserPhysicsList, CB_G4VUserPhysicsList*, boost::noncopyable>
92  ("G4VUserPhysicsList", "base class of user physics list")
93  // ---
94  .def("ConstructParticle",
96  .def("ConstructProcess",
98  .def("SetCuts",
99  pure_virtual(&G4VUserPhysicsList::SetCuts))
100  // ---
101  .def("SetDefaultCutValue", &G4VUserPhysicsList::SetDefaultCutValue)
102  .def("GetDefaultCutValue", &G4VUserPhysicsList::GetDefaultCutValue)
103  // ---
104  .def("StorePhysicsTable", &G4VUserPhysicsList::StorePhysicsTable,
105  f_StorePhysicsTable())
106  .def("IsPhysicsTableRetrieved",
108  .def("IsStoredInAscii", &G4VUserPhysicsList::IsStoredInAscii)
109  .def("GetPhysicsTableDirectory",
111  return_value_policy<return_by_value>())
112  .def("SetStoredInAscii", &G4VUserPhysicsList::SetStoredInAscii)
113  .def("ResetStoredInAscii", &G4VUserPhysicsList::ResetStoredInAscii)
114  // ---
115  .def("DumpList", &G4VUserPhysicsList::DumpList)
116 
117  .def("DumpCutValuesTable", &G4VUserPhysicsList::DumpCutValuesTable)
118  .def("DumpCutValuesTableIfRequested",
120  .def("SetCutValue", f1_SetCutValue)
121  .def("SetCutValue", f2_SetCutValue)
122  .def("SetParticleCuts", f1_SetParticleCuts, f_SetParticleCuts())
123  .def("SetParticleCuts", f2_SetParticleCuts, f_SetParticleCuts())
124  // ---
125  .def("SetVerboseLevel", &G4VUserPhysicsList::SetVerboseLevel)
126  .def("GetVerboseLevel", &G4VUserPhysicsList::GetVerboseLevel)
127  .def("SetCutsWithDefault", &G4VUserPhysicsList::SetCutsWithDefault)
128  .def("SetCutsForRegion", &G4VUserPhysicsList::SetCutsForRegion)
129  .def("GetApplyCuts", &G4VUserPhysicsList::GetApplyCuts)
130  ;
131 
132  // Note that exposed items are limited,
133  // because this class object is mainly for internal uses or obsolete.
134  // Construct
135  // BuildPhysicsTable
136  // PreparePhysicsTable
137  // SetPhysicsTableRetrieved
138  // ReSetPhysicsTableRetrieved
139  // SetApplyCuts
140  // DumpCutValues (obsolete)
141  // ResetCuts;
142 }
void SetDefaultCutValue(G4double newCutValue)
void SetCutValue(G4double aCut, const G4String &pname)
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateTubeVolume, CreateTubeVolume, 4, 6) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateConeVolume
const G4String & GetPhysicsTableDirectory() const
void export_G4VUserPhysicsList()
void(G4VUserPhysicsList::* f2_SetCutValue)(G4double, const G4String &, const G4String &)
void(G4VUserPhysicsList::* f1_SetParticleCuts)(G4double, G4ParticleDefinition *, G4Region *)
G4bool GetApplyCuts(const G4String &name) const
void SetCutsForRegion(G4double aCut, const G4String &rname)
G4int GetVerboseLevel() const
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
void DumpCutValuesTable(G4int flag=1)
G4double GetDefaultCutValue() const
void(G4VUserPhysicsList::* f1_SetCutValue)(G4double, const G4String &)
void SetVerboseLevel(G4int value)
G4bool IsPhysicsTableRetrieved() const
G4bool StorePhysicsTable(const G4String &directory=".")
G4bool IsStoredInAscii() const
void(G4VUserPhysicsList::* f2_SetParticleCuts)(G4double, G4ParticleDefinition *, G4Region *)
virtual void ConstructParticle()=0
double G4double
Definition: G4Types.hh:76
virtual void ConstructProcess()=0
typedef void(XMLCALL *XML_ElementDeclHandler)(void *userData