Geant4  10.00.p01
pyG4Track.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: pyG4Track.cc 66892 2013-01-17 10:57:59Z gunter $
27 // ====================================================================
28 // pyG4Track.cc
29 //
30 // 2005 Q
31 // ====================================================================
32 #include <boost/python.hpp>
33 #include "G4Track.hh"
34 #include "G4VProcess.hh"
35 
36 using namespace boost::python;
37 
38 // ====================================================================
39 // module definition
40 // ====================================================================
42 {
43  class_<G4Track, G4Track*>("G4Track", "track class")
44  // ---
45  .def("GetTrackID", &G4Track::GetTrackID)
46  .def("GetParentID", &G4Track::GetParentID)
47  .def("GetDynamicParticle", &G4Track::GetDynamicParticle,
48  return_internal_reference<>())
49  .def("GetDefinition", &G4Track::GetDefinition,
50  return_internal_reference<>())
51  .def("GetPosition", &G4Track::GetPosition,
52  return_value_policy<return_by_value>())
53  .def("GetGlobalTime", &G4Track::GetGlobalTime)
54  .def("GetLocalTime", &G4Track::GetLocalTime)
55  .def("GetProperTime", &G4Track::GetProperTime)
56  .def("GetVolume", &G4Track::GetVolume,
57  return_value_policy<reference_existing_object>())
58  .def("GetMaterial", &G4Track::GetMaterial,
59  return_value_policy<reference_existing_object>())
60  .def("GetTouchable", &G4Track::GetTouchable,
61  return_value_policy<reference_existing_object>())
62  .def("GetKineticEnergy", &G4Track::GetKineticEnergy)
63  .def("GetTotalEnergy", &G4Track::GetTotalEnergy)
64  .def("GetMomentumDirection", &G4Track::GetMomentumDirection,
65  return_value_policy<return_by_value>())
66  .def("GetMomentum", &G4Track::GetMomentum,
67  return_value_policy<return_by_value>())
68  .def("GetVelocity", &G4Track::GetVelocity)
69  .def("GetPolarization", &G4Track::GetPolarization,
70  return_value_policy<return_by_value>())
71  .def("GetTrackStatus", &G4Track::GetTrackStatus)
72  .def("GetTrackLength", &G4Track::GetTrackLength)
73  .def("GetStep", &G4Track::GetStep,
74  return_value_policy<reference_existing_object>())
75  .def("GetCurrentStepNumber", &G4Track::GetCurrentStepNumber)
76  .def("GetStepLength", &G4Track::GetStepLength)
77  .def("GetVertexPosition", &G4Track::GetVertexPosition,
78  return_value_policy<return_by_value>())
79  .def("GetVertexMomentumDirection", &G4Track::GetVertexMomentumDirection,
80  return_value_policy<return_by_value>())
81  .def("GetVertexKineticEnergy", &G4Track::GetVertexKineticEnergy)
82  .def("GetLogicalVolumeAtVertex", &G4Track::GetLogicalVolumeAtVertex,
83  return_value_policy<reference_existing_object>())
84  .def("GetCreatorProcess", &G4Track::GetCreatorProcess,
85  return_value_policy<reference_existing_object>())
86  .def("GetWeight", &G4Track::GetWeight)
87  .def("SetWeight", &G4Track::SetWeight)
88  ;
89 }
G4ParticleDefinition * GetDefinition() const
G4int GetParentID() const
const G4ThreeVector & GetPolarization() const
G4double GetLocalTime() const
G4double GetProperTime() const
G4double GetVelocity() const
const G4LogicalVolume * GetLogicalVolumeAtVertex() const
const G4DynamicParticle * GetDynamicParticle() const
const G4ThreeVector & GetPosition() const
G4TrackStatus GetTrackStatus() const
void export_G4Track()
Definition: pyG4Track.cc:41
const G4Step * GetStep() const
void SetWeight(G4double aValue)
const G4VProcess * GetCreatorProcess() const
G4double GetKineticEnergy() const
G4int GetCurrentStepNumber() const
G4double GetVertexKineticEnergy() const
G4int GetTrackID() const
G4double GetGlobalTime() const
const G4ThreeVector & GetVertexPosition() const
G4double GetTrackLength() const
G4Material * GetMaterial() const
G4ThreeVector GetMomentum() const
const G4ThreeVector & GetMomentumDirection() const
const G4VTouchable * GetTouchable() const
G4VPhysicalVolume * GetVolume() const
G4double GetWeight() const
G4double GetTotalEnergy() const
const G4ThreeVector & GetVertexMomentumDirection() const
G4double GetStepLength() const