Generating events
Events rather than a number: a sample of the process, drawn in phase space, which you page through, whose distributions you plot, and on which you place selections.
This workspace came with version 1.2. In 1.0, TreeLevel computes the process without drawing events from it — see Computing a process.
The panel, the event, the statistics
The toolbar selector (Compute · Generation · Detector) switches the whole window; the three workspaces share the document. In Generation, the left pane takes the process defined in Compute and sets , the number of events, the seed and the cuts; Generate draws unweighted events (acceptance–rejection on RAMBO phase space , all valid diagrams summed) and gives or with the unweighting efficiency. A selector gives the generator: TreeLevel — parton level alone, or one of those that TreeLevel Tools brings, which take the computed event and shower it, hadronise it and make it decay. A picker gives the generator: TreeLevel — parton level alone, or Pythia 8 once its module is installed, which takes the computed event and showers it, hadronises it and makes it decay; Herwig, Sherpa, WHIZARD and CalcHEP are not offered on the iPad. Export writes the events as Les Houches (.lhe) or HepMC3 (.hepmc) and Import… reads those formats back, including files from other generators.
In the middle, one event: transverse (–) and longitudinal (–) projections of the momenta, the particle table (, , , , mass, mothers), the mother → daughter cascade for a full HepMC3 file; the ◂ ▸ arrows step through the sample. On the right, the statistics: the histogram of a variable (, , , , per species; visible invariant mass, mass of the hardest pair, missing transverse energy, , number of jets, thrust, multiplicity) with error bars, y axis in pb or in events, log scale, enlargement and export; a selection (window on the variable) with its binomial efficiency, the selected cross section and the events expected at the chosen luminosity, with the Poisson interval.
Enlarged with a click, the projection offers a light grid, with a round mesh in GeV shown in the corner; on a logarithmic scale there is no regular mesh, and no grid.



The collider mode
Everything above starts from a process: these two particles come in, those come out, and one computes the cross section. A real machine is not commanded that way. You fix the beams and the energy, it produces what it produces, and it is by counting that one measures. The collider mode does exactly that.
It is a checkbox under the generator, in the Generation workspace, and it asks nothing of the Compute workspace: neither the beams, nor the energy, nor the final state. Two selectors give the incoming particles — —, a field gives , and nothing is filtered on the way out.
The open channels
A machine does not do just anything: what it can do depends on what comes in. Each family of hard processes is a checkbox, and only those these beams can take are offered.
- Single boson — annihilation into a , a Z or a W, which materialises into a fermion pair. It wants a particle and its antiparticle, or two hadrons whose partons see to it.
- Boson pair — WW, ZZ, ZW. These channels light up by themselves above threshold and stay silent below: no threshold is written into TreeLevel, the generator deduces them from the energy.
- Boson exchange — the t channel: the beams scatter off one another. Nothing annihilates, and that is what makes an electron–proton ring legitimate — HERA was one.
- Hard QCD — two partons collide. It is the bulk of what a proton ring produces: without it, a hadron machine gives nothing but Drell–Yan.
- Photoproduction — the lepton comes in not as a lepton but as the cloud of quasi-real photons it radiates. At HERA it is worth several times deep inelastic scattering.
- Total cross section — everything two hadrons do, elastic and diffractive included. It is the only setting under which “everything the beams produce” is literally true: a hundred millibarns at 13 TeV, against the millibarn of hard scattering.
Two of these boxes switch others off, and the application says so where you tick them rather than by a refusal after the fact. Photoproduction replaces the beam: the lepton stops colliding as a lepton, and the annihilation channels then produce nothing. Having them all takes two runs, which TreeLevel offers to assemble — each supplying the share its cross section earns it. And the total cross section already contains hard scattering, which its multiple interactions manufacture: the two together would count the same events twice, and are refused together.
Measuring instead of computing
An optional box, measure the cross section of the drawn process, counts in this mixture the events that carry the signature of the diagram in the Compute workspace — provided it comes in through the same beams. The proportion, multiplied by the total cross section, gives a measured cross section, with its error bar, facing the one the tree computed.
The two do not coincide exactly, and the reason is the whole point of the exercise. On at 200 GeV:
| raw count, any muon pair | |
|---|---|
| with | |
| computed at tree level |
The raw count is two and a half times the computation, and that is not an error: a photon emitted before the collision lowers the energy the mediator actually had, and above the Z it most often brings the collision back onto the resonance. Those events are the same process at another energy, and they dominate. Requiring the final state to carry the energy of the collision sets them aside.
It is not the presence of a photon that counts but the energy it carries away: a photon collinear with an outgoing particle is given back to it, since no detector separates them and the computation already contains it. Rejecting every event that radiated would lose half the signal — soft and collinear emissions are the real corrections that cancel against the virtual ones.
The threshold can be set. Between and the answer is flat: below the radiative return comes in, beyond the requirement eats into the process itself. That plateau is worth visiting — it is what shows that a cut is not an arbitrary setting.
A final state containing a , a W, a Z or a top cannot be looked for: it is gone before the detector. The application says so instead of counting zero.
The Machine source: what the experiment records
At the top of the panel, Event source offers two answers. Process draws the events of the process in the Compute workspace: two particles come in, those go out. Machine asks another question, that of a real experiment: I send a particle x onto a particle y at this energy — what comes out? Everything that can happen happens, each with its probability, and one measures by counting. The Machine source owes nothing to the Compute workspace: there you choose the beams, the energy, and what the experiment records.
On the iPad, the Machine source appears once the Pythia 8 module is installed: Pythia is the only generator that drives it. Lepton and photon beams need nothing more; protons and antiprotons also want the hadron data.
I send x onto y
What can happen depends on what the beams are and on the forces they feel.
| beam | what it is | forces |
|---|---|---|
| electron, positron, muon | point-like | electromagnetic, weak |
| neutrino | point-like | weak only |
| proton, antiproton | composite: quarks and gluons | strong, electromagnetic, weak |
| photon | point-like, but fluctuates into quark–antiquark pairs | electromagnetic, and strong through its fluctuations |
Between two leptons the collision is clean: all the energy is available. With a proton, two partons meet, each carrying a varying fraction of the energy, and the proton can also react as a whole — bounce off, or break up softly.
One choice, sorted by interaction
Below the beams, What the experiment records is a single choice: everything the detector sees, or one phenomenon. Those these beams do not allow are greyed out, and hovering over them says why. The cross sections below were measured with Pythia 8.3.
- Everything the detector sees — the machine as it is, in nature's proportions. Between two protons it is the inelastic cross section: 78 mb at 13 TeV, almost only soft collisions; the elastic bounce, which leaves the protons in the pipe, is not counted. With a lepton, it is the annihilations, the scatterings, the exchanged W's and the photon collisions, each in its proportion: since the photon flux replaces the beam, two draws are made and combined.
- Electromagnetism — scattering by a photon (or a Z). The beams graze and deflect each other: Rutherford, Bhabha. On an electron–proton ring the photon probes the proton's quarks — deep inelastic scattering, 112 nb at HERA above . Very frequent at small angles, infinite without a threshold.
- Neutral current — annihilation into . A particle and its antiparticle annihilate into a virtual photon or a Z, which rematerialises as a pair: , , quarks turned into jets, neutrinos. At 200 GeV, 119 pb; without the radiation of the beams, 33 pb — a photon emitted before the collision most often brings the energy back to the Z peak. At the peak, neutrinos alone weigh 11.9 nb: this number fixed the number of neutrino families at three.
- Charged current — the W, exchanged or produced. The W carries a charge: it is not born alone from an pair, but is exchanged there in the t channel — , 29 pb at 200 GeV, a single photon in an empty detector. On an electron–proton ring, ; between two protons, , 144 nb at 13 TeV.
- Self-coupling — boson pairs WW, ZZ, ZW: this is where the coupling of the bosons to each other shows, which the photon lacks. 17 pb of WW and 1.4 pb of ZZ at 200 GeV; 98 pb of pairs at 13 TeV. It takes enough energy: 161 GeV for WW.
- Strong interaction — jets: two partons collide and fly off at large angles, 0.72 mb above 20 GeV of at 13 TeV. Photoproduction: the lepton enters through the photon it radiates, 279 pb of jets above 20 GeV at HERA. Soft collisions: the proton as a whole, 100 mb at 13 TeV, with no threshold.
Why a single choice
A real experiment receives everything, but in proportions that range from one to ten billion: at the LHC it takes about ten billion collisions to see one W pair. It does not run long enough to record everything; it sorts on the fly — that is its trigger. Choosing a phenomenon is that sorting. Mixing everything by hand would have three faults physics does not forgive:
- some families have no total: scattering by a photon and parton scattering diverge as the collision softens — at 200 GeV, 274,000 pb of Bhabha at the generator's default threshold, against 119 pb of annihilation;
- some describe the same thing twice: soft collisions already contain the jets, which their multiple interactions make; photoproduction and scattering on an ep ring are the same at different transfers;
- and the generator adds the families without letting them interfere, whereas nature, for , adds the amplitudes before squaring them.
Mixed naively at 200 GeV, 4,000 collisions give 3,999 Bhabhas, one annihilation and no W — and a family no event populated does not even get an estimated cross section.
The thresholds
A phenomenon that needs a threshold carries its own, and only it. Scattering is set by the transfer — how hard the beams hit each other. Left at zero, TreeLevel ToolsPythia sets what a detector sees: ten degrees of deflection on a lepton ring ( at 200 GeV; the deflection is shown next to the field), on an electron–proton ring. Jets are set by their transverse momentum, twenty GeV by default. That default hides almost all the two-photon physics of a lepton ring, made of softer jets: 0.04 pb above 20 GeV at 200 GeV. To see it, lower it.
The luminous region
Collisions do not happen at a point but in the volume where the two bunches cross: narrow across, long along the beam. The sizes are those of typical machines — for two leptons (LEP), for an electron–proton ring (HERA), for two hadrons (LHC); on a fixed target, the target fixes the point. In the Detector workspace, the enlarged – cut shows the primary vertex wandering from one event to the next.
Measuring instead of computing
Below the phenomenon, final state sought takes the PDG codes of what one wants to count — 5 −5 for a pair —, and two cuts say what a detector accepts: and the visible mass, as a fraction of . The fraction of events kept, times the cross section of the sample, gives a measured cross section, with its counting error bar. To compare it with the tree-level calculation, switch to the Compute workspace: the two do not answer the same question, and the second cut is what brings them together — a photon emitted before the collision lowers the useful energy and, above the Z, most often brings it back to the pole.
A neutrino cannot be seen. To look for the way an experiment does, ask for the photon, 22, and for missing energy above a threshold in GeV: the transverse momentum carried off by whatever no detector records. A measurement may ask for that alone. Putting the neutrino codes in the final state sought reads the generator's truth, and the panel points this out.
Filtering the events
The Filter button, next to the arrows that step through the sample, makes them step only through the events that meet given criteria. The criteria add up:
- the hard process, under the name the generator gives it, with the number of events it produced in the sample — Pythia writes into every event the process that produced it;
- the content: at least so many electrons, muons, charged leptons, photons, , jets;
- the kinematics: missing transverse energy, of the leading object, a same-type pair in a mass window — two muons between 81 and 101 GeV for a Z —, and the beyond which an object does not count;
- kept by the measurement, with the Machine source: only the events the cross-section measurement counted.
The count appears next to the arrows, “12 / 340 kept out of 3,000”, and the arrows jump from one kept event to the next. The histograms, the selection and the species table follow the filter: a line above them says so, and the exported chart carries “(filtered)” in its title.
The same filter serves both workspaces, at two levels. In Generation it reads the truth: the outgoing particles, the jets clustered from them, the momentum the neutrinos carry off. In Detector it reads what the detector reconstructs. A lone photon with missing energy can only really be searched for at the second level: the truth always knows where the neutrinos went.
The generator settings
Below the choice of generator, only the checkboxes it honours are shown, with the meaning they have for it:
| generator | what can be set |
|---|---|
| Pythia 8 | parton shower (ISR and FSR), hadronisation, hadron decays, multiple interactions, tune |
| Herwig 7 | parton shower, hadronisation, hadron decays |
| Sherpa 3 | parton shower, hadronisation, resonance decays (W, Z, top), multiple interactions; hadrons always decay |
| WHIZARD 3 | final-state shower (ISR on hadron beams only), hadronisation |
| CalcHEP 3 | nothing: it returns the matrix element, and its events stay at parton level |
Pythia's tune, fitted to data, sets the shower, the hadronisation and the multiple interactions in one go. Left empty, it is Monash 2013, Pythia's own; the common menu also offers ATLAS A14, ATLAS AZ, CMS CUETP8M1 and 4C. Monash also covers lepton beams; the others, hadrons only. A number gives Pythia's tune number directly, and ee:N or pp:N chooses the beam.
Dressing the events only makes sense between two leptons. Pythia and Herwig lend any other beam a structure — partons to a hadron, a hadronic component to a photon — that TreeLevel's events, made of whole particles, do not have. For , or , the panel says so before launching: keep these events at parton level, or switch to the Machine source, where the generator makes the collision itself.