Skip to content
This repository was archived by the owner on Apr 12, 2018. It is now read-only.

Commit b935527

Browse files
committed
Add DeltaS=1 running
1 parent 5009380 commit b935527

5 files changed

Lines changed: 21 additions & 5 deletions

File tree

wetrunner/classes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ def run(self, scale_out, sectors='all'):
9292
Etas, p_i['alpha_s'], p_i['alpha_e'],
9393
p_i['m_b'], p_i['m_c'], p_i['m_tau'],
9494
betas))
95-
C_out = {k: v for k, v in C_out.items() if v != 0}
95+
C_out = {k: v for k, v in C_out.items()
96+
if v != 0 and k in wcxf.Basis[self.eft, 'Bern'].all_wcs}
9697
return wcxf.WC(eft=self.eft, basis='Bern',
9798
scale=scale_out,
9899
values=wcxf.WC.dict2values(C_out))

wetrunner/definitions.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ def listdict():
4747
for i in range(1, 11, 2)])
4848

4949
# class 5
50-
for qq in ['sb', 'db']:
50+
for qq in ['sb', 'db', 'ds']:
51+
if qq == 'ds':
52+
sname = 'sd'
53+
else:
54+
sname = qq
5155
for p in ['', 'p']:
5256
_C = []
5357
for pp in ['uu', 'dd', 'cc', 'ss', 'bb']:
@@ -63,7 +67,7 @@ def listdict():
6367
# e.g. 1sbee
6468
_C += ['{}{}{}{}'.format(i, p, qq, 2 * l)
6569
for i in range(1, 11, 2)] # 1, 3, 5, 7, 9
66-
sectors[qq]['V'].append(_C)
70+
sectors[sname]['V'].append(_C)
6771

6872
# class 5b
6973
for qq in ['sb', 'db']:

wetrunner/evmat.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import numpy as np
44
from math import sqrt, pi, log
5-
from wetrunner.UsV import get_UsV
5+
from wetrunner.UsV import get_UsV, get_UsVdeltaS
66
from wetrunner.UeV import get_UeV
77
from functools import lru_cache
88

@@ -91,6 +91,10 @@ def UeIV(Etas, Alphas, Alphaem, mb, mc, mtau, Betas):
9191
def UsV(Etas, Alphas, Alphaem, mb, mc, mtau, Betas):
9292
return get_UsV(Etas, mb, mc, mtau)
9393

94+
@lru_cache(maxsize=32)
95+
def UsVdeltaS(Etas, Alphas, Alphaem, mb, mc, mtau, Betas):
96+
return get_UsVdeltaS(Etas)
97+
9498
@lru_cache(maxsize=32)
9599
def UeV(Etas, Alphas, Alphaem, mb, mc, mtau, Betas):
96100
return get_UeV(Etas, Alphaem, Alphas, mb, mc, mtau)

wetrunner/rge.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ def run_sector(sector, C_in, Etas, Alphas, Alphaem, mb, mc, mtau, betas):
1818
# nothing to do for SM-like WCs or qqnunu operators
1919
C_result = C_input
2020
else:
21-
Us = getattr(evmat, 'Us' + classname)(*args)
21+
if sector == 'sd':
22+
Us = evmat.UsVdeltaS(*args)
23+
else:
24+
Us = getattr(evmat, 'Us' + classname)(*args)
2225
Ue = getattr(evmat, 'Ue' + classname)(*args)
2326
C_result = (Us + Ue) @ C_input
2427
for j in range(len(C_result)):

wetrunner/test_wetrunner.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ def test_inverse_s(self):
8181
np.linalg.inv(evmat.UsIV(1/0.123, *args)))
8282
npt.assert_array_almost_equal(evmat.UsV(0.123, *args),
8383
np.linalg.inv(evmat.UsV(1/0.123, *args)))
84+
npt.assert_array_almost_equal(evmat.UsVdeltaS(0.123, *args)
85+
@ evmat.UsVdeltaS(1/0.123, *args),
86+
np.eye(57),
87+
decimal=2) # FIXME not precise enough!
8488
npt.assert_array_almost_equal(evmat.UsVb(0.123, *args),
8589
np.linalg.inv(evmat.UsVb(1/0.123, *args)))
8690

0 commit comments

Comments
 (0)