Skip to content
Snippets Groups Projects
Commit 4eab4603 authored by Niklas Stefan Nolte's avatar Niklas Stefan Nolte :fire: Committed by Christoph Hasse
Browse files

add SubCombination functionality into ParticleCombination

parent 5fb312ef
No related branches found
No related tags found
1 merge request!992add SubCombination functionality into ParticleCombination
......@@ -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() ); }
......
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