1 | <chapter name="Event Statistics"> |
---|
2 | |
---|
3 | <h2>Event Statistics</h2> |
---|
4 | |
---|
5 | At the end of the run you will want to write out the final statistics |
---|
6 | on number of events generated, the corresponding cross sections and |
---|
7 | the number of errors encountered. This is done either with the |
---|
8 | <code>pythia.stat()</code> method or the <code>pythia.statistics()</code> |
---|
9 | one, assuming <code>pythia</code> is an instance of the |
---|
10 | <code>Pythia</code> class.The former method is steered entirely by |
---|
11 | settings values, see <aloc href="MainProgramSettings">here</aloc>. |
---|
12 | The latter, deprecated one instead takes two arguments: |
---|
13 | |
---|
14 | <method name="void Pythia::statistics(bool all = false, bool reset = false)"> |
---|
15 | write out statistics on cross sections and errors. This is based on |
---|
16 | calls to the methods below, for the two kinds of information. |
---|
17 | <argument name="all"> |
---|
18 | if <code>true</code> it allows a more extensive listing than the default |
---|
19 | one, see multiparton-interactions statistics below. |
---|
20 | </argument> |
---|
21 | <argument name="reset"> if <code>true</code> it implies that all counters, |
---|
22 | e.g on events generated and errors experienced, are reset to zero whenever |
---|
23 | the routine is called. The default instead is that all stored |
---|
24 | statistics information is unaffected by the call. |
---|
25 | Counters are automatically reset in each new <code>Pythia::init()</code> |
---|
26 | call, however, so the only time the <code>reset</code> option makes a |
---|
27 | difference is if <code>statistics(...)</code> is called several times |
---|
28 | in a (sub)run. |
---|
29 | </argument> |
---|
30 | </method> |
---|
31 | |
---|
32 | <h3>Cross-section statistics</h3> |
---|
33 | |
---|
34 | The <code>ProcessLevel::statistics()</code> method cannot be accessed |
---|
35 | directly, but only via the <code>Pythia::stat()</code> and |
---|
36 | <code>Pythia::statistics(...)</code> calls above. |
---|
37 | When called it will loop over the list of existing processes, and for |
---|
38 | each write out name, code, the number of tried, selected and accepted |
---|
39 | events, the cross section and the estimated error on the latter. |
---|
40 | The three different event numbers are related to the Monte Carlo method |
---|
41 | used, whereby an initial upper estimate of the cross section is used to |
---|
42 | select a large number of trial phase-space points, whereof then not all |
---|
43 | survive. Rejections are normally done by the internal machinery, but can |
---|
44 | also be obtained by <aloc href="UserHooks">user hooks</aloc>. |
---|
45 | Therefore: |
---|
46 | <ul> |
---|
47 | <li><b>tried</b> events reflect the original number of |
---|
48 | phase-space points probed, as part of the upper estimate;</li> |
---|
49 | <li><b>selected</b> events correspond to those that survive |
---|
50 | the internal Monte-Carlo selection procedure;</li> |
---|
51 | <li><b>accepted</b> events are those that also survive |
---|
52 | the additional user cuts.</li> |
---|
53 | </ul> |
---|
54 | In most runs there would be no user hooks implemented, and then the |
---|
55 | numbers of selected and of accepted events will agree. Aborted events |
---|
56 | (see below) usually appear in the selected statistics but not in the |
---|
57 | accepted one. |
---|
58 | |
---|
59 | <p/> |
---|
60 | For Les Houches events the total cross section will be correctly |
---|
61 | displayed; however the (optional) error value will not be used, so that |
---|
62 | the reported error will be smaller than the correct statistical ones, |
---|
63 | and often vanish completely. Furthermore, while the number of events |
---|
64 | is shown for each user process, the cross section is only for the sum |
---|
65 | of them. |
---|
66 | |
---|
67 | <h3>Error messages</h3> |
---|
68 | |
---|
69 | When Pythia is run, errors may occur, and give rise to warning messages. |
---|
70 | These may be of varying severity, as follows: |
---|
71 | <ul> |
---|
72 | <li><b>Abort</b> means things went seriously wrong, and the |
---|
73 | initialization or event generation failed. In the former case it is |
---|
74 | not possible to generate events at all, in the latter the current |
---|
75 | event is flawed and should be skipped. In either case the respective |
---|
76 | method, <code>Pythia::init()</code> or <code>Pythia::next()</code>, |
---|
77 | then also returns the value <code>false</code>. There are occasions |
---|
78 | where an abort may be deliberate, such as when a file of Les Houches |
---|
79 | Events is read and the end of the file is reached.</li> |
---|
80 | <li><b>Error</b> normally is less severe. Typically the program will |
---|
81 | back up one step and try again. There are cases where this is not possible, |
---|
82 | in particular during the initialization and the generation of a hard |
---|
83 | process, and then the error may be followed by an abort as a direct |
---|
84 | consequence (with two separate messages).</li> |
---|
85 | <li><b>Warning</b> is even less severe. In some cases the program will |
---|
86 | try again, with good chances of success, in others no measure at all |
---|
87 | need to be taken.</li> |
---|
88 | </ul> |
---|
89 | |
---|
90 | <p/> |
---|
91 | The error messages is handled by a small part of the <code>Info</code> |
---|
92 | class. It is handed any abort, error or warning messages during the event |
---|
93 | generation phase, and will store each distinct message, with a counter |
---|
94 | for how many times it is issued. Thus it is possible to limit the number |
---|
95 | of identical messages issued, currently hardcoded so that each kind of |
---|
96 | error message is only printed once |
---|
97 | (<code>static const int TIMESTOPRINT = 1</code>). |
---|
98 | This can be overridden by the calling routine, so that all messages of |
---|
99 | this kind are shown, which is particularly relevant for the |
---|
100 | initialization stage. |
---|
101 | The summary table printed by <code>Pythia::statistics()</code> |
---|
102 | provides a table with all the different messages issued, in |
---|
103 | alphabetical order, with the total number of times each was generated. |
---|
104 | |
---|
105 | <h3>Multiparton-interactions statistics</h3> |
---|
106 | |
---|
107 | If you call <code>Pythia::statistics(true)</code>, i.e. with the first |
---|
108 | optional argument <code>true</code>, also statistics on multiparton |
---|
109 | interactions is printed, comprising a list of all allowed subprocesses |
---|
110 | with how many times each of them has been generated. For the minimum-bias |
---|
111 | process this also includes the hardest interaction, while else the |
---|
112 | hardest process is excluded from the statistics. (This is because |
---|
113 | the hardest process is of the same character and generated by the same |
---|
114 | machinery in the former case but not in the latter. Also, for the |
---|
115 | former case only, the standard statistics listing only lists |
---|
116 | minimum bias as one single process, i.e. does not further specify |
---|
117 | the character of the hardest subprocess, so there is not any overlap |
---|
118 | between the two.) |
---|
119 | |
---|
120 | </chapter> |
---|
121 | |
---|
122 | <!-- Copyright (C) 2012 Torbjorn Sjostrand --> |
---|