#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 88 of file pytestem0.cc.
References getMaterialTable(), getParticleTable(), and DetectorConstruction::SetMaterial().
95 bases<G4VUserDetectorConstruction> >
96 (
"DetectorConstruction",
"testEm0 detector")
101 bases<G4VUserPrimaryGeneratorAction> >
102 (
"PrimaryGeneratorAction", init<DetectorConstruction*>())
106 bases<G4UserRunAction> >
107 (
"RunAction", init<DetectorConstruction*, PrimaryGeneratorAction*>())
111 bases<G4VUserPhysicsList> >
112 (
"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 67 of file pytestem0.cc.
Referenced by BOOST_PYTHON_MODULE().
70 boost::python::list *materialTableList =
new boost::python::list();
73 G4MaterialTable materialList = *G4Material::GetMaterialTable();
76 for(itVectorData = materialList.begin(); itVectorData != materialList.end(); itVectorData++) {
77 materialTableList->append ( (std::string)(*(itVectorData))->GetName()) ;
80 return *materialTableList;
boost::python::list getParticleTable |
( |
| ) |
|
Definition at line 51 of file pytestem0.cc.
Referenced by BOOST_PYTHON_MODULE().
54 boost::python::list *particleList =
new boost::python::list();
57 G4ParticleTable *g4ParticleList = G4ParticleTable::GetParticleTable();
60 for (
int index = 0 ; index <= g4ParticleList->size() ; index++ ) {
61 particleList->append ( (std::string) g4ParticleList->GetParticleName(index) );