diff --git a/FixedOrderGen/include/Subleading.hh b/FixedOrderGen/include/Subleading.hh index 9f785e1..69093c4 100644 --- a/FixedOrderGen/include/Subleading.hh +++ b/FixedOrderGen/include/Subleading.hh @@ -1,34 +1,36 @@ /** * \authors The HEJ collaboration (see AUTHORS for details) * \date 2019 * \copyright GPLv2 or later */ #pragma once #include +#include namespace HEJFOG { namespace subleading { //!< @TODO confusing name with capital Subleading /** * Bit position of different subleading channels * e.g. (unsigned int) 1 => only unordered */ enum Channels: unsigned { uno, unordered = uno, cqqbar, central_qqbar = cqqbar, eqqbar, extremal_qqbar = eqqbar, first = uno, last = eqqbar, }; } // namespace subleading + std::string_view name(subleading::Channels c); using Subleading = std::bitset; namespace subleading { static constexpr Subleading ALL{~0u}; static constexpr Subleading NONE{0u}; } } // namespace HEJFOG diff --git a/FixedOrderGen/src/Subleading.cc b/FixedOrderGen/src/Subleading.cc new file mode 100644 index 0000000..053bfed --- /dev/null +++ b/FixedOrderGen/src/Subleading.cc @@ -0,0 +1,19 @@ +#include "Subleading.hh" +#include + +namespace HEJFOG { + using namespace subleading; + using namespace std::string_view_literals; + + std::string_view name(Channels const c){ + switch(c) { + case unordered: + return "unordered"sv; + case central_qqbar: + return "central qqbar"sv; + case extremal_qqbar: + return "extremal qqbar"sv; + } + throw std::logic_error{"Channel not included"}; + } +}