Skip to content
Snippets Groups Projects
Commit 1c106592 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Add NPE module

parent 48fb8744
No related branches found
No related tags found
1 merge request!4Resolve "Include JNPE_t.hh"
......@@ -26,14 +26,14 @@ def get_jpp_include():
ext_modules = [
Extension(
'jppy.pdf',
['src/pdf.cc'],
'jppy.{}'.format(module),
['src/{}.cc'.format(module)],
include_dirs=[
get_pybind_include(),
get_pybind_include(user=True),
get_jpp_include()
],
language='c++')
language='c++') for module in ['pdf', 'npe']
]
# Populating the __init__.py with submodule imports, so that one can import
......
#include <pybind11/pybind11.h>
#include "JPhysics/JNPE_t.hh"
namespace py = pybind11;
PYBIND11_MODULE(npe, m) {
m.doc() = "NPE utilities";
py::class_<JMuonNPE_t>(m, "JMuonNPE")
.def(py::init<const std::string &, double, int, double>(),
py::arg("file_descriptor"),
py::arg("TTS"),
py::arg("number_of_points") = 25,
py::arg("epsilon") = 1e-10)
.def("calculate", &JMuonNPE_t::calculate,
py::arg("E"),
py::arg("R"),
py::arg("theta"),
py::arg("phi")
),
py::class_<JShowerNPE_t>(m, "JShowerNPE")
.def(py::init<const std::string &, int>(),
py::arg("file_descriptor"),
py::arg("number_of_points") = 0)
.def("calculate", &JShowerNPE_t::calculate,
py::arg("E"),
py::arg("D"),
py::arg("cd"),
py::arg("theta"),
py::arg("phi")
);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment