1 <chapter name="Program Files">
5 The code is subdivided into a set of files, mainly by physics
6 task. Each file typically contains one main class, but often
7 with a few related helper classes that are not used elsewhere in
8 the program. Normally the files come in pairs.
10 <li>A header file, <code>.h</code> in the <code>include</code>
11 subdirectory, where the public interface of the class is declared,
12 and inline methods are defined.</li>
13 <li>A source code file, <code>.cc</code> in the <code>src</code>
14 subdirectory, where most of the methods are implemented.</li>
16 During compilation, related dependency files, <code>.d</code>, and
17 compiled code, <code>.o</code> are created in the <code>tmp</code>
21 In part the <code>.xml</code> documentation files in the
22 <code>xmldoc</code> subdirectory have matching names, but the match
23 is broken by the desire to group topics more by user interaction than
24 internal operation. On these pages the function of the different code
25 files is summarized. Currently, each <code>.xml</code> file is also
26 translated into an <code>.html</code> one in the
27 <code>htmldoc</code> subdirectory, to allow easy viewing of the
28 contents in a web browser, and an <code>.php</code> one in
29 <code>phpdoc</code>, for more sophisticated interactivity
30 if that subdirectory is installed on a web server.
33 Here is the current list of files, ordered alphabetically, with a brief
34 description of contents.
36 <file name="Analysis">
37 contains routines to analyze events. Currently it can do sphericity,
38 thrust, Lund/Jade/Durham jet clustering, and cone-jet finding.
42 contains some basic facilities of general use: a random number
43 generator <code>Rndm</code>, a four-vector class <code>Vec4</code>, and a
44 histogram class <code>Hist</code>.
47 <file name="BeamParticle">
48 contains information on all partons extracted from one of the two
49 beams. Defines modified parton distributions accordingly during the
50 showering and multiple interactions processing, thereby extending on
51 the one-particle-inclusive distributions defined by the previous class.
52 Finds the internal structure for a beam remnant.
55 <file name="BeamRemnants">
56 adds primordial <ei>kT</ei> to the set of hard subsystems,
57 and combines these subsystems with the two beam remnants to provide
58 the overall energy-momentum picture. Also ties together all the
59 colour lines into consistent singlets.
62 <file name="BoseEinstein">
63 provides a simple method to impose Bose-Einstein correlations on
64 pairs of identical mesons.
68 contains the event record, which basically is a vector of particles.
69 This file also contains the <code>Particle</code> class, used by
70 <code>Event</code>. <code>Pythia</code> uses two <code>Event</code>
71 objects, one for the process-level record (<code>process</code>) and
72 one for the complete event (<code>event</code>).
75 <file name="FragmentationFlavZpT">
76 contains the classes for describing the fragmentation steps in
77 flavour and in longitudinal and transverse momentum.
80 <file name="FragmentationSystems">
81 defines some containers of parton systems, for use in
82 the fragmentation routines.
85 <file name="HadronLevel">
86 turns the parton-level event above into a set of outgoing particles,
87 by applying string fragmentation (with special treatment for low-mass
88 systems) and secondary decays, and optionally Bose-Einstein corrections.
91 <file name="HepMCInterface">
92 contains an interface to convert the PYTHIA 8 event record into the
93 HepMC format. The <code>HepMCInterface.cc</code> file is located in
94 the subdirectory <code>hepmcinterface</code> and is used to build a
95 separate <code>libhepmcinterface</code> library.
99 is a simple container that gives access to some information on the
100 nature of the current process, such as Mandelstam variables.
101 Also contains a small database for errors and warnings encountered
102 during program execution.
105 <file name="LesHouches">
106 gives the possibility to feed in parton configurations for the
107 subsequent event generation. One base class is defined, with containers
108 for initialization and event information, that can be read from
109 <code>Pythia</code>. Derived classes allow for a few different cases.
112 <file name="LHAFortran">
113 is a header file only, for a class derived from the above LesHouches
114 one, to be used for runtime interfacing to Fortran programs, such as
118 <file name="LHAPDFInterface">
119 is a header file only, with interfaces to the key LHAPDF routines,
120 as needed for a runtime interface. There is a file
121 <code>lhapdfdummy/LHAPDFdummy.cc</code> with matching dummy
122 implementations, however. This file is used to build a separate
123 <code>liblhapdfdummy</code> library, to be linked when the LHAPDF
124 library is not used, so as to avoid problems with undefined references.
127 <file name="MiniStringFragmentation">
128 performs string fragmentation in cases where the colour singlet
129 subsystem mass is so small that one or at most two primary hadrons
130 should be produced from it.
133 <file name="MultipleInteractions">
134 performs multiple parton-parton interactions.
137 <file name="ParticleData">
138 contains a database of all necessary particle data (masses, names, ..)
142 <file name="ParticleDecays">
143 performs the decays of all normal unstable hadrons and leptons, i.e.
144 in mass up to and including <ei>b bbar</ei> systems. It is not
145 intended for decays of electroweak resonances, like <ei>Z^0</ei>.
148 <file name="PartonDistributions">
149 contains parton distribution functions for the proton and electron.
150 Currently very simple, with only two <ei>p</ei> parametrizations
151 and one <ei>e</ei> ditto available, but it is possible to link in
155 <file name="PartonLevel">
156 turns the (hard) process above into a complete set of partons, by
157 adding initial- and final-state radiation, multiple parton--parton
158 interactions, and beam remnants.
161 <file name="PhaseSpace">
162 selects a point in phase space for the hard-process generation,
163 optimized separately for each process to give improved Monte Carlo
167 <file name="ProcessContainer">
168 packages the information on a given subprocess, combining the
169 phase-space selection and cross-section evaluation machineries
170 with some statistics information. Also sets up the list of processes
171 to be studied in a run.
174 <file name="ProcessLevel">
175 handles the generation of the (hard) process that sets the character
176 of the event. This involves either using internally implemented
177 processes or linking to Les Houches information. The latter can
178 be by runtime interfaces or by reading in a file. This step also
179 includes resonance decays.
183 is the main class, that administrates the whole event generation
184 process by making use of all the others classes. Objects of most
185 other classes reside (directly or indirectly) inside <code>Pythia</code>,
186 so only a <code>Pythia</code> object needs to be explicitly instantiated
187 and addressed by the user.
190 <file name="Pythia6Interface">
191 is a header file only, with interfaces to the key PYTHIA 6 routines,
192 as needed for a runtime Les Houches interface to this program.
195 <file name="PythiaComplex">
196 is only a <code>.h</code> file, containing a <code>typedef</code> for
197 double precision complex numbers.
200 <file name="PythiaStdlib">
201 is only a <code>.h</code> file, containing most of the <code>Stdlib</code>
202 headers used in PYTHIA 8, with <code>using</code> directives. It defines
203 <code>M_PI</code> if this is not already done. Also a few simple inline
204 methods: <code>pow2(x)</code>, <code>pow3(x)</code>, <code>pow4(x)</code>
205 and <code>pow5(x)</code> for small integer powers, and
206 <code>sqrtpos(x)</code> where a <code>max(0., x)</code> ensures that one
207 does not take the square root of a negative number.
210 <file name="ResonanceDecays">
211 decays resonances as part of the hard-process stage, in many cases
212 (but not all) including angular correlations between the decay products.
215 <file name="ResonanceWidths">
216 encodes some properties of resonances, in particular the dynamic
217 calculation of widths.
220 <file name="Settings">
221 contains a database of all flags, modes, parameters and words that
222 determine the performance of the generator. Initial values are obtained
223 from the contents of the <code>.xml</code> files, but these values can
224 then be changed by the user.
227 <file name="SigmaCompositeness">
228 contains the cross sections and matrix elements for production of
229 some particles in compositeness scenarios, specifically excited
233 <file name="SigmaEW">
234 contains the cross sections and matrix elements for electroweak
235 processes involving photons, <ei>Z^0</ei>'s and <ei>W^+-</ei>'s.
238 <file name="SigmaExtraDim">
239 contains the cross sections and matrix elements for processes in
240 scenarios involving extra dimensions.
243 <file name="SigmaHiggs">
244 contains the cross sections and matrix elements for Higgs production.
247 <file name="SigmaLeftRightSym">
248 contains the cross sections and matrix elements for particle production
249 in left-right-symmetry scenarios, specifically righthanded <ei>Z</ei>
250 and <ei>W</ei> bosons and doubly-charged Higgs bosons.
253 <file name="SigmaLeptoquark">
254 contains the cross sections and matrix elements for leptoquark production.
257 <file name="SigmaNewGaugeBosons">
258 contains the cross sections and matrix elements for a <ei>Z'^0</ei>,
259 a <ei>W^+-</ei> and a horizontal gauge boson <ei>R^0</ei>.
262 <file name="SigmaOnia">
263 contains the cross sections and matrix elements for charmonium and
264 bottomonium production.
267 <file name="SigmaProcess">
268 contains the base class and derived classes for the evaluation of
269 different matrix elements. Also keeps track of allowed incoming
270 parton configurations and their cross sections, including parton
271 densities. In order to keep this file from becoming too big, actual
272 cross sections are found in several separate files of derived classes:
273 <code>SigmaQCD</code>, <code>SigmaEW</code>, <code>SigmaOnia</code>,
274 <code>SigmaHiggs</code>, <code>SigmaSUSY</code>,
275 <code>SigmaNewGaugeBosons</code>, <code>SigmaLeftRightSym</code>,
276 <code>SigmaLeptoquark</code>, <code>SigmaCompositeness</code> and
277 <code>SigmaExtraDim</code>.
280 <file name="SigmaQCD">
281 contains the cross sections and matrix elements for soft and hard
285 <file name="SigmaSUSY">
286 contains the cross sections and matrix elements for Supersymmetric
290 <file name="SigmaTotal">
291 contains parametrizations of total, elastic and diffractive hadronic
295 <file name="SpaceShower">
296 performs spacelike initial-state transverse-momentum-ordered
300 <file name="StandardModel">
301 contains the running <ei>alpha_strong</ei>, with <ei>Lambda</ei>
302 matching at flavour thresholds, the running <ei>alpha_em</ei>,
303 CKM mixing matrices, and a few other parameters such as
304 <ei>sin^2(theta_W)</ei>.
307 <file name="StringFragmentation">
308 performs string fragmentation of a given set of partons.
311 <file name="SusyLesHouches">
312 contains information on SUSY parameters and particle data as specified
313 by the SUSY Les Houches Accord.
316 <file name="TimeShower">
317 performs timelike final-state transverse-momentum-ordered
321 <file name="UserHooks">
322 Provides a way for a user to study the event at a few intermediate
323 stages of evolution, to reject the event as a whole or to modify
324 its cross-section weight.
329 <!-- Copyright (C) 2008 Torbjorn Sjostrand -->