wilson-eft / wilson

A Python package for the running and matching of Wilson coefficients above and below the electroweak scale
https://wilson-eft.github.io
MIT License
26 stars 19 forks source link

Setting input parameters not working #113

Open LucaMantani opened 4 weeks ago

LucaMantani commented 4 weeks ago

I might not be doing things correctly, but it seems to me that setting the input parameters is not having any effect. In particular, if I do:

import wilson

wc = {"uG_33": 1e-6}

myW = wilson.Wilson(wc, scale=1e3, eft="SMEFT", basis="Warsaw")
myW2 = wilson.Wilson(wc, scale=1e3, eft="SMEFT", basis="Warsaw")

my_params = {
 'Vus': 0.0,
 'Vub': 0.0,
 'Vcb': 0.0,
 'gamma': 0.0,
 'm_b': 0.0,
 'm_s': 0.0,
 'm_c': 0.0,
 'm_u': 0.0,
 'm_d': 0.0,
 'm_e': 0.0,
 'm_mu': 0.0,
 'm_tau': 0.0
}

# set different input parameters for the first instance
myW.set_option("parameters", my_params)
print(myW.parameters)

res1 = myW.match_run(scale=100, eft="SMEFT", basis="Warsaw")
res2 = myW2.match_run(scale=100, eft="SMEFT", basis="Warsaw")

print(res1.values == res2.values)

I find that the 2 results are identical. Should I do things differently?

Inspecting the code I don't see where the parameters are passed to the functions calculating the sm parameters, in particular when smpar.smeftpar is called, it seems to always use the default values defined at the beginning of the file from the dictionary called p.

Further, if I modify those default parameters in the code, I indeed see an effect but it seems that switching off the off-diagonal CKM matrix elements and the gamma parameter results in some numerical problem, probably some division by zero. Instead, setting the masses to zero seems to be fine.

I have an interested in switching off those parameters as I want to use wilson in a flavour symmetric scenario, potentially studying the effects of the CKM matrix and the non-zero masses only at a later stage.

peterstangl commented 2 weeks ago

wilson has not really been designed to do what you try to do, but with a little bit of monkey patching it's relatively easy to do that (no need to modify the code).

First of all, you are right that your parameters will not be used for the running since a separate set of parameters is defined for that purpose (there is probably a historical reason for this since wilson started as separate projects for SMEFT running, WET running, and SMEFT-to-WET matching, and these three projects have been combined in a sometimes not fully coherent way. But there is also a practical reason for the two sets of parameters since those used in the SMEFT RG running are all MSbar parameters at $M_Z$ while the other input parameters are not necessarily MSbar @ $M_Z$). The easiest way to modify the parameters used for the SMEFT RG running is to monkey patch wilson.run.smeft.smpar.p:

import wilson
smeft_par = wilson.run.smeft.smpar.p.copy() # copying so we could use the default parameters later
my_params = {
 'Vus': 0.0,
 'Vub': 0.0,
 'Vcb': 0.0,
 'gamma': 0.0,
 'm_b': 0.0,
 'm_s': 0.0,
 'm_c': 0.0,
 'm_u': 0.0,
 'm_d': 0.0,
 'm_e': 0.0,
 'm_mu': 0.0,
 'm_tau': 0.0
}
wilson.run.smeft.smpar.p.update(**my_params)

Now as you write, the above change leads to a problem in the determination of the CKM matrix. This problem indeed arises from a division by zero as it is assumed that the Cabbibo angle $\theta_{12}$ and the CKM triangle angle $\gamma$ are non-zero. However, you can also monkey patch the ckmutil package that is responsible for computing the CKM elements in terms of the input parameters. To do this, just make sure to monkey patch it before you import wilson, otherwise this might not work:

import ckmutil.ckm
from copy import deepcopy
from functools import partial
ckm_tree = deepcopy(ckmutil.ckm.ckm_tree) # copying so we keep the original function
ckmutil.ckm.ckm_tree = partial(ckm_tree, delta_expansion_order=0)

What this does is to fix the optional argument delta_expansion_order of ckmutil.ckm.ckm_tree to 0 (the default value is None). If this argument is 0, the CKM CP violating phase $\delta$ is simply set to $\gamma$ instead of being computed exactly (the exact computation involves divisions by $\sin(\theta_{12})$ and $\sin(\gamma)$ which produce the problem you encountered).

LucaMantani commented 2 weeks ago

This is very helpful thanks! I will try it out.