UFO 2.0: the ‘Universal Feynman Output’ format

We present an update of the Universal FeynRules Output model format, commonly known as the UFO format, that is used by several automated matrix-element generators and high-energy physics software. We detail different features that have been proposed as extensions of the initial format during the last ten years, and collect them in the current second version of the model format that we coin the Universal Feynman Output format. Following the initial philosophy of the UFO, they consist of flexible and modular additions to address particle decays, custom propagators, form factors, the renormalisation group running of parameters and masses, and higher-order quantum corrections.


Introduction
During the last 25-30 years, several high-energy physics software packages have been developed to explore the electroweak scale and get information on the possible physics beyond the Standard Model (BSM).Typical examples of such programs target the simulation of events at high-energy collider, fixed-target or neutrino expera E-mail: fuks@lpthe.jussieu.friments, total and differential cross section calculations for many processes in the Standard Model (SM) and beyond it, as well as the computation of dark matter observables.These software tools generally require as input, in one form or another, the particle spectrum of the model, the list and the values of all parameters that appear in its Lagrangian, as well as the list of all interaction vertices among the different particles.Historically, each program followed its own format to input the model information, with its own conventions and restrictions on the supported structures in a Lagrangian.This severely limited the portability of a model, and consequently multiplied the workload for the implementation and validation into several tools as advocated in [1].
The UFO format [2] was proposed as a solution to this issue, by introducing a new way to pass model information to high-energy physics software.Its goal is to provide a flexible and fully generic format that goes beyond existing formats in the sense that no assumption on the supported structures appearing in the model is enforced.All the model information is stored in an abstract form, i.e. independent of the software.It is then up to the tool using the UFO model to enforce their restrictions at run time.The UFO representation of the particle physics model has been chosen to rely on Python objects defined through a set of attributes that encode physical properties so that the model could be straightforwardly accessed and parsed by any highenergy physics tool.One of the advantages of the design choices made is that the UFO is modular.Additionally the format is easily expandable to include new pieces of information not originally considered.These design choices allowed later developments that permitted the inclusion of decay width information [3], modifications of the propagators associated with any given field [4], renormalisation group running effects impacting some of the model's parameters and masses [5], and ingredients relevant to higher-order perturbative calculations in quantum field theories [6].
With the present paper, we take the opportunity to collect all these recent developments in a single document, describe (for the first time) how to embed form factors in UFO models, and how to include missing information relevant to the automated calculations of electroweak corrections in the Sudakov approximation for collider processes.In section 2, we begin with a general description of the UFO format.We provide additional details on the philosophy of the UFO format, describe the structure of how the model information is organised in several Python files, and put a particular emphasis on (optional) recommendations useful for making UFO models traceable.Section 3 is dedicated to the original UFO format, and we describe all mandatory files that should be included in a UFO model.In section 4, we detail how optional components can be added to a UFO model, and describe all existing options.Finally, section 5 focuses on higher-order computations and how ingredients relevant to this context could be included in the UFO format, both in general and for the specific case of electroweak corrections in the Sudakov approximation.We summarise our work in section 6.

The evolution of the UFO format
The aim of this section is to provide a general overview of the UFO 2.0 format for new physics models, that we propose to call the Universal Feynman Output (UFO) format in order to distinguish it from the initial version [2] released a decade ago.In the following, we emphasise the philosophy behind the UFO format, as well as its general structure.The content of the different files included in a UFO model and the associated syntax are discussed in more detail in dedicated subsequent sections.
A UFO model consists of a set of Python files that can be used with a large class of publicly available computer packages relevant for high-energy physics calculations.The UFO format has been built around the philosophy that a model implementation should be independent of the software tool that uses it.This makes it possible to have a single model implementation working across different computer codes and platforms, making it relevant for assessing the phenomenology relevant for different classes of experiments (targeting, for instance, dark matter, high-energy collider or neutrino experiments).The UFO standard achieves this by representing the model information, namely the model's particles, parameters and vertices, in terms of Python objects whose attributes collect their properties.It is then up to the computer code that uses the model implementation to read in these files, and to process their content correctly.In case the code has restrictions on the type of models, an exception is raised and informs the user that the implementation cannot be reliably used.
Since its inception, the UFO format underwent several extensions to accommodate the specification of additional model information which is not part of its original documentation [2], such as those mentioned above.In particular, the documentation related to automated next-to-leading order (NLO) computations has never been collected in a single document, despite being at the heart of the frameworks introduced in [6,20,21].UFO models suitable for NLO calculations have in addition become standard in high-energy phenomenology during the last decade, a large variety of NLO-compatible UFO models being now available (especially from the Feyn-Rules model database 1 ).Although all extensions mentioned above are already being used by several codes, there is no official documentation of the structure of the UFO format beyond the original proposal.The main purpose of this document is therefore to provide an update of the UFO documentation, which contains all the features relevant for computations beyond LO accuracy.
Before starting to discuss the general outline of a UFO model implementation, let us first make a comment about the name.Originally, the acronym UFO stood for 'Universal FeynRules Output'.The origin of this name can be traced back to the fact that in its original conception UFO files were produced by Feyn-Rules [28] only.For a few years now, UFO files can also be generated from a user-defined Lagrangian by other computer codes such as LanHep [29,30] and Sarah [31,32].For this reason we deem it more appropriate to remove the explicit reference to FeynRules from the name of the UFO format, and the acronym UFO henceforth now stands for 'Universal Feynman Output'.

General file structure of the UFO
In the remainder of this paper we discuss in detail the structure of the files contained in a UFO model.All the files, collected in a single directory, must be valid Python files, therefore with a file extension .py.Whereas most files are model-specific and contain the definition of the objects relevant to each model (e.g.particles and parameters), some of the files are modelindependent and contain Python-code objects defining, for instance, the Python classes used in a UFO model.
The following model-specific files are mandatory in any valid UFO model directory, particles.pyparameters.pyvertices.pylorentz.pycouplings.py-coupling_orders.py-function_library.pyThese files contain the basic definitions related to a model.If a model is to be used for computations beyond LO accuracy, three extra files are mandatory and must be included, -CT_vertices.py-CT_couplings.py-CT_parameters.pyMoreover, in the specific case of electroweak corrections in the high-energy (Sudakov) approximation, this list must be complemented by an additional file that is described in this document for the first time, -CT_ewcasimirs.pyFinally, every UFO directory may contain certain optional files, which specify additional model information, -form_factors.pydecays.pypropagators.pyrunning.py The content of these files is described in detail in section 4, so that we limit ourselves here to highlighting some features that are common to all of them.
Each file defines a list of objects.The classes that can be used are predefined and included in the mandatory file object_library.py(see below), and only standard Python syntax is allowed.Several of the files define analytic expressions for interaction vertices or coupling constants in the theory.All standard arithmetic operations in Python can be used to write such analytic expressions in the UFO format, augmented by some special symbols whose meaning is described in subsequent sections together with the precise syntax.
Besides these model-specific files which are at the heart of every UFO implementation, there are a couple of mandatory model-independent files that need to be included in every valid UFO directory, -object_library.py-__init__.pytogether with the optional file -write_param_card.py that has a specific practical use.
As already mentioned, the file object_library.pycontains the definition of all classes used in a UFO model.It includes several lists providing easy access to the full content of the model within the code.In other words, all declared objects within a UFO must appear in these lists.The list all_particles collects all particle declarations (as instances of the Particle class; see section 3.1), and the list all_parameters gathers all parameter declarations (as instances of the Parameter class; see section 3.2).The elements required for the description of the model interactions (see section 3.3) are spread over the list all_vertices that collects all vertex declarations (as instances of the Vertex class; see section 3.3), the list all_couplings that collects all coupling declarations (as instances of the Coupling class), the list all_lorentz that includes all Lorentz tensors appearing in the model vertices (declared as instances of the Lorentz class), and finally the additional list all_coupling_orders that contains a list of tags allowing certain vertices of the model to be flagged (these tags being declared as instances of the CouplingOrder class).In addition, the Python file object_library.pyalso includes a list all_functions whose role is to gather all Function objects instantiated in the model (see section 3.4).
The content of the files function_library.pyand write_param_card.py is detailed in sections 3 and 4. We only focus here on the file __init__.py.This file identifies the content of a UFO directory as a valid Python module that can be loaded with the standard command import, and it may contain any valid Python command that should be evaluated when the model is loaded.In particular, the file __init__.pyimports all other Python files relevant to the model, and it additionally allows users to add general information about the model, as shown in the following example: __author__ = "H.Solo, C. Bacca" __date__ = "06.03.2023" __model_version__ = "1.0"__arxiv__ = "2304.NNNNN" __UFO_version__ = "2.X" __python_version__ = [2,3] The first three variables (__author__, __date__ and __model_version__) provide information on the implementation and its author(s), whereas the __arxiv__ variable enables the connection of a given UFO model to a publication released on the arXiv.Setting the variable __UFO_version__ to "2.X" indicates that the model implementation includes features documented in the present paper, and the __python_version__ variable refers to the version of Python with which the UFO is compatible (namely 2 and/or 3 at present time).While such an electronic signature of the model is not mandatory, we recommend users to include it for traceability reasons.Depending on the moment at which a UFO model has been generated and that at which it is used within a code, incompatibilities between Python versions may occur.While we suggest to update existing UFO models so that they become Python 3 compatible, it is up to the code using UFOs to make sure that Python version compatibility is addressed properly and internally.For instance, GoSam, Herwig 7 and MadGraph5 aMC@NLO convert UFO models compatible with Python 2 to their Python 3 equivalent in order to use them.
Finally, users can include information on the gauges available for the model implementation.This is achieved through the variable gauge that contains a list of integers, as for instance in The value 0 refers to the unitarity gauge, whereas the value 1 stands for the Feynman gauge.Other integer values are allowed, provided that they are consistently defined in the UFO model, in particular through appropriate definitions in the files parameters.py(for gauge parameters like ξ in the R ξ gauge) and propagators.py(for custom propagator expressions).

Mandatory components
The dynamics of a particle physics model at tree-level is encoded in the UFO format within a small set of mandatory files.This contains the description of the particle spectrum (particles.py), the model parameters (parameters.py)and the different interactions between the model particles (whose implementation is spread over the three files vertices.py,couplings.pyand lorentz.py).In addition, two extra files are necessary.The first of them, coupling_orders.py,details tags allowing certain vertices of the model to be flagged, whereas the last one, functions_library.py, is dedicated to the implementation of user-defined functions that can be used anywhere in the UFO model.The content of all these files is described in the following subsections.

Particles
All physical particles of a model are declared as instances of the class Particle in the file particles.py.UFO models are generally defined in terms of the physical, propagating, mass eigenstates.Unphysical gauge eigenstates and non-propagating auxiliary fields are thus ignored in most implementations, with the exception of optional ghost and Goldstone fields that may be needed depending on the gauge chosen.However, it is always possible to include specific auxiliary fields in an implementation if needed (see also the end of this subsection).A Particle object is defined through various attributes specifying the particle name and properties, including its quantum numbers.As an illustration, we consider a possible UFO implementation for a heavy top quark t , The particle is identified by its name (the name attribute taken to be tp in the present example), its spin and colour representations (given as the value of the spin and color attributes), its mass and width (the value of the mass and width attributes, given in GeV) and its electric charge (given as the value of the charge attribute, in units of the proton's electric charge).The tp symbol that appears on the left-hand side of the equality represents a unique Python identifier that is further used internally within the model to refer to that particle.It has thus to follow Python requirements for names of variables.However, this identifier will not appear within any of the lists introduced in the file object_library.py,that include instead the objects themselves.All Particle objects instantiated within a UFO model must therefore have unique name attribute values, as this is how they should be referred to within any code using UFOs, in addition to unique Python identifiers.In addition, such a constraint holds for all the other classes of objects introduced below: two instances of a given class must have different name attributes 2 .
In the UFO conventions, the spin representation has to be provided in the 2s + 1 form where s denotes the particle spin.Whereas any s values are allowed at the UFO level, none of the tools currently employing UFO models are compliant with spins s > 2.Moreover, setting spin = -1 identifies ghost fields.Similarly, whereas users are free to assign any colour representation for a particle in a model, tools currently making use of UFO models support at most the trivial, (anti)fundamental, (anti)sextet and adjoint representations.These choices can be made by setting the color attribute to 1, ±3, ±6 and 8.
Information on the particle mass and width are provided by referring to the corresponding model parameters.In the considered example, the mass and width attributes of the tp particle are set to MTP and WTP, that are both declared in the file parameters.py(see section 3.2).Parameter declarations must consequently be imported prior to the declaration of any particle, i.e. by inserting at the beginning of the file particles.py: 3

import parameters as Param
The UFO conventions allow users to associate a particle with its corresponding antiparticle.This is achieved through the antiname attribute of the Particle class, from .import parameters as Param which must be set to the name of the Particle object representing the antiparticle.The latter is itself declared either as above (with some of the attribute values swapped or modified) or through the more economical method anti(), tp__tilde__ = tp.anti()This method of the Particle class is defined in the file object_library.py,and it automatically instantiates an antiparticle from the corresponding particle object.The T E X version of the particle and antiparticle names are respectively provided as the value of the texname and antitexname attributes.In the case of a self-conjugate particle, all antiparticle attributes must be set to the same value as their particle counterparts.
Most high-energy physics programs dealing with particles often internally identify them through their Particle Data Group (PDG) identifiers [33].In the UFO format, such an identifier is stored as the value of the pdg_code attribute of the Particle class, that has been chosen to be 8 in the t example considered.While users can technically assign any code to any particle, many programs employing UFO models have the standard identifiers provided in the PDG review [33] hard-coded for common BSM particles.Inconsistent choices may therefore lead to unexpected behaviours of these tools.We recommend users to make use of existing identifiers for particles already listed in the PDG review, and new non-used identifiers otherwise.While all the attributes described above are mandatory, additional optional attributes (like the attribute LeptonNumber in the tp example considered) can be included.The UFO format includes the five predefined attributes line, goldstone, propagating, counterterm and propagator.The first three attributes indicate how to draw the particle propagator in a Feynman diagram (the possible self-explanatory values of the attribute line being 'dashed', 'dotted', 'straight', 'wavy', 'curly', 'scurly', 'swavy' and 'double'), whether the particle is a Goldstone boson ('true') or not (default, 'false'), and whether it consists of a physical field that propagates ('true', default) or of a nonpropagating auxiliary field ('false').Information of the last two of these predefined optional attributes, counterterm and propagator, is provided in sections 5 and 4.3 respectively.
Finally, any extra attribute appearing in the instantiation of a Particle object (like U (1) quantum numbers such as LeptonNumber in the above example) represents a model-dependent quantum number whose sign changes under the action of the anti() method relevant for antiparticle objects.

Parameters
Model parameters (masses, couplings, mixing matrix elements, etc.) are declared as instances of the Parameter class in the file parameters.py.The UFO syntax distinguishes external and internal parameters.The former are the free parameters for which numerical values have to be provided by the user, while the latter are derived quantities related to other parameters (internal and/or external) via algebraic relations.Accordingly, a numerical value has to be provided for an external parameter whilst an analytical formula has to be given for an internal parameter.The UFO format also includes a third class of parameters, called constant parameters, that are similar to external parameters except that their value cannot be changed by the user.Equivalently, such constant parameters could also be declared as internal parameters for which the analytical expression is equal to a numerical value.Consequently, the only possibility to modify the value of a constant parameter is to edit directly the file parameters.py.
A typical declaration of an external parameter would be tb = Parameter( name = 'tb', nature = 'external', type = 'real', value = 10., texname = '\\text{tb}', lhablock = 'HMIX', lhacode = [ 2 ] ) In this example, we considered the parameter tan β that is defined as the ratio of the vacuum expectation values of the neutral Higgs fields in two-Higgs-doublet models, and that is often taken as one of the external parameters describing the Higgs sector of the model.
The above expression declares an instance of the Parameter class called tb (the value of the name attribute being tb).The nature of this parameter is external, as indicated by the value of the nature attribute (that has been set to external).In contrast, this attribute has to be fixed to internal or constant for internal and constant parameters respectively (see below for dedicated examples).In the above instantiation, the tb parameter is imposed to be real, since external parameters must all be real numbers.This is achieved through the attribute type whose value is set to real (the other possible option being complex).Consequently, the value of the value attribute is a floatingpoint number (10 in the above example).In addition, the T E X version of the parameter name must be specified, as for particle names (see section 3.1), by setting accordingly the texname attribute.In principle users can choose the name of the parameters of a model freely, some parameter names are reserved as lying at the heart of higher-order calculations.We refer to section 5 for more information.
The last two attributes in the above declaration, namely lhablock and lhacode, refer to the way in which external parameters are organised, following conventions generalising the Supersymmetry Les Houches Accord (SLHA) format [34,35].In this scheme, the numerical values of all the model parameters are collected into specific blocks, and each parameter is identified inside a block by one or more integer numbers called counters.These counters consist of a single integer for scalar parameters, and in a sequence of integers for tensor parameters, the integers corresponding to the tensor indices.Moreover, all the elements of a given tensor must be part of the same Les Houches block.In the case of the tan β declaration above, such a Les Houches structure would correspond to Block HMIX 2 1.000000e+01 # tb In the UFO conventions, the name of the block ('HMIX') is passed as the value of the lhablock attribute, while the counter ( [ 2 ]) is given as an array through the value of the lhacode attribute.In the SLHA-based format, the numerical value of the parameter (1.00e+01 here) is given after the counter, followed by an optional comment (referring in the above example to the parameter name).
Whereas the user can freely choose the names of the various Les Houches blocks and how the counters are organised, the SM parameters have to be correctly identified by any tool using a UFO model.For instance, if the SM input parameters include the inverse of the electromagnetic coupling constant at the Z-pole α −1 (m Z ), the Fermi constant G F and the strong coupling constant at the Z-pole α s (m Z ), then they have to be defined as the first three entries of the SMINPUTS block, the electromagnetic and strong coupling constants α, e and g s being in this case internal quantities. 4In addition, masses and widths must be assigned to the blocks MASS and DECAY, the counter being the PDG code of the particle.We refer to the FeynRules manual [28] and the description of the SLHA format [34,35] for more information on these conventions.Finally, UFO mod- 4 There is no restriction on the adopted electroweak scheme.Any choice has its conventions in terms of external and internal parameters, and on the manner to encode them in a Les Houches structure.On the other hand, if the model allows for the calculation of NLO electroweak corrections, then the corresponding renormalisation conditions have to be consistently implemented, as discussed in section 5. els suitable for higher-order calculations should include the blocks LOOP and TECHNICAL, that contain specific parameters relevant for programs handling calculations beyond LO.Their role is detailed in section 5.
This SLHA-like structure associated with the organisation of the external parameters is irrelevant for internal and constant parameters, so that instantiation of the latter does not require users to provide values for the lhablock and lhacode attributes.Moreover, constant and internal parameters can be complex quantities, in contrast with external parameters.This is indicated by setting the type attribute to the value complex.In the case of internal parameters, the attribute value is fixed to a valid algebraic Python expression represented by a string.This formula can depend on any external, constant or internal parameter already declared in the file parameters.py(i.e. on any parameter appearing before in the file).For constant parameters, a numerical value has to be provided instead.
As an illustrative example, we show how to define the cosine of the β angle.It can be derived from tan β (defined as an external parameter earlier), and can be declared in a UFO model as cbeta = Parameter( name = 'cbeta', nature = 'internal', type = 'real', value = 'math.cos(math.atan(tb))',texname = '\\cos\\beta' ) after having properly imported the math module.

Interactions
The cornerstone of the UFO format consists of the way in which interactions are implemented, following their decomposition in a colour ⊗ spin space.Any generic vertex V involving the interaction of n external particles ϕ iai i (p i ) (i = 1, . . ., n) with spin indices i (equivalently denoting Dirac and Lorentz indices), colour indices a i and four-momenta p i , could be decomposed as In this expression, the vertex V is decomposed into a set of colour structures C a1...an i and spin structures L 1... n j (p 1 , . . ., p n ), that are given as tensors in colour and spin space respectively.After considering all the model interactions, the resulting ensemble of structures defines a colour and spin basis allowing for the decomposition of any of the model vertices.Eq. ( 1) hence underlines an economical way to define all the interactions of the model, since a given spin or colour tensor could be used in several vertices.The set of coordinates associated with a specific vertex in the colour ⊗ spin basis are given by the coupling strengths G ij .In version 2.0, the UFO format only supports unbroken gauge groups that comprise a single copy of SU (3) and any number of U (1) factors, such as in the SM after electroweak symmetry breaking.
As an example, we consider the four-scalar interaction between right-handed up squarks and antisquarks of the Minimal Supersymmetric Standard Model, whose associated Feynman rule is given by: where c 1 and c 2 (c 3 and c4 ) denote the fundamental (anti-fundamental) colour indices of the two squarks (antisquarks), a is a summed adjoint colour index, and c W is the cosine of the electroweak mixing angle.Moreover, T a stands for the SU (3) generators in the fundamental representation, and g s and e are the strong and electromagnetic coupling constant respectively.The UFO decomposition of this vertex can be written as The colour basis whereas the spin basis L contains a single element Here the coordinates G = G ij are given as a 4 × 1 matrix of coupling strengths: The UFO format mimics this structure with the declaration of the model vertices as instances of the Vertex class in the file vertices.py.Each vertex is implemented following its decomposition (1), that is passed through five mandatory attributes (name, particles, color, lorentz and couplings).In the case of the four-squark vertex example considered, a possible instantiation is: The first attribute name defines the name given to the vertex (V_1 in our example).The list of particles outgoing from the vertex is provided as an array of Particle objects through the particles attribute of the Vertex class.All employed particles must have been declared in the file particles.py,and then imported in the file vertices.pyprior to the declaration of any vertex as import particles as P The four-squark example considered involves two incoming right-handed up squark (suR) and two incoming right-handed up antisquarks (suR__tilde__), the Particle objects suR and suR__tilde__ being declared in particles.py(as detailed in section 3.1).The vertex decomposition (1) is finally provided through the color, lorentz and couplings attributes of the Vertex class.
The color attribute refers to the array of elements C a1...an i of the colour basis relevant to the vertex under consideration.Each entry in this array is a polynomial combination of the elementary colour tensors of table 1, and the arguments of each tensor are positive or negative integer numbers.Positive integers are used to associate a colour index with one of the particles incoming to the vertex, the exact value referring to the position of the particle in the list provided through the UFO colour tensor Description 1 Trivial tensor (for non-coloured particles) Kronecker delta δ ī2 i1 , δ a2a1 , or δ ᾱ2 α1 Epsilon(1,2,3) Antifundamental Levi-Civita tensor Table 1 Elementary colour tensors that can be used to construct the elements of the colour basis relevant for a given UFO vertex.Fundamental, sextet, antifundamental and antisextet colour indices are denoted as i, α, ī and ᾱ, whilst a denotes an adjoint colour index.
attribute particles of the Vertex class.Negative integers must appear exactly twice in a monomial, and they correspond to contracted (i.e.summed over) indices.In the UFO conventions, the position of the first particle in the list particles corresponds to 1, in contrast to standard Python arrays.Moreover, it is up to users to verify the consistency between the colour structures appearing in a vertex definition and the representations of the particles entering this vertex, as programs processing UFO models may reject models in which the colour structures in a vertex do not match the colour representations of the particles.Eq. ( 2) shows that all the colour structures appearing in the four-squark vertex can be implemented by the sole use of Kronecker deltas (Identity) and fundamental representation matrices of SU (3) (T).Consequently, the elements of the basis of (3) are implemented as as illustrated in the declaration of the vertex V_1 above.Similarly, all spin structures L 1... n j (p 1 , . . ., p n ) relevant to a given vertex are collected into an array that is passed through the lorentz attribute of the Vertex class.The structures L 1... n j are provided as Lorentz UFO spin tensor Description Sigma(1,2,3,4) Sigma matrix (σ µ1µ2 )s 1 s2 C(1,2) Charge conjugation matrix Cs 1 s2 Metric(1,2) Minkowski metric η µ1µ2 P(1,i) Incoming momentum of the i th particle Levi-Civita tensor µ1µ2µ3µ4 (with Table 2 Elementary spin tensors that can be used to construct the elements of the spin basis relevant to a given UFO vertex.Spin and Lorentz indices are respectively denoted as s and µ.
objects, instead of being directly implemented at the time of the vertex instantiation.These Lorentz objects are then defined in the file lorentz.py,and they must therefore be imported prior to the declaration of any vertex in the file vertices.pyfile,

import lorentz as L
A Lorentz object is instantiated (in the file lorentz.py)as in the following two examples (the first one being the only one relevant for the considered four-squark interaction vertex), All three attributes of each Lorentz object are mandatory.The first of them (name) indicates the name of the object, the second (spins) the spins (in the 2s+1 notation) of the particles entering the vertex and the last one (structure) the structure itself, provided as a polynomial combination of the elementary tensors of table 2. As in the colour case, the arguments of these tensors are positive and negative integers, the positive ones being associated with the particles incoming to the vertex (with the value referring to the position of the particle in the list spins), and the negative ones appearing twice and corresponding to contracted indices (that are therefore summed over).In this context, squared momenta like p 2 1 can be written as P(-1,1)**2.This is interpreted exactly as P(-1,1)*P(-1,1) and allows for concise expressions of Lorentz structures in UFO.Obviously, the -1 index must appear only once in this case.
In the case of the four-scalar vertex (2), the only possible spin combination is the trivial one.This requires us to use the SSSS1 object for the instantiation of the vertex V_1.In contrast, the object VVSS1 involves two vector bosons and two scalar particles (cf. the attribute spins of the object VVSS1), and the structure of its interactions relates the two bosons through the Minkowski metric (cf. the attribute structure of the object VVSS1).The corresponding UFO implementations for the structure of the Lorentz objects SSSS1 and VVSS1 are then The last attribute of the Vertex class is related to the coordinates G ij of the vertex in the colour ⊗ spin basis.They are provided in the form of a Python dictionary through the couplings attribute of the Vertex class.This dictionary relates the coordinate (i, j), where i and j refer to a specific colour and spin basis element respectively, to the value of the corresponding coupling strength given as a Coupling object.The list of all Coupling objects necessary for the implementation of a given model is declared in the file couplings.py,that must therefore be imported prior to the declaration of any vertex, import couplings as C When a vertex is instantiated, only the non-vanishing coordinates have to be included.In the four-squark vertex considered, this therefore gives where the integer counters follow this time a standard Python numbering for the elements of an array (the first element being thus associated with the index 0).The example above illustrates the fact that the foursquark vertex exemplified involves only two instances of the Coupling class (GC_1 and GC_2), as also depicted in (2).The declaration of a Coupling object in the file couplings.py is very similar to that of an internal parameter declaration (see section 3.2).For the two couplings GC_1 and GC_2 necessary for the four-squark vertex considered, this gives GC_1 = Coupling( name = 'GC_1', value = '-(4*ee**2*complex(0,1))/(9.*cw**2)',order = {'QED':2} ) GC_2 = Coupling( name = 'GC_2', value = '-(complex(0,1)*G**2)', order = {'QCD':2} ) An instance of a Coupling object is declared with three mandatory arguments, namely its name (name), the algebraic coupling definition that could depend on any of the model parameters (value), and a so-called coupling order provided in the form of a Python dictionary (order).In the case of the four-squark example considered, the coupling strengths appearing in (5) are directly provided as valid Python algebraic expressions.The last attribute of a Coupling object, order, is a Python dictionary that allows users to tag certain couplings of the model with one or more strings (i.e.tags) to which a positive integer number is associated.In the examples above, the tags QED and QCD are associated with two physical quantities, the typical strength of the electroweak and strong interactions.The couplings GC_1 and GC_2 are hence flagged as couplings with strengths proportional to two powers of the electromagnetic and strong coupling, respectively, as the integer 2 is attached with each of the two tags involved.It is not mandatory to use tags that actually refer to a physical interaction.For instance, in the vector-like quark UFO implementation of [36], a VLQ coupling order is introduced in order to identify all vertices suppressed by the mixing of a vector-like and a SM quark (which is achieved by setting order = {'VLQ:1'} in the relevant coupling declarations).
This coupling-order feature allows users to filter not only vertices, but also the resulting Feynman diagrams.This is generally achieved in practice through the introduction of criteria depending on the type of interactions involved in a vertex or a Feynman diagram.For instance, the QED and QCD tags introduced in the definition of the GC_1 and GC_2 couplings could allow users to neglect (subdominant) electroweak diagrams relative to (dominant) QCD diagrams (as numerically α 2 s ∼ α) when deriving the list of diagrams relevant to a specific hadron-collider process.Moreover, in the vectorlike quark example briefly mentioned above, users could enforce the list of relevant diagrams to include at most one mixing suppression.
The tags that can be used for the instantiation of the different Coupling objects have to be declared in the file coupling_orders.py,each tag (or coupling order) being implemented as an instance of the class CouplingOrder.In our supersymmetric example (taken from [37]), the model contains two independent classes of interactions that are named QED (for interactions proportional to the electromagnetic coupling e, and therefore the weak coupling g = e/s W with s W being the sine of the electroweak mixing angle, or any of the model's Yukawa or supersymmetry-breaking multiscalar interactions) and QCD (for QCD interactions).These tags are declared as Whereas the examples above refer to coupling orders associated with physical interactions, they can easily be generalised to any other class of tags.
In the above example, the two CouplingOrder objects are instantiated by fixing three mandatory attributes (name, expansion_order and hierarchy), together with one optional attribute for the QCD coupling order (perturbative_expansion).The first of the mandatory arguments, name, contains the name of the coupling order, that also consists of the tag that can be used for instantiation of Coupling objects.The second attribute, expansion_order, refers to the maximum power of the interaction that could appear in a single amplitude.This is particularly relevant for effective field theories in which amplitudes must be truncated to some power of the high effective scale.In the above examples, this attribute is fixed twice to 99, which effectively indicates that there is no limit.The last mandatory attribute, hierarchy, allows users to order the couplings according to their relative magnitude.In the above example, we enforce such a hierarchy, and we impose α 2 s ∼ α.This is achieved by assigning to the coupling orders QCD and QED the hierarchies 1 and 2 respectively.Such a piece of information is relevant for the implementation of diagram filters for a given process, 5 allowing users to select given contributions to an amplitude according to the type of contributing interactions.Setting the attribute hierarchy to 0 indicates that the corresponding coupling order plays only a role of a tag, and that there is no connection to the relative magnitude of the associated coupling orders.In the vector-like quark model introduced above, the attribute hierarchy of the coupling order VLQ is set to 0. This coupling order can hence be used to enforce the maximum number of suppression factors due to VLQ-SM mixing that can appear in a diagram, regardless of the nature of the fundamental (QED or QCD) interactions involved.
Finally, the perturbative_expansion attribute of the QCD coupling order is set to 1 in the above example.This implies that the UFO model contains all ingredients necessary for NLO calculations in QCD (see section 5).If the attribute is unspecified, a default value of perturbative_expansion = 0 is assumed, which implies that only LO calculations in this coupling are supported.

The function library
The last mandatory component of a UFO model is the file function_library.py.It includes user-defined functions declared as instances of the Function class.The UFO format supports functions that can be defined within a single line in Python, the so-called Python lambda functions.Python lambda functions offer the advantage of being easily translatable into other programming languages, and they are consequently the only functions that can be declared within the library defined in the file function_library.py.
A Function object is defined through three mandatory attributes and two optional attributes.The mandatory attributes consist of the name of the function (name), its arguments specified as a tuple of strings (arguments), and the expression of the function itself given in terms of its arguments.The latter must be provided as a string that represents a valid Python expression, and it is given as the value of the attribute expression.By default, all the arguments of the functions are considered to be complex numbers.This behaviour can however be superseded by providing a tuple of strings through the optional attribute argstype of the Function class, which allows users to specify the type of the different arguments of the function.The supported types are real numbers (real), complex numbers (complex), and arrays of real or complex numbers (real[n] or quark Yukawa coupling (that is thus a coupling of QED order), the QCD/QED hierarchy mentioned in the text is not valid.The QED tag is however anyway very useful for diagram filtering purpose.

complex[n]
for an n-dimensional array, respectively, where n is an integer).The two tuples provided through the attributes arguments and argstype must have the same size.Similarly, the type of the result of the function is a complex number by default, but this behaviour can be modified by specifying the type attribute of the instantiated function, that can take the self-explanatory values real, complex, real[n] and complex[n] (with n being an integer).
Several functions are shipped by default with any UFO model.This includes in particular a series of mathematical functions for which the Python module cmath is insufficient.First, the function_library.pyfile contains a set of tools that facilitate the treatment of complex quantities (the real part of a complex number re, its imaginary part im, and the complex conjugation operation complexconjugate).Second, several trigonometric and cyclometric functions are implemented (the cotangent cot, the secant sec and the cosecant csc functions, together with their arcsecant asec and arccosecant acsc counterparts).
As an illustration, we provide below a function returning the real part of a complex number, as well as a function associated with the secant of a complex number.These could implemented as can be used through theta_function(x>=23., 1., 0.) The definition of Function objects also supports the use of the model parameters instantiated in the file parameters.py, as well as that of other functions.This therefore allows for more complex expressions to be defined in steps.As a complete example, we consider an elastic atomic form factor G el (t) [38], where Z_nuc, a_nuc and d_nuc are parameters of the model defined in the file parameters.py.In this function, we imposed the arguments to be real quantities (real), instead of complex ones (complex, that is also the default) or real and complex arrays (for example real [4] or complex [4] for the four-dimensional case).Moreover, the output of the function is defined to be a real number, instead of a complex one, which is the default.We note that this output is not allowed to be a list.
The complete form factor in our example should also include an inelastic part G in (t) [38,39].The latter can be defined similarly as its elastic counterpart, namely as another Function object Gin.The full implementation of both contributions as a single Function object FF is thus FF = Function( name = 'FF', arguments = ('t'), argstype = ('real'), expression = 'math.sqrt(Gel(t)+ Gin(t))' ) in which we illustrate how a given Function object could call other Function objects and standard Python methods.

Optional components
In this section, we describe optional files that can be included in a UFO model.These files allow users to provide additional information about a model, and/or equip a UFO with non-standard practical methods and functions.One of these files (write_param_card.py)defines a writer of the external model parameters in an SLHA-like text file.This file was a mandatory component in the first version of the UFO format [2] for the sole reason that all files defining a model were mandatory.As it is not strictly necessary from the point of view of the information defining a model, we benefit from the possibility of having optional files in version 2 of the UFO to update its nature.The other optional files are new and were introduced after the original release of the UFO format.They are related to the addition of custom propagators for specific particles of the model as introduced in [4] (in the file propagators.py),detail how to provide information about particle decay widths following [3] (in the file decays.py)and about the renormalisation group running of the model's parameters as defined in [5] (in the file running.py),and enable the usage of form factors in a UFO model, which we document below for the first time.Moreover, it is now also possible to directly add custom Fortran and C++ functions in a UFO model.These functions are defined in folders Fortran and Cpp respectively, and they can be called in any algebraic expression introduced in the other files of the model.This possibility is briefly discussed in sections 4.2 and 5.2.

Outputting the values of the model parameters
The file write_param_card.pyincludes routines that write all external model parameters, together with their numerical value, into a text file following an SLHAlike format [34,35].In the output file, the parameters and their values are organised in Les Houches blocks and counters, as specified by the user with the parameter declarations implemented in the file parameters.py(cf. the lhablock and lhacode attributes of the different parameters; see section 3.2).
The output file, named param_card.dat,is generated by issuing in a shell the command python write_param_card.py In addition to the model external parameters and their value, the output file includes QNUMBERS blocks [40] with information on the quantum numbers of all the particles of the model, as well as all particle masses and decay widths regardless of their external/internal nature.
Examples of such a write_param_card.pyfile can be obtained from the model database of FeynRules. 6

Form factors
The standard UFO decomposition of an interaction vertex in a colour ⊗ spin space of (1) does not always suffice to properly describe an interaction.In some models, it is indeed convenient to have couplings that depend on phase space (therefore including so-called form factors), as for instance in effective theories or empirical descriptions of interactions (e.g. as for atomic form factors at low energy or for neutrino-nucleus interactions).The extension of the UFO format described in this section adopts the decomposition (1) by adding extra scalar functions F j (p 1 , . . ., p n ) that depend on the four-momenta of the particles incoming to the vertex, This expression shows that in the UFO conventions, the form factors F j impact the spin dependence of the interaction vertices, while they leave the colour structure unaffected.
In practice, they are implemented as a modification of the relevant spin structure of the vertices declared in the file lorentz.py,following the replacement This amounts to allow the value of the structure attribute of a Lorentz object to make use of functions defined in the file function_library.py(see section 3.4), and of parameters defined in the file parameters.py(see section 3.2).This obviously requires to import the list of parameters and the set of relevant functions in the preamble of the file lorentz.py.
As an example, we consider the case of a form factor given by m W /E, where m W stands for the mass of the W boson (represented below by the Parameter object MW) and E is the energy scale relevant for the associated process.Such a form factor could be defined in the file function library.pythrough a Function object AAA, AAA = Function( name = 'AAA', type = 'float', arguments = ('E2'), argstype = ('float'), expression = 'MW/cmath.sqrt(E2)') This form factor can then be used in the declaration of a spin structure relevant, for instance, for a vertex involving two vector bosons (of momenta p 1 and p 2 and associated Lorentz indices µ 1 and µ 2 ), and one scalar state (of momentum p 3 ), In this expression, the energy scale E appearing in the form factor is identified by E 2 ≡ (p 1 + p 2 ) 2 .This could be implemented as a Lorentz object VVS1 as following the notation introduced in table 2. In particular, we recall that negative indices are summed over, and that squares of four-vectors are allowed.
For more complicated form factor expressions, users have the possibility to nest the definition of several functions, as shown in the example given in section 3.4 or in [41,42].For extreme cases, form factors can be provided externally, through Fortran or C++ functions as in the tau-lepton decay module of [43].Such a construction should however be avoided as much as possible as it breaks the spirit of portability of UFO models.It may however be sometimes the only choice.In this case, we encourage authors to provide both Fortran and C++ routines for their form factors, and implement them in the Fortran file Fortran/functions.f (or Fortran/functions.f90) and C++ header and source files Cpp/functions.h and Cpp/functions.cpp respectively.

Particle propagators
In general, the propagator of a particle can be inferred from its spin, and so it is usually redundant to define propagators explicitly for each particle.There may be cases, however, where it is useful to have the possibility to redefine the propagator of a certain class of particles.This includes, for example, theories with nonstandard kinetic terms, implementations featuring nonpropagating auxiliary particles (in which case the propagator is simply a product of Kronecker delta functions 1/M 2 for massive particle, and 0 otherwise PSlash(1,2,id) / p s1s2 where p is the momentum of the propagating particle Table 3 Lorentz objects that can be used for the definition of the numerator and denominator of custom particle propagators.
without any momentum dependence), and models relevant for particles with a spin value s ≥ 3/2 for which the conventions are not unique.For a few years already, the UFO format has allowed the user to define new propagators as instances of the class Propagator, and in a given model implementation all these custom propagator definitions must be collected in the optional file propagators.py[4].The instantiation of a Propagator object follows similar conventions as for any other UFO object, as exemplified below with the case of a massless gauge boson propagator in the Feynman gauge (instantiated as V0), V0 = Propagator( name = "V0", numerator = "-1 * Metric(1, 2)", denominator = "P(-1, id)**2" ) This declaration includes the two mandatory attributes of the Propagator class (name and numerator), as well as the only possible optional attribute (denominator).The attribute name provides a way to identify a given propagator object, whereas the attribute numerator includes an analytical expression for the numerator of the propagator, a global factor i excluded.The optional attribute denominator then allows users to provide an analytical expression of the denominator.If unspecified, the Feynman propagator denominator (p 2 − m 2 + imΓ ) is assumed for a particle of mass m, width Γ and fourmomentum p µ .
The analytical expressions to be provided for the propagator numerators and denominators rely on the UFO conventions detailed in section 3.3 (and in table 2 in particular), as well as on several additional quantities that are introduced in table 3.For non-scalar prop-agators, the numerator involves non-contracted (spin and/or Lorentz) indices that are referred to as '1' and '2' in the implementation.These respectively correspond to the incoming and outgoing directions.For non-fermionic propagators, these directions are arbitrary, whereas for fermionic propagators they are crucial and must be defined from the 'fermion flow' associated with the corresponding diagrams [44].In the case of a spin-2 particle, the '51' and '52' indices are additionally introduced for the second pair of Lorentz indices attached to the propagating state.As shown in the example above and in table 3, the flag id is used as the unique identifier for the propagating particle.For instance, the momentum of the propagating particle can be represented by P(1,id) and P(2,id) in the incoming and outgoing cases respectively, whereas for a fermionic propagator (of momentum p), PSlash(1,2,id) would refer to the quantity ( / p) s1s2 in spin space.Moreover, the mass and width of the propagating particle are identified as Mass(id) and Width(id) respectively, and the additional quantity OverMass2(id) corresponds to 1/M 2 for a massive particle and 0 otherwise.Finally, we emphasise that as for Lorentz structure definitions, repeated negative indices are summed over.
In order to link custom propagators to particles, the Particle class is equipped with an optional attribute propagator.It allows users to refer to the specific propagator to employ through its name as defined in the file propagators.py.For example, a massless spin-1 particle with a custom propagator as given in the above example could be defined by where the preamble of the file particles.py is assumed to include the instruction import propagators In the case a Particle object is instantiated without any value for the attribute propagator (as in most existing UFO models), default propagators are assumed.As non trivial and existing examples, we refer to [4] and [45].They respectively address models featuring particles with spin s ≥ 3/2, and models in which running width effects are incorporated in the particle propagators.
Finally, some models are such that it is impossible to simultaneously diagonalise both the mass and width matrices.In this case, 'matrix' propagators are in order [46].We mention as a side note that the UFO format is compliant with such a structure through the implementation of a set of two-point vertices that emulate each off-diagonal entry of the propagator matrix.

Particle decays
Many applications of calculations involving massive unstable particles require the evaluation of the total and partial decay widths of all particles of the model, together with the estimation of the decay channels that are kinematically allowed.This task is highly dependent on the mass spectrum of the model, and it requires a re-evaluation of the widths for each choice of external parameters.In order to provide a simple solution to this problem, the UFO format allows users to input analytical formulas for LO two-body decay rates associated with the particles of the model.These are all collected inside the file decays.py[3].As two-body decays might sometimes be insufficient (when for instance highermultiplicity decays are the dominant decay modes or when higher-order corrections are important), it is up to the code using the UFO model to decide how (and if) they should include such extra contributions in their computations.
In the special case of a two-body decay of a particle of mass M to two particles of masses m 1 and m 2 , Lorentz invariance implies that the matrix element relevant for the calculation of a partial width Γ can only depend on the masses of the external particles, and we can write where S denotes the phase-space symmetry factor, the function is the usual Källén function, and |M| 2 stands for the average squared matrix element associated with the decay mode considered.The matrix element of this two-body decay only receives contributions from a single threepoint vertex V, so that it can be written as where the colour and spin indices of the particle i are generically denoted by a i and µ ( ) i respectively.In addi-tion, we have introduced the polarisation tensor of the particle i, P i , that depends on its spin and its mass.The content of the file decays.pycontains declarations of instances of the class Decay.Each instance of this class can be thought of as a collection of LO analytic formulas of two-body partial widths of a given state (obtained from ( 11) and ( 12 where Γ XY schematically represent the analytic formula of the partial width of the Higgs boson associated with the decay mode H → XY .The syntax to be used to write these analytic formulas is identical to that introduced in the previous sections.In the above example we assume that the first two generations of fermions are massless.All possible LO two-body decays have been included, even if some of them are kinematically forbidden.The analytic formula for the two-body decays of a Higgs boson into a pair of top quarks or weak bosons are hence also present (even if not kinematically allowed for a light Higgs boson).It is then up to the high-energy physics tool to filter out at run time the kinematically allowed channels (that depend on the chosen set of external parameters), and to combine them consistently into the total width and branching ratios for a given particle.When implementing the file decays.py, it is strongly recommended to include all two-body decay channels for all the particles of the model, kinematically allowed or not, in order to prevent the code that relies on this option of the UFO format from producing incorrect results for some benchmark scenarios and correct ones for others.
The example of the Higgs boson is also a case where tree-level two-body decays are not sufficient for an accurate calculation of the total width of the particle.We should indeed include important contributions arising both from loop-induced Feynman diagrams and from three-body decays with off-shell effects, and the explicit choice of the renormalisation scale is known to impact the results strongly.We emphasise that it is not the role of the UFO model to check whether the provided formu-las are enough to compute reliably the total width of a particle.The inclusion of the file decays.py in a UFO model instead only provides some analytical formula to facilitate the approximate evaluation of the particle widths.

Renormalisation group running effects
In many practical applications in particle physics, the free parameters of the Lagrangian are provided at a given input scale that could be quite different from the natural scales relevant to the physics process considered.One possibility to increase the precision of the predictions can therefore be to include renormalisation group (RG) running effects, which amounts to re-evaluating couplings and/or masses of the model at a specific scale.The UFO format has been extended [5] so that information on RG running could be provided within the optional file running.py.Following the general UFO philosophy, the UFO format only contains information on the running of the model's parameters, and it does not provide any method allowing to handle it numerically.It is hence up to the high-energy physics software employed to handle this, and/or to rely on any existing external tools like those introduced in [31,32,47,48].
In full generality, the RG equations associated with the model parameters {C} = {c 1 , c 2 , . ..} can be written as where the anomalous dimension matrix γ has been decomposed into a part involving a single other parameter (γ (1) ij ), a part involving two other parameters (γ ijk ), and so on.The file running.pycontains the values of the (non-zero) elements of the various γ tensors appearing in the right-hand side of (13).Several of these elements can be defined simultaneously, provided that they correspond to the same analytical expression, which allows for an economical implementation.Consequently, users have the possibility to declare one Running object for each unique value of the elements of the various γ tensors appearing in an RG equation given by ( 13), instead of one Running object per summand appearing in its right-hand side.
In practice, a Running object is defined as: This declaration relies on three mandatory attributes.The first of them is the name of the object that is provided as a string (name), while the second attribute (value) refers to the analytical formula associated with the elements of the γ tensors considered.This formula has to be provided as a valid Python expression that follows the same technical limitations as those inherent to the value attribute of the classes Parameter and Coupling (see sections 3.2 and 3.3).Moreover, this expression should not depend on any running parameter.
The value of the run objects attribute contains a list in which each element is a list of external parameters (that must therefore be declared as instances of the Parameter class), with the exceptions of the standard QCD and QED couplings α s , α, g s and e that could be used despite their external/internal nature.For each entry in the primary list, the first parameter corresponds to the parameter appearing on the lefthand side of ( 13), while all the other entries correspond to the parameters appearing on the right-hand side of that equation.In addition, a given parameter can be repeated as many times as needed to obtain a dependency on a specific power of it.The above example would correspond to where the dots refer to terms not captured by the declaration of the RGE_1 object above.

Features pertaining to NLO
Up to this point, we have presented many aspects of the UFO format that provide the necessary information to generate tree-level matrix elements for arbitrary processes within a model.In principle, this information is also sufficient to produce matrix elements that include corrections associated with an arbitrary number of loops.In practice, however, a number of additional ingredients are necessary, mainly in the form of process-independent counterterms whose derivation is often quite involved.They should therefore ideally be supplied along with the rest of the tree-level information included in a UFO model.In this section, we describe the standard according to which this additional information is provided.We stress that this extended UFO format is not bound to one-loop corrections.However current applications only involve one-loop automatic matrix element generation, and it is therefore the case that drove our choice of syntax.The counterterms provided in a UFO model containing the necessary information for performing computations at NLO accuracy (afterwards referred to as an NLO UFO) come in two distinct categories called R 2 and UV.The R 2 category contains rational terms of the second kind.They originate from the need of recovering contributions from the d-dimensional part of one-loop numerators that are typically computed in four dimensions by most numerical approaches [49][50][51][52][53][54][55][56].The UV category implements the ultraviolet renormalisation of the model.This requires an analysis of the loop corrections to the vertices and two-point functions of the model, together with physically motivated choices made by the model builder (e.g.renormalisation conditions).For this reason, such counterterms are also best computed once and for all and specified in the UFO model.As it is further discussed below, an NLO UFO model is therefore suitable for one (or at most a few) particular renormalisation scheme(s).
We now present the standardised format in which these R 2 and UV counterterms are provided in an NLO UFO model, and that is already used by many oneloop providers (OLPs).This is however only achieved after first briefly introducing information relevant for one-loop matrix element computations in sections 5.1 (UV and R 2 counterterms) and 5.2 (the complex mass scheme).In section 5.3, we focus on electroweak corrections in the Sudakov approximation and detail why additional pieces of information must be provided.As mentioned in section 2.2, several additional files must be supplied in an NLO UFO model.We provide details about those files in section 5.4.They consist of the file CT_vertices.py7that allows for the instantiation of all CTVertex objects included in the model, the file CT_couplings.pythat allows for the declaration of Coupling objects used in the counterterms, and the file CT_parameters.py that includes instantiation of all CTParameter objects needed in the counterterm couplings.
Additional information not available in any other UFO file is needed for making it possible to automatically calculate electroweak Sudakov corrections.This consists of the eigenvalues of various electroweak operators, and on how the components of the physical fields in a theory are gathered into SU (2) L multiplets.This is provided in the file CT_ewcasimirs.py through the declaration of EWOperator objects.
The objects specific to UFO NLO models can easily be accessed through generic lists included in the file object_library.py.A first list all_CTvertices collects all declared CTVertex objects, while a second list all_CTparameters is dedicated to the CTParameter objects declared by the user.On the other hand, all counterterm couplings (declared as standard Coupling objects) are available together with the other couplings of the model, through the list all_couplings.Finally, the list all_EWOperators collects additional objects relevant for the calculation of electroweak Sudakov corrections.

Counterterms
This section includes brief definitions of both the R 2 and UV counterterms relevant for NLO UFO models, and we additionally discuss aspects relevant to the automation of the computation of loop amplitudes.

R 2 counterterms
In d dimensions, one-loop amplitudes can be generically written as where D i ≡ (q + p i ) 2 − m 2 i are the propagator denominators with m i being the masses of the particles in the loop, q is the loop momentum and p i are linear combinations of external momenta.The bar denotes all the quantities living in d dimensions (x), which can thus be split in a four-dimensional part (x) and a d − 4 dimensional part (x) in dimensional regularisation, x ≡ x + x.
Rational terms are finite contributions generated by the integration over d − 4 pieces of the one-loop integrand.They are organised into two sets of contributions called R 1 and R 2 .The rational terms R 1 originate from the d−4 component of the integrand denominators, and they can be computed similarly as the four-dimensional part of the integrand but using a different basis of scalar integrals [57].The R 2 terms are instead due to the d−4 component of the numerator where d ≡ 4 − 2 and Ñ (q, q, ) ≡ N (q) − N (q).Various schemes exist for the definition of the rational terms.For example, in the 't Hooft-Veltman scheme [58] all the quantities involved in the loop, i.e. the loop momentum, the Dirac matrices and the metric, are taken as living in d dimensions, so that where 1l denotes the identity matrix in the Dirac space.Instead, the external momenta and the polarisation vectors live in four dimensions.Another scheme dependence is related to the choice of properties of the matrix γ 5 in d dimensions. 8For example, the Dirac matrices in d dimensions γ µ can be chosen to anti-commute with γ 5 [59][60][61].In this case, the cyclic property of a Dirac trace has to be dropped to avoid algebraic inconsistency.
An extra scheme has to be defined when computing R 2 terms related to operators including more than two fermions due to the presence of evanescent operators, namely operators which are only non-vanishing in d = 4 dimensions.Any Lorentz invariant four-fermion operator can always be decomposed in a basis of four-fermion operator, where f i are fermions, Γ a and Γ a are products of Dirac matrices that appear in the operator considered, and Γk and Γ k are products of Dirac matrices that define a basis of four-fermion operators in four dimensions.In the above expression, only the b k coefficients are fixed by requiring that both sides are equal in four dimensions.The determination of the coefficients a k in (18) requires extra conditions to be imposed, as for instance by requiring the equality of the trace of the Dirac structure [62] Tr Γm Once a scheme is fixed, the integral ( 16) can be evaluated from a set of process-independent Feynman rules which can be computed once and for all in a given model.The R 2 terms can typically not be captured by a direct four-dimensional implementation of the numerator of all possible loop integrands, and they must therefore be computed separately and analytically.Finally, we emphasise that the R 2 and R 1 terms are not separately gauge-invariant, but only their sum is.This provides a means for a mutual check of the implementation of the model and the package employed for NLO computations, as R 1 and R 2 terms are computed independently.The former is handled by the NLO tool whilst the latter is provided in the NLO UFO model.

UV counterterms
In general, loop amplitudes in a quantum-field theory are not finite.One type of related divergences originates from loop-momenta with large Euclidean norm, and these divergences are usually referred to as ultraviolet divergences.They should be removed by the well-known renormalisation procedure, which reabsorbs them into a redefinition of the tadpoles, the fields and the free parameters of the model provided that the Lagrangian is renormalisable. 9This yields where t φ is the tadpole for the field φ, i.e. the coefficient of the term linear in φ in the Lagrangian, φ and χ are physical fields with the same quantum numbers, and x is an external parameter (internal parameters being subsequently renormalised through their dependence on the external parameters).An additional zero subscript denotes the bare quantities compared to the renormalised fields or parameters, and a δ precedes the renormalisation constants.In the above expression, the wave function renormalisation constants have been expanded at one loop, and we consider that each fermion chirality is renormalised independently, as in the general case fermionic matter is chiral.The bare Lagrangian is then the sum of a renormalised Lagrangian, depending only on renormalised quantities, and a counterterm Lagrangian at least linear in the renormalisation constants, The UV counterterm vertices originate from the counterterm Lagrangian δL, and they must be provided in an NLO UFO model.Their implementation is split within the files CT_vertices.py,CT_couplings.pyand CT_parameters.py.As shown later, those vertices can be efficiently expressed in term of the renormalisation constants of the model thanks to the instantiation of the latter as CTParameters objects.
While the ultraviolet poles of the renormalisation constants are fixed by requiring the cancellation of the UV-divergences appearing in the loop amplitudes, their finite part can be chosen according to the renormalisation scheme considered.Some schemes are particularly suitable for numerical computations and make the evaluation of the loop amplitudes faster.For instance, imposing on-shell and/or complex renormalisation conditions for the derivation of the mass and wave function counterterms can avoid the computation of on-shell two-point loop Feynman diagrams on the external legs.Similarly, tadpole renormalisation allows us to ignore tadpole diagrams together with their renormalisation, as they identically cancel each other.
The renormalisation scheme used for the external parameters of the model has to be chosen adequately as well.Depending on the chosen scheme, the parameters may acquire a dependency on the renormalisation scale driven by related renormalisation group equations, and the associated running has to be included in order to guarantee formal NLO accuracy.The renormalisation of the strong coupling constant is a bit peculiar for hadronic collisions in that it must be set equal to what was used when determining the parton density functions.The other model parameters, such as for example the coefficients of higher-dimensional operators appearing in an effective field theory, can also run and mix through their renormalisation group equations, unless specific renormalisation conditions are chosen (see for example [63] for a fixed scale renormalisation of the new physics couplings without running).
Finally, we mention that special counterterms such as those related to the restoration of supersymmetry that is explicitly broken by dimensional regularisation can also be included in NLO UFO models, in a similar way as what is performed for the UV countertems of the model [37,64].

The complex mass scheme
In order to properly treat unstable particles that appear in the S-matrix, a convenient scheme, the Complex Mass (CM) scheme, has been proposed, and it relies on the introduction of complex masses for all unstable particles [65,66].The generic support of the Complex Mass scheme in NLO calculations requires a careful analytic continuation of all loop integrals defining the renormalisation counterterms, a topic about which an extensive discussion can be found in [21].

Complex-mass and on-shell renormalisations
Imposing a renormalisation scheme leads to mass (δM 2 ) and wave function (δZ) renormalisation constants from the self-energy Feynman diagrams associated with the different particles.On-shell (OS) renormalisation conditions for a stable particle of (renormalised) mass M yield where the real part operator is only applied to the absorptive part of the self-energy function Σ(p 2 ).In the CM scheme and for an unstable particle of (renormalised) mass M and width Γ , the renormalisation conditions lead to The renormalised complex mass hence becomes where M 0 is the bare mass.One obvious distinction between the two schemes is the application of the operator in the OS scheme, that is absent in the CM scheme.This consideration suggests that a single UFO model compatible with both renormalisation schemes can be achieved, provided we introduce a new special function recms to be defined in the file function library.py.This function is defined by recms = Function( name = 'recms', arguments = ('cms_cond','z'), argstype = ('bool', 'complex'), expression = '(z if cms_cond else z.real)' ) In addition, a switch called CMSParam is instantiated in the file parameters.py as a new internal Parameter object.Its value should be changed according to whether the complex-mass scheme is turned on or off, which is achieved for CMSParam=0.0 and CMSParam=1.0 respectively.

Analytic continuation
A dynamic choice of an appropriate Riemann sheet is mandatory within complex renormalisation conditions for the particle masses and wave functions, which critically depends on the mass spectrum and decay table in a model.
For example, the complex mass renormalisation constant associated with an unstable particle of mass M and width Γ is derived from its one-loop self-energy function Σ(p 2 = M 2 − iΓ M ), as shown in (23).Let us assume that there is a contribution to this self-energy In order to properly analytically continue the B 0 function appearing in (25), a second Riemann sheet should be selected when the imaginary part of the momentum squared (p 2 ) < 0. This allows for a correct evaluation of the logarithm and square root functions.In our specific example, this gives In the above expression, when M > M 2 and Γ M 2 > Γ 2 M we need to evaluate the logarithm in the second negative Riemann sheet, Moreover, we mention that the analytic continuation of the general B 0 function (i.e.B 0 (a; b, c) with a = 0, b = 0 and c = 0) is more involved than that achieved in the example.
In order to render a UFO model compliant with the CM scheme, we first define, for practical purpose, the finite remainder B 0f of the function B 0 , that is independent of the regularisation scale µ.We then include, in the file function library.py, the instantiation of a Function object B0F that can be used to calculate B 0f (a; b, c) when a = 0 and c = 0.10 All other cases are simpler and could be explicitly ignored in terms of a UFO implementation, as the resulting expressions can be written in terms of log and log (±) functions with These logarithmic functions must however be included in a UFO model, and they are thus all defined in the file function library.py as reglog (for log ), reglogp (for log (+) ) and reglogm (for log (−) ).For instance, the declaration of the reglog function reads reglog = Function( name = 'reglog', arguments = ('z'), argstype = ('complex'), expression = '(0.0if z==0.0 else cmath.log(z))' ) We emphasise that an alternative and more robust method to evaluate all these two-point functions could rely on the trajectory method proposed in [21].They should then be implemented as low-level functions, directly in the directories Fortran or Cpp of the UFO.An explicit example as implemented in the MadGraph5-aMC@NLO framework has been reported in [67], following the algorithm outlined in [21].

Electroweak Sudakov corrections
In the present section, we briefly review the formalism relevant for the evaluation of electroweak Sudakov corrections in the leading and subleading logarithmic approximation, or in other words, in the high-energy expansion of any given observable in powers of log s m 2 W where s is the partonic centre-of-mass energy and m W is the mass of the W boson.A one-loop-accurate algorithmic procedure for calculations in this approximation has been available for a long time ago [68], and it has been automated in recent years for SM processes [69,70].Such calculations can be achieved via a few basic ingredients: the eigenvalues and eigenvectors of specific electroweak operators, and the finite but logarithmic-enhanced contributions to the parameter and wave-function renormalisation constants.Those quantities have been hard-coded, for example in the MadGraph5 aMC@NLO code [70], and their values had to be consistently matched to the conventions of the Feynman rules used in the calculations of the related amplitudes.This step can be avoided by providing the necessary additional information directly within a UFO model, using the same conventions as those used for the computation of amplitudes.Moreover, while so far the calculation of electroweak corrections has been automated for SM processes only, in the case of the Sudakov approximation it would be in principle also achievable for many BSM processes as soon as this additional information would be provided within UFO models.
It is important to bear in mind that for the calculation of electroweak corrections in the Sudakov approximation, the UFO model does not need to contain all the information necessary for the exact evaluation of NLO electroweak corrections.Within their approximate version, electroweak corrections can be extracted from the knowledge of two kinds of ingredients, namely the finite but logarithmically-enhanced contributions to the parameter and wave-function renormalisation constants, and the eigenvalues and eigenvectors of relevant electroweak operators.The latter can be derived from the content of the model in terms of gauge eigenstates and their associated representation.However, they are rarely available for an NLO UFO model expressed in terms of mass eigenstates.Consequently, this requires some addition to the NLO UFO format, that are to be implemented in the file CT_ewcasimirs.py.On the contrary, the finite but logarithmic-enhanced contributions to the parameter and wave-function renormalisation constants can be either computed once and for all from the knowledge of the bare Lagrangian and stored in the file CT_parameters.py, already described above, or they can be identified within the complete expressions of UV counterterms usually available in an NLO UFO model allowing for exact NLO EW corrections.In this second case, it is only necessary to provide additional information allowing for the selection of the finite but logarithmic-enhanced component of the correction. 11  11 In [69,70], vertex counterterms have not been used to evaluate electroweak corrections in the Sudakov approximation In the following we briefly describe the analytical structure of the Denner-Pozzorini (DP) algorithm [68], following as much as possible the notation introduced in [70].Practical details are provided at the end of section 5.4.
We consider a process involving n external particles that we identify through the indices i 1 , . .., i n and momenta p 1 , . .., p n .The associated tree-level amplitude is denoted by M i1...in 0 , and the one-loop electroweak Sudakov corrections δM i1...in can be written as In this expression, the matrix elements M i 1 ...i n 0 are treelevel amplitudes associated with processes with n external particles that include up to two particles different from these of the original process.In addition, δ EW i 1 i1...i n in collects contributions involving logarithms or double logarithms of kinematic invariants of the process, and of the squared mass of the W boson (m 2 W ) and Z boson (m 2 Z ).The contributions to δ EW can be classified as In this expression, we have organised the corrections in their leading (δ LSC ) and subleading (δ SSC ) soft-collinear logarithmic contributions, the purely collinear logarithmic terms (δ C ), and the logarithms originating from parameter renormalisation (δ PR ).The leading soft-collinear terms can be expressed as a sum over all external legs, where the correction factors δ LSC i k i k depend on the properties of all possible pairs of states i k and i k that can couple via SU (2) L ×U (1) Y interactions.These read [71,72] where L EM collects all logarithms of purely electromagnetic origin below the m W scale, and Q k is the electric charge of the state i k .The δ LSC factor can thus be automatically derived, for any given process in any given originating from parameter renormalisation.Alternative numerical methods, involving e.g. the derivative of the relevant amplitudes, have been employed instead.These methods were employed in the first place because of missing information about vertex counterterms, which can now be suitably implemented in the file CT vertices.py.
model, once the eigenvalues of the effective Casimir operator matrix C EW and these of the I Z operator matrix are known, together with information on how the different states couple via electroweak interactions.The subleading soft-collinear contributions are given as a double sum over the pairs of external states that can couple via electroweak interactions, each term in the sum featuring the exchange of a specific neutral or charged electroweak vector boson V = A, Z, W ± .They read where the individual photon, Z and W boson corrections are respectively given by [70] Here, we have neglected the terms denoted as ∆ s→r k in [70], since they are not relevant for the present discussion.Moreover, the scale Q is the regularisation scale related to photon infrared divergences (we assume Q 2 ∼ s), r kl = (p k + p ) 2 and Θ denotes the usual Heaviside step function.As for the leading logarithms, the correction factors are hence generically known for any process in any model as soon as the eigenvalues of the I A , I Z and I ± operator matrices are provided.We now turn to the single logarithmic contributions arising from the soft or collinear regime.These are written as a single sum over the external legs of the process, Such corrections are derived from the wave-function renormalisation constants relevant to all external legs in the process (possibly involving mixing with fields sharing the same quantum numbers), as well as from the mass-singular loop diagram contributions that respectively read, for bosons and fermions [73], In these equations, m k and Q k are respectively the mass and the electric charge of the (fermionic) state k, while Q stands for the regularisation scale.The δ C corrections can hence be evaluated generically for any process in any model once the eigenvalues and eigenvectors of the electroweak effective Casimir operator C EW and the finite but logarithmic-enhanced component of the wavefunctions renormalisation constants δZ i k i k are known.The last contributions in (33) arise from the renormalisation of the input parameters of the model, like α (or G F ), m W , m Z and the masses of the Higgs boson and of the top quark.These logarithmic corrections are analogous to those associated with the wave-function renormalisation constants in (38), and include the finite but logarithmically-enhanced component of the parameter renormalisation constants.In both cases these have to be calculated externally, and they must be then provided as instances of the CTParameter and CTVertex classes.

Counterterm implementation
We reviewed in section 5.1 the origin of the UV and R 2 counterterms that are relevant for numerical NLO calculations, and how they should be defined in order to obtain correct results from an NLO UFO model.In this section, we discuss the details of the format in which such counterterms are explicitly specified.One particular difficulty that an OLP faces when making use of UFO counterterms is to ensure that their selection is consistent with the loop diagrams contributing to the loop amplitude considered.This task can indeed be complicated by the fact that OLP users are often given the freedom to filter out any gauge-invariant selection of loop diagrams.It is therefore desirable that the OLP is able to enforce a strict correspondence between the loop diagrams generated and the associated counterterm.
For this reason, an NLO UFO model offers the possibility to group counterterms originating from a given subset of loop diagrams.A specific counterterm is then identified by a few properties that include the list of particles attached to the loop, the non-repeating set of particles running in the loop(s) 'corresponding' to this counterterm, the cumulative coupling orders (see section 3.3) appearing in the loop vertices, and a keyword identifying the nature of the counterterm as well as how it is intended to be matched to the contributing loops.
We start our discussion of these properties with the example of the QCD R 2 counterterm for the triplegluon vertex, encoded in the class CTVertex, that therefore features a few new attributes relative to the class Vertex previously introduced: The triple nested structure of the loop particles attribute allows users to group together similar contributions, while retaining the correct counterterm multiplicity in the case where only a subset of particles is selected at the level of the OLP.In this example, the R 2 counterterms stemming from each fermion species are all equal to the coupling R2 3Gq labelled by the key (0,0,0) in the couplings attribute.Here, the third index refers to the position in the loop particles list while the first two indices refer to the particular colour and Lorentz structure considered (as for standard vertices in a UFO model; see section 3.3).
The type of the counterterm encodes not only its nature but also how the OLP should match it to the loop diagrams present in the computation.R 2 counterterms are specified by setting the attribute type to the value R2.By construction and for a given set of external particles, one such counterterm must be included for each possible loop in the model, i.e. for each loop with the specific external particles considered that has given particles running in it, and with given cumulative coupling orders.Counterterms with the attribute type set to the value UVmass take their name from the mass renormalisation constants, and they feature a similar one-to-one correspondence to the (two-point) loop diagrams generated by the OLP.Their matching is therefore performed exactly like for counterterms of type R2, the type keyword serving to encode this time the UV nature of the counterterm.On the other hand, counterterms for which type attribute is fixed to the value UVloop (or UV) should not be considered by the matching procedure.The loop particles attribute is in this case only used to discard the counterterm if any of its specified loop particles appears as having been globally excluded from the process definition by the user.Finally, counterterms for which the attribute type is set to UVtree do not have a direct correlation to any particular loop diagram, and as such they should be constructed independently.Their contribution must be built exactly like that of tree-level diagrams, while however enforcing the presence of exactly one such counterterm vertex per diagram.This type of counterterm is for example well suited to implement counterterms restoring supersymmetry when it is explicitly broken by dimensional regularisation.
The need for a distinction between the types UVmass and UVloop may seem unnecessary at first, so we illustrate its use-case with the UV QCD counterterm Z gd d of the vertex gd d.Such a counterterm is defined by which depends on the wave function renormalisation constants associated with the particles incoming to the vertex and with that of the relevant coupling.This highlights the fact that the loop particles associated with the counterterm Z gd d are not directly related to the corresponding loop diagrams, but rather to the loop particles originating from the explicit calculation of the involved renormalisation constants.This leads to a lack of direct correspondence between a vertex counterterm and its corresponding loop corrections.The listed loop particles cannot thus be matched directly to the particle content of the contributing diagrams, and they only represent an overall list of allowed particles in the process.According to the UFO standard, this counterterm is defined with type UV ≡ UVloop, A more detailed and technical description of the vertex renormalisation and loop particle matching procedure can be found in eqs.(2.80)-(2.87) in [20].
We now discuss the implementation of the couplings assigned to CTVertex instances.The main difference of the model, there are a few limitations to writing counterterm couplings.First, the value attribute of a counterterm coupling can be either a string or an expansion dictionary.When the latter is used, the string expression of its values can only involve instances of Parameter, but not of CTParameter.Second, when writing the coupling value as a string, it must correspond to a term whose summands each contain at most k occurrences of CTparameter objects for a UFO model suitable for N k LO computations.At NLO, the expression '2*ParamA*CTParamB + 4*CTParamE' would be acceptable (one CTParameter instance in each of the two summands), but '2*CTParamA*CTParamB + 4*CTParamE' would not (two CTParameter instances in the first term).
Additionally, the UFO 2.0 format does not explicitly differentiate the UV and infrared quantities UV and IR in the expansion dictionaries.The distinction between them can however be retained at NLO by using reserved parameters named epsUV and epsIR as multiplicative factors, that are defined as external parameters in a Les Houches block TECHNICAL. 13In addition, NLO UFO models include a LOOP block that is reserved for the renormalisation scale parameter MU_R that appear in loop integrals.
Before closing this section, we now discuss how to implement in an NLO UFO model the information necessary for the calculation of electroweak Sudakov corrections to any matrix element in the leading and subleading logarithmic approximation.As detailed in section 5.3, these corrections can be generically derived for any process from the knowledge of the eigenvalues of the electroweak effective Casimir operator matrix C EW , that of the photon, Z-boson and W -boson operator I A , I Z and I ± , and from information on which pairs of states interact through electroweak interactions (and of course how).Additional quantities such as the coefficients of the related beta function or Dynkin operators may also be useful in this context, and can be further added to this list (see [68]).
In the following, we first consider as an example the matrix associated with the electroweak Casimir operator when it acts on neutral weak bosons, [ In this example, the EWOperator object considered is defined through four mandatory attributes.The first of them consists of its name (name), and the second of them, type, can either take the value 'casimir' (for the eigenvalues of the effective electroweak Casimir operator, like in the above example) or refer to one of the electroweak bosons of the theory (for the various I V operators, as illustrated in the next example below).The value of the attribute particles is a list that provides information on the states relevant for the operator considered.This primary list includes a single list for the electroweak Casimir operator C EW and the 'neutral' operators I A and I Z , and two lists for the 'charged' operators I ± that connect different elements of the weak multiplets of the model.The (non-zero) matrix elements of the operator are finally provided through the value of the attribute elements, that contains a dictionary mapping any non-zero element of the matrix to a Parameter object (declared as detailed in section 3.2).
As another example, we provide a possible implementation of the I + operator, for the case in which it acts on left-handed quarks,14  This time the attribute particles contains two lists of particles, as the I + operator relates up-type fermions (the first list, [ P.u, P.c, P.t]) and down-type ones (the second list, [ P.d, P.s, P.b]).Moreover, an optional attribute (chirality), relevant when fermions are involved, has been included in the declaration.Its value indicates that only the left-handed components of the fermions involved is concerned.
In addition to the information provided above, the derivation of all logarithmic corrections to any given matrix element shown in (33) requires to include those stemming from parameter and wave-function renormalisation.This can be achieved automatically once the renormalisation constants are computed or, in the case of a model that allows for electroweak corrections in the Sudakov approximation but not for exact NLO electroweak corrections, they have to be calculated for this purpose.In both cases, it is necessary to access directly the finite but logarithmically-enhanced component of the parameter counterterms and possibly their impact in vertex counterterms.The analytical results should therefore be provided, through declarations of CTParameter and possibly CTVertex objects relevant to the implementation of counterterms (see above).

Conclusion
In this paper, we have presented the current 2.0 update of the UFO format for (B)SM models, that we have coined the 'Universal Feynman Output' format.This new name has been adopted to distinguish the current format from its initial version, as the UFO has evolved significantly during the last decade.Moreover, the UFO is not solely connected with FeynRules anymore, but it lies at the heart of many high-energy physics software tools.
The UFO 2.0 format includes several new features that were not part of the initial proposal, thanks to the flexible and modular structure that drove the design of the UFO ten years ago, and that allows it to be easily expandable and encompass features relevant for the interest of high-energy physics software at a given time.Initially, the UFO format has been designed to include information on a model's particles, the list and values of the parameters appearing in the model's Lagrangian and the associated interaction vertices.In addition to such information, UFO 2.0 models can optionally include information on the particle's decay widths, on the renormalisation group running of the model's parameters and masses, and on ingredients relevant for automatic higher-order perturbative calculations.Moreover, users can include form factors and enforce the usage of custom propagators in their implementation.Whereas some of these features were already described in earlier publications, others have never been documented officially in any scientific article.
It was the aim of the present paper to release the most up-to-date documentation of the UFO format, collecting in a single document information about all features that could be present in a UFO model, from the initial mandatory ones to those subsequently developed during the last decade.