LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
pyG4PrimaryParticle.cc File Reference
#include <boost/python.hpp>
#include "G4PrimaryParticle.hh"
#include "G4ParticleDefinition.hh"

Go to the source code of this file.

Functions

void export_G4PrimaryParticle ()
 

Function Documentation

void export_G4PrimaryParticle ( )

Definition at line 41 of file pyG4PrimaryParticle.cc.

References pyG4Element::Print().

Referenced by BOOST_PYTHON_MODULE().

42 {
43  class_<G4PrimaryParticle, G4PrimaryParticle*>
44  ("G4PrimaryParticle", "primary particle")
45  .def(init<G4int>())
46  // ---
47  .add_property("Px", &G4PrimaryParticle::GetPx)
48  .add_property("Py", &G4PrimaryParticle::GetPy)
49  .add_property("Pz", &G4PrimaryParticle::GetPz)
50  // ---
51  .def("Print", &G4PrimaryParticle::Print)
52  .def("GetPDGcode", &G4PrimaryParticle::GetPDGcode)
53  .def("GetG4code", &G4PrimaryParticle::GetG4code,
54  return_internal_reference<>())
55  .def("GetMomentun", &G4PrimaryParticle::GetMomentum,
56  return_value_policy<return_by_value>())
57  .def("GetPx", &G4PrimaryParticle::GetPx)
58  .def("GetPy", &G4PrimaryParticle::GetPy)
59  .def("GetPz", &G4PrimaryParticle::GetPz)
60  .def("Set4Momentum", &G4PrimaryParticle::Set4Momentum)
61  .def("SetMomentumDirection", &G4PrimaryParticle::SetMomentumDirection)
62 
63  .def("GetNext", &G4PrimaryParticle::GetNext,
64  return_internal_reference<>())
65  .def("GetDaughter", &G4PrimaryParticle::GetNext,
66  return_internal_reference<>())
67  .def("GetTrackID", &G4PrimaryParticle::GetTrackID)
68  .def("GetMass", &G4PrimaryParticle::GetMass)
69  .def("SetMass", &G4PrimaryParticle::SetMass)
70  .def("GetCharge", &G4PrimaryParticle::GetCharge)
71  .def("SetCharge", &G4PrimaryParticle::SetCharge)
72  .def("GetPolarization", &G4PrimaryParticle::GetPolarization,
73  return_value_policy<return_by_value>())
74  .def("GetPolX", &G4PrimaryParticle::GetPolX)
75  .def("GetPolY", &G4PrimaryParticle::GetPolY)
76  .def("GetPolZ", &G4PrimaryParticle::GetPolZ)
77  .def("GetWeight", &G4PrimaryParticle::GetWeight)
78  .def("SetWeight", &G4PrimaryParticle::SetWeight)
79  .def("GetProperTime", &G4PrimaryParticle::GetProperTime)
80  ;
81 }
void Print(G4Element &ele)
Definition: pyG4Element.cc:56