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

Merge branch '2-include-jnpe_t-hh' into 'master'

Resolve "Include JNPE_t.hh"

Closes #2

See merge request !4
parents 48fb8744 e271164f
No related branches found
No related tags found
1 merge request!4Resolve "Include JNPE_t.hh"
Pipeline #10150 passed with warnings
......@@ -8,7 +8,7 @@ The jppy Python package
:target: https://km3py.pages.km3net.de/jppy
This software provides Python access to functionalities in Jpp, like accessing
PDF functions.
PDF and NPE functions.
It currently depends on a few Jpp headers (no Jpp compilation needed), make
sure the ``$JPP_DIR`` is pointing to the Jpp directory.
......
......@@ -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 &>(),
py::arg("file_descriptor"))
.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