Commit 47829c3a authored by Christoph Hasse's avatar Christoph Hasse 🤸🏻
Browse files

Merge branch 'NN_subcombination' into 'master'

add SubCombination functionality into ParticleCombination

See merge request !992
parents 5fb312ef 4eab4603
Pipeline #3094203 passed with stage
in 34 seconds
......@@ -70,6 +70,15 @@ struct ParticleCombination {
return px * px + py * py + pz * pz;
}
template <std::size_t... idxs>
ParticleCombination<std::tuple_element_t<idxs, std::tuple<InputTypes...>>...> get_subcombination() const {
ParticleCombination<std::tuple_element_t<idxs, std::tuple<InputTypes...>>...> out{m_distance_calculator,
m_geometry};
static_assert( ( ( idxs >= 0 ) && ... ) && ( ( idxs < N ) && ... ) );
out.m_children = {m_children[idxs]...};
return out;
}
/** @brief Magnitude of the four momentum sum of the children.
*/
Combination::details::fp p() const { return std::sqrt( mom2() ); }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment