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

Abstract base class representing a Wilson coefficient and its matching information. More...

#include <Wilson.h>

Inherited by C1, C10, C10_THDM, C10_susy, C1_THDM, C1_susy, C2, C2_THDM, C2_susy, C3, C3_THDM, C3_susy, C4, C4_THDM, C4_susy, C5, C5_THDM, C5_susy, C6, C6_THDM, C6_susy, C7, C7_THDM, C7_susy, C8, C8_THDM, C8_susy, C9, C9_THDM, C9_susy, CK10, CK9, CKQ1, CKQ2, CK_L, CP1, CP10, CP10_THDM, CP10_susy, CP1_THDM, CP1_susy, CP2, CP2_THDM, CP2_susy, CP3, CP3_THDM, CP3_susy, CP4, CP4_THDM, CP4_susy, CP5, CP5_THDM, CP5_susy, CP6, CP6_THDM, CP6_susy, CP7, CP7_THDM, CP7_susy, CP8, CP8_THDM, CP8_susy, CP9, CP9_THDM, CP9_susy, CPK10, CPK9, CPKQ1, CPKQ2, CPQ1, CPQ1_THDM, CPQ1_susy, CPQ2, CPQ2_THDM, CPQ2_susy, CQ1, CQ1_THDM, CQ1_susy, CQ2, CQ2_THDM, CQ2_susy, C_S1_bc, C_S1_bc_SUSY, C_S1_bc_THDM, C_S1_bu, C_S1_bu_SUSY, C_S1_bu_THDM, C_S1_cd, C_S1_cd_SUSY, C_S1_cd_THDM, C_S1_cs, C_S1_cs_SUSY, C_S1_cs_THDM, C_S1_du, C_S1_du_SUSY, C_S1_du_THDM, C_S1_su, C_S1_su_SUSY, C_S1_su_THDM, C_S2_bc, C_S2_bc_SUSY, C_S2_bc_THDM, C_S2_bu, C_S2_bu_SUSY, C_S2_bu_THDM, C_S2_cd, C_S2_cd_SUSY, C_S2_cd_THDM, C_S2_cs, C_S2_cs_SUSY, C_S2_cs_THDM, C_S2_du, C_S2_du_SUSY, C_S2_du_THDM, C_S2_su, C_S2_su_SUSY, C_S2_su_THDM, C_T_bc, C_T_bc_SUSY, C_T_bc_THDM, C_T_bu, C_T_bu_SUSY, C_T_bu_THDM, C_T_cd, C_T_cd_SUSY, C_T_cd_THDM, C_T_cs, C_T_cs_SUSY, C_T_cs_THDM, C_T_du, C_T_du_SUSY, C_T_du_THDM, C_T_su, C_T_su_SUSY, C_T_su_THDM, C_V1_bc, C_V1_bc_SUSY, C_V1_bc_THDM, C_V1_bu, C_V1_bu_SUSY, C_V1_bu_THDM, C_V1_cd, C_V1_cd_SUSY, C_V1_cd_THDM, C_V1_cs, C_V1_cs_SUSY, C_V1_cs_THDM, C_V1_du, C_V1_du_SUSY, C_V1_du_THDM, C_V1_su, C_V1_su_SUSY, C_V1_su_THDM, C_V2_bc, C_V2_bc_SUSY, C_V2_bc_THDM, C_V2_bu, C_V2_bu_SUSY, C_V2_bu_THDM, C_V2_cd, C_V2_cd_SUSY, C_V2_cd_THDM, C_V2_cs, C_V2_cs_SUSY, C_V2_cs_THDM, C_V2_du, C_V2_du_SUSY, C_V2_du_THDM, C_V2_su, C_V2_su_SUSY, C_V2_su_THDM, C_mix_bd_1, C_mix_bd_1_SUSY, C_mix_bd_1_THDM, C_mix_bd_1_tilde, C_mix_bd_1_tilde_SUSY, C_mix_bd_1_tilde_THDM, C_mix_bd_2, C_mix_bd_2_SUSY, C_mix_bd_2_THDM, C_mix_bd_2_tilde, C_mix_bd_2_tilde_SUSY, C_mix_bd_2_tilde_THDM, C_mix_bd_3, C_mix_bd_3_SUSY, C_mix_bd_3_THDM, C_mix_bd_3_tilde, C_mix_bd_3_tilde_SUSY, C_mix_bd_3_tilde_THDM, C_mix_bd_4, C_mix_bd_4_SUSY, C_mix_bd_4_THDM, C_mix_bd_5, C_mix_bd_5_SUSY, C_mix_bd_5_THDM, C_mix_bs_1, C_mix_bs_1_SUSY, C_mix_bs_1_THDM, C_mix_bs_1_tilde, C_mix_bs_1_tilde_SUSY, C_mix_bs_1_tilde_THDM, C_mix_bs_2, C_mix_bs_2_SUSY, C_mix_bs_2_THDM, C_mix_bs_2_tilde, C_mix_bs_2_tilde_SUSY, C_mix_bs_2_tilde_THDM, C_mix_bs_3, C_mix_bs_3_SUSY, C_mix_bs_3_THDM, C_mix_bs_3_tilde, C_mix_bs_3_tilde_SUSY, C_mix_bs_3_tilde_THDM, C_mix_bs_4, C_mix_bs_4_SUSY, C_mix_bs_4_THDM, C_mix_bs_5, C_mix_bs_5_SUSY, C_mix_bs_5_THDM, C_mix_cu_1, C_mix_cu_1_tilde, C_mix_cu_2, C_mix_cu_2_tilde, C_mix_cu_3, C_mix_cu_3_tilde, C_mix_cu_4, C_mix_cu_5, C_mix_sd_1, C_mix_sd_1_tilde, C_mix_sd_2, C_mix_sd_2_tilde, C_mix_sd_3, C_mix_sd_3_tilde, C_mix_sd_4, C_mix_sd_5, CustomWilson, and MartyWilson.

Public Member Functions

 WilsonCoefficient ()=default
 
 WilsonCoefficient (const std::string &name, const std::string &storage_block)
 Constructs a coefficient from a domain name and a storage block.
 
 WilsonCoefficient (const LhaID &name, const std::string &storage_block, ContributionType ct)
 Constructs a coefficient from an LHA base name and explicit contribution type.
 
std::function< scalar_t(const ParamSrc &)> get_func (QCDOrder order)
 Returns the compute function for a given QCD order.
 
std::unordered_set< ParamIdget_sources (QCDOrder order)
 Returns the source ParamIds required at a given QCD order.
 
LhaID get_lhaid (QCDOrder order)
 Returns the storage LhaID associated with a given QCD order.
 
LhaID get_lhaid_from_name (QCDOrder order)
 Computes the LhaID directly from the coefficient base name and mapping conventions.
 
std::string get_base_name () const
 Returns the base name of the coefficient without BSM suffixes.
 
void set_name (std::string name)
 Sets the domain name of the coefficient.
 
void set_owned (bool owned)
 Sets the ownership flag.
 
void set_storage_block (std::string block_name)
 Sets the storage block where the coefficient value is stored.
 
void set_contribution_type (ContributionType type)
 Sets the contribution type (SM/BSM/…).
 
void add_matching_patch (QCDOrder order, std::unordered_set< ParamId > extra_sources, std::function< scalar_t(const ParamSrc &)> patch)
 Add an extra additive term to the matching function of one QCD order.
 
complex_t get_matching_value (std::string order, ContributionType cont_type, std::shared_ptr< IParameterProxy< std::string, LhaID > > wilson_p) const
 Reads the coefficient value from the storage backend for a given order/type.
 
std::string get_name () const
 Returns the current full name (may include suffixes).
 
std::string get_storage_block () const
 Returns the storage block name.
 
ContributionType get_type ()
 Returns the current contribution type.
 
LhaID id (QCDOrder order, ContributionType typ) const
 Returns the LHA id for a given order and contribution type.
 
bool operator== (const WilsonCoefficient &other) const
 Equality compares name, contribution type, and ownership flag.
 
bool operator!= (const WilsonCoefficient &other) const
 Inequality convenience.
 
virtual ~WilsonCoefficient ()=default
 
virtual std::shared_ptr< WilsonCoefficientclone () const =0
 Virtual clone for polymorphic copy.
 

Protected Attributes

std::string coeffName {}
 Domain name of the coefficient (may include suffixes like _THDM/_SUSY).
 
ContributionType type {ContributionType::SM}
 Contribution type for this coefficient (SM by default, inferred in constructors).
 
bool is_owned {false}
 Ownership flag (used by higher-level logic to track "produced" coefficients).
 
std::string storage_block
 Block name where this coefficient is stored in the Parameters system.
 
std::map< QCDOrder, MatchingInfomatching_info
 Matching metadata indexed by QCD order.
 

Detailed Description

Abstract base class representing a Wilson coefficient and its matching information.

A Wilson coefficient is represented by:

  • A coefficient name (coeffName) used at the domain level.
  • A contribution type (type) (SM/BSM/…) controlling naming and storage conventions.
  • A storage block (storage_block) indicating where in the Parameters system the numeric values are stored (typically a WILSON block).
  • A map matching_info[order] storing MatchingInfo per QCDOrder.

Construction behavior (as implemented in Wilson.cpp):

  • If the name ends with _THDM or _SUSY, the coefficient is marked as BSM.
  • For each order in {LO, NLO, NNLO}, an entry is created in matching_info.

Storage / identification:

Reading values:

  • get_matching_value(...) uses an IParameterProxy (typically WILSON-scoped) to:
    • check existence of the entry (storage_block, id(order, cont_type)),
    • return 0 if missing,
    • otherwise read the scalar value and wrap it into complex_t(real=value, imag=0).

Ownership flag:

  • is_owned can be used by higher-level code to denote whether this coefficient is “owned” by a producer (e.g. computed by MARTY / dependent system) vs. externally provided.

Extensibility:

  • The class is abstract: derived types must implement clone().

Definition at line 153 of file Wilson.h.

Constructor & Destructor Documentation

◆ WilsonCoefficient() [1/3]

WilsonCoefficient::WilsonCoefficient ( )
default

◆ WilsonCoefficient() [2/3]

WilsonCoefficient::WilsonCoefficient ( const std::string &  name,
const std::string &  storage_block 
)

Constructs a coefficient from a domain name and a storage block.

The implementation:

  • infers ContributionType::BSM if name ends with _THDM or _SUSY,
  • initializes per-order matching info using id(order, type).
Parameters
nameDomain name of the coefficient (may include suffixes).
storage_blockBlock name where coefficient values are stored.

Definition at line 3 of file Wilson.cpp.

◆ WilsonCoefficient() [3/3]

WilsonCoefficient::WilsonCoefficient ( const LhaID name,
const std::string &  storage_block,
ContributionType  ct 
)

Constructs a coefficient from an LHA base name and explicit contribution type.

This constructor expects name to encode the base coefficient ID (via its parts). It then builds a “full” LHA identifier by appending:

  • order index (LO=0, NLO=1, NNLO=2),
  • contribution type index (SM=0, BSM=1, other=2).
Parameters
nameLHA identifier representing the base coefficient.
storage_blockBlock name where coefficient values are stored.
ctContribution type to associate to this coefficient.

Definition at line 14 of file Wilson.cpp.

◆ ~WilsonCoefficient()

virtual WilsonCoefficient::~WilsonCoefficient ( )
virtualdefault

Member Function Documentation

◆ add_matching_patch()

void WilsonCoefficient::add_matching_patch ( QCDOrder  order,
std::unordered_set< ParamId extra_sources,
std::function< scalar_t(const ParamSrc &)>  patch 
)

Add an extra additive term to the matching function of one QCD order.

The patch is composed at the coefficient level before the dependent parameter is registered by CoefficientGroup::init(). Extra source parameters are merged into the coefficient's source set.

Definition at line 37 of file Wilson.cpp.

◆ clone()

virtual std::shared_ptr< WilsonCoefficient > WilsonCoefficient::clone ( ) const
pure virtual

Virtual clone for polymorphic copy.

Derived coefficient types must implement this to support copying through base pointers.

Returns
A new heap-allocated copy of the dynamic type.

Implemented in CustomWilson, MartyWilson, CP1, CP2, CP3, CP4, CP5, CP6, CP7, CP8, CP9, CP10, CPQ1, CPQ2, CQ1, CQ2, C1_susy, C2_susy, C3_susy, C4_susy, C5_susy, C6_susy, C7_susy, C8_susy, C9_susy, C10_susy, CQ1_susy, CQ2_susy, CP1_susy, CP2_susy, CP3_susy, CP4_susy, CP5_susy, CP6_susy, CP7_susy, CP8_susy, CP9_susy, CP10_susy, CPQ1_susy, CPQ2_susy, C1_THDM, C2_THDM, C3_THDM, C4_THDM, C5_THDM, C6_THDM, C7_THDM, C8_THDM, C9_THDM, C10_THDM, CQ1_THDM, CQ2_THDM, CP1_THDM, CP2_THDM, CP3_THDM, CP4_THDM, CP5_THDM, CP6_THDM, CP7_THDM, CP8_THDM, CP9_THDM, CP10_THDM, CPQ1_THDM, CPQ2_THDM, C_V1_bc_SUSY, C_V2_bc_SUSY, C_S1_bc_SUSY, C_S2_bc_SUSY, C_T_bc_SUSY, C_V1_bu_SUSY, C_V2_bu_SUSY, C_S1_bu_SUSY, C_S2_bu_SUSY, C_T_bu_SUSY, C_V1_bc_THDM, C_V2_bc_THDM, C_S1_bc_THDM, C_S2_bc_THDM, C_T_bc_THDM, C_V1_bu_THDM, C_V2_bu_THDM, C_S1_bu_THDM, C_S2_bu_THDM, C_T_bu_THDM, C_V1_cs_SUSY, C_V2_cs_SUSY, C_S1_cs_SUSY, C_S2_cs_SUSY, C_T_cs_SUSY, C_V1_cd_SUSY, C_V2_cd_SUSY, C_S1_cd_SUSY, C_S2_cd_SUSY, C_T_cd_SUSY, C_V1_cs_THDM, C_V2_cs_THDM, C_S1_cs_THDM, C_S2_cs_THDM, C_T_cs_THDM, C_V1_cd_THDM, C_V2_cd_THDM, C_S1_cd_THDM, C_S2_cd_THDM, C_T_cd_THDM, C_V1_su_SUSY, C_V2_su_SUSY, C_S1_su_SUSY, C_S2_su_SUSY, C_T_su_SUSY, C_V1_su_THDM, C_V2_su_THDM, C_S1_su_THDM, C_S2_su_THDM, C_T_su_THDM, C_mix_bd_1_SUSY, C_mix_bd_1_tilde_SUSY, C_mix_bd_2_SUSY, C_mix_bd_2_tilde_SUSY, C_mix_bd_3_SUSY, C_mix_bd_3_tilde_SUSY, C_mix_bd_4_SUSY, C_mix_bd_5_SUSY, C_mix_bs_1_SUSY, C_mix_bs_1_tilde_SUSY, C_mix_bs_2_SUSY, C_mix_bs_2_tilde_SUSY, C_mix_bs_3_SUSY, C_mix_bs_3_tilde_SUSY, C_mix_bs_4_SUSY, C_mix_bs_5_SUSY, C_mix_bd_1_THDM, C_mix_bd_1_tilde_THDM, C_mix_bd_2_THDM, C_mix_bd_2_tilde_THDM, C_mix_bd_3_THDM, C_mix_bd_3_tilde_THDM, C_mix_bd_4_THDM, C_mix_bd_5_THDM, C_mix_bs_1_THDM, C_mix_bs_1_tilde_THDM, C_mix_bs_2_THDM, C_mix_bs_2_tilde_THDM, C_mix_bs_3_THDM, C_mix_bs_3_tilde_THDM, C_mix_bs_4_THDM, C_mix_bs_5_THDM, C_V1_du_SUSY, C_V2_du_SUSY, C_S1_du_SUSY, C_S2_du_SUSY, C_T_du_SUSY, C_V1_du_THDM, C_V2_du_THDM, C_S1_du_THDM, C_S2_du_THDM, C_T_du_THDM, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C_V1_bc, C_V2_bc, C_S1_bc, C_S2_bc, C_T_bc, C_V1_bu, C_V2_bu, C_S1_bu, C_S2_bu, C_T_bu, C_V1_cs, C_V2_cs, C_S1_cs, C_S2_cs, C_T_cs, C_V1_cd, C_V2_cd, C_S1_cd, C_S2_cd, C_T_cd, C_V1_su, C_V2_su, C_S1_su, C_S2_su, C_T_su, CK9, CK10, CKQ1, CKQ2, CPK9, CPK10, CPKQ1, CPKQ2, CK_L, C_mix_bd_1, C_mix_bd_1_tilde, C_mix_bd_2, C_mix_bd_2_tilde, C_mix_bd_3, C_mix_bd_3_tilde, C_mix_bd_4, C_mix_bd_5, C_mix_bs_1, C_mix_bs_1_tilde, C_mix_bs_2, C_mix_bs_2_tilde, C_mix_bs_3, C_mix_bs_3_tilde, C_mix_bs_4, C_mix_bs_5, C_mix_sd_1, C_mix_sd_1_tilde, C_mix_sd_2, C_mix_sd_2_tilde, C_mix_sd_3, C_mix_sd_3_tilde, C_mix_sd_4, C_mix_sd_5, C_mix_cu_1, C_mix_cu_1_tilde, C_mix_cu_2, C_mix_cu_2_tilde, C_mix_cu_3, C_mix_cu_3_tilde, C_mix_cu_4, C_mix_cu_5, C_V1_du, C_V2_du, C_S1_du, C_S2_du, and C_T_du.

◆ get_base_name()

std::string WilsonCoefficient::get_base_name ( ) const

Returns the base name of the coefficient without BSM suffixes.

If coeffName ends with _THDM or _SUSY, the suffix is stripped.

Returns
Base coefficient name.

Definition at line 68 of file Wilson.cpp.

◆ get_func()

std::function< scalar_t(const ParamSrc &)> WilsonCoefficient::get_func ( QCDOrder  order)

Returns the compute function for a given QCD order.

Parameters
orderQCD order (LO/NLO/NNLO).
Returns
Stored compute functor.

Definition at line 27 of file Wilson.cpp.

◆ get_lhaid()

LhaID WilsonCoefficient::get_lhaid ( QCDOrder  order)

Returns the storage LhaID associated with a given QCD order.

Parameters
orderQCD order.
Returns
LHA identifier for that order.

Definition at line 57 of file Wilson.cpp.

◆ get_lhaid_from_name()

LhaID WilsonCoefficient::get_lhaid_from_name ( QCDOrder  order)

Computes the LhaID directly from the coefficient base name and mapping conventions.

This is useful when the internal matching_info map does not fully encode how ids are derived from names, or when ids must be reconstructed.

Parameters
orderQCD order.
Returns
LHA identifier derived from WCoefMapper and the coefficient base name.

Definition at line 61 of file Wilson.cpp.

◆ get_matching_value()

complex_t WilsonCoefficient::get_matching_value ( std::string  order,
ContributionType  cont_type,
std::shared_ptr< IParameterProxy< std::string, LhaID > >  wilson_p 
) const

Reads the coefficient value from the storage backend for a given order/type.

This is a read operation through an IParameterProxy (commonly WILSON scope).

  • If the entry does not exist, returns (0,0).
  • Otherwise returns complex(value, 0).
Parameters
orderOrder as string (parsed using OrderMapper).
cont_typeContribution type (SM/BSM/…).
wilson_pParameter proxy used to access stored values.
Returns
Complex value (imaginary part is 0 with current implementation).

Definition at line 107 of file Wilson.cpp.

◆ get_name()

std::string WilsonCoefficient::get_name ( ) const
inline

Returns the current full name (may include suffixes).

Definition at line 272 of file Wilson.h.

◆ get_sources()

std::unordered_set< ParamId > WilsonCoefficient::get_sources ( QCDOrder  order)

Returns the source ParamIds required at a given QCD order.

Parameters
orderQCD order.
Returns
Set of ParamIds used as sources.

Definition at line 32 of file Wilson.cpp.

◆ get_storage_block()

std::string WilsonCoefficient::get_storage_block ( ) const
inline

Returns the storage block name.

Definition at line 275 of file Wilson.h.

◆ get_type()

ContributionType WilsonCoefficient::get_type ( )
inline

Returns the current contribution type.

Definition at line 278 of file Wilson.h.

◆ id()

LhaID WilsonCoefficient::id ( QCDOrder  order,
ContributionType  typ 
) const

Returns the LHA id for a given order and contribution type.

Delegates to WCoefMapper using the base name mapping.

Parameters
orderQCD order.
typContribution type.
Returns
Full LHA identifier.

Definition at line 97 of file Wilson.cpp.

◆ operator!=()

bool WilsonCoefficient::operator!= ( const WilsonCoefficient other) const
inline

Inequality convenience.

Definition at line 295 of file Wilson.h.

◆ operator==()

bool WilsonCoefficient::operator== ( const WilsonCoefficient other) const

Equality compares name, contribution type, and ownership flag.

Definition at line 101 of file Wilson.cpp.

◆ set_contribution_type()

void WilsonCoefficient::set_contribution_type ( ContributionType  type)

Sets the contribution type (SM/BSM/…).

Definition at line 93 of file Wilson.cpp.

◆ set_name()

void WilsonCoefficient::set_name ( std::string  name)
inline

Sets the domain name of the coefficient.

Definition at line 229 of file Wilson.h.

◆ set_owned()

void WilsonCoefficient::set_owned ( bool  owned)

Sets the ownership flag.

If already owned and asked to set owned again, this is a no-op.

Parameters
ownedNew ownership value.

Definition at line 80 of file Wilson.cpp.

◆ set_storage_block()

void WilsonCoefficient::set_storage_block ( std::string  block_name)

Sets the storage block where the coefficient value is stored.

Definition at line 89 of file Wilson.cpp.

Member Data Documentation

◆ coeffName

std::string WilsonCoefficient::coeffName {}
protected

Domain name of the coefficient (may include suffixes like _THDM/_SUSY).

Definition at line 311 of file Wilson.h.

◆ is_owned

bool WilsonCoefficient::is_owned {false}
protected

Ownership flag (used by higher-level logic to track "produced" coefficients).

Definition at line 317 of file Wilson.h.

◆ matching_info

std::map<QCDOrder, MatchingInfo> WilsonCoefficient::matching_info
protected

Matching metadata indexed by QCD order.

Each entry contains:

  • sources needed to compute this coefficient/order,
  • compute function,
  • the LHA id used for storage.

Definition at line 330 of file Wilson.h.

◆ storage_block

std::string WilsonCoefficient::storage_block
protected

Block name where this coefficient is stored in the Parameters system.

Definition at line 320 of file Wilson.h.

◆ type

ContributionType WilsonCoefficient::type {ContributionType::SM}
protected

Contribution type for this coefficient (SM by default, inferred in constructors).

Definition at line 314 of file Wilson.h.


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