Geant4  10.01.p01
pyG4PrimaryParticle.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: pyG4PrimaryParticle.cc 66892 2013-01-17 10:57:59Z gunter $
27 // ====================================================================
28 // pyG4PrimaryParticle.cc
29 //
30 // 2005 Q
31 // ====================================================================
32 #include <boost/python.hpp>
33 #include "G4PrimaryParticle.hh"
34 #include "G4ParticleDefinition.hh"
35 
36 using namespace boost::python;
37 
38 // ====================================================================
39 // module definition
40 // ====================================================================
42 {
43  class_<G4PrimaryParticle, G4PrimaryParticle*>
44  ("G4PrimaryParticle", "primary particle")
45  // ---
46  .add_property("Px", &G4PrimaryParticle::GetPx)
47  .add_property("Py", &G4PrimaryParticle::GetPy)
48  .add_property("Pz", &G4PrimaryParticle::GetPz)
49  // ---
50  .def("Print", &G4PrimaryParticle::Print)
51  .def("GetPDGcode", &G4PrimaryParticle::GetPDGcode)
52  .def("GetG4code", &G4PrimaryParticle::GetG4code,
53  return_internal_reference<>())
54  .def("GetMomentun", &G4PrimaryParticle::GetMomentum,
55  return_value_policy<return_by_value>())
56  .def("GetPx", &G4PrimaryParticle::GetPx)
57  .def("GetPy", &G4PrimaryParticle::GetPy)
58  .def("GetPz", &G4PrimaryParticle::GetPz)
59  .def("GetNext", &G4PrimaryParticle::GetNext,
60  return_internal_reference<>())
61  .def("GetDaughter", &G4PrimaryParticle::GetNext,
62  return_internal_reference<>())
63  .def("GetTrackID", &G4PrimaryParticle::GetTrackID)
64  .def("GetMass", &G4PrimaryParticle::GetMass)
65  .def("GetCharge", &G4PrimaryParticle::GetCharge)
66  .def("GetPolarization", &G4PrimaryParticle::GetPolarization,
67  return_value_policy<return_by_value>())
68  .def("GetPolX", &G4PrimaryParticle::GetPolX)
69  .def("GetPolY", &G4PrimaryParticle::GetPolY)
70  .def("GetPolZ", &G4PrimaryParticle::GetPolZ)
71  .def("GetWeight", &G4PrimaryParticle::GetWeight)
72  .def("SetWeight", &G4PrimaryParticle::SetWeight)
73  .def("GetProperTime", &G4PrimaryParticle::GetProperTime)
74  ;
75 }
76 
G4double GetPolX() const
G4ThreeVector GetMomentum() const
G4int GetTrackID() const
G4double GetPz() const
G4double GetPx() const
G4ThreeVector GetPolarization() const
G4double GetPolZ() const
G4double GetPolY() const
G4ParticleDefinition * GetG4code() const
G4double GetPy() const
G4double GetMass() const
G4double GetProperTime() const
G4int GetPDGcode() const
G4double GetWeight() const
G4PrimaryParticle * GetNext() const
void export_G4PrimaryParticle()
void SetWeight(G4double w)
G4double GetCharge() const