1#ifndef HYPERISO_WILSONMANAGER_H
2#define HYPERISO_WILSONMANAGER_H
95 std::shared_ptr<IMartyWilsonPathProxy>
marty_paths =
nullptr) :
183 std::map<std::string, std::shared_ptr<CoefficientGroup>> coefficientGroups;
189 std::set<std::string> applied_matching_patches;
191 bool apply_matching_patch_to_group(
const std::string& groupName,
193 std::size_t patch_index,
195 void apply_matching_patches(
const std::string& groupName,
QCDOrder max_order);
198 void throw_no_group_error(
const std::string& groupName)
const;
221 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 = {});
241 const std::string& groupName,
254 const std::string& groupName,
268 const std::string& groupName,
275 const std::string& groupName,
281 const std::string& groupName,
287 const std::string& groupName,
325 void update(
double mu_W,
double mu_h);
349 std::map<std::string, std::shared_ptr<CoefficientGroup>>
getGroups();
High-level helpers for initializing and monitoring the Hyperiso framework.
Port used by the Wilson layer to access MARTY-generated output paths.
Interface for setting a specific “current parameter target” (typically a scale).
Manages memory caching, parameter blocks, and LHA reader instances.
Core QCD utilities for α_s running and quark mass evolution.
std::complex< double > complex_t
Convenience alias for std::complex<double>.
Domain container grouping related Wilson coefficients with matching and running access.
Small extension point for additive Wilson matching terms.
Domain objects representing Wilson coefficients and their matching metadata.
High-level orchestrator for Wilson coefficient groups.
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.
CoefficientManager(WilsonPortsConfig ports_config)
void init_group_hadronic_all_bases(const std::string &groupName, const std::string &order)
Initializes hadronic blocks for all bases supported by the group.
CoefficientManager operator=(const CoefficientManager &)=delete
void set_hadronic_scale(double mu_h)
Switches to hadronic scale context and sets mu_h via scale_setter_api.
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 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.
std::map< std::string, std::shared_ptr< CoefficientGroup > > getGroups()
Returns all registered groups.
void add_matching_patches(const std::vector< WilsonMatchingPatch > &patches)
Add several additive matching patches.
void set_matching_scale(double mu_W)
Switches to matching scale context and sets mu_W via scale_setter_api.
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 abse...
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.
std::shared_ptr< CoefficientGroup > getCoefficientGroup(const std::string &groupName) const
Retrieves a registered coefficient group by name (throws/logs on missing).
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.
std::unordered_set< WilsonBasis > getGroupBases(WGroupId group)
Returns bases supported by the group (delegates to CoefficientGroup::get_bases()).
void add_matching_patch(const WilsonMatchingPatch &patch)
Add one additive matching patch and apply it to already-registered groups when relevant.
CoefficientManager(const CoefficientManager &)=delete
void printGroupCoefficients(const std::string &groupName) const
Debug helper (currently stubby in implementation).
void update(double mu_W, double mu_h)
Updates the manager by changing scales (delegates to set_matching_scale / set_hadronic_scale).
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 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).
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 bloc...
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.
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.
void init_group_matching(const std::string &groupName, const std::string &order)
Initializes matching-side parameters for a group up to order.
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...
~CoefficientManager()
Destructor.
void init_group_hadronic(const std::string &groupName, const std::string &order, WilsonBasis id)
Initializes hadronic (running) block for one basis.
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.
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.
void registerCoefficientGroup(const std::string &groupName, std::shared_ptr< CoefficientGroup > group)
Registers a coefficient group under a given name.
Generic interface returning a single value of type T from the core.
Abstract interface for setting a chosen parameter.
Abstract interface for reading parameters and basic metadata.
Returns an uppercase copy of the input string.
Aggregates “ports” / APIs that connect the manager to the rest of the framework.
std::vector< WilsonMatchingPatch > matching_patches
Additive matching patches applied before group initialization.
std::shared_ptr< ICoreAPI< bool > > hard_coded_lo
std::shared_ptr< IParameterProxy< std::string, LhaID > > wilson_proxy
Read-only access to existing blocks/parameters (FWCOEF, matching blocks, etc.).
std::shared_ptr< IParamSetter< ScaleType > > scale_setter_api
Scale setter used to switch and set mu_W / mu_h.
std::shared_ptr< IMartyWilsonPathProxy > marty_paths
Path provider for MARTY-generated Wilson CSV files.
std::shared_ptr< ICoreAPI< Model > > model_api
Current model selector (SM/SUSY/THDM...).
std::shared_ptr< IBlockComposer > iblock_c
Dependency engine used to compose derived blocks/parameters.
std::shared_ptr< ICoreAPI< bool > > use_marty
Backend selector: true => Marty, false => builtin.
std::function< std::shared_ptr< CoefficientGroup >(WGroupId, Model, bool, ContributionType, std::string)> build_group
Optional group builder hook.
std::shared_ptr< ICoreAPI< bool > > has_wilson
Whether an input Wilson block exists (FWCOEF-style input present).
WilsonPortsConfig(std::shared_ptr< IBlockComposer > iblock_c, std::shared_ptr< IParameterProxy< std::string, LhaID > > wilson_proxy, std::shared_ptr< ICoreAPI< bool > > use_marty, std::shared_ptr< ICoreAPI< bool > > has_wilson, std::shared_ptr< ICoreAPI< Model > > model_api, std::shared_ptr< IParamSetter< ScaleType > > scale_setter_api, std::shared_ptr< ICoreAPI< bool > > hard_coded_lo, std::shared_ptr< IMartyWilsonPathProxy > marty_paths=nullptr)
Constructs the port bundle.