Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyG4ParticleGun.cc File Reference
#include <boost/python.hpp>
#include "G4Version.hh"
#include "G4ParticleGun.hh"
#include "G4ParticleTable.hh"
#include "G4Event.hh"
Include dependency graph for pyG4ParticleGun.cc:

Go to the source code of this file.

Namespaces

 pyG4ParticleGun
 

Functions

void pyG4ParticleGun::SetParticleByName (G4ParticleGun *gun, const std::string &pname)
 
std::string pyG4ParticleGun::GetParticleByName (G4ParticleGun *gun)
 
void export_G4ParticleGun ()
 

Function Documentation

void export_G4ParticleGun ( )

Definition at line 127 of file pyG4ParticleGun.cc.

128 {
129 #if G4VERSION_NUMBER < 910
130  class_<G4ParticleGun>
131 #else
132  class_<G4ParticleGun, boost::noncopyable>
133 #endif
134  ("G4ParticleGun", "particle gun")
135  // constructor
136  .def(init<G4int>())
137  .def(init<G4ParticleDefinition*>())
138  .def(init<G4ParticleDefinition*, G4int>())
139  // ---
140  .def("GeneratePrimaryVertex", &G4ParticleGun::GeneratePrimaryVertex)
141  .def("SetParticleDefinition", &G4ParticleGun::SetParticleDefinition)
142  .def("GetParticleDefinition", &G4ParticleGun::GetParticleDefinition,
143  return_value_policy<reference_existing_object>())
144 #if G4VERSION_NUMBER >= 910
145  .def("SetParticleMomentum", f1_SetParticleMomentum)
146  .def("SetParticleMomentum", f2_SetParticleMomentum)
147 #else
148  .def("SetParticleMomentum", &G4ParticleGun::SetParticleMomentum)
149 #endif
150  .def("SetParticleMomentumDirection",
152  .def("GetParticleMomentumDirection",
154  .def("SetParticleEnergy", &G4ParticleGun::SetParticleEnergy)
155  .def("GetParticleEnergy", &G4ParticleGun::GetParticleEnergy)
156  .def("SetParticleCharge", &G4ParticleGun::SetParticleCharge)
157  .def("GetParticleCharge", &G4ParticleGun::GetParticleCharge)
158  .def("SetParticlePolarization", &G4ParticleGun::SetParticlePolarization)
159  .def("GetParticlePolarization", &G4ParticleGun::GetParticlePolarization)
160  .def("SetNumberOfParticles", &G4ParticleGun::SetNumberOfParticles)
161  .def("GetNumberOfParticles", &G4ParticleGun::GetNumberOfParticles)
162  .def("SetParticlePosition", &G4ParticleGun::SetParticlePosition)
163  .def("GetParticlePosition", &G4ParticleGun::GetParticlePosition)
164  .def("SetParticleTime", &G4ParticleGun::SetParticleTime)
165  .def("GetParticleTime", &G4ParticleGun::GetParticleTime)
166  .def("SetParticleByName", SetParticleByName)
167  .def("GetParticleByName", GetParticleByName)
168  ;
169 }
void SetParticleMomentum(G4double aMomentum)
void SetParticleByName(MedicalBeam *beam, const std::string &pname)
std::string GetParticleByName(MedicalBeam *beam)
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
G4ThreeVector GetParticlePosition()
virtual void GeneratePrimaryVertex(G4Event *evt)
G4ParticleMomentum GetParticleMomentumDirection() const
void SetParticlePolarization(G4ThreeVector aVal)
G4ThreeVector GetParticlePolarization() const
void SetParticlePosition(G4ThreeVector aPosition)
void SetParticleCharge(G4double aCharge)
G4double GetParticleCharge() const
void SetNumberOfParticles(G4int i)
G4int GetNumberOfParticles() const
void SetParticleEnergy(G4double aKineticEnergy)
G4ParticleDefinition * GetParticleDefinition() const
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4double GetParticleEnergy() const
void SetParticleTime(G4double aTime)

Here is the call graph for this function:

Here is the caller graph for this function: