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 the pythia.statistics() method, assuming pythia is an instance of the Pythia class:

void Pythia::statistics(bool all = false, bool reset = false)  
write out statistics on cross sections and errors. This is based on calls to the methods below, for the two kinds of information.
argument all : if true it allows a more extensive listing than the default one, see multiple-interactions statistics below.
argument reset : if true it implies that all counters, e.g on events generated and errors experienced, are reset to zero whenever the routine is called. The default instead is that all stored statistics information is unaffected by the call. Counters are automatically reset in each new Pythia::init() call, however, so the only time the reset option makes a difference is if statistics is called several times in a (sub)run.

Cross-section statistics

The ProcessLevel::statistics() method cannot be accessed directly, but only via the Pythia::statistics() call above. When called it 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: In most runs there would be no user hooks implemented, and then the numbers of selected and of accepted events will agree. Aborted events (see below) usually appear in the selected statistics but not in the accepted one.

For Les Houches events the total cross section will be correctly displayed; however the (optional) error value will not be used, so that the reported error will be smaller than the correct statistical ones, and often vanish completely. Furthermore, while the number of events is shown for each user process, the cross section is only for the sum of them.

Error messages

When Pythia is run, errors may occur, and give rise to warning messages. These may be of varying severity, as follows:

The error messages is handled by a small part of the Info class. 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, currently hardcoded so that each kind of error message is only printed once (static const int TIMESTOPRINT = 1). This can be overridden by the calling routine, so that all messages of this kind are shown, which is particularly relevant for the initialization stage. 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.

Multiple-interactions statistics

If you call Pythia::statistics(true), i.e. with the first 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.)