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",
const G4ParticleGun & operator=(const G4ParticleGun &)=delete
G4ThreeVector G4ParticleMomentum
void SetParticleTime(G4double aTime)
static G4ParticleTable * GetParticleTable()
G4int operator==(const G4ParticleGun &) const =delete
std::string GetParticleByName(MedicalBeam *beam)
void SetParticlePosition(G4ThreeVector aPosition)
G4ParticleDefinition * particle_definition
G4double GetParticleTime()
void export_G4ParticleGun()
G4int GetNumberOfParticles() const
G4int NumberOfParticlesToBeGenerated
G4ParticleMomentum particle_momentum_direction
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4ThreeVector GetParticlePolarization() const
void SetParticlePolarization(G4ThreeVector aVal)
G4double GetParticleCharge() const
G4int operator!=(const G4ParticleGun &) const =delete
G4ThreeVector GetParticlePosition()
G4double GetParticleEnergy() const
virtual void GeneratePrimaryVertex(G4Event *evt)
G4GLOB_DLL std::ostream G4cout
void SetParticleEnergy(G4double aKineticEnergy)
void SetParticleMomentum(G4double aMomentum)
void SetParticleByName(MedicalBeam *beam, const std::string &pname)
G4ParticleDefinition * GetParticleDefinition() const
G4ParticleMomentum GetParticleMomentumDirection() const
G4ThreeVector particle_polarization
void SetNumberOfParticles(G4int i)
typedef void(XMLCALL *XML_ElementDeclHandler)(void *userData
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
void SetParticleCharge(G4double aCharge)