1 Introduction

With the exploration of the terascale, particle physics has entered a new era. On the one hand, the discovery of a Higgs boson at the LHC [1, 2] seemingly completed the Standard Model (SM) of particle physics, even though there is still quite some room for deviations from the SM predictions. The observed mass of about 125 GeV in combination with a top quark mass of 173.34 GeV [3] implies within the SM that we potentially live in a meta-stable vacuum [4]. This, together with other observations, like the dark matter relic density or the unification of gauge forces, indicates that there is physics beyond the SM (BSM). Although no sign of new physics has been found so far at the LHC, colliders are not the only places where one can search for new physics. Low energy experiments focused on flavor observables can also play a major role in this regard, since new particles leave their traces via quantum effects in flavor violating processes such as \(b\rightarrow s \gamma \), \(B_s \rightarrow \mu ^+ \mu ^-\) or \(\mu \rightarrow e \gamma \). In the last few years there has been a tremendous progress in this field, both on the experimental as well as on the theoretical side. In particular, observables from the Kaon- and B-meson sectors, rare lepton decays and electric dipole moments have put stringent bounds on new flavor mixing parameters and/or additional phases in models beyond the SM.

There are several public tools on the market which predict the rates of several flavor observables: superiso [57], SUSY_Flavor [8, 9], NMSSM-Tools [10], MicrOmegas [1115], SuperBSG [16], SupeLFV [17], SuseFlav [18], IsaJet with IsaTools [1924] or SPheno [25, 26]. However, all of these codes have in common that they are only valid in the Two-Higgs-doublet model or in the MSSM or simple extensions of it (NMSSM, bilinear R-parity violation). In addition, none of these tools can be easily extended by the user to calculate additional observables. This has made flavor studies beyond the SM a cumbersome task. The situation has changed with the development of SARAH [2731]. This Mathematica package can be used to generate modules for SPheno, which then can calculate flavor observables at the 1-loop level in a wide range of supersymmetric and non-supersymmetric models [3234]. However, so far all the information about the underlying Wilson coefficientsFootnote 1 for the operators triggering the flavor violation as well as the calculation of the flavor observables had been hardcoded in SARAH. Therefore, it was also very difficult for the user to extend the list of calculated observables. The implementation of new operators was even more difficult.

We present a new kit for the study of flavor observables beyond the standard model. In contrast to previous flavor codes, FlavorKit is not restricted to a single model, but can be used to obtain predictions for flavor observables in a wide range of models (SUSY and non-SUSY). FlavorKit can be used in two different ways. The basic usage of FlavorKit allows for the computation of a large number of lepton and quark flavor observables, using generic analytical expressions for the Wilson coefficients of the relevant operators. The setup is based on the public codes SARAH and SPheno, and thus allows for the analytical and numerical computation of the observables in the model defined by the user. If necessary, the user can also go beyond the basic usage and define his own operators and/or observables. For this purpose, a Mathematica package called PreSARAH has been developed. This tool uses FeynArts/FormCalc [3540] to compute generic expressions for the required Wilson coefficients at the tree- and 1-loop levels. Similarly, the user can easily implement new observables. With all these tools properly combined, the user can obtain analytical and numerical results for the observables of his interest in the model of his choice. To calculate new flavor observables with SPheno for a given model the user only needs the definition of the operators and the corresponding expressions for the observables as well as the model file for SARAH. All necessary calculations are done automatically. We have used this setup to implement BR(\(\ell _{\alpha } \rightarrow \ell _{\beta } \gamma \)), BR(\(\ell _{\alpha } \rightarrow 3\, \ell _{\beta }\)), CR(\(\mu -e,A\)), BR(\(\tau \rightarrow P \, \ell \)), BR(\(h\rightarrow \ell _{\alpha } \ell _{\beta }\)), BR(\(Z\rightarrow \ell _{\alpha } \ell _{\beta }\)), BR(\(B_{s,d}^0 \rightarrow \ell \bar{\ell }\)), BR(\({\bar{B}} \rightarrow X_s\gamma \)), BR(\({\bar{B}} \rightarrow X_s \ell \bar{\ell }\)), BR(\({\bar{B}} \rightarrow X_{d,s} \nu {\bar{\nu }}\)), BR(\(K^+ \rightarrow \pi ^+ \nu {\bar{\nu }}\)), BR(\(K_L \rightarrow \pi ^0 \nu {\bar{\nu }}\)), \(\varDelta M_{B_s,B_d}\), \(\varDelta M_K\), \(\varepsilon _K\), BR(\(B \rightarrow K \mu \bar{\mu }\)), BR(\(B\rightarrow \ell \nu \)), BR(\(D_s \rightarrow \ell \nu \)) and BR(\(K \rightarrow \ell \nu \)) in SARAH.

This manual is structured as follows: in the next section we give a brief introduction into the calculation of flavor observables focusing on the main steps that one has to follow. Then we present FlavorKit, our setup to combine FeynArts/FormCalc, SPheno and SARAH in Sect. 3. In Sect. 4 we explain how new observables can be added and in Sect. 5 how the list of operators can be extended by the user. A comparison between FlavorKit and the other public codes is presented in Sect. 6 taking the MSSM as an example before we conclude in Sect. 7. The appendix contains information about the existing operators and how they have been combined to compute the different flavor observables.

2 General strategy: calculation of flavor observables in a nutshell

Once we have chosen a BSM model,Footnote 2 our general strategy for the computation of a flavor observable follows these steps:

  • Step 1: We first consider an effective Lagrangian that includes the operators relevant for the flavor observable of our interest,

    $$\begin{aligned} {\mathcal L}_{eff} = \sum _i C_i {\mathcal O}_i. \end{aligned}$$
    (1)

    This Lagrangian consists of a list of (usually) higher-dimensional operators \({\mathcal O}_i\). The Wilson coefficients \(C_i\) can be induced either at tree or at higher loop levels and include both the SM and the BSM contributions (\(C_i = C_i^\mathrm{SM} + C_i^\mathrm{BSM}\)). They encode the physics of our model.

  • Step 2: The Wilson coefficients are computed diagrammatically, taking into account all possible tree-level and 1-loop topologies leading to the \({\mathcal O}_i\) operators.Footnote 3

  • Step 3: The results for the Wilson coefficients are plugged in a general expression for the observable and a final result is obtained.

The user has to make a choice in step 1. The list of operators in the effective Lagrangian can be restricted to the most relevant ones or include additional operators beyond the leading contribution, depending on the required level of precision. Usually, the complete set of renormalizable operators contributing to the observable of interest is considered, although in some well motivated cases one may decide to concentrate on a smaller subset of operators. This freedom is not present in step 2. Once the list of operators has been arranged, the computation of the corresponding \(C_i\) coefficients follows from the consideration of all topologies (penguin diagrams, box diagrams, ...) leading to the \({\mathcal O}_i\) operators. This is the most complicated and model dependent step, since it demands a full knowledge of all masses and vertices in the model under study. Furthermore, it may be necessary to compute the coefficients at an energy scale and then obtain, by means of their renormalization group running, their values at a different scale. Finally, step 3 is usually quite straightforward since, like step 1, is model independent. In fact, the literature contains general expressions for most flavor observables, thus facilitating the final step. However, one should be aware that the formulas given in the literature assume that certain operators contribute only sub-dominantly and, thus, omit the corresponding contributions. This is in general justified for the SM but not in a general BSM model. In particular, this is the case for processes involving external neutrinos, which are often assumed to be purely left-handed, making the operators associated to their right-handed components to be neglected.

We will exemplify our strategy using a simple example: BR(\(\mu \rightarrow e \gamma \)) in the Standard Model extended by right-handed neutrinos and Dirac neutrino masses. The starting point is, as explained above, to choose the relevant operators. In this case, it is well known that only dipole interactions can contribute to to the radiative decay \(\ell _{\alpha } \rightarrow \ell _{\beta } \gamma \) at leading order.Footnote 4 Therefore, the relevant operators are contained in the \(\ell - \ell - \gamma \) dipole interaction Lagrangian. This is in general given by

$$\begin{aligned} {\mathcal L}_{\ell \ell \gamma }^{\text {dipole}} = i e \, m_{\ell _{\alpha }} \, \bar{\ell }_{\beta } \sigma ^{\mu \nu } q_{\nu } \left( K_2^L P_L + K_2^R P_R \right) \ell _{\alpha } A_\mu + \text {h.c.}\nonumber \\ \end{aligned}$$
(2)

Here \(e\) is the electric charge, \(q\) the photon momentum, \(P_{L,R} = \frac{1}{2} (1 \mp \gamma _5)\) are the usual chirality projectors and \(\ell _{\alpha ,\beta }\) denote the lepton flavors. This concludes step 1.

The information about the underlying model is encoded in the coefficients \(K_2^{L,R}\). In the next step, these coefficients have to be calculated by summing up all Feynman diagrams contributing at a given loop level. Expressions for these coefficients for many different models are available in the literature. In the SM only neutrino loops contribute and one finds [41]

$$\begin{aligned} K_2^L&= \frac{G_F}{2 \sqrt{2} \pi ^2} m_\mu \sum _i \lambda _{i\mu } \lambda ^*_{i e}(F_1 + F_2)\end{aligned}$$
(3)
$$\begin{aligned} K_2^R&= \frac{G_F}{2 \sqrt{2} \pi ^2} m_e \sum _i \lambda _{i\mu } \lambda ^*_{i e}(F_1 - F_2) \end{aligned}$$
(4)

Here, \(\lambda _{ij}\) denote the entries of the Pontecorvo–Maki–Nakagawa–Sakata matrix and \(F_1\) and \(F_2\) are loop functions. One finds approximately \(F_1 \simeq -\frac{1}{4}\left( \frac{m_{\nu }}{m_W}\right) ^2\) and \(F_2 \simeq 0\). Finally, we just need to proceed to the last step, the computation of the observable. After computing the Wilson coefficients \(K_2^{L,R}\) it is easy to relate them to BR(\(\mu \rightarrow e \gamma \)) by using [42]

$$\begin{aligned} \varGamma \left( \ell _{\alpha } \rightarrow \ell _{\beta } \gamma \right) = \frac{\alpha m_{\ell _{\alpha }}^5}{4} \left( |K_2^L|^2 + |K_2^R|^2 \right) , \end{aligned}$$
(5)

This expression holds for all models. With this final step, the computation concludes.

As we have seen, the main task to get a prediction for BR(\(\mu \rightarrow e \gamma \)) in a new model is to calculate \(K_2^{L,R}\). However, this demands the knowledge of all masses and vertices involved. Moreover, in most cases a numerical evaluation of the resulting loop integrals is also welcome. Therefore, even for a simple process like \(\mu \rightarrow e \gamma \), a computation from scratch in a new model can be a hard work. In order to solve this practical problem, we are going to present here a fully automatized way to calculate a wide range of flavor observables for several classes of models.

3 Setup

3.1 FlavorKit: usage and goals

As we have seen, the calculation of flavor observables in a specific model is a very demanding task. A detailed knowledge about the model is required, including

  1. 1.

    expressions for all involved masses and vertices

  2. 2.

    optionally, renormalization group equations to get the running parameters at the considered scale

  3. 3.

    expressions to calculate the operators

  4. 4.

    formulae to obtain the observables from the operators.

Nearly all codes devoted to flavor physics have those pieces hardcoded, and they are only valid for a few specific models.Footnote 5 The only exception is SPheno, thanks to its extendability with new modules for additional models. These modules are generated by the Mathematica package SARAH and provide all necessary information about the calculation of the (loop corrected) mass spectrum, the vertices and the 2-loop RGEs. These expressions, derived from fundamental principles for any (renormalizable) model, contain all the information required for the computation of flavor observables. In fact, SARAH also provides Fortran code for a set of flavor observables. For this output, generic expressions of the necessary Wilson coefficients have been included. These are matched to the model chosen by the user and related to the observables by the standard formulae available in the literature. However, it was hardly possible for the user to extend the list of observables or operators included in SARAH without a profound knowledge of either the corresponding Mathematica or Fortran code.

We present a new setup to fill this gap in SARAH: FlavorKit. As discussed in Sect. 2, the critical step in the computation of a flavor observable is the derivation of analytical expressions for the Wilson coefficients of the relevant operators. This step, being model dependent, requires information about the model spectrum and interactions. However, generic expressions can be derived, later to be matched to the specific spectrum and interaction Lagrangian of a given model. For this purpose, we have created a new Mathematica package called PreSARAH. This package uses the power of FeynArts and FormCalc to calculate generic 1-loop amplitudes, to extract the coefficients of the demanded operators, to translate them into the syntax needed for SARAH and to write the necessary wrapper code. PreSARAH works for any 4-fermion or 2-fermion-1-boson operators and will be extended in the future to include other kinds of operators. The current version already contains a long list of fully implemented operators (see Appendix B). The results for the Wilson coefficients obtained with PreSARAH are then interpreted by SARAH, which adapts the generic expressions to the specific details of the model chosen by the user and uses snippets of Fortran code to calculate flavor observables from the resulting Wilson coefficients. As for the operators, there is a long list of observables already implemented (see Appendices C.1 and C.2). Finally, SARAH can be used to obtain analytical output in LaTeX format or to create Fortran modules for SPheno, thus making possible numerical studies.

FlavorKit can be used in two ways:

  • Basic usage: This is the approach to be followed by the user who does not need any operator nor observable beyond what is already implemented in FlavorKit. In this case, FlavorKit reduces to the standard SARAH package. The user can use SARAH to obtain analytical results for the flavor observables and, if he wants to make numerical studies, to produce Fortran modules for SPheno. For the list of implemented operators we refer to Appendix B, whereas the list of implemented observables is given in Table 1.

  • Advanced usage: This is the approach to be followed by the user who needs an operator or an observable not included in FlavorKit. In case the user is interested in an operator that is not implemented in FlavorKit, he can define his own operators and get analytical results for their coefficients using PreSARAH. Then the output can be passed to SARAH in order to continue with the basic usage. In case the user is interested in an observable that is not implemented in FlavorKit, this can be easily implemented by the addition of a Fortran file, with a few lines of code relating the observable to the operators in FlavorKit (implemented by default or added by the user). The Fortran files just have to be put together with a short steering file into a specific directory located in the main SARAH directory. Then one can continue with the basic usage.

Table 1 List of flavor violating processes and observables which have been already implemented in FlavorKit. To the left, observables related to lepton flavor, whereas to the right observables associated to quark flavor. See Appendices C.1 and C.2 for the definition of the observables and the relevant references for their calculation

The combination of PreSARAH together with SARAH and SPheno allows for a modular and precise calculation of flavor observables in a wide range of particles physics models. We have summarized the setup in Fig. 1: the user provides as input SARAH model files for his favorite models or takes one of the models which are already implemented in SARAH (see Appendix D for a list of models available in SARAH). New observables are implemented by providing the necessary Fortran code to SARAH while new operators can be either implemented by hand or by using PreSARAH which then calls FeynArts and FormCalc for the calculation of the necessary diagrams. However, most users will not require to implement new operators or observables. In this case, the user can simply use SARAH in the standard way and (1) derive analytical results for the Wilson coefficients and observables, and (2) generate Fortran modules for SPheno in order to run numerical analysis.

Fig. 1
figure 1

Schematic way to use FlavorKit: the user can define new operators in PreSARAH, which then calculates the coefficients in a generic form using FeynArts and FormCalc and creates the necessary input files for SARAH. In addition, Fortran code can be provided to relate the Wilson coefficients to specific flavor observables. This information is used by SARAH to generate SPheno code for the numerical calculation of the observables

3.2 Download and installation

FlavorKit involves several public codes. We proceed to describe how to download and install them.

  1. 1.

    FeynArts/FormCalc

    FeynArts and FormCalc can be downloaded from

    $$\begin{aligned} \mathtt{www.feynarts.de/} \end{aligned}$$

    It is also possible to use the script FeynInstall, to be found on the same site, for an automatic installation.

  2. 2.

    SARAH and PreSARAH

    SARAH can be downloaded from

    $$\begin{aligned} \mathtt{sarah.hepforge.org/} \end{aligned}$$

    No installation or compilation is necessary. Both packages just need to be extracted by using tar.

    \(\mathtt{>}\) tar -xf SARAH-4.2.0

    \(\mathtt{>}\) tar -xf PreSARAH-1.0.0

    PreSARAH needs the paths to load FeynArts and FormCalc. These have to be provided by the user in the file PreSARAH.ini

    figure a

    This would work if FeynArts and FormCalc have been installed in the Application directory of the local Mathematica installation. Otherwise, absolute paths should be used, e.g.

    figure b
  3. 3.

    SPheno SPheno can be downloaded from

    $$\begin{aligned} \mathtt{spheno.hepforge.org/} \end{aligned}$$

    After extracting the package, make is used for the compilation.

    \(\mathtt{>}\) tar -xf SPheno-3.3.0.tar.gz

    \(\mathtt{>}\) cd SPheno-3.3.0

    \(\mathtt{>}\) make

3.3 Basic usage

As explained above, FlavorKit can be used in several ways, depending on the user’s needs and interests. The advanced usage, which involves the introduction of new observables and/or the computation of new operators, is explained in detail in Sects. 4 and 5. Here we focus on the basic usage, which just requires the codes SARAH and SPheno.

SARAH can handle the analytical derivation of all the relevant Wilson coefficients in the model defined by the user. The resulting expressions can be then extracted in LaTeX form or used to generate a SPheno module for numerical evaluation. These are the steps to follow in order to use SARAH:

  1. 1.

    Loading SARAH : after starting Mathematica, SARAH is loaded via

    SARAH-4.2.0/SARAH.m or via [$path]/SARAH-4.2.0/SARAH.m

    The first choice works if SARAH has been installed in the Application directory of Mathematica. Otherwise, the absolute path ([$path]) to the local SARAH installation must been used.

  2. 2.

    Initialize a model: as example for the initialization of a model in SARAH we consider the NMSSM:

    Start[“NMSSM”];

  3. 3.

    Obtaining the LaTeX output: the user can get LaTeX output with all the information about the model (including the coefficients for the flavor operators) via

    ModelOutput[EWSB];

    MakeTeX[];

  4. 4.

    Obtaining the SPheno code: to create the SPheno output the user should run

    MakeSPheno[];

Thanks to FlavorKit, SARAH can also write LaTeX files with the analytical expressions for the Wilson coefficients. These are given individually for each Feynman diagram contributing to the coefficients, and saved in the folder

$$\begin{aligned} \mathtt{[\$SARAH]/Output/[\$MODEL]/EWSB/TeX/FlavorKit/} \end{aligned}$$

For the 4-fermion operators the results are divided into separated files for tree-level contributions, penguins contributions and box contributions. The corresponding Feynman diagrams are drawn by using FeynMF [44]. To compile all Feynman diagrams at once and to generate the pdf file, a shell script called MakePDF_[$OPERATOR].sh is written as well by SARAH.

In case the user is interested in the numerical evaluation of the flavor observables, a SPheno module must be created as explained above. Once this is done, the resulting Fortran code can be used for the numerical analysis of the model. This can be achieved in the following way:

  1. 1.

    building SPheno : as soon as the SPheno output is finished, open a terminal and enter the root directory of the SPheno installation, and create a new subdirectory, copy the SARAH output to that directory and compile it

    \(\mathtt{>}\) cd [$SPheno]

    \(\mathtt{>}\) mkdir NMSSM

    \(\mathtt{>}\) cp [$SARAH]/Output/NMSSM/EWSB/

    SPheno/* NMSSM/

    \(\mathtt{>}\) make Model=NMSSM

  2. 2.

    Running SPheno : After the compilation, a new binary SPhenoNMSSM is created. This file can be executed providing a standard Les Houches input file (SARAH provides an example file, see the SARAH output folder). Finally, SPheno is executed via

    \(\mathtt{>}\) ./bin/SPhenoNMSSM NMSSM/LesHouches. in.NMSSM

    This generates the output file SPheno.spc.NMSSM, which contains the blocks QFVobservables and LFVobservables. In those two blocks, the results for quark and lepton flavor violating observables are given.

Finally, an even easier way to implement new models in SARAH is the butler script provided with the SUSY Toolbox [45]

$$\begin{aligned} \mathtt{sarah.hepforge.org/Toolbox/} \end{aligned}$$

3.4 Limitations

FlavorKit is a tool intended to be as general as possible. For this reason, there are some limitations compared to codes which perform specific calculations in a specific model. Here we list the main limitations of FlavorKit:

  • Chiral resummation is not included because of its large model dependence, see e.g. [46] and references therein.

  • Even though we have included some of the higher order corrections for the SM part of some observables in a parametric way, 2- or higher loop corrections, calculated in the context of the SM or the MSSM for specific observables, are not considered, see for instance [4754].

4 Advanced usage I: implementation of new observables using existing operators

In order to introduce new observables to the SPheno output of SARAH, the user can add new definitions to the directories

$$\begin{aligned} \mathtt{[\$SARAH]/FlavorKit/[\$Type]/Processes/} \end{aligned}$$

[$Type] is either LFV for lepton flavor violating or QFV for quark flavor violating observables. The definition of the new observables consists of two files

  1. 1.

    A steering file with the extension .m

  2. 2.

    A Fortran body with the extension .f90

The steering file contains the following information:

  • NameProcess: a string as name for the set of observables.

  • NameObservables: names for the individual observables and numbers which are used to identify them later in the SPheno output. The value is a three dimensional list. The first part of each entry has to be a symbol, the second one an integer and the third one a comment to be printed in the SPheno output file ({{name1,number1,comment1},...}).

  • NeededOperators: The operators which are needed to calculate the observables. A list with all operators already implemented in FlavorKit is given in Appendix B. In case the user needs additional operators, this is explained in Sect. 5.

  • Body: The name (as string) of the file which contains the Fortran code to calculate the observables from the operators.

For instance, the corresponding file to calculate \(\ell _{\alpha } \rightarrow \ell _{\beta } \gamma \) reads

figure c

The observables will be saved in the variables muEgamma, tauEgamma, tauMuGamma and will show up in the spectrum file written by SPheno in the block FlavorKitLFV as numbers 701 to 703.

The file which contains the body to calculate the observables should be standard Fortran 90 code. For our example it reads

figure d

Real(dp) is the SPheno internal definition of double precision variables. Similarly one would have to use Complex(dp) for complex double precision variables when necessary.

Besides the operators, the SM parameters given in Table 2 and the hadronic parameters given in Tables 3 and 4 can be used in the calculations. For instance, we used Alpha for \(\alpha (0)\) and mf_l which contains the poles masses of the leptons as well as GammaMu and GammaTau for the total widths of \(\mu \) and \(\tau \) leptons.

Table 2 List of SM parameters available in FlavorKit. All hadronic observables are calculated at \(Q=160\) GeV
Table 3 Hadronic parameters used in FlavorKit. These can be changed via FMASS and and FLIFE in the Les Houches input file
Table 4 Decay constants available in the SPheno output of SARAH. The values can be changed according to the FLHA conventions using the block FCONST in the Les Houches input file

By extending or changing the file hadronic_ parameters.m in the FlavorKit directory, it is possible to add new variables for the mass or life time of mesons. These variables are available globally in the resulting SPheno code. The numerical values for the hadronic parameters can be changed in the Les Houches input file by using the blocks FCONST and FMASS defined in the Flavor Les Houches Accord (FLHA) [55].

It may happen that the calculation of a specific observable has to be adjusted for each model. This is for instance the case when (1) the calculation requires the knowledge of the number of generations of fields, (2) the mass or decay width of a particle, calculated by SPheno, is needed as input, or (3) a rotation matrix of a specific field enters the analytical expressions for the observable. For these situations, a special syntax has been created. It is possible to start a line with @ in the Fortran file. This line will then be parsed by SARAH, and Mathematica commands, as well as SARAH specific commands, can be used. We made use of this functionality in the implementation of \(h \rightarrow \ell _{\alpha } \ell _{\beta }\). The lines in hLLp.f90 read

figure e

In this implementation we define an integer hLoc that gives the generation index of the SM-like Higgs, to be found among all CP even scalars. In the first line it is checked if more than one scalar Higgs is present. If this is the case, the hLoc is set to the component which has the largest amount of the up-type Higgs, if not, it is just put to 1. Of course, this assumes that the electroweak basis in the Higgs sector is always defined as \((\phi _d,\phi _u,\dots )\) as is the case for all models delivered with SARAH. In the second and third lines, the variables mh and gamh are set to the mass and total width of the SM-like Higgs, respectively. For this purpose, the SARAH commands SPhenoMass[x] and SPhenoWidth[x] are used. They return the name of the variable for the mass and width in SPheno and it is checked if these variables are arrays or not.Footnote 6 For the MSSM, the above lines lead to the following code in the SPheno output:

figure f

We give in Table 5 the most important SARAH commands which might be useful in this context.

Table 5 SARAH commands which can be used in the input file for the calculation of an observable

Many more examples are given in Appendix C.1, where we have added all input files for the calculations of flavor observables delivered with SARAH.

5 Advanced usage II: implementation of new operators

The user can also implement new operators and obtain analytical expressions for their Wilson coefficients. In this case, he will need to use PreSARAH which, with the help of FeynArts and FormCalc, provides generic expressions for the coefficients, later to be adapted to specific models with SARAH.

5.1 Introduction

New operators can be implemented by extending the content of the folder

$$\begin{aligned} \mathtt{[\$SARAH]/FlavorKit/[\$Type]/Operators/} \end{aligned}$$

In the current version of FlavorKit, 3- and 4-point operators are supported. Each operator is defined by a .m-file. These files contain information about the external particles, the kind of considered diagrams (tree-level, self-energies, penguins, boxes) as well as generic expressions for the coefficients. These expressions, derived from the generic Feynman diagrams contributing to the coefficients, are written in the form of a Mathematica code, which can be used to generate Fortran code.

For the automatization of the underlying calculations we have created an additional Mathematica package called PreSARAH, which can be used to create the files for all 4-fermion as well as 2-fermion-1-boson operators. This package creates not only the infrastructure to include the operators in the SPheno output of SARAH but makes also use of FeynArts and FormCalc to calculate the amplitudes and to extract the coefficient of the demanded operators. It takes into account all topologies depicted in Figs. 2, 3, 4, 5 and 6.

Fig. 2
figure 2

All topologies considered by PreSARAH to calculate the Wilson coefficients of 2-fermion-1-boson operators. All possible generic combinations of the internal fields are taken into account

Fig. 3
figure 3

All tree topologies considered by PreSARAH to calculate the Wilson coefficients of 4-fermion operators. All possible generic combinations of the internal fields are taken into account

Fig. 4
figure 4

All self-energy topologies considered by PreSARAH to calculate the Wilson coefficients of 4-fermion operators. All possible generic combinations of the internal fields are taken into account

Fig. 5
figure 5

All penguin topologies considered by PreSARAH to calculate the Wilson coefficients of 4-fermion operators. All possible generic combinations of the internal fields are taken into account

Fig. 6
figure 6

All box topologies considered by PreSARAH to calculate the Wilson coefficients of 4-fermion operators. All possible generic combinations of the internal fields are taken into account

5.2 Input for PreSARAH

In order to derive the results for the Wilson coefficients, PreSARAH needs an input file with the following information:

  • ConsideredProcess: A string which defines the generic type for the process

    • “4Fermion”

    • “2Fermion1Scalar”

    • “2Fermion1Vector”

  • NameProcess: A string to uniquely define the process

  • ExternalFields: The external fields. Possible names are ChargedLepton, Neutrino, DownQuark, UpQuark, ScalarHiggs, PseudoScalar, Zboson, Wboson Footnote 7

  • FermionOrderExternal: the fermion order to apply the Fierz transformation (see the FormCalc manual for more details)

  • NeglectMasses: which external masses can be neglected (a list of integers counting the external fields)

  • ColorFlow: defines the color flow in the case of four quark operators. To contract the colors of external fields, ColorDelta is used, i.e ColorFlow = ColorDelta[1,2]*ColorDelta[3,4] assigns \((\bar{q}^\alpha \varGamma q_{\alpha })(\bar{q}^\beta \varGamma ' q_{\beta })\).

  • AllOperators: a list with the definition of the operators. This is a two dimensional list, where the first entry defines the name of the operator and the second one the Lorentz structure. The operators are expressed in the chiral basis and the syntax for Dirac chains in FormCalc is used:

    • 6 for \(P_L = \frac{1}{2}(1-\gamma _5)\), 7 for \(P_R = \frac{1}{2}(1-\gamma _5)\)

    • Lor[1], Lor[2] for \(\gamma _\mu \), \(\gamma _{\nu }\)

    • ec[3] for the helicity of an external gauge boson

    • k[N] for the momentum of the external particle N (N is an integer)

    • Pair[A,B] is used to contract Lorentz indices. For instance, Pair[k[1],ec[3]] stands for \(k^1_\mu \epsilon ^{\mu ,*}\)

    • A Dirac chain starting with a negative first entry is taken to be anti-symmetrized.

    See the FormCalc manual for more details. To make the definitions more readable, not the full DiracChain object of FeynArts/FormCalc has to be defined: PreSARAH puts everything with the head Op into a Dirac chain using the defined fermion order. For 4-fermion operators the combination of both operators is written as dot product. For instance Op[6].Op[6] is internally translated into

    figure g

    while Op[6] Pair[ec[3],k[1] becomes

    figure h
  • CombinationGenerations: the combination of external generations for which the operators are calculated by SPheno

  • Filters: a list of filters to drop specific diagrams. Possible entries are NoBoxes, NoPenguins, NoTree, NoCrossedDiagrams.

    • Filters = {NoBoxes, NoPenguins} can be used for processes which are already triggered at tree-level

    • Filters = {NoPenguins} might be useful for processes which at the 1-loop level are only induced by box diagrams

    • Filters = {NoCrossedDiagrams} is used to drop diagrams which only differ by a permutation of the external fields.

For instance, the PreSARAH input to calculate the coefficient of the \((\bar{\ell }\varGamma \ell )(\bar{d} \varGamma ' d)\) operator reads

figure i

Here, we neglect all external masses in the operators (NeglectMasses={1,2,3,4}), and the different coefficients of the scalar operators \((\bar{\ell }P_X \ell )(\bar{d} P_Y d)\) are called OllddSXY, the ones for the vector operators \((\bar{\ell } P_X \gamma _\mu \ell )(\bar{d} P_Y \gamma ^\mu d)\) are called OllddVYX and the ones for the tensor operators \((\bar{\ell } P_X \sigma _{\mu \nu } \ell )(\bar{d} \sigma ^{\mu \nu } P_Y d)\) OllddTYX, with X,Y=L,R. Notice that FormCalc returns the results in form of \(P_X \gamma _\mu \) while in the literature the order \(\gamma _\mu P_X\) is often used. Finally, SPheno will not calculate all possible combinations of external states, but only some specific cases: \(\mu e d d\), \(\tau e d d\), \(\tau \mu d d\), \(\mu e s s\), \(\tau e s s\), \(\tau \mu s s\).Footnote 8

The input file to calculate the coefficients of the \(\ell -\ell -Z\) operators \((\bar{\ell } \gamma _\mu P_{L,R} \ell ) Z^\mu \) and \((\bar{\ell } p_\mu P_{L,R} \gamma _\mu \ell ) Z^\mu \) is

figure j

Note that ExternalFields must contain first the involved fermions and the boson at the end. Furthermore, in the case of processes involving scalars one can define

figure k

In this case the operators for all Higgs states present in the considered model will be computed.

5.3 Operators with massless gauge bosons

We have to add a few more remarks concerning 2-fermion-1-boson operators with massless gauge bosons since those are treated in a special way. It is common for these operators to include terms in the amplitude which are proportional to the external masses. Therefore, if one proceeds in the usual way and neglects the external momenta, some inconsistencies would be obtained. For this reason, a special treatment is in order. In PreSARAH, when one uses

figure l

the dependence on the two fermion masses is neglected in the resulting Passarino–Veltman integrals but terms proportional to \(m_{f_1}\) and \(m_{f_2}\) are kept. This solves the aforementioned potential inconsistencies.

Furthermore, for the dipole operators, defined by

figure m

we are using the results obtained by FeynArts and FormCalc and have implemented all special cases for the involved loop integrals (\(C_0, C_{00}, C_1, C_2, C_{11}, C_{12}, C_{22}\)) with identical or vanishing internal masses in SPheno. This guarantees the numerical stability of the results.Footnote 9

The monopole operators of the form \(q^2 (\bar{f} \gamma _\mu f) V^\mu \) are only non-zero for off-shell external gauge bosons, while PreSARAH always treats all fields as on-shell. Because of this, and to stabilize the numerical evaluation later on, these operators are treated differently to all other operators: the coefficients are not calculated by FeynArts and FormCalc but instead we have included the generic expressions in PreSARAH using a special set of loop functions in SPheno. In these loop functions the resulting Passarino–Veltman integrals are already combined, leading to well-known expressions in the literature, see [42, 56]. They have been cross-checked with the package Peng4BSM@LO [43]. To get the coefficients for the monopole operators, these have to be given always in the form

figure n

in the input of PreSARAH.

5.4 Combination and normalization of operators

The user can define new operators as combination of existing operators. For this purpose wrapper files containing the definition of the operators can be included in the FlavorKit directories. These files have to begin with ProcessWrapper = True;. This function is also used by PreSARAH in the case of 4-fermion operators: for these operators the contributions stemming from tree-level, box- and penguin- diagrams are saved separately and summed up at the end. Thus, the wrapper code for the 4-lepton operators written by PreSARAH reads

figure o

It is also possible to use these wrapper files to change the normalization of the operators. We have made use of this functionality for the operators with external photons and gluons to match the standard definition used in literature: it is common to write these operators as \(e \, m_f (\bar{f} \sigma _{\mu \nu } f) F^{\mu \nu }\), i.e. with the electric coupling (or strong coupling for gluon operators) and fermion mass factored out. This is done with the files Photon_wrapper.m and Gluon_wrapper.m, included in the FlavorKit directory of SARAH:

figure p

First, the coefficients OA2qSL and OA2qSR derived with PreSARAH are matched to the new coefficients CC7 and CC7p. The same matching is automatically applied also to the SM coefficients OA2qSLSM and OA2qSRSM. In a second step, these operators are re-normalized to the standard definition of the Wilson coefficients \(C_7\) and \(C'_7\). The initial coefficients OA2qSR, OA2qSL are not discarded, but co-exist besides CC7, CC7p. Thus, the user can choose in the implementation of the observables which operators are more suitable for his purposes.

6 Validation

The validation of the FlavorKit results happened in three steps:

  1. 1.

    Agreement with SM results: we checked that the SM prediction for the observables agree with the results given in literature

  2. 2.

    Independence of scale in loop function: the loop integrals for two and three point functions (\(B_i, C_i\)) depend on the renormalization scale \(Q\). However, this dependence has to drop out for a given process at leading order. We checked numerically that the sum of all diagrams is indeed independent of the choice of \(Q\).

  3. 3.

    Comparison with other tools: as we have pointed out in the introduction, there are several public tools which calculate flavor observables mostly in the context of the MSSM. We did a detailed comparison with these tools using the SPheno code produced by SARAH for the MSSM. Some results are presented in the following.

We have compared the FlavorKit results using SARAH 4.2.0 and SPheno 3.3.0 with

  • superiso 3.3

  • SUSY_Flavor 1 and 2.1

  • MicrOmegas 3.6.7

  • SPheno 3.3.0

  • a SPheno version produced by SARAH 4.1.0 without the FlavorKit functionality

Since these codes often use different values for the hadronic parameters and calculate the flavor observables at different loop levels, we are not going to compare the absolute numbers obtained by these tools. Instead, we compare the results normalized to the SM prediction of each code and thus define, for an observable \(X\), the ratio

$$\begin{aligned} R(X) = \frac{X^{MSSM}}{X^{SM}}. \end{aligned}$$
(6)

\(X^{SM}\) is obtained by taking the value of \(X\) calculated by each code in the limit of a very heavy SUSY spectrum. As test case we have used the CMSSM. The dependence of a set of flavor observables as function of \(m_0\) is shown in Fig. 7 and as function of \(M_{1/2}\) in Fig. 8.

Fig. 7
figure 7

Comparison of the results for BR\((B^0_{s,d} \rightarrow \mu \mu )\), BR(\({\bar{B}} \rightarrow X_s\gamma \)), BR(\(B\rightarrow \tau \nu \)), \(\varDelta M_{B_s}\), \(\varepsilon _K\), BR(\(K_L \rightarrow \pi ^0 \nu {\bar{\nu }}\)), BR(\(K^+ \rightarrow \pi ^+ \nu {\bar{\nu }}\)) as a function of \(m_0\) using the FlavorKit (red), superiso (purple), SUSY_Flavor 1 (brown), SUSY_Flavor 2 (green), SPheno (blue), MicrOmegas (orange) and the old implementation in SARAH (red dashed). The three lines for SUSY_Flavor 2 correspond to different options of the chiral resummation. We used \(M_{1/2} = 200\) GeV, \(A_0 = 0\), \(\tan \beta =10\), \(\mu >0\)

Fig. 8
figure 8

Comparison of the results for different flavor observables as function of \(M_{1/2}\). The color code is the same as in Fig. 7. We used \(m_0 = 500\) GeV, \(A_0 = -1000\) GeV, \(\tan \beta =10\), \(\mu >0\)

We see that all codes show in general the same dependence. However, it is also obvious that the lines are not on top of each other but differences are present. These differences are based on the treatment of the resummation of the bottom Yukawa couplings, the different order at which SM and SUSY contributions are implemented, the different handling of the Weinberg angle, and the different level at which the RGE running is taken into account by the tools. Even if a detailed discussion of the differences of all codes might be very interesting it is, of course, far beyond the scope of this paper and would require a combined effort. The important point is that the results of FlavorKit agree with the codes specialized for the MSSM to the same level as those codes agree among each other. Since the FlavorKit results for all observables are based on the same generic routines it might be even more trustworthy than human implementations of the lengthy expressions needed to calculate these observables because it is less error prone. Of course, known 2-loop corrections for the MSSM which are implemented in other tools are missing.

Finally, it is well known that the process \(B_{s,d}^0 \rightarrow \ell \bar{\ell }\) has a strong dependence on the value of \(\tan \beta \). We show in Fig. 9 that this is reproduced by all codes.

Fig. 9
figure 9

Comparison of BR\((B^0_{s,d} \rightarrow \mu \mu )\) (first row) and BR\((B^0_{s,d} \rightarrow e e)\) (second row) as function of \(\tan \beta \). The color code is the same as in Fig. 7. We used \(m_0 = M_{1/2}=500\) GeV, \(A_0 = 0\), \(\mu >0\)

7 Conclusion

We have presented FlavorKit, a new setup for the calculation of flavor observables for a wide range of BSM models. Generic expressions for the Wilson coefficients are derived with PreSARAH, a Mathematica package that makes use of FeynArts and FormCalc. The output of PreSARAH is then passed to SARAH, which generates the Fortran code that allows to calculate numerically the values of these Wilson coefficients with SPheno. The observables are derived by providing the corresponding pieces of Fortran code to SARAH, which incorporates them into the SPheno output. We made use of this code chain to fully implement a large set of important flavor observables in SARAH and SPheno. In fact, due the simplicity of this kit, the user can easily extend the list with his own observables and operators. In conclusion, FlavorKit allows the user to easily obtain analytical and numerical results for flavor observables in the BSM model of his choice.