A brief introduction to PYTHIA 8.1

Dedicated to the memory of Hans-Uno Bengtsson 1953–2007 The father of PYTHIA
https://doi.org/10.1016/j.cpc.2008.01.036Get rights and content

Abstract

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.

Program summary

Program title: Pythia 8.1

Catalogue identifier: ACTU_v3_0

Program summary URL: http://cpc.cs.qub.ac.uk/summaries/ACTU_v3_0.html

Program obtainable from: CPC Program Library, Queen's University, Belfast, N. Ireland

Licensing provisions: GPL version 2

No. of lines in distributed program, including test data, etc.: 176 981

No. of bytes in distributed program, including test data, etc.: 2 411 876

Distribution format: tar.gz

Programming language: C++

Computer: Commodity PCs

Operating system: Linux; should also work on other systems

RAM: 8 megabytes

Classification: 11.2

Does the new version supersede the previous version?: yes, partly

Nature of problem: High-energy collisions between elementary particles normally give rise to complex final states, with large multiplicities of hadrons, leptons, photons and neutrinos. The relation between these final states and the underlying physics description is not a simple one, for two main reasons. Firstly, we do not even in principle have a complete understanding of the physics. Secondly, any analytical approach is made intractable by the large multiplicities.

Solution method: Complete events are generated by Monte Carlo methods. The complexity is mastered by a subdivision of the full problem into a set of simpler separate tasks. All main aspects of the events are simulated, such as hard-process selection, initial- and final-state radiation, beam remnants, fragmentation, decays, and so on. Therefore events should be directly comparable with experimentally observable ones. The programs can be used to extract physics from comparisons with existing data, or to study physics at future experiments.

Reasons for new version: Improved and expanded physics models, transition from Fortran to C++.

Summary of revisions: New user interface, transverse-momentum-ordered showers, interleaving with multiple interactions, and much more.

Restrictions: Depends on the problem studied.

Running time: 10–1000 events per second, depending on process studied.

References: [1] T. Sjöstrand, P. Edén, C. Friberg, L. Lönnblad, G. Miu, S. Mrenna, E. Norrbin, Comput. Phys. Comm. 135 (2001) 238.

Introduction

The development of Jetset [1], containing several of the components that later were merged with Pythia [2], was begun in 1978. Thus the current Pythia 6 generator [3], [4] is the product of almost thirty years of development, and some of the code has not been touched in a very long time. New options have been added, but old ones seldom removed. The basic structure has been expanded in different directions, well beyond what it was once intended for, making it rather cumbersome by now.

From the onset, all code has been written in Fortran 77. For the LHC era, the experimental community has made the decision to move heavy computing completely to C++. Fortran support may be poor to non-existing, and young experimenters will not be conversant in Fortran any longer. Therefore it is logical also to migrate Pythia to C++, and in the process clean up and modernise various aspects.

A first attempt in this direction was the Pythia 7 project [5]. However, priority came to be given to the development of a generic administrative structure, renamed ThePEG [6] and adopted by the Herwig++ [7] group, while the physics parts of Pythia 7 remained underdeveloped.

Pythia 8 is a clean new start, to provide a successor to Pythia 6. It is a completely standalone generator, thus not relying on ThePEG or any other external library. Some optional hooks for links to other programs are provided, however.

The version presented here is the first operational one in the Pythia 8 series. As such it is not yet tested and tuned enough to have reached the same level of maturity as Pythia 6, so we expect the two to coexist for a while. It is only by an increasing use of the new version that it will mature, however, so we encourage a critical try-out, and look forward to feedback.

The intention is to release a version in time for comparisons with first LHC data. Thus some areas, like γp and γγ physics, are not yet addressed. Further, some intended processes remain to be implemented. Actually, with the rise of automatic matrix-element code generation and phase-space sampling, input of process-level events via the Les Houches Accord (LHA) [8] and with Les Houches Event Files (LHEF) [9] reduces the need to have an extensive process library inside Pythia itself. Thus emphasis is more on providing a good description of subsequent steps of the story, involving elements such as initial- and final-state parton showers, multiple parton–parton interactions, string fragmentation, and decays.

The current article provides an introduction to Pythia 8. The programming aspects are covered in more detail in a set of interlinked HTML (or alternatively PHP) pages that comes in the same package as the program files, see below. Much of the physics aspects are unchanged relative to the Pythia 6.4 manual [4], and so we refer to it and to other physics articles for that. Instead what we here give is an overview for potential users who already have some experience with event generators and want to understand how to get going with Pythia 8.

Section 2 contains an ultra-brief summary of the physics of Pythia 8, with particular emphasis on aspects that are different relative to Pythia 6. The program structure (including flow, files, documentation, and a few important warnings) is described in Section 3; summaries of the main user methods, including the event record and particle classes, in Section 4. Section 5 is concerned with the databases of flags, modes, parameters, processes, and particle data which exist in Pythia 8. Those who wish to link to external programs, e.g., to gain access to external parton distributions, standard input/output formats, and much more, will find the relevant information in Section 6. A brief how-to on getting going is then included in Section 7. Section 8 rounds off with an outlook.

Section snippets

Physics summary

This article is not intended to provide a complete description of the physics content. For this we primarily refer to the Pythia 6 manual [4] and associated literature. We would like to draw attention to some key points of difference, however. Further details are available on the HTML/PHP pages in the program distribution. Some new physics aspects will eventually be covered in separate articles.

The physics components are controlled by many parameters. These have been assigned sensible default

Program flow

The physics topics that have to come together in a complete event generator can crudely be subdivided into three stages:

  • (1)

    The generation of a “process” that decides the nature of the event. Often it would be a “hard process”, such as ggh0Z0Z0μ+μqq¯, that is calculated in perturbation theory, but a priori we impose no requirement that a hard scale must be involved. Only a very small set of partons/particles is defined at this level, so only the main aspects of the event structure are covered.

  • (2)

The Pythia class

The Pythia class is the main means of communication between the user and the event-generation process. We here present the key methods for the user to call, ordered by context.

Firstly, at the top of the main program, the proper header file must be included:

#include "Pythia.h"

To simplify typing, it also makes sense to declare

using namespace Pythia8;

Given this, the first step in the main program is to create a generator object, e.g., with

Pythia pythia;

In the following we will assume that the

Databases

Inevitably one wants to be able to modify the default behaviour of a generator. Currently there are two Pythia 8 databases with modifiable values. One deals with general settings, the other specifically with particle data.

The key method to set a new value is

pythia.readString(string);

The typical form of a string is

"variable = value"

where the equal sign is optional and the variable begins with a letter for settings and a digit for particle data. A string not beginning with either is considered as

Links to external programs

While Pythia 8 itself is self-contained and can be run without reference to any external library, often one does want to make use of other programs that are specialised on some aspect of the generation process. The HTML/PHP documentation accompanying the code contains full information on how the different links should be set up. Here the purpose is mainly to point out the possibilities that exist.

Getting going

After you download the pythia8100.tgz (or later) package from the Pythia webpage,

you can unpack it with tar xvfz pythia8100.tgz, into a new subdirectory pythia8100. The rest of the installation procedure is described in the README file in that directory. It is assumed you are on a Linux system; so far there is hardly any multiplatform support.

After this, the main program is up to the user to write. A worksheet (found on the webpage) takes you through

Outlook

As already explained in the introduction, Pythia 8.1 is not yet a complete replacement of Pythia 6.4, but it is getting there, and already contains some new features not found elsewhere. In many cases the quality of the physics should be comparable between the two versions, but obviously the objective is that soon Pythia 8 should offer the overall better alternative. This will occur by further improvements of the existing framework and by the gradual addition of new features.

Acknowledgements

The support and kind hospitality of the SFT group at CERN is gratefully acknowledged by T.S. Mikhail Kirsanov has developed the configure files, the makefiles and the interface to HepMC, and made several valuable suggestions. Ben Lloyd has written the PHP webpage framework. Bertrand Bellenot has provided a simple makefile for Win32/NMAKE. Marc Montull has helped write the extended Higgs sector. SM and PS are supported by Fermi Research Alliance, LLC, under Contract No. DE-AC02-07CH11359 with

References (23)

  • T. Sjöstrand

    Comput. Phys. Comm.

    (1982)
    T. Sjöstrand

    Comput. Phys. Comm.

    (1983)
    T. Sjöstrand

    Comput. Phys. Comm.

    (1986)
    T. Sjöstrand et al.

    Comput. Phys. Comm.

    (1987)
  • H.-U. Bengtsson

    Comput. Phys. Comm.

    (1984)
    H.-U. Bengtsson et al.

    Comput. Phys. Comm.

    (1985)
    H.-U. Bengtsson et al.

    Comput. Phys. Comm.

    (1987)
    T. Sjöstrand

    Comput. Phys. Comm.

    (1994)
  • T. Sjöstrand et al.

    Comput. Phys. Comm.

    (2001)
  • T. Sjöstrand et al.

    JHEP

    (2006)
  • L. Lönnblad

    Comput. Phys. Comm.

    (1999)
    M. Bertini et al.

    Comput. Phys. Comm.

    (2001)
  • See webpage...
  • S. Gieseke et al.

    JHEP

    (2004)
  • E. Boos, et al., in: Proceedings of the Workshop on Physics at TeV Colliders, Les Houches, France, 21 May–1 Jun 2001,...
  • J. Alwall

    Comput. Phys. Comm.

    (2007)
  • T. Sjöstrand et al.

    Eur. Phys. J. C

    (2005)
  • T. Sjöstrand et al.

    JHEP

    (2004)
  • Cited by (0)

    This paper and its associated computer program are available via the Computer Physics Communications homepage on ScienceDirect (http://www.sciencedirect.com/science/journal/00104655).

    View full text