---
title: 'MadAnalysis 5: Collider Phenomenology Framework'
url: https://www.emergentmind.com/topics/madanalysis-5
type: topic
---

# MadAnalysis 5: Collider Phenomenology Framework

MadAnalysis 5 (MA5) is an open-source framework for collider phenomenology and LHC reinterpretation that processes Monte Carlo event samples at parton level, hadron level, and reconstructed level. It was introduced as a user-friendly environment coupling a Python-based front-end to a C++ analysis kernel, and it subsequently developed into a broader recasting platform that includes detector-simulation interfaces, multi-region analysis management, a public database of validated ATLAS and CMS analyses, and multiple statistical back-ends for exclusion and sensitivity studies [1206.1599] [2507.08927].

## 1. Foundational architecture

MA5 is organized around two principal layers. In normal mode, analyses are written through an interactive Python command-line interface using a dedicated metalanguage for importing datasets, defining particle and multiparticle labels, plotting observables, and applying selections. In expert mode, analyses are implemented directly in C++ inside the SampleAnalyzer core, which exposes event readers, unified internal data formats, physics services, and output writing [1206.1599].

The architectural split is central to the software’s identity. The Python layer automatically generates a C++ analysis, compiles and links it to the SampleAnalyzer library and optional tools, executes it, and stores the results in the XML-based SAF structure. The front-end then renders reports in HTML, PostScript/LaTeX, or PDF that include histograms and selection efficiencies. This design preserves an interactive workflow for rapid prototyping while retaining a compiled execution path for large event samples and more complex analyses [1309.7831].

From the outset, MA5 was positioned as a framework for professional analyses of simulated signals and Standard Model backgrounds, including event selections to isolate signals, kinematic distributions, cutflows, and user-defined signal-over-background ratios. A plausible implication is that MA5 was designed not merely as a plotting utility, but as an analysis environment intended to support both exploratory phenomenology and reproducible reinterpretation workflows [1206.1599].

## 2. Analysis construction and event-processing workflow

MA5 accepts event samples generated by Monte Carlo event generators in several standard formats. Across the documented releases, supported inputs include LHE, StdHep, HepMC, LHCO, Delphes Root, and ROOT-based reconstructed samples, with compressed input supported when zlib is available [1309.7831] [1410.2785].

The normal-mode workflow follows a stable pattern: import samples, group them into datasets, define particle labels, plot observables, apply event- or object-level selections, submit the analysis, and open the resulting report. Representative commands include importing multiple files with wildcards, defining composite labels such as `mu = mu+ mu-`, plotting `MET` or `PT(mu)`, and applying cuts such as `reject (mu) PT < 20` or `select 80 < M (mu+ mu-) < 100` [1309.7831].

The observables available to this workflow include standard collider kinematics such as transverse momentum,
$$
p_T = \sqrt{p_x^2 + p_y^2},
$$
pseudorapidity,
$$
\eta = -\ln \tan(\theta/2),
$$
and angular separation,
$$
\Delta R = \sqrt{(\Delta \eta)^2 + (\Delta \phi)^2}.
$$
MA5 also supports invariant masses, missing transverse energy, scalar transverse-energy sums, particle ordering by hardness, and operations on four-momenta such as sums and differences [1309.7831] [1206.1599].

In expert mode, the workflow is recast into the `Initialize`, `Execute`, and `Finalize` structure of a C++ analysis class. This mode exposes direct access to `event.mc()` and `event.rec()` collections, TLorentzVector-based observables, physics helpers for boosts and event-level quantities, and custom histogram logic. The expert interface was later extended to handle multiple signal and control regions without duplicating branching cutflows, using a dedicated manager with methods such as `AddRegionSelection`, `AddCut`, `ApplyCut`, and `FillHisto` [1405.3982].

## 3. Reconstruction, detector treatment, and object-level modeling

In its earliest documented form, MA5 analyzed reconstructed objects produced by external fast detector tools such as PGS 4 and Delphes, while also supporting truth-level event analysis. Subsequent releases introduced increasingly direct control over reconstruction, first through a FastJet interface for jet clustering and later through internal detector-emulation layers [1206.1599] [1309.7831].

The FastJet integration added jet clustering in reconstructed-level mode with support for `kt`, `cambridge`, `antikt`, `genkt`, `siscone`, `cdfmidpoint`, `cdfalgo`, and `gridjet`. Users can configure the jet radius and transverse-momentum threshold, control whether leptons from the hard process feed the jet algorithm, and set matching-based b-tagging efficiencies and misidentification rates. Reconstructed events can then be exported to LHE or LHCO according to simplified conventions [1309.7831].

Later developments broadened the detector layer. MA5 added interfaces to Delphes 3 and to Delphes-MA5tune, a modified Delphes version that stores lepton and photon isolation variables in the output so that isolation can be applied at analysis level rather than hard-coded in the simulation. This was presented as essential for faithful recasting and flexible object definitions [1410.2785].

A more substantial internalization of detector modeling came with the simplified fast detector simulator (SFS), available from MA5 v1.8.51. SFS allows detector parametrization through user-defined smearing functions, efficiencies, and taggers written directly in the MA5 interpreter, with C++ code generated automatically at run time. The documented comparison with Delphes states that predictions generally agree to a level of about 10% or better, while SFS is often a factor ~2 faster within recasting and can produce output files up to ~100× smaller in default settings [2006.09387].

The SFS was subsequently extended to long-lived particles. The added features include charged-particle propagation in a homogeneous magnetic field along the detector \(z\)-axis, computation of the point of closest approach, transverse and longitudinal impact parameters \(d_0\) and \(d_z\), configurable isolation cones for tracks, leptons, and photons, and energy scaling for reconstructed objects. These additions were used to validate recasts of displaced-lepton, disappearing-track, and displaced-vertex searches [2112.05163].

A common misconception is that MA5 itself always provides a realistic detector simulation. The historical record is more qualified: early MA5 relied on external reconstructed inputs, later versions integrated Delphes and lightweight FastJet-based options, and SFS introduced a parametrized internal emulator. The papers consistently stress that fast simulation remains an approximation and that validation against official cutflows and distributions is necessary [1206.1599] [2006.09387].

## 4. Recasting infrastructure and statistical interpretation

A decisive change in MA5’s role came with the extension of expert mode to multi-region analyses and with the creation of the Public Analysis Database (PAD). From v1.1.10 onward, MA5 supported analyses with multiple signal regions, control regions, and subanalyses, and validated implementations could be distributed through the PAD with accompanying detector cards, XML metadata, validation material, and DOI registration on INSPIRE [1410.2785] [1407.3278].

This recasting infrastructure formalized the mapping between a public analysis and MA5 outputs. The C++ analysis code produces cutflows and histograms in SAF, while a companion `.info` XML file provides luminosity, observed counts, background expectations, and uncertainties. In early recasting workflows, MA5 supplied a CLs-based script, `exclusion_CLs.py`, that used the expected signal yield
$$
N_{\text{sig}} = \mathcal{L} \times \sigma \times A \times \epsilon
$$
together with the published background information to derive exclusions [1407.3278].

The statistical layer was later expanded in several steps. MA5 v1.8 introduced explicit handling of theory uncertainties on the signal cross section, user-defined systematic uncertainties on the signal yield, and extrapolation to higher luminosities with several prescriptions for background-error scaling. These features were integrated into the recasting workflow through dataset attributes such as `scale_variation`, `pdf_variation`, and `main.recast.add.extrapolated_luminosity` [1910.11418].

Signal-region combination was then added through two complementary mechanisms: an interface to pyhf for ATLAS JSON-serialized HistFactory workspaces, and a simplified-likelihood treatment using CMS covariance matrices. The corresponding likelihoods preserve either the published HistFactory nuisance-parameter structure or a Gaussian covariance model for statistically disjoint signal regions [2206.14870].

| Method | Input published by experiment | MA5 implementation |
|---|---|---|
| Full likelihood | ATLAS JSON HistFactory workspace | pyhf interface |
| Simplified likelihood | CMS covariance matrices | simplified likelihood calculation |
| Legacy single-region limit | SR yields and background counts | CLs-based recast workflow |

The most recent statistical update described in the supplied corpus is MA5 v1.11, which moved to the Python package spey, optionally with a pyhf plugin for HistFactory models. In that version, independent regions, correlated regions, and full HistFactory workspaces are handled within a common asymptotic profile-likelihood framework, and a new `analysis_only_mode` allows efficiency-only runs without statistical post-processing [2507.08927].

These developments also address an important caveat in reinterpretation. The single “best signal region” strategy can lose sensitivity, can over-exclude in some cases, and can induce numerical instabilities when the most sensitive region changes across parameter space. This was one of the main motivations for implementing global likelihoods and covariance-aware combinations in MA5 [2206.14870].

## 5. Versioned extensions and advanced analysis capabilities

MA5’s development history is marked by the addition of specialized capabilities aimed at increasingly complex LHC analyses. The progression can be summarized through a small set of version milestones.

| Version or branch | Extension | Source |
|---|---|---|
| v1.1.8 | FastJet interface, jet reconstruction, DJR checks | [1309.7831] |
| v1.1.10 | multi-region expert mode, Delphes-MA5tune recasting workflow | [1410.2785] |
| v1.8.51 | simplified fast detector simulation | [2006.09387] |
| v2.0.4 and later in v2.0.X | HEPTopTagger integration and substructure tools | [2303.03427] |
| v1.11 | Efficiency1D, rotations/boosts, RestFrames, spey/pyhf statistics | [2507.08927] |

One line of extension concerns jet substructure and boosted-object reconstruction. In the MA5 2.0.X branch, the framework added a Substructure namespace interfacing FastJet and FastJet Contrib, together with a wrapper for HEPTopTagger v2. The documented interface allows multiple jet collections, reclustering, Variable-R reclustering, and direct invocation of the tagger in expert mode through `Substructure::HTT`. The study presenting this implementation emphasized that normal mode applies reconstruction efficiencies only to the primary jet collection, so expert mode is recommended for multi-collection substructure workflows [2303.03427].

Another line concerns frame-dependent observables and recursive jigsaw reconstruction. MA5 v1.11 introduced an `Efficiency1D` class for one-dimensional efficiency tables taken from HEPData, documented and extended Lorentz-rotation and boost utilities, and integrated the RestFrames library without ROOT by replacing vector, matrix, and minimization dependencies with MA5-native tools, Eigen, and a built-in Nelder–Mead algorithm. This infrastructure was used for soft-lepton electroweakino analyses employing jigsaw variables such as \(M_T^S\) and \(R_{\mathrm{ISR}}\) [2507.08927].

The advanced feature set has also sharpened the distinction between the two operating modes. Normal mode remains concise and interactive, but expert mode is repeatedly recommended when analyses require constituent-level smearing, multiple jet collections, full control over substructure, or bespoke region logic [2303.03427] [1405.3982].

## 6. Scientific applications, ecosystem, and limitations

MA5 has been used as the computational basis for a wide range of reinterpretation studies. In one example, existing ATLAS and CMS Run-1 searches were recast through MA5 PAD modules to constrain the radiative decay \(\tilde g \to g\,\widetilde{\chi}_1^0\), leading to the result that compressed spectra with \(m_{\tilde g} \simeq m_{\widetilde{\chi}_1^0}\) are excluded up to about 750 GeV at 95% CL under the assumption \(\mathrm{BR}(\tilde g \to g\,\widetilde{\chi}_1^0)=100\%\) [1509.03639].

In another application, MA5 PAD recasts of Run-1 ATLAS dilepton plus missing-energy analyses were used to constrain the Inert Doublet Model. That study found exclusions reaching \(m_{H^0}\) up to about 35–55 GeV, depending on \(m_{A^0}\) and \(m_{H^\pm}\), and \(m_{A^0}\) up to about 135–140 GeV for very light \(m_{H^0}\), thereby extending previous LEP limits in the \(\lambda_L \to 0\) regime [1503.07367].

The public-analysis ecosystem around MA5 has expanded through repeated community efforts. The first and second MA5 recasting workshops documented the implementation and validation of numerous ATLAS and CMS analyses across monojet, monophoton, mono-Higgs, supersymmetry, long-lived particles, seesaw models, and four-top production, with most implementations released through the PAD and associated dataverses [1806.02537] [2101.02245].

The framework’s scientific role is therefore twofold. First, it provides a reproducible environment for analysis design and phenomenological studies. Second, it acts as an interoperability layer between Monte Carlo generators, fast detector emulators, validated experimental recasts, and statistical tools. This suggests that MA5 has become a methodological bridge between phenomenological model building and the published output of the LHC experiments [1407.3278] [2507.08927].

Its limitations are explicit in the literature. Recast fidelity is constrained by the quality of the fast detector simulation, by the completeness of public experimental documentation, by object-calibration approximations, and by the availability of official likelihood information. Several papers note that fast simulation cannot replace full experimental reconstruction, that control-region handling may remain approximate, and that detector- or trigger-level details can dominate the residual discrepancies between MA5 and official cutflows [1410.2785] [2006.09387].

Source: https://www.emergentmind.com/topics/madanalysis-5