LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
pyG4Material.cc File Reference
#include <boost/python.hpp>
#include "G4Material.hh"

Go to the source code of this file.

Namespaces

 pyG4Material
 

Functions

list pyG4Material::f_GetFractionVector (const G4Material *material)
 
list pyG4Material::f_GetAtomsVector (const G4Material *material)
 
list pyG4Material::f_GetVecNbOfAtomsPerVolume (const G4Material *material)
 
list pyG4Material::f_GetAtomicNumDensityVector (const G4Material *material)
 
void pyG4Material::Print (G4Material &mat)
 
void export_G4Material ()
 

Variables

void(G4Material::* pyG4Material::f1_AddElement )(G4Element *, G4int) = &G4Material::AddElement
 
void(G4Material::* pyG4Material::f2_AddElement )(G4Element *, G4double) = &G4Material::AddElement
 
G4Material *(* pyG4Material::f1_GetMaterial )(const G4String &, G4bool) = &G4Material::GetMaterial
 
G4Material *(* pyG4Material::f2_GetMaterial )(G4double, G4double, G4double) = &G4Material::GetMaterial
 
G4Material *(* pyG4Material::f3_GetMaterial )(size_t, G4double) = &G4Material::GetMaterial
 

Function Documentation

void export_G4Material ( )

Definition at line 115 of file pyG4Material.cc.

References pyG4Material::f1_AddElement, pyG4Material::f1_GetMaterial, pyG4Material::f2_AddElement, pyG4Material::f2_GetMaterial, pyG4Material::f3_GetMaterial, pyG4Material::f_GetAtomicNumDensityVector(), pyG4Material::f_GetAtomsVector(), pyG4Material::f_GetFractionVector(), pyG4Material::f_GetVecNbOfAtomsPerVolume(), pyG4Material::Print(), and value.

Referenced by BOOST_PYTHON_MODULE().

116 {
117  class_<G4Material, G4Material*, boost::noncopyable>
118  ("G4Material", "material class", no_init)
119  .def(init<const G4String&, G4double, G4double, G4double>())
120  .def(init<const G4String&, G4double, G4int>())
121  // ---
122  .def("AddElement", f1_AddElement)
123  .def("AddElement", f2_AddElement)
124  .def("AddMaterial", &G4Material::AddMaterial)
125  .def("GetName", &G4Material::GetName,
126  return_value_policy<reference_existing_object>())
127  .def("GetChemicalFormula", &G4Material::GetChemicalFormula,
128  return_value_policy<reference_existing_object>())
129  .def("SetName", &G4Material::SetName)
130  .def("SetChemicalFormula", &G4Material::SetChemicalFormula)
131  .def("GetDensity", &G4Material::GetDensity)
132  .def("GetState", &G4Material::GetState)
133  .def("GetTemperature", &G4Material::GetTemperature)
134  .def("GetPressure", &G4Material::GetPressure)
135  // ---
136  .def("GetElementVector", &G4Material::GetElementVector,
137  return_internal_reference<>())
138  .def("GetElement", &G4Material::GetElement,
139  return_value_policy<reference_existing_object>())
140  .def("GetTotNbOfAtomsPerVolume", &G4Material::GetTotNbOfAtomsPerVolume)
141  .def("GetTotNbOfElectPerVolume", &G4Material::GetTotNbOfElectPerVolume)
142  .def("GetFractionVector", f_GetFractionVector)
143  .def("GetAtomsVector", f_GetAtomsVector)
144  .def("GetVecNbOfAtomsPerVolume", f_GetVecNbOfAtomsPerVolume)
145  .def("GetAtomicNumDensityVector", f_GetAtomicNumDensityVector)
146  // ----
147  .def("GetElectronDensity", &G4Material::GetElectronDensity)
148  .def("GetRadlen", &G4Material::GetRadlen)
149  .def("GetNuclearInterLength", &G4Material::GetNuclearInterLength)
150  .def("GetIonisation", &G4Material::GetIonisation,
151  return_internal_reference<>())
152  .def("GetSandiaTable", &G4Material::GetSandiaTable,
153  return_internal_reference<>())
154  // ---
155  .def("GetZ", &G4Material::GetZ)
156  .def("GetA", &G4Material::GetA)
157  .def("SetMaterialPropertiesTable", &G4Material::SetMaterialPropertiesTable)
158  .def("GetMaterialPropertiesTable", &G4Material::GetMaterialPropertiesTable,
159  return_internal_reference<>())
160  .def("GetMaterialTable", &G4Material::GetMaterialTable,
161  return_value_policy<reference_existing_object>())
162  .staticmethod("GetMaterialTable")
163  .def("GetNumberOfMaterials", &G4Material::GetNumberOfMaterials)
164  .staticmethod("GetNumberOfMaterials")
165  .def("GetIndex", &G4Material::GetIndex)
166  .def("GetMaterial", f1_GetMaterial, f_GetMaterial()
167  [return_value_policy<reference_existing_object>()])
168  .def("GetMaterial", f2_GetMaterial,
169  return_value_policy<reference_existing_object>())
170  .def("GetMaterial", f3_GetMaterial,
171  return_value_policy<reference_existing_object>())
172  .staticmethod("GetMaterial")
173  // ---
174  //.def(self_ns::str(self))
175  .def("Print", Print)
176  ;
177 
178  // ---
179  enum_<G4State>("G4State")
180  .value("kStateUndefined", kStateUndefined)
181  .value("kStateSolid", kStateSolid)
182  .value("kStateLiquid", kStateLiquid)
183  .value("kStateGas", kStateGas)
184  ;
185 }
void(G4Material::* f2_AddElement)(G4Element *, G4double)
Definition: pyG4Material.cc:44
G4Material *(* f2_GetMaterial)(G4double, G4double, G4double)
Definition: pyG4Material.cc:50
list f_GetVecNbOfAtomsPerVolume(const G4Material *material)
Definition: pyG4Material.cc:80
void Print(G4Material &mat)
double value
Definition: spectrum.C:18
G4Material *(* f3_GetMaterial)(size_t, G4double)
Definition: pyG4Material.cc:52
void(G4Material::* f1_AddElement)(G4Element *, G4int)
Definition: pyG4Material.cc:42
list f_GetAtomsVector(const G4Material *material)
Definition: pyG4Material.cc:69
list f_GetAtomicNumDensityVector(const G4Material *material)
Definition: pyG4Material.cc:91
list f_GetFractionVector(const G4Material *material)
Definition: pyG4Material.cc:58
G4Material *(* f1_GetMaterial)(const G4String &, G4bool)
Definition: pyG4Material.cc:48