|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
High-level orchestrator for Wilson coefficient groups. More...
#include <WilsonManager.h>
Public Member Functions | |
| CoefficientManager (WilsonPortsConfig ports_config) | |
| CoefficientManager (const CoefficientManager &)=delete | |
| CoefficientManager | operator= (const CoefficientManager &)=delete |
| void | set_matching_scale (double mu_W) |
| Switches to matching scale context and sets mu_W via scale_setter_api. | |
| void | set_hadronic_scale (double mu_h) |
| Switches to hadronic scale context and sets mu_h via scale_setter_api. | |
| void | ensure_sm_intermediate_and_copy_to_final (const std::string &groupName, QCDOrder order, WilsonPortsConfig &ports_config) |
| Ensures an SM intermediate matching block exists and copies SM entries into the final block. | |
| void | compose_missing_from_calculation (const std::string &groupName, QCDOrder order, WilsonPortsConfig &ports_config) |
| For a given group/order, composes the “missing piece” of the triplet using algebraic relations. | |
| void | compose_from_fwcoef (const std::string &groupName, QCDOrder order, WilsonPortsConfig &ports_config) |
| Composes matching triplets from an input FWCOEF-like block into final storage block. | |
| void | ensure_matching_triplet_zeroed (const std::string &groupName, QCDOrder o) |
| Ensures that, for a given order, SM/BSM/TOTAL slots exist and are set to 0 in the group matching block. | |
| void | ensure_sm_model_triplet_in_matching (const std::string &groupName, QCDOrder max_order) |
| Ensures SM-model semantics: BSM=0 and TOTAL=SM for all coefficients up to max_order in final matching block. | |
| void | ensure_final_triplet_defaults_zero (const std::string &groupName, QCDOrder max_order) |
| Ensures final matching block has triplet parameters defined (SM/BSM/TOTAL) defaulting to zero if absent. | |
| void | registerCoefficientGroup (const std::string &groupName, std::shared_ptr< CoefficientGroup > group) |
| Registers a coefficient group under a given name. | |
| void | init_group_matching (const std::string &groupName, const std::string &order) |
Initializes matching-side parameters for a group up to order. | |
| void | init_group_hadronic (const std::string &groupName, const std::string &order, WilsonBasis id) |
| Initializes hadronic (running) block for one basis. | |
| void | init_group_hadronic_all_bases (const std::string &groupName, const std::string &order) |
| Initializes hadronic blocks for all bases supported by the group. | |
| void | init_specific_order_group_matching (const std::string &groupName, const std::string &order, bool only_total) |
| Initializes matching parameters for a specific QCD order. | |
| void | add_matching_patch (const WilsonMatchingPatch &patch) |
| Add one additive matching patch and apply it to already-registered groups when relevant. | |
| void | add_matching_patches (const std::vector< WilsonMatchingPatch > &patches) |
| Add several additive matching patches. | |
| void | update (double mu_W, double mu_h) |
| Updates the manager by changing scales (delegates to set_matching_scale / set_hadronic_scale). | |
| void | fill_sources_for_group (const std::string &groupName, const std::string &order, std::unordered_map< ParameterType, std::vector< std::string > > &src, WilsonBasis id) |
| Gathers source block names needed to build hadronic/running block dependencies. | |
| void | fill_matching_groups (const std::string &groupName, const std::string &order) |
| Ensures missing higher-order matching triplets are present/zeroed when only lower order is requested. | |
| std::string | getModel () |
| Returns current model as a string (via model_api). | |
| std::shared_ptr< CoefficientGroup > | getCoefficientGroup (const std::string &groupName) const |
| Retrieves a registered coefficient group by name (throws/logs on missing). | |
| std::map< std::string, std::shared_ptr< CoefficientGroup > > | getGroups () |
| Returns all registered groups. | |
| std::unordered_set< WilsonBasis > | getGroupBases (WGroupId group) |
| Returns bases supported by the group (delegates to CoefficientGroup::get_bases()). | |
| complex_t | getMatchingCoefficient (const std::string &groupName, const std::string &coeffName, const std::string &order, ContributionType cont_type) |
| Returns matching coefficient (raw, order slot) for a given contribution type. | |
| complex_t | getFullMatchingCoefficient (const std::string &groupName, const std::string &coeffName, const std::string &order, ContributionType cont_type) |
| Returns “full” matching coefficient including perturbative prefactor powers. | |
| complex_t | getRunCoefficient (const std::string &groupName, const std::string &coeffName, const std::string &order, ContributionType cont_type, WilsonBasis basis=WilsonBasis::B_STANDARD) |
| Returns running/hadronic coefficient (raw, order slot) for given basis and contribution type. | |
| complex_t | getFullRunCoefficient (const std::string &groupName, const std::string &coeffName, const std::string &order, ContributionType cont_type, WilsonBasis basis=WilsonBasis::B_STANDARD) |
| Returns “full” running coefficient including perturbative prefactor powers. | |
| void | printGroupCoefficients (const std::string &groupName) const |
| Debug helper (currently stubby in implementation). | |
| ~CoefficientManager () | |
| Destructor. | |
Static Public Member Functions | |
| static std::shared_ptr< CoefficientManager > | Builder (std::map< std::string, std::shared_ptr< CoefficientGroup > > groups, double mu_W, double mu_h, std::string order, WilsonPortsConfig portconfig, std::map< Model, std::shared_ptr< IWilsonParameterHelper > > wilson_param_helpers={}) |
| Factory that builds and initializes a manager from pre-created groups. | |
High-level orchestrator for Wilson coefficient groups.
The manager owns a registry of groups (by name) and composes all missing blocks/parameters so that:
Key responsibilities:
1) Matching initialization (init_group_matching / init_specific_order_group_matching)
2) Hadronic initialization (init_group_hadronic / init_group_hadronic_all_bases)
3) Scale management
Notes on “blocks”:
Lifetime:
Definition at line 180 of file WilsonManager.h.
|
inline |
Definition at line 201 of file WilsonManager.h.
|
delete |
| CoefficientManager::~CoefficientManager | ( | ) |
Destructor.
Clears composed blocks/parameters from the dependency engine to avoid stale state leaking across runs.
Definition at line 939 of file WilsonManager.cpp.
| void CoefficientManager::add_matching_patch | ( | const WilsonMatchingPatch & | patch | ) |
Add one additive matching patch and apply it to already-registered groups when relevant.
Definition at line 163 of file WilsonManager.cpp.
| void CoefficientManager::add_matching_patches | ( | const std::vector< WilsonMatchingPatch > & | patches | ) |
Add several additive matching patches.
Definition at line 186 of file WilsonManager.cpp.
|
static |
Factory that builds and initializes a manager from pre-created groups.
This method:
| groups | Map of groupName -> group instance. |
| mu_W | Matching scale. |
| mu_h | Hadronic scale. |
| order | Max order string ("LO"/"NLO"/"NNLO"). |
| portconfig | Services and hooks needed by the manager. |
| wilson_param_helpers | Optional per-model helpers that compose WPARAM blocks/matrices. |
Definition at line 952 of file WilsonManager.cpp.
| void CoefficientManager::compose_from_fwcoef | ( | const std::string & | groupName, |
| QCDOrder | order, | ||
| WilsonPortsConfig & | ports_config | ||
| ) |
Composes matching triplets from an input FWCOEF-like block into final storage block.
Handles cases where FWCOEF provides:
Definition at line 359 of file WilsonManager.cpp.
| void CoefficientManager::compose_missing_from_calculation | ( | const std::string & | groupName, |
| QCDOrder | order, | ||
| WilsonPortsConfig & | ports_config | ||
| ) |
For a given group/order, composes the “missing piece” of the triplet using algebraic relations.
Depending on backend and what is computed:
Definition at line 470 of file WilsonManager.cpp.
| void CoefficientManager::ensure_final_triplet_defaults_zero | ( | const std::string & | groupName, |
| QCDOrder | max_order | ||
| ) |
Ensures final matching block has triplet parameters defined (SM/BSM/TOTAL) defaulting to zero if absent.
Definition at line 201 of file WilsonManager.cpp.
| void CoefficientManager::ensure_matching_triplet_zeroed | ( | const std::string & | groupName, |
| QCDOrder | o | ||
| ) |
Ensures that, for a given order, SM/BSM/TOTAL slots exist and are set to 0 in the group matching block.
Definition at line 323 of file WilsonManager.cpp.
| void CoefficientManager::ensure_sm_intermediate_and_copy_to_final | ( | const std::string & | groupName, |
| QCDOrder | order, | ||
| WilsonPortsConfig & | ports_config | ||
| ) |
Ensures an SM intermediate matching block exists and copies SM entries into the final block.
This is a crucial step for BSM models: we compute or retrieve SM contributions in a dedicated "<MATCHING>_SM" block, then compose dependent parameters that copy those values into the final block (SM slot of the SM/BSM/TOTAL triplet).
| groupName | Group string key. |
| order | Max order to initialize/copy. |
| ports_config | Service wiring (uses build_group hook if present). |
Definition at line 236 of file WilsonManager.cpp.
| void CoefficientManager::ensure_sm_model_triplet_in_matching | ( | const std::string & | groupName, |
| QCDOrder | max_order | ||
| ) |
Ensures SM-model semantics: BSM=0 and TOTAL=SM for all coefficients up to max_order in final matching block.
Definition at line 516 of file WilsonManager.cpp.
| void CoefficientManager::fill_matching_groups | ( | const std::string & | groupName, |
| const std::string & | order | ||
| ) |
Ensures missing higher-order matching triplets are present/zeroed when only lower order is requested.
Example: if order==LO, ensures NLO and NNLO triplets exist and are set to zero, so later computations do not fail when expecting presence of those parameters.
Definition at line 346 of file WilsonManager.cpp.
| void CoefficientManager::fill_sources_for_group | ( | const std::string & | groupName, |
| const std::string & | order, | ||
| std::unordered_map< ParameterType, std::vector< std::string > > & | src, | ||
| WilsonBasis | id | ||
| ) |
Gathers source block names needed to build hadronic/running block dependencies.
This collects sources for LO/NLO/NNLO up to the requested order for a given basis.
Definition at line 641 of file WilsonManager.cpp.
| std::shared_ptr< CoefficientGroup > CoefficientManager::getCoefficientGroup | ( | const std::string & | groupName | ) | const |
Retrieves a registered coefficient group by name (throws/logs on missing).
Definition at line 919 of file WilsonManager.cpp.
| complex_t CoefficientManager::getFullMatchingCoefficient | ( | const std::string & | groupName, |
| const std::string & | coeffName, | ||
| const std::string & | order, | ||
| ContributionType | cont_type | ||
| ) |
Returns “full” matching coefficient including perturbative prefactor powers.
Uses fact = alpha_s(mu_W)/(4π) (read from WPARAM_MATCH_SM) and sums: C_full = C_LO + fact*C_NLO + fact^2*C_NNLO (up to requested order).
Definition at line 889 of file WilsonManager.cpp.
| complex_t CoefficientManager::getFullRunCoefficient | ( | const std::string & | groupName, |
| const std::string & | coeffName, | ||
| const std::string & | order, | ||
| ContributionType | cont_type, | ||
| WilsonBasis | basis = WilsonBasis::B_STANDARD |
||
| ) |
Returns “full” running coefficient including perturbative prefactor powers.
Uses fact = alpha_s(mu_b)/(4π) (read from WPARAM_RUN_SM) and sums: C_full = C_LO + fact*C_NLO + fact^2*C_NNLO (up to requested order).
Definition at line 905 of file WilsonManager.cpp.
| std::unordered_set< WilsonBasis > CoefficientManager::getGroupBases | ( | WGroupId | group | ) |
Returns bases supported by the group (delegates to CoefficientGroup::get_bases()).
Definition at line 931 of file WilsonManager.cpp.
| std::map< std::string, std::shared_ptr< CoefficientGroup > > CoefficientManager::getGroups | ( | ) |
Returns all registered groups.
Definition at line 927 of file WilsonManager.cpp.
| complex_t CoefficientManager::getMatchingCoefficient | ( | const std::string & | groupName, |
| const std::string & | coeffName, | ||
| const std::string & | order, | ||
| ContributionType | cont_type | ||
| ) |
Returns matching coefficient (raw, order slot) for a given contribution type.
Definition at line 883 of file WilsonManager.cpp.
| std::string CoefficientManager::getModel | ( | ) |
Returns current model as a string (via model_api).
Definition at line 315 of file WilsonManager.cpp.
| complex_t CoefficientManager::getRunCoefficient | ( | const std::string & | groupName, |
| const std::string & | coeffName, | ||
| const std::string & | order, | ||
| ContributionType | cont_type, | ||
| WilsonBasis | basis = WilsonBasis::B_STANDARD |
||
| ) |
Returns running/hadronic coefficient (raw, order slot) for given basis and contribution type.
Definition at line 899 of file WilsonManager.cpp.
| void CoefficientManager::init_group_hadronic | ( | const std::string & | groupName, |
| const std::string & | order, | ||
| WilsonBasis | id | ||
| ) |
Initializes hadronic (running) block for one basis.
Reads matching coefficients from the group matching block, applies the basis running function for each contribution type (SM/BSM/TOTAL) and for each order <= requested order, and stores results in the hadronic block (ScaleType::HADRONIC, basis).
Definition at line 688 of file WilsonManager.cpp.
| void CoefficientManager::init_group_hadronic_all_bases | ( | const std::string & | groupName, |
| const std::string & | order | ||
| ) |
Initializes hadronic blocks for all bases supported by the group.
Definition at line 873 of file WilsonManager.cpp.
| void CoefficientManager::init_group_matching | ( | const std::string & | groupName, |
| const std::string & | order | ||
| ) |
Initializes matching-side parameters for a group up to order.
Definition at line 319 of file WilsonManager.cpp.
| void CoefficientManager::init_specific_order_group_matching | ( | const std::string & | groupName, |
| const std::string & | order, | ||
| bool | only_total | ||
| ) |
Initializes matching parameters for a specific QCD order.
| groupName | Group string key. |
| order | QCD order string. |
| only_total | If true, avoid calling group->init(order) (useful for workflows that only need TOTAL). |
Definition at line 557 of file WilsonManager.cpp.
|
delete |
| void CoefficientManager::printGroupCoefficients | ( | const std::string & | groupName | ) | const |
Debug helper (currently stubby in implementation).
Definition at line 935 of file WilsonManager.cpp.
| void CoefficientManager::registerCoefficientGroup | ( | const std::string & | groupName, |
| std::shared_ptr< CoefficientGroup > | group | ||
| ) |
Registers a coefficient group under a given name.
Definition at line 915 of file WilsonManager.cpp.
| void CoefficientManager::set_hadronic_scale | ( | double | mu_h | ) |
Switches to hadronic scale context and sets mu_h via scale_setter_api.
Definition at line 983 of file WilsonManager.cpp.
| void CoefficientManager::set_matching_scale | ( | double | mu_W | ) |
Switches to matching scale context and sets mu_W via scale_setter_api.
Definition at line 988 of file WilsonManager.cpp.
| void CoefficientManager::update | ( | double | mu_W, |
| double | mu_h | ||
| ) |
Updates the manager by changing scales (delegates to set_matching_scale / set_hadronic_scale).
Definition at line 947 of file WilsonManager.cpp.