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

Go to the source code of this file.

Functions

void export_G4ProcessManager ()
 
void export_G4ProcessTable ()
 
void export_G4VProcess ()
 
void export_G4ProcVector ()
 
void export_G4ProcessType ()
 
void export_G4EmCalculator ()
 
void export_G4ProductionCutsTable ()
 
void export_G4VCrossSectionHandler ()
 
void export_G4CrossSectionHandler ()
 
 BOOST_PYTHON_MODULE (G4processes)
 

Function Documentation

BOOST_PYTHON_MODULE ( G4processes  )

Definition at line 49 of file pymodG4processes.cc.

50 {
60 }
void export_G4ProcVector()
void export_G4ProcessManager()
void export_G4ProcessTable()
void export_G4EmCalculator()
void export_G4CrossSectionHandler()
void export_G4ProductionCutsTable()
void export_G4VCrossSectionHandler()
void export_G4ProcessType()
void export_G4VProcess()
Definition: pyG4VProcess.cc:51

Here is the call graph for this function:

void export_G4CrossSectionHandler ( )

Definition at line 40 of file pyG4CrossSectionHandler.cc.

41 {
42  class_<G4CrossSectionHandler, bases<G4VCrossSectionHandler>,
43  boost::noncopyable>
44  ("G4CrossSectionHandler", "cross section handler")
45  .def(init<>())
46  ;
47 }

Here is the caller graph for this function:

void export_G4EmCalculator ( )

Definition at line 214 of file pyG4EmCalculator.cc.

215 {
216  class_<G4EmCalculator, boost::noncopyable>
217  ("G4EmCalculator", "Provide access to dE/dx and cross section")
218  // ---
219  .def("GetDEDX", f1_GetDEDX, f_GetDEDX())
220  .def("GetDEDX", f2_GetDEDX, f_GetDEDX())
221  .def("GetRange", f1_GetRange, f_GetRange())
222  .def("GetRange", f2_GetDEDX, f_GetRange())
223  .def("GetKinEnergy", f1_GetKinEnergy, f_GetKinEnergy())
224  .def("GetKinEnergy", f2_GetKinEnergy, f_GetKinEnergy())
225  .def("GetCrossSectionPerVolume",
226  f1_GetCrossSectionPerVolume, f_GetCrossSectionPerVolume())
227  .def("GetCrossSectionPerVolume",
228  f2_GetCrossSectionPerVolume, f_GetCrossSectionPerVolume())
229  .def("GetMeanFreePath", f1_GetMeanFreePath, f_GetMeanFreePath())
230  .def("GetMeanFreePath", f2_GetMeanFreePath, f_GetMeanFreePath())
231  // ---
232  .def("PrintDEDXTable", &G4EmCalculator::PrintDEDXTable)
233  .def("PrintRangeTable", &G4EmCalculator::PrintRangeTable)
234  .def("PrintInverseRangeTable", &G4EmCalculator::PrintInverseRangeTable)
235  // ---
236  .def("ComputeDEDX", f1_ComputeDEDX, f_ComputeDEDX())
237  .def("ComputeDEDX", f2_ComputeDEDX, f_ComputeDEDX())
238  .def("ComputeNuclearDEDX", f1_ComputeNuclearDEDX)
239  .def("ComputeNuclearDEDX", f2_ComputeNuclearDEDX)
240  .def("ComputeElectronicDEDX", f1_ComputeElectronicDEDX,
241  f_ComputeElectronicDEDX())
242  .def("ComputeDEDX", f2_ComputeElectronicDEDX,
243  f_ComputeElectronicDEDX())
244  .def("ComputeTotalDEDX", f1_ComputeTotalDEDX, f_ComputeTotalDEDX())
245  .def("ComputeTotalDEDX", f2_ComputeTotalDEDX, f_ComputeTotalDEDX())
246  // ---
247  .def("ComputeCrossSectionPerVolume",
248  f1_ComputeCrossSectionPerVolume, f_ComputeCrossSectionPerVolume())
249  .def("ComputeCrossSectionPerVolume",
250  f2_ComputeCrossSectionPerVolume, f_ComputeCrossSectionPerVolume())
251  .def("ComputeCrossSectionPerAtom",
252  f1_ComputeCrossSectionPerAtom, f_ComputeCrossSectionPerAtom())
253  .def("ComputeCrossSectionPerAtom",
254  f2_ComputeCrossSectionPerAtom, g_ComputeCrossSectionPerAtom())
255  .def("ComputeEnergyCutFromRangeCut", f1_ComputeEnergyCutFromRangeCut)
256  .def("ComputeEnergyCutFromRangeCut", f2_ComputeEnergyCutFromRangeCut)
257  // ---
258  .def("ComputeMeanFreePath",
259  f1_ComputeMeanFreePath, f_ComputeMeanFreePath())
260  .def("ComputeMeanFreePath",
261  f2_ComputeMeanFreePath, f_ComputeMeanFreePath())
262  // ---
263  .def("FindParticle", &G4EmCalculator::FindParticle,
264  return_value_policy<reference_existing_object>())
265  .def("FindMaterial", &G4EmCalculator::FindMaterial,
266  return_value_policy<reference_existing_object>())
267  .def("FindRegion", &G4EmCalculator::FindRegion,
268  return_value_policy<reference_existing_object>())
269  .def("FindCouple", &G4EmCalculator::FindCouple,
270  f_FindCouple()[return_value_policy<reference_existing_object>()])
271  // ---
272  .def("SetVerbose", &G4EmCalculator::SetVerbose)
273  ;
274 }
const G4MaterialCutsCouple * FindCouple(const G4Material *, const G4Region *r=nullptr)
const G4Material * FindMaterial(const G4String &)
void PrintRangeTable(const G4ParticleDefinition *)
void PrintInverseRangeTable(const G4ParticleDefinition *)
const G4ParticleDefinition * FindParticle(const G4String &)
const G4Region * FindRegion(const G4String &)
void SetVerbose(G4int val)
void PrintDEDXTable(const G4ParticleDefinition *)

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4ProcessManager ( )

Definition at line 171 of file pyG4ProcessManager.cc.

172 {
173  class_<G4ProcessManager, G4ProcessManager*, boost::noncopyable>
174  ("G4ProcessManager", "process manager class", no_init)
175  // ---
176  .def("GetProcessList", f_GetProcessList)
177  .def("GetProcessListLength", &G4ProcessManager::GetProcessListLength)
178  .def("GetProcessIndex", &G4ProcessManager::GetProcessIndex)
179  .def("GetProcessVector", f_GetProcessVector,
180  g_GetProcessVector())
181  .def("GetAtRestProcessVector", f_GetAtRestProcessVector,
182  g_GetAtRestProcessVector())
183  .def("GetAlongStepProcessVector", f_GetAlongStepProcessVector,
184  g_GetAlongStepProcessVector())
185  .def("GetPostStepProcessVector", f_GetPostStepProcessVector,
186  g_GetPostStepProcessVector())
187  .def("GetProcessVectorIndex",
189  f_GetProcessVectorIndex())
190  .def("GetAtRestIndex", &G4ProcessManager::GetAtRestIndex,
191  f_GetAtRestIndex())
192  .def("GetAlongStepIndex", &G4ProcessManager::GetAlongStepIndex,
193  f_GetAlongStepIndex())
194  .def("GetPostStepIndex", &G4ProcessManager::GetPostStepIndex,
195  f_GetPostStepIndex())
196  // ----
197  .def("AddProcess", &G4ProcessManager::AddProcess,
198  f_AddProcess())
199  .def("AddRestProcess", &G4ProcessManager::AddRestProcess,
200  f_AddRestProcess())
201  .def("AddDiscreteProcess", &G4ProcessManager::AddDiscreteProcess,
202  f_AddDiscreteProcess())
203  .def("AddContinuousProcess", &G4ProcessManager::AddContinuousProcess,
204  f_AddContinuousProcess())
205  // ---
206  .def("GetProcessOrdering", &G4ProcessManager::GetProcessOrdering)
207  .def("SetProcessOrdering", &G4ProcessManager::SetProcessOrdering,
208  f_SetProcessOrdering())
209  .def("SetProcessOrderingToFirst",
211  .def("SetProcessOrderingToLast",
213  // ---
214  .def("RemoveProcess", f1_RemoveProcess,
215  return_value_policy<reference_existing_object>())
216  .def("RemoveProcess", f2_RemoveProcess,
217  return_value_policy<reference_existing_object>())
218  // ---
219  .def("SetProcessActivation", f1_SetProcessActivation,
220  return_value_policy<reference_existing_object>())
221  .def("SetProcessActivation", f2_SetProcessActivation,
222  return_value_policy<reference_existing_object>())
223  .def("GetProcessActivation", f1_GetProcessActivation)
224  .def("GetProcessActivation", f2_GetProcessActivation)
225  // ---
226  .def("GetParticleType", &G4ProcessManager::GetParticleType,
227  return_internal_reference<>())
228  .def("SetParticleType", &G4ProcessManager::SetParticleType)
229  .def("DumpInfo", &G4ProcessManager::DumpInfo)
230  .def("SetVerboseLevel", &G4ProcessManager::SetVerboseLevel)
231  .def("GetVerboseLevel", &G4ProcessManager::GetVerboseLevel)
232  ;
233 
234  // enums...
235  enum_<G4ProcessVectorTypeIndex>("G4ProcessVectorTypeIndex")
236  .value("typeGPIL", typeGPIL)
237  .value("typeGPIL", typeDoIt)
238  ;
239 
240  enum_<G4ProcessVectorDoItIndex>("G4ProcessVectorDoItIndex")
241  .value("idxAll", idxAll)
242  .value("idxAtRest", idxAtRest)
243  .value("idxAlongStep", idxAlongStep)
244  .value("idxPostStep", idxPostStep)
245  ;
246 
247  enum_<G4ProcessVectorOrdering>("G4ProcessVectorOrdering")
248  .value("ordInActive", ordInActive)
249  .value("ordDefault", ordDefault)
250  .value("ordLast", ordLast)
251  ;
252 }
G4int GetProcessVectorIndex(G4VProcess *aProcess, G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL) const
G4int GetAlongStepIndex(G4VProcess *aProcess, G4ProcessVectorTypeIndex typ=typeGPIL) const
void SetProcessOrderingToFirst(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4int GetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
void SetVerboseLevel(G4int value)
G4int GetVerboseLevel() const
void SetParticleType(const G4ParticleDefinition *)
G4int GetAtRestIndex(G4VProcess *aProcess, G4ProcessVectorTypeIndex typ=typeGPIL) const
G4VProcess *(G4ProcessManager::* f1_SetProcessActivation)(G4VProcess *, G4bool)
const XML_Char int const XML_Char * value
Definition: expat.h:331
G4bool(G4ProcessManager::* f1_GetProcessActivation)(G4VProcess *) const
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
list f_GetProcessVector(const G4ProcessManager *procMgr, G4ProcessVectorDoItIndex idx, G4ProcessVectorTypeIndex typ=typeGPIL)
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
G4ParticleDefinition * GetParticleType() const
G4VProcess *(G4ProcessManager::* f2_RemoveProcess)(G4int)
void SetProcessOrderingToLast(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
G4int GetPostStepIndex(G4VProcess *aProcess, G4ProcessVectorTypeIndex typ=typeGPIL) const
list f_GetProcessList(const G4ProcessManager *procMgr)
G4int GetProcessIndex(G4VProcess *) const
G4int AddRestProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4VProcess *(G4ProcessManager::* f2_SetProcessActivation)(G4int, G4bool)
G4int GetProcessListLength() const
G4bool(G4ProcessManager::* f2_GetProcessActivation)(G4int) const
G4int AddContinuousProcess(G4VProcess *aProcess, G4int ord=ordDefault)

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4ProcessTable ( )

Definition at line 144 of file pyG4ProcessTable.cc.

145 {
146  class_<G4ProcessTable, G4ProcessTable*, boost::noncopyable>
147  ("G4ProcessTable", "process table")
148  // ---
149  .def("GetProcessTable", &G4ProcessTable::GetProcessTable,
150  return_value_policy<reference_existing_object>())
151  .staticmethod("GetProcessTable")
152  .def("Length", &G4ProcessTable::Length)
153  //.def("Insert", &G4ProcessTable::Insert) // protected
154  //.def("Remove", &G4ProcessTable::Remove) // protected
155  // ---
156  .def("FindProcess", f1_FindProcess,
157  return_value_policy<reference_existing_object>())
158  .def("FindProcess", f2_FindProcess,
159  return_value_policy<reference_existing_object>())
160  .def("FindProcess", f3_FindProcess,
161  return_value_policy<reference_existing_object>())
162  .def("FindProcess", f3_FindProcess,
163  return_value_policy<reference_existing_object>())
164  // ---
165  .def("FindProcesses", f1_FindProcesses)
166  .def("FindProcesses", f2_FindProcesses)
167  .def("FindProcesses", f3_FindProcesses)
168  .def("FindProcesses", f4_FindProcesses)
169  // ---
170  .def("SetProcessActivation", f1_SetProcessActivation)
171  .def("SetProcessActivation", f2_SetProcessActivation)
172  .def("SetProcessActivation", f3_SetProcessActivation)
173  .def("SetProcessActivation", f4_SetProcessActivation)
174  .def("SetProcessActivation", f5_SetProcessActivation)
175  .def("SetProcessActivation", f6_SetProcessActivation)
176  .def("SetProcessActivation", f7_SetProcessActivation)
177  .def("SetProcessActivation", f8_SetProcessActivation)
178  // ---
179  .def("GetNameList", &G4ProcessTable::GetNameList,
180  return_internal_reference<>())
181  .def("DumpInfo", &G4ProcessTable::DumpInfo, f_DumpInfo())
182  .def("SetVerboseLevel", &G4ProcessTable::SetVerboseLevel)
183  .def("GetVerboseLevel", &G4ProcessTable::GetVerboseLevel)
184  ;
185 }
G4VProcess *(G4ProcessTable::* f2_FindProcess)(const G4String &, const G4ParticleDefinition *) const
void DumpInfo(G4VProcess *process, G4ParticleDefinition *particle=0)
list f4_FindProcesses(G4ProcessTable *procTable, G4ProcessType ptype)
G4VProcess *(G4ProcessManager::* f1_SetProcessActivation)(G4VProcess *, G4bool)
void SetVerboseLevel(G4int value)
list f1_FindProcesses(G4ProcessTable *procTable)
G4int Length() const
list f3_FindProcesses(G4ProcessTable *procTable, const G4String &pname)
G4ProcNameVector * GetNameList()
G4VProcess *(G4ProcessTable::* f1_FindProcess)(const G4String &, const G4String &) const
G4int GetVerboseLevel() const
list f2_FindProcesses(G4ProcessTable *procTable, const G4ProcessManager *procManager)
G4VProcess *(G4ProcessManager::* f2_SetProcessActivation)(G4int, G4bool)
static G4ProcessTable * GetProcessTable()
G4VProcess *(G4ProcessTable::* f3_FindProcess)(const G4String &, const G4ProcessManager *) const

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4ProcessType ( )

Definition at line 40 of file pyG4ProcessType.cc.

41 {
42  enum_<G4ProcessType>("G4ProcessType")
43  .value("fNotDefined", fNotDefined)
44  .value("fTransportation", fTransportation)
45  .value("fElectromagnetic", fElectromagnetic)
46  .value("fOptical", fOptical)
47  .value("fHadronic", fHadronic)
48  .value("fPhotolepton_hadron", fPhotolepton_hadron)
49  .value("fDecay", fDecay)
50  .value("fGeneral", fGeneral)
51  .value("fParameterisation", fParameterisation)
52  .value("fUserDefined", fUserDefined)
53  ;
54 }
const XML_Char int const XML_Char * value
Definition: expat.h:331

Here is the caller graph for this function:

void export_G4ProcVector ( )

Definition at line 49 of file pyG4ProcVector.cc.

50 {
51  class_<G4ProcVector> ("G4ProcVector", "process vector")
53  ;
54 }

Here is the caller graph for this function:

void export_G4ProductionCutsTable ( )

Definition at line 42 of file pyG4ProductionCutsTable.cc.

43 {
44  class_<G4ProductionCutsTable, boost::noncopyable>
45  ("G4ProductionCutsTable", "production cuts table", no_init)
46  .def("GetProductionCutsTable",
48  return_value_policy<reference_existing_object>())
49  .staticmethod("GetProductionCutsTable")
50 
51  // internally used methods are limmitted to be exposed...
52 
53  // ---
54  .def("GetLowEdgeEnergy", &G4ProductionCutsTable::GetLowEdgeEnergy)
55  .def("GetHighEdgeEnergy", &G4ProductionCutsTable::GetHighEdgeEnergy)
56  .def("SetEnergyRange", &G4ProductionCutsTable::SetEnergyRange)
57  .def("DumpCouples", &G4ProductionCutsTable::DumpCouples)
58  .def("IsModified", &G4ProductionCutsTable::IsModified)
59  // ---
60 #if G4VERSION_NUMBER >= 830
61  .def("ConvertRangeToEnergy", &G4ProductionCutsTable::ConvertRangeToEnergy)
62 #endif
63  // ---
64  .def("SetVerboseLevel", &G4ProductionCutsTable::SetVerboseLevel)
65  .def("GetVerboseLevel", &G4ProductionCutsTable::GetVerboseLevel)
66  ;
67 }
G4double GetHighEdgeEnergy() const
void SetEnergyRange(G4double lowedge, G4double highedge)
void SetVerboseLevel(G4int value)
G4double GetLowEdgeEnergy() const
static G4ProductionCutsTable * GetProductionCutsTable()
G4double ConvertRangeToEnergy(const G4ParticleDefinition *particle, const G4Material *material, G4double range)

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4VCrossSectionHandler ( )

Definition at line 61 of file pyG4VCrossSectionHandler.cc.

62 {
63  class_<G4VCrossSectionHandler, boost::noncopyable>
64  ("G4VCrossSectionHandler", "cross section handler", no_init)
65  // ---
66  .def("Initialise", &G4VCrossSectionHandler::Initialise,
67  f_Initialise())
68  .def("SelectRandomElement", &G4VCrossSectionHandler::SelectRandomElement,
69  return_value_policy<reference_existing_object>())
70  .def("SelectRandomShell", &G4VCrossSectionHandler::SelectRandomShell)
71  .def("FindValue", f1_FindValue)
72  .def("FindValue", f2_FindValue)
73  .def("ValueForMaterial", &G4VCrossSectionHandler::ValueForMaterial)
74  .def("LoadData", &G4VCrossSectionHandler::LoadData)
75  .def("LoadShellData", &G4VCrossSectionHandler::LoadShellData)
76  .def("PrintData", &G4VCrossSectionHandler::PrintData)
77  .def("Clear", &G4VCrossSectionHandler::Clear)
78  ;
79 }
G4int SelectRandomShell(G4int Z, G4double e) const
G4double ValueForMaterial(const G4Material *material, G4double e) const
G4double(G4VCrossSectionHandler::* f2_FindValue)(G4int, G4double, G4int) const
void LoadShellData(const G4String &dataFile)
void Initialise(G4VDataSetAlgorithm *interpolation=0, G4double minE=250 *CLHEP::eV, G4double maxE=100 *CLHEP::GeV, G4int numberOfBins=200, G4double unitE=CLHEP::MeV, G4double unitData=CLHEP::barn, G4int minZ=1, G4int maxZ=99)
void LoadData(const G4String &dataFile)
const G4Element * SelectRandomElement(const G4MaterialCutsCouple *material, G4double e) const
G4double(G4VCrossSectionHandler::* f1_FindValue)(G4int, G4double) const

Here is the call graph for this function:

Here is the caller graph for this function:

void export_G4VProcess ( )

Definition at line 51 of file pyG4VProcess.cc.

52 {
53  class_<G4VProcess, G4VProcess*, boost::noncopyable>
54  ("G4VProcess", "base class for process", no_init)
55  // ---
56  // Note that only limited methods are exposed.
57  .def("SetPILfactor", &G4VProcess::SetPILfactor)
58  .def("GetPILfactor", &G4VProcess::GetPILfactor)
59  .def("IsApplicable", &G4VProcess::IsApplicable)
60  .def("BuildPhysicsTable", &G4VProcess::BuildPhysicsTable)
61  .def("PreparePhysicsTable", &G4VProcess::PreparePhysicsTable)
62  .def("StorePhysicsTable", &G4VProcess::StorePhysicsTable)
63  .def("RetrievePhysicsTable", &G4VProcess::RetrievePhysicsTable)
64  .def("GetPhysicsTableFileName", &G4VProcess::GetPhysicsTableFileName,
65  f_GetPhysicsTableFileName()
66  [return_value_policy<return_by_value>()])
67  .def("GetProcessName", &G4VProcess::GetProcessName,
68  return_value_policy<return_by_value>())
69  .def("GetProcessType", &G4VProcess::GetProcessType)
70  .def("DumpInfo", &G4VProcess::DumpInfo)
71  .def("SetVerboseLevel", &G4VProcess::SetVerboseLevel)
72  .def("GetVerboseLevel", &G4VProcess::GetVerboseLevel)
73  ;
74 }
G4ProcessType GetProcessType() const
Definition: G4VProcess.hh:414
const G4String & GetPhysicsTableFileName(const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
Definition: G4VProcess.cc:186
G4int GetVerboseLevel() const
Definition: G4VProcess.hh:442
virtual void PreparePhysicsTable(const G4ParticleDefinition &)
Definition: G4VProcess.hh:217
G4double GetPILfactor() const
Definition: G4VProcess.hh:474
virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &, G4bool)
Definition: G4VProcess.hh:236
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
Definition: G4VProcess.hh:210
virtual void DumpInfo() const
Definition: G4VProcess.cc:178
virtual G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &, G4bool)
Definition: G4VProcess.hh:231
void SetPILfactor(G4double value)
Definition: G4VProcess.hh:467
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition: G4VProcess.hh:205
void SetVerboseLevel(G4int value)
Definition: G4VProcess.hh:437

Here is the call graph for this function:

Here is the caller graph for this function: