Main-Program Settings
Introduction
The main program is up to the user to write. However, sample main
programs are provided. In one such class of programs, one may
wish to read in key settings of the run from a "cards file".
In this file some such settings are defined, and made available
inside the Settings
machinery. They can thus be put among
the other cards, and then read back in by the main program.
Run settings
Here comes a first batch of settings that can be set in an input
"cards" file, and thereafter read out an used in the user-written
main program. Usage is purely optional.
mode name="Main:numberOfEvents" default="1000" min="0"
The number of events to be generated.
mode name="Main:numberToList" default="2" min="0"
The number of events to list.
mode name="Main:timesToShow" default="50" min="0"
Print the number of events generated so far, this many times,
i.e. once every numberOfEvents/numberToShow
events.
mode name="Main:timesAllowErrors" default="10" min = "0"
Allow this many times that pythia.next()
returns false,
i.e. that an event is flawed, before aborting the run.
flag name="Main:showChangedSettings" default="on"
Print a list of the changed flag/mode/parameter/word settings.
flag name="Main:showAllSettings" default="off"
Print a list of all flag/mode/parameter/word settings.
flag name="Main:showChangedParticleData" default="off"
Print a list of particle and decay data for those particles
that were changed (one way or another).
flag name="Main:showAllParticleData" default="off"
Print a list of all particle and decay data.
flag name="Main:writeChangedSettings" default="off"
Write a file with the changed flag/mode/parameter/word settings, in
a format appropriate to be read in at the beginning of a new
run, using the pythia.readFile("fileName")
method.
word name="Main:changedSettingsFile" default="currentSettings.cmnd"
The name of the file to which the changed flag/mode/parameter/word
settings are written if Main:writeChangedSettings
is on.
flag name="Main:writeAllSettings" default="off"
Write a file with all flag/mode/parameter/word settings, in
a format appropriate to be read in at the beginning of a new
run, using the pythia.readFile("fileName")
method.
word name="Main:allSettingsFile" default="allSettings.cmnd"
The name of the file to which a flag/mode/parameter/word
settings are written if Main:writeAllSettings
is on.
flag name="Main:showAllStatistics" default="off"
Print all available statistics or only the minimal set at the end
of the run.
Incoming beams
Normally the identities and energies of the two incoming beam particles
are given by the arguments of the init call. These settings can be
stored in an input "cards" file, in the following variables, and
thereafter read out and used in the user-written main program. Usage is
purely optional.
mode name="Main:idBeamA" default="2212"
The PDG id
code for the first incoming particle.
mode name="Main:idBeamB" default="2212"
The PDG id
code for the second incoming particle.
flag name="Main:inCMframe" default="on"
Assume collisions occur in the CM frame.
parm name="Main:eCM" default="1960." min="10."
Collision CM energy, to be given if Main:inCMframe
is on.
parm name="Main:eBeamA" default="7000." min="0."
The energy of the first incoming particle, moving in the
+z direction. If the particle energy is smaller than its mass
it is assumed to be at rest.
parm name="Main:eBeamB" default="7000." min="0."
The energy of the second incoming particle, moving in the
-z direction. If the particle energy is smaller than its mass
it is assumed to be at rest.
Sample main programs
To help exemplify what a main program could look like, a few simple
examples are provided:
main01.cc
: a simple study of the charged multiplicity
for jet events at the LHC. (Brief example given in talks.)
main02.cc
: a simple study of the pT spectrum
of Z bosons at the Tevatron. (Brief example given in talks.)
main03.cc
: a simple single-particle analysis of jet
events, where input is set by main03.cmnd
"cards file".
main04.cc
: a simple study of several different kinds
of events, with the choice to be made in the main04.cmnd
"cards file".
main05.cc
: generation of QCD jet events at the LHC,
with jet analysis using the CellJet
cone-jet finder.
main06.cc
: tests of internally implemented
cross sections for elastic and diffractive topologies, using
main06.cmnd
to pick process.
main07.cc
: tests of internally implemented
cross sections for minimum-bias events, using
main07.cmnd
to pick options.
main08.cc
: generation of the QCD jet cross section
by splitting the run into subruns, each in its own pT bin,
and adding the results properly reweighted.
main11.cc
: a fairly extensive study of
event properties, with hard processes generated by PYTHIA 6, and
making use of a main11.cmnd
"cards file" illustrating
many of the settings listed on these pages.
main12.cc
: tests of internally implemented cross
sections for hard processes, compared with the corresponding PYTHIA 6
ones, for processes selected in main12.cmnd
.
main13.cc
: generation of LEP1 hadronic events, i.e.
e^+e^- -> gamma*/Z^0 -> q qbar, with charged multiplicity,
sphericity, thrust and jet analysis.
main14.cc
: a study of top events, fed in from the
Les Houches Event File ttbar.lhe
. This file currently only
contains 100 events, so this program is mainly a demonstration of
principles. The Fortran program main14for.f
has been used
to generate the input file. This program can be modified to generate
other files, bigger and/or for other processes.
main15.cc
: tests of internally implemented cross sections
for Supersymmetric particle production, with SYSY spectrum defined in
main15.spc
and settings in main15.cmnd
.
main16.cc
: an example how the Les Houches Accord
interface can be used to input various toy parton-level configurations,
e.g. to study the hadronization of junction topologies.
main17.cc
: shows how an external decay handler can
be linked to handle the decays of some particles.
main18.cc
: shows how an external random number
generator can be linked to handle this task.
main21.cc
: similar to main01, except that the
event record is output in the HepMC event record format. Requires
that HepMC and CLHEP are properly linked.
main22.cc
: similar to main11, except that the
event record is output in the HepMC event record format. Requires
that HepMC and CLHEP are properly linked.
Spares
For currently unforeseen purposes, a few dummy settings are made
available here. The user can set the desired value in a "cards file"
and then use that value in the main program as desired.
flag name="Main:spareFlag1" default="off"
flag name="Main:spareFlag2" default="off"
flag name="Main:spareFlag3" default="off"
mode name="Main:spareMode1" default="0"
mode name="Main:spareMode2" default="0"
mode name="Main:spareMode3" default="0"
parm name="Main:spareParm1" default="0."
parm name="Main:spareParm2" default="0."
parm name="Main:spareParm3" default="0."
word name="Main:spareWord1" default="void"
word name="Main:spareWord2" default="void"
word name="Main:spareWord3" default="void"