Skip to content

Commit

Permalink
fixing fourmom and indexing bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrube committed Sep 7, 2020
1 parent 3843dc8 commit 3fab5f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .ci/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using BinaryBuilder
using Pkg

name = "FastJet_Julia_Wrapper"
version = v"0.8.3-alpha1"
version = v"0.8.4-alpha1"

# Collection of sources required to build Fjwbuilder
sources = [
Expand Down
15 changes: 3 additions & 12 deletions src/fastJetWrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,16 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& fastjet)
.method("modp", &PseudoJet::modp)
.method("Et", &PseudoJet::Et)
.method("Et2", &PseudoJet::Et2)
.method("operator[]", &PseudoJet::operator[])
.method("_getindex", &PseudoJet::operator[])
.method("kt_distance", &PseudoJet::kt_distance)
.method("plain_distance", &PseudoJet::plain_distance)
.method("squared_distance", &PseudoJet::squared_distance)
.method("delta_R", &PseudoJet::delta_R)
.method("delta_phi_to", &PseudoJet::delta_phi_to)
.method("beam_distance", &PseudoJet::beam_distance)
.method("set_user_index", &PseudoJet::set_user_index)
.method("user_index", &PseudoJet::user_index);

// four_mom returns a valarray... There's no factory for this, yet, so we're just returning a vector here
fastjet.method("four_mom", [](const PseudoJet& pj)->std::vector<double> {
vector<double> mom(4);
mom[0] = pj.px();
mom[1] = pj.py();
mom[2] = pj.pz();
mom[4] = pj.e();
return mom;
});
.method("user_index", &PseudoJet::user_index)
.method("four_mom", &PseudoJet::four_mom);

// we mostly don't need the jet definition on the julia side.
// only used to instantiate the clustering
Expand Down

0 comments on commit 3fab5f9

Please sign in to comment.