37 #include <boost/python.hpp>
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());
116 bases<G4VUserPrimaryGeneratorAction> >
117 (
"MedicalBeam",
"primary generator action with medical beam")
154 enum_<MedicalBeam::FieldShape>(
"FieldShape")
161 return_value_policy<reference_existing_object>());
MedicalBeam * Construct()
G4double GetFieldR() const
void SetParticleByName(MedicalBeam *beam, const std::string &pname)
std::string GetParticleByName(MedicalBeam *beam)
void SetSSD(G4double ssd)
G4double GetKineticE() const
list f_GetFieldXY(MedicalBeam *beam)
FieldShape GetFieldShape() const
G4double GetFieldY() const
void SetFieldR(G4double r)
void SetSourcePosition(const G4ThreeVector &pos)
G4GLOB_DLL std::ostream G4cout
BOOST_PYTHON_MODULE(MedicalBeam)
G4ThreeVector GetSourcePosition() const
static G4RunManager * GetRunManager()
void SetFieldShape(FieldShape shape)
static G4ParticleTable * GetParticleTable()
void SetKineticE(G4double e)
void f_SetFieldXY(MedicalBeam *beam, const list &listXY)
G4double GetFieldX() const