SmeftFR – Feynman rules generator for the Standard Model Effective Field Theory
Abstract
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 humanreadable form. SmeftFR can be downloaded from the address www.fuw.edu.pl/smeft.
keywords:
Standard Model Effective Field Theory, Feynman rules, unitary and gaugesPROGRAM SUMMARY
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
Classification:
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
60operator set (using Mathematica 11.3 running on a personal
computer)
References
 (1) A. Dedes, W. Materkowska, M. Paraskevas, J. Rosiek and K. Suxho, “Feynman rules for the Standard Model Effective Field Theory in Rgauges,” 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 treelevel 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 socalled SM Effective Field Theory (SMEFT) Weinberg:1980wa (); Coleman:1969sm (); Callan:1969sn ()^{1}^{1}1For 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 (nonrenormalisable) 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 nonredundant 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 baryonnumber conserving and 4 baryonnumber violating operators.
In its most general version, SMEFT is a hugely complicated model. Including all possible CP and flavourviolating 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 highenergy 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 baryonnumber conservation.^{2}^{2}2However, 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 gaugefixing 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 handmade 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 JSONtype 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 nonvanishing dimension5 operator) massive Majorana fermions, to correct signs in 4fermion 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 nontrivial tests, such as gaugefixing 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 socalled “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.^{3}^{3}3We 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 dimension5 operator:
(B.1) 
where is the charge conjugation matrix.
and  

and  violating  
The SMEFT Lagrangian is the sum of the dimension4 terms and operators defined in Tables 1 and 2:
(B.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:
(B.3) 
In addition, Feynman rules for physical fields are expressed in terms of effective gauge couplings, chosen to preserve the natural form of covariant derivative:
(B.4) 
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 dimension5 and 6 operators, are given in ref. Dedes:2017zog (). SmeftFR recalculates these corrections by taking into account only the subset of nonvanishing 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:
(B.5) 
with and . We choose the rotations such that eigenstates correspond to real and nonnegative eigenvalues of fermion mass matrices:
(B.6) 
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 form^{4}^{4}4In ref. Dedes:2017zog (), these matrices are defined as nonunitary 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.:
(B.7) 
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 flavourdependent 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 nonvanishing 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:
https://feynrules.irmp.ucl.ac.be
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
Models/SMEFT_N_NN
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.
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 nonstandard 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.^{5}^{5}5Eventually, operators must be selected with care as in general they may mix under renormalisation Jenkins:2013zja (); Jenkins:2013wua (); Alonso:2013hga ().
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
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 SMEFTrelated 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.^{6}^{6}6We would like to thank D. Straub for supplying us with a code for symmetrisation of flavourdependent 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 4fermion interactions uncorrected^{7}^{7}7B. 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/smeft_par_head_WB.fr and definitions/smeft_par_head_MB.fr. 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.
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 dimension6 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 smeft_field_WB.fr and smeft_field_MB.fr the limits:
M$InteractionOrderLimit = { 
{QCD,99}, 
{NP,1}, 
{QED,99} 
} 
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 nonvanishing Wilson coefficient of Weinberg operator), their interactions involve lepton number nonconservation. 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. fourfermion vertices involving twoquarks and twoleptons, the function CheckHermicity provided by FeynRules reports nonHermitian 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 selfexplanatory names listed in Table 6.
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.
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.
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.
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
ps2pdf smeft_feynman_rules.ps
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 handmade 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 fourfermion 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 fourfermion vertices are included in SMEFT Lagrangian, UFO produces warning messages of the form:
Warning: MultiFermion operators are not yet fully supported!
Therefore, the output for fourfermion 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 fourfermion 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 SmeftFRinit.nb or the text script smeft_fr_init.m.
As described before, Latex, WCxf, UFO and FeynArts formats can be exported after rerunning first SmeftFRinit.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 SmeftFRinterfaces.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",
"smeft_par_MB.fr"}],
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 nonredundant 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.
Acknowledgements
The work of JR was supported in part by Polish National Science Centre under research grants DEC2015/19/B/ST2/02848, and DEC2015/18/M/ST2/00054. MP acknowledges financial support by the Polish National Science Center under the Beethoven series grant number DEC2016/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, 20142020”. LT is supported by the Onassis Foundation — Scholarship ID: G ZO 0291/20182019. JR would like to thank University of Ioannina and CERN for the hospitality during his stays there.
References
 (3) S. Weinberg, A Model of Leptons, Phys.Rev.Lett. 19 (1967) 1264–1266. doi:10.1103/PhysRevLett.19.1264.
 (4) S. Glashow, Partial Symmetries of Weak Interactions, Nucl.Phys. 22 (1961) 579–588. doi:10.1016/00295582(61)904692.
 (5) A. SalamIn Proceedings of the Eighth Nobel Symposium, edited by N. Svartholm (Wiley, New York, 1968), p.367.
 (6) S. Weinberg, Effective Gauge Theories, Phys. Lett. B91 (1980) 51–55. doi:10.1016/03702693(80)906607.
 (7) S. R. Coleman, J. Wess, B. Zumino, Structure of phenomenological Lagrangians. 1., Phys. Rev. 177 (1969) 2239–2247. doi:10.1103/PhysRev.177.2239.
 (8) C. G. Callan, Jr., S. R. Coleman, J. Wess, B. Zumino, Structure of phenomenological Lagrangians. 2., Phys. Rev. 177 (1969) 2247–2250. doi:10.1103/PhysRev.177.2247.
 (9) A. V. Manohar, Introduction to Effective Field Theories, in: Les Houches summer school: EFT in Particle Physics and Cosmology Les Houches, Chamonix Valley, France, July 328, 2017, 2018. arXiv:1804.05863.
 (10) W. Buchmuller, D. Wyler, Effective Lagrangian Analysis of New Interactions and Flavor Conservation, Nucl. Phys. B268 (1986) 621–653. doi:10.1016/05503213(86)902622.
 (11) B. Grzadkowski, M. Iskrzynski, M. Misiak, J. Rosiek, DimensionSix Terms in the Standard Model Lagrangian, JHEP 10 (2010) 085. arXiv:1008.4884, doi:10.1007/JHEP10(2010)085.
 (12) A. Dedes, W. Materkowska, M. Paraskevas, J. Rosiek, K. Suxho, Feynman rules for the Standard Model Effective Field Theory in R gauges, JHEP 06 (2017) 143. arXiv:1704.03888, doi:10.1007/JHEP06(2017)143.
 (13) A. Alloul, N. D. Christensen, C. Degrande, C. Duhr, B. Fuks, FeynRules 2.0  A complete toolbox for treelevel phenomenology, Comput. Phys. Commun. 185 (2014) 2250–2300. arXiv:1310.1921, doi:10.1016/j.cpc.2014.04.012.
 (14) C. Degrande, C. Duhr, B. Fuks, D. Grellscheid, O. Mattelaer, T. Reiter, UFO  The Universal FeynRules Output, Comput. Phys. Commun. 183 (2012) 1201–1214. arXiv:1108.2040, doi:10.1016/j.cpc.2012.01.022.
 (15) J. Alwall, R. Frederix, S. Frixione, V. Hirschi, F. Maltoni, O. Mattelaer, H. S. Shao, T. Stelzer, P. Torrielli, M. Zaro, The automated computation of treelevel and nexttoleading order differential cross sections, and their matching to parton shower simulations, JHEP 07 (2014) 079. arXiv:1405.0301, doi:10.1007/JHEP07(2014)079.
 (16) T. Gleisberg, S. Hoeche, F. Krauss, M. Schonherr, S. Schumann, F. Siegert, J. Winter, Event generation with SHERPA 1.1, JHEP 02 (2009) 007. arXiv:0811.4622, doi:10.1088/11266708/2009/02/007.
 (17) A. Belyaev, N. D. Christensen, A. Pukhov, CalcHEP 3.4 for collider physics within and beyond the Standard Model, Comput. Phys. Commun. 184 (2013) 1729–1769. arXiv:1207.6082, doi:10.1016/j.cpc.2013.01.014.
 (18) W. Kilian, T. Ohl, J. Reuter, WHIZARD: Simulating MultiParticle Processes at LHC and ILC, Eur. Phys. J. C71 (2011) 1742. arXiv:0708.4233, doi:10.1140/epjc/s100520111742y.
 (19) N. D. Christensen, C. Duhr, B. Fuks, J. Reuter, C. Speckner, Introducing an interface between WHIZARD and FeynRules, Eur. Phys. J. C72 (2012) 1990. arXiv:1010.3251, doi:10.1140/epjc/s1005201219905.
 (20) T. Hahn, Generating Feynman diagrams and amplitudes with FeynArts 3, Comput. Phys. Commun. 140 (2001) 418–431. arXiv:hepph/0012260, doi:10.1016/S00104655(01)002909.
 (21) V. Shtabovenko, R. Mertig, F. Orellana, New Developments in FeynCalc 9.0, Comput. Phys. Commun. 207 (2016) 432–444. arXiv:1601.01167, doi:10.1016/j.cpc.2016.06.008.
 (22) T. Hahn, Feynman Diagram Calculations with FeynArts, FormCalc, and LoopTools, PoS ACAT2010 (2010) 078. arXiv:1006.2231, doi:10.22323/1.093.0078.
 (23) J. Aebischer, et al., WCxf: an exchange format for Wilson coefficients beyond the Standard Model, Comput. Phys. Commun. 232 (2018) 71–83. arXiv:1712.05298, doi:10.1016/j.cpc.2018.05.022.
 (24) A. Dedes, M. Paraskevas, J. Rosiek, K. Suxho, L. Trifyllis, The decay in the StandardModel Effective Field Theory, JHEP 08 (2018) 103. arXiv:1805.00302, doi:10.1007/JHEP08(2018)103.
 (25) A. Dedes, K. Suxho, L. Trifyllis, The decay in the StandardModel Effective Field TheoryarXiv:1903.12046.
 (26) S. Dawson, P. P. Giardino, Higgs decays to and in the standard model effective field theory: An NLO analysis, Phys. Rev. D97 (9) (2018) 093003. arXiv:1801.01136, doi:10.1103/PhysRevD.97.093003.
 (27) E. Vryonidou, C. Zhang, Dimensionsix electroweak toploop effects in Higgs production and decay, JHEP 08 (2018) 036. arXiv:1804.09766, doi:10.1007/JHEP08(2018)036.
 (28) H. Hesari, H. Khanpour, M. Mohammadi Najafabadi, Study of Higgs Effective Couplings at ElectronProton Colliders, Phys. Rev. D97 (9) (2018) 095041. arXiv:1805.04697, doi:10.1103/PhysRevD.97.095041.
 (29) S. Dawson, P. P. Giardino, Electroweak corrections to Higgs boson decays to and in standard model EFT, Phys. Rev. D98 (9) (2018) 095005. arXiv:1807.11504, doi:10.1103/PhysRevD.98.095005.
 (30) S. Dawson, A. Ismail, Standard model EFT corrections to Z boson decays, Phys. Rev. D98 (9) (2018) 093003. arXiv:1808.05948, doi:10.1103/PhysRevD.98.093003.
 (31) J. Baglio, S. Dawson, I. M. Lewis, NLO Effects in EFT Fits to Production at the LHC, Phys. Rev. D99 (3) (2019) 035029. arXiv:1812.00214, doi:10.1103/PhysRevD.99.035029.
 (32) S. Dawson, P. P. Giardino, A. Ismail, SMEFT and the DrellYan Process at High EnergyarXiv:1811.12260.
 (33) L. Silvestrini, M. Valli, Modelindependent Bounds on the Standard Model Effective Theory from Flavour PhysicsarXiv:1812.10913.
 (34) T. Neumann, Z. E. Sullivan, Offshell singletopquark production in the Standard Model Effective Field TheoryarXiv:1903.11023.
 (35) J. Aebischer, J. Kumar, D. M. Straub, Wilson: a Python package for the running and matching of Wilson coefficients above and below the electroweak scale, Eur. Phys. J. C78 (12) (2018) 1026. arXiv:1804.05033, doi:10.1140/epjc/s1005201864927.
 (36) A. Celis, J. FuentesMartin, A. Vicente, J. Virto, DsixTools: The Standard Model Effective Field Theory Toolkit, Eur. Phys. J. C77 (6) (2017) 405. arXiv:1704.04504, doi:10.1140/epjc/s1005201749676.
 (37) J. C. Criado, MatchingTools: a Python library for symbolic effective field theory calculations, Comput. Phys. Commun. 227 (2018) 42–50. arXiv:1710.06445, doi:10.1016/j.cpc.2018.02.016.
 (38) I. Brivio, Y. Jiang, M. Trott, The SMEFTsim package, theory and tools, JHEP 12 (2017) 070. arXiv:1709.06492.
 (39) S. Das Bakshi, J. Chakrabortty, S. K. Patra, CoDEx: Wilson coefficient calculator connecting SMEFT to UV theory, Eur. Phys. J. C79 (1) (2019) 21. arXiv:1808.04403, doi:10.1140/epjc/s1005201864442.
 (40) M. Gabelmann, M. MÃ¼hlleitner, F. Staub, Automatised matching between two scalar sectors at the oneloop level, Eur. Phys. J. C79 (2) (2019) 163. arXiv:1810.12326, doi:10.1140/epjc/s1005201965705.
 (41) F. Bishara, J. Brod, B. Grinstein, J. Zupan, DirectDM: a tool for dark matter direct detectionarXiv:1708.02678.
 (42) A. Denner, H. Eck, O. Hahn, J. Kublbeck, Feynman rules for fermion number violating interactions, Nucl. Phys. B387 (1992) 467–481. doi:10.1016/05503213(92)90169C.
 (43) A. Denner, H. Eck, O. Hahn, J. Kublbeck, Compact Feynman rules for Majorana fermions, Phys. Lett. B291 (1992) 278–280. doi:10.1016/03702693(92)91045B.
 (44) M. Paraskevas, Dirac and Majorana Feynman Rules with fourfermionsarXiv:1802.02657.
 (45) E. E. Jenkins, A. V. Manohar, M. Trott, Renormalization Group Evolution of the Standard Model Dimension Six Operators I: Formalism and lambda Dependence, JHEP 10 (2013) 087. arXiv:1308.2627, doi:10.1007/JHEP10(2013)087.
 (46) E. E. Jenkins, A. V. Manohar, M. Trott, Renormalization Group Evolution of the Standard Model Dimension Six Operators II: Yukawa Dependence, JHEP 01 (2014) 035. arXiv:1310.4838, doi:10.1007/JHEP01(2014)035.
 (47) R. Alonso, E. E. Jenkins, A. V. Manohar, M. Trott, Renormalization Group Evolution of the Standard Model Dimension Six Operators III: Gauge Coupling Dependence and Phenomenology, JHEP 04 (2014) 159. arXiv:1312.2014, doi:10.1007/JHEP04(2014)159.
 (48) J. A. M. Vermaseren, Axodraw, Comput. Phys. Commun. 83 (1994) 45–58. doi:10.1016/00104655(94)900345.