LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
pyG4Material.cc File Reference
#include <boost/python.hpp>
#include "G4Version.hh"
#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
 

Function Documentation

void export_G4Material ( )

Definition at line 109 of file pyG4Material.cc.

References pyG4Material::f1_AddElement, pyG4Material::f2_AddElement, pyG4Material::f_GetAtomicNumDensityVector(), pyG4Material::f_GetAtomsVector(), pyG4Material::f_GetFractionVector(), pyG4Material::f_GetVecNbOfAtomsPerVolume(), pyG4Material::Print(), and fhicl::detail::atom::value().

Referenced by BOOST_PYTHON_MODULE().

110 {
111  class_<G4Material, G4Material*, boost::noncopyable>
112  ("G4Material", "material class", no_init)
113  .def(init<const G4String&, G4double, G4double, G4double>())
114  .def(init<const G4String&, G4double, G4int>())
115  // ---
116  .def("AddElement", f1_AddElement)
117  .def("AddElement", f2_AddElement)
118  .def("AddMaterial", &G4Material::AddMaterial)
119  .def("GetName", &G4Material::GetName,
120  return_value_policy<reference_existing_object>())
121  .def("GetChemicalFormula", &G4Material::GetChemicalFormula,
122  return_value_policy<reference_existing_object>())
123  .def("SetName", &G4Material::SetName)
124  .def("SetChemicalFormula", &G4Material::SetChemicalFormula)
125  .def("GetDensity", &G4Material::GetDensity)
126  .def("GetState", &G4Material::GetState)
127  .def("GetTemperature", &G4Material::GetTemperature)
128  .def("GetPressure", &G4Material::GetPressure)
129  // ---
130  .def("GetElementVector", &G4Material::GetElementVector,
131  return_internal_reference<>())
132  .def("GetElement", &G4Material::GetElement,
133  return_value_policy<reference_existing_object>())
134  .def("GetTotNbOfAtomsPerVolume", &G4Material::GetTotNbOfAtomsPerVolume)
135  .def("GetTotNbOfElectPerVolume", &G4Material::GetTotNbOfElectPerVolume)
136  .def("GetFractionVector", f_GetFractionVector)
137  .def("GetAtomsVector", f_GetAtomsVector)
138  .def("GetVecNbOfAtomsPerVolume", f_GetVecNbOfAtomsPerVolume)
139  .def("GetAtomicNumDensityVector", f_GetAtomicNumDensityVector)
140  // ----
141  .def("GetElectronDensity", &G4Material::GetElectronDensity)
142  .def("GetRadlen", &G4Material::GetRadlen)
143  .def("GetNuclearInterLength", &G4Material::GetNuclearInterLength)
144  .def("GetIonisation", &G4Material::GetIonisation,
145  return_internal_reference<>())
146  .def("GetSandiaTable", &G4Material::GetSandiaTable,
147  return_internal_reference<>())
148  // ---
149  .def("GetZ", &G4Material::GetZ)
150  .def("GetA", &G4Material::GetA)
151  .def("SetMaterialPropertiesTable", &G4Material::SetMaterialPropertiesTable)
152  .def("GetMaterialPropertiesTable", &G4Material::GetMaterialPropertiesTable,
153  return_internal_reference<>())
154  .def("GetMaterialTable", &G4Material::GetMaterialTable,
155  return_value_policy<reference_existing_object>())
156  .staticmethod("GetMaterialTable")
157  .def("GetNumberOfMaterials", &G4Material::GetNumberOfMaterials)
158  .staticmethod("GetNumberOfMaterials")
159  .def("GetIndex", &G4Material::GetIndex)
160  .def("GetMaterial", &G4Material::GetMaterial,
161  f_GetMaterial()
162  [return_value_policy<reference_existing_object>()])
163  .staticmethod("GetMaterial")
164  // ---
165  //.def(self_ns::str(self))
166  .def("Print", Print)
167  ;
168 
169  // ---
170  enum_<G4State>("G4State")
171  .value("kStateUndefined", kStateUndefined)
172  .value("kStateSolid", kStateSolid)
173  .value("kStateLiquid", kStateLiquid)
174  .value("kStateGas", kStateGas)
175  ;
176 }
void(G4Material::* f2_AddElement)(G4Element *, G4double)
Definition: pyG4Material.cc:46
list f_GetVecNbOfAtomsPerVolume(const G4Material *material)
Definition: pyG4Material.cc:74
void Print(G4Material &mat)
Definition: pyG4Material.cc:97
std::string value(boost::any const &)
void(G4Material::* f1_AddElement)(G4Element *, G4int)
Definition: pyG4Material.cc:44
list f_GetAtomsVector(const G4Material *material)
Definition: pyG4Material.cc:63
list f_GetAtomicNumDensityVector(const G4Material *material)
Definition: pyG4Material.cc:85
list f_GetFractionVector(const G4Material *material)
Definition: pyG4Material.cc:52