---
title: "Build jets by following the nearest pair"
description: "Compare anti-kT, kT and Cambridge/Aachen distances, preserve four-momentum, and explain the soft limit of a jet boundary."
canonical_url: "https://sandboxphysics.com/stories/collider-qcd/sequential-jet-clustering/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/collider-qcd/sequential-jet-clustering/"
last_modified: "2026-10-26"
---

[Collider physics from events to inference](https://sandboxphysics.com/stories/collider-qcd/)

FR03 · L3 · Chapter 4 of 8

# Build jets by following the nearest pair

Compare anti-kT, kT and Cambridge/Aachen distances, preserve four-momentum, and explain the soft limit of a jet boundary.

Before you beginChapters 1 and 3: four-vector addition and infrared/collinear limits. Rapidity is defined in this chapter.

Sandbox Physics · 2026-10-26

A jet algorithm groups final-state momenta by a precise rule. Sequential recombination repeatedly finds the smallest distance: either merge a pair, or declare one object a completed jet. Changing how momentum enters that distance gives the kT, Cambridge/Aachen and anti-kT algorithms. All three can be infrared and collinear safe; their clustering histories and soft boundaries differ.

## Draw the event in rapidity and azimuth

Let the beam define the longitudinal axis. Azimuth $\phi$ is the angle around that axis, in radians. Transverse momentum is the magnitude perpendicular to the beam. Rapidity $y$ uses energy and longitudinal momentum:

$$
p_T=\sqrt{p_x^2+p_y^2},\qquad y=\frac12\ln\frac{E+p_z}{E-p_z}.
$$

Two azimuths near the ends of the angular interval can be physically close. Always wrap their difference to the shortest angle. The distance in the rapidity-azimuth plane is dimensionless. A common longitudinal boost shifts all rapidities together, leaving their differences unchanged.

$$
\Delta R_{ij}^2=(y_i-y_j)^2+\Delta\phi_{ij}^2,\qquad -\pi<\Delta\phi_{ij}\leq\pi.
$$

Pseudorapidity, defined by direction alone, equals rapidity for a massless particle. After merging, a jet can have mass; the algorithm here uses rapidity computed from its summed four-vector.

## One distance family, three clustering orders

For each active pair calculate a pair distance, and for each object calculate a beam distance. The radius parameter $R$ sets the angular scale. The exponent $p$ selects the algorithm: positive one gives kT, zero gives Cambridge/Aachen and negative one gives anti-kT.

$$
d_{ij}=\min(p_{T,i}^{2p},p_{T,j}^{2p})\frac{\Delta R_{ij}^2}{R^2},\qquad d_{iB}=p_{T,i}^{2p}.
$$

Choose the smallest distance across both lists. If it is a pair distance, replace the pair by the sum of its four-momenta, called E-scheme recombination. If it is a beam distance, remove the object and keep it as a jet. Recalculate distances and continue until the list is empty. Comparing only pair distances would force unrelated objects to merge forever.

kT tends to process soft structure early. Cambridge/Aachen orders by angle. Anti-kT preferentially links a soft particle to a nearby hard one. This last behaviour produces simple soft catchment boundaries around isolated hard particles.

## Follow a soft particle numerically

Take a hard particle with transverse momentum 100 GeV, a soft particle with transverse momentum 1 GeV, radius 0.6 and separation 0.3. For anti-kT the pair distance is 0.000025 in inverse GeV squared, smaller than the hard beam distance of 0.0001. The pair merges. Move the soft particle to separation 0.9: its pair distance becomes 0.000225, so the hard particle is declared a jet first.

In the limit of a single isolated hard seed and vanishing soft momenta, this comparison gives a circular capture region of radius $R$. Nearby hard particles clip or alter that region. A circle drawn around every final jet is therefore an approximate visual guide in a general event; a true area calculation must actually cluster soft probes.

The paper’s Figure 1 uses a Herwig event and many soft ghosts to measure active areas. A small browser scene can test the local distance rule and the isolated-particle limit. Reproducing the full generator sample additionally requires its event and area-generation setup.

## Why four-vector recombination matters

Suppose equal-energy massless particles meet at a nonzero angle. Their sum has a nonzero invariant mass. An averaging rule that replaced them with a massless particle would erase that information. Adding their four-vectors preserves the energy and all momentum components exactly, which is the correct conservation check for every merge.

A tiny collinear splitting should be merged back before it alters a finite hard result. The numerical test must avoid a perfectly degenerate event where two hard jets sit exactly on a classification boundary. At such a boundary, a finite perturbation can change which side an event falls on even for a safe definition.

## Predict which jet receives the soft particle

Use the jet-clustering Lab to compare algorithms with the same input momenta. First keep the hard particles fixed and drag the soft probe across a jet boundary. Then reduce its momentum and repeat. Predict which jet receives the gold probe, then compare its final assignment and the leading-jet transverse momentum. The displayed map shows the final clustering, so use the distance calculation on paper to reason about the merge order.

For a controlled collinear comparison, first set the gold probe momentum to zero in the default event, then select the splitting preset and shrink its opening angle. Compare with that zero-probe unsplit reference, or use the momentum-change readout against its stated reference. Record the components or invariant mass, not just whether the coloured regions look alike. A different clustering history can still lead to the same physical jet. With the saved default inputs (radius 0.7, anti-kT and gold momentum 3 GeV), the leading transverse momentum is about 99.3 GeV, its mass about 16.7 GeV and two jets exceed 10 GeV. These are deterministic finite-event calculations from the labelled synthetic particle list.

## Exercises and explained answers

Exercise 1. Two massless particles with transverse momenta 20 and 30 GeV are exactly parallel. Find the transverse momentum and mass of their recombined object.

Answer. The transverse momentum is 50 GeV and the mass is zero. Energy and each momentum component add in the same direction. At a nonzero opening angle the mass generally becomes positive.

Exercise 2. Two azimuths are 3.13 and negative 3.13 radians. Are the particles almost a full turn apart?

Answer. Their shortest angular separation is about 0.0232 radians. Subtracting the two stored numbers without wrapping would incorrectly treat neighbouring particles as distant and corrupt the clustering.

Exercise 3. For the isolated anti-kT example, explain what happens exactly at separation equal to the radius.

Answer. Pair and hard beam distances are equal in the soft limit. A deterministic tie rule is needed for a finite implementation. The equality lies on the jet boundary, so scientific tests should examine both neighbouring sides and document the tie convention.

## Try the chapter’s physical question

[Cluster a soft or collinear event](https://sandboxphysics.com/labs/jet-clustering/)

## Sources and checked scope

1. [Cacciari, Salam & Soyez, The anti-kt jet clustering algorithm, arXiv:0802.1189v2](https://arxiv.org/pdf/0802.1189v2)

   Definition (1a–b), Section 2.1 and Figure 1. The classroom calculation checks isolated-hard-particle soft capture; it does not regenerate the Herwig event or the full active-area plot.

2. [Cacciari, Salam & Soyez, FastJet user manual, arXiv:1111.6097v1](https://arxiv.org/pdf/1111.6097v1)

   Sections 3.1, 3.4 and 4: four-momentum representation, E-scheme recombination and sequential algorithms. The browser implementation is a small teaching implementation, not the FastJet package.

3. [Particle Data Group, Kinematics (2024)](https://pdg.lbl.gov/2024/reviews/rpp2024-rev-kinematics.pdf)

   Sections 49.1–49.2: four-vectors, scalar products and centre-of-mass energy. Natural units are stated on page 1.

[Previous chapterChoose quantities that survive extra radiation](https://sandboxphysics.com/stories/collider-qcd/radiation-and-safe-observables/) [Next chapterRecover a spectrum after detector smearing](https://sandboxphysics.com/stories/collider-qcd/detector-response-and-unfolding/)
