Program Files

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, .d, and compiled code, .o are created in the tmp subdirectory.

In part the .xml documentation files in the doc 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 roughly translated into an .html one, to allow easy viewing of the contents in a web browser, but without the interactivity eventually strived for.

file name="Pythia"
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 Pythia, so only a Pythia object needs to be explicitly instantiated and addressed by the user.

file name="Event"
contains the event record, which basically is a vector of particles. This file also contains the Particle class, used by Event. Pythia uses two Event objects, one for the process-level record (process) and one for the complete event (event).

file name="Information"
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.

file name="Analysis"
contains routines to analyze events. Currently it can do sphericity, thrust, Lund/Jade/Durham jet clustering, and cone-jet finding.

file name="ProcessLevel"
handles the generation of the (hard) process that sets the character of the event. This involves either using internally implemented processes (few so far), using a runtime interface to the Fortran PYTHIA 6 process library, or using routines for reading in LHA events.

file name="PartonLevel"
turns the (hard) process above into a complete set of partons, by adding initial- and final-state radiation, multiple parton--parton interactions, and beam remnants.

file name="HadronLevel"
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.

file name="ProcessContainer"
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.

file name="SigmaTotal"
contains parametrizations of total, elastic and diffractive hadronic cross sections.

file name="SigmaProcess"
contains the base class and derived classes for the evaluation of different matrix elements. In order to keep this file from becoming too big, actual cross sections are found in the following four files of derived classes.

file name="SigmaQCD"
contains the cross sections and matrix elements for soft and hard QCD processes.

file name="SigmaEW"
contains the cross sections and matrix elements for electroweak processes involving photons, Z^0's and W^+-'s .

file name="SigmaOnia"
contains the cross sections and matrix elements charmonium and bottomonium production.

file name="SigmaSUSY"
contains the cross sections and matrix elements for Supersymmetric processes.

file name="SusyLesHouches"
contains information on SUSY parameters and particle data as specified by the SUSY Les Houches Accord.

file name="InFlux"
keeps track of the allowed combinations of incoming flavours for a process, and stores the in-state-specific factors in a cross section. This in particular means the parton densities, but also charges, CKM matrix elements, and so on.

file name="PhaseSpace"
selects a point in phase space for the hard-process generation, optimized to give improved Monte Carlo efficiency.

file name="Pythia6"
is an anomaly, namely the ``good old'' Fortran PYTHIA 6.4 program, used as the main process library until further notice. Thus there is no Pythia6.cc file but instead a Pythia6.f one, located in the pythia6 subdirectory. The header file contains the required wrappers to access the relevant parts of the Fortran code from C++.

file name="LesHouches"
gives the possibility to feed in parton configurations for the subsequent event generation. Two containers are defined, one for initialization and one for events, that can be read from Pythia. Should be linked to external programs or files.

file name="ResonanceDecays"
decays resonances as part of the hard-process stage, eventually including angular correlations between decay products.

file name="ResonanceProperties"
encodes some properties of resonances, such as the dynamic calculation of widths.

file name="TimeShower"
performs timelike final-state transverse-momentum-ordered shower evolution.

file name="SpaceShower"
performs spacelike initial-state transverse-momentum-ordered shower evolution.

file name="MultipleInteractions"
performs multiple parton-parton interactions.

file name="Beams"
contains information on all partons extracted from the beams. Defines modified parton distributions accordingly during the showering and multiple interactions processing, and afterwards sets up beam remnants.

file name="PartonDistributions"
contains parton distribution functions for the proton and electron. Currently very simple, with only two p parametrizations and one e>/ei> ditto available, but it is possible to link in external sets.

file name="StringFragmentation"
performs string fragmentation of a given set of partons.

file name="MiniStringFragmentation"
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.

file name="FragmentationFlavZpT"
contains the classes for describing the fragmentation steps in flavour and in longitudinal and transverse momentum.

file name="FragmentationSystems"
defines some containers of parton systems, for use in the fragmentation routines.

file name="ParticleDecays"
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.

file name="StandardModel"
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 sin^2(theta_W).

file name="Settings"
contains a database of all flags, modes and parameters that determine the performance of the generator. Initial values are set from the contents of the .xml files, but these values can then be changed by the user.

file name="ParticleData"
contains a database of all necessary particle data (masses, names, ..) and decay channels.

file name="Basics"
contains some basic facilities of general use: a random number generator Rndm, a four-vector class Vec4, and a histogram class Hist.

file name="PythiaStdlib"
is only a .h file, containing most of the Stdlib headers used in Pythia 8, with using directives. Also a few simple inline methods.

file name="PythiaComplex"
is only a .h file, containing a typedef for double precision complex numbers.