]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PYTHIA8/pythia8170/xmldoc/pythia8100.tex
Protection for dereferencing fTDCErrorBuffer. see ALIROOT-5749
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8170 / xmldoc / pythia8100.tex
CommitLineData
63ba5337 1%% Computer Physics Communications class file, slightly modified
2%% for reduced inter-paragraph and inter-section spacing.
3\documentclass{elsartmod}
4
5% Include graphics package.
6\usepackage{axodraw}
7
8% Standardised indentation.
9\newcommand{\cindent}{\hspace*{10mm}~}
10
11%Vertical positioning of page
12%\setlength{\topmargin}{20mm}
13
14\begin{document}
15\begin{frontmatter}
16
17\begin{flushright}
18arXiv:0710.3820\\
19CERN-LCGAPP-2007-04\\
20LU TP 07-28\\
21FERMILAB-PUB-07-512-CD-T\\
22October 2007\\
23\end{flushright}
24
25\title{A Brief Introduction to PYTHIA 8.1}
26
27\author[a,b]{Torbj\"orn Sj\"ostrand\thanksref{author}},
28\author[c]{Stephen Mrenna},
29\author[a,c]{Peter Skands}
30
31\thanks[author]{Corresponding author, e-mail: torbjorn@thep.lu.se}
32
33\address[a]{CERN/PH, CH--1211 Geneva 23, Switzerland}
34\address[b]{Department of Theoretical Physics, Lund University,\\
35S\"olvegatan 14A, SE-223 62 Lund, Sweden}
36\address[c]{Fermi National Accelerator Laboratory, Batavia,
37IL 60510, USA}
38
39\begin{abstract}
40The \textsc{Pythia} program is a standard tool for the generation
41of high-energy collisions, comprising a coherent set of physics
42models for the evolution from a few-body hard process to a complex
43multihadronic final state. It contains a library of hard processes
44and models for initial- and final-state parton showers, multiple
45parton-parton interactions, beam remnants, string fragmentation and
46particle decays. It also has a set of utilities and interfaces to
47external programs. While previous versions were written in Fortran,
48\textsc{Pythia}~8 represents a complete rewrite in C++. The current
49release is the first main one after this transition, and does not yet
50in every respect replace the old code. It does contain some new physics
51aspects, on the other hand, that should make it an attractive option
52especially for LHC physics studies.
53\begin{flushleft}
54 %Insert your suggested PACS number here
55PACS: 13.66.-a, 13.85.-t, 12.38.-t, 12.15.-y, 12.60.-i
56\end{flushleft}
57
58\begin{keyword}
59event generators, multiparticle production,
60parton showers, multiple interactions, hadronisation
61\end{keyword}
62
63\end{abstract}
64
65\dedicated{\rule{0mm}{8mm}Dedicated to the memory of\\[3mm]
66\textbf{\textit{\Large Hans-Uno Bengtsson}}\\[1mm]
671953 -- 2007\\
68The father of PYTHIA}
69
70\end{frontmatter}
71
72\clearpage
73
74% Computer program descriptions should contain the following
75% PROGRAM SUMMARY.
76
77{\bf NEW VERSION PROGRAM SUMMARY}
78 %Delete as appropriate.
79
80\begin{small}
81\noindent
82{\em Manuscript Title:A Brief Introduction to \textsc{Pythia} 8.1} \\
83{\em Authors:Torbj\"orn Sj\"ostrand, Stephen Mrenna, Peter Skands} \\
84{\em Program Title: \textsc{Pythia} 8.1} \\
85{\em Journal Reference:} \\
86 %Leave blank, supplied by Elsevier.
87{\em Catalogue identifier:} \\
88 %Leave blank, supplied by Elsevier.
89{\em Licensing provisions: GPL version 2} \\
90 %enter "none" if CPC non-profit use license is sufficient.
91{\em Programming language: C++} \\
92{\em Computer: commodity PCs} \\
93 %Computer(s) for which program has been designed.
94{\em Operating systems: Linux; should also work on other systems} \\
95 %Operating system(s) for which program has been designed.
96{\em RAM: 8} megabytes \\
97 %RAM in bytes required to execute program with typical data.
98%{\em Number of processors used:} \\
99% %If more than one processor.
100%{\em Supplementary material:} \\
101% % Fill in if necessary, otherwise leave out.
102{\em Keywords: event generators, multiparticle production,
103parton showers, multiple interactions, hadronisation} \\
104 % Please give some freely chosen keywords that we can use in a
105 % cumulative keyword index.
106{\em PACS: 13.66.-a, 13.85.-t, 12.38.-t, 12.15.-y, 12.60.-i} \\
107 % see http://www.aip.org/pacs/pacs.html
108{\em Classification: 11.2 Phase Space and Event Simulation} \\
109 %Classify using CPC Program Library Subject Index, see (
110 % http://cpc.cs.qub.ac.uk/subjectIndex/SUBJECT_index.html)
111 %e.g. 4.4 Feynman diagrams, 5 Computer Algebra.
112%{\em External routines/libraries: none} \\
113% % Fill in if necessary, otherwise leave out.
114%{\em Subprograms used:} \\
115% %Fill in if necessary, otherwise leave out.
116{\em Catalogue identifier of previous version: ADNN\_v1\_0} \\
117 %Only required for a New Version summary, otherwise leave out.
118{\em Journal reference of previous version: T. Sj\"ostrand, P. Ed\'en,
119C. Friberg, L. L\"onnblad, G. Miu, S. Mrenna and E. Norrbin,
120Computer Physics Commun. {\bf 135} (2001) 238} \\
121 %Only required for a New Version summary, otherwise leave out.
122{\em Does the new version supersede the previous version?: yes, partly} \\
123 %Only required for a New Version summary, otherwise leave out.
124 \\
125{\em Nature of problem: high-energy collisions between
126elementary particles normally give rise to complex final states,
127with large multiplicities of hadrons, leptons, photons and neutrinos.
128The relation between these final states and the underlying
129physics description is not a simple one, for two main reasons.
130Firstly, we do not even in principle have a complete understanding
131of the physics. Secondly, any analytical approach is made
132intractable by the large multiplicities. }\\
133 %Describe the nature of the problem here.
134 \\
135{\em Solution method: complete events are generated by Monte Carlo
136methods. The complexity is mastered by a subdivision of the full
137problem into a set of simpler separate tasks.
138All main aspects of the events are simulated, such as
139hard-process selection, initial- and final-state radiation, beam
140remnants, fragmentation, decays, and so on. Therefore events should be
141directly comparable with experimentally observable ones. The programs
142can be used to extract physics from comparisons with existing
143data, or to study physics at future experiments.}\\
144 %Describe the method solution here.
145 \\
146{\em Reasons for the new version: improved and expanded physics models,
147transition from Fortran to C++}\\
148 %Only required for a New Version summary, otherwise leave out.
149 \\
150{\em Summary of revisions: new user interface,
151transverse-momentum-ordered showers, interleaving with multiple
152interactions, and much more}\\
153 %Only required for a New Version summary, otherwise leave out.
154 \\
155{\em Restrictions: depends on the problem studied}\\
156 %Describe any restrictions on the complexity of the problem here.
157 \\
158{\em Unusual features: none}\\
159 %Describe any unusual features of the program/problem here.
160 \\
161%{\em Additional comments:}\\
162 %Provide any additional comments here.
163% \\
164{\em Running time: 10--1000 events per second, depending on
165process studied}\\
166 %Give an indication of the typical running time here.
167% \\
168%{\em References:}
169%\begin{refnummer}
170%\item Reference 1 % This is the reference list of the Program Summary
171%\item Reference 2 % Type references in text as [1], [2], etc.
172%\item Reference 3 % This list is different from the bibliography, which
173% % you can use in the Long Write-Up.
174%\end{refnummer}
175
176\end{small}
177\clearpage
178
179% In program descriptions the main text of the paper is listed under
180% the heading LONG WRITE-UP.
181
182\hspace{1pc}
183{\bf LONG WRITE-UP}
184
185\section{Introduction}
186
187The development of \textsc{Jetset} \cite{jetset}, containing several
188of the components that later were merged with \textsc{Pythia}
189\cite{pythiaearly}, was begun in 1978. Thus the current
190\textsc{Pythia}~6 generator \cite{pythiasixone, pythiasixfour}
191is the product of almost thirty years of development,
192and some of the code has not been touched in a very long time. New
193options have been added, but old ones seldom removed. The basic
194structure has been expanded in different directions, well beyond
195what it was once intended for, making it rather cumbersome by now.
196
197{}From the onset, all code has been written in Fortran~77. For the
198LHC era, the experimental community has made the decision to
199move heavy computing completely to C++. Fortran support
200may be poor to non-existing, and young experimenters will not
201be conversant in Fortran any longer. Therefore it is logical
202also to migrate \textsc{Pythia} to C++, and in the process clean
203up and modernise various aspects.
204
205A first attempt in this direction was the \textsc{Pythia}~7 project
206\cite{pythiaseven}. However, priority came to be given to the
207development of a generic administrative structure, renamed
208\textsc{ThePEG} \cite{thepeg} and adopted by the \textsc{Herwig++}
209\cite{herwigpp} group, while the physics parts of \textsc{Pythia}~7
210remained underdeveloped.
211
212\textsc{Pythia}~8 is a clean new start, to provide a successor to
213\textsc{Pythia}~6. It is a completely standalone generator, thus not
214relying on \textsc{ThePEG} or any other external library. Some
215optional hooks for links to other programs are provided, however.
216
217The version presented here is the first operational one in the
218\textsc{Pythia}~8 series. As such it is not yet tested and tuned
219enough to have reached the same level of maturity as \textsc{Pythia}~6,
220so we expect the two to coexist for a while. It is only by an
221increasing use of the new version that it will mature, however,
222so we encourage a critical try-out, and look forward to feedback.
223
224The intention is to release a version in time for comparisons
225with first LHC data. Thus some areas, like $\gamma\mathrm{p}$ and
226$\gamma\gamma$ physics, are not yet addressed. Further, some
227intended processes remain to be implemented. Actually, with the
228rise of automatic matrix-element code generation and phase-space
229sampling, input of process-level events via the Les Houches Accord
230(LHA) \cite{lha} and with Les Houches Event Files (LHEF) \cite{lhef}
231reduces the need to have an extensive process library inside
232\textsc{Pythia} itself. Thus emphasis is more on providing a good
233description of subsequent steps of the story, involving elements
234such as initial- and final-state parton showers, multiple
235parton--parton interactions, string fragmentation, and decays.
236
237The current article provides an introduction to \textsc{Pythia}~8.
238The programming aspects are covered in more detail in a set
239of interlinked HTML (or alternatively PHP) pages that comes in the
240same package as the program files, see below.
241Much of the physics aspects are unchanged
242relative to the \textsc{Pythia}~6.4 manual \cite{pythiasixfour}, and
243so we refer to it and to other physics articles for that. Instead
244what we here give is an overview for potential users who already
245have some experience with event generators and want to understand
246how to get going with \textsc{Pythia}~8.
247
248Section \ref{sec:physics} contains an ultra-brief summary of the
249physics of \textsc{Pythia}~8, with particular emphasis on aspects that
250are different relative to \textsc{Pythia}~6. The program
251structure (including flow, files, documentation, and a few important
252warnings) is described in section \ref{sec:structure}; summaries of
253the main user methods, including the event record and particle
254classes, in section \ref{sec:main}. Section
255\ref{sec:databases} is concerned with the databases of flags, modes,
256parameters, processes, and particle data which exist in \textsc{Pythia}~8.
257Those who wish to link to external programs, e.g.\ to gain access
258to external parton distributions, standard input/output formats, and
259much more, will find the relevant information in section
260\ref{sec:external}. A brief how-to on getting going is then included
261in section \ref{sec:how-to}. Section \ref{sec:outlook} rounds off with
262an outlook.
263
264\section{Physics Summary \label{sec:physics}}
265
266This article is not intended to provide a complete description of
267the physics content. For this we primarily refer to the
268\textsc{Pythia}~6 manual \cite{pythiasixfour} and associated
269literature. We would like to draw attention to some key points of
270difference, however. Further details are available on the HTML/PHP
271pages in the program distribution. Some new physics aspects will
272eventually be covered in separate articles.
273
274The physics components are controlled by many parameters. These have
275been assigned sensible default values, based on previous experience
276with \textsc{Pythia}~6 and some first studies with the new code. We
277look forward to more extensive tunes by the experimental community,
278however.
279
280\subsection{Hard processes}
281
282Currently the program only works with $\mathrm{p}\mathrm{p}$,
283$\overline{\mathrm{p}}\mathrm{p}$, $\mathrm{e}^+\mathrm{e}^-$
284and $\mu^+\mu^-$
285incoming beams. In particular, there is no provision for
286$\mathrm{e}\mathrm{p}$ collisions or for incoming photon beams,
287neither on their own nor as flux around an electron.
288
289The list of processes currently implemented is summarised further
290down; it corresponds to most of the ones in \textsc{Pythia}~6,
291with the exception of the Supersymmetry and Technicolor sectors,
292which are yet to come. The cross-section expressions should be
293identical, but default scale choices have been changed, so that
294cross sections may be somewhat different for that reason.
295
296The default parton distribution remains CTEQ 5L, but ones found in the
297\textsc{LhaPdf} library \cite{lhapdf} can easily be linked. It is now
298possible to use separate PDF sets for the hard interaction, on one
299hand, and for the subsequent showers and multiple interactions, on the
300other.
301
302\subsection{Parton showers}
303
304The initial- and final-state algorithms are based on the
305new $p_{\perp}$-ordered evolution introduced in \textsc{Pythia}~6.3
306\cite{ptshowers}, while the older mass-ordered ones have not been
307implemented. It is now additionally possible to have a branching
308of a photon to a fermion pair as part of the final-state evolution.
309
310Already in \textsc{Pythia}~6.3 the initial-state evolution and
311the multiple interactions were interleaved into one common
312decreasing $p_{\perp}$ sequence. Now also the final-state evolution
313is interleaved with the other two. In this context, some of that
314final-state radiation gets to be associated with dipoles stretched
315between a final-state parton and the ``hole'' left by an
316initial-state one, which therefore now can take a recoil.
317The initial-state-radiation algorithm remains unchanged in this
318respect, with recoils always taken by the hard scattering subsystem
319as a whole.
320
321\subsection{Multiple interactions and beam remnants}
322
323The multiple-interactions machinery as such contains the full
324functionality introduced in \textsc{Pythia}~6.3 \cite{newremnants}.
325Rescaled parton densities are defined after the first interaction,
326that take into account the nature of the previous partons extracted.
327Currently there is only one scenario for colour-reconnection in the
328final state, in which there is a certain probability for the partons of
329two subscatterings to have their colours interarranged in a way that
330reduces the total string length. (This is intermediate in character
331between the original strategy \cite{zijl} and the more recent ones
332\cite{wicke}.) The description of beam remnants is based on the
333new framework.
334
335In addition to the standard QCD $2 \to 2$ processes, the possibility
336of multiple interactions producing prompt photons, charmonia and
337bottomonia, low-mass Drell-Yan pairs, and $t$-channel
338$\gamma^*/\mathrm{Z}^0/\mathrm{W}^{\pm}$ exchange is now also
339included.
340
341For dedicated studies of two low-rate processes in coincidence, two
342hard interactions can now be set in the same event. There are no
343Sudakov factors included for these two interactions, similarly to
344normal events with one hard interaction.
345
346\subsection{Hadronisation}
347
348Hadronisation is based solely on the Lund string fragmentation
349framework \cite{lundreview}; older alternative descriptions have
350been left out.
351
352Particle data have been updated in agreement with the 2006 PDG
353tables \cite{pdg}. This also includes a changed content of the scalar
354meson multiplet. Some updated charm and bottom decay tables have been
355obtained from the DELPHI and LHCb collaborations.
356
357The BE$_{32}$ model for Bose--Einstein effects \cite{boseeinstein}
358has been implemented, but is not on by default.
359
360\subsection{Other program components}
361
362Standardised procedures have been introduced to link the program
363to various external programs for specific tasks, see section
364\ref{sec:external}.
365
366Finally, some of the old jet finders and other analysis routines are
367made available. Also included is a utility to generate, display and
368save simple one-dimensional histograms.
369
370\section{Program Structure \label{sec:structure}}
371
372\subsection{Program flow}
373
374The physics topics that have to come together in a complete
375event generator can crudely be subdivided into three stages:
376\begin{enumerate}
377\item The generation of a ``process'' that decides the nature of the
378event. Often it would be a ``hard process'', such as $\mathrm{g}
379\mathrm{g} \to \mathrm{h}^0 \to \mathrm{Z}^0 \mathrm{Z}^0 \to \mu^+
380\mu^- \mathrm{q} \overline{\mathrm{q}}$, that is calculated in
381perturbation theory, but a priori we impose no requirement that a hard
382scale must be involved. Only a very small set of
383partons/particles is defined at this level, so only the main aspects
384of the event structure are covered.
385\item The generation of all subsequent activity on the partonic level,
386involving initial- and final-state radiation, multiple parton--parton
387interactions and the structure of beam remnants. Much of the phenomena
388are under an (approximate) perturbative control, but nonperturbative
389physics aspects are also important. At the end of this step, a realistic
390partonic structure has been obtained, e.g. with broadened jets and
391an underlying-event activity.
392\item The hadronisation of this parton configuration, by string
393fragmentation, followed by the decays of unstable particles. This
394part is almost completely nonperturbative, and so requires extensive
395modelling and tuning or, especially for decays, parametrisations of
396existing data. It is only at the end of this step that realistic events
397are available, as they could be observed by a detector.
398\end{enumerate}
399This division of tasks is not watertight --- parton distributions span
400and connect the two first steps, to give one example --- but it still
401helps to focus the discussion.
402
403\begin{figure}[t]
404\begin{picture}(430,370)(-215,10)
405\GBox(-215,350)(215,380){0.9}
406\Text(0,365)[]{The User ($\approx$ Main Program)}
407\GBox(-215,300)(215,330){0.9}
408\Text(0,315)[]{\texttt{Pythia}}
409\GBox(-215,250)(-170,280){0.9}
410\Text(-192.5,265)[]{\texttt{Info}}
411\GBox(-130,250)(-20,280){0.9}
412\Text(-75,265)[]{\texttt{Event~~process}}
413\GBox(20,250)(215,280){0.9}
414\Text(105,265)[]{\texttt{Event~~event}}
415\GBox(-215,110)(-85,230){0.9}\Line(-215,200)(-85,200)
416\Text(-150,215)[]{\texttt{ProcessLevel}}
417\Text(-150,185)[]{\texttt{ProcessContainer}}
418\Text(-150,165)[]{\texttt{PhaseSpace}}
419\Text(-150,145)[]{\texttt{LHAinit, LHAevnt}}
420\Text(-150,125)[]{\texttt{ResonanceDecays}}
421\GBox(-65,110)(65,230){0.9}\Line(-65,200)(65,200)
422\Text(0,215)[]{\texttt{PartonLevel}}
423\Text(0,185)[]{\texttt{TimeShower}}
424\Text(0,165)[]{\texttt{SpaceShower}}
425\Text(0,145)[]{\texttt{MultipleInteractions}}
426\Text(0,125)[]{\texttt{BeamRemnants}}
427\GBox(85,110)(215,230){0.9}\Line(85,200)(215,200)
428\Text(150,215)[]{\texttt{HadronLevel}}
429\Text(150,185)[]{\texttt{StringFragmentation}}
430\Text(150,165)[]{\texttt{MiniStringFrag\ldots}}
431\Text(150,145)[]{\texttt{ParticleDecays}}
432\Text(150,125)[]{\texttt{BoseEinstein}}
433\GBox(-130,60)(-20,90){0.9}
434\Text(-75,75)[]{\texttt{BeamParticle}}
435\GBox(20,60)(200,90){0.9}
436\Text(110,75)[]{\texttt{SigmaProcess, SigmaTotal}}
437\GBox(-215,10)(215,40){0.9}
438\Text(0,25)[]{\texttt{Vec4, Rndm, Hist, Settings, %
439ParticleDataTable, ResonanceWidths, \ldots}}
440\SetWidth{2}
441\LongArrow(0,350)(0,332)
442\LongArrow(-150,300)(-150,232)
443\LongArrow(0,300)(0,232)
444\Line(150,300)(150,280)
445\DashLine(150,280)(150,250){4}
446\LongArrow(150,250)(150,232)
447\SetWidth{1}
448\LongArrow(-192.5,230)(-192.5,248)
449\Line(-192.5,280)(-192.5,300)
450\DashLine(-192.5,300)(-192.5,330){4}
451\LongArrow(-192.5,330)(-192.5,348)
452\LongArrow(-107.5,230)(-107.5,248)
453\LongArrow(-42.5,250)(-42.5,232)
454\Line(-42.5,280)(-42.5,300)
455\DashLine(-42.5,300)(-42.5,330){4}
456\LongArrow(-42.5,330)(-42.5,348)
457\LongArrow(42.5,230)(42.5,248)
458\LongArrow(107.5,250)(107.5,232)
459\LongArrow(182.5,230)(182.5,248)
460\Line(182.5,280)(182.5,300)
461\DashLine(182.5,300)(182.5,330){4}
462\LongArrow(182.5,330)(182.5,348)
463\LongArrow(-107.5,100)(-107.5,108)
464\LongArrow(-107.5,100)(-107.5,92)
465\LongArrow(-42.5,100)(-42.5,108)
466\LongArrow(-42.5,100)(-42.5,92)
467\LongArrow(42.5,100)(42.5,108)
468\LongArrow(42.5,100)(42.5,92)
469\LongArrow(-160,50)(-160,108)
470\Line(-160,50)(0,50)
471\LongArrow(0,50)(19,59)
472\end{picture}
473\caption{The relationship between the main classes in
474\textsc{Pythia}~8. The thick arrows show the flow of commands
475to carry out different physics tasks, whereas the thinner show
476the flow of information between the tasks. The bottom box
477contains common utilities that may be used anywhere. Obviously
478the picture is strongly simplified.
479\label{fig:generatorstructure}}
480\hrulefill
481\end{figure}
482
483The structure of the \textsc{Pythia}~8 generator, as illustrated in
484Fig.~\ref{fig:generatorstructure}, is based on this subdivision.
485The main class for all user interaction is called \texttt{Pythia}.
486It calls on the three classes \texttt{ProcessLevel},
487\texttt{PartonLevel} and \texttt{HadronLevel}, corresponding
488to points 1, 2 and 3 above. Each of these, in their turn, call on
489further classes that perform the separate kinds of physics tasks.
490
491Information is flowing between the different program elements in
492various ways, the most important being the event record, represented
493by the \texttt{Event} class. Actually, there are two objects of this
494class, one called \texttt{process}, that only covers the few partons
495of the ``hard'' process of point 1 above (i.e., containing information
496corresponding to what might be termed the ``matrix element'' level),
497and another called \texttt{event}, that covers the full story from the
498incoming beams to the final hadrons. A small \texttt{Info} class keeps
499track of useful one-of-a-kind information, such as kinematical
500variables of the hard process.
501
502There are also two incoming \texttt{BeamParticle}s, that keep track
503of the partonic content left in the beams after a number of
504interactions and initial-state radiations, and rescales parton
505distributions accordingly.
506
507The process library, as well as parametrisations of total, elastic
508and diffractive cross sections, are used both by the hard-process
509selection machinery and the multiple-interactions one.
510
511The \texttt{Settings} database keeps track of all integer, double,
512boolean and string variables that can be changed by the user to steer
513the performance of \textsc{Pythia}, except that
514\texttt{ParticleDataTable} is its own separate database.
515
516Finally, a number of utilities can be used just about anywhere,
517for Lorentz four-vectors, random numbers, jet finding and simple
518histograms, and for a number of other ``minor'' tasks.
519
520Orthogonally to the subdivision above, there is another, more
521technical classification, whereby the user interaction with the
522generator occurs in three phases:
523\begin{itemize}
524\item Initialisation, where the tasks to be performed are specified.
525\item Generation of individual events (the ``event loop'').
526\item Finishing, where final statistics is made available.
527\end{itemize}
528Again the subdivision (and orthogonality) is not strict, with many
529utilities and tasks stretching across the borders, and with no
530finishing step required for many aspects. Nevertheless, as a rule,
531these three phases are represented by different methods
532inside the class of a specific physics task.
533
534\subsection{Program files and documentation}
535
536The code is subdivided into a set of files, mainly by physics
537task. Each file typically contains one main class, but often
538with a few related helper classes that are not used elsewhere in
539the program. Normally the files come in pairs.
540\begin{enumerate}
541\item A header file, \texttt{.h} in the \texttt{include}
542subdirectory, where the public interface of the class is declared,
543and inline methods are defined.
544\item A source code file, \texttt{.cc} in the \texttt{src}
545subdirectory, where the lengthier methods are implemented.
546\end{enumerate}
547During compilation, related dependency files, \texttt{.d}, and
548compiled code, \texttt{.o} are created in the \texttt{tmp}
549subdirectory.
550
551In part the \texttt{.xml} documentation files in the \texttt{xmldoc}
552subdirectory have matching names, but the match is broken by the
553desire to group topics more by user interaction than internal
554operation. These files contain information on all settings and
555particle data, but not in a convenient-to-read format. Instead they
556are translated into a corresponding set of \texttt{.html} files
557in the \texttt{htmldoc} subdirectory and a set of \texttt{.php}
558files in \texttt{phpdoc}. The former set can easily be read if
559you open the \texttt{htmldoc/Welcome.html} file in your favourite
560web browser, but offers no interactivity. The latter set must be
561installed under a webserver (like a homepage) to function properly,
562and then provides a simple Graphical User Interface if you open the
563\texttt{phpdoc/Welcome.php} file in a web browser.
564
565For output to the \textsc{HepMC} event record format \cite{hepmc},
566an interface is provided in the \texttt{hepmcinterface} subdirectory.
567There are also interfaces to allow parton distribution functions
568to be used from the \textsc{LhaPdf} library \cite{lhapdf} and hard
569processes from external programs.
570
571The installation procedure is described in a \texttt{README} file; it
572involves running a \texttt{configure} script, whereafter an ordinary
573\texttt{Makefile} is used. The former should be invoked with
574command-line arguments (or be edited) to provide the path to the
575\textsc{HepMC} library if this is going to be used. Compiled
576libraries are put in the \texttt{lib} subdirectory. Default is to
577build archive libraries, but optionally also shared-object ones can be
578built. The standard setup is intended for Linux systems, but a
579simplified alternative is provided for Windows users.
580
581Finally, some examples of main programs, along with input files, or
582``cards'', for them, are found in the \texttt{examples}
583subdirectory. This directory contains its own
584\texttt{configure} script and \texttt{Makefile} which will allow you
585to build executables, see the \texttt{examples/README} file.
586As above, command-line arguments or brute-force editing allows you
587to set the \textsc{LhaPdf} and \textsc{Pythia}~6.4 paths, if so required.
588The executables are placed in the \texttt{bin} directory, but with
589links from \texttt{examples}.
590
591\subsection{Important warnings}
592
593Playing with the files in the \texttt{examples} subdirectory is
594encouraged, to familiarise oneself with the program. Modifying the
595\texttt{configure} files may be required during installation. For
596the rest, files should not be modified, at least not without
597careful consideration of consequences.
598
599In particular, the \texttt{.xml} files are set read-only, and should
600not be tampered with. Interspersed in them, there are lines beginning
601with \texttt{<flag}, \texttt{<mode}, \texttt{<parm}, \texttt{<word},
602\texttt{<particle}, \texttt{<channel}, or \texttt{<a}. They contain
603instructions from which \texttt{Settings} and \texttt{ParticleDataTable}
604build up their respective databases of user-accessible variables,
605see further below. Any stupid changes here will cause
606difficult-to-track errors!
607
608Further, sometimes you will see two question marks, ``??'', in the
609text or code. This is for internal usage, to indicate loose ends or
610preliminary thoughts. Please disregard.
611
612\section{Main Program and Event Information \label{sec:main}}
613
614\subsection{The \texttt{Pythia} class}
615
616The \texttt{Pythia} class is the main means of communication between
617the user and the event-generation process. We here present the key
618methods for the user to call, ordered by context.
619
620Firstly, at the top of the main program, the proper header file must
621be included:\\
622\cindent \texttt{\#include "Pythia.h"}\\
623To simplify typing, it also makes sense to declare\\
624\cindent \texttt{using namespace Pythia8;}\\
625Given this, the first step in the main program is to create a
626generator object, e.g. with\\
627\cindent \texttt{Pythia pythia;}\\
628In the following we will assume that the \texttt{pythia} object
629has been created with this name, but of course you are free to
630pick another one.
631
632When this object is declared,
633the \texttt{Pythia} constructor initialises all
634the default values for the \texttt{Settings} and the
635\texttt{ParticleDataTable} data bases. These data are now present in
636memory and can be modified in a number of ways before the generator is
637initialised (see below).
638Most conveniently, \textsc{Pythia}'s settings and parameters can be
639changed by the two methods\\
640\cindent \texttt{pythia.readString(string);}\\
641for changing a single variable, and\\
642\cindent \texttt{pythia.readFile(fileName);}\\
643for changing a set of variables, one per line in the input file.
644The allowed form for a string/line will be explained as we consider
645the databases in the next section. Further, methods will be introduced
646to list all or only the changed settings and particle data.
647
648At this stage you can also optionally hook up with some external
649facilities, see section \ref{sec:external}.
650
651After this, in the initialisation call all remaining details of the
652generation are to be specified. The \texttt{pythia.init(...)} method
653allows a few different input formats, so you can pick the one
654convenient for you:\\
655\cindent \texttt{pythia.init(idA, idB, eA, eB);}\\
656lets you specify the identities and energies of the two incoming
657beam particles, with A (B) assumed moving in the $+z$ ($-z$)
658direction;\\
659\cindent \texttt{pythia.init(idA, idB, eCM);}\\
660is similar, but you specify the CM energy, and you are assumed
661in the rest frame;\\
662\cindent \texttt{pythia.init(LHAinit*, LHAevnt*);}\\
663assumes LHA initialisation information is available
664in an \texttt{LHAinit} class object, and that LHA event information
665will be provided by the \texttt{LHAevnt} class object, see below;\\
666\cindent \texttt{pythia.init(fileName);}\\
667assumes that the file obeys the LHEF standard format and that
668information can be extracted from it accordingly;
669and finally\\
670\cindent \texttt{pythia.init();}\\
671will take its values from the beam specification stored in the
672\texttt{Settings} database.
673
674It is when the \texttt{init(...)} call is executed that all the
675settings values are propagated to the various program elements, and
676used to precalculate quantities that will be used at later
677stages of the generation. Further settings changed after the
678\texttt{init(...)} call will be ignored (unless methods are used to force
679a partial or complete re-initialisation). By contrast, the particle
680properties database is queried all the time, and so a later change
681would take effect immediately, for better or worse.
682
683The bulk of the code is concerned with the event generation proper.
684However, all the information on how this should be done has already
685been specified. Therefore only a command\\
686\cindent \texttt{pythia.next();}\\
687is required to generate the next event. This method would be located
688inside an event loop, where a required number of events are to be
689generated.
690
691The key output of the \texttt{pythia.next()} command is the event
692record found in \texttt{pythia.event}, see below. A process-level
693summary of the event is stored in \texttt{pythia.process}.
694
695When problems are encountered, in \texttt{init(...)} or
696\texttt{next()}, they can be assigned one of three degrees of
697severity. Abort is the highest. In that case the call could not
698complete its tasks, and returns the value \texttt{false}. If this
699happens in \texttt{init(...)} it is then not possible to generate any
700events at all. If it happens in \texttt{next()} only the current event
701must be skipped. In a few cases the abort may be predictable and
702desirable, e.g.\ when a file of LHA events comes to an end. Errors are
703less severe, and the program can usually work around them, e.g.\ by
704backing up one step and trying again. Should that not succeed, an
705abort may result. Warnings are of informative character only, and do
706not require any corrective actions (except, in the longer term, to
707find more reliable algorithms).
708
709At the end of the generation process, you can call\\
710\cindent \texttt{pythia.statistics();}\\
711to get some run statistics, both on cross sections for the
712subprocesses generated and on the number of aborts, errors and
713warnings issued.
714
715\subsection{The event record}
716
717The \texttt{Event} class for event records is not much more than
718a wrapper for a vector of \texttt{Particle}s. This vector can expand
719to fit the event size. The index operator is overloaded, so that
720\texttt{event[i]} corresponds to the \texttt{i}'th particle of an
721\texttt{Event} object called \texttt{event}. For instance, given
722that the PDG identity code \cite{pdg} of a particle is provided by
723the \texttt{id()} method, \texttt{event[i].id()} returns the identity
724of the \texttt{i}'th particle.
725
726Line 0 is used to represent the event as a whole, with its total
727four-momentum and invariant mass, but does not form part of the
728event history, and only contains redundant information. When you
729translate to another event-record format where the first particle is
730assigned index 1, such as \textsc{HepMC}, this line should therefore
731be dropped so as to keep the rest of the indices synchronised.
732It is only with lines 1 and 2, which contain the two incoming beams,
733that the history tracing begins. That way unassigned mother and
734daughter indices can be put 0 without ambiguity.
735
736In this section, first the \texttt{Particle} methods are surveyed,
737and then the further aspects of the event record.
738
739\subsubsection{The particle}
740
741A \texttt{Particle} corresponds to one entry/slot/line in the event
742record. Its properties therefore mix ones belonging to a
743particle-as-such, like its identity code or four-momentum, and ones
744related to the event-as-a-whole, like which mother it has.
745
746The following properties are stored for each particle, listed by the
747member functions you can use to extract the information:
748\begin{itemize}
749\item \texttt{id()} :
750the identity of a particle, according to the PDG particle codes.
751\item \texttt{status()} :
752status code. The full set of codes provides information on where and why
753a given particle was produced. The key feature is that a particle is
754assigned a positive status code when it is created, which then is negated
755if later it branches into other particles. The mechanism of this branching
756can be inferred from the status code of the daughters. Thus, at any given
757stage of the event-generation process, the current final state consists of
758the particles with positive status code.
759\item \texttt{mother1(), mother2()} :
760the indices in the event record where the first and last mothers are
761stored, if any. A few different cases are possible, to allow for one
762or many mothers. The \texttt{motherList(i)} method (see below) can
763return a vector with all the mother indices, based on this info.
764\item \texttt{daughter1(), daughter2()} :
765the indices in the event record where the first and last daughters are
766stored, if any. A few different cases are possible, to allow for one
767or many daughters. The \texttt{daughterList(i)} method (see below)
768can return a vector with all the daughter indices, based on this info.
769\item \texttt{col(), acol()} :
770the colour and anticolour tags, LHA style.
771\item \texttt{px(), py(), pz(), e()} :
772the particle four-momentum components (in GeV, with $c = 1$),
773alternatively extracted as a \texttt{Vec4 p()}.
774\item \texttt{m()} :
775the particle mass (in GeV).
776\item \texttt{scale()} :
777the scale at which a parton was produced (in GeV); model-specific
778but relevant in the processing of an event.
779\item \texttt{xProd(), yProd(), zProd(), tProd()} :
780the production vertex coordinates (in mm or mm/$c$), alternatively
781extracted as a \texttt{Vec4 vProd()}.
782\item \texttt{tau()} : the proper lifetime (in mm/$c$).
783\end{itemize}
784The same method names, with a value inserted between the brackets,
785set these quantities.
786
787In addition, a number of derived quantities can easily be obtained,
788but cannot be set, such as:
789\begin{itemize}
790\item \texttt{isFinal()} :
791\texttt{true} for a remaining particle, i.e. one with positive status
792code, else \texttt{false}.
793\item \texttt{pT(), pT2()} :
794(squared) transverse momentum.
795\item \texttt{mT(), mT2()} :
796(squared) transverse mass.
797\item \texttt{pAbs(), pAbs2()} :
798(squared) three-momentum magnitude.
799\item \texttt{theta(), phi()} :
800polar and azimuthal angle (in radians).
801\item \texttt{y(), eta()} : rapidity and pseudorapidity.
802\item \texttt{xDec(), yDec(), zDec(), tDec()} :
803the decay vertex coordinates, assuming free-streaming propagation,
804alternatively extracted as a \texttt{Vec4 vDec()}.
805\end{itemize}
806
807Each \texttt{Particle} contains a pointer to the respective
808\texttt{ParticleDataEntry} object in the particle data tables. This
809pointer gives access to properties of the particle species as such.
810It is there mainly for convenience, and should be thrown if an event
811is written to disk, to avoid any problems of object persistency.
812This pointer is used by member functions such as:
813\begin{itemize}
814\item \texttt{name()} :
815the name of the particle, as a string.
816\item \texttt{spinType()} : $2 s + 1$, or 0 where undefined spin.
817\item \texttt{charge(), chargeType()} : charge, and three times it
818to make an integer.
819\item \texttt{isCharged(), isNeutral()} : \texttt{bool}s for charged
820or not.
821\item \texttt{colType()} : 0 for colour singlets, 1 for triplets,
822$-1$ for antitriplets and 2 for octets.
823\item \texttt{m0()} :
824the nominal mass of the particle species.
825\end{itemize}
826
827\subsubsection{Other methods in the event record}
828
829While the \texttt{Particle} vector is the key component of an
830\texttt{Event}, a few further methods are available.
831The event size can be found with \texttt{size()}, i.e. valid particles
832are stored in the range $0 \leq $\texttt{i}$ <$ \texttt{event.size()}.
833
834A listing of the whole event is obtained with \texttt{list()}. The
835basic identity, status, mother, daughter, colour, four-momentum and
836mass data are always given, but optional arguments can be set to provide
837further information, on the complete lists of mothers and daughters,
838and on production vertices.
839
840The user would normally be concerned with the \texttt{Event} object that
841is a public member \texttt{event} of the \texttt{Pythia} class. Thus
842\texttt{pythia.event[i].id()} would be used to return the identity of
843the \texttt{i}'th particle, and \texttt{pythia.event.size()} to give
844the size of the event record.
845
846A \texttt{Pythia} object contains a second event record for the
847hard process alone, similar to the LHA process specification,
848called \texttt{process}. This record is used as input for the
849generation of the complete event. Thus one may e.g. call either
850\texttt{pythia.process.list()} or \texttt{pythia.event.list()}. To
851distinguish those two rapidly at visual inspection, the
852``Pythia Event Listing'' header is printed out differently, adding
853either ``(hard process)'' or ``(complete event)''.
854
855There are also a few methods with an individual particle index
856\texttt{i} as input, but requiring some search operations in the
857event record, and therefore not possible to define as methods of
858the \texttt{Particle} class. The most important ones are
859\texttt{motherList(i)}, \texttt{daughterList(i)} and
860\texttt{sisterList(i)}. These return a \texttt{vector<int>} containing
861a list of all the mothers, daughters or sisters of a particle. This
862list may be empty or arbitrarily large, and is given in ascending order.
863
864One data member in an Event object is used to keep track of the
865largest \texttt{col()} or \texttt{acol()} tag set so far, so that new
866ones do not clash.
867
868The event record also contains two further sets of vectors. These are
869intended for the expert user only, so only a few words on each.
870The first is a vector of junctions, i.e.\ vertices where three string
871pieces meet. This list is often empty or else contains only a very few
872per event. The second is a storage area for parton indices, classified
873by subsystem. Such information is needed to interleave multiple
874interactions, initial-state showers, final-state showers and beam
875remnants. It can also be used in the hadronisation.
876
877\subsection{Other event information}
878
879A set of one-of-a-kind pieces of event information is stored in the
880\texttt{info} object (an instance of the class
881\texttt{Info}) in the \texttt{Pythia} class. This is mainly
882intended for processes generated internally, but some of the information
883is also available for external processes.
884
885You can use \texttt{pythia.info.method()} to extract e.g.\ the
886following information:
887\begin{itemize}
888\item \texttt{list()} : list some information on the current event.
889\item \texttt{eCM(), s()} : the cm energy and its square.
890\item \texttt{name(), code()} : the name and code of the subprocess.
891\item \texttt{id1(), id2()} : the identities of the two partons
892coming in to the hard subprocess.
893\item \texttt{x1(), x2()} : $x$ fractions of the two partons coming
894in to the hard subprocess.
895\item \texttt{pdf1(), pdf2(), QFac(), Q2Fac()} : parton densities
896$x \, f_i(x,Q^2 )$ evaluated for the two incoming partons, and the
897associated factorisation scale $Q$ and its square.
898\item \texttt{mHat(), sHat(), tHat(), uHat()} : the invariant mass of
899the hard subprocess and the Mandelstam variables for $2 \to 2$
900processes.
901\item \texttt{pTHat(), thetaHat()} : transverse momentum and polar
902scattering angle of the hard subprocess for $2 \to 2$ processes.
903\item \texttt{alphaS(), alphaEM(), QRen(), Q2Ren()} :
904$\alpha_{\mathrm{s}}$ and $\alpha_{\mathrm{em}}$ values for the
905hard process, and the associated renormalisation scale $Q$ and its square.
906\item \texttt{nTried(), nAccepted(), sigmaGen(), sigmaErr()} :
907the number of trial and accepted events, and the resulting estimated
908cross section and estimated statistical error, in units of mb, summed
909over the included processes.
910\end{itemize}
911
912In other classes there are also methods that can be called to do a
913sphericity or thrust analysis or search for jets with a clustering
914or simple cone jet finder. These take the event record as input.
915
916\section{Databases \label{sec:databases}}
917
918Inevitably one wants to be able to modify the default behaviour of a
919generator. Currently there are two \textsc{Pythia}~8 databases with
920modifiable values. One deals with general settings, the other
921specifically with particle data.
922
923The key method to set a new value is\\
924\cindent \texttt{pythia.readString(string);}\\
925The typical form of a string is\\
926\cindent \texttt{"variable = value"}\\
927where the equal sign is optional and the variable begins with a letter
928for settings and a digit for particle data. A string not beginning with
929either is considered as a comment and ignored. Therefore inserting an
930initial !, \#, \$, \%, or another such character, is a good way to
931comment out a command. For non-commented strings, the match of the name
932to the database is case-insensitive. Strings that do begin with a letter
933or digit and still are not recognised cause a warning to be issued, unless
934a second argument \texttt{false} is used in the call. Any further text
935after the value is ignored, so the rest of the string can be used for
936any comments. For variables with an allowed range, values below the minimum
937or above the maximum are set at the respective border. For \texttt{bool}
938values, the following notation may be used interchangeably:
939\texttt{true} = \texttt{on} = \texttt{yes} = \texttt{ok} = 1. Everything
940else gives \texttt{false} (including but not limited to \texttt{false},
941\texttt{off}, \texttt{no} and \texttt{0}).
942
943The \texttt{readString(...)} method is convenient for changing one or two
944settings, but becomes cumbersome for more extensive modifications. In
945addition, a recompilation and relinking of the main program is
946necessary for any change of values. Alternatively, the changes can
947therefore be collected in a file, for historical reasons
948often called a ``card file'', where each line is a
949character string defined in the same manner as above (without
950quotation marks).
951The whole file can then be read and processed with a command\\
952\cindent \texttt{pythia.readFile(fileName);}\\
953As above, comments can be freely interspersed.
954
955\subsection{Settings}
956
957We distinguish four kinds of user-modifiable variables, by the way
958they have to be stored:
959\begin{enumerate}
960\item A \texttt{Flag} is an on/off switch, and is stored as a
961\texttt{bool}.
962\item A \texttt{Mode} corresponds to an enumeration of
963separate options, and is stored as an \texttt{int}.
964\item A \texttt{Parm} --- short for parameter --- takes a continuum
965of values, and is stored as a \texttt{double}.
966\item A \texttt{Word} is a text string (with no embedded blanks)
967and is stored as as a \texttt{string}.
968\end{enumerate}
969Collectively the four above kinds of variables are called
970settings. Not surprisingly, the class that stores them
971is called \texttt{Settings}.
972
973Each variable stored in \texttt{Settings} is associated
974with a few pieces of information. These are:
975\begin{itemize}
976\item
977The variable name, of the form \texttt{class:name} (or
978\texttt{file:name}, or \texttt{task:name}, usually these agree), e.g.
979\texttt{TimeShower:pTmin}.
980\item
981The default value, set in the original declaration, and intended
982to represent a reasonable choice. This value
983is not user modifiable.
984\item
985The current value. During construction of the \texttt{Settings}
986object, this value is set equal to the default value. It can
987subsequently be modified, e.g.\ by the
988\texttt{pythia.readString()} or \texttt{pythia.readFile()} methods
989discussed above. During the \texttt{pythia.init()} initialisation
990this value will be stored as a local copy in the class(es) where it
991is used, and thereby also control the subsequent generation.
992\item
993An allowed range of values, represented by meaningful minimum and
994maximum values. This has no sense for a flag or a word, is usually
995rather well-defined for a mode, but less so for a parameter. Either
996of the minimum and maximum may be left free, giving an open-ended
997range. Often the allowed range exaggerates the uncertainty in our
998current knowledge, so as not to restrict too much what the user can
999do. All the same, this information should not be modified by the
1000user.
1001\end{itemize}
1002
1003Technically, the \texttt{Settings} class is implemented with the help
1004of four separate maps, one for each kind of variable, with the name
1005used as key. The default values are taken from the \texttt{.xml}
1006files in the \texttt{xmldoc} subdirectory. The \texttt{Settings} class
1007is purely static, i.e.\ exists only as one global copy, that you can
1008interact with directly by \texttt{Settings::command(argument)}.
1009However, a \texttt{settings} object is a public member of the
1010\texttt{Pythia} class, so an alternative notation would be
1011\texttt{pythia.settings.command(argument)}. As already mentioned,
1012for input the \texttt{pythia.readString(...)} method is to be preferred,
1013since it also can handle particle data. A typical example would be\\
1014\cindent\texttt{pythia.readString("TimeShower:pTmin = 1.0");}
1015
1016You may obtain a listing of all variables in the database by calling\\
1017\cindent \texttt{pythia.settings.listAll();}\\
1018The listing is strictly alphabetical, which at least means that names
1019in the same area are kept together, but otherwise may not be so
1020well-structured: important and unimportant ones will appear mixed.
1021A useful alternative is\\
1022\cindent \texttt{pythia.settings.listChanged();}\\
1023which will only print out a list of
1024those variables that differ from their defaults.
1025
1026\subsection{Processes}
1027
1028All internal processes available in \textsc{Pythia}~8
1029can be switched on and off via the ordinary settings machinery
1030just discussed, using flags of the generic type
1031\texttt{ProcessGroup:ProcessName}. A complete list of processes
1032currently implemented is given in Table~\ref{processes}. By
1033default all processes are off. A whole group can be turned on by a
1034\texttt{ProcessGroup:all = on} command, then overriding the individual
1035flags.
1036
1037\begin{table}
1038\caption{Currently implemented processes, complete with respect to
1039groups, but with some individual processes missing for lack of space
1040(represented by ``...'').
1041In the names, a ``2'' separates initial and final state, an ``(s:X)'',
1042``(t:X)'' or ``(l:X)'' occasionally appends info on an $s$- or
1043$t$-channel- or loop-exchanged particle $X$.
1044 \protect\label{processes}}
1045\vspace{2mm}
1046\texttt{
1047\begin{tabular}{|l|l|@{\protect\rule[-1mm]{0mm}{6mm}}}
1048\hline
1049ProcessGroup & ProcessName\\
1050\hline
1051SoftQCD & minBias,elastic, singleDiffractive,\\
1052 & doubleDiffractive\\
1053\hline
1054HardQCD & gg2gg, gg2qqbar, qg2qg, qq2qq, qqbar2gg,\\
1055 & qqbar2qqbarNew, gg2ccbar, qqbar2ccbar,\\
1056 & gg2bbbar, qqbar2bbbar\\
1057\hline
1058PromptPhoton & qg2qgamma, qqbar2ggamma, gg2ggamma,\\
1059 & ffbar2gammagamma, gg2gammagamma\\
1060\hline
1061WeakBosonExchange & ff2ff(t:gmZ), ff2ff(t:W)\\
1062\hline
1063WeakSingleBoson & ffbar2gmZ, ffbar2W, ffbar2ffbar(s:gm)\\
1064\hline
1065WeakDoubleBoson & ffbar2gmZgmZ, ffbar2ZW, ffbar2WW\\
1066\hline
1067WeakBosonAndParton & qqbar2gmZg, qg2gmZq, ffbar2gmZgm, fgm2gmZf\\
1068 & qqbar2Wg, qg2Wq, ffbar2Wgm, fgm2Wf\\
1069\hline
1070Charmonium & gg2QQbar[3S1(1)]g, qg2QQbar[3PJ(8)]q, \ldots\\
1071\hline
1072Bottomonium & gg2QQbar[3S1(1)]g, gg2QQbar[3P2(1)]g, \ldots\\
1073\hline
1074Top & gg2ttbar, qqbar2ttbar, qq2tq(t:W), \\
1075 & ffbar2ttbar(s:gmZ), ffbar2tqbar(s:W) \\
1076\hline
1077\multicolumn{2}{|l|@{\protect\rule[-1mm]{0mm}{6mm}}}%
1078{FourthBottom, FourthTop, FourthPair \textrm{(fourth generation)}} \\
1079\hline
1080HiggsSM & ffbar2H, gg2H, ffbar2HZ, ff2Hff(t:WW), \ldots\\
1081\hline
1082HiggsBSM & \textrm{h, H and A as above, charged Higgs, pairs}\\
1083\hline
1084SUSY & qqbar2chi0chi0 \textrm{(not yet completed)}\\
1085\hline
1086NewGaugeBoson & ffbar2gmZZprime, ffbar2Wprime, ffbar2R0\\
1087\hline
1088LeftRightSymmmetry & ffbar2ZR, ffbar2WR, ffbar2HLHL, \ldots\\
1089\hline
1090LeptoQuark & ql2LQ, qg2LQl, gg2LQLQbar, qqbar2LQLQbar\\
1091\hline
1092 ExcitedFermion & dg2dStar, qq2uStarq, qqbar2muStarmu, \ldots\\
1093\hline
1094ExtraDimensionsG* & gg2G*, qqbar2G*, \ldots\\
1095\hline
1096\end{tabular}
1097}
1098\end{table}
1099
1100Note that processes in the \texttt{SoftQCD} group are of a kind
1101that cannot be input via the LHA, while essentially all other kinds
1102could.
1103
1104Each process is assigned an integer code. This code is not used in
1105the internal administration of events; it is only intended to allow
1106a simpler user separation of different processes. Also the process
1107name is available, as a string.
1108
1109For many processes it makes sense to apply phase space cuts. The ones
1110currently available (in the \texttt{Settings} database) in particular
1111include
1112\begin{itemize}
1113\item \texttt{PhaseSpace:mHatMin, PhaseSpace:mHatMax} :
1114the range of invariant masses of the scattering process.
1115\item \texttt{PhaseSpace:pTHatMin, PhaseSpace:pTHatMax} :
1116the range of transverse momenta in the rest frame of the
1117process for $2 \to 2$ and $2 \to 3$ processes (for each of the
1118products).
1119\end{itemize}
1120In addition, for any resonance with a Breit-Wigner mass distribution,
1121the allowed mass range of that particle species is taken into
1122account, both for $2 \to 1$, $2 \to 2$ and $2 \to 3$ processes,
1123thereby providing a further cut possibility. Note that the
1124\texttt{SoftQCD} processes do not use any cuts but generate their
1125respective cross sections in full.
1126
1127\subsection{Particle data}
1128
1129The following particle properties are stored in the
1130\texttt{ParticleDataTable} class for a given PDG particle identity code
1131\texttt{id}, here presented by the method used to access this property:
1132\begin{itemize}
1133\item \texttt{name(id)} :
1134particle and antiparticle names are stored separately,
1135the sign of \texttt{id} determines which of the two is returned, with
1136``void'' used to indicate the absence of an antiparticle.
1137\item \texttt{hasAnti(id)} :
1138\texttt{bool} whether a distinct antiparticle exists or not.
1139\item \texttt{spinType(id)} : $2 s + 1$ for particles with defined spin,
1140else 0.
1141\item \texttt{chargeType(id)} :
1142three times the charge (to make it an integer); can also be read as a
1143\texttt{double charge(id) = chargeType(id)/3}.
1144\item \texttt{colType(id)} :
1145the colour type, with 0 uncoloured, 1 triplet, $-1$ antitriplet
1146and 2 octet.
1147\item \texttt{m0(id)} :
1148the nominal mass $m_0$ (in GeV).
1149\item \texttt{mWidth(id)} :
1150the width $\Gamma$ of the Breit-Wigner mass distribution (in GeV).
1151\item \texttt{mMin(id), mMax(id)} :
1152the allowed mass range generated by the Breit-Wigner,
1153$m_{\mathrm{min}} < m < m_{\mathrm{max}}$ (in GeV).
1154\item \texttt{tau0(id)} :
1155the nominal proper lifetime $\tau_0$ (in mm/$c$).
1156\item \texttt{constituentMass(id)} :
1157the constituent mass for a quark, hardcoded as
1158$m_{\mathrm{u}} = m_{\mathrm{d}} = 0.325$, $m_{\mathrm{s}} = 0.50$,
1159$m_{\mathrm{c}} = 1.60$ and $m_{\mathrm{b}} = 5.0$ GeV, for a diquark
1160the sum of quark constituent masses, and for everything else the same
1161as the ordinary mass.
1162\item \texttt{mRun(id, massScale)} : the running mass for quarks,
1163else the same as the nominal mass.
1164\item \texttt{mayDecay(id)} :
1165a flag telling whether a particle species may decay or not, offering
1166the main user switch (whether a given particle of this kind then
1167actually will decay also depends on other flags in the
1168\texttt{ParticleDecays} class).
1169\end{itemize}
1170Similar methods can also be used to set most of these properties.
1171
1172Each particle kind in the \texttt{ParticleDataTable} also has a
1173a vector of \texttt{DecayChannel}s associated with it. The following
1174properties are stored for each decay channel:
1175\begin{itemize}
1176\item \texttt{onMode()} :
1177whether a channel is on (1) or off (0), or on only for particles
1178(2) or antiparticles (3).
1179\item \texttt{bRatio()} :
1180the branching ratio.
1181\item \texttt{meMode()} :
1182the mode of processing this channel, possibly with
1183matrix-element information; 0 gives isotropic phase space.
1184\item \texttt{multiplicity()} :
1185the number of decay products in a channel, at most 8.
1186\item \texttt{product(i)} :
1187a list of the decay products, 8 products $0 \leq $\texttt{i}$ < 8$,
1188with trailing unused ones set to 0.
1189\end{itemize}
1190
1191The original particle data and decay table is read in from the
1192\texttt{ParticleData.xml} file.
1193
1194The \texttt{ParticleDataTable} class is purely static, i.e. exists as
1195one global copy, that you can interact directly with by
1196\texttt{ParticleDataTable::command(argument)}. However, a
1197\texttt{particleData} object of the \texttt{ParticleDataTable} class
1198is a public member of the \texttt{Pythia} class, which offers an
1199alternatively notation. As already mentioned, for input the
1200\texttt{pythia.readString(string)} method is to be preferred, since it
1201also can handle settings.
1202
1203It is only the form of the \texttt{string} that needs to be specified
1204slightly differently than for settings, as\\
1205\cindent \texttt{id:property = value}.\\
1206The \texttt{id} part is the standard PDG particle code, i.e.\ a number,
1207and \texttt{property} is one of the ones already described above,
1208with a few minor differences: \texttt{name}, \texttt{antiName},
1209\texttt{spinType}, \texttt{chargeType}, \texttt{colType}, \texttt{m0},
1210\texttt{mWidth}, \texttt{mMin}, \texttt{mMax}, \texttt{tau0},
1211\texttt{mayDecay}, \texttt{isResonance}, \texttt{isVisible},
1212\texttt{doExternalDecay}, and \texttt{doForceWidth}. As before, several
1213commands can be stored as separate lines in a file, say\\
1214\cindent \texttt{111:name = piZero ! normal notation pi0}\\
1215\cindent \texttt{3122:mayDecay = false ! Lambda0 stable}\\
1216\cindent \texttt{431:tau0 = 0.15 ! D\_s proper lifetime}\\
1217and then be read with \texttt{pythia.readFile(fileName)}.
1218
1219For major changes of the properties of a particle, the above
1220one-at-a-time changes can become rather cumbersome. Therefore
1221a few extended input formats are available, where a whole
1222set of properties can be given after the equal sign, separated
1223by blanks and/or by commas. One line like\\
1224\cindent \texttt{id:all = name antiName spinType chargeType %
1225colType m0 mWidth mMin mMax tau0}\\
1226replaces all the current information on the particle itself, but
1227keeps its decay channels, if any, while using \texttt{new} instead
1228of \texttt{all} also removes any previous decay channels. (The
1229flags \texttt{mayDecay}, \texttt{isResonance}, \texttt{isVisible},
1230\texttt{doExternalDecay}, and \texttt{doForceWidth} are in either
1231case reset to their defaults and would have to be changed separately.)
1232
1233In order to change the decay data, the decay channel number needs
1234to be given right after the particle number, i.e. the command form
1235becomes\\
1236\cindent \texttt{id:channel:property = value}.\\
1237Recognised properties are \texttt{onMode}, \texttt{bRatio},
1238\texttt{meMode} and \texttt{products}, where the latter expects a
1239list of all the decay products, separated by blanks, up until the
1240end of the line, or until a non-number is encountered.
1241The property \texttt{all} will replace all the information on the
1242channel, i.e.\\
1243\cindent \texttt{id:channel:all = onMode bRatio meMode products }\\
1244To add a new channel at the end, use\\
1245\cindent \texttt{id:addChannel = onMode bRatio meMode products } \\
1246To remove all existing channels and force decays into one new channel,
1247use\\
1248\cindent \texttt{id:oneChannel = onMode bRatio meMode products } \\
1249A first \texttt{oneChannel} command could be followed by several
1250subsequent \texttt{addChannel} ones, to build up a completely new decay
1251table for an existing particle.\\
1252It is currently not possible to remove a channel selectively, but setting
1253its branching ratio vanishing is as effective.
1254
1255Often one may want to allow only a specific subset of decay channels
1256for a particle. This can be achieved e.g.\ by a repeated use of
1257\texttt{id:channel:onMode} commands, but there also is a set of commands
1258that initiates a loop over all decay channels and allows a matching to be
1259carried out. The \texttt{id:onMode} command can switch \texttt{on} or
1260\texttt{off} all channels. The \texttt{id:onIfAny} and \texttt{id:offIfAny}
1261will switch on/off all channels that contain any of the enumerated
1262particles. For instance\\
1263\cindent \texttt{23:onMode = off}\\
1264\cindent \texttt{23:onIfAny = 1 2 3 4 5}\\
1265first switches off all $\mathrm{Z}^0$ decay modes and then switches
1266 back on any that contains one of the five lighter quarks. Other
1267methods are \texttt{id:onIfAll} and \texttt{id:offIfAll}, and
1268\texttt{id:onIfMatch} and \texttt{id:offIfMatch},
1269where all the enumerated products must be present for a decay channel
1270to be switched on/off. The difference is that the former two allow further
1271non-matched particles in a decay channel while the latter two do not.
1272There are also further methods to switch on channels selectively either
1273for the particle or for the antiparticle.
1274
1275When a particle is to be decayed, the branching ratios of the allowed
1276channels are always rescaled to unit sum. There are also methods for
1277by-hand rescaling of branching ratios.
1278
1279You may obtain a listing of all the particle data by calling\\
1280\cindent \texttt{pythia.particleData.listAll()}.\\
1281The listing is by increasing \texttt{id} number. To list only those
1282particles that have been changed, instead use\\
1283\cindent \texttt{pythia.particleData.listChanged()}.\\
1284To list only one specific particle \texttt{id}, use \texttt{list(id)}.
1285It is also possible to \texttt{list} a \texttt{vector<int>} of
1286\texttt{id}'s.
1287
1288\section{Links to external programs \label{sec:external}}
1289
1290While \textsc{Pythia}~8 itself is self-contained and can be
1291run without reference to any external library, often one does
1292want to make use of other programs that are specialised on some aspect
1293of the generation process. The HTML/PHP documentation accompanying the
1294code contains full information on how the different links should be set
1295up. Here the purpose is mainly to point out the possibilities that
1296exist.
1297
1298\subsection{The Les Houches interface}
1299
1300The Les Houches Accord for user processes (LHA) \cite{lha} is the
1301standard way to input parton-level information from a
1302matrix-elements-based generator into \textsc{Pythia}. The conventions
1303for which information should be stored has been defined in a Fortran
1304context, as two commonblocks. Here a C++ equivalent is defined,
1305as two separate classes.
1306
1307The \texttt{LHAinit} and \texttt{LHAevnt} classes are base classes,
1308containing reading and printout methods, plus a pure virtual
1309method \texttt{set()} each. Derived classes have to provide these two
1310virtual methods to do the actual work. Currently the only examples
1311are for reading information at runtime from the respective
1312Fortran commonblock or for reading it from a Les Houches Event File
1313(LHEF) \cite{lhef}.
1314
1315The \texttt{LHAinit} class stores information equivalent to the
1316\texttt{/HEPRUP/} commonblock, as required to initialise the
1317event-generation chain.
1318The \texttt{LHAevnt} class stores information equivalent to the
1319\texttt{/HEPEUP/} commonblock, as required to hand in the next
1320parton-level configuration for complete event generation.
1321
1322The \texttt{LHAinitFortran} and \texttt{LHAevntFortran} are two
1323derived classes, containing \texttt{set()} members that read the
1324respective LHA Fortran commonblock for initialisation and event
1325information. This can be used for a runtime link to a Fortran
1326library. As an example, an interface is provided to the
1327\textsc{Pythia}~6.4 process library.
1328
1329The \texttt{LHAinitLHEF} and \texttt{LHAevntLHEF} are two
1330other derived classes, that can read a file with initialisation and
1331event information, assuming that the file has been written in the
1332LHEF format. You do not need to declare these classes yourself,
1333since a shortcut is provided by the \texttt{pythia.init(fileName)}
1334command.
1335
1336If you create \texttt{LHAinit} and \texttt{LHAevnt} objects yourself,
1337pointers to those should be handed in with the \texttt{init(...)} call,
1338then of the form \texttt{pythia.init(LHAinit*, LHAevnt*)}.
1339
1340\subsection{Semi-internal processes and resonances}
1341
1342When you implement new processes via the Les Houches Accord you do all
1343flavour, colour and phase-space selection externally, before your
1344process-level events are input for further processing by \textsc{Pythia}.
1345However, it is also possible to implement a new process in exactly the
1346same way as the internal \textsc{Pythia} ones, thus making use of the
1347internal phase-space selection machinery to sample an externally provided
1348cross-section expression.
1349
1350The matrix-element information has to be put in a new class that derives
1351from one of the existing classes, \texttt{Sigma1Process} for $2 \to 1$
1352processes, \texttt{Sigma2Process} for $2 \to 2$ ones, and
1353\texttt{Sigma3Process} for $2 \to 3$ ones, which in their turn derive
1354from the \texttt{SigmaProcess} base class. Note that \texttt{Pythia} is
1355rather good at handling the phase space of $2 \to 1$ and $2 \to 2$
1356processes, is more primitive for $2 \to 3$ ones and does not at all address
1357higher multiplicities. This limits the set of processes that you can
1358implement in this framework. The produced particles may be resonances,
1359however, so it is possible to end up with bigger "final" multiplicities
1360through sequential decays, and to include further matrix-element weighting
1361in those decays.
1362
1363In your new class you have to implement a number of methods. Chief among
1364them is one to return the matrix-element weight for an already specified
1365kinematics configuration and another one to set up the final-state flavours
1366and colour flow of the process. Further methods exist, some of more
1367informative character, such as providing the name of the process.
1368Should you actually go ahead, it is strongly recommended to shop around
1369for a similar process that has already been implemented, and to use that
1370existing code as a template.
1371
1372Once a class has been written, a pointer of type \texttt{SigmaProcess*}
1373to a \texttt{new} instance of your class needs to be created in the main
1374program, and handed in with the \texttt{pythia.setSigmaPtr(...)} method.
1375{}From there on the process will be handled on equal footing with internally
1376implemented processes.
1377
1378If your new process introduces a new particle you have to add it and its
1379decay channels to the particle database, as already explained. This only
1380allows for a fixed width and fixed branching ratios, however, with only
1381some minor generalisations. To obtain a dynamical calculation, where the
1382width and the branching ratios can vary as a function of the currently
1383chosen mass, you must also create a new class for it that derives from the
1384\texttt{ResonanceWidths} class. In it you have to implement a method
1385that returns the partial width for each of the possible decay channels.
1386The structure is simpler than for the \texttt{SigmaProcess} case, but
1387again it may be convenient to use a similar existing resonance as a
1388template. You then hand in a pointer to an instance of this new class
1389with the \texttt{pythia.setResonancePtr(...)} method.
1390
1391\subsection{Parton distribution functions}
1392
1393The \texttt{PDF} class is the base class for all parton distribution
1394function parametrisations, from which specific \texttt{PDF} classes
1395are derived. Currently the selection of sets that comes with the
1396program is very limited; for protons only CTEQ 5L (default) and
1397GRV 94L are available. However, a built-in interface to the
1398\textsc{LhaPdf} library \cite{lhapdf} allows a much broader selection,
1399if only \textsc{LhaPdf} is linked together with \textsc{Pythia}.
1400
1401Should this not be enough, it is possible to write your own class
1402derived from the \texttt{PDF} base class, wherein you implement the
1403\texttt{xfUpdate(...)} member to do the actual updating of PDFs.
1404Once you have created two distinct \texttt{PDF} objects, \texttt{pdfA}
1405and \texttt{pdfB}, you should supply pointers to these as arguments in
1406a \texttt{pythia.setPDFPtr(pdfA*, pdfB*)} call.
1407
1408A word of warning: to switch to a new PDF set implies that a complete
1409retuning of the generator may be required, since the underlying-event
1410activity from multiple interactions and parton showers is changed. There
1411is an option that allows a replacement of the PDF for the hard process
1412only, so that this is not required. Inconsistent but convenient.
1413
1414\subsection{External decay packages}
1415
1416While \texttt{Pythia} is set up to handle any particle decays,
1417decay products are often (but not always) distributed isotropically
1418in phase space, i.e.\ polarisation effects and nontrivial matrix
1419elements usually are neglected in \textsc{Pythia}. Especially for the
1420$\tau$ lepton and for some $\mathrm{B}$ mesons it is therefore common
1421practice to rely on dedicated decay packages \cite{tauola, evtgen}.
1422
1423To this end, \texttt{DecayHandler} is a base class for the external
1424handling of decays. The user-written derived class is called if a
1425pointer to it has been given with the
1426\texttt{pythia.setDecayPtr(DecayHandler*, vector<int>)} method.
1427The second argument to this method should contain the \texttt{id}
1428codes of all the particles that should be decayed by the external
1429program. It is up to the author of the derived class to send different
1430of these particles on to separate packages, if so desired.
1431
1432The \texttt{decay(...)} method in the user-written \texttt{DecayHandler}
1433class should do the decay, or return \texttt{false} if it fails. In the
1434latter case \texttt{Pythia} will try to do the decay itself. Thus one
1435may implement some decay channels externally and leave the rest for
1436\texttt{Pythia}, assuming the \texttt{Pythia} decay tables are adjusted
1437accordingly.
1438
1439\subsection{User hooks}
1440
1441Sometimes it may be convenient to step in during the generation process:
1442to modify the built-in cross sections, to veto undesirable events or
1443simply to collect statistics at various stages of the evolution. There is
1444a base class \texttt{UserHooks} that gives you this access at a few
1445selected places. This class in itself does nothing; the idea is that you
1446should write your own derived class for your task. A few very simple
1447 derived classes come with the program, mainly as illustration.
1448
1449There are four distinct sets of routines. Ordered by increasing
1450complexity, rather than by their appearance in the event-generation
1451sequence, they are:
1452\begin{itemize}
1453\item Ones that gives you access to the event record in between the
1454process-level and parton-level steps, or in between the parton-level
1455and hadron-level ones. You can study the event record and decide whether
1456to veto this event.
1457\item Ones that allow you to set a scale at which the combined
1458multiple-interactions, initial-state and final-state parton-shower
1459downwards evolution in $p_{\perp}$ is temporarily interrupted, so the
1460event can be studied and either vetoed or allowed to continue the
1461evolution.
1462\item Similar ones that instead gives you access after the first few
1463parton-shower branchings of the hardest subprocess.
1464\item Ones that gives you access to the properties of the trial
1465hard process, so that you can modify the internal \textsc{Pythia}
1466cross section by your own correction factors.
1467\end{itemize}
1468
1469\subsection{Random-number generators}
1470
1471\texttt{RndmEngine} is a base class for the external handling of
1472random-number generation. The user-written derived class is called
1473if a pointer to it has been handed in with the
1474\texttt{pythia.setRndmEnginePtr(RndmEngine*)} method.
1475Since the default Marsaglia-Zaman algorithm is quite good, there is
1476absolutely no physics reason to replace it, but this may still be
1477required for consistency with other program elements in big
1478experimental frameworks.
1479
1480\subsection{The \textsc{HepMC} event format}
1481
1482The \textsc{HepMC} event format \cite{hepmc} is a standard format
1483for the storage of events in several major experiments. The translation
1484from the \textsc{Pythia}~8 \texttt{Event} format should be done
1485after \texttt{pythia.next()} has generated an event. Therefore there
1486is no need for a tight linkage, but only to call the\\
1487\texttt{HepMC::I\_Pythia8::fill\_next\_event( pythia.event, hepmcevt )}\\
1488conversion routine from the main program written by the user.
1489Version 1 of \textsc{HepMC} makes use of the \textsc{CLHep} library
1490\cite{clhep} for four-vectors, while version 2 is standalone; this
1491requires some adjustments in the interface code based on which version
1492is used.
1493
1494\subsection{SUSY parameter input}
1495
1496\textsc{Pythia}~8 does not contain a machinery for calculating
1497masses and couplings of supersymmetric particles from some small set
1498of input parameters. Instead the SUSY Les Houches Accord (SLHA)
1499\cite{slha} is used to provide this information, as calculated by
1500some external program. You need to supply the name of the file where
1501the SLHA information is stored, in an appropriate setting, and then
1502the rest is taken care of automatically. (Or at least will be, once
1503SUSY processes are implemented.)
1504
1505\subsection{Parton showers}
1506
1507It is possible to replace the existing timelike and/or spacelike showers
1508in the program by your own. This is truly for experts, since it requires
1509a rather strict adherence to a wide set of rules. These are described
1510in detail in the HTML/PHP documentation accompanying the code.
1511The \textsc{Vincia} program \cite{vincia} offers a first example of
1512a plug-in of an external (timelike) shower.
1513
1514\section{Getting Going \label{sec:how-to}}
1515
1516After you download the \texttt{pythia8100.tgz} (or later) package
1517from the \textsc{Pythia} webpage,\\
1518\cindent \texttt{http://www.thep.lu.se/}$\sim$%
1519\texttt{torbjorn/Pythia.html}\\
1520you can unpack it with \texttt{tar xvfz pythia8100.tgz}, into a new
1521subdirectory \texttt{pythia8100}. The rest of the installation procedure
1522is described in the \texttt{README} file in that directory.
1523It is assumed you are on a Linux system; so far there is hardly any
1524multiplatform support.
1525
1526After this, the main program is up to the user to write. A worksheet
1527(found on the webpage) takes you through as step-by-step procedure,
1528and sample main programs are provided in the \texttt{examples}
1529subdirectory. These programs are included to serve as inspiration when
1530starting to write your own program, by illustrating the principles
1531involved.
1532
1533The information available if you open
1534\texttt{htmldoc/Welcome.html} in your web browser will help you
1535explore the program possibilities further. If you install the
1536\texttt{phpdoc} subdirectory under a web server you will also get
1537extra help to build a file of commands to the \texttt{Settings} and
1538\texttt{ParticleDataTable} machineries, to steer the execution of
1539your main program.
1540
1541Such "cards files" are separate from the main programs proper, so that
1542minor changes can be made without any recompilation. It is then
1543convenient to collect in the same place some run parameters, such as
1544the number of events to generate, that could be used inside the
1545main program. Therefore some such have been predefined, e.g.\
1546\texttt{Main:numberOfEvents}. Whether they actually are used is up to
1547the author of a main program to decide.
1548
1549\section{Outlook \label{sec:outlook}}
1550
1551As already explained in the introduction, \textsc{Pythia}~8.1 is
1552not yet a complete replacement of \textsc{Pythia}~6.4, but it is
1553getting there, and already contains some new features not found
1554elsewhere. In many cases the quality of the physics should be
1555comparable between the two versions, but obviously the objective
1556is that soon \textsc{Pythia}~8 should offer the overall better
1557alternative. This will occur by further improvements of the
1558existing framework and by the gradual addition of new features.
1559
1560\ack
1561
1562The support and kind hospitality of the SFT group at CERN is
1563gratefully acknowledged by TS. Mikhail Kirsanov has developed
1564the configure files, the makefiles and the interface to
1565\textsc{HepMC}, and made several valuable suggestions. Ben Lloyd
1566has written the PHP webpage framework. Bertrand Bellenot has provided
1567a simple makefile for Win32/NMAKE. Marc Montull has helped write
1568the extended Higgs sector. SM and PS are supported by Fermi Research
1569Alliance, LLC, under Contract No.~DE-AC02-07CH11359 with the United
1570States Department of Energy. This work was supported in part by
1571the European Union Marie Curie Research Training Network MCnet
1572under contract MRTN-CT-2006-035606.
1573
1574\begin{thebibliography}{99}
1575
1576\bibitem{jetset}
1577T. Sj\"ostrand, Computer Physics Commun. {\bf 27} (1982) 243,
1578{\bf 28} (1983) 229, {\bf 39} (1986) 347;\\
1579T. Sj\"ostrand and M. Bengtsson, Computer Physics Commun.
1580{\bf 43} (1987) 367
1581
1582\bibitem{pythiaearly}
1583H.-U. Bengtsson, Computer Physics Commun. {\bf 31} (1984) 323;\\
1584H.-U. Bengtsson and G. Ingelman, Computer Physics Commun. {\bf 34}
1585(1985) 251;\\
1586H.-U. Bengtsson and T. Sj\"ostrand, Computer Physics Commun.
1587{\bf 46} (1987) 43;\\
1588T. Sj\"ostrand, Computer Physics Commun. {\bf 82} (1994) 74
1589
1590\bibitem{pythiasixone}
1591T. Sj\"ostrand, P. Ed\'en, C. Friberg, L. L\"onnblad, G. Miu,
1592S. Mrenna and E. Norrbin, Computer Physics Commun. {\bf 135} (2001) 238
1593
1594\bibitem{pythiasixfour}
1595T. Sj\"ostrand, S. Mrenna and P. Skands, JHEP {\bf 05} (2006) 026
1596[hep-ph/0603175]
1597
1598\bibitem{pythiaseven}
1599L. L\"onnblad, Computer Physics Commun. {\bf 118} (1999) 213;\\
1600M. Bertini, L. L\"onnblad and T. Sj\"ostrand,
1601Computer Physics Commun. {\bf 134} (2001) 365
1602
1603\bibitem{thepeg}
1604see webpage \texttt{http://www.thep.lu.se/ThePEG/}
1605
1606\bibitem{herwigpp}
1607S. Gieseke, A. Ribon, M.H. Seymour, P. Stephens and B.R. Webber,
1608JHEP {\bf 02} (2004) 005;\\
1609see webpage \texttt{http://hepforge.cedar.ac.uk/herwig/}
1610
1611\bibitem{lha}
1612E. Boos et al., in the Proceedings of the Workshop on Physics
1613at TeV Colliders,\\
1614Les Houches, France, 21 May - 1 Jun 2001 [hep-ph/0109068]
1615
1616\bibitem{lhef}
1617J. Alwall et al., Computer Physics Comm. {\bf 176} (2007) 300
1618
1619\bibitem{lhapdf}
1620M.R. Whalley, D. Bourilkov and R.C. Group, in `HERA and the LHC',\\
1621eds. A. De Roeck and H. Jung, CERN-2005-014, p. 575 [hep-ph/0508110]
1622
1623\bibitem{ptshowers}
1624T. Sj\"ostrand and P. Skands, Eur. Phys. J {\bf C39} (2005) 129
1625
1626\bibitem{newremnants}
1627T. Sj\"ostrand and P. Skands, JHEP {\bf 03} (2004) 053
1628
1629\bibitem{zijl}
1630T. Sj\"ostrand and M. van Zijl, Phys. Rev. {\bf D36} (1987) 2019
1631
1632\bibitem{wicke}
1633P. Skands and D. Wicke, Eur. Phys. J. {\bf C52} (2007) 133
1634
1635\bibitem{lundreview}
1636B. Andersson, G. Gustafson, G. Ingelman and T. Sj\"ostrand,
1637Phys. Rep. {\bf 97} (1983) 31
1638
1639\bibitem{pdg}
1640Particle Data Group, W.-M. Yao et al., J. Phys. {\bf G33} (2006) 1
1641
1642\bibitem{boseeinstein}
1643L. L\"onnblad and T. Sj\"ostrand, Eur. Phys. J. {\bf C2} (1998) 165
1644
1645\bibitem{hepmc}
1646M. Dobbs and J.B. Hansen, Computer Physics Comm. {\bf 134} (2001) 41
1647
1648\bibitem{slha}
1649P. Skands et al., JHEP {\bf 07} (2004) 036
1650
1651\bibitem{tauola}
1652S. Jadach, Z. W\c{a}s, R. Decker and J.H. K\"uhn,
1653Computer Physics Commun. {\bf 76} (1993) 361
1654
1655\bibitem{evtgen}
1656D.J. Lange, Nucl. Instrum. Meth. {\bf A462} (2001) 152
1657
1658\bibitem{clhep}
1659see webpage \texttt{http://proj-clhep.web.cern.ch/proj-clhep/}
1660
1661\bibitem{vincia}
1662W.T. Giele, D.A. Kosower and P.Z. Skands, arXiv:0707.3652
1663
1664\end{thebibliography}
1665
1666\end{document}