33 #include <boost/python.hpp>
39 using namespace boost::python;
41 #if G4VERSION_NUMBER < 910
88 namespace pyG4ParticleGun {
90 #if G4VERSION_NUMBER >= 910
106 gun-> SetParticleDefinition(pd);
108 G4cout <<
"*** \"" << pname <<
"\" is not registered "
109 <<
"in available particle list" <<
G4endl;
118 return (pd-> GetParticleName()).c_str();
123 using namespace pyG4ParticleGun;
130 #if G4VERSION_NUMBER < 910
131 class_<G4ParticleGun>
133 class_<G4ParticleGun, boost::noncopyable>
135 (
"G4ParticleGun",
"particle gun")
138 .def(init<G4ParticleDefinition*>())
139 .def(init<G4ParticleDefinition*, G4int>())
144 return_value_policy<reference_existing_object>())
145 #if G4VERSION_NUMBER >= 910
146 .def(
"SetParticleMomentum", f1_SetParticleMomentum)
147 .def(
"SetParticleMomentum", f2_SetParticleMomentum)
151 .def(
"SetParticleMomentumDirection",
153 .def(
"GetParticleMomentumDirection",