Commit 4eab4603 authored by Niklas Stefan Nolte's avatar Niklas Stefan Nolte 🔥 Committed by Christoph Hasse
Browse files

add SubCombination functionality into ParticleCombination

parent 5fb312ef
......@@ -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