SmeftFR – Feynman rules generator for the Standard Model Effective Field Theory

SmeftFR – Feynman rules generator for the Standard Model Effective Field Theory

A. Dedes M. Paraskevas J. Rosiek K. Suxho L. Trifyllis Department of Physics, University of Ioannina, GR 45110, Ioannina, Greece Faculty of Physics, University of Warsaw, Pasteura 5, 02-093 Warsaw, Poland

We present SmeftFR, a Mathematica package designed to generate the Feynman rules for the Standard Model Effective Field Theory (SMEFT) including the complete set of gauge invariant operators up to dimension 6. Feynman rules are generated with the use of FeynRules package, directly in the physical (mass eigenstates) basis for all fields. The complete set of interaction vertices can be derived including all or any chosen subset of SMEFT operators. As an option, the user can also choose preferred gauge fixing, generating Feynman rules in unitary or -gauges (the latter include generation of ghost vertices). Further options allow to treat neutrino fields as massless Weyl or massive Majorana fermions. The derived Lagrangian in the mass basis can be exported in various formats supported by FeynRules, such as UFO, FeynArts, etc. Initialisation of numerical values of Wilson coefficients used by SmeftFR is interfaced to WCxf format. The package also includes dedicated Latex generator allowing to print the result in clear human-readable form. SmeftFR can be downloaded from the address

Standard Model Effective Field Theory, Feynman rules, unitary and -gauges
journal: Computer Physics Communications


Manuscript Title:
SmeftFR – Feynman rules generator for the Standard Model Effective Field Theory
Authors: Athanasios Dedes, Michael Paraskevas, Janusz Rosiek, Kristaq Suxho, Lampros Trifyllis
Program Title: SmeftFR v2.0
Journal Reference:
Catalogue identifier:
Licensing provisions: None
Programming language: Mathematica 11.3 (earlier versions were reported to have problems running this code)
Computer: any running Mathematica
Operating system: any running Mathematica
RAM: allocated dynamically by Mathematica, at least 4GB total RAM suggested
Number of processors used: allocated dynamically by Mathematica
Supplementary material: None
Keywords: Standard Model Effective Field Theory, Feynman rules, unitary and gauges
11.1 General, High Energy Physics and Computing, 4.4 Feynman diagrams, 5 Computer Algebra.
External routines/libraries: Wolfram Mathematica program
Subprograms used: FeynRules v2.3 package
Nature of problem:
Automatised generation of Feynman rules in physical (mass) basis for the Standard Model Effective Field Theory with user defined operator subset and gauge fixing terms selection.
Solution method:
Implementation (as the Mathematica package) of the results of Ref. [1] in the FeynRules package [2], including dynamic “model files” generation.
Restrictions: None
Unusual features: None
Additional comments: None
Running time: depending on control variable settings, from few minutes for a selected subset of few SMEFT operators and Feynman rules generation up to several hours for generating UFO output for maximum 60-operator set (using Mathematica 11.3 running on a personal computer)


  • (1) A. Dedes, W. Materkowska, M. Paraskevas, J. Rosiek and K. Suxho, “Feynman rules for the Standard Model Effective Field Theory in R-gauges,” JHEP 1706, 143 (2017), arXiv:1704.03888.
  • (2) A. Alloul, N. D. Christensen, C. Degrande, C. Duhr and B. Fuks, “FeynRules 2.0 - A complete toolbox for tree-level phenomenology,” Comput. Phys. Commun. 185, 2250 (2014), arXiv:1310.1921.

Appendix A Introduction

Despite lack of direct discoveries of new particles at LHC, indirect experiments searching for cosmological dark matter and dark energy, neutrino masses and mixing, heavy meson decays, anomalous magnetic moment of muon, point to existence of new physics phenomena that go beyond the Standard Model (SM) Weinberg:1967tq (); Glashow (); Salam () of particle physics. It has become customary in recent years to parameterise the potential effects of such New Physics (NP) in terms of the so-called SM Effective Field Theory (SMEFT) Weinberg:1980wa (); Coleman:1969sm (); Callan:1969sn ()111For a recent review see ref. Manohar:2018aog ().. In this theory, SM is extended by a complete set of gauge invariant operators constructed only by the SM fields which are considered to be light in mass with respect to, yet unknown, particles responsible for NP phenomena. Such (non-renormalisable) operators can be classified according to their growing mass dimension, with couplings (usually called Wilson coefficients) suppressed by respectively inverse powers of a typical mass scale of the NP extension.

As observable effects of new operators are typically suppressed by powers of (where is the true vacuum expectation value of the Higgs field), in many analyses it is sufficient to restrict the maximal dimension of new operators to . Classification of the complete independent set of the gauge invariant operators up to was conducted in an older study by Buchmüller and Wyler Buchmuller:1985jz () and more recently put in a non-redundant form in ref. Grzadkowski:2010es (), where the basis of such operators, usually referred as the “Warsaw basis”, has been given. Suppressing the flavour indices of the fields and not counting hermitian conjugated operators, Warsaw basis contains 59+1 baryon-number conserving and 4 baryon-number violating operators.

In its most general version, SMEFT is a hugely complicated model. Including all possible CP- and flavour-violating interactions, it contains 2499 free parameters. Due to large number and complicated structure of new terms in the Lagrangian, theoretical calculations of physical processes within the SMEFT can be very challenging — it is enough to notice that the number of primary vertices when SMEFT is quantised in -gauges, printed for the first time in ref. Dedes:2017zog (), is almost 400 without counting the hermitian conjugates. Thus, it is important to develop technical methods and tools facilitating such calculations, starting from developing the universal set of the Feynman rules for propagators and vertices for physical fields, after spontaneous symmetry breaking (SSB) of the full effective theory. The initial version of relevant package, SmeftFR v1, was announced and briefly described for the first time in Appendix B of ref. Dedes:2017zog (). In this paper we present SmeftFR v2.0, a Mathematica symbolic language package generating Feynman rules in several formats, based on the formulae developed in ref. Dedes:2017zog (). Comparing to version 1, the new code has been extended with a number of additional options and capabilities. It has also been made and tested to be compatible with many other publicly available high-energy physics related computer codes accepting standardised input and output data formats. Features of the presented package contain:

  • SmeftFR is able to generate interactions in the most general form of the SMEFT Lagrangian, without any restrictions on the structure of flavour violating terms and on CP-, lepton- or baryon-number conservation.222However, we do restrict ourselves to linear realisations of the SSB. Feynman rules are expressed in terms of physical SM fields and canonically normalised Goldstone and ghost fields. Expressions for interaction vertices are analytically expanded in powers of inverse New Physics scale , with all terms of dimension higher than consistently truncated.

  • SmeftFR is written as an overlay to FeynRules package Alloul:2013bka (), used as the engine to generate Feynman rules.

  • Including the full set of SMEFT parameters in model files for FeynRules may lead to very slow computations. SmeftFR can generate FeynRules model files dynamically, including only the user defined subset of higher dimension operators. It significantly speeds up the calculations and produces simpler final result, containing only the Wilson coefficients relevant for a process chosen to analyse.

  • Feynman rules can be generated in the unitary or in linear -gauges by exploiting four different gauge-fixing parameters for thorough amplitude checks. In the latter case also all relevant ghost vertices are obtained.

  • Feynman rules are calculated first in Mathematica/FeynRules format. They can be further exported in other formats: UFO Degrande:2011ua () (importable to Monte Carlo generators like MadGraph5_aMC@NLO 5  Alwall:2014hca (), Sherpa Gleisberg:2008ta (), CalcHEP Belyaev:2012qa (), Whizard Kilian:2007gr (); Christensen:2010wz ()), FeynArts Hahn:2000kx () which generates inputs for loop amplitude calculators like FeynCalc Shtabovenko:2016sxi (), or FormCalc Hahn:2010zi (), and others output types supported by FeynRules .

  • SmeftFR provides a dedicated Latex generator, allowing to display vertices and analytical expressions for Feynman rules in clear human readable form, best suited for hand-made calculations.

  • SmeftFR is interfaced to the WCxf format Aebischer:2017ugx () of Wilson coefficients. Numerical values of SMEFT parameters in model files can be read from WCxf JSON-type input produced by other computer packages written for SMEFT. Alternatively, SmeftFR can translate FeynRules model files to the WCxf format.

  • Further package options allow to treat neutrino fields as massless Weyl or (in the case of non-vanishing dimension-5 operator) massive Majorana fermions, to correct signs in 4-fermion interactions not yet fully supported by FeynRules and to perform some additional operations as described later in this manual.

Feynman rules derived in ref. Dedes:2017zog () using the SmeftFR package have been used successfully in many articles including refs. Dedes:2018seb (); Dedes:2019bew (); Dawson:2018pyl (); Vryonidou:2018eyv (); Hesari:2018ssq (); Dawson:2018liq (); Dawson:2018jlg (); Baglio:2018bkm (); Dawson:2018dxp (); Silvestrini:2018dos (); Neumann:2019kvk () and have passed certain non-trivial tests, such as gauge-fixing parameter independence of the -matrix elements, validity of Ward identities, cancellation of infinities in loop calculations, etc.

We note here in passing, that there is a growing number of publicly available codes performing computations related to SMEFT. These include, Wilson Aebischer:2018bkb (), DSixTools Celis:2017hod (), MatchingTools Criado:2017khh (), which are codes for running and matching Wilson coefficients, SMEFTsim Brivio:2017btx (), a package for calculating tree level observables, CoDEx Bakshi:2018ics () or a version of SARAH code Gabelmann:2018axh (), that calculate Wilson Coefficients after the decoupling of a more fundamental theory, and finally, DirectDM Bishara:2017nnn (), a code for dark matter EFT. To a degree, these codes (especially the ones supporting WCxf format) can be used in conjunction with SmeftFR. For example, some of them can provide the numerical input for Wilson coefficients of higher dimensional operators at scale , while others, the running of these coefficients from that scale down to the EW one. Alternatively, Feynman rules evaluated by SmeftFR can be used with Monte Carlo generators to test the predictions of other packages.

The paper is organised as follows. After this Introduction, in Sec. B we define the notation and conventions, listing for reference the operator set in Warsaw basis and the formulae for transition to the mass basis. In Sec. C, we present the structure of the code, installation procedure and available functions. Section D, contains examples of programs generating the Feynman rules in various formats. We conclude in Sec. E.

Appendix B SMEFT Lagrangian in Warsaw and mass basis

The classification of higher order operators in SMEFT is done in terms of fields in electroweak basis, before the Spontaneous Symmetry Breaking. SmeftFR uses the so-called “Warsaw basis” Grzadkowski:2010es () as a starting point to calculate physical states in SMEFT and their interactions. For easier reference we copy here from ref. Grzadkowski:2010es () Tables 1 and 2 containing the full collection of operators in Warsaw basis.333We do not list here all details of conventions used — they are identical to these listed in refs. Grzadkowski:2010es (); Dedes:2017zog (). In addition, we include the single lepton flavour violating dimension-5 operator:


where is the charge conjugation matrix.

Table 1: Dimension-6 operators other than the four-fermion ones (from ref. Grzadkowski:2010es ()). For brevity we suppress fermion chiral indices .
and -violating
Table 2: Four-fermion operators (from ref. Grzadkowski:2010es ()). Fermion chiral indices are suppressed.

The SMEFT Lagrangian is the sum of the dimension-4 terms and operators defined in Tables 1 and 2:


Physical fields in SMEFT are obtained after the SSB. We follow here the systematic presentation (and notation) of ref. Dedes:2017zog (). In the gauge and Higgs sectors physical and Goldstone fields () are related to initial (Warsaw basis) fields () by the normalisation constants:


In addition, Feynman rules for physical fields are expressed in terms of effective gauge couplings, chosen to preserve the natural form of covariant derivative:


In SMEFT and gauge field and gauge normalisation constants are equal, , . In addition and . Complete expressions for the field normalisation constants, , for the corrected Higgs field VEV, , and for the gauge and Higgs boson masses, , and , including corrections from the full set of dimension-5 and -6 operators, are given in ref. Dedes:2017zog (). SmeftFR recalculates these corrections by taking into account only the subset of non-vanishing SMEFT Wilson coefficients chosen by the user, as described in Sec. C.

The basis in the fermion sector is not fixed by the structure of gauge interactions and allows for unitary rotation freedom in the flavour space:


with and . We choose the rotations such that eigenstates correspond to real and non-negative eigenvalues of fermion mass matrices:


The fermion flavour rotations can be adsorbed in redefinitions of Wilson coefficients, as a trace leaving CKM and PMNS matrices (denoted in SmeftFR as and respectively) multiplying them. It is important to note a departure from ref. Dedes:2017zog () in the definition of these matrices, assumed here to be unitary products of the form444In ref. Dedes:2017zog (), these matrices are defined as non-unitary ones, and . It is however more natural and economical to use the unitary definitions of eq. (B.7) instead. The conventions for and of ref. Dedes:2017zog () can be still enforced in SmeftFR by editing the file code/smeft_variables.m and changing there the value of control variable SMEFT$Unitary=0 to SMEFT$Unitary=1.:


In practice, comparing to results of ref. Dedes:2017zog () the altered definition of eq. (B.7) affects only four vertices, namely couplings of boson and charged Goldstone to fermions: --, -- and their Hermitian conjugates.

The complete list of redefinitions of flavour-dependent Wilson coefficients is given in Table 4 of ref. Dedes:2017zog (). After rotations, they are defined in so called “Warsaw mass” basis (as also described in WCxf standard Aebischer:2017ugx ()). SmeftFR assumes that the numerical values of Wilson coefficients are given in this particular basis.

In summary, Feynman rules generated by the SmeftFR package describe interactions of SMEFT physical (mass eigenstates) fields, with numerical values of Wilson coefficients defined in the same (“Warsaw mass”) basis.

It is also important to stress that in the general case of lepton number flavour violation, with non-vanishing Weinberg operator of eq. (B.1), neutrinos are massive Majorana spinors, whereas under the assumption of -conservation they can be regarded as massless Weyl spinors. As described in the next Section, SmeftFR is capable to generate Feynman rules for neutrino interactions in both cases, depending on the choice of initial options. One should remember that treating neutrinos as Majorana particles requires special set of rules for propagators, vertices and diagram combinatorics. We follow here the treatment of refs. Denner:1992vza (); Denner:1992me (); Dedes:2017zog (); Paraskevas:2018mks ().

Appendix C Deriving SMEFT Feynman rules with SmeftFR package

c.1 Installation

SmeftFR package works using the FeynRules system, so both need to be properly installed first. A recent version and installation instructions for the FeynRules package can be downloaded from the address:

SmeftFR has been tested with FeynRules version 2.3.

Standard FeynRules installation assumes that the new models description is put into Model subdirectory of its main tree. We follow this convention, so that SmeftFR archive should be unpacked into


catalogue, where N_NN denotes the package version (currently version 2.00). After installation, Models/SMEFT_N_NN contains the following files and subdirectories listed in Table 3.


[backgroundcolor=lightgray] SmeftFR-init.nb smeft_fr_init.m Notebook and equivalent text script generating SMEFT Lagrangian in mass basis and Feynman rules in Mathematica format. SmeftFR-interfaces.nb smeft_fr_interfaces.m Notebook and text script with routines for exporting Feynman rules in various formats: WCxf, Latex, UFO and FeynArts. SmeftFR.pdf package manual in pdf format. code subdirectory with package code and utilities. lagrangian subdirectory with expressions for the SM Lagrangian and dimension-5 and 6 operators coded in FeynRules format. definitions subdirectory with templates of SMEFT “model files” and example of numerical input for Wilson coefficients in WCxf format. output subdirectory with dynamically generated “parameter files” and output for Feynman rules in various formats, by default Mathematica, Latex, UFO and FeynArts are generated. full_rxi_results subdirectory with ready-to-use set of Feynman rules including all SMEFT operator classes, calculated in -gauges. full_unitary_results subdirectory with ready-to-use set of Feynman rules including all SMEFT operator classes, calculated in unitary gauge.

Table 3: Files and directories included in SmeftFR v2.00 package.

Before running the package, one needs to set properly the main FeynRules installation directory, defining the $FeynRulesPath variable at the beginning of smeft_init.m and smeft_outputs.m files. For non-standard installations (not advised!), also the variable SMEFT$Path has to be updated accordingly.

c.2 Code structure

The most general version of SMEFT, including all possible flavour violating couplings, is very complicated. Symbolic operations on the full SMEFT Lagrangian, including complete set of dimension 5 and 6 operators and with numerical values of all Wilson coefficients assigned are time consuming and can take hours or even days on a standard personal computer. For most of the physical applications it is sufficient to derive interactions only for a subset of operators.555Eventually, operators must be selected with care as in general they may mix under renormalisation Jenkins:2013zja (); Jenkins:2013wua (); Alonso:2013hga ().

Figure 1: Structure of the SmeftFR code.

To speed up the calculations, SmeftFR can evaluate Feynman rules for a chosen subset of operators only, generating dynamically the proper FeynRules “model files”. The calculations are divided in two stages, as illustrated in flowchart of Fig. 1. First, the SMEFT Lagrangian is initialised in Warsaw basis and transformed to mass eigenstates basis analytically, truncating all terms of the order and higher. To speed up the program, at this stage all flavour parameters are considered to be tensors with indices without assigned numerical values (they are “Internal” parameters in FeynRules notation). The resulting mass basis Lagrangian and Feynman rules written in Mathematica format are stored on disk. In the second stage, the previously generated output can be used together with new “model file”, this time containing numerical values of (“External”) parameters, to export mass basis SMEFT interactions in various commonly used external formats such as Latex, WCxf and standard FeynRules supported interfaces – UFO, FeynArts and others.

c.3 Model initialisation


[backgroundcolor=lightgray] Option Allowed values Description Operators default: all operators List with subset of SMEFT operators included in calculations. Gauge Unitary, Rxi Choice of gauge fixing conditions WCXFInitFile ”” Name of file with numerical values of Wilson coefficients in the WCxf format. If this option is not set or the file does not exist, all Wilson coefficients are set to . MajoranaNeutrino False, True Neutrino fields are treated as Majorana spinors if is included in the operator list, massless Weyl spinors otherwise. Setting this option to True allows one to use Majorana spinors also in the massless case. Correct4Fermion False, True Corrects relative sign of some 4-fermion interactions, fixing results produced by FeynRules . WBFirstLetter ”c” Customizable first letter of Wilson coefficient names in Warsaw basis (default ). Can be used to avoid convention clashes when comparing with other SMEFT bases. MBFirstLetter ”C” Customizable first letter of Wilson coefficient names in mass basis (default ).

Table 4: The allowed options of SMEFTInitializeModel routine. If an option is not specified, the default value (marked above in boldface) is assumed.

In the first step, the relevant FeynRules model files must be generated. This is done by calling the function:

SMEFTInitializeModel[Option1 Value1, Option2 Value2, ]

with the allowed options listed in Table 4.

Names of operators used in SmeftFR are derived from the subscript indices of operators listed in Tables 1 and 2, with obvious transcriptions of “tilde” symbol and Greek letters to Latin alphabet. By default, all possible 59+1+4 SMEFT () operator classes are included in calculations, which is equivalent to setting:

Operators { "G", "Gtilde", "W", "Wtilde", "phi", "phiBox", "phiD", "phiW", "phiB", "phiWB", "phiWtilde", "phiBtilde", "phiWtildeB", "phiGtilde", "phiG", "ephi", "dphi", "uphi", "eW", "eB", "uG", "uW", "uB", "dG", "dW", "dB", "phil1", "phil3", "phie", "phiq1", "phiq3", "phiu", "phid", "phiud", "ll", "qq1", "qq3", "lq1", "lq3", "ee", "uu", "dd", "eu", "ed", "ud1", "ud8", "le", "lu", "ld", "qe", "qu1", "qu8", "qd1", "qd8", "ledq", "quqd1", "quqd8", "lequ1", "lequ3", "vv", "duq", "qqu", "qqq", "duu" }

To speed up the derivation of Feynman rules and to get more compact expressions, the user can restrict the list above to any preferred subset of operators.

SmeftFR is fully integrated with the WCxf standard. Apart from numerically editing Wilson coefficients in FeynRules model files, reading them from the WCxf input is the only way of automatic initialisation of their numerical values. Such an input format is exchangeable between a larger set of SMEFT-related public packages Aebischer:2017ugx () and may help to compare their results.

An additional advantage of using WCxf input format comes in the flavour sector of the theory. Here, Wilson coefficients are in general tensors with flavour indices, in many cases symmetric under various permutations. WCxf input requires initialisation of only the minimal set of flavour dependent Wilson coefficients, those which could be derived by permutations are also automatically properly set.666We would like to thank D. Straub for supplying us with a code for symmetrisation of flavour-dependent Wilson coefficients.

Further comments concern MajoranaNeutrino and Correct4Fermion options. They are used to modify the analytical expressions only for the Feynman rules, not at the level of the mass basis Lagrangian from which the rules are derived. This is because some FeynRules interfaces, like UFO, intentionally leave the relative sign of 4-fermion interactions uncorrected777B. Fuks, private communication., as it is later changed by Monte Carlo generators like MadGraph5. Correcting the sign before generating UFO output would therefore lead to wrong final result. Similarly, treatment of neutrinos as Majorana fields could not be compatible with hard coded quantum number definitions in various packages. On the other hand, in the manual or symbolic computations it is convenient to have from the start the correct form of Feynman rules, as done by SmeftFR when both options are set to their default values.

SMEFTInitializeModel routine does not require prior loading of FeynRules package. After execution, it creates in the output subdirectory three model files listed in Table 5. Parameter files generated by SMEFTInitializeModel contain also definitions of SM parameters, copied from templates definitions/ and definitions/ The values of SM parameters can be best updated directly by editing the template files and the header of the code/smeft_variables.m file, otherwise they will be overwritten in each rerun of SmeftFR initialisation routines.


[backgroundcolor=lightgray] smeft_par_WB.par SMEFT parameter file with Wilson coefficients in Warsaw basis (defined as “Internal”, with no numerical values assigned). smeft_par_MB.par SMEFT parameter file with Wilson coefficients in mass basis (defined as “External”, numerical values imported from the input file in WCxf format). smeft_par_MB_real.par as smeft_par_MB.par, but only real values of Wilson coefficients given in WCxf file are included in SMEFT parameter file, as required by many event generators.

Table 5: Model files generated by the SMEFTInitializeModel routine.

As mentioned above, in all analytical calculations performed by SmeftFR , terms suppressed by or higher powers are always neglected. Therefore, the resulting Feynman rules can be consistently used to calculate physical observables, symbolically or numerically by Monte Carlo generators, up to the linear order in dimension-6 operators. This information is encoded in FeynRules SMEFT model files by assigning the “interaction order” parameter NP=1 to each Wilson coefficients and setting in and the limits:

M$InteractionOrderLimit = {

If one wishes to include (e.g. for testing purposes) terms quadratic in Wilson coefficients in the automatic cross section calculations performed by matrix element and Monte Carlo generators, one should edit both model files and increase the allowed order of NP contributions by changing the definition of M$InteractionOrderLimit, setting there {NP,2}.

An additional remark concerns the value of neutrino masses. In mass basis, the neutrino masses are equal to   [see eq. (B.6)]. Thus, the numerical values of coefficients should be real and negative. If positive or complex values of are given in the WCxf input file, then the SMEFTInitializeModel routine evaluates neutrino masses as .

c.4 Calculation of mass basis Lagrangian and Feynman rules

By loading the FeynRules model files the derivation of SMEFT Lagrangian in mass basis is performed by calling the following sequence of routines:

SMEFTLoadModel[ ] Loads output/smeft_par_WB.par model file and calculates SMEFT Lagrangian in Warsaw basis for chosen subset of operators
SMEFTFindMassBasis[ ] Finds field bilinears and analytical transformations diagonalizing mass matrices up to
SMEFTFeynmanRules[ ] Evaluates analytically SMEFT Lagrangian and Feynman rules in the mass basis, again truncating consistently all terms higher then .

The calculation time may vary considerably depending on the choice of operator (sub-)set and gauge fixing conditions chosen. For the full list of SMEFT and operators and in -gauges, one can expect CPU time necessary to evaluate all Feynman rules, from about an hour to many hours on a typical personal computer, depending on its speed capabilities.

One should note that when neutrinos are treated as Majorana particles, (as necessary in case of non-vanishing Wilson coefficient of Weinberg operator), their interactions involve lepton number non-conservation. When FeynRules is dealing with them it produces warnings of the form:

QN::NonConserv: Warning: non quantum number conserving vertex encountered!
Quantum number LeptonNumber not conserved in vertex

Obviously such warnings should be ignored.

Evaluation of Feynman rules for vertices involving more than two fermions is not fully implemented yet in FeynRules. To our experience, apart from the issue of relative sign of four fermion diagrams mentioned earlier, particularly problematic was the correct automatic derivation of quartic interactions with four Majorana neutrinos and similar vertices which violate - and -quantum numbers. For these special cases, SmeftFR overwrites the FeynRules result with manually calculated formulae encoded in Mathematica format.

Another remark concerns the hermicity property of the SMEFT Lagrangian. For some types of interactions, e.g. four-fermion vertices involving two-quarks and two-leptons, the function CheckHermicity provided by FeynRules reports non-Hermitian terms in the Lagrangian. However, such terms are actually Hermitian if permutation symmetries of indices of relevant Wilson coefficients are taken into account. Such symmetries are automatically imposed if numerical values of Wilson coefficients are initialized with the use of SMEFTInitializeMB or SMEFTToWCXF routines (see Sections C.5 and C.5.1).

Results of the calculations are collected in file output/smeft_feynman_rules.m. The Feynman rules and pieces of the mass basis Lagrangian for various classes of interactions are stored in the variables with self-explanatory names listed in Table 6.


[backgroundcolor=lightgray] LeptonGaugeVertices QuarkGaugeVertices LeptonHiggsGaugeVertices QuarkHiggsGaugeVertices QuarkGluonVertices GaugeSelfVertices GaugeHiggsVertices GluonSelfVertices GluonHiggsVertices GhostVertices FourLeptonVertices FourQuarkVertices TwoQuarkTwoLeptonVertices DeltaLTwoVertices BLViolatingVertices

Table 6: Names of variables defined in the file output/smeft_feynman_rules.m containing expressions for Feynman rules. Parts of mass basis Lagrangian are stored in equivalent set of variables, with “Vertices” replaced by “Lagrangian” in part of their names (i.e. LeptonGaugeVertices LeptonGaugeLagrangian, etc.).

File output/smeft_feynman_rules.m contains also expressions for the normalisation factors relating Higgs and gauge fields and couplings in the Warsaw and mass basis. Namely, variables Hnorm, G0norm, GPnorm, AZnorm[i,j], Wnorm, Gnorm, correspond to, respectively, , , , and in (B.3). In addition, formulae for tree level corrections to SM mass parameters and Yukawa couplings are stored in variables SMEFT$vev, SMEFT$MH2, SMEFT$MW2, SMEFT$MZ2, SMEFT$YL[i,j], SMEFT$YD[i,j] and SMEFT$YU[i,j].

It is important to note that although at this point the Feynman rules for the mass basis Lagrangian are already calculated, definitions for fields and parameters used to initialise the SMEFT model in FeynRules are still given in Warsaw basis. To avoid inconsistencies, it is strongly advised to quit the current Mathematica kernel and start new one reloading the mass basis Lagrangian together with the compatible model files with fields defined also in mass basis, as described next in Sec. C.5. All further calculations should be performed within this new kernel.

c.5 Interfaces

SmeftFR output in some of portable formats must be generated from the SMEFT Lagrangian transformed to mass basis, with all numerical values of parameters initialised. As FeynRules does not allow for two different model files loaded within a single Mathematica session, one needs to quit the kernel used to run routines necessary to obtain Feynman rules and, as described in previous Section, start a new Mathematica kernel. Within it, the user must reload FeynRules and SmeftFR packages and call the following routine:

SMEFTInitializeMB[ Options ]

Allowed options are given in Table 7. After call to SMEFTInitializeMB, mass basis model files are read and the mass basis Lagrangian is stored in a global variable named SMEFTMBLagrangian for further use by interface routines.


[backgroundcolor=lightgray] Option Allowed values Description RealParameters False, True Default initialisation is done using output/smeft_par_MB.par file, which may contain complex parameters, not compatible with matrix element generators. Setting RealParameters True forces loading of output/smeft_par_MB_real.par file where imaginary parts of all Wilson coefficients are set to . Imaginary phases of CKM and PMNS matrices, if present, are also set to zero after loading this file. Include4Fermion False, True 4-fermion vertices are not fully implemented in FeynRules and by default not included in SMEFT interactions. Set this option to True to include such terms.

Table 7: Options of SMEFTInitializeMB routine, with default values marked in boldface.

c.5.1 WCxf input and output

Translation between FeynRules model files and WCxf format is done by the functions SMEFTToWCXF and WCXFToSMEFT. They can be used standalone and do not require loading FeynRules and calling first SMEFTInitializeMB routine to work properly.

Exporting numerical values of Wilson coefficients of operators in the WCxf format is done by the function:

SMEFTToWCXF[ SMEFT_Parameter_File, WCXF_File ]

where the arguments SMEFT_Parameter_File, WCXF_File define the input model parameter file in the FeynRules format and the output file in the WCxf JSON format, respectively. The created JSON file can be used to transfer numerical values of Wilson coefficients to other codes supporting WCxf format. Note that in general, the FeynRules model files may contain different classes of parameters, according to the Value property defined to be a number (real or complex), a formula or even not defined at all. Only the Wilson coefficients with Value defined to be a number are transferred to the output file in WCxf format.

Conversely, files in WCxf format can be translated to FeynRules parameter files using:

WCXFToSMEFT[ WCXF_File, SMEFT_Parameter_File Options]

with the allowed options defined in Table 8.


[backgroundcolor=lightgray] Option Allowed values Description Operators default: all operators List with subset of Wilson coefficients to be included in the SMEFT parameter file RealParameters False, True Decides if only real values of Wilson coefficients given in WCxf file are included in SMEFT parameter file OverwriteTarget False, True If set to True, target file is overwritten without warning Silent False, True Debug option, suppresses screen comments FirstLetter ”C” Customizable first letter of Wilson coefficient names in mass basis (default ).

Table 8: Options of WCXFToSMEFT routine. Default values are marked in boldface.

c.5.2 Latex output

SmeftFR provides a dedicated Latex generator (not using the generic FeynRules Latex export routine). Its output has the following structure:

  • For each interaction vertex, the diagram is drawn, using the axodraw style Vermaseren:1994je (). Expressions for Feynman rules are displayed next to corresponding diagrams.

  • In analytical expressions, all terms multiplying a given Wilson coefficient are collected together and simplified.

  • Long analytical expressions are automatically broken into many lines using breakn style (this does not always work perfectly but the printout is sufficiently readable).

Latex output is generated by the function:

SMEFTToLatex[ Options ]

with the allowed options listed in Table 9. The function SMEFTToLatex assumes that the variables listed in Table 6 are initialised. It can be called either after executing relevant commands, described in Sec. C.4, or after reloading the mass basis Lagrangian with the SMEFTInitializeMB routine, see Sec. C.5.


[backgroundcolor=lightgray] Option name Allowed values Description FullDocument False, True By default a complete document is generated, with all headers necessary for compilation. If set to False, headers are stripped off and the output file can, without modifications, be included into other Latex documents. ScreenOutput False, True For debugging purposes, if set to True the Latex output is printed also to the screen.

Table 9: Options of SMEFTToLatex routine, with default values marked in boldface.

Latex output is stored in output/latex subdirectory, split into smaller files each containing one primary vertex. The main file is named smeft_feynman_rules.tex. The style files necessary to compile Latex output are supplied with the SmeftFR distribution.

Note that the correct compilation of documents using “axodraw.sty” style requires creating intermediate Postscript file. Programs like pdflatex producing directly PDF output will not work properly. One should instead use e.g.:

latex smeft_feynman_rules.tex

dvips smeft_feynman_rules.dvi


The smeft_feynman_rules.tex does not contain analytical expressions for five and six gluon vertices. Such formulae are very long (multiple pages, hard to even compile properly) and not useful for hand-made calculations. If such vertices are needed, they should be rather directly exported in some other formats as described in the next subsection.

Other details not printed in the Latex output, such as, the form of field propagators, conventions for parameters and momenta flow in vertices (always incoming), manipulation of four-fermion vertices with Majorana fermions etc, are explained thoroughly in the Appendices A1–A3 of ref. Dedes:2017zog ().

c.5.3 Standard FeynRules interfaces

After calling the initialisation routine SMEFTInitializeMB, the output to UFO, FeynArts and other formats supported by FeynRules interfaces, can be generated using FeynRules commands and options from the mass basis Lagrangian stored in the SMEFTMBLagrangian variable. For instance, one could call:

WriteUFO[ SMEFTMBLagrangian, Output ”output/UFO”, AddDecays False, …]

WriteFeynArtsOutput[ SMEFTMBLagrangian, Output ”output/FeynArts”, …]

and similarly for other formats.

It is important to note that FeynRules interfaces like UFO or FeynArts generate their output starting from the level of SMEFT mass basis Lagrangian. Thus, options of SMEFTInitializeModel function like MajoranaNeutrino and Correct4Fermion (see Table 4) have no effect on output generated by the interface routines. As explained in Section C.3 they affect only the expressions for Feynman rules.

If four-fermion vertices are included in SMEFT Lagrangian, UFO produces warning messages of the form:

Warning: Multi-Fermion operators are not yet fully supported!

Therefore, the output for four-fermion interactions in UFO or other formats must be treated with care and limited trust — performing appropriate checks are left to users’ responsibility. To our experience, implementation in FeynRules of baryon and lepton number violating four-fermion interactions, with charge conjugation matrix appearing explicitly in vertices, is even more problematic. Thus, for safety in current SmeftFR version (2.00) such terms are never included in SMEFTMBLagrangian variable, eventually they can be passed to interface routines separately via the BLViolatingLagrangian variable.

Exporting to UFO or other formats can take a long time, even several hours for -gauges and complete SMEFT Lagrangian with fully general flavour structure and all numerical values of parameters initialised.

Finally, it is important to stress here that our Feynman rules communicate properly with MadGraph5 and FeynArts. In particular, we ran without errors test simulations in MadGraph5 using UFO model files produced by SmeftFR v2. Similar tests were performed with amplitude generation for sample processes using SmeftFR v2 FeynArts output.

Appendix D Sample programs

After setting the variable $FeynRulesPath to correct value, in order to evaluate mass basis SMEFT Lagrangian and analytical form of Feynman rules one can use the following sequence of commands:

SMEFT$MajorVersion = "2";
SMEFT$MinorVersion = "00";
SMEFT$Path = FileNameJoin[{$FeynRulesPath, "Models", "SMEFT_" <>
                                    SMEFT$MajorVersion <> "_" <> SMEFT$MinorVersion}];

Get[ FileNameJoin[$FeynRulesPath,"FeynRules.m"] ];
Get[ FileNameJoin[ SMEFT$Path, "code", "smeft_package.m"] ];

OpList = {
"G", "Gtilde", "W", "Wtilde", "phi", "phiBox", "phiD", "phiW", "phiB", "phiWB", "phiWtilde", "phiBtilde", "phiWtildeB", "phiGtilde", "phiG", "ephi", "dphi", "uphi", "eW", "eB", "uG", "uW", "uB", "dG", "dW", "dB", "phil1", "phil3", "phie", "phiq1", "phiq3", "phiu", "phid", "phiud", "ll", "qq1", "qq3", "lq1", "lq3", "ee", "uu", "dd", "eu", "ed", "ud1", "ud8", "le", "lu", "ld", "qe", "qu1", "qu8", "qd1", "qd8", "ledq", "quqd1", "quqd8", "lequ1", "lequ3", "vv", "duq", "qqu", "qqq", "duu" };

SMEFTInitializeModel[ Operators -> OpList, Gauge -> Rxi, WCXFInitFile -> "wcxf_input_file_with_path.json" ];

SMEFTLoadModel[ ];
SMEFTFindMassBasis[ ];
SMEFTFeynmanRules[ ];

or alternatively rerun the supplied programs: the notebook SmeftFR-init.nb or the text script smeft_fr_init.m.

As described before, Latex, WCxf, UFO and FeynArts formats can be exported after rerunning first SmeftFR-init.nb or equivalent set of commands generating file smeft_feynman_rules.m containing the expressions for the mass basis Lagrangian. Then, the user needs to start a new Mathematica kernel and rerun the notebook file SmeftFR-interfaces.nb or the script smeft_fr_interfaces.m. Alternatively, one can manually type the commands, if necessary changing some of their options as described in previous sections:

Get[ FileNameJoin[{$FeynRulesPath,"FeynRules.m"}] ];
Get[ FileNameJoin[{SMEFT$Path, "code", "smeft_package.m"}] ];

SMEFTInitializeMB[ ];

SMEFTToWCXF[ FileNameJoin[{SMEFT$Path, "output", ""}],
                        FileNameJoin[{SMEFT$Path, "output", "smeft_wcxf_MB.json"}] ];
SMEFToLatex[ ];

WriteUFO[ SMEFTMBLagrangian, ];
WriteFeynArtsOutput[ SMEFTMBLagrangian, ];

Feynman rules calculated for the full SMEFT operator set and two possible gauge choices (unitary and ), including also outputs in Latex, UFO and FeynArts formats, are stored in the subdirectories full_rxi_results and full_unitary_results. They can be directly used, without rerunning the SmeftFR package. However, such a general output with all operators and numerical values for all 2499 SMEFT parameters initialised, is huge and importing it directly to other SMEFT codes may cause them to work very slowly.

Appendix E Summary

The proliferation of the primitive vertices in SMEFT, even in non-redundant basis of effective field operators, suggests a certain kind of computational aid. During the last few years, such an effort has been intensive between high energy physicists. Aiming at this direction, we present here a code, named SmeftFR, that generates Feynman rules in SMEFT with operators given in “Warsaw basis” Grzadkowski:2010es () without restricting to specific flavour structure, -, - nor -number conservation. We have exploited the quantisation steps of SMEFT in unitary and -gauges following a procedure described in ref. Dedes:2017zog (). SmeftFR has been written on top of the Mathematica package FeynRules.

In this article, we describe how to use SmeftFR package in order to produce Feynman rules for a selection of operators relevant to observable (or observables) under study, with further options to handle massive Majorana or massless Weyl neutrinos. The output of the package can be printed in Latex or exported in various formats supported by FeynRules, such as UFO, FeynArts, etc. Input parameters for Wilson coefficients used in SmeftFR can communicate with WCxf format for further numerical handling. Feynman rules are given in SMEFT mass basis and in both unitary or linear -gauges for further computational checks.

The current version of SmeftFR code and its manual can be downloaded from the address

We believe that SmeftFR is bridging a gap between the effective SM Lagrangian all the way down to amplitude calculations required by the experimental analyses.


The work of JR was supported in part by Polish National Science Centre under research grants DEC-2015/19/B/ST2/02848, and DEC-2015/18/M/ST2/00054. MP acknowledges financial support by the Polish National Science Center under the Beethoven series grant number DEC-2016/23/G/ST2/04301. KS would like to thank the Greek State Scholarships Foundation (IKY) for full financial support through the Operational Programme “Human Resources Development, Education and Lifelong Learning, 2014-2020”. LT is supported by the Onassis Foundation — Scholarship ID: G ZO 029-1/2018-2019. JR would like to thank University of Ioannina and CERN for the hospitality during his stays there.


Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
Add comment
Loading ...
This is a comment super asjknd jkasnjk adsnkj
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test description