6 for (
auto& [_, coeff]: *
this) {
7 coeff->set_owned(
true);
16 for (
const auto& [key, ptr] : other) {
18 (*this)[key] = ptr->
clone();
20 (*this)[key] =
nullptr;
32 this->insert(coeffs.begin(), coeffs.end());
41 for (
int order = 1; order <= (int)max_order; order++) {
42 for (
auto& coeff : *
this) {
43 auto func_wrapper = [&coeff, order](
const ParamSrc& src,
44 std::shared_ptr<DependentParameter> dep_param) {
45 auto func = coeff.second->get_func((
QCDOrder)order);
47 dep_param->set_expected(0.);
50 dep_param->set_expected(func(src));
68 auto it = this->find(coeff);
69 if (it == this->end()) {
70 throw std::out_of_range(
"Coefficient '" + coeff +
"' not found in group '" +
GroupMapper::str(this->
id) +
"'");
76 auto it = this->find(coeff);
77 if (it == this->end()) {
78 throw std::out_of_range(
"Coefficient '" + coeff +
"' not found in group '" +
GroupMapper::str(this->
id) +
"'");
98 for(
auto& [name, coeff] : coeffs) {
99 os << name <<
" --------------------------------" << std::endl;
110std::ostream&
operator<<(std::ostream& os, std::shared_ptr<CoefficientGroup>& coeffs) {
111 return os << *coeffs;
std::complex< double > complex_t
Convenience alias for std::complex<double>.
std::ostream & operator<<(std::ostream &os, const CoefficientGroup &coeffs)
Streams all coefficients and standard values (LO/NLO/NNLO at matching + hadronic scales).
Domain container grouping related Wilson coefficients with matching and running access.
Polymorphic container of WilsonCoefficient objects representing a coefficient group.
CoefficientGroup(WilsonGroupAdapterConfig adapters)
Constructs an empty group with adapter configuration.
void init(QCDOrder order)
Registers dependent parameters for matching coefficients up to a maximum order.
std::vector< WCoefId > member_ids
Dynamic coefficient ids belonging to this group.
std::string get_matching_storage_block() const
Returns the current matching storage block name.
WilsonGroupAdapterConfig adapters
Adapter configuration bundle (proxies, composers, core APIs, MARTY hooks).
complex_t get_matching_coefficient(std::string coeff, std::string order, ContributionType cont_type) const
Reads a coefficient at the matching scale (mu_W).
void claim_coefficients()
Claims coefficient objects as owned by this group and sets their storage/type.
void set_matching_storage_block(std::string)
Sets the matching storage block name (used by claim_coefficients()).
void add_member_id(WCoefId id)
Add one dynamic coefficient id to the membership list if absent.
WGroupId id
Identifier of this group (used by GroupMapper to build block names).
ContributionType wilson_type
Contribution type for this group (default SM).
std::string block_name
Block name for matching-scale storage.
std::map< WilsonBasis, std::map< QCDOrder, CoefficientGroupSources > > sources
Running-block source specification, keyed by (basis -> order).
complex_t get_running_coefficient(std::string coeff, std::string order, ContributionType cont_type, WilsonBasis basis=WilsonBasis::B_STANDARD) const
Reads a coefficient at the hadronic scale (mu_h) in a given basis.
QCDOrder get_order()
Returns the maximum initialized QCD order for this group.
QCDOrder current_order
Max initialized order (default LO).
static std::string str(const WGroupId &gid, ScaleType s, WilsonBasis b=WilsonBasis::B_STANDARD)
Builds a composite block name using a WGroupId, scale and basis.
static QCDOrder enum_elt(std::string_view s)
Legacy lookup: converts a string into a QCDOrder enum. Performs a case-insensitive search over the bu...
Lightweight view over a set of source parameters keyed by ParamId.
Abstract base class representing a Wilson coefficient and its matching information.
virtual std::shared_ptr< WilsonCoefficient > clone() const =0
Virtual clone for polymorphic copy.
Hash specialization for SymbolId<Tag>.
Composite identifier for a single parameter.
Dependency injection bundle for CoefficientGroup.
std::shared_ptr< IBlockComposer > iblock_c
Composer used to register dependent parameters / dependent blocks.
std::shared_ptr< IParameterProxy< std::string, LhaID > > wilson_proxy
Proxy used to read/write Wilson coefficients from Parameters (WILSON scope).