128 #if G4VERSION_NUMBER < 910 129 class_<G4ParticleGun>
131 class_<G4ParticleGun, boost::noncopyable>
133 (
"G4ParticleGun",
"particle gun")
136 .def(init<G4ParticleDefinition*>())
137 .def(init<G4ParticleDefinition*, G4int>())
139 .def(
"GeneratePrimaryVertex", &G4ParticleGun::GeneratePrimaryVertex)
140 .def(
"SetParticleDefinition", &G4ParticleGun::SetParticleDefinition)
141 .def(
"GetParticleDefinition", &G4ParticleGun::GetParticleDefinition,
142 return_value_policy<reference_existing_object>())
143 #if G4VERSION_NUMBER >= 910 144 .def(
"SetParticleMomentum", f1_SetParticleMomentum)
145 .def(
"SetParticleMomentum", f2_SetParticleMomentum)
147 .def(
"SetParticleMomentum", &G4ParticleGun::SetParticleMomentum)
149 .def(
"SetParticleMomentumDirection",
150 &G4ParticleGun::SetParticleMomentumDirection)
151 .def(
"GetParticleMomentumDirection",
152 &G4ParticleGun::GetParticleMomentumDirection)
153 .def(
"SetParticleEnergy", &G4ParticleGun::SetParticleEnergy)
154 .def(
"GetParticleEnergy", &G4ParticleGun::GetParticleEnergy)
155 .def(
"SetParticleCharge", &G4ParticleGun::SetParticleCharge)
156 .def(
"GetParticleCharge", &G4ParticleGun::GetParticleCharge)
157 .def(
"SetParticlePolarization", &G4ParticleGun::SetParticlePolarization)
158 .def(
"GetParticlePolarization", &G4ParticleGun::GetParticlePolarization)
159 .def(
"SetNumberOfParticles", &G4ParticleGun::SetNumberOfParticles)
160 .def(
"GetNumberOfParticles", &G4ParticleGun::GetNumberOfParticles)
161 .def(
"SetParticlePosition", &G4ParticleGun::SetParticlePosition)
162 .def(
"GetParticlePosition", &G4ParticleGun::GetParticlePosition)
163 .def(
"SetParticleTime", &G4ParticleGun::SetParticleTime)
164 .def(
"GetParticleTime", &G4ParticleGun::GetParticleTime)
void SetParticleByName(G4ParticleGun *gun, const std::string &pname)
std::string GetParticleByName(G4ParticleGun *gun)