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