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

Commit f752823

Browse files
author
Jason Aebischer
committed
general s->d UsV
2 parents 2c19c11 + ce12b2b commit f752823

6 files changed

Lines changed: 5613 additions & 6 deletions

File tree

wetrunner/UsV.py

Lines changed: 5585 additions & 0 deletions
Large diffs are not rendered by default.

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: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,21 @@ def listdict():
4646
sectors[qq]['IV'].append(['{}{}{}'.format(i, p, qq)
4747
for i in range(1, 11, 2)])
4848

49+
50+
qqdict = {
51+
'sb': ['uu', 'dd', 'cc', 'ss', 'bb'],
52+
'db': ['uu', 'ss', 'cc', 'dd', 'bb'],
53+
'ds': ['uu', 'bb', 'cc', 'dd', 'ss'],
54+
}
4955
# class 5
50-
for qq in ['sb', 'db']:
56+
for qq in ['sb', 'db', 'ds']:
57+
if qq == 'ds':
58+
sname = 'sd'
59+
else:
60+
sname = qq
5161
for p in ['', 'p']:
5262
_C = []
53-
for pp in ['uu', 'dd', 'cc', 'ss', 'bb']:
63+
for pp in qqdict[qq]:
5464
if pp[0] in qq:
5565
_C += ['{}{}{}{}'.format(i, p, qq, pp)
5666
for i in range(1, 11, 2)] # 1, 3, 5, 7, 9
@@ -63,7 +73,7 @@ def listdict():
6373
# e.g. 1sbee
6474
_C += ['{}{}{}{}'.format(i, p, qq, 2 * l)
6575
for i in range(1, 11, 2)] # 1, 3, 5, 7, 9
66-
sectors[qq]['V'].append(_C)
76+
sectors[sname]['V'].append(_C)
6777

6878
# class 5b
6979
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)