32 #include <boost/python.hpp>
40 #if G4VERSION_NUMBER < 910
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();
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 SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
G4int operator!=(const G4ParticleGun &) const
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
void SetParticleByName(G4ParticleGun *gun, const std::string &pname)
G4int GetNumberOfParticles() const
void SetParticleEnergy(G4double aKineticEnergy)
G4int NumberOfParticlesToBeGenerated
G4double GetParticleTime()
static G4ParticleTable * GetParticleTable()
std::string GetParticleByName(G4ParticleGun *gun)
G4ParticleDefinition * GetParticleDefinition() const
const G4ParticleGun & operator=(const G4ParticleGun &)
G4int operator==(const G4ParticleGun &) const
G4ThreeVector G4ParticleMomentum
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4double GetParticleEnergy() const
void SetParticleTime(G4double aTime)