31 #include <boost/python.hpp>
37 using namespace boost::python;
39 #if G4VERSION_NUMBER < 910
86 namespace pyG4ParticleGun {
88 #if G4VERSION_NUMBER >= 910
104 gun-> SetParticleDefinition(pd);
106 G4cout <<
"*** \"" << pname <<
"\" is not registered "
107 <<
"in available particle list" <<
G4endl;
116 return (pd-> GetParticleName()).c_str();
121 using namespace pyG4ParticleGun;
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>())
142 return_value_policy<reference_existing_object>())
143 #if G4VERSION_NUMBER >= 910
144 .def(
"SetParticleMomentum", f1_SetParticleMomentum)
145 .def(
"SetParticleMomentum", f2_SetParticleMomentum)
149 .def(
"SetParticleMomentumDirection",
151 .def(
"GetParticleMomentumDirection",