Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding nuSMEFT and its RG Running. #114

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion .github/workflows/check+deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
python3 -m pip install dist/wilson-*.whl

- name: Upload build as artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: wilson-dist-${{ github.sha }}
path: dist
Expand Down
53 changes: 44 additions & 9 deletions wilson/classes.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
"""Main classes used at the top level of the wilson package:

`Wilson`: main interface to the wilson package, providing automatic running
and matching in SMEFT and WET
and matching in SMEFT, nuSMEFT and WET

`RGsolution`: Class representing a continuous solution to the
SMEFT and WET RGEs to be used for plotting.
"""


from wilson.run.smeft import SMEFT
from wilson.run.wet import WETrunner
from wilson import parameters
import numpy as np
from math import log, e
from wilson import wcxf
import voluptuous as vol
import warnings

from wilson.run.smeft import EFTevolve
from wilson.run.smeft import beta
from wilson.run.smeft import beta_nusmeft

class ConfigurableClass:
"""Class that provides the functionality to set and get configuration
Expand Down Expand Up @@ -47,6 +49,7 @@ def set_default_option(cls, key, value):

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 ###
Expand All @@ -59,13 +62,15 @@ def set_default_option(cls, key, value):
value['gamma'] = value['delta']
del value['delta']
####################################################################

cls._default_options.update(cls._option_schema({key: value}))

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 ###
Expand All @@ -78,6 +83,7 @@ def set_option(self, key, value):
value['gamma'] = value['delta']
del value['delta']
####################################################################

self._options.update(self._option_schema({key: value}))
self.clear_cache()

Expand Down Expand Up @@ -115,6 +121,8 @@ class Wilson(ConfigurableClass):
'mb_matchingscale': 4.2,
'mc_matchingscale': 1.3,
'parameters': {},
'yukawa_scale_in': {},
'gauge_higgs_scale_in': {}
}

# option schema:
Expand All @@ -128,7 +136,8 @@ class Wilson(ConfigurableClass):
'mb_matchingscale': vol.Coerce(float),
'mc_matchingscale': vol.Coerce(float),
'parameters': vol.Schema({vol.Extra: vol.Coerce(float)}),
})
'yukawa_scale_in' : vol.Schema( { vol.In(['Gu', 'Gd', 'Ge', 'Gn']): vol.All(vol.All(vol.Length (min=3, max=3)), vol.Length(min=3, max=3)) } ),
'gauge_higgs_scale_in': vol.Schema({vol.In(['g', 'gp', 'gs', 'Lambda', 'm2']): vol.Coerce(float)}) })

def __init__(self, wcdict, scale, eft, basis):
"""Initialize the `Wilson` class.
Expand All @@ -149,6 +158,12 @@ def __init__(self, wcdict, scale, eft, basis):
self.wc.validate()
self._cache = {}

def update_dim4_running(self):
par = {}
par.update(self.get_option('yukawa_scale_in'))
par.update(self.get_option('gauge_higgs_scale_in'))
return par

def __hash__(self):
"""Return a hash of the `Wilson` instance.
The hash changes when Wilson coefficient values or options are modified.
Expand Down Expand Up @@ -234,22 +249,42 @@ def match_run(self, scale, eft, basis, sectors='all'):
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.
# smeft = SMEFT(self.wc.translate('Warsaw', sectors=translate_sectors, parameters=self.parameters))
smeft = EFTevolve(self.wc.translate('Warsaw', sectors=translate_sectors, parameters=self.parameters),beta.beta)
smeft.ext_par_scale_in(self.update_dim4_running())
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:
elif eft in ['WET', 'WET-4', 'WET-3']:
# 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))
# smeft = SMEFT(self.wc.translate('Warsaw', parameters=self.parameters))
smeft = EFTevolve(self.wc.translate('Warsaw', parameters=self.parameters),beta.beta)
smeft.ext_par_scale_in(self.update_dim4_running())
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())

else:
raise ValueError(f"Output EFT {eft} unknown or not supported")

elif self.wc.eft == 'nuSMEFT':
smeft_accuracy = self.get_option('smeft_accuracy')
if eft == 'nuSMEFT':
# if input and output EFT just nuSMEFT, just run.
nusmeft = EFTevolve(self.wc.translate('Warsaw', sectors=translate_sectors, parameters=self.parameters),beta_nusmeft.nubeta)
nusmeft.ext_par_scale_in(self.update_dim4_running())
wc_out = nusmeft.run(scale, accuracy=smeft_accuracy).translate(basis)
self._set_cache('all', scale, 'nuSMEFT', wc_out.basis, wc_out)
return wc_out
else:
raise ValueError(f"Output EFT {eft} unknown or not supported")

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:
Expand All @@ -268,8 +303,8 @@ def match_run(self, scale, eft, basis, sectors='all'):
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)
self._set_cache(sectors, scale, 'WET-3', basis, wc_out)
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())
Expand All @@ -279,7 +314,7 @@ def match_run(self, scale, eft, basis, sectors='all'):
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")
raise ValueError(f"Output EFT {eft} unknown or not supported")

def clear_cache(self):
self._cache = {}
Expand Down
4 changes: 3 additions & 1 deletion wilson/match/test_symmetryfactors.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import wilson.match.smeft_loop
import wilson.match.smeft_tree

from wilson.run.smeft import beta

np.random.seed(39)

Expand Down Expand Up @@ -89,7 +90,8 @@ class TestRun(unittest.TestCase):
def test_run_lq3_3333(self):
w = wilson.Wilson({'lq3_2333': 1e-6}, 1000, 'SMEFT', 'Warsaw')
# determine g at input scale
g = wilson.run.smeft.SMEFT(w.wc).C_in['g']
# g = wilson.run.smeft.SMEFT(w.wc).C_in['g']
g = wilson.run.smeft.EFTevolve(w.wc, beta.beta).C_in['g']
# run down
wc = w.match_run(100, 'SMEFT', 'Warsaw')
# compare LL to expected value
Expand Down
13 changes: 7 additions & 6 deletions wilson/run/smeft/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
"""SMEFT renormalization group evolution.
"""SMEFT and nuSMEFT renormalization group evolution.

Based on arXiv:1308.2627, arXiv:1310.4838, and arXiv:1312.2014.
Based on SMEFT: arXiv:1308.2627, arXiv:1310.4838, and arXiv:1312.2014.
nuSMEFT: arxiv:2103.04441, arxiv:2010.12109

Ported from the [DsixTools](https://dsixtools.github.io) Mathematica package.
SMEFT part Ported from the [DsixTools](https://dsixtools.github.io) Mathematica package.
"""

from . import beta
from . import beta_nusmeft
from . import classes
from . import rge
from .classes import SMEFT
from . import definitions
from .classes import EFTevolve
24 changes: 21 additions & 3 deletions wilson/run/smeft/beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,30 @@ def _cached_einsum(indices, *args):

def beta(C, HIGHSCALE=1, newphys=True):
"""Return the beta functions of all SM parameters and SMEFT Wilson
coefficients."""
coefficients as a dictionary."""

HIGHSCALE=1
g = C["g"]
gp = C["gp"]
gs = C["gs"]
m2 = C["m2"]
Lambda = C["Lambda"]

Gu = C["Gu"]
Gd = C["Gd"]
Ge = C["Ge"]

#we are adding manually the SM parameters to C_in while using the EFTevolve class, so we can comment the lines below and can use the lines above.

#g = 0#C["g"]
#gp = 0#C["gp"]
#gs = 0#C["gs"]
#m2 = 0#C["m2"]
#Lambda = 0#C["Lambda"]

#Gu = np.zeros((3,3))*1j#C["Gu"]
#Gd = np.zeros((3,3))*1j#C["Gu"]
#Ge = np.zeros((3,3))*1j#C["Gu"]

Eta1 = (3*np.trace(C["uphi"] @ Gu.conj().T) \
+ 3*np.trace(C["dphi"] @ Gd.conj().T) \
Expand Down Expand Up @@ -92,7 +105,8 @@ def beta(C, HIGHSCALE=1, newphys=True):
Gammal = 1/2*Ge @ Ge.conj().T
Gammae = Ge.conj().T @ Ge

Beta = OrderedDict()
#order is taken care of later in EFTevolve class
Beta = {} #OrderedDict()

Beta["g"] = -19/6*g**3 - 8*g*m2/HIGHSCALE**2*C["phiW"]

Expand All @@ -118,7 +132,7 @@ def beta(C, HIGHSCALE=1, newphys=True):

Beta["m2"] = m2*(6*Lambda - 9/2*g**2 - 3/2*gp**2 \
+ 2*GammaH + 4*m2/HIGHSCALE**2*(C["phiD"] \
- 2*C["phiBox"]))
- 2*C["phiBox"]))

Beta["Gu"] = 3/2*(Gu @ Gu.conj().T @ Gu - Gd @ Gd.conj().T @ Gu) \
+ (GammaH - 9/4*g**2 - 17/12*gp**2 - 8*gs**2)*Gu \
Expand All @@ -134,6 +148,7 @@ def beta(C, HIGHSCALE=1, newphys=True):
+ 3*my_einsum("rspt,pt", C["quqd1"], np.conj(Gd)) \
+ 1/2*(my_einsum("psrt,pt", C["quqd1"], np.conj(Gd)) \
+ 4/3*my_einsum("psrt,pt", C["quqd8"], np.conj(Gd))))


Beta["Gd"] = 3/2*(Gd @ Gd.conj().T @ Gd - Gu @ Gu.conj().T @ Gd) \
+ (GammaH - 9/4*g**2 - 5/12*gp**2 - 8*gs**2)*Gd \
Expand Down Expand Up @@ -1815,8 +1830,11 @@ def beta(C, HIGHSCALE=1, newphys=True):

return Beta

#Commenting this function here, as we are puting it in EFTevolve class
'''
def beta_array(C, HIGHSCALE=1, *args, **kwargs):
"""Return the beta functions of all SM parameters and SMEFT Wilson
coefficients as a 1D numpy array."""
beta_odict = beta(C, HIGHSCALE, *args, **kwargs)
return np.hstack([np.asarray(b).ravel() for b in beta_odict.values()])
'''
Loading
Loading