1#ifndef CUSTOM_WILSON_GROUP_H
2#define CUSTOM_WILSON_GROUP_H
7#include <unordered_map>
65 std::shared_ptr<CoefficientGroup>
clone()
const override {
66 return std::make_shared<CustomCoefficientGroup>(*
this);
78 this->insert({coef->get_name(), coef});
115 std::unordered_map<
ParameterType, std::vector<std::string>> source_names,
116 std::function<std::unordered_map<WCoefId, scalar_t>(
117 const std::unordered_map<
QCDOrder, std::unordered_map<WCoefId, scalar_t>>&,
122 sources[basis][order].func = std::move(running_func);
137 const std::unordered_map<
QCDOrder, std::unordered_map<WCoefId, scalar_t>>& coef_matching,
144 return coef_matching.at(best);
Domain container grouping related Wilson coefficients with matching and running access.
Lightweight view over a set of source blocks.
Polymorphic container of WilsonCoefficient objects representing a coefficient group.
void init(QCDOrder order)
Registers dependent parameters for matching coefficients up to a maximum order.
WilsonGroupAdapterConfig adapters
Adapter configuration bundle (proxies, composers, core APIs, MARTY hooks).
void add_member_id(WCoefId id)
Add one dynamic coefficient id to the membership list if absent.
ContributionType wilson_type
Contribution type for this group (default SM).
std::map< WilsonBasis, std::map< QCDOrder, CoefficientGroupSources > > sources
Running-block source specification, keyed by (basis -> order).
QCDOrder current_order
Max initialized order (default LO).
Concrete CoefficientGroup built manually by the user.
CustomCoefficientGroup & set_basis_order_sources_and_running(WilsonBasis basis, QCDOrder order, std::unordered_map< ParameterType, std::vector< std::string > > source_names, std::function< std::unordered_map< WCoefId, scalar_t >(const std::unordered_map< QCDOrder, std::unordered_map< WCoefId, scalar_t > > &, const BlockSrc &)> running_func)
Defines dependency sources and running function for a basis and order.
std::string name_grp
Human-readable group name.
CustomCoefficientGroup(WilsonGroupAdapterConfig adapters, WGroupId gid, const std::string &name, ContributionType type=ContributionType::SM)
Constructs a custom coefficient group.
CustomCoefficientGroup & add_coefficient(const std::shared_ptr< WilsonCoefficient > &coef)
Adds a coefficient to the group (fluent API).
static std::unordered_map< WCoefId, scalar_t > identity_running(const std::unordered_map< QCDOrder, std::unordered_map< WCoefId, scalar_t > > &coef_matching, const BlockSrc &)
Default running function that returns the "best available" matching map.
CustomCoefficientGroup & add_coefficient(WCoefId id, const std::shared_ptr< WilsonCoefficient > &coef)
Adds a coefficient with an explicit dynamic id.
std::shared_ptr< CoefficientGroup > clone() const override
Polymorphic clone.
CustomCoefficientGroup & finalize(QCDOrder order)
Finalizes the group by composing dependent parameters up to order.
static IdOf< WCoefTag > id_of(std::string_view s)
Resolves a string into an IdOf<Tag> via the registry.
static std::string str(const IdOf< WCoefTag > &id)
Returns the string representation of an identifier.
Returns an uppercase copy of the input string.
Dependency injection bundle for CoefficientGroup.