Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
ObsWilsonHelper.h
Go to the documentation of this file.
1#ifndef OBSWILSONHELPER_H
2#define OBSWILSONHELPER_H
3
4#include "Include.h"
5#include "Configs.h"
6#include "IObsWilsonBuilder.h"
7#include "IWilsonFreezer.h"
8
20public:
21 ObsWilsonHelper() = default;
22
29 explicit ObsWilsonHelper(bool reset) { if (reset) clear(); }
30
32 void clear();
33
41 void build(WilsonBuildConfig config,
42 std::shared_ptr<IObsWilsonBuilder>& wil_builder,
43 std::shared_ptr<IWilsonFreezer<WGroupId>> iobs_wfreezer);
44
52 void mark_built(WGroupId group, const WilsonBuildConfig& config, bool frozen=false);
53
55 void mark_built(WGroupId group,
56 double matching_scale,
57 double hadronic_scale,
58 QCDOrder order,
59 bool frozen=false);
60
61private:
62 struct BuildSignature {
63 double matching_scale {};
64 double hadronic_scale {};
66
67 bool matches(const WilsonBuildConfig& config) const {
68 return matching_scale == config.matching_scale &&
69 hadronic_scale == config.hadronic_scale &&
70 order == config.order;
71 }
72 };
73
74 struct GroupState {
75 bool frozen {false};
76 BuildSignature signature {};
77 };
78
79 std::unordered_set<WGroupId> get_all_groups(const std::unordered_set<WGroupId>& needed) const;
80 std::unordered_set<WGroupId> update_state(const WilsonBuildConfig& config,
81 std::shared_ptr<IWilsonFreezer<WGroupId>> iobs_wfreezer);
82 static BuildSignature make_signature(const WilsonBuildConfig& config);
83
84 std::unordered_map<WGroupId, GroupState> state;
85};
86
87#endif // OBSWILSONHELPER_H
Configuration structures used to control Wilson coefficient computations, strong coupling evaluations...
QCDOrder
Interface for building Wilson coefficient services in the observable layer.
Interface for freezing/unfreezing Wilson blocks in the dependency system.
ObsWilsonHelper(bool reset)
Compatibility constructor used by a few apps/tests to request a reset.
void clear()
Clear the per-helper build/freeze state.
void mark_built(WGroupId group, const WilsonBuildConfig &config, bool frozen=false)
Mark a Wilson group as already available in this helper state.
ObsWilsonHelper()=default
void build(WilsonBuildConfig config, std::shared_ptr< IObsWilsonBuilder > &wil_builder, std::shared_ptr< IWilsonFreezer< WGroupId > > iobs_wfreezer)
Build or update Wilson groups required by observables.
Returns an uppercase copy of the input string.
Configuration for building sets of Wilson coefficients.
Definition Configs.h:32
double hadronic_scale
Hadronic scale (in GeV) at which the Wilson coefficients are evaluated in the effective theory.
Definition Configs.h:48
QCDOrder order
Perturbative QCD order used for the evolution and matching of Wilson coefficients....
Definition Configs.h:54
double matching_scale
Matching scale (in GeV) at which the high-energy theory is matched to the effective theory.
Definition Configs.h:42