Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyG4Material.cc File Reference
#include <boost/python.hpp>
#include "G4Version.hh"
#include "G4Material.hh"
Include dependency graph for pyG4Material.cc:

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.

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 }
G4double GetPressure() const
Definition: G4Material.hh:183
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:226
G4double GetZ() const
Definition: G4Material.cc:623
void SetChemicalFormula(const G4String &chF)
Definition: G4Material.hh:173
void SetName(const G4String &name)
Definition: G4Material.hh:279
G4double GetTotNbOfElectPerVolume() const
Definition: G4Material.hh:212
void AddMaterial(G4Material *material, G4double fraction)
Definition: G4Material.cc:467
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:602
size_t GetIndex() const
Definition: G4Material.hh:262
const G4String & GetChemicalFormula() const
Definition: G4Material.hh:179
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
Definition: G4Material.hh:249
list f_GetFractionVector(const G4Material *material)
Definition: pyG4Material.cc:52
const G4String & GetName() const
Definition: G4Material.hh:178
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:587
G4double GetDensity() const
Definition: G4Material.hh:180
const G4Element * GetElement(G4int iel) const
Definition: G4Material.hh:202
const G4ElementVector * GetElementVector() const
Definition: G4Material.hh:190
void(G4Material::* f2_AddElement)(G4Element *, G4double)
Definition: pyG4Material.cc:46
void(G4Material::* f1_AddElement)(G4Element *, G4int)
Definition: pyG4Material.cc:44
G4SandiaTable * GetSandiaTable() const
Definition: G4Material.hh:229
const XML_Char int const XML_Char * value
Definition: expat.h:331
list f_GetVecNbOfAtomsPerVolume(const G4Material *material)
Definition: pyG4Material.cc:74
G4double GetElectronDensity() const
Definition: G4Material.hh:217
void Print(const std::vector< T > &data)
Definition: DicomRun.hh:109
static size_t GetNumberOfMaterials()
Definition: G4Material.cc:594
G4double GetRadlen() const
Definition: G4Material.hh:220
G4double GetA() const
Definition: G4Material.cc:636
G4double GetTotNbOfAtomsPerVolume() const
Definition: G4Material.hh:209
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
Definition: G4Material.hh:252
list f_GetAtomicNumDensityVector(const G4Material *material)
Definition: pyG4Material.cc:85
G4double GetTemperature() const
Definition: G4Material.hh:182
list f_GetAtomsVector(const G4Material *material)
Definition: pyG4Material.cc:63
G4State GetState() const
Definition: G4Material.hh:181
G4double GetNuclearInterLength() const
Definition: G4Material.hh:223

Here is the call graph for this function:

Here is the caller graph for this function: