17 namespace ActsFatras {
25 template <
typename... processes_t>
37 template <
typename generator_t>
42 std::is_same_v<
bool, decltype(processes_t()(generator, slab, particle,
44 "Not all processes conform to the expected interface");
46 return impl(std::index_sequence_for<processes_t...>(), generator, slab,
52 std::tuple_element_t<
I, std::tuple<processes_t...>>&
get() {
56 template <
typename process_t>
66 template <
typename process_t>
74 template <
class T,
class Tuple>
76 template <
class T,
class... Types>
77 struct Index<
T, std::tuple<T, Types...>> {
78 static constexpr std::size_t
value = 0
u;
80 template <
class T,
class U,
class... Types>
81 struct Index<
T, std::tuple<U, Types...>> {
82 static constexpr std::size_t
value =
86 std::bitset<
sizeof...(processes_t)>
m_mask;
90 template <
typename generator_t>
91 bool impl(std::index_sequence<>, generator_t&,
93 std::vector<Particle>&)
const {
96 template <std::size_t I0, std::size_t... INs,
typename generator_t>
99 std::vector<Particle>& generated)
const {
102 std::get<I0>(
m_processes)(generator, slab, particle, generated)) {
106 return impl(std::index_sequence<INs...>(), generator, slab, particle,