Source-linked AI summary
MadGraph 5 : Going Beyond
Johan Alwall, Michel Herquet, Fabio Maltoni, Olivier Mattelaer, Tim Stelzer
TL;DR
Accurate simulation tools are needed to study complex collider final states and interpret possible new-physics signals. MadGraph 5 addresses this need with a rewritten, extensible generator supporting broad Lagrangian-based models and multiple output formats, while validation and benchmarks show agreement with MadGraph 4 and major speedups for complicated processes.
Problem
Collider discoveries require accurate simulations for complex final states and broad classes of beyond-the-Standard-Model physics.
Method
MadGraph 5 rewrites the generator in Python with FeynRules/UFO model support, modular algorithms, collaborative extensibility, and flexible Fortran, C++, and Python outputs.
Results
MadGraph 5 agrees perfectly with MadGraph 4 across more than three thousand validation processes and substantially accelerates complicated process generation, sometimes by several orders of magnitude.
Takeaways & Limitations
The resulting open-source platform supports matrix-element generation for broad Lagrangian-based models and provides a foundation for future BSM, NLO, and shower/hadronization developments.
Takeaways & Limitations
NLO automation and merging with shower/hadronization codes remain directions for ongoing future development.
Abstract
from arXiv · showhide
MadGraph 5 is the new version of the MadGraph matrix element generator, written in the Python programming language. It implements a number of new, efficient algorithms that provide improved performance and functionality in all aspects of the program. It features a new user interface, several new output formats including C++ process libraries for Pythia 8, and full compatibility with FeynRules for new physics models implementation, allowing for event generation for any model that can be written in the form of a Lagrangian. MadGraph 5 builds on the same philosophy as the previous versions, and its design allows it to be used as a collaborative platform where theoretical, phenomenological and simulation projects can be developed and then distributed to the high-energy community. We describe the ideas and the most important developments of the code and illustrate its capabilities through a few simple phenomenological examples.
1. Introduction
MadGraph 5 is introduced as a new simulation tool responding to the challenges of accurately modeling complex collider signals and backgrounds. Its main objectives are broad automation across Lagrangian-based models, NLO calculations, and matrix-element-to-shower event simulation.
- Motivation: Accurate simulations are essential for interpreting experimental discoveries, while high-energy proton collisions generate complex final states that create substantial backgrounds for new-physics searches.The stated challenges include many jets, heavy-flavour quarks, leptons, and missing energy in proton-proton collisions.
- Motivation: Monte Carlo simulations play a key role throughout TeV-scale exploration, from discovering and identifying BSM physics to measuring its properties.The need for improved LHC simulation tools has driven significant recent advances.
- Main objectives: MadGraph 5 targets Lagrangian-based BSM physics through FeynRules, full automation and optimization of NLO computations, and merging with showering and hadronization codes.The objectives cover renormalizable or effective theories, SM and beyond, and LO, NLO, and combined CKKW-at-NLO simulations.
- Software capabilities: MadGraph 5 is open-source Python software that generates tree-level matrix elements for any FeynRules model implemented through UFO and produces helicity-amplitude subroutines with ALOHA.The new version also reports significant efficiency improvements relative to MadGraph 4.
- Paper scope: The paper documents MadGraph 5’s design, algorithms, output formats, model inheritance, validation checks, and performance improvements over previous versions.It also describes process-library generation for Pythia 8 and tests involving SM, MSSM, HEFT, and RS processes.
2. Overview and algorithms
MadGraph 5 uses a Python-based, modular design and new algorithms to generate matrix elements more efficiently than earlier versions. Its recursive diagram generation, symbolic colour treatment, and successive-process decay chains improve optimization, flexibility, and functionality.
- Implementation: MadGraph 5 is written in Python, enabling new algorithms, faster execution, and selective use or extension of program modules.The object-oriented implementation removes restrictions inherent in the Fortran versions.
- Diagram generation: The diagram-generation algorithm uses model information to construct only valid topologies and recursively generates diagrams in parallel, recycling shared subdiagrams.A grouping flag distinguishes merged from copied particles to prevent double-counting.
- Diagram generation: Shared subdiagrams can be reused across diagrams, yielding up to a factor hundred fewer wavefunction calls than expected from the number of Feynman diagrams.This reuse occurs during helicity-amplitude evaluation.
- Helicity amplitudes: MadGraph 5 postpones fermion-flow definition until helicity-amplitude call generation, making generated diagrams independent of fermion flow.This separates diagram generation from fermion-flow handling.
- Colour treatment: Its symbolic colour algebra provides complete flexibility and supports straightforward implementation of new structures such as colour sextets and colour-triplet ǫ tensors.Higher-dimensional colour representations can be implemented similarly.
- Decay chains: Decay chains are defined as successive chains of processes, allowing quick and efficient generation of virtually unlimited nested decay chains.A core process can contain decay processes, which can themselves contain further decays.
3. Outputs
MadGraph 5’s modular design broadens matrix-element and model outputs beyond Fortran 77 to Fortran 77, C++, and Python, including dedicated Pythia 8 libraries. It also optimizes multiprocess event generation and introduces a new algorithm for drawing diagrams with more general vertices.
- Output formats: MadGraph 5 supports matrix-element outputs in Fortran 77, C++, and Python, enabled by its modular design, UFO output, and ALOHA implementations.Fortran 77 includes MadEvent and standalone evaluation outputs; C++ includes standalone and dedicated Pythia 8 outputs.
- Multiprocess generation: Multiprocess generation is accelerated by improved process and event-generation algorithms, including checks for conserved quantum numbers and memory of failed processes.These measures reduce attempts to generate processes without diagrams and skip processes related by crossings of failed processes.
- Multiprocess generation: Grouping subprocesses with identical external-particle spin, colour, and mass reduces integration channels and required disk space, while also shortening event-generation times.MadGraph 5 combines such processes into single subprocess directories and matches their diagrams to combined integration channels; sample runtime reductions are reported in Table 2.
- Pythia 8 output: MadGraph 5 generates C++ matrix-element libraries for Pythia 8, where externally supplied processes are treated like Pythia core processes and support new-physics models.The automatically generated processes showed perfect cross-section agreement with internal Pythia processes across varied Standard Model and MSSM tests.
- Diagram drawing: A new diagram-drawing algorithm overcomes MadGraph 4’s restriction to three- and four-point vertices and its non-guaranteed length-minimization procedure.The replacement organizes vertices into level-based classes, addressing limitations that could produce zero-length lines.
4. Models
MadGraph 5 uses the generator-independent UFO format, built on FeynRules, to support flexible model implementation and automatic HELAS-code generation through ALOHA. It also provides model restrictions, consistency checks, backward compatibility with MadGraph 4 models, and a library of publicly available models.
- Model representation: MadGraph 5 models are built on FeynRules and written in the generator-independent UFO format, with backward compatibility for MadGraph 4 models lacking spin-3/2-or-higher particles.UFO translates complete model information into a Python module that can be linked to existing codes.
- Model library: The release includes several publicly available FeynRules models, marked in Table 3, plus additional example models such as four-fermion interaction models.The additional four-fermion models are used in Sec. 6.2.
- Automatic code generation: ALOHA automatically generates the HELAS routines required for Feynman-diagram calculations from UFO model information.It produces wave-function and amplitude routines for leading and higher orders, with Fortran, C++, and Python outputs.
- Automatic code generation: The UFO–ALOHA approach removes MadGraph 4’s intrinsic limitations on arbitrary new-physics models caused by its restricted HELAS Lorentz structures.This avoids manually writing and testing new routines for extensions such as higher-spin particles.
- Model restrictions: Restriction files optimize generated matrix-element and multiprocess output by eliminating vanishing parameters and interactions and merging identical parameters and couplings.MadGraph 5 evaluates internal parameters and couplings from a BSM-LHA restriction file before modifying the model.
- Consistency checks: MadGraph 5 validates model implementations with permutation, gauge-invariance, and Lorentz-transformation checks, which together provide a powerful validation method.The checks compare matrix elements across external-particle permutations, replace massless-vector wavefunctions by momenta, and compare values before and after Lorentz boosts.
5. Validation and speed benchmarks
MadGraph 5 was validated against MadGraph 4 and other generators across multiple model and output configurations, with more than three thousand processes showing perfect agreement. Benchmarks also show the largest generation and matrix-element evaluation speedups for complicated processes, enabled by improved wavefunction recycling.
- Physics validation: More than three thousand processes showed perfect agreement across all three MadGraph configurations and the MadGraph 4 results.The configurations used UFO input with Fortran 77 or C++ output, and MadGraph 4 model input with Fortran 77 output.
- Physics validation: Systematic cross-section comparisons covered 2 →2 and 2 →3 processes in the SM and MSSM against MadGraph 4, CompHEP/CalcHEP, and Whizard.The comparisons used the Feynrules web validation interface.
- Generation benchmarks: Generation-speed gains are largest for complicated processes, including multiprocesses, high-multiplicity final states, and decay chains.The benchmark measures complete MadEvent directory generation, including matrix-element output code and files for phase-space integration and event generation.
- Matrix-element evaluation: Improved recycling of subdiagram wavefunctions reduces helicity wavefunction calls, making generated matrix-element code faster and more compact.The resulting run-time improvements are especially substantial for complicated processes.
6. BSM example applications
MadGraph 5 demonstrates BSM phenomenology through diquark production, jet matching, four-fermion interactions, and effective Higgs–gluon operators. These examples show that it handles complex vertices directly, reproduces effective-theory behavior within its validity range, and evaluates the new operators faster than MadGraph 4.
- Diquark resonances: MadGraph 5 computes 7 TeV LHC cross sections for colour sextet and antitriplet scalar diquarks with specified quark couplings.Colour sextets couple to diagonal and off-diagonal flavour combinations, while colour antitriplets couple only to off-diagonal flavours because of antisymmetric colour contraction.
- Diquark resonances: Jet matching is necessary for a precise description of high-pT radiation in 500 GeV sextet diquark production.The comparison uses kT-MLM matching with matrix elements for pp → D + 0, 1, 2 jets versus leading-order pp → D with Pythia showers.
- Four-fermion interactions: Four-fermion and explicit-propagator formulations agree up to a centre-of-mass energy of about 1/10 of the propagator mass.Near the propagator mass, t-channel cross sections level off while s-channel cross sections show a Breit-Wigner peak.
- Effective Higgs–gluon operators: MadGraph 5 directly handles the Hgggg effective vertex required by QCD non-Abelian structure, without the auxiliary tensor particle used previously.Together with ALOHA, it treats this five-particle vertex in the same way as other vertices.
- Effective Higgs–gluon operators: Approximately four times faster cross-section evaluation was achieved for the validated effective Higgs–gluon model compared with MadGraph 4.Validation compared MadGraph 5 with a private, not fully automatic MadGraph 4 implementation, while matrix elements were automatically provided for processes involving the new operators.
7. Conclusions and Outlook
MadGraph 5’s complete Python rewrite produced a modular, robust, extensible collaborative platform, while its new structure enables developments in BSM, NLO, and shower/hadronization-code merging.
- Conclusions: The Python rewrite yielded a modular code with embedded robustness and sanity checks, organized as a collaborative platform that skilled users can exploit, modify, and extend.The redesign builds on twenty years of experience with the Fortran version and expands the code’s functionality.
- Outlook: New code structures and functionalities open development directions in BSM, NLO, and merging with shower/hadronization codes.Work in all three directions is in progress.
- Outlook: The direct FeynRules model-database link enables quick, robust implementation of new physics models and 1-loop counterterms for automatic NLO computations in the SM and beyond.The counterterms are identified as essential ingredients for achieving automatic NLO computations.
A. Installation and Online Web Version
MadGraph 5 supports both local installation and online use after free registration. Local use requires Python 2.6 or higher but not Python 3.x, while the web version provides online event-generation capabilities.
- A. Installation and Online Web Version: MadGraph 5 can be used locally or directly online on the web after free registration.The code is downloadable from https://launchpad.net/madgraph5, and three public clusters are currently available online.
- A. Installation and Online Web Version: Local execution requires Python 2.6 or higher, excluding Python 3.x, and needs no compilation or configuration.After unpacking the package, users launch the main script.
- A. Installation and Online Web Version: Users can learn MadGraph 5 through the command-line tutorial, with the complete command list provided in Appendix B.Entering tutorial in the command-line interface starts the tutorial.
- A. Installation and Online Web Version: Online MadEvent Fortran output can be generated and downloaded as a standalone process directory.By request, users may run event generation on a cluster and pass events through Pythia 6 for hadronization with Delphes or PGS fast detector simulation.
B. Command line user interface … C.2 Stop pair production
MadGraph 5 provides an extensible command-line interface that exposes process generation, model import, checking, launching, and multiple output formats. The examples demonstrate scripted process generation for top-pair cross sections and stop-pair matrix-element evaluation.
- B. Command line user interface: The Python-based command-line interface supports tab completion, command history, help texts, shell commands, and access to MadGraph 5 functionality.Users can import models, generate processes, draw Feynman diagrams, and generate output through the interface.
- B. Command line user interface: MadGraph 5’s syntax remains similar to MadGraph 4 while requiring spaces between particle names and modifying decay-chain syntax for greater flexibility.The interface can also execute command sequences from text files, and interactive tutorial mode helps users learn common commands.
- B. Command line user interface: The interface supports process-management commands including add process, generate, import, launch, and output.The output command provides MadEvent, stand-alone Fortran, Pythia 8, and stand-alone C++ formats.
- C. Process generation examples: The process-generation examples show command sequences that can be pasted into the interactive interface or executed from a text file.These examples generate code for square matrix elements of various processes.
- C.1 Top-quark pair production: The top-quark pair-production example evaluates a cross section and generates partonic events in the Standard Model.The launch command performs the cross-section computation and event generation, with options documented through help launch or the output README.
- C.1 Top-quark pair production: When coupling orders are unspecified in QED-and-QCD models, MadGraph 5 chooses minimal QED and maximal QCD orders to retain the dominant contribution.Additional QED-coupling diagrams are treated as negligible sub-leading contributions.
- C.2 Stop pair production: The stop-pair example evaluates a square matrix element at a phase-space point by importing the MSSM and generating both t1 t1~ and t2 t2~ subprocesses.generate clears previous processes, whereas add process preserves them and adds a new process; standalone output is then launched.
C.3 Slepton pair production · C.4 W +jj production · C.5 Graviton-jet production
These examples demonstrate MadGraph 5 workflows for slepton-pair event generation, W+jj Feynman-diagram output, and C++ matrix-element evaluation for graviton-plus-jet production. They also show multi-particle labels, coupling-order control, model-particle inspection, and external-generator configuration.
- C.3 Slepton pair production: C.3 demonstrates generating all slepton-pair subprocesses for Pythia 8 using a multi-particle label instead of listing each subprocess individually.The example uses the MSSM and defines sl- and sl+ as grouped slepton labels.
- C.3 Slepton pair production: The slepton workflow imports the MSSM, defines grouped charged sleptons, generates p p > sl+ sl-, and launches the Pythia 8 output.The command sequence is given explicitly in the example.
- C.3 Slepton pair production: Pythia 8 must be installed for event generation, with MadGraph 5 defaulting to ./pythia8 when no installation path is supplied.The default path can be changed by editing ./input/mg5.
- C.4 W +jj production: C.4 shows how to create EPS files containing Feynman diagrams for a specified process set.The example uses the W+jj production process.
- C.4 W +jj production: The W+jj command generates p p > W+ j j and displays the diagrams in the chosen output directory.The diagrams are written as .eps files.
- C.4 W +jj production: Without a specified coupling order, MadGraph 5 minimizes the allowed QED orders; in this example, the selected order is QED=1.A full expansion in αem requires specifying where the expansion should stop.
- C.5 Graviton-jet production: C.5 evaluates a squared matrix element in C++ for Randall-Sundrum graviton production with one additional jet.The workflow imports the RS model, generates p p > y j, outputs standalone_cpp, and launches.
- C.5 Graviton-jet production: In the Randall-Sundrum implementation, y denotes the graviton, while display particles reveals particle names and provides information about a selected particle.The model contains QED, QCD, and QTD coupling-order labels, with QTD linked to the graviton sector; three orders prevent MadGraph 5 from guessing a suitable hierarchy.
C.6 Gluino decay
This example evaluates the partial decay width for gluino decay into u¯uχ0 1 through a lefthanded squark. The calculation is requested with MadGraph’s process-generation and launch command, with the result reported in GeV.
- C.6 Gluino decay: The example evaluates the partial decay width for gluino decay into u¯uχ0 1 through a lefthanded squark.
- C.6 Gluino decay: The calculation is launched with the command generate go > ul > u~ u n1 output madevent launch.
- C.6 Gluino decay: The intermediate particle requested between the two > symbols is present in all diagrams as an s-channel propagator, without requiring it to be strictly on-shell.The decay-width result is given in GeV.
C.7 Top-pair production with one leptonic decay
MadGraph 5 supports specifying decays of nearly on-shell particles by stating the core process and then indicating the decay and any sub-decays. The full process may be written on one line or divided using a line-continuation symbol.
- C.7 Top-pair production with one leptonic decay: MadGraph 5 lets users specify the decay of a nearly on-shell particle after stating the core process.The decay syntax follows the logic of first stating the core process and then indicating the decay(s).
- C.7 Top-pair production with one leptonic decay: Sub-decays are enclosed in parentheses, as illustrated by hadronic W+ and leptonic W- decays in top-pair production.The example specifies t > W+ b with W+ > j j and t~ > w- b~ with W- > l- vl~.
- C.7 Top-pair production with one leptonic decay: The complete process can be written on one line or split across lines with the line-continuation symbol \ .This formatting option applies to the full process specification.
D. The test suite
MadGraph 5 includes a comprehensive test suite for installation and ongoing development, supporting bug prevention, package stability, and robust multi-developer work. It combines dedicated unit tests, interface checks, and compatibility tests against MadGraph 4 across several models and model formats.
- D. The test suite: The test suite is used to validate installation and development, with tests required for every new functionality to prevent bugs and maintain package stability.The authors describe the suite as essential for a robust multi-developer approach and advise developing it alongside the code.
- D. The test suite: More than 400 independent unit tests check each class or function, including expected outputs and behavior under incorrect input.Each code component has dedicated tests intended to fully check its behavior in specific cases.
- D. The test suite: Interface tests simulate user instructions to verify that modules work together and that example workflows produce the expected results.These tests check both module interfacing and the successful execution of representative examples.
- D. The test suite: Compatibility tests compare MadGraph 5 outputs with MadGraph 4 across SM, MSSM, and HEFT models using both UFO and version 4 models.The checks are designed to ensure agreement with the previous version under multiple model configurations.