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

Real Wilson coefficients become complex after running #40

Open peterstangl opened 4 years ago

peterstangl commented 4 years ago

Wilson coefficients of hermitian operators that should be real still become complex numbers after running. As far as I see, this is only a numerical issue and the imaginary parts are extremely small and basically zero.

However, the fact that the type of these coefficients becomes complex has the effect that some observables in flavio become complex numbers, too. In particular, the observables defined in https://github.com/flav-io/flavio/blob/master/flavio/physics/scattering/ee_ww.py in terms of linear combinations of Wilson coefficients become complex numbers. Since the ee->WW scattering observables are used in smelli, finally also the global likelihood in smelli becomes a complex number.

Possible solutions:

The first solution is in some sense a bit cleaner, the second one is probably much easier to implement (and maybe faster since there is no need to check which Wilson coefficients should be real). @DavidMStraub what do you think?

DavidMStraub commented 4 years ago

I agree 100%. It's indeed the concern about speed why we didn't implement chopping unphysical imaginary parts, but one should consider it. (BTW this is currently not even checked on validation, see https://github.com/wcxf/wcxf-python/issues/10 which should probably be moved here.)

But indeed independently of a solution in wilson, this should be handled in flavio by discarding the imaginary part. This is done e.g. for Higgs, see e.g. https://github.com/flav-io/flavio/blob/master/flavio/physics/higgs/production.py#L19 etc. That .real is missing in ee_ww is a mistake. (Naming a variable np as well :wink:)