Module flavio.physics.eft

Classes for effective field theory (EFT) Wilson coefficients

Classes

class WilsonCoefficients
Expand source code
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'):
        r"""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):
        r"""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):
        r"""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

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

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

Ancestors

  • wilson.classes.Wilson
  • wilson.classes.ConfigurableClass

Subclasses

Static methods

def from_wilson(w, par_dict)

Instance variables

prop get_initial_wcxf
Expand source code
@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

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

Methods

def get_wc(self, sector, scale, par, eft='WET', basis='flavio', nf_out=None)
Expand source code
def get_wc(self, sector, scale, par, eft='WET', basis='flavio', nf_out=None):
    r"""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

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
def get_wcxf(self, sector, scale, par, eft='WET', basis='flavio', nf_out=None)
Expand source code
def get_wcxf(self, sector, scale, par, eft='WET', basis='flavio', nf_out=None):
    r"""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)

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
def run_wcxf(*args, **kwargs)
Expand source code
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')
Expand source code
def set_initial(self, wc_dict, scale, eft='WET', basis='flavio'):
    r"""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)

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
def set_initial_wcxf(self, wc)
Expand source code
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)

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.