32 #include <boost/python.hpp>
41 using namespace boost::python;
46 namespace pyG4EmCalculator {
83 (G4double,
const G4ParticleDefinition*,
93 GetCrossSectionPerVolume, 4, 5)
97 (G4double,
const G4ParticleDefinition*,
107 GetMeanFreePath, 4, 5)
111 (G4double,
const G4ParticleDefinition*,
116 (G4double,
const G4String&,
const G4String&,
const G4String&, G4double)
123 (G4double,
const G4ParticleDefinition*,
const G4Material*)
132 (G4double,
const G4ParticleDefinition*,
const G4Material*, G4double)
136 (G4double,
const G4String&,
const G4String&, G4double)
140 ComputeElectronicDEDX, 3, 4)
144 (G4double,
const G4ParticleDefinition*,
const G4Material*, G4double)
148 (G4double,
const G4String&,
const G4String&, G4double)
155 (G4double,
const G4ParticleDefinition*,
160 (G4double,
const G4String&,
const G4String&,
const G4String&, G4double)
164 ComputeCrossSectionPerVolume, 4, 5)
168 (G4double,
const G4ParticleDefinition*,
const G4String&,
169 G4double, G4double, G4double)
177 ComputeCrossSectionPerAtom, 5, 6)
180 ComputeCrossSectionPerAtom, 4, 5)
184 (G4double,
const G4ParticleDefinition*,
const G4Material*)
193 (G4double,
const G4ParticleDefinition*,
198 (G4double,
const G4String&,
const G4String&,
const G4String&, G4double)
202 ComputeMeanFreePath, 4, 5)
209 using namespace pyG4EmCalculator;
216 class_<G4EmCalculator, boost::noncopyable>
217 (
"G4EmCalculator",
"Provide access to dE/dx and cross section")
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())
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())
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)
258 .def(
"ComputeMeanFreePath",
259 f1_ComputeMeanFreePath, f_ComputeMeanFreePath())
260 .def(
"ComputeMeanFreePath",
261 f2_ComputeMeanFreePath, f_ComputeMeanFreePath())
264 return_value_policy<reference_existing_object>())
266 return_value_policy<reference_existing_object>())
268 return_value_policy<reference_existing_object>())
270 f_FindCouple()[return_value_policy<reference_existing_object>()])
const G4Material * FindMaterial(const G4String &)
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateTubeVolume, CreateTubeVolume, 4, 6) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateConeVolume
void PrintRangeTable(const G4ParticleDefinition *)
void export_G4EmCalculator()
const G4ThreeVector const G4double const
void PrintInverseRangeTable(const G4ParticleDefinition *)
G4double GetDEDX(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *, const G4Region *r=0)
const G4MaterialCutsCouple * FindCouple(const G4Material *, const G4Region *r=0)
const G4ParticleDefinition const G4Material *G4double range
ComputeCrossSectionPerAtom
const G4ParticleDefinition * FindParticle(const G4String &)
const G4Region * FindRegion(const G4String &)
void SetVerbose(G4int val)
void PrintDEDXTable(const G4ParticleDefinition *)