31 #include <boost/python.hpp>
40 using namespace boost::python;
45 namespace pyG4EmCalculator {
92 GetCrossSectionPerVolume, 4, 5)
101 (G4double, const G4String&, const G4String&,
102 const G4String&, const G4String&)
106 GetMeanFreePath, 4, 5)
110 (G4double, const G4ParticleDefinition*,
111 const G4String&, const G4Material*, G4double)
115 (G4double, const G4String&, const G4String&, const G4String&, G4double)
122 (G4double, const G4ParticleDefinition*, const G4Material*)
126 (G4double, const G4String&, const G4String&)
131 (G4double, const G4ParticleDefinition*, const G4Material*, G4double)
135 (G4double, const G4String&, const G4String&, G4double)
139 ComputeElectronicDEDX, 3, 4)
143 (G4double, const G4ParticleDefinition*, const G4Material*, G4double)
147 (G4double, const G4String&, const G4String&, G4double)
154 (G4double, const G4ParticleDefinition*,
155 const G4String&, const G4Material*, G4double)
159 (G4double, const G4String&, const G4String&, const G4String&, G4double)
163 ComputeCrossSectionPerVolume, 4, 5)
167 (G4double, const G4ParticleDefinition*, const G4String&,
168 G4double, G4double, G4double)
172 (G4double, const G4String&, const G4String&, const
G4Element*, G4double)
176 ComputeCrossSectionPerAtom, 5, 6)
179 ComputeCrossSectionPerAtom, 4, 5)
183 (G4double, const G4ParticleDefinition*, const G4Material*)
187 (G4double range, const G4String&, const G4String&)
192 (G4double, const G4ParticleDefinition*,
193 const G4String&, const G4Material*, G4double)
197 (G4double, const G4String&, const G4String&, const G4String&, G4double)
201 ComputeMeanFreePath, 4, 5)
208 using namespace pyG4EmCalculator;
215 class_<G4EmCalculator, boost::noncopyable>
216 (
"G4EmCalculator",
"Provide access to dE/dx and cross section")
224 .def(
"GetCrossSectionPerVolume",
226 .def(
"GetCrossSectionPerVolume",
228 .def(
"GetMeanFreePath", f1_GetMeanFreePath, f_GetMeanFreePath())
235 .def(
"ComputeDEDX", f1_ComputeDEDX, f_ComputeDEDX())
240 f_ComputeElectronicDEDX())
242 f_ComputeElectronicDEDX())
243 .def(
"ComputeTotalDEDX", f1_ComputeTotalDEDX, f_ComputeTotalDEDX())
246 .def(
"ComputeCrossSectionPerVolume",
247 f1_ComputeCrossSectionPerVolume, f_ComputeCrossSectionPerVolume())
248 .def(
"ComputeCrossSectionPerVolume",
250 .def(
"ComputeCrossSectionPerAtom",
251 f1_ComputeCrossSectionPerAtom, f_ComputeCrossSectionPerAtom())
252 .def(
"ComputeCrossSectionPerAtom",
257 .def(
"ComputeMeanFreePath",
259 .def(
"ComputeMeanFreePath",
263 return_value_policy<reference_existing_object>())
265 return_value_policy<reference_existing_object>())
267 return_value_policy<reference_existing_object>())
269 f_FindCouple()[return_value_policy<reference_existing_object>()])