4#include <unordered_map>
70 std::unordered_map<ParameterType, std::vector<std::string>>
sources {};
82 std::function<std::unordered_map<WCoefId, scalar_t>(
const std::unordered_map<
QCDOrder, std::unordered_map<WCoefId, scalar_t>>&,
const BlockSrc&)>
func =
83 [](
const auto&,
const auto&) {
return std::unordered_map<WCoefId, scalar_t>(); };
190 virtual std::shared_ptr<CoefficientGroup>
get_sm_group() {
LOG_ERROR(
"LogicError",
"cannot get_sm_group for virtual group");
return nullptr;}
312 virtual std::shared_ptr<CoefficientGroup>
clone()
const = 0;
350 std::map<WilsonBasis, std::map<QCDOrder, CoefficientGroupSources>>
sources;
362std::ostream&
operator<<(std::ostream& os,
const std::shared_ptr<CoefficientGroup>& coeffs);
Interface for composing (creating/removing/updating) dependent blocks and parameters.
Interface for MARTY-based Wilson coefficient calculations.
Lightweight key describing an interpreted LHA/SLHA parameter.
#define LOG_ERROR(type,...)
Macro for logging error messages and terminating the application.
std::complex< double > complex_t
Convenience alias for std::complex<double>.
std::unordered_set< T > get_keys(const std::map< T, U > &map)
Extracts the key set from a std::map into an unordered_set.
Adapter bundle wiring a CoefficientGroup to framework services.
std::ostream & operator<<(std::ostream &os, const CoefficientGroup &coeffs)
Streams all coefficients and standard values (LO/NLO/NNLO at matching + hadronic scales).
Domain objects representing Wilson coefficients and their matching metadata.
Lightweight view over a set of source blocks.
Polymorphic container of WilsonCoefficient objects representing a coefficient group.
CoefficientGroup(WilsonGroupAdapterConfig adapters)
Constructs an empty group with adapter configuration.
std::function< std::unordered_map< WCoefId, scalar_t >(const std::unordered_map< QCDOrder, std::unordered_map< WCoefId, scalar_t > > &, const BlockSrc &)> get_func(QCDOrder ord, WilsonBasis id)
Returns the computation function for a given basis and order.
virtual std::shared_ptr< CoefficientGroup > clone() const =0
Polymorphic clone.
void init(QCDOrder order)
Registers dependent parameters for matching coefficients up to a maximum order.
virtual std::shared_ptr< CoefficientGroup > get_sm_group()
Returns the SM-only subgroup if the concrete group supports it.
std::unordered_map< ParameterType, std::vector< std::string > > get_sources(QCDOrder ord, WilsonBasis id)
Returns source blocks for a given basis and 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.
WGroupId get_group_id() const
Returns the group identifier.
void init_full_running_block(const std::unordered_map< ParameterType, std::vector< std::string > > &source_names, WilsonBasis basis, bool inter, std::vector< ContributionType > type)
Initializes sources to build a full running block.
void set_matching_storage_block(std::string)
Sets the matching storage block name (used by claim_coefficients()).
void add_sources(WilsonBasis basis, const std::map< QCDOrder, CoefficientGroupSources > &m)
Adds running-block sources for a given basis.
CoefficientGroup(CoefficientGroup &&)=default
Move construction (default).
ContributionType get_type()
Returns the contribution type associated with this group (SM/BSM/TOTAL...).
std::unordered_set< WilsonBasis > get_bases() const
Returns the set of bases configured in sources.
void set_wilson_type(ContributionType ct)
Sets the group contribution type.
void add_member_id(WCoefId id)
Add one dynamic coefficient id to the membership list if absent.
void set_member_ids(std::vector< WCoefId > ids)
Replace the dynamic coefficient membership list.
virtual ~CoefficientGroup()=default
const std::vector< WCoefId > & get_member_ids() const
Returns the dynamic ids of coefficients owned by this group.
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.
void set_group_id(WGroupId gid)
Sets the group identifier (caller must ensure consistency with block naming).
QCDOrder get_order()
Returns the maximum initialized QCD order for this group.
QCDOrder current_order
Max initialized order (default LO).
Returns an uppercase copy of the input string.
Source specification and aggregation function for a coefficient group block.
std::unordered_map< ParameterType, std::vector< std::string > > sources
Map of required source blocks for each ParameterType scope.
std::function< std::unordered_map< WCoefId, scalar_t >(const std::unordered_map< QCDOrder, std::unordered_map< WCoefId, scalar_t > > &, const BlockSrc &)> func
Computes a set of coefficients from existing values and source blocks.
Dependency injection bundle for CoefficientGroup.