Top

flavio.physics.eft module

Classes for effective field theory (EFT) Wilson coefficients

"""Classes for effective field theory (EFT) Wilson coefficients"""

from wilson import wcxf
import wilson


# sector names prior to v0.27 translated to WCxf sector names
sectors_flavio2wcxf = {
 'bcenue': 'cbenu',
 'bcenumu': 'cbenu',
 'bcenutau': 'cbenu',
 'bcmunue': 'cbmunu',
 'bcmunumu': 'cbmunu',
 'bcmunutau': 'cbmunu',
 'bctaunue': 'cbtaunu',
 'bctaunumu': 'cbtaunu',
 'bctaunutau': 'cbtaunu',
 'bdbd': 'dbdb',
 'bdee': 'db',
 'bdemu': 'dbmue',
 'bdetau': 'dbtaue',
 'bdmue': 'dbemu',
 'bdmumu': 'db',
 'bdmutau': 'dbtaumu',
 'bdnuenue': 'dbnunu',
 'bdnuenumu': 'dbnunu',
 'bdnuenutau': 'dbnunu',
 'bdnumunue': 'dbnunu',
 'bdnumunumu': 'dbnunu',
 'bdnumunutau': 'dbnunu',
 'bdnutaunue': 'dbnunu',
 'bdnutaunumu': 'dbnunu',
 'bdnutaunutau': 'dbnunu',
 'bdtaue': 'dbetau',
 'bdtaumu': 'dbmutau',
 'bdtautau': 'db',
 'bsbs': 'sbsb',
 'bsee': 'sb',
 'bsemu': 'sbmue',
 'bsetau': 'sbtaue',
 'bsmue': 'sbemu',
 'bsmumu': 'sb',
 'bsmutau': 'sbtaumu',
 'bsnuenue': 'sbnunu',
 'bsnuenumu': 'sbnunu',
 'bsnuenutau': 'sbnunu',
 'bsnumunue': 'sbnunu',
 'bsnumunumu': 'sbnunu',
 'bsnumunutau': 'sbnunu',
 'bsnutaunue': 'sbnunu',
 'bsnutaunumu': 'sbnunu',
 'bsnutaunutau': 'sbnunu',
 'bstaue': 'sbetau',
 'bstaumu': 'sbmutau',
 'bstautau': 'sb',
 'buenue': 'ubenu',
 'buenumu': 'ubenu',
 'buenutau': 'ubenu',
 'bumunue': 'ubmunu',
 'bumunumu': 'ubmunu',
 'bumunutau': 'ubmunu',
 'butaunue': 'ubtaunu',
 'butaunumu': 'ubtaunu',
 'butaunutau': 'ubtaunu',
 'dcenue': 'cdenu',
 'dcenumu': 'cdenu',
 'dcenutau': 'cdenu',
 'dcmunue': 'cdmunu',
 'dcmunumu': 'cdmunu',
 'dcmunutau': 'cdmunu',
 'dctaunue': 'cdtaunu',
 'dctaunumu': 'cdtaunu',
 'dctaunutau': 'cdtaunu',
 'duenue': 'udenu',
 'duenumu': 'udenu',
 'duenutau': 'udenu',
 'dumunue': 'udmunu',
 'dumunumu': 'udmunu',
 'dumunutau': 'udmunu',
 'dutaunue': 'udtaunu',
 'dutaunumu': 'udtaunu',
 'dutaunutau': 'udtaunu',
 'scenue': 'csenu',
 'scenumu': 'csenu',
 'scenutau': 'csenu',
 'scmunue': 'csmunu',
 'scmunumu': 'csmunu',
 'scmunutau': 'csmunu',
 'sctaunue': 'cstaunu',
 'sctaunumu': 'cstaunu',
 'sctaunutau': 'cstaunu',
 'sdnuenue': 'sdnunu',
 'sdnuenumu': 'sdnunu',
 'sdnuenutau': 'sdnunu',
 'sdnumunue': 'sdnunu',
 'sdnumunumu': 'sdnunu',
 'sdnumunutau': 'sdnunu',
 'sdnutaunue': 'sdnunu',
 'sdnutaunumu': 'sdnunu',
 'sdnutaunutau': 'sdnunu',
 'sdee': 'sd',
 'sdmumu': 'sd',
 'sdtautau': 'sd',
 'sdsd': 'sdsd',
 'ucuc': 'cucu',
 'suenue': 'usenu',
 'suenumu': 'usenu',
 'suenutau': 'usenu',
 'sumunue': 'usmunu',
 'sumunumu': 'usmunu',
 'sumunutau': 'usmunu',
 'sutaunue': 'ustaunu',
 'sutaunumu': 'ustaunu',
 'sutaunutau': 'ustaunu'}


class WilsonCoefficients(wilson.Wilson):
    """Class representing a point in the EFT parameter space and giving
    access to RG evolution.

    Note that all Wilson coefficient values refer to new physics contributions
    only, i.e. they vanish in the SM.

    Methods:

    - set_initial: set the initial values of Wilson coefficients at some scale
    - get_wc: get the values of the Wilson coefficients at some scale
    - set_initial_wcxf: set the initial values from a wcxf.WC instance
    - get_wc_wcxf: get the values of the Wilson coefficients at some scale
      as a wcxf.WC instance
    """
    def __init__(self):
        self.wc = None
        self._options = {}

    def set_initial(self, wc_dict, scale, eft='WET', basis='flavio'):
        """Set initial values of Wilson coefficients.

        Parameters:

        - wc_dict: dictionary where keys are Wilson coefficient name strings and
          values are Wilson coefficient NP contribution values
        - scale: $\overline{\text{MS}}$ renormalization scale
        """
        super().__init__(wcdict=wc_dict, scale=scale, eft=eft, basis=basis)

    def set_initial_wcxf(self, wc):
        """Set initial values of Wilson coefficients from a WCxf WC instance.

        If the instance is given in a basis other than the flavio basis,
        the translation is performed automatically, if implemented in the
        `wcxf` package."""
        super().__init__(wcdict=wc.dict, scale=wc.scale, eft=wc.eft, basis=wc.basis)

    @property
    def get_initial_wcxf(self):
        """Return a wcxf.WC instance in the flavio basis containing the initial
        values of the Wilson coefficients."""
        if self.wc is None:
            raise ValueError("Need to set initial values first.")
        return self.wc

    @classmethod
    def from_wilson(cls, w, par_dict):
        if w is None:
            return None
        if isinstance(w, cls):
            return w
        fwc = cls()
        fwc.set_initial_wcxf(w.wc)
        fwc._cache = w._cache
        fwc._options = w._options
        _ckm_options = {k: par_dict[k] for k in ['Vus', 'Vcb', 'Vub', 'gamma']}
        if fwc.get_option('parameters') != _ckm_options:
            fwc.set_option('parameters', _ckm_options)
        return fwc

    def run_wcxf(*args, **kwargs):
        raise ValueError("The method run_wcxf has been removed. Please use the match_run method of wilson.Wilson instead.")

    def get_wcxf(self, sector, scale, par, eft='WET', basis='flavio', nf_out=None):
        """Get the values of the Wilson coefficients belonging to a specific
        sector (e.g. `bsmumu`) at a given scale.

        Returns a WCxf.WC instance.

        Parameters:

        - sector: string name of the sector as defined in the WCxf EFT instance
        - scale: $\overline{\text{MS}}$ renormalization scale
        - par: dictionary of parameters
        - eft: name of the EFT at the output scale
        - basis: name of the output basis
        """
        # nf_out is only present to preserve backwards compatibility
        if nf_out == 5:
            eft = 'WET'
        elif nf_out == 4:
            eft = 'WET-4'
        elif nf_out == 3:
            eft = 'WET-3'
        elif nf_out is not None:
            raise ValueError("Invalid value: nf_out=".format(nf_out))
        if sector == 'all':
            mr_sectors = 'all'
        else:
            # translate from legacy flavio to wcxf sector if necessary
            wcxf_sector = sectors_flavio2wcxf.get(sector, sector)
            mr_sectors = (wcxf_sector,)
        if not self.wc:
            return wcxf.WC(eft=eft, basis=basis, scale=scale, values={})
        return self.match_run(scale=scale, eft=eft, basis=basis, sectors=mr_sectors)

    def get_wc(self, sector, scale, par, eft='WET', basis='flavio', nf_out=None):
        """Get the values of the Wilson coefficients belonging to a specific
        sector (e.g. `bsmumu`) at a given scale.

        Returns a dictionary of WC values.

        Parameters:

        - sector: string name of the sector as defined in the WCxf EFT instance
        - scale: $\overline{\text{MS}}$ renormalization scale
        - par: dictionary of parameters
        - eft: name of the EFT at the output scale
        - basis: name of the output basis
        """
        wcxf_basis = wcxf.Basis[eft, basis]
        if sector == 'all':
            coeffs = wcxf_basis.all_wcs
        else:
            # translate from legacy flavio to wcxf sector if necessary
            wcxf_sector = sectors_flavio2wcxf.get(sector, sector)
            coeffs = wcxf_basis.sectors[wcxf_sector].keys()
        wc_sm = dict.fromkeys(coeffs, 0)
        if not self.wc or not any(self.wc.values.values()):
            return wc_sm
        wc_out = self.get_wcxf(sector, scale, par, eft, basis, nf_out)
        wc_out_dict = wc_sm  # initialize with zeros
        wc_out_dict.update(wc_out.dict)  # overwrite non-zero entries
        return wc_out_dict


# this global variable is simply an instance that is not meant to be modifed -
# i.e., a Standard Model Wilson coefficient instance.
_wc_sm = WilsonCoefficients()

Module variables

var sectors_flavio2wcxf

Classes

class WilsonCoefficients

Class representing a point in the EFT parameter space and giving access to RG evolution.

Note that all Wilson coefficient values refer to new physics contributions only, i.e. they vanish in the SM.

Methods:

  • set_initial: set the initial values of Wilson coefficients at some scale
  • get_wc: get the values of the Wilson coefficients at some scale
  • set_initial_wcxf: set the initial values from a wcxf.WC instance
  • get_wc_wcxf: get the values of the Wilson coefficients at some scale as a wcxf.WC instance
class WilsonCoefficients(wilson.Wilson):
    """Class representing a point in the EFT parameter space and giving
    access to RG evolution.

    Note that all Wilson coefficient values refer to new physics contributions
    only, i.e. they vanish in the SM.

    Methods:

    - set_initial: set the initial values of Wilson coefficients at some scale
    - get_wc: get the values of the Wilson coefficients at some scale
    - set_initial_wcxf: set the initial values from a wcxf.WC instance
    - get_wc_wcxf: get the values of the Wilson coefficients at some scale
      as a wcxf.WC instance
    """
    def __init__(self):
        self.wc = None
        self._options = {}

    def set_initial(self, wc_dict, scale, eft='WET', basis='flavio'):
        """Set initial values of Wilson coefficients.

        Parameters:

        - wc_dict: dictionary where keys are Wilson coefficient name strings and
          values are Wilson coefficient NP contribution values
        - scale: $\overline{\text{MS}}$ renormalization scale
        """
        super().__init__(wcdict=wc_dict, scale=scale, eft=eft, basis=basis)

    def set_initial_wcxf(self, wc):
        """Set initial values of Wilson coefficients from a WCxf WC instance.

        If the instance is given in a basis other than the flavio basis,
        the translation is performed automatically, if implemented in the
        `wcxf` package."""
        super().__init__(wcdict=wc.dict, scale=wc.scale, eft=wc.eft, basis=wc.basis)

    @property
    def get_initial_wcxf(self):
        """Return a wcxf.WC instance in the flavio basis containing the initial
        values of the Wilson coefficients."""
        if self.wc is None:
            raise ValueError("Need to set initial values first.")
        return self.wc

    @classmethod
    def from_wilson(cls, w, par_dict):
        if w is None:
            return None
        if isinstance(w, cls):
            return w
        fwc = cls()
        fwc.set_initial_wcxf(w.wc)
        fwc._cache = w._cache
        fwc._options = w._options
        _ckm_options = {k: par_dict[k] for k in ['Vus', 'Vcb', 'Vub', 'gamma']}
        if fwc.get_option('parameters') != _ckm_options:
            fwc.set_option('parameters', _ckm_options)
        return fwc

    def run_wcxf(*args, **kwargs):
        raise ValueError("The method run_wcxf has been removed. Please use the match_run method of wilson.Wilson instead.")

    def get_wcxf(self, sector, scale, par, eft='WET', basis='flavio', nf_out=None):
        """Get the values of the Wilson coefficients belonging to a specific
        sector (e.g. `bsmumu`) at a given scale.

        Returns a WCxf.WC instance.

        Parameters:

        - sector: string name of the sector as defined in the WCxf EFT instance
        - scale: $\overline{\text{MS}}$ renormalization scale
        - par: dictionary of parameters
        - eft: name of the EFT at the output scale
        - basis: name of the output basis
        """
        # nf_out is only present to preserve backwards compatibility
        if nf_out == 5:
            eft = 'WET'
        elif nf_out == 4:
            eft = 'WET-4'
        elif nf_out == 3:
            eft = 'WET-3'
        elif nf_out is not None:
            raise ValueError("Invalid value: nf_out=".format(nf_out))
        if sector == 'all':
            mr_sectors = 'all'
        else:
            # translate from legacy flavio to wcxf sector if necessary
            wcxf_sector = sectors_flavio2wcxf.get(sector, sector)
            mr_sectors = (wcxf_sector,)
        if not self.wc:
            return wcxf.WC(eft=eft, basis=basis, scale=scale, values={})
        return self.match_run(scale=scale, eft=eft, basis=basis, sectors=mr_sectors)

    def get_wc(self, sector, scale, par, eft='WET', basis='flavio', nf_out=None):
        """Get the values of the Wilson coefficients belonging to a specific
        sector (e.g. `bsmumu`) at a given scale.

        Returns a dictionary of WC values.

        Parameters:

        - sector: string name of the sector as defined in the WCxf EFT instance
        - scale: $\overline{\text{MS}}$ renormalization scale
        - par: dictionary of parameters
        - eft: name of the EFT at the output scale
        - basis: name of the output basis
        """
        wcxf_basis = wcxf.Basis[eft, basis]
        if sector == 'all':
            coeffs = wcxf_basis.all_wcs
        else:
            # translate from legacy flavio to wcxf sector if necessary
            wcxf_sector = sectors_flavio2wcxf.get(sector, sector)
            coeffs = wcxf_basis.sectors[wcxf_sector].keys()
        wc_sm = dict.fromkeys(coeffs, 0)
        if not self.wc or not any(self.wc.values.values()):
            return wc_sm
        wc_out = self.get_wcxf(sector, scale, par, eft, basis, nf_out)
        wc_out_dict = wc_sm  # initialize with zeros
        wc_out_dict.update(wc_out.dict)  # overwrite non-zero entries
        return wc_out_dict

Ancestors (in MRO)

  • WilsonCoefficients
  • wilson.classes.Wilson
  • wilson.classes.ConfigurableClass
  • builtins.object

Static methods

def __init__(

self)

Initialize the Wilson class.

Parameters:

  • wcdict: dictionary of Wilson coefficient values at the input scale. The keys must exist as Wilson coefficients in the WCxf basis file. The values must be real or complex numbers (not dictionaries with key 'Re'/'Im'!)
  • scale: input scale in GeV
  • eft: input EFT
  • basis: input basis
def __init__(self):
    self.wc = None
    self._options = {}

def clear_cache(

self)

def clear_cache(self):
    self._cache = {}

def get_option(

self, key)

Return the current value of the option key (string).

Instance method, only refers to current instance.

def get_option(self, key):
    """Return the current value of the option `key` (string).
    Instance method, only refers to current instance."""
    return self._options.get(key, self._default_options[key])

def get_wc(

self, sector, scale, par, eft='WET', basis='flavio', nf_out=None)

Get the values of the Wilson coefficients belonging to a specific sector (e.g. bsmumu) at a given scale.

Returns a dictionary of WC values.

Parameters:

  • sector: string name of the sector as defined in the WCxf EFT instance
  • scale: $\overline{ ext{MS}}$ renormalization scale
  • par: dictionary of parameters
  • eft: name of the EFT at the output scale
  • basis: name of the output basis
def get_wc(self, sector, scale, par, eft='WET', basis='flavio', nf_out=None):
    """Get the values of the Wilson coefficients belonging to a specific
    sector (e.g. `bsmumu`) at a given scale.
    Returns a dictionary of WC values.
    Parameters:
    - sector: string name of the sector as defined in the WCxf EFT instance
    - scale: $\overline{\text{MS}}$ renormalization scale
    - par: dictionary of parameters
    - eft: name of the EFT at the output scale
    - basis: name of the output basis
    """
    wcxf_basis = wcxf.Basis[eft, basis]
    if sector == 'all':
        coeffs = wcxf_basis.all_wcs
    else:
        # translate from legacy flavio to wcxf sector if necessary
        wcxf_sector = sectors_flavio2wcxf.get(sector, sector)
        coeffs = wcxf_basis.sectors[wcxf_sector].keys()
    wc_sm = dict.fromkeys(coeffs, 0)
    if not self.wc or not any(self.wc.values.values()):
        return wc_sm
    wc_out = self.get_wcxf(sector, scale, par, eft, basis, nf_out)
    wc_out_dict = wc_sm  # initialize with zeros
    wc_out_dict.update(wc_out.dict)  # overwrite non-zero entries
    return wc_out_dict

def get_wcxf(

self, sector, scale, par, eft='WET', basis='flavio', nf_out=None)

Get the values of the Wilson coefficients belonging to a specific sector (e.g. bsmumu) at a given scale.

Returns a WCxf.WC instance.

Parameters:

  • sector: string name of the sector as defined in the WCxf EFT instance
  • scale: $\overline{ ext{MS}}$ renormalization scale
  • par: dictionary of parameters
  • eft: name of the EFT at the output scale
  • basis: name of the output basis
def get_wcxf(self, sector, scale, par, eft='WET', basis='flavio', nf_out=None):
    """Get the values of the Wilson coefficients belonging to a specific
    sector (e.g. `bsmumu`) at a given scale.
    Returns a WCxf.WC instance.
    Parameters:
    - sector: string name of the sector as defined in the WCxf EFT instance
    - scale: $\overline{\text{MS}}$ renormalization scale
    - par: dictionary of parameters
    - eft: name of the EFT at the output scale
    - basis: name of the output basis
    """
    # nf_out is only present to preserve backwards compatibility
    if nf_out == 5:
        eft = 'WET'
    elif nf_out == 4:
        eft = 'WET-4'
    elif nf_out == 3:
        eft = 'WET-3'
    elif nf_out is not None:
        raise ValueError("Invalid value: nf_out=".format(nf_out))
    if sector == 'all':
        mr_sectors = 'all'
    else:
        # translate from legacy flavio to wcxf sector if necessary
        wcxf_sector = sectors_flavio2wcxf.get(sector, sector)
        mr_sectors = (wcxf_sector,)
    if not self.wc:
        return wcxf.WC(eft=eft, basis=basis, scale=scale, values={})
    return self.match_run(scale=scale, eft=eft, basis=basis, sectors=mr_sectors)

def match_run(

self, scale, eft, basis, sectors='all')

Run the Wilson coefficients to a different scale (and possibly different EFT) and return them as wcxf.WC instance.

Parameters:

  • scale: output scale in GeV
  • eft: output EFT
  • basis: output basis
  • sectors: in the case of WET (or WET-4 or WET-3), a tuple of sector names can be optionally provided. In this case, only the Wilson coefficients from this sector(s) will be returned and all others discareded. This can speed up the computation significantly if only a small number of sectors is of interest. The sector names are defined in the WCxf basis file.
def match_run(self, scale, eft, basis, sectors='all'):
    """Run the Wilson coefficients to a different scale
    (and possibly different EFT)
    and return them as `wcxf.WC` instance.
    Parameters:
    - `scale`: output scale in GeV
    - `eft`: output EFT
    - `basis`: output basis
    - `sectors`: in the case of WET (or WET-4 or WET-3), a tuple of sector
      names can be optionally provided. In this case, only the Wilson coefficients
      from this sector(s) will be returned and all others discareded. This
      can speed up the computation significantly if only a small number of sectors
      is of interest. The sector names are defined in the WCxf basis file.
    """
    cached = self._get_from_cache(sector=sectors, scale=scale, eft=eft, basis=basis)
    if cached is not None:
        return cached
    if sectors  == 'all':
        # the default value for sectors is "None" for translators
        translate_sectors = None
    else:
        translate_sectors = sectors
    scale_ew = self.get_option('smeft_matchingscale')
    mb = self.get_option('mb_matchingscale')
    mc = self.get_option('mc_matchingscale')
    if self.wc.basis == basis and self.wc.eft == eft and scale == self.wc.scale:
        return self.wc  # nothing to do
    if self.wc.eft == eft and scale == self.wc.scale:
        wc_out = self.wc.translate(basis, sectors=translate_sectors, parameters=self.parameters)  # only translation necessary
        self._set_cache(sectors, scale, eft, basis, wc_out)
        return wc_out
    if self.wc.eft == 'SMEFT':
        smeft_accuracy = self.get_option('smeft_accuracy')
        if eft == 'SMEFT':
            smeft = SMEFT(self.wc.translate('Warsaw', sectors=translate_sectors, parameters=self.parameters))
            # if input and output EFT ist SMEFT, just run.
            wc_out = smeft.run(scale, accuracy=smeft_accuracy).translate(basis)
            self._set_cache('all', scale, 'SMEFT', wc_out.basis, wc_out)
            return wc_out
        else:
            # if SMEFT -> WET-x: match to WET at the EW scale
            wc_ew = self._get_from_cache(sector='all', scale=scale_ew, eft='WET', basis='JMS')
            if wc_ew is None:
                if self.wc.scale == scale_ew:
                    wc_ew = self.wc.match('WET', 'JMS', parameters=self.matching_parameters)  # no need to run
                else:
                    smeft = SMEFT(self.wc.translate('Warsaw', parameters=self.parameters))
                    wc_ew = smeft.run(scale_ew, accuracy=smeft_accuracy).match('WET', 'JMS', parameters=self.matching_parameters)
            self._set_cache('all', scale_ew, wc_ew.eft, wc_ew.basis, wc_ew)
            wet = WETrunner(wc_ew, **self._wetrun_opt())
    elif self.wc.eft in ['WET', 'WET-4', 'WET-3']:
        wet = WETrunner(self.wc.translate('JMS', parameters=self.parameters, sectors=translate_sectors), **self._wetrun_opt())
    else:
        raise ValueError(f"Input EFT {self.wc.eft} unknown or not supported")
    if eft == wet.eft:  # just run
        wc_out = wet.run(scale, sectors=sectors).translate(basis, sectors=translate_sectors, parameters=self.parameters)
        self._set_cache(sectors, scale, eft, basis, wc_out)
        return wc_out
    elif eft == 'WET-4' and wet.eft == 'WET':  # match at mb
        wc_mb = wet.run(mb, sectors=sectors).match('WET-4', 'JMS', parameters=self.matching_parameters)
        wet4 = WETrunner(wc_mb, **self._wetrun_opt())
        wc_out = wet4.run(scale, sectors=sectors).translate(basis, sectors=translate_sectors, parameters=self.parameters)
        self._set_cache(sectors, scale, 'WET-4', basis, wc_out)
        return wc_out
    elif eft == 'WET-3' and wet.eft == 'WET-4':  # match at mc
        wc_mc = wet.run(mc, sectors=sectors).match('WET-3', 'JMS', parameters=self.matching_parameters)
        wet3 = WETrunner(wc_mc, **self._wetrun_opt())
        wc_out = wet3.run(scale, sectors=sectors).translate(basis, sectors=translate_sectors, parameters=self.parameters)
        return wc_out
        self._set_cache(sectors, scale, 'WET-3', basis, wc_out)
    elif eft == 'WET-3' and wet.eft == 'WET':  # match at mb and mc
        wc_mb = wet.run(mb, sectors=sectors).match('WET-4', 'JMS', parameters=self.matching_parameters)
        wet4 = WETrunner(wc_mb, **self._wetrun_opt())
        wc_mc = wet4.run(mc, sectors=sectors).match('WET-3', 'JMS', parameters=self.matching_parameters)
        wet3 = WETrunner(wc_mc, **self._wetrun_opt())
        wc_out = wet3.run(scale, sectors=sectors).translate(basis, sectors=translate_sectors, parameters=self.parameters)
        self._set_cache(sectors, scale, 'WET-3', basis, wc_out)
        return wc_out
    else:
        raise ValueError(f"Running from {wet.eft} to {eft} not implemented")

def run_wcxf(

*args, **kwargs)

def run_wcxf(*args, **kwargs):
    raise ValueError("The method run_wcxf has been removed. Please use the match_run method of wilson.Wilson instead.")

def set_initial(

self, wc_dict, scale, eft='WET', basis='flavio')

Set initial values of Wilson coefficients.

Parameters:

  • wc_dict: dictionary where keys are Wilson coefficient name strings and values are Wilson coefficient NP contribution values
  • scale: $\overline{ ext{MS}}$ renormalization scale
def set_initial(self, wc_dict, scale, eft='WET', basis='flavio'):
    """Set initial values of Wilson coefficients.
    Parameters:
    - wc_dict: dictionary where keys are Wilson coefficient name strings and
      values are Wilson coefficient NP contribution values
    - scale: $\overline{\text{MS}}$ renormalization scale
    """
    super().__init__(wcdict=wc_dict, scale=scale, eft=eft, basis=basis)

def set_initial_wcxf(

self, wc)

Set initial values of Wilson coefficients from a WCxf WC instance.

If the instance is given in a basis other than the flavio basis, the translation is performed automatically, if implemented in the wcxf package.

def set_initial_wcxf(self, wc):
    """Set initial values of Wilson coefficients from a WCxf WC instance.
    If the instance is given in a basis other than the flavio basis,
    the translation is performed automatically, if implemented in the
    `wcxf` package."""
    super().__init__(wcdict=wc.dict, scale=wc.scale, eft=wc.eft, basis=wc.basis)

def set_option(

self, key, value)

Set the option key (string) to value.

Instance method, affects only current instance. This will clear the cache.

def set_option(self, key, value):
    """Set the option `key` (string) to `value`.
    Instance method, affects only current instance.
    This will clear the cache."""
    ####################################################################
    ### temporary fix to keep backwards compatibility after renaming ###
    ### of 'delta' to 'gamma' in the parameters dictionary           ###
    ####################################################################
    if key == 'parameters' and 'delta' in value:
        warnings.warn("Using the parameter 'delta' is deprecated. "
                      "Please use 'gamma' instead. Support for using "
                      "'delta' will be removed in the future.",
                      FutureWarning)
        value['gamma'] = value['delta']
        del value['delta']
    ####################################################################
    self._options.update(self._option_schema({key: value}))
    self.clear_cache()

Instance variables

var get_initial_wcxf

Return a wcxf.WC instance in the flavio basis containing the initial values of the Wilson coefficients.

var matching_parameters

Parameters to be used for the SMEFT->WET matching.

var parameters

Parameters to be used for running and translation.

var wc

Methods

def from_wc(

cls, wc)

Return a Wilson instance initialized by a wcxf.WC instance

@classmethod
def from_wc(cls, wc):
    """Return a `Wilson` instance initialized by a `wcxf.WC` instance"""
    return cls(wcdict=wc.dict, scale=wc.scale, eft=wc.eft, basis=wc.basis)

def from_wilson(

cls, w, par_dict)

@classmethod
def from_wilson(cls, w, par_dict):
    if w is None:
        return None
    if isinstance(w, cls):
        return w
    fwc = cls()
    fwc.set_initial_wcxf(w.wc)
    fwc._cache = w._cache
    fwc._options = w._options
    _ckm_options = {k: par_dict[k] for k in ['Vus', 'Vcb', 'Vub', 'gamma']}
    if fwc.get_option('parameters') != _ckm_options:
        fwc.set_option('parameters', _ckm_options)
    return fwc

def load_wc(

cls, stream)

Return a Wilson instance initialized by a WCxf file-like object

@classmethod
def load_wc(cls, stream):
    """Return a `Wilson` instance initialized by a WCxf file-like object"""
    wc = wcxf.WC.load(stream)
    return cls.from_wc(wc)

def set_default_option(

cls, key, value)

Class method. Set the default value of the option key (string) to value for all future instances of the class.

Note that this does not affect existing instances or the instance called from.

@classmethod
def set_default_option(cls, key, value):
    """Class method. Set the default value of the option `key` (string)
    to `value` for all future instances of the class.
    Note that this does not affect existing instances or the instance
    called from."""
    ####################################################################
    ### temporary fix to keep backwards compatibility after renaming ###
    ### of 'delta' to 'gamma' in the parameters dictionary           ###
    ####################################################################
    if key == 'parameters' and 'delta' in value:
        warnings.warn("Using the parameter 'delta' is deprecated. "
                      "Please use 'gamma' instead. Support for using "
                      "'delta' will be removed in the future.",
                      FutureWarning)
        value['gamma'] = value['delta']
        del value['delta']
    ####################################################################
    cls._default_options.update(cls._option_schema({key: value}))