The code is subdivided into a set of files, mainly by physics
task. Each file typically contains one main class, but often
with a few related helper classes that are not used elsewhere in
the program. Normally the files come in pairs.
During compilation, related dependency files,
- A header file,
.h in the
subdirectory, where the public interface of the class is declared,
and inline methods are defined.
- A source code file,
.cc in the
subdirectory, where most of the methods are implemented.
.o are created in the
In part the
.xml documentation files in the
xmldoc subdirectory have matching names, but the match
is broken by the desire to group topics more by user interaction than
internal operation. On these pages the function of the different code
files is summarized. Currently, each
.xml file is also
translated into an
.html one in the
htmldoc subdirectory, to allow easy viewing of the
contents in a web browser, and an
.php one in
phpdoc, for more sophisticated interactivity
if that subdirectory is installed on a web server.
Here is the current list of files, ordered alphabetically, with a brief
description of contents.
contains routines to analyze events. Currently it can do sphericity,
thrust, Lund/Jade/Durham jet clustering, cone-jet finding, and the
kT, anti-kT and Cambridge/Aachen algorithms for
contains some basic facilities of general use: a random number
Rndm, a four-vector class
Vec4, and a
contains information on all partons extracted from one of the two
beams. Defines modified parton distributions accordingly during the
showering and multiparton interactions processing, thereby extending on
the one-particle-inclusive distributions defined by the previous class.
Finds the internal structure for a beam remnant.
adds primordial kT to the set of hard subsystems,
and combines these subsystems with the two beam remnants to provide
the overall energy-momentum picture. Also ties together all the
colour lines into consistent singlets.
generates momentum spread of beams, and spread of collision vertex
provides a simple method to impose Bose-Einstein correlations on
pairs of identical mesons.
implements several models that describe how the colour flow between
outgoing partons can be changed by nonperturbative effects.
finds out how partons are colour-connected in (more or less long) chains.
provides a simple method to produce deuterons and anti-deuterons from
events containing protons, neutrons, anti-protons, and anti-neutrons.
contains the event record, which basically is a vector of particles.
This file also contains the
Particle class, used by
Pythia uses two
objects, one for the process-level record (
one for the complete event (
contains the external FJcore package, providing the coure functionality
of the FastJet jet fiding package.
contains the classes for describing the fragmentation steps in
flavour and in longitudinal and transverse momentum.
defines some containers of parton systems, for use in
the fragmentation routines.
turns the parton-level event above into a set of outgoing particles,
by applying string fragmentation (with special treatment for low-mass
systems) and secondary decays, and optionally Bose-Einstein corrections.
contains the beginning of a machinery for final state hadronic
basic classes for the handling of helicities in tau lepton decays.
helicity-dependent decay matrix elements for the tau lepton.
hadronization in models with a hidden sector that contains an unbroken
SU(N), which gives confinement. The model and code is largely
derived from the normal fragmentation classes.
methods to reconstruct the imagined shower history of a
matrix-element-generated multiparton configuration, as part of
the CKKW-L matrix element merging.
is a simple container that gives access to some information on the
nature of the current process, such as Mandelstam variables.
Also contains a small database for errors and warnings encountered
during program execution.
processes a colour singlet system containing several (anti)junctions
such that it can be split into several systems each containing
(at most) one junction.
gives the possibility to feed in parton configurations for the
subsequent event generation. One base class is defined, with containers
for initialization and event information, that can be read from
Pythia. Derived classes allow for a few different cases.
is a header file only, for a class derived from the above LesHouches
one, to be used for runtime interfacing to Fortran programs, such as
Wpapper class to interface matrix element merging schemes with Pythia.
intercede in the normal shower evolution to construct the relevant
Sudakov form factor suppressions as part of the CKKW-L matrix element
performs string fragmentation in cases where the colour singlet
subsystem mass is so small that one or at most two primary hadrons
should be produced from it.
performs multiparton interactions.
contains a database of all necessary particle data (masses, names, ..)
and decay channels.
performs the decays of all normal unstable hadrons and leptons, i.e.
in mass up to and including b bbar systems. It is not
intended for decays of electroweak resonances, like Z^0.
contains parton distribution functions for the proton and electron.
Currently very simple, with only two p parametrizations
and one e ditto available, but it is possible to link in
turns the (hard) process above into a complete set of partons, by
adding initial- and final-state radiation, multiparton
interactions, and beam remnants.
keeps track of which partons belong to which partonic subsystem,
i.e. one of the multiparton (semi)hard interactions with associated
selects a point in phase space for the hard-process generation,
optimized separately for each process to give improved Monte Carlo
packages the information on a given subprocess, combining the
phase-space selection and cross-section evaluation machineries
with some statistics information. Also sets up the list of processes
to be studied in a run.
handles the generation of the (hard) process that sets the character
of the event. This involves either using internally implemented
processes or linking to Les Houches information. The latter can
be by runtime interfaces or by reading in a file. This step also
includes resonance decays.
is the main class, that administrates the whole event generation
process by making use of all the others classes. Objects of most
other classes reside (directly or indirectly) inside
so only a
Pythia object needs to be explicitly instantiated
and addressed by the user.
is only a
.h file, containing a
double precision complex numbers.
contains most of the
Stdlib headers used in PYTHIA 8,
using directives. It defines
this is not already done. Also a few simple inline methods:
pow6(x) for small integer
sqrtpos(x) where a
ensures that one does not take the square root of a negative number.
string toLower(const string, bool trim = true)
converts a strimg to lowercase, and by default also removes initial and
trailing blanks or escape characters. It returns a new string, while the
void toLowerRep(string, bool trim = true)
replaces the string in place. Finally the non-inlined
GammaReal(x) gives the Gamma function value of
a real argument.
decays resonances as part of the hard-process stage, in many cases
(but not all) including angular correlations between the decay products.
encodes some properties of resonances, in particular the dynamic
calculation of widths.
handles the production and decay of hadrons formed by long-lived
gluinos, stops or sbottoms.
contains a database of all flags, modes, parameters and words that
determine the performance of the generator. Initial values are obtained
from the contents of the
.xml files, but these values can
then be changed by the user.
contains the cross sections and matrix elements for production of
some particles in compositeness scenarios, specifically excited
contains the cross sections and matrix elements for electroweak
processes involving photons, Z^0's and W^+-'s.
contains the cross sections and matrix elements for processes in
scenarios involving extra dimensions.
contains the cross sections and matrix elements for some generic
processes, to be used as building blocks for a few BSM scenarios.
contains the cross sections and matrix elements for Higgs production.
contains the cross sections and matrix elements for particle production
in left-right-symmetry scenarios, specifically righthanded Z
and W bosons and doubly-charged Higgs bosons.
contains the cross sections and matrix elements for leptoquark production.
contains the cross sections and matrix elements for a Z'^0,
a W^+- and a horizontal gauge boson R^0.
contains the cross sections and matrix elements for charmonium and
contains the base class and derived classes for the evaluation of
different matrix elements. Also keeps track of allowed incoming
parton configurations and their cross sections, including parton
densities. In order to keep this file from becoming too big, actual
cross sections are found in several separate files of derived classes:
contains the cross sections and matrix elements for soft and hard
contains the cross sections and matrix elements for Supersymmetric
contains parametrizations of total, elastic and diffractive hadronic
handles the communication between the
classes and Pythia.
performs spacelike initial-state transverse-momentum-ordered
contains the running alpha_strong, with Lambda
matching at flavour thresholds, the running alpha_em,
CKM mixing matrices, and a few other parameters such as
performs string fragmentation of a given set of partons.
calculates the string-length lambda measure for various
colour topologies, including junction ones.
stores the various couplings used for SUSY cross sections and
decays, as calculated from input e.g. based on the SUSY Les Houches
contains information on SUSY parameters and particle data as specified
by the SUSY Les Houches Accord.
encodes some properties of supersymmetric resonances, similar to
ResonanceWidths does for other resonances.
the main routines for handling tau lepton decays with helicity
performs timelike final-state transverse-momentum-ordered
Provides a way for a user to study the event at a few intermediate
stages of evolution, to reject the event as a whole or to modify
its cross-section weight.
provides some matrix elements used for ME corrections of W
and Z weak gauge boson emission in both initial- and final-state