Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
CustomCoefficientGroup Class Reference

Concrete CoefficientGroup built manually by the user. More...

#include <CustomWilsonGroup.h>

Inheritance diagram for CustomCoefficientGroup:
Collaboration diagram for CustomCoefficientGroup:

Public Member Functions

 CustomCoefficientGroup (WilsonGroupAdapterConfig adapters, WGroupId gid, const std::string &name, ContributionType type=ContributionType::SM)
 Constructs a custom coefficient group.
 
std::shared_ptr< CoefficientGroupclone () const override
 Polymorphic clone.
 
CustomCoefficientGroupadd_coefficient (const std::shared_ptr< WilsonCoefficient > &coef)
 Adds a coefficient to the group (fluent API).
 
CustomCoefficientGroupadd_coefficient (WCoefId id, const std::shared_ptr< WilsonCoefficient > &coef)
 Adds a coefficient with an explicit dynamic id.
 
CustomCoefficientGroupset_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.
 
CustomCoefficientGroupfinalize (QCDOrder order)
 Finalizes the group by composing dependent parameters up to order.
 
- Public Member Functions inherited from CoefficientGroup
 CoefficientGroup (WilsonGroupAdapterConfig adapters)
 Constructs an empty group with adapter configuration.
 
 CoefficientGroup (const CoefficientGroup &)
 Deep-copy constructor.
 
 CoefficientGroup (CoefficientGroup &&)=default
 Move construction (default).
 
 CoefficientGroup (std::map< std::string, std::shared_ptr< WilsonCoefficient > > &coeffs, WilsonGroupAdapterConfig adapters)
 Constructs from an existing map of coefficients and initializes up to NNLO.
 
void init (QCDOrder order)
 Registers dependent parameters for matching coefficients up to a maximum order.
 
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.
 
virtual std::shared_ptr< CoefficientGroupget_sm_group ()
 Returns the SM-only subgroup if the concrete group supports it.
 
complex_t get_matching_coefficient (std::string coeff, std::string order, ContributionType cont_type) const
 Reads a coefficient at the matching scale (mu_W).
 
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.
 
std::string get_matching_storage_block () const
 Returns the current matching storage block name.
 
void set_matching_storage_block (std::string)
 Sets the matching storage block name (used by claim_coefficients()).
 
ContributionType get_type ()
 Returns the contribution type associated with this group (SM/BSM/TOTAL...).
 
std::unordered_map< ParameterType, std::vector< std::string > > get_sources (QCDOrder ord, WilsonBasis id)
 Returns source blocks for a given basis and order.
 
std::unordered_set< WilsonBasisget_bases () const
 Returns the set of bases configured in sources.
 
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.
 
WGroupId get_group_id () const
 Returns the group identifier.
 
const std::vector< WCoefId > & get_member_ids () const
 Returns the dynamic ids of coefficients owned by this group.
 
void set_member_ids (std::vector< WCoefId > ids)
 Replace the dynamic coefficient membership list.
 
void add_member_id (WCoefId id)
 Add one dynamic coefficient id to the membership list if absent.
 
void set_group_id (WGroupId gid)
 Sets the group identifier (caller must ensure consistency with block naming).
 
void set_wilson_type (ContributionType ct)
 Sets the group contribution type.
 
void add_sources (WilsonBasis basis, const std::map< QCDOrder, CoefficientGroupSources > &m)
 Adds running-block sources for a given basis.
 
virtual ~CoefficientGroup ()=default
 

Static Public Member Functions

static std::unordered_map< WCoefId, scalar_tidentity_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.
 

Public Attributes

std::string name_grp
 Human-readable group name.
 

Additional Inherited Members

- Protected Member Functions inherited from CoefficientGroup
void claim_coefficients ()
 Claims coefficient objects as owned by this group and sets their storage/type.
 
- Protected Attributes inherited from CoefficientGroup
ContributionType wilson_type {ContributionType::SM}
 Contribution type for this group (default SM).
 
QCDOrder current_order = QCDOrder::LO
 Max initialized order (default LO).
 
WGroupId id
 Identifier of this group (used by GroupMapper to build block names).
 
std::string block_name
 Block name for matching-scale storage.
 
std::vector< WCoefIdmember_ids
 Dynamic coefficient ids belonging to this group.
 
std::map< WilsonBasis, std::map< QCDOrder, CoefficientGroupSources > > sources
 Running-block source specification, keyed by (basis -> order).
 
WilsonGroupAdapterConfig adapters
 Adapter configuration bundle (proxies, composers, core APIs, MARTY hooks).
 

Detailed Description

Concrete CoefficientGroup built manually by the user.

This type is especially useful when introducing a new Wilson basis or a new set of coefficients without touching the built-in static group definitions.

Definition at line 42 of file CustomWilsonGroup.h.

Constructor & Destructor Documentation

◆ CustomCoefficientGroup()

CustomCoefficientGroup::CustomCoefficientGroup ( WilsonGroupAdapterConfig  adapters,
WGroupId  gid,
const std::string &  name,
ContributionType  type = ContributionType::SM 
)
inlineexplicit

Constructs a custom coefficient group.

Parameters
adaptersAdapters/proxies required by the base CoefficientGroup.
gidGroup id used in mappers and block naming.
nameHuman-readable group name.
typeContribution type (default SM).

Definition at line 52 of file CustomWilsonGroup.h.

Member Function Documentation

◆ add_coefficient() [1/2]

CustomCoefficientGroup & CustomCoefficientGroup::add_coefficient ( const std::shared_ptr< WilsonCoefficient > &  coef)
inline

Adds a coefficient to the group (fluent API).

The coefficient is inserted using its WilsonCoefficient::get_name() as key.

Parameters
coefCoefficient to add.
Returns
Reference to *this.

Definition at line 77 of file CustomWilsonGroup.h.

◆ add_coefficient() [2/2]

CustomCoefficientGroup & CustomCoefficientGroup::add_coefficient ( WCoefId  id,
const std::shared_ptr< WilsonCoefficient > &  coef 
)
inline

Adds a coefficient with an explicit dynamic id.

Use this overload for runtime/custom coefficients where the string stored in the coefficient object may not be convertible to a legacy enum. The explicit WCoefId is recorded as group membership and is later used by CoefficientManager to compose triplets and hadronic blocks.

Parameters
idDynamic coefficient id.
coefCoefficient implementation.
Returns
Reference to *this.

Definition at line 95 of file CustomWilsonGroup.h.

◆ clone()

std::shared_ptr< CoefficientGroup > CustomCoefficientGroup::clone ( ) const
inlineoverridevirtual

Polymorphic clone.

Returns
A heap-allocated deep copy of this group.

Implements CoefficientGroup.

Definition at line 65 of file CustomWilsonGroup.h.

◆ finalize()

CustomCoefficientGroup & CustomCoefficientGroup::finalize ( QCDOrder  order)
inline

Finalizes the group by composing dependent parameters up to order.

Internally calls CoefficientGroup::init(order), which:

  • claims coefficients (storage block + contribution type),
  • composes dependent parameters for matching values via the configured composer.
Parameters
orderHighest QCD order to initialize (LO/NLO/NNLO).
Returns
Reference to *this.

Definition at line 157 of file CustomWilsonGroup.h.

◆ identity_running()

static std::unordered_map< WCoefId, scalar_t > CustomCoefficientGroup::identity_running ( const std::unordered_map< QCDOrder, std::unordered_map< WCoefId, scalar_t > > &  coef_matching,
const BlockSrc  
)
inlinestatic

Default running function that returns the "best available" matching map.

Selects NNLO if present, else NLO, else LO, and returns the corresponding map.

Parameters
coef_matchingMatching coefficient values per order.
srcUnused (kept to match running function signature).
Returns
Map of coefficients (WCoefId -> value) for the chosen best order.

Definition at line 136 of file CustomWilsonGroup.h.

◆ set_basis_order_sources_and_running()

CustomCoefficientGroup & 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 
)
inline

Defines dependency sources and running function for a basis and order.

This configures the group-level running machinery (hadronic-scale blocks).

Parameters
basisWilson basis for which this rule applies.
orderQCD order this rule applies to.
source_namesBlock dependencies used by the running function.
running_funcFunction producing hadronic coefficients from matching inputs.
Returns
Reference to *this.

Definition at line 112 of file CustomWilsonGroup.h.

Member Data Documentation

◆ name_grp

std::string CustomCoefficientGroup::name_grp

Human-readable group name.

Definition at line 163 of file CustomWilsonGroup.h.


The documentation for this class was generated from the following file: