36 #include "G4Material.hh" 37 #include "G4MaterialTable.hh" 38 #include "G4ParticleTable.hh" 40 #include <boost/python.hpp> 41 #include <boost/python/list.hpp> 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) );
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;
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
BOOST_PYTHON_MODULE(testem0)
void SetMaterial(G4String)