#include "DetectorConstruction.hh"
#include "RunAction.hh"
#include "PhysicsList.hh"
#include "PrimaryGeneratorAction.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4ParticleTable.hh"
#include <boost/python.hpp>
#include <boost/python/list.hpp>
#include <vector>
#include <string>
Go to the source code of this file.
BOOST_PYTHON_MODULE |
( |
testem0 |
| ) |
|
Definition at line 87 of file pytestem0.cc.
References getMaterialTable(), getParticleTable(), and DetectorConstruction::SetMaterial().
94 bases<G4VUserDetectorConstruction> >
95 (
"DetectorConstruction",
"testEm0 detector")
100 bases<G4VUserPrimaryGeneratorAction> >
101 (
"PrimaryGeneratorAction", init<DetectorConstruction*>())
105 bases<G4UserRunAction> >
106 (
"RunAction", init<DetectorConstruction*, PrimaryGeneratorAction*>())
110 bases<G4VUserPhysicsList> >
111 (
"PhysicsList",
"testEm0 physics list")
boost::python::list getParticleTable()
boost::python::list getMaterialTable()
TConfigurablePhysicsList< ModularPhysicsList > PhysicsList
void SetMaterial(G4String)
boost::python::list getMaterialTable |
( |
| ) |
|
Definition at line 66 of file pytestem0.cc.
Referenced by BOOST_PYTHON_MODULE().
69 boost::python::list *materialTableList =
new boost::python::list();
72 G4MaterialTable materialList = *G4Material::GetMaterialTable();
75 for(itVectorData = materialList.begin(); itVectorData != materialList.end(); itVectorData++) {
76 materialTableList->append ( (std::string)(*(itVectorData))->GetName()) ;
79 return *materialTableList;
boost::python::list getParticleTable |
( |
| ) |
|
Definition at line 50 of file pytestem0.cc.
Referenced by BOOST_PYTHON_MODULE().
53 boost::python::list *particleList =
new boost::python::list();
56 G4ParticleTable *g4ParticleList = G4ParticleTable::GetParticleTable();
59 for (
int index = 0 ; index <= g4ParticleList->size() ; index++ ) {
60 particleList->append ( (std::string) g4ParticleList->GetParticleName(index) );