File indexing completed on 2025-08-05 08:09:08
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Utilities/detail/Extendable.hpp"
0012 #include "Acts/Utilities/detail/MPL/all_of.hpp"
0013 #include "Acts/Utilities/detail/MPL/has_duplicates.hpp"
0014 #include "Acts/Utilities/detail/MPL/type_collector.hpp"
0015 #include "Fatras/Kernel/detail/selector_list_implementation.hpp"
0016 #include "Fatras/Kernel/detail/selector_signature_check.hpp"
0017
0018 namespace Fatras {
0019
0020
0021
0022
0023
0024
0025 template <bool inclusive, typename... selectors>
0026 struct SelectorListAXOR : private Acts::detail::Extendable<selectors...> {
0027 private:
0028 static_assert(not Acts::detail::has_duplicates_v<selectors...>,
0029 "same selector type specified several times");
0030
0031 using Acts::detail::Extendable<selectors...>::tuple;
0032
0033 public:
0034 using Acts::detail::Extendable<selectors...>::get;
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046 template <typename detector_t, typename particle_t>
0047 bool operator()(const detector_t &detector,
0048 const particle_t &particle) const {
0049
0050 static_assert(Acts::detail::all_of_v<detail::selector_list_signature_check_v<selectors, detector_t, particle_t>...>,
0051 "not all particle selectors support the specified interface");
0052
0053
0054
0055 typedef detail::selector_list_impl<selectors...> impl;
0056 return impl::select(tuple(), detector, particle, inclusive);
0057 }
0058 };
0059
0060 template <typename... selectors>
0061 using SelectorListOR = SelectorListAXOR<true, selectors...>;
0062
0063 template <typename... selectors>
0064 using SelectorListAND = SelectorListAXOR<false, selectors...>;
0065
0066 }