A Global Likelihood for Precision Constraints and Flavour Anomalies

We present a global likelihood function in the space of dimension-six Wilson coefficients in the Standard Model Effective Field Theory (SMEFT). The likelihood includes contributions from flavour-changing neutral current B decays, lepton flavour universality tests in charged- and neutral-current B and K decays, meson-antimeson mixing observables in the K, B, and D systems, direct CP violation in K ->{\pi}{\pi}, charged lepton flavour violating B, tau, and muon decays, electroweak precision tests on the Z and W poles, the anomalous magnetic moments of the electron, muon, and tau, and several other precision observables, 265 in total. The Wilson coefficients can be specified at any scale, with the one-loop running above and below the electroweak scale automatically taken care of. The implementation of the likelihood function is based on the open source tools flavio and wilson as well as the open Wilson coefficient exchange format (WCxf) and can be installed as a Python package. It can serve as a basis either for model-independent fits or for testing dynamical models, in particular models built to address the anomalies in B physics. We discuss a number of example applications, reproducing results from the EFT and model building literature.


Introduction
Precision tests at low energies, such as flavour physics in the quark and lepton sectors, as well as precision tests at the electroweak (EW) scale, such as Z pole observables, are important probes of physics beyond the Standard Model (SM). The absence of a direct discovery of any particle beyond the SM spectrum at the LHC makes these indirect tests all the more important. Effective field theories (EFTs) are a standard tool to describe new physics (NP) effects in these precision observables. For low-energy quark flavour physics, their use is mandatory to separate the long-distance QCD dynamics from the short-distance NP of interest. But also for precision tests at electroweak-scale energies, EFTs have become increasingly popular, given the apparent scale separation between the EW scale and the scale of the NP. With mild assumptions, namely the absence of non-SM states below or around the EW scale as well as a linear realization of EW symmetry breaking, NP effects in precision observables can be described in the context of the Standard Model effective field theory (SMEFT), that extends the SM by the full set of dimension-6 operators allowed by the SM gauge symmetry [1,2] (see [3][4][5] for reviews). While this description facilitates model-independent investigations of NP effects in precision observables, a perhaps even more important virtue is that SMEFT can serve as an intermediate step between dynamical models in the UV and the low-energy precision phenomenology. Computing all the relevant precision observables in a given UV model and comparing the predictions to experiment is a formidable task. Employing SMEFT, this task can be separated in two: computing the SMEFT Wilson coefficients at the UV scale is model-dependent but straightforward, while computing all the precision observables in terms of these Wilson coefficients and comparing them to experiment is challenging but, importantly, model-independent.
Eventually, to test a UV model given the plethora of existing precision measurements, we require a likelihood function that quantifies the agreement of all existing precision observable measurements to the model's predictions. This likelihood function L is a function of the model's Lagrangian parameters λ and certain model-independent phenomenological parameters θ (form factors, decay constants, etc.), L = L( λ, θ). Using SMEFT to describe NP effects in precision observables model-independently in terms of the Wilson coefficients C, the likelihood can be reexpressed as L( λ, θ) = L SMEFT ( C( λ), θ) , where L SMEFT ( C, θ) is the global SMEFT likelihood in the space of Wilson coefficients and phenomenological parameters. Having this function at hand, the problem of testing any UV model is reduced to computing the SMEFT Wilson coefficients C( λ) (and suitably accounting for the uncertainties in the parameters θ). A major challenge in obtaining this global likelihood function is that the SMEFT renormalization group evolution from the NP scale down to the EW scale does not preserve flavour, such that the likelihood in the space of SMEFT Wilson coefficients does not factorize into sectors with definite flavour quantum numbers. This is in contrast to the weak effective theory (WET) below the EW scale, that is frequently employed in low-energy flavour physics, where QCD and QED renormalization is flavour-blind. Thanks to the calculation of the complete one-loop SMEFT RGEs [6][7][8][9], the complete matching from SMEFT onto WET [10,11] and the complete one-loop QCD and QED RGEs within WET [12,13] that have been incorporated in the public code wilson [14] leveraging the open Wilson coefficient exchange format (WCxf) [15], the relation between high-scale SMEFT Wilson coefficients and the coefficients in the appropriate low-energy EFT can now be automatized.
Having obtained the Wilson coefficients at the appropriate scales, the precision observables must be calculated and compared to the experimental measurements to obtain the likelihood function. This programme has been carried out in the literature for various subsets of observables or Wilson coefficients, e.g.
So far, no global likelihood has been constructed however that contains the observables relevant for the anomalies in B physics or the numerous measurements of flavour-changing neutral current (FCNC) processes that are in principle sensitive to very high scales. The main aim of the present work is thus to provide a likelihood function that also takes into account a large number of observables in flavour physics, with a focus on the ones that are relevant in models motivated by the anomalies recently observed in B decays based on the b → cτ ν and b → sµµ transition. Our results build on the open source code flavio [23], that computes a large number of observables in flavour physics as a function of dimension-6 Wilson coefficients beyond the SM and contains a database of relevant experimental measurements. To incorporate constraints beyond quark flavour physics, we have also implemented EW precision tests, lepton flavour violation, and various other precision observables in flavio. By using open source software throughout, we hope our results can serve as the basis for a more and more global SMEFT likelihood emerging as a community effort.
The rest of this paper is organized as follows. In section 2, we describe the statistical formalism, in section 3, we list the observables included in our likelihood function, in section 4, we discuss several example applications relevant for the B physics anomalies, in section 5, we describe the usage of the Python package provided by us, and finally we summarize in section 6.

Formalism
Given a set of independent precision measurements O exp and the corresponding theory predictions O th in the presence of NP described model-independently by dimension-6 SMEFT Wilson coefficients, the general form of the SMEFT likelihood reads where L i exp are the distribution functions of the experimental measurements and L θ ( θ) are experimental or theoretical constraints on the theory parameters θ. Since we are interested in the likelihood as a function of the Wilson coefficients, all parameters θ are nuisance parameters that have to be removed by an appropriate procedure.
In a Bayesian approach, L θ ( θ) would be a prior probability distribution for the theory parameters and the appropriate procedure would be to obtain the posterior probability by means of Bayes' theorem, integrating over the θ directions. In a frequentist approach 1 , one would instead determine the profile likelihood, i.e. for a given Wilson coefficient point C maximize the likelihood with respect to all the θ.
While both the Bayesian and the frequentist treatment are valid approaches, they both have the drawback that they are computationally very expensive for a large number of parameters. Even if one were to succeed in deriving the Bayesian posterior distribution or the profile likelihood in the entire space of interest, the procedure would have to be repeated anytime the experimental data changes, which in practice happens frequently given the large number of relevant constraints.
Due to these challenges, here we opt for a more approximate, but much faster approach. We split all the observables of interest into two categories, 1. Observables where the theoretical uncertainty can be neglected at present compared to the experimental uncertainty.
2. Observables where both the theoretical and experimental uncertainty can be approximated as (possibly multivariate) Gaussian and where the theoretical uncertainty is expected to be weakly dependent on C and θ.
We then write the nuisance-free likelihood The first product contains the full experimental likelihood for a fixed value of the theory parameters θ 0 , effectively ignoring theoretical uncertainties. The second product contains a modified experimental likelihood. Assuming the measurements of O exp i to be normally distributed with the covariance matrix C exp and the theory predictions to be normally distributed as well with covariance C th , L exp has the form Effectively, the theoretical uncertainties stemming from the uncertainties in the theory parameters θ are "integrated out" and treated as additional experimental uncertainties. These two different approaches of getting rid of nuisance parameters are frequently used in phenomenological analyses. Neglecting theory uncertainties is well-known to be a good approximation in EFT fits to electroweak precision tests (see e.g. [16,17]). The procedure of "integrating out" nuisance parameters has been applied to EFT fits of rare B decays first in [25] and subsequently also applied elsewhere (see e.g. [26]).
While the nuisance-free likelihood is a powerful tool for fast exploration of the parameter space of SMEFT or any UV theory matched to it, we stress that there are observables where none of the two above assumptions are satisfied and which thus cannot be taken into account in our approach, for instance: • We treat the four parameters of the CKM matrix as nuisance parameters, but these parameters are determined from tree-level processes that can be affected by dimension-6 SMEFT contributions themselves, e.g. B decays based on the b → c ν [27] or b → u ν transition, charged-current kaon decays [28], or the CKM angle γ [29]. Thus to take these processes into account, one would have to treat the CKM parameters as floating nuisance parameters. We do however take into account tests of lepton flavour universality (LFU) in these processes where the CKM elements drop out.
• The electric dipole moments (EDMs) of the neutron or of diamagnetic atoms 2 are afflicted by sizable hadronic uncertainties, but are negligibly small in the SM. Thus the uncertainty can neither be neglected nor assumed to be SM-like and the poorly known matrix elements would have to be treated as proper nuisance parameters.
We will comment on partial remedies for these limitations in section 6.

Observables
Having defined the general form of the global, nuisance-free SMEFT likelihood (3) and the two different options for treating theory uncertainties, we now discuss the precision observables that are currently included in our likelihood. Generally, the observables we consider can be separated into two classes: • Electroweak precision observables (EWPOs) on the Z or W pole. In this case we evolve the SMEFT Wilson coefficients from the input scale to the Z mass and then compute the NP contributions directly in terms of them.
• Low-energy precision observables. In this case we match the SMEFT Wilson coefficients onto the weak effective theory (WET) where the electroweak gauge bosons, the Higgs boson and the top quark have been integrated out. We then run the WET Wilson coefficients down to the scale appropriate for the process. For decays of particles without b flavour, we match to the appropriate 4-or 3-flavour effective theories.
The Python package to be described in section 5 also allows to access a pure WET likelihood. In this case the constraints in the first category are ignored. The complete tree-level matching from SMEFT onto WET [10,11] as well as the one-loop running in SMEFT [6][7][8] and WET [12,13] is done with the wilson package [14].
In appendix D, we list all the observables along with their experimental measurements and SM predictions.

Electroweak precision observables
To consistently include EWPOs, we follow [5] by parameterizing the shifts in SM parameters and couplings as linear functions of SMEFT Wilson coefficients. Terms quadratic in the dimension-6 Wilson coefficients are of the same order in the EFT power counting as the interference of the SM amplitude with dimension-8 operators and thus should be dropped. We use the {α e ,Ĝ F ,m Z } input parameter scheme. We include the full set of Z pole pseudo-observables measured at LEP-I without assuming lepton flavour universality. Following [16] we also include W branching ratios, the W mass (cf. [31]), and the W width. As a non-trivial cross-check, we have confirmed that the electroweak part of our likelihood exhibits the reparametrization invariance pointed out in [32]. Finally, we include LEP and LHC constraints on LFV Z decays. The total number of observables in this sector is 25. For all these observables, we neglected the theoretical uncertainties, which are in all cases much smaller than the experimental uncertainties.

Rare B decays
Measurements of rare B decays based on the b → s transition are of particular interest as several deviations from SM expectations have been observed there, most notably the anomalies in µ/e universality tests in B → K ( * ) + − [33,34] and the anomalies in angular observables in B → K * µ + µ − [35]. We include the following observables.
• All relevant CP-averaged observables in inclusive and exclusive semi-leptonic b → sµµ decays that have also been included in the global fit [36]. In this case the theoretical uncertainties are sizable and strongly correlated and we use the second approach described in section 2.
• T-odd angular CP asymmetries in B → K * µ + µ − . These are tiny in the SM and we neglect the theory uncertainty.
• The µ/e universality tests R K and R K * following [41]. Here we neglect the tiny theory uncertainties [42].
• The branching ratio of the inclusive decay B → X s e + e − [43].
• All observables in inclusive and exclusive radiative b → sγ decays [44] (including B → K * e + e − at very low q 2 ) that have also been included in the global fit in [45].
• Bounds on the exclusive decays B → K ( * ) νν [46]. Even though these have sizable uncertainties in the SM, they can be neglected compared to the experimental precision (which in turn allows us to take into account the non-Gaussian form of the likelihoods). A sum over the unobserved neutrino flavours is performed, properly accounting for models where wrong-flavour neutrino modes can contribute.
• Bounds on tauonic B decays: We neglect theoretical uncertainties.
In contrast to EWPOs, in flavour physics there is no formal need to drop terms quadratic in the dimension-6 SMEFT Wilson coefficients. For processes that are forbidden in the SM, such as LFV decays, this is obvious since the leading contribution is the squared dimension-6 amplitude and the dimension-8 contribution is relatively suppressed by four powers of the NP scale. But also for processes that are not forbidden but suppressed by a mechanism that does not have to hold beyond the SM, the dimension-8 contributions are subleading. Schematically, the amplitude reads where is a SM suppression factor (e.g. GIM or CKM suppression) and A 6,8 the dimension-6 and 8 contributions without the dimensional suppression factors, respectively. Obviously, in the squared amplitude the A SM A * 8 interference term is suppressed by compared to the |A 6 | 2 term, so it is consistent to only keep the latter.

Semi-leptonic B and K decays
As discussed at the end of section 2, we cannot use the semi-leptonic charged-current B and K decays with light leptons in our approach since we do not allow the CKM parameters to float. Nevertheless, we can include tests of LFU in b → q ν decays where the CKM elements drop out. We include: • The ratio of K + → e + ν and K + → µ + ν, • The branching ratios 3 of B → πτ ν, B + → τ + ν, B + → µ + ν, and B + → e + ν, where the deviations from SM expectations are observed, • The q 2 distributions of B → D ( * ) τ ν from Belle [48] and BaBar [49].
For the latter, we use the results of [50], where these are given for an arbitrary normalization. For our purpose we normalize these values in each bin by the integrated rate, in order to leave R D ( * ) as independent observables. For the form factors of the B → D and B → D * transition, we use the results of [27], combining results from lattice QCD, light-cone sum rules, and heavy quark effective theory but not using any experimental data on b → c ν decays to determine the form factors. This leads to a larger SM uncertainty (and also lower central values) for R D and R D * . Even though we require b → c ν with = e, µ to be mostly SM-like for consistency as discussed in section 2, we prefer to use the form factors from pure theory predictions to facilitate a future treatment of the CKM elements as nuisance parameters (see section 6).

Meson-antimeson mixing
We include the following observables related to meson-antimeson mixing in the K 0 , B 0 , B s , and D 0 systems: • The B 0 and B s mass differences ∆M d and ∆M s , 3 While these observables are strictly speaking not independent of the CKM element V ub , the much larger experimental uncertainty compared to B → π ν means that they are only relevant as constraints on large violations of LFU or large scalar operators, which allows us to take them into account nevertheless. Alternatively, these observables could be normalized explicitly to B → π ν, but we refrain from doing so for simplicity.
• The mixing-induced CP asymmetries S ψK S and S ψφ (neglecting contributions to the penguin amplitude from four-quark operators), • The CP-violating parameter K in the K 0 system, • The CP-violating parameter x Im 12 in the D 0 system defined as in [51].
We include the SM uncertainties as described in section 2.

FCNC K decays
We include the following observables in flavour-changing neutral current kaon decays.
• The bound on the LFV decay K L → e ± µ ∓ .
For ε /ε, using our approach described in section 2 to assume the uncertainties to be SM-like also beyond the SM is borderline since beyond the SM, other matrix elements become relevant, some of them not known from lattice QCD [53]. We stress however that we do not make use of the partial cancellations of matrix element uncertainties between the real and imaginary parts of the SM amplitudes [57], so our SM uncertainty is conservative in this respect. Moreover, visible NP effects in ε /ε typically come from operators contributing to the ∆I = 3/2 amplitude, where the matrix elements are known to much higher precision from lattice QCD [54], such that also in these cases our approach can be considered conservative.

Tau and muon decays
We include the following LFV decays of taus and muons: • µ → 3e [58], τ → 3µ [58,59], τ − → µ − e + e − [58], where = e or µ. Theoretical uncertainties can be neglected. For τ → ρ and τ → φ , we have calculated the full WET expressions of the decay widths including contributions from semi-leptonic vector and tensor operators as well as leptonic dipole operators. In all expressions, we have kept the full dependence on the mass of the light lepton . The results, which to our knowledge have not been presented in this generality in the literature before, are given in appendix B. As expected, considering only the dipole contributions, τ → ρ and τ → φ are not competitive with τ → γ. Interestingly, the semileptonic tensor operators are generated in the tree-level SMEFT matching only for up-type quarks (semi-leptonic down-type tensor operators violate hypercharge). This means that in a SMEFT scenario and neglecting loop effects, tensor operators do contribute to τ → ρ but do not contribute to τ → φ .
In addition we include the charged-current tau decays • τ → νν [60], which represent important tests of lepton flavour universality (LFU). Since these are present in the SM and measured precisely, theory uncertainties cannot be neglected and we include them as described in section 2. A sum over unobserved neutrino flavours is performed, properly accounting for models where wrong-flavour neutrino modes can contribute. Note that the branching ratio of µ → eνν is not a constraint in our likelihood as it is used to define the input parameter G F via the muon lifetime. Potential NP contributions to this decay enter the EWPOs of section 3.1 via effective shifts of the SM input parameters.

Low-energy precision observables
Finally, we include the following flavour-blind low-energy observables: • the anomalous magnetic moments of the electron, muon, and tau, a = (g − 2)/2, • the neutrino trident production cross section [61].

Applications
In this section, we demonstrate the usefulness of the global likelihood with a few example applications motivated in particular by the B anomalies. While we restrict ourselves to simplistic two-parameter scenarios for reasons of presentation, we stress that the power of the global likelihood is that it can be used to test models beyond such simplified scenarios.

Electroweak precision analyses
A non-trivial check of our implementation of EWPOs discussed in sec. 3.1 is to compare the pulls between the SM prediction and measurement for individual observables to sophisticated EW fits as performed e.g. by the Gfitter collaboration [62]. We show theses pulls in fig. 1 left and observe good agreement with the literature. The largest pull is in the forward-backward asymmetry in Z → bb.
Another well-known plot is the EWPO constraint on the oblique parameters S and T , which are proportional to the SMEFT Warsaw basis Wilson coefficients C φW B and C φD , respectively (see e.g. [63]). Their corresponding operators read: In fig. 1 right, we show likelihood contours in the plane of these coefficients at the scale m Z , in good agreement with results in the literature [62,64].

Model-independent analysis of b → s transitions
Model-independent fits of the WET Wilson coefficients C bsµµ 9 and C bsµµ 10 of the operators 4 play an important role in the NP interpretation of the B → K * µ + µ − , R K , and R K * anomalies and have been performed by several groups (for recent examples see [36,41,[65][66][67]). Since all relevant b → s observables are part of our global likelihood, we can plot the well-known likelihood contour plots in the space of two WET Wilson coefficients as a two-dimensional slice of the global likelihood. In fig. 2 left we plot contours in the C bsµµ 9 -C bsµµ 10 plane, assuming them to be real and setting all other Wilson coefficients to zero. The result is equivalent to [36,41] apart from the addition of the Λ b → Λµ + µ − decay. In fig. 2 that match at tree level onto C bsµµ 9 and C bsµµ 10 (cf. [68]). While the plot of the real parts of C bsµµ 9 and C bsµµ 10 is well known, the global likelihood allows to explore arbitrary scenarios with real or complex contributions to several Wilson coefficients. 4 Throughout, we use the WCxf convention [15] of writing the effective Lagrangian as and include normalization factors directly in the definition of the operators.
Within simple two-coefficient scenarios, an interesting case is the one with new physics in the two WET Wilson coefficients C bcτ ντ S L and C bcτ ντ S R . The corresponding operators are defined by The constraint from B c → τ ν [74,75] allows a solution to the R D anomaly only for C bcτ ντ and precludes a solution of the R D * anomaly [76]. Additional disjoint solutions in the 2D Wilson coefficient space are excluded by the B → Dτ ν differential distributions [50]. Both effects are visible in figure 3 left. The preferred region is only improved slightly more than 2σ compared to the SM, signaling that the R D and R D * anomalies, that have a combined significance of around 4σ, cannot be solved simultaneously.
Even this less-than-perfect solution turns out to be very difficult to realize in SMEFT. In fact, the immediate choice for SMEFT Wilson coefficients matching onto C bcτ ντ S L and C bcτ ντ S R would be [C ledq ] 3332 and [C (1) lequ ] 3332 , respectively, defined by the operators However, [C ledq ] 3332 also generates the FCNC decay B s → τ + τ − , and even though this has not been observed yet, the existing bound puts strong constraints. Choosing instead [C ledq ] 3333 , the Wilson coefficient has to be larger by a factor 1/V cb and leads to a sizable NP effect in the decay B + → τ ν τ based on the b → uτ ν transition. These effects are demonstrated in fig. 3 right, where the relation between the left-and right-handed coefficients that evades the has been imposed. Another interesting two-coefficient scenario is the one with new physics in C bcτ ντ S L and the tensor Wilson coefficient C bcτ ντ T , that are generated with the relation C bcτ ντ S L = −4C bcτ ντ T at the matching scale in the scalar singlet leptoquark S 1 scenario 5 [69]. In fig. 4 left, we show the constraints on this scenario. A new finding, that to our knowledge has not been discussed in the literature before, is that a second, disjoint solution with large tensor Wilson coefficient is excluded by the new, preliminary Belle measurement of the longitudinal polarization fraction F L in B → D * τ ν [78], which is included in our likelihood and enters the green contour in the plot.
The analogous scenario in SMEFT with the Wilson coefficients [C (1) lequ ] 3332 and [C lequ ] 3332 does not suffer from the constraints of the scenario with C S R as the operator involves a righthanded up-type quark, so is not related by SU (2) L rotations to any FCNC operator in the 5 See also [30,77] for the R2 leptoquark scenario with complex couplings, which generates the Wilson coefficients with the relation C bcτ ντ Consequently, the constraints are qualitatively similar as for WET, as shown in fig. 4 right. Note that we have included the anomalous magnetic muon and tau in our likelihood, but do not find a relevant constraint for this simple scenario (cf. [72]).

B anomalies from new physics in top
A new physics effect in the semi-leptonic SMEFT operator [C lu ] 2233 involving two left-handed muons and two right-handed top quarks was suggested in [68] as a solution to the neutralcurrent B anomalies, as it induces a b → sµµ transition at low-energies via electroweak renormalization effects. This effect can be realized in Z models [79]. It was subsequently shown however that the effect is strongly constrained by the effects it induces in At 2σ, the two constraints cannot be brought into agreement and the global likelihood is optimized at an intermediate point.

Tauonic vector operators for charged-current anomalies
The SMEFT operator [C (3) lq ] 3323 can interfere coherently with the SM contribution to the b → cτ ν τ process, does not suffer from any CKM suppression and is thus a good candidate to explain the R D and R D * anomalies. However, a strong constraint is given by the limits on the B → K ( * ) νν decays, which can receive contributions from tau neutrinos [46]. At tree level and in the absence of RG effects, this constraint can be avoided in models that predict [C Recently, it has been pointed out that the large value of the tauonic Wilson coefficient required to accommodate R D and R D * induces a LFU contribution to the b → s Wilson coefficient C 9 at the one loop level [81], an effect discussed for the first time in [82]. This effect can be reproduced by taking into account the SMEFT and QED running. In agreement with [81], fig. 5 right shows that the b → sµµ anomalies as well as R D and R D * can be explained simultaneously without violating the B → K ( * ) νν constraint. Note that R K and R K * are SM-like in this simple scenario.

Flavour vs. electroweak constraints on modified top couplings
Another nice example of the interplay between flavour and EW precision constraints was presented in [83]. The Wilson coefficients corresponding to modified couplings of the Z boson induce on the one hand effects in flavour-changing neutral currents in K and B physics such as B s → µ + µ − and K + → π + νν, on the other hand radiatively induce a correction to the Wilson coefficient of the bosonic operator O φD that corresponds to the oblique T parameter. This interplay is reproduced in fig. 6 left.

Vector leptoquark solution to the B anomalies
The U 1 vector leptoquark transforming as (3, 1) 2 3 under the SM gauge group is the phenomenologically most successful single-multiplet scenario that simultaneously solves the charged-and neutral-current B anomalies [84] as it does not give rise to b → sνν at tree level [46] and is still allowed by direct searches [85].
Writing the leptoquark's couplings to left-handed fermions as the solution of the neutral-current B anomalies depends on the coupling combination g 22 lq g 23 * lq , while the charged-current anomalies require a sizable g 32 lq g 33 * lq . 6 Fig. 6 right shows the likelihood contours for the U 1 scenario in the plane g 32 lq vs. g 23 lq where we have fixed The LFV decays are important constraints to determine the allowed pattern of the couplings g ij lq [87]. This can be seen from the orange contour in Fig. 6 right, which shows constraints from BR(B → Kτ + µ − ), BR(B → Kµ + τ − ), and BR(τ → φµ). The former two depend on the coupling combinations g 33 lq g 22 lq and g 23 lq g 32 lq respectively, whereas the latter is controlled by g 32 lq g 22 lq .

B anomalies from third generation couplings
An interesting EFT scenario for the combined explanation of the B anomalies in the neutral and charged currents is to assume TeV-scale NP in the purely third generation operators [O (1) lq ] 3333 and [O (3) lq ] 3333 in the interaction basis [88]. The effective Lagrangian in the Warsaw basis (as defined in WCxf [15]) can be written as where λ and λ q parameterize the mismatch between the interaction basis and the basis where the down-type quark mass matrix is diagonal. As required by the data, purely third generation operators induce a large NP contribution in b → cτν, whereas in b → sµ + µ − comparatively smaller effects arise due to mixing on rotating to the mass basis.
In this context, ref. [89] found that electroweak corrections can lead to important effects in Z pole observables and τ decays challenging this simultaneous solution for the B anomalies. Since all the relevant observables as well as the SMEFT RG evolution are included in our global likelihood, we can reproduce these conclusions.
In figure 7 we show likelihood contours of the various observables in the plane of C 1 = C 3 and λ 23 . We have set Λ = 1 TeV, λ 23 q = −0.008 and the relations λ 22 ,q = (λ 23 ,q ) 2 , λ 33 = λ 33 q = 1 are imposed 7 . Like [89], we find that the 2σ region for the precision τ decays does not overlap with the 2σ regions preferred by R D ( * ) and R K ( * ) . Furthermore, the 2σ region from EWPOs has only a very small overlap with the 2σ region preferred by R D ( * ) . Compared to [89], we find a stronger constraint on the shift in the tau neutrino's electroweak coupling. We have traced this difference back to the treatment of the LEP constraint in the invisible Z width. [89] uses the invisible Z width extracted by LEP [90], corresponding to the effective number of neutrino species N ν = 2.984 ± 0.008, which favours a destructive interference with the SM at 2σ. This number is obtained exclusively from σ had , using the measured value of R l (assuming lepton flavour universality). Our treatment differs in two respects. First, since both σ had and R e,µ,τ are among the observables in the likelihood, we effectively use the SM values of R e,µ,τ rather than the measured ones when shifting only the neutrino coupling. This leads to a value N ν = 2.990 ± 0.007, in better agreement with the SM value. Second, we include additional observables sensitive to the electroweak coupling of the tau neutrino, notably the total Z width Γ Z and the W → τ ν branching ratio 8 . Figure 8 shows the contributions of these three observables to the likelihood as well as their combination. While σ had alone favours a slightly shifted coupling (less significant than 2σ due to the different treatment of R l ), the combined constraints are in agreement with the SM at 1σ and more strongly disfavour a positive shift in [C (1) φl ] 33 = −[C φl ] 33 .

Usage
The global likelihood is accessed via the Python package smelli (SMEFT likelihood). Given a working installation of Python version 3.5 or above, the package can be installed with the simple command § ¤ 1 python3 -m pip install smelli --user ¦ ¥ that downloads it from the Python package archive (PyPI) along with all required dependencies and installs it in the user's home directory (no administrator privileges required). The source code of the package can be browsed via a public Github repository 9 . As with any Python package, smelli can be used as library imported from other scripts, directly in the command line interpreter, or in an interactive session. For interactive use, we recommend the Jupyter notebook 10 that runs in a web browser. In all cases, the first step is to import the package and to initialize the class GlobalLikelihood, § ¤ 1 import smelli 2 gl = smelli.GlobalLikelihood()

¦ ¥
The initialization function takes two optional arguments: • The argument eft (default value: 'SMEFT') can be set to 'WET' to obtain a likelihood in the parameter space of WET rather than SMEFT Wilson coefficients. In this case EWPOs are ignored.
• The argument basis allows to select a different WCxf basis (default: 'Warsaw' in the case of SMEFT, 'flavio' in the case of WET).
By default, smelli uses the leading logarithmic approximation for the SMEFT RG evolution, since it is faster than the full numerical solution of the coupled RGEs. This behaviour can be changed by setting the corresponding option of the wilson package after importing smelli, e.g. § ¤ 1 import smelli, wilson 2 wilson.Wilson.set_default_option('smeft_accuracy', 'integrate')

¦ ¥
The next step is to select a point in Wilson coefficient space by using the parameter_point method. The Wilson coefficients must be provided in the EFT and basis fixed in the first step. There are three possible input formats: • a Python dictionary (containing Wilson coefficient name/value pairs) and an input scale, • as a WCxf data file in YAML or JSON format (specified by its file path as a string), • as an instance of wilson.Wilson defined by the wilson package.
Using the first option, fixing the Wilson coefficient [C • glp.log_likelihood_dict() returns a dictionary with the contributions to ln ∆L from the individual products in (3).
• glp.obstable() returns a pandas.DataFrame table-like object that lists all the individual observables with their experimental and theoretical central values and uncertainties ordered by their "pull" that is defined by |∆χ 2 i | where −χ 2 i /2 is their individual contribution to the log-likelihood neglecting all correlations. This table can be useful to get a better understanding of the likelihood value at a given point. However it should be used with caution. In particular, the log-likelihood is not equal to the sum of the individual contributions obtained from the pulls, as there can be significant correlations between them. Also, the uncertainties listed in this table can be inaccurate in the case of strongly non-Gaussian probability distributions.
The observables with the highest pulls in the SM as obtained by this method are shown for illustration in table 1. A few comments are in order.
• The largest deviation is in the branching ratio of B s → φµ + µ − at low q 2 , where the prediction relies strongly on the form factors from [91]. [92]. We use the full observable names as defined in flavio here.  [15,20] 0.1400 ± 0.0074 0.249 ± 0.040 [92] 2.7σ  Table 1: Observables with highest pulls in the SM.
• The SM uncertainties in / are entirely due to matrix elements from lattice QCD [54,55].

Conclusions
In this paper we have presented a likelihood function in the space of dimension-6 Wilson coefficients of the SMEFT. This function is made publicly available in the form of the Python package smelli, building on the existing public codes flavio and wilson. At present, the likelihood includes numerous observables from B and K decays, EWPOs, neutral meson mixing, LFV and CP violating processes and many more, counting a total of 265 observables. We have demonstrated its validity and usefulness by reproducing various results given in the literature.
In passing, we have also pointed out new results, in particular the fact that one of the two possible solutions to the R D and R D * anomalies involving the tensor operator is excluded by the recent Belle measurement of the longitudinal polarization fraction in B → D * τ ν, which is included in our likelihood (see section 4.3). Clearly, the 265 observables do not constrain the entire 2499-dimensional parameter space of SMEFT Wilson coefficients yet. Observables that are still missing include • Higgs production and decay [64,101,102] including h → γγ [103][104][105], • top physics [106][107][108][109], • further low-energy observables [17], such as neutrino scattering, parity violation in atoms, and quark pair production in e + e − collisions, • non-leptonic B decays [110], • rare D decays [111][112][113][114], • further hadronic tau decays [115,116], • beta decay [18,19,117], • paramagnetic EDMs [30,118], among others. Furthermore, as discussed at the end of section 2, a major limitation of the nuisance-free likelihood we have constructed is that several classes of observables cannot be incorporated consistently without scanning over nuisance parameters. The next step in generalizing our results would be to allow the 4 parameters of the CKM matrix to vary in addition to the Wilson coefficients. This would make it possible to consistently include semi-leptonic charged-current B and K decays with general NP effects. We hope that the groundwork laid by us will allow the community to build a more and more global likelihood as a powerful tool to constrain UV models from precision measurements.

Note added
After our preprint was published, ref. [119] appeared that proposes a procedure for a consistent treatment of the CKM matrix in the presence of dimension-6 contributions. Implemented in our framework, this would allow to include semi-leptonic charged-current decays without the need to scan over nuisance parameters.

A. Conventions and caveats
In this appendix, we fix some of our conventions necessary for a consistent usage of the likelihood function and recall a few caveats when dealing with different bases of Wilson coefficients.

A.1. SMEFT flavour basis
Within SMEFT, a complete basis of gauge-invariant operators has to be chosen. Here we adopt the "Warsaw basis", as defined in [2]. This basis is defined in the interaction basis above the electroweak scale. Having fixed this basis, there remains a continuous choice for the basis in flavour space, parameterized by the U (3) 5 flavour symmetry of unitary fermion field rotations. Anticipating spontaneous symmetry breaking at the EW scale motivates the choice of basis closely related to the mass eigenbasis. Due to the misalignment of the up-and down sector, a choice has to be made concerning the diagonality of the mass matrices. Above the electroweak scale, only five instead of the usual six fermion-field rotation matrices can be used to diagonalize the three mass matrices of the SM. This is because left-handed up-and down-type quarks form doublets of the unbroken SU (2) L symmetry and therefore have to be rotated by the same matrix. Denoting the quark rotations by leads to the following quark masses including dimension-6 corrections [120]: Choosing the up-type mass matrix to be diagonal results in the "Warsaw-up" basis, such defined in the Wilson coefficient exchange format (WCxf) [15]. This is equivalent of choosing where U u L , U d L are the rotation matrices of the left-handed up-and down-quarks, which diagonalize the corresponding mass matrices, and V is the CKM matrix. Therefore, in the Warsaw-up basis, the mass matrices read: with the diagonal matricesM u ,M d . Furthermore, all operators containing left-handed down-type quarks are rotated by V compared to the usual Warsaw basis, after having absorbed factors of U u L in the Wilson coefficients. For example the operator O ijkl qe = (q i γ µ q j )(ē k γ µ e l ) in the Warsaw basis will read after performing quark rotations and choosing the Warsaw-up basis (denoted by a hat):

A.2. Non-redundant SMEFT basis
To derive the complete anomalous dimension matrix [6][7][8] as well as the complete tree-level matching [13] of the SMEFT onto WET it is convenient to allow for all possible flavour combinations in the SMEFT operators. Nevertheless, many operators are symmetric under the exchange of flavour indices. This is for example the case for four-fermi operators consisting of two identical fermion currents, like the operator O ijkl dd : for which clearly For the computation of physical processes it can however be more convenient to choose a minimal basis, in which all operators are independent of each other. Such a choice avoids unwanted symmetry factors in the Lagrangian. For example the Lagrangian written in a redundant basis featuring the operator O dd would contain terms of the form whereas in a non-redundant basis only one flavour combination is taken into account: and the redundant contribution is not part of the Lagrangian. Furthermore, such symmetry factors can also enter the beta functions of the Wilson coefficients, since contributions from operators that are not linearly independent are counted individually. For example the beta function of the Wilson coefficient C dd in a redundant SMEFT basis contains terms of the form [8]: Therefore, operators with symmetric index combinations, like f.e. prst = aabb, a = b, get the same contribution from C aaww dd and C wwaa dd , whereas in a non-redundant basis, only one of such contributions is present. The operator corresponding to the second contribution is not included in the Lagrangian.
This issue has to be taken into account when using the results of [6-8, 11, 13] together with a non-redundant basis, like the one defined in [9]. All operators of the non-redundant basis exhibiting such symmetries have to be divided by their corresponding symmetry factor S before the running and multiplied by S after the running to cancel the effect of the redundant operators in the RGEs. Similar comments apply to the matching at the EW scale and the running below the EW scale.
Moreover, the choice of basis has to be made before making it minimal by discarding redundant operators, since a basis change can reintroduce redundant operators. Looking at the example of O (1),prst qq in the Warsaw basis with diagonal up quark mass matrix (denoted with a hat) and diagonal down quark mass matrix (no hat), respectively, one finds for the index combination prst = 1122 [10]: The operator O We stress that, being based on WCxf, the input to our likelihood function always refers to the basis without any redundant operators.

A.3. Definitions
A frequently overlooked ambiguity is the sign convention for the covariant derivative, that affects the overall sign of all dipole and triple gauge boson operators in both SMEFT and WET (see e.g. [2]). For definiteness, we specify our conventions here: This sign convention for the covariant derivative is prevalent in the flavour physics literature and corresponds to the "usual" sign of the b → sγ dipole Wilson coefficient in the SM, but differs from several textbooks, see [121] for an overview. The convention for σ µν is also the most common one, but there are notable exceptions, e.g. [122].
With these conventions, one obtains the following relation between the effective Lagrangian in the WCxf flavio basis and the the anomalous magnetic moment of a fermion ψ with electric charge Q ψ ,

B. τ → V decays
In the following, we summarize the full tree-level results of the τ → V decay width Γ τ → V in the WET, where V ∈ {ρ, φ} is a vector meson and ∈ {e, µ} is a lepton. The decay width can be expressed in terms of the squared amplitude |M τ → V | 2 , which has been averaged over initial spins and summed over final spins and polarizations. One finds (cf. [123]) where λ(a, b, c) = a 2 + b 2 + c 2 − 2(ab + ac + bc) is the Källén function [124].

B.1. Squared amplitudes
The τ → V matrix element due to generic couplings of the vector meson to the leptonic vector current can be written as where p τ , p , and p V are the momenta of τ , , and V , respectively, and g τ V L and g τ V R are effective coupling constants. Squaring this matrix element, averaging over initial spins, and summing over final spins and polarizations yields The τ → V matrix element due to generic couplings of the vector meson to the leptonic tensor current can be written as 12 where g τ V T L , g τ V T R ,g τ V T L , andg τ V T R are effective coupling constants. Squaring this matrix element, averaging over initial spins, and summing over final spins and polarizations yields Squaring the full amplitude, averaging over initial spins, and summing over final spins and polarizations yields where the interference term I is given by 12 Our convention for the epsilon tensor is 0123 = − 0123 = 1.

B.2.1. Vector operators
The semi-leptonic vector operators contribute to the vector current amplitude M VC τ → V . Using the vacuum to vector meson matrix element of the quark vector current for the case V = φ (cf. e.g. [125]), where f φ is the φ decay constant and m φ the φ mass, the effective couplings g τ φ L and g τ φ R are given by In the case V = ρ, the vacuum to vector meson matrix element is and the effective couplings g τ ρ L and g τ ρ R are given by where f ρ and m ρ are the ρ's decay constant and mass.

B.2.2. Dipole and tensor operators
The leptonic dipole operators as well as the semi-leptonic tensor operators contribute to the tensor current amplitude M TC τ → V . Following [58], the vacuum to vector meson matrix element of the electromagnetic field strength tensor F µν can be written as where p V µ is the outgoing momentum of the vector meson and the constant K V depends on the fermion content of the meson V and the electric charges Q f of its constituent fermions. For V = φ and V = ρ, one finds 13 The vacuum to vector meson matrix element of the quark tensor current for the case V = φ is given by (cf. e.g. [125]) where p φ µ is the outgoing momentum of the φ and f T φ (µ) is its transverse decay constant, which depends on the scale µ at which the corresponding operator is renormalized. For τ decays, we set µ = 1.8 GeV and define The contributions from dipole and tensor Wilson coefficients to the coupling constants g τ φ T L , g τ φ T R ,g τ φ T L , andg τ φ T R are thus given by In the case V = ρ, the vacuum to vector meson matrix element of the quark tensor current is where f T ρ (µ) is the ρ transverse decay constant and p ρ µ is its outgoing momentum. The effective couplings g τ ρ T L , g τ ρ T R ,g τ ρ T L , andg τ ρ T R are thus given by (60) 13 The overall sign of KV depends on the convention used for the covariant derivative. Our choice in eq. (32) yields the result in eq. (55). The sign of KV is flipped if the sign of the second term in eq. (32) is chosen to be negative.
C. τ → P decays C.1. τ → π 0 : Effective coupling constants in the WET The matrix elements in this case can be defined as [126] here f π = 130.2MeV. For the process τ → π 0 , the relevant part of the WET Lagrangian reads From L ef f using eqs. (61) and (62) and the momentum conservation, p µ π = p µ τ − p µ , we can define the matrix element as Here the couplings g τ π 0 L and g τ π 0 R are given by with the vector v τ π 0 L , v τ π 0 R and scalar s τ π 0 C.2. τ → K 0 : Effective coupling constants in the WET For K 0 the pseudo vector matrix element is defined as [127] 14 14 Note: For the scalar matrix element we have got a different sign from [127].
and for the scalar current The relevant part of the WET Lagrangian reads The matrix element is given by with . (75) Using the momentum conservation, p µ K = p µ τ − p µ , in Eq. 73, we can redefine the matrix element as here and the couplings g τ K 0 V S and g τ K 0 AP are given by

C.3. Squared amplitude
The squared matrix element, summed over the final states and averaged over the initial states, is given by + 2m l m τ Im(g τ P L ) Im(g τ P R ) + Re(g τ P L ) Re(g τ P R ) .