32 #include <boost/python.hpp>
38 using namespace boost::python;
40 #if G4VERSION_NUMBER < 910
87 namespace pyG4ParticleGun {
89 #if G4VERSION_NUMBER >= 910
105 gun-> SetParticleDefinition(pd);
107 G4cout <<
"*** \"" << pname <<
"\" is not registered "
108 <<
"in available particle list" <<
G4endl;
117 return (pd-> GetParticleName()).c_str();
122 using namespace pyG4ParticleGun;
129 #if G4VERSION_NUMBER < 910
130 class_<G4ParticleGun>
132 class_<G4ParticleGun, boost::noncopyable>
134 (
"G4ParticleGun",
"particle gun")
137 .def(init<G4ParticleDefinition*>())
138 .def(init<G4ParticleDefinition*, G4int>())
143 return_value_policy<reference_existing_object>())
144 #if G4VERSION_NUMBER >= 910
145 .def(
"SetParticleMomentum", f1_SetParticleMomentum)
146 .def(
"SetParticleMomentum", f2_SetParticleMomentum)
150 .def(
"SetParticleMomentumDirection",
152 .def(
"GetParticleMomentumDirection",
void SetParticleMomentum(G4double aMomentum)
void SetParticleByName(MedicalBeam *beam, const std::string &pname)
std::string GetParticleByName(MedicalBeam *beam)
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
G4ThreeVector GetParticlePosition()
virtual void GeneratePrimaryVertex(G4Event *evt)
G4ParticleDefinition * particle_definition
G4ParticleMomentum GetParticleMomentumDirection() const
void SetParticlePolarization(G4ThreeVector aVal)
G4ThreeVector GetParticlePolarization() const
void SetParticlePosition(G4ThreeVector aPosition)
G4ParticleMomentum particle_momentum_direction
G4GLOB_DLL std::ostream G4cout
void SetParticleCharge(G4double aCharge)
G4double GetParticleCharge() const
void SetNumberOfParticles(G4int i)
void export_G4ParticleGun()
G4ThreeVector particle_polarization
G4int GetNumberOfParticles() const
void SetParticleEnergy(G4double aKineticEnergy)
G4int NumberOfParticlesToBeGenerated
G4double GetParticleTime()
static G4ParticleTable * GetParticleTable()
G4ParticleDefinition * GetParticleDefinition() const
G4ThreeVector G4ParticleMomentum
typedef void(XMLCALL *XML_ElementDeclHandler)(void *userData
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4double GetParticleEnergy() const
void SetParticleTime(G4double aTime)