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 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.

file  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  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  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  Analysis  
contains routines to analyze events. Currently it can do sphericity, thrust, Lund/Jade/Durham jet clustering, and cone-jet finding.

file  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  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  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  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  SigmaTotal  
contains parametrizations of total, elastic and diffractive hadronic cross sections.

file  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  SigmaQCD  
contains the cross sections and matrix elements for soft and hard QCD processes.

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

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

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

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

file  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  PhaseSpace  
selects a point in phase space for the hard-process generation, optimized to give improved Monte Carlo efficiency.

file  PartonDistributions  
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 external sets.

file  LHAPDFInterface  
is a header file only, with interfaces to the key LHAPDF routines, as needed for a runtime interface. There is a file lhapdfdummy/LHAPDFdummy.cc with matching dummy implementations, however. This file is used to build a separate liblhapdfdummy library, to be linked when the LHAPDF library is not used, so as to avoid problems with undefined references.

file  BeamParticle  
contains information on all partons extracted from one of the two beams. Defines modified parton distributions accordingly during the showering and multiple interactions processing, thereby extending on the one-particle-inclusive distributions defined by the previous class. Finds the internal structure for a beam remnant.

file  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  LHAFortran  
is a header file only, for two classes derived from the above LesHouches ones, to be used for runtime interfacing to Fortran programs, such as PYTHIA 6.

file  Pythia6Interface  
is a header file only, with interfaces to the key PYTHIA 6 routines, as needed for a runtime interface.

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

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

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

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

file  MultipleInteractions  
performs multiple parton-parton interactions.

file  BeamRemnants  
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.

file  StringFragmentation  
performs string fragmentation of a given set of partons.

file  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  FragmentationFlavZpT  
contains the classes for describing the fragmentation steps in flavour and in longitudinal and transverse momentum.

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

file  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  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  UserHooks  
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 it cross-section weight.

file  HepMCInterface  
contains an interface to convert the PYTHIA 8 event record into the HepMC format. The HepMCInterface.cc file is located in the subdirectory hepmcinterface and is used to build a separate libhepmcinterface library.

file  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  ParticleData  
contains a database of all necessary particle data (masses, names, ..) and decay channels.

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

file  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  PythiaComplex  
is only a .h file, containing a typedef for double precision complex numbers.