37 #include <boost/python.hpp>
42 using namespace boost::python;
47 namespace pyMedicalBeam {
54 runMgr-> SetUserAction(medicalbeam);
67 beam-> SetParticleDefinition(pd);
69 G4cout <<
"*** \"" << pname <<
"\" is not registered "
70 <<
"in available particle list" <<
G4endl;
80 if(pd==0)
return std::string(
"None");
81 else return (pd-> GetParticleName()).c_str();
88 G4double fx= extract<double>(listXY[0]);
89 G4double fy= extract<double>(listXY[1]);
90 beam-> SetFieldXY(fx, fy);
100 listFieldXY.append(beam-> GetFieldX());
101 listFieldXY.append(beam-> GetFieldY());
108 using namespace pyMedicalBeam;
116 bases<G4VUserPrimaryGeneratorAction> >
117 (
"MedicalBeam",
"primary generator action with medical beam")
154 enum_<MedicalBeam::FieldShape>(
"FieldShape")
161 return_value_policy<reference_existing_object>());
static G4RunManager * GetRunManager()
G4double GetFieldR() const
G4double GetKineticE() const
static G4ParticleTable * GetParticleTable()
void SetFieldShape(FieldShape shape)
std::string GetParticleByName(MedicalBeam *beam)
void SetFieldR(G4double r)
void SetSourcePosition(const G4ThreeVector &pos)
void SetSSD(G4double ssd)
const XML_Char int const XML_Char * value
list f_GetFieldXY(MedicalBeam *beam)
G4double GetFieldX() const
BOOST_PYTHON_MODULE(testem0)
G4GLOB_DLL std::ostream G4cout
FieldShape GetFieldShape() const
void SetParticleByName(MedicalBeam *beam, const std::string &pname)
void SetKineticE(G4double e)
G4ThreeVector GetSourcePosition() const
G4double GetFieldY() const
void f_SetFieldXY(MedicalBeam *beam, const list &listXY)