Event Statistics
At the end of the run you will want to write out the final statistics
on number of events generated, the corresponding cross sections and
the number of errors encountered. This is done with
pythia.statistics();
assuming pythia
is an instance of the Pythia
class. The statistics
method in its turn calls on the
methods below.
Cross-section statistics
The ProcessLevel::statistics()
member will loop over the
list of existing processes, and for each write out name, code,
the number of tried, selected and accepted events, the cross section and
the estimated error on the latter. The three different event numbers are
related to the Monte Carlo method used, whereby an initial upper estimate
of the cross section is used to select a large number of trial phase-space
points, whereof then not all survive. Rejections are normally done by the
internal machinery, but can also be obtained by
user hooks.
Therefore:
(i) tried events reflect the original number of phase-space points
probed, as part of the upper estimate;
(ii) selected events correspond to those that survive the internal
Monte-Carlo selection procedure;
(iii) accepted events are those that also survive the additional
user cuts.
In most runs there would be no user hooks implemented, and then the
numbers of selected and of accepted events will agree.
Error messages
When Pythia is run, errors may occur, and give rise to warning messages.
These may be of varying severity, as follows:
Abort means things went seriously wrong, and the
initialization or event generation failed. In the former case it is
not possible to generate events at all, in the latter the current
event is flawed and should be skipped. In either case the respective
method, pythia.init(...)
or pythia.next()
,
then also returns the value false
. There are occasions
where an abort may be deliberate, such as when a file of Les Houches
Events is read and the end of the file is reached.
Error normally is less severe. Typically the program will
back up one step and try again. There are cases where this is not possible,
in particular during the initialization and the generation of a hard
process, and then the error may be followed by an abort as a direct
consequence (with two separate messages).
Warning is even less severe. In some cases the program will
try again, with good chances of success, in others no measure at all
need to be taken.
The ErrorMsg
class is rather small. It is handed any
abort, error or warning messages during the event generation phase, and
will store each distinct message, with a counter for how many times it is
issued. Thus it is possible to limit the number of identical messages
issued. The summary table printed by pythia.statistics()
provides a table with all the different messages issued, in
alphabetical order, with the total number of times each was generated.
There is only one mode affecting its operation:
mode
ErrorMsg:timesToPrint
(default = 1
; minimum = 0
)
The number of times each distinct message is printed. That is, by
default, each new kind of error/warning is only printed once.
Multiple-interactions statistics
If you call pythia.statistics(true)
, i.e. with the optional
argument true
, also statistics on multiple interactions
is printed, comprising a list of all allowed subprocesses with how
many times each of them has been generated. For the minimum-bias
process this also includes the hardest interaction, while else the
hardest process is excluded from the statistics. (This is because
the hardest process is of the same character and generated by the same
machinery in the former case but not in the latter. Also, for the
former case only, the standard statistics listing only lists
minimum bias as one single process, i.e. does not further specify
the character of the hardest subprocess, so there is not any overlap
between the two.)