Source-linked AI summary

A Brief Introduction to PYTHIA 8.1

Torbjörn Sjöstrand, Stephen Mrenna, Peter Skands

arXiv:0710.3820v1hep-ph

TL;DR

High-energy collision simulations must connect complex observable final states to underlying physics despite incomplete theory and analytically intractable multiplicities. This paper presents PYTHIA 8 as a standalone C++ successor using Monte Carlo event generation, with new shower and interaction developments, and reports a first operational release intended for experimental comparisons.

  • Problem

    Complex high-energy collision final states are difficult to relate to underlying physics because theoretical understanding is incomplete and analytical calculations become intractable at large multiplicities.

  • Method

    PYTHIA 8 generates complete collision events with Monte Carlo methods by simulating hard processes, radiation, interactions, remnants, fragmentation, and decays as separate tasks.

  • Results

    PYTHIA 8 is presented as a standalone successor to PYTHIA 6 with a new interface, transverse-momentum-ordered showers, and interleaved final-state evolution and multiple interactions.

  • Takeaways & Limitations

    The generator produces events intended for direct comparison with experiments and for extracting physics from existing data or studying future experiments.

  • Takeaways & Limitations

    As the first operational release, PYTHIA 8 is not yet tested and tuned to the maturity of PYTHIA 6, so both versions are expected to coexist.

Abstract

from arXiv · show

The PYTHIA program is a standard tool for the generation of high-energy collisions, comprising a coherent set of physics models for the evolution from a few-body hard process to a complex multihadronic final state. It contains a library of hard processes and models for initial- and final-state parton showers, multiple parton-parton interactions, beam remnants, string fragmentation and particle decays. It also has a set of utilities and interfaces to external programs. While previous versions were written in Fortran, PYTHIA 8 represents a complete rewrite in C++. The current release is the first main one after this transition, and does not yet in every respect replace the old code. It does contain some new physics aspects, on the other hand, that should make it an attractive option especially for LHC physics studies.

NEW VERSION PROGRAM SUMMARY

PYTHIA 8.1 generates complete high-energy collision events with Monte Carlo methods by decomposing complex final states into simulated physics tasks. The new C++ version introduces expanded physics models and revisions including transverse-momentum-ordered showers and interleaving with multiple interactions.

  • Nature of problem: PYTHIA 8.1 addresses complex high-energy collision final states, whose underlying physics is incompletely understood and analytically intractable at large multiplicities.Final states can contain many hadrons, leptons, photons and neutrinos.
  • Solution method: Monte Carlo methods generate complete events by subdividing the problem into tasks including hard-process selection, radiation, beam remnants, fragmentation, and decays.The resulting events should be directly comparable with experimentally observable ones and used to extract physics through data comparisons.
  • Reasons for the new version: The new version combines improved and expanded physics models with a transition from Fortran to C++.PYTHIA 8.1 is a complete rewrite in C++, while the new-version motivation explicitly includes improved and expanded physics models.
  • Summary of revisions: Major revisions include a new user interface, transverse-momentum-ordered showers, and interleaving with multiple interactions.These revisions are summarized alongside the broader phrase “and much more.”
  • Performance and restrictions: Running time is 10–1000 events per second, depending on the process studied.Restrictions likewise depend on the problem studied.

1 Introduction

Pythia 8 is a clean C++ successor to the long-developed, increasingly cumbersome Fortran-based Pythia 6, designed as a standalone generator for the LHC era. This first operational release remains less mature and incomplete, so Pythia 6 and Pythia 8 are expected to coexist while the new version is tested and developed.

  • Motivation: Pythia 6’s nearly thirty years of development left its codebase cumbersome, with old options rarely removed and its structure expanded beyond its original purpose.The current Pythia 6 generator grew from Jetset development begun in 1978.
  • Motivation: Pythia’s migration from Fortran 77 to C++ follows the LHC community’s move toward C++ computing and enables code cleanup and modernization.The paper cites poor or nonexistent Fortran support and limited familiarity among younger experimenters as reasons for the migration.
  • Contribution: Pythia 8 is a completely standalone successor to Pythia 6, independent of ThePEG and other external libraries while providing optional hooks to other programs.The project is described as a clean new start rather than a continuation of the underdeveloped Pythia 7 physics implementation.
  • Limitations: The first operational Pythia 8 release was not yet tested and tuned to Pythia 6’s maturity, and the two generators were expected to coexist temporarily.The authors encourage critical try-out and feedback to support maturation of the new version.
  • Scope: Pythia 8 targeted comparisons with first LHC data but did not yet cover γp and γγ physics or all intended processes, while LHA and LHEF inputs reduced the need for an extensive internal process library.The paper also presents an introduction for experienced event-generator users, with programming and user-method details supplied in accompanying documentation and later sections.

2 Physics Summary

The section highlights selected physics differences in PYTHIA 8.1 rather than providing a complete physics description. It emphasizes broad process coverage, new interleaved evolution and multiple-interaction features, configurable PDFs, and defaults awaiting wider experimental tuning.

  • Scope: PYTHIA 8.1 presents selected physics differences rather than a complete description, referring readers to the PYTHIA 6 manual and related literature.Further details are available in the program distribution, with some new physics aspects planned for separate articles.
  • Configuration: Physics components use sensible defaults based on PYTHIA 6 experience and early studies, while more extensive experimental tunes remain anticipated.Many parameters control the physics components.
  • Processes and beams: Supported incoming beams are pp, e+e− and µ+µ−, with no provision for ep collisions or incoming photon beams.The implemented process list largely matches PYTHIA 6, except Supersymmetry and Technicolor, and changed default scales can alter cross sections.
  • Parton distributions: The default PDF is CTEQ 5L, with LhaPdf sets linkable and separate PDF sets usable for hard interactions versus showers and multiple interactions.This separates the PDF choice for the hard interaction from those used in subsequent evolution and interactions.
  • Parton evolution: Initial- and final-state evolution uses p⊥-ordered algorithms, and final-state evolution is now interleaved with initial-state evolution and multiple interactions.Some final-state radiation can involve dipoles between final-state partons and the hole left by an initial-state parton, allowing that hole to take recoil; photon-to-fermion-pair branching is also available.
  • Multiple interactions: Multiple interactions include rescaled post-interaction parton densities, one colour-reconnection scenario reducing total string length, and additional prompt-photon, quarkonium, Drell–Yan, and electroweak-exchange processes.Two hard interactions can also be configured in one event for dedicated coincidence studies, without Sudakov factors for those interactions.

3 Program Structure

PYTHIA 8 organizes event generation into three physics stages—process generation, parton-level activity, and hadronisation plus decays—implemented through corresponding classes. User interaction is additionally structured into initialization, event generation, and finishing phases, with event records connecting program elements.

  • Physics stages: Event generation is divided into process generation, subsequent partonic activity, and hadronisation followed by unstable-particle decays.The stages progress from defining the event’s few initial partons, through radiation, multiple interactions, and beam remnants, to realistic observable events.
  • Program classes: The three-stage physics structure is implemented by the Pythia, ProcessLevel, PartonLevel, and HadronLevel classes.Pythia provides the main user interaction, while the three subordinate classes correspond to the process, parton-level, and hadron-level tasks.
  • Information flow: The Event class carries information between program elements through separate process and event records.The process record covers the few partons at matrix-element level, whereas the event record spans incoming beams through final hadrons.
  • User interaction phases: User interaction follows initialization, individual-event generation, and finishing phases, although utilities and tasks may cross these boundaries.The finishing phase makes final statistics available, but many aspects require no finishing step.
  • Code organization: The code is organized mainly by physics task into paired header and source files, with separate documentation, interface, installation, and example directories.Interfaces support HepMC output, external parton distribution functions, and external hard processes.

4 Main Program and Event Information

Section 4 presents the Pythia class as the main interface for configuring, initializing, running, and inspecting event generation. It also describes the event record as a particle vector with methods for accessing particle and event information.

  • Main program: The Pythia class coordinates event generation through configuration, initialization, event production, output access, error handling, and statistics methods.Users create a generator object, modify settings, initialize it, generate events with pythia.next(), inspect outputs, and obtain run statistics.
  • Main program: Settings can be changed individually with pythia.readString(string) or in batches with pythia.readFile(fileName) before initialization.The constructor loads default Settings and ParticleDataTable values into memory, and external facilities can also be connected before initialization.
  • Main program: pythia.init(...) accepts beam identities and energies, a center-of-mass energy, LHA objects, an LHEF file, or beam settings stored in the Settings database.Initialization propagates settings to program elements and precalculates quantities used later; subsequent setting changes are ignored unless re-initialization is forced.
  • Main program: Inside an event loop, pythia.next() generates each event, whose event record is stored in pythia.event and process-level summary in pythia.process.Initialization must complete before generation; an abort during init prevents all events, while an abort during next() skips only the current event.
  • Event information: The Event class wraps an expandable vector of Particles, indexed so event[i] accesses the i’th particle and event[i].id() returns its PDG identity.Line 0 represents redundant whole-event information, while history tracing begins with the two incoming beams at lines 1 and 2.
  • Event information: Event methods provide its size and listing, while Particle methods expose identities, statuses, kinematics, decay vertices, and particle-species properties.list() always includes basic identity, status, mother, daughter, colour, four-momentum, and mass data, with optional details for complete ancestry and production vertices.

5 Databases

Pythia 8 provides two modifiable databases for general settings and particle data, supporting direct commands or reusable card files. The databases organize configurable process, phase-space, particle, and decay properties through typed variables and accessible interfaces.

  • Databases: Pythia 8 has two modifiable databases: one for general settings and another for particle data.The databases allow users to modify generator default behavior.
  • Input methods: Users can change values with pythia.readString(string) or collect commands in a card file read by pythia.readFile(fileName).Card files are preferable for extensive modifications because direct changes require recompilation and relinking.
  • Settings: Settings variables comprise four types: Flag, Mode, Parm, and Word, stored respectively as bool, int, double, and text strings.Together these variable types are managed by the Settings class.
  • Process controls: Internal processes are controlled by ProcessGroup:ProcessName flags, are off by default, and can be enabled by group commands such as ProcessGroup:all = on.SoftQCD processes cannot be input via the LHA and do not use phase-space cuts, whereas essentially all other process kinds could use LHA input and available cuts.
  • Particle data: ParticleDataTable stores particle properties and decay-channel information, and most properties can be accessed or set through commands using the form id:property = value.Particle properties include names, spin, charge, colour, masses, lifetimes, and decay flags; decay channels include on/off status, branching ratios, processing modes, multiplicities, and products.

6 Links to external programs · 6.1 The Les Houches interface

PYTHIA 8 is self-contained but supports links to specialized external programs, with documentation describing how to configure them. Its Les Houches interface provides C++ classes for importing parton-level initialization and event information from Fortran libraries or LHEF files.

  • 6 Links to external programs: PYTHIA 8 can run without external libraries but supports specialized programs through documented interfaces.The accompanying HTML/PHP documentation gives full setup information for the different links.
  • 6.1 The Les Houches interface: The Les Houches Accord is the standard route for transferring parton-level information from matrix-element generators into PYTHIA.PYTHIA defines a C++ equivalent of the original Fortran conventions using two separate classes.
  • 6.1 The Les Houches interface: LHAinit and LHAevnt are base classes with reading and printout methods plus pure virtual set() methods that derived classes implement.Examples support runtime reading from Fortran commonblocks or reading from Les Houches Event Files.
  • 6.1 The Les Houches interface: LHAinit stores /HEPRUP/-equivalent initialization data, while LHAevnt stores /HEPEUP/-equivalent parton-level configurations for event generation.The two classes correspond respectively to initializing the event-generation chain and supplying its next parton-level configuration.
  • 6.1 The Les Houches interface: LHAinitFortran and LHAevntFortran read the corresponding Fortran commonblocks, enabling a runtime link to a Fortran library.An interface to the PYTHIA 6.4 process library is provided as an example.
  • 6.1 The Les Houches interface: LHAinitLHEF and LHAevntLHEF read initialization and event data from files written in LHEF format.The classes need not be declared explicitly because pythia.init(fileName) provides a shortcut.
  • 6.1 The Les Houches interface: User-created LHAinit and LHAevnt objects are passed as pointers through the init(...) call.The required form is pythia.init(LHAinit*, LHAevnt*).

6.2 Semi-internal processes and resonances · 6.3 Parton distribution functions

PYTHIA 8.1 supports semi-internal implementation of external processes and resonances through derived classes integrated with its internal machinery. Its PDF framework allows built-in, external, or user-defined parametrisations, but changing PDFs can require generator retuning unless restricted to the hard process.

  • 6.2 Semi-internal processes and resonances: Semi-internal processes can use Pythia’s internal phase-space selection while supplying an externally provided cross-section expression.Les Houches processes instead perform flavour, colour, and phase-space selection externally before Pythia processing.
  • 6.2 Semi-internal processes and resonances: New matrix elements derive from Sigma1Process, Sigma2Process, or Sigma3Process for 2 →1, 2 →2, or 2 →3 processes, respectively.Pythia handles 2 →1 and 2 →2 phase space well, is more primitive for 2 →3, and does not address higher multiplicities.
  • 6.2 Semi-internal processes and resonances: A process class must implement the matrix-element weight and final-state flavour and colour-flow methods, with similar existing processes recommended as templates.Additional methods can provide informative properties such as the process name.
  • 6.2 Semi-internal processes and resonances: Passing a SigmaProcess* pointer through pythia.setSigmaPtr(...) makes the new process operate on equal footing with internally implemented processes.A new instance of the class must first be created in the main program.
  • 6.2 Semi-internal processes and resonances: New particles require database entries and decay channels, while dynamical mass-dependent widths and branching ratios require a ResonanceWidths-derived class.Database additions alone provide only fixed widths and fixed branching ratios, apart from minor generalisations.
  • 6.3 Parton distribution functions: The PDF base class supports derived parametrisations; protons currently include CTEQ 5L as default and GRV 94L, while linking LhaPdf broadens the selection.The built-in set selection is described as very limited.
  • 6.3 Parton distribution functions: User-defined PDFs derive from PDF, implement xfUpdate(...), and are installed by passing pdfA and pdfB pointers to pythia.setPDFPtr(pdfA*, pdfB*).This requires creating two distinct PDF objects.
  • 6.3 Parton distribution functions: Changing the PDF set can require complete generator retuning because multiple interactions and parton showers change, although hard-process-only replacement avoids this requirement.The hard-process-only option is characterized as inconsistent but convenient.

6.4 External decay packages · 6.5 User hooks · 6.6 Random-number generators

The sections describe interfaces for external decays, user intervention during event generation, and replacement random-number engines. These mechanisms let users delegate selected decays, customize or veto generation steps, and integrate alternative randomness for framework consistency.

  • 6.4 External decay packages: Pythia commonly delegates τ-lepton and some B-meson decays to dedicated external packages because its default treatment usually neglects polarisation effects and nontrivial matrix elements.Pythia can handle any particle decays, but decay products are often distributed isotropically in phase space.
  • 6.4 External decay packages: DecayHandler lets a user-supplied derived class externally decay selected particle IDs through pythia.setDecayPtr(DecayHandler*, vector<int>).The derived class may route different selected particles to separate packages.
  • 6.4 External decay packages: External decay handling can be partial: returning false makes Pythia perform the decay itself, allowing selected channels to remain internal when decay tables are adjusted.The user-written decay(...) method performs the external decay or signals failure by returning false.
  • 6.5 User hooks: UserHooks provides extension points for modifying built-in cross sections, vetoing undesirable events, and collecting statistics during event generation.The base class does nothing by itself; users write derived classes, with simple examples included in the program.
  • 6.5 User hooks: UserHooks exposes four routine sets ordered by increasing complexity, rather than by their position in the event-generation sequence.The routines provide progressively more involved intervention capabilities.
  • 6.5 User hooks: Hooks can inspect event records between process-, parton-, and hadron-level stages, veto events, or temporarily interrupt downward p⊥ evolution for study and approval.The interrupted evolution combines multiple interactions with initial- and final-state parton showers.
  • 6.6 Random-number generators: RndmEngine enables external random-number generation through pythia.setRndmEnginePtr(RndmEngine*), although replacement is motivated by framework consistency rather than physics.The default Marsaglia-Zaman algorithm is described as quite good.

6.7 The HepMC event format · 6.8 SUSY parameter input · 6.9 Parton showers

The section describes interfaces for exporting Pythia 8 events, supplying supersymmetric parameters through SLHA files, and replacing its parton showers with expert-written plug-ins.

  • 6.7 The HepMC event format: HepMC conversion occurs after pythia.next() generates an event, requiring only a user-called conversion routine rather than tight linkage.The routine converts the Pythia 8 Event format through HepMC::Ievent( pythia.event, hepmcevt ).
  • 6.7 The HepMC event format: HepMC version 1 uses the CLHep library for four-vectors, whereas version 2 is standalone and requires corresponding interface adjustments.The needed interface code depends on which HepMC version is used.
  • 6.8 SUSY parameter input: Users provide the SLHA file name in an appropriate setting, after which the remaining information is handled automatically once SUSY processes are implemented.The passage qualifies that automatic handling depends on SUSY processes being implemented.
  • 6.9 Parton showers: Expert users can replace the existing timelike and/or spacelike showers, provided they follow extensive rules documented with the code.Vincia provides a first example of an external timelike-shower plug-in.

7 Getting Going

Section 7 explains how to install PYTHIA 8.1 on Linux and begin writing and steering user programs using worksheets, examples, documentation, and separate command cards.

  • Installation: Installation starts by downloading and unpacking the pythia8100.tgz package; the README describes the remaining procedure, with little multiplatform support.The package is unpacked into a new pythia8100 subdirectory.
  • Writing a main program: Users write the main program themselves, aided by a webpage worksheet and example programs illustrating the principles for creating custom programs.The examples are located in the examples subdirectory.
  • Documentation and steering: The htmldoc/Welcome.html documentation helps users explore PYTHIA, while phpdoc under a web server assists in building command files for Settings and ParticleDataTable.These commands steer execution of the main program.
  • Command cards: Separate “cards files” store run parameters and permit minor changes without recompiling, including the predefined Main:numberOfEvents setting when used by the main-program author.Whether predefined parameters are actually used depends on the author of the main program.

8 Outlook

PYTHIA 8.1 is not yet a complete replacement for PYTHIA 6.4, although it already includes new features. Its development aims to improve the framework and add features so that PYTHIA 8 soon becomes the better overall alternative.

  • 8 Outlook: Further framework improvements and gradual feature additions are intended to make PYTHIA 8 the better overall alternative.This is the stated objective for the ongoing development of the program.
Loading 0710.3820v1…