Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
KWilsonGroup.cpp
Go to the documentation of this file.
1#include "KWilsonGroup.h"
2
3namespace {
4
5std::unordered_map<WCoefId, scalar_t> k_identity_running_for_order(
6 const std::unordered_map<QCDOrder, std::unordered_map<WCoefId, scalar_t>>& coef_matching,
7 QCDOrder order
8) {
9 // The K group currently has no non-trivial QCD evolution implemented in this
10 // basis. The safest running map is therefore the identity at each
11 // perturbative order:
12 //
13 // C_i(mu_h)|_order = C_i(mu_W)|_order
14 //
15 // Important: do not use a fixed C1..C10 array here. WGroup::K contains its
16 // own ids: CK9, CK10, CKQ1, CKQ2, CK_L, CPK9, CPK10, CPKQ1, CPKQ2.
17 // It does not contain C1..C10.
18 //
19 // Also be tolerant with missing coefficients/orders: some K coefficients are
20 // only defined at LO, while CK10 / CK_L can be requested at NLO depending on
21 // the decay. Missing entries are interpreted as zero rather than throwing
22 // unordered_map::at.
23 const auto members = WCoefMapper::get_group(WGroup::K);
24
25 std::unordered_map<WCoefId, scalar_t> out;
26 out.reserve(members.size());
27
28 const auto order_it = coef_matching.find(order);
29
30 for (const auto coef : members) {
31 const auto id = WCoefMapper::to_id(coef);
32 scalar_t value = 0.0;
33
34 if (order_it != coef_matching.end()) {
35 const auto coef_it = order_it->second.find(id);
36 if (coef_it != order_it->second.end()) {
37 value = coef_it->second;
38 }
39 }
40
41 out.emplace(id, value);
42 }
43
44 return out;
45}
46
47} // namespace
48
49std::unordered_map<WCoefId, scalar_t> KCoefficientGroup::base_1_LO_calculation(
50 const std::unordered_map<QCDOrder, std::unordered_map<WCoefId, scalar_t>>& coef_matching,
51 const BlockSrc&
52)
53{
54 return k_identity_running_for_order(coef_matching, QCDOrder::LO);
55}
56
57std::unordered_map<WCoefId, scalar_t> KCoefficientGroup::base_1_NLO_calculation(
58 const std::unordered_map<QCDOrder, std::unordered_map<WCoefId, scalar_t>>& coef_matching,
59 const BlockSrc&
60)
61{
62 return k_identity_running_for_order(coef_matching, QCDOrder::NLO);
63}
64
65std::unordered_map<WCoefId, scalar_t> KCoefficientGroup::base_1_NNLO_calculation(
66 const std::unordered_map<QCDOrder, std::unordered_map<WCoefId, scalar_t>>& coef_matching,
67 const BlockSrc&
68)
69{
70 return k_identity_running_for_order(coef_matching, QCDOrder::NNLO);
71}
QCDOrder
Lightweight view over a set of source blocks.
Definition SourcesView.h:71
static IdOf< WCoefTag > to_id(WCoef e)
Converts an enum value to an IdOf<Tag>.
static std::unordered_map< WCoefId, scalar_t > base_1_NNLO_calculation(const std::unordered_map< QCDOrder, std::unordered_map< WCoefId, scalar_t > > &coef_matching, const BlockSrc &src)
static std::unordered_map< WCoefId, scalar_t > base_1_NLO_calculation(const std::unordered_map< QCDOrder, std::unordered_map< WCoefId, scalar_t > > &coef_matching, const BlockSrc &src)
static std::unordered_map< WCoefId, scalar_t > base_1_LO_calculation(const std::unordered_map< QCDOrder, std::unordered_map< WCoefId, scalar_t > > &coef_matching, const BlockSrc &src)
static std::vector< WCoef > get_group(WGroup g)
Returns the list of Wilson coefficients belonging to a WGroup.