Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pymodG4particles.cc File Reference
#include <boost/python.hpp>
Include dependency graph for pymodG4particles.cc:

Go to the source code of this file.

Functions

void export_G4ParticleDefinition ()
 
void export_G4DynamicParticle ()
 
void export_G4ParticleTable ()
 
void export_G4DecayTable ()
 
void export_G4PrimaryParticle ()
 
void export_G4PrimaryVertex ()
 
void export_PyG4ParticleList ()
 
 BOOST_PYTHON_MODULE (G4particles)
 

Function Documentation

BOOST_PYTHON_MODULE ( G4particles  )

Definition at line 48 of file pymodG4particles.cc.

49 {
57 }
void export_G4DynamicParticle()
void export_PyG4ParticleList()
void export_G4ParticleDefinition()
void export_G4PrimaryParticle()
void export_G4PrimaryVertex()
void export_G4DecayTable()
void export_G4ParticleTable()

Here is the call graph for this function:

void export_G4DecayTable ( )

Definition at line 40 of file pyG4DecayTable.cc.

41 {
42  class_<G4DecayTable, G4DecayTable*, boost::noncopyable>
43  ("G4DecayTable", "decay table")
44  // ---
45  .def("DumpInfo", &G4DecayTable::DumpInfo)
46  ;
47 
48  // reduced functionality...
49  // ...
50 
51 }
void DumpInfo() const

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4DynamicParticle ( )

Definition at line 42 of file pyG4DynamicParticle.cc.

43 {
44  class_<G4DynamicParticle, G4DynamicParticle*>
45  ("G4DynamicParticle", "dynamic particle")
46  // ---
47  .def("GetMomentumDirection", &G4DynamicParticle::GetMomentumDirection,
48  return_value_policy<return_by_value>())
49  .def("GetMomentum", &G4DynamicParticle::GetMomentum,
50  return_value_policy<return_by_value>())
51  //.def("Get4Momentum", &G4DynamicParticle::Get4Momentum,
52  //return_value_policy<return_by_value>())
53  .def("GetTotalMomentum", &G4DynamicParticle::GetTotalMomentum)
54  .def("GetTotalEnergy", &G4DynamicParticle::GetTotalEnergy)
55  .def("GetKineticEnergy", &G4DynamicParticle::GetKineticEnergy)
56  .def("GetProperTime", &G4DynamicParticle::GetProperTime)
57  .def("GetPolarization", &G4DynamicParticle::GetPolarization,
58  return_value_policy<return_by_value>())
59  .def("GetMass", &G4DynamicParticle::GetMass)
60  .def("GetCharge", &G4DynamicParticle::GetCharge)
61  //.def("GetElectronOccupancy", &G4DynamicParticle::GetElectronOccupancy,
62  //return_internal_reference<>())
63  .def("GetTotalOccupancy", &G4DynamicParticle::GetTotalOccupancy)
64  .def("GetOccupancy", &G4DynamicParticle::GetOccupancy)
65  .def("GetDefinition", &G4DynamicParticle::GetDefinition,
66  return_internal_reference<>())
67  .def("GetPreAssignedDecayProperTime",
69  .def("DumpInfo", &G4DynamicParticle::DumpInfo)
70  .def("SetVerboseLevel", &G4DynamicParticle::SetVerboseLevel)
71  .def("GetVerboseLevel", &G4DynamicParticle::GetVerboseLevel)
72  .def("GetPrimaryParticle", &G4DynamicParticle::GetPrimaryParticle,
73  return_internal_reference<>())
74  .def("GetPDGcode", &G4DynamicParticle::GetPDGcode)
75  ;
76 }
G4int GetVerboseLevel() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4double GetProperTime() const
G4int GetPDGcode() const
void DumpInfo(G4int mode=0) const
G4ParticleDefinition * GetDefinition() const
void SetVerboseLevel(G4int value)
G4double GetTotalMomentum() const
G4int GetOccupancy(G4int orbit) const
G4int GetTotalOccupancy() const
G4double GetMass() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetCharge() const
G4PrimaryParticle * GetPrimaryParticle() const
const G4ThreeVector & GetPolarization() const
G4double GetPreAssignedDecayProperTime() const
G4ThreeVector GetMomentum() const

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4ParticleDefinition ( )

Definition at line 44 of file pyG4ParticleDefinition.cc.

45 {
46  class_<G4ParticleDefinition, G4ParticleDefinition*, boost::noncopyable>
47  ("G4ParticleDefinition", "particle definition", no_init)
48  // ---
49  .def("GetParticleName", &G4ParticleDefinition::GetParticleName,
50  return_value_policy<return_by_value>())
51  .def("GetPDGMass", &G4ParticleDefinition::GetPDGMass)
52  .def("GetPDGWidth", &G4ParticleDefinition::GetPDGWidth)
53  .def("GetPDGCharge", &G4ParticleDefinition::GetPDGCharge)
54  .def("GetPDGSpin", &G4ParticleDefinition::GetPDGSpin)
55  .def("GetPDGiSpin", &G4ParticleDefinition::GetPDGiSpin)
56  .def("GetPDGiParity", &G4ParticleDefinition::GetPDGiParity)
57  .def("GetPDGiConjugation", &G4ParticleDefinition::GetPDGiConjugation)
58  .def("GetPDGIsospin", &G4ParticleDefinition::GetPDGIsospin)
59  .def("GetPDGIsospin3", &G4ParticleDefinition::GetPDGIsospin3)
60  .def("GetPDGiIsospin", &G4ParticleDefinition::GetPDGiIsospin)
61  .def("GetPDGiIsospin3", &G4ParticleDefinition::GetPDGiIsospin3)
62  .def("GetPDGiGParity", &G4ParticleDefinition::GetPDGiGParity)
63  .def("GetParticleType", &G4ParticleDefinition::GetParticleType,
64  return_value_policy<return_by_value>())
65  .def("GetParticleSubType", &G4ParticleDefinition::GetParticleSubType,
66  return_value_policy<return_by_value>())
67  .def("GetLeptonNumber", &G4ParticleDefinition::GetLeptonNumber)
68  .def("GetBaryonNumber", &G4ParticleDefinition::GetBaryonNumber)
69  .def("GetPDGEncoding", &G4ParticleDefinition::GetPDGEncoding)
70  .def("GetAntiPDGEncoding", &G4ParticleDefinition::GetAntiPDGEncoding)
71  .def("GetQuarkContent", &G4ParticleDefinition::GetQuarkContent)
72  .def("GetAntiQuarkContent",&G4ParticleDefinition::GetAntiQuarkContent)
73  .def("IsShortLived", &G4ParticleDefinition::IsShortLived)
74  .def("GetPDGStable", &G4ParticleDefinition::GetPDGStable)
75  .def("SetPDGStable", &G4ParticleDefinition::SetPDGStable)
76  .def("GetPDGLifeTime", &G4ParticleDefinition::GetPDGLifeTime)
77  .def("SetPDGLifeTime", &G4ParticleDefinition::SetPDGLifeTime)
78  .def("GetDecayTable", &G4ParticleDefinition::GetDecayTable,
79  return_internal_reference<>())
80  .def("SetDecayTable", &G4ParticleDefinition::SetDecayTable)
81  .def("GetProcessManager", &G4ParticleDefinition::GetProcessManager,
82  return_internal_reference<>())
83  .def("SetProcessManager", &G4ParticleDefinition::SetProcessManager)
84  // cludge!! (G4ParticleTable object is sigleton!!)
85  .def("GetParticleTable", &G4ParticleDefinition::GetParticleTable,
86  return_value_policy<reference_existing_object>())
87  .def("DumpTable", &G4ParticleDefinition::DumpTable)
88 #if G4VERSION_NUMBER >= 701
89  .def("GetAtomicNumber", &G4ParticleDefinition::GetAtomicNumber)
90  .def("GetAtomicMass", &G4ParticleDefinition::GetAtomicMass)
91 #endif
92  .def("SetVerboseLevel", &G4ParticleDefinition::SetVerboseLevel)
93  .def("GetVerboseLevel", &G4ParticleDefinition::GetVerboseLevel)
94  .def("SetApplyCutsFlag", &G4ParticleDefinition::SetApplyCutsFlag)
95  .def("GetApplyCutsFlag", &G4ParticleDefinition::GetApplyCutsFlag)
96  ;
97 }
void SetDecayTable(G4DecayTable *aDecayTable)
void SetPDGStable(const G4bool aFlag)
void SetProcessManager(G4ProcessManager *aProcessManager)
G4double GetPDGIsospin3() const
G4double GetPDGIsospin() const
G4int GetVerboseLevel() const
G4bool GetPDGStable() const
void SetPDGLifeTime(G4double aLifeTime)
G4int GetAntiQuarkContent(G4int flavor) const
const G4String & GetParticleSubType() const
const G4String & GetParticleName() const
G4int GetAtomicNumber() const
G4int GetAntiPDGEncoding() const
G4ParticleTable * GetParticleTable() const
G4DecayTable * GetDecayTable() const
G4double GetPDGWidth() const
G4int GetQuarkContent(G4int flavor) const
const G4String & GetParticleType() const
void SetVerboseLevel(G4int value)
G4int GetAtomicMass() const
G4int GetPDGiConjugation() const
G4double GetPDGMass() const
G4ProcessManager * GetProcessManager() const
G4double GetPDGSpin() const
G4double GetPDGLifeTime() const
G4bool GetApplyCutsFlag() const
G4double GetPDGCharge() const

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4ParticleTable ( )

Definition at line 98 of file pyG4ParticleTable.cc.

99 {
100  class_<G4ParticleTable, G4ParticleTable*, boost::noncopyable>
101  ("G4ParticleTable", "particle table", no_init)
102  // ---
103  .def("GetParticleTable", &G4ParticleTable::GetParticleTable,
104  return_value_policy<reference_existing_object>())
105  .staticmethod("GetParticleTable")
106  .def("contains", f1_contains)
107  .def("contains", f2_contains)
108  .def("entries", &G4ParticleTable::entries)
109  .def("size", &G4ParticleTable::size)
110  // ---
111  .def("GetParticle", &G4ParticleTable::GetParticle,
112  return_value_policy<reference_existing_object>())
113  .def("GetParticleName", &G4ParticleTable::GetParticleName,
114  return_value_policy<return_by_value>())
115  .def("FindParticle", f1_FindParticle,
116  return_value_policy<reference_existing_object>())
117  .def("FindParticle", f2_FindParticle,
118  return_value_policy<reference_existing_object>())
119  .def("FindParticle", f3_FindParticle,
120  return_value_policy<reference_existing_object>())
121  .def("FindAntiParticle", f1_FindAntiParticle,
122  return_value_policy<reference_existing_object>())
123  .def("FindAntiParticle", f2_FindAntiParticle,
124  return_value_policy<reference_existing_object>())
125  .def("FindAntiParticle", f3_FindAntiParticle,
126  return_value_policy<reference_existing_object>())
127  .def("DumpTable", &G4ParticleTable::DumpTable, f_DumpTable())
128  //.def("GetIonTable", &G4ParticleTable::GetIonTable,
129  //...)
130  //.def("GetShortLivedTable", &G4ParticleTable::GetShortLivedTable,
131  //...)
132  .def("SetVerboseLevel", &G4ParticleTable::SetVerboseLevel)
133  .def("GetVerboseLevel", &G4ParticleTable::GetVerboseLevel)
134  .def("SetReadiness", &G4ParticleTable::SetReadiness)
135  .def("GetReadiness", &G4ParticleTable::GetReadiness)
136  // ---
137  // additionals
138  .def("GetParticleList", GetParticleList)
139  ;
140 }
G4ParticleDefinition *(G4ParticleTable::* f2_FindAntiParticle)(const G4String &)
void DumpTable(const G4String &particle_name="ALL")
const G4String & GetParticleName(G4int index) const
G4ParticleDefinition *(G4ParticleTable::* f1_FindParticle)(G4int)
void SetVerboseLevel(G4int value)
void SetReadiness(G4bool val=true)
G4bool GetReadiness() const
G4bool(G4ParticleTable::* f2_contains)(const G4String &) const
G4ParticleDefinition * GetParticle(G4int index) const
list GetParticleList(G4ParticleTable *particleTable)
static G4ParticleTable * GetParticleTable()
G4bool(G4ParticleTable::* f1_contains)(const G4ParticleDefinition *) const
G4ParticleDefinition *(G4ParticleTable::* f3_FindAntiParticle)(const G4ParticleDefinition *)
G4ParticleDefinition *(G4ParticleTable::* f2_FindParticle)(const G4String &)
G4int size() const
G4int GetVerboseLevel() const
G4int entries() const
G4ParticleDefinition *(G4ParticleTable::* f3_FindParticle)(const G4ParticleDefinition *)
G4ParticleDefinition *(G4ParticleTable::* f1_FindAntiParticle)(G4int)

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4PrimaryParticle ( )

Definition at line 41 of file pyG4PrimaryParticle.cc.

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 }
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
void SetMass(G4double mas)
G4double GetProperTime() const
G4int GetPDGcode() const
G4double GetWeight() const
G4PrimaryParticle * GetNext() const
void SetMomentumDirection(const G4ThreeVector &p)
void SetWeight(G4double w)
void SetCharge(G4double chg)
G4double GetCharge() const
void Set4Momentum(G4double px, G4double py, G4double pz, G4double E)

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4PrimaryVertex ( )

Definition at line 51 of file pyG4PrimaryVertex.cc.

52 {
53  class_<G4PrimaryVertex, G4PrimaryVertex*>
54  ("G4PrimaryVertex", "primary vertex")
55  .def(init<>())
56  .def(init<G4double, G4double, G4double, G4double>())
57  .def(init<G4ThreeVector, G4double>())
58  // ---
59  .add_property("X0", &G4PrimaryVertex::GetX0)
60  .add_property("Y0", &G4PrimaryVertex::GetY0)
61  .add_property("Z0", &G4PrimaryVertex::GetZ0)
62  .add_property("T0", &G4PrimaryVertex::GetT0)
63  // ---
64  .def("GetPosition", &G4PrimaryVertex::GetPosition,
65  return_value_policy<return_by_value>())
66  .def("GetX0", &G4PrimaryVertex::GetX0)
67  .def("GetY0", &G4PrimaryVertex::GetY0)
68  .def("GetZ0", &G4PrimaryVertex::GetZ0)
69  .def("GetT0", &G4PrimaryVertex::GetT0)
70  .def("GetNumberOfParticle", &G4PrimaryVertex::GetNumberOfParticle)
71  .def("GetPrimary", &G4PrimaryVertex::GetPrimary,
72  return_internal_reference<>(), f_GetPrimary())
73  .def("SetPrimary", &G4PrimaryVertex::SetPrimary)
74  .def("GetWeight", &G4PrimaryVertex::GetWeight)
75  .def("SetWeight", &G4PrimaryVertex::SetWeight)
76  .def("Print", &G4PrimaryVertex::Print)
77  ;
78 }
G4double GetX0() const
G4int GetNumberOfParticle() const
G4ThreeVector GetPosition() const
void SetWeight(G4double w)
void Print() const
G4double GetT0() const
G4double GetWeight() const
G4PrimaryParticle * GetPrimary(G4int i=0) const
G4double GetZ0() const
G4double GetY0() const
void SetPrimary(G4PrimaryParticle *pp)

Here is the call graph for this function:

Here is the caller graph for this function:

void export_PyG4ParticleList ( )

Definition at line 85 of file pyG4ParticleList.cc.

86 {
87  class_<PyG4ParticleList>("PyG4ParticleList", "particle list")
88  .def("__iter__", iterator<PyG4ParticleList::ParticleList>())
89  .add_property("particles", range(&PyG4ParticleList::p_begin,
91  ;
92 }
p_iterator p_begin()
const G4ParticleDefinition const G4Material *G4double range
p_iterator p_end()

Here is the call graph for this function:

Here is the caller graph for this function: