1 | <html> |
---|
2 | <head> |
---|
3 | <title>Main-Program and Related Settings</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 | <h2>Main-Program and Related Settings</h2> |
---|
10 | |
---|
11 | <h3>Introduction</h3> |
---|
12 | |
---|
13 | The main program is up to the user to write. However, |
---|
14 | <a href="SampleMainPrograms.html" target="page">sample main programs</a> |
---|
15 | are provided. In one such class of programs, key settings of the run |
---|
16 | are read in from a "cards file". For experimental collaborations |
---|
17 | this is actually the most common way to run a program like PYTHIA. |
---|
18 | The commands in such a file may be of two types<br/> |
---|
19 | (a) instructions directly to <code>Pythia</code>, like which |
---|
20 | processes to generate, and<br/> |
---|
21 | (b) instructions to the main program for what it should do, |
---|
22 | like how many events to generate, and how many events should |
---|
23 | be listed.<br/> |
---|
24 | In principle these two kinds could be kept completely separate. |
---|
25 | However, to make life simpler, a number of useful main-program |
---|
26 | settings are defined on this page, so that they are recognized by |
---|
27 | the <code>Settings</code> machinery. They can thus be put among |
---|
28 | the other cards without distinction. It is up to you to decide which |
---|
29 | ones, if any, you actually want to use when you write your main program. |
---|
30 | |
---|
31 | <p/> |
---|
32 | To further reduce the necessary amount of main-program code, some of |
---|
33 | the tasks that you can steer from your main program can also be done |
---|
34 | internally. This in particular relates to some information printing. |
---|
35 | To give an example, the <code>Main:numberToList</code> mode can be |
---|
36 | used by you in your main program to decide to list a few of the |
---|
37 | generated events, whereas <code>Next:numberListEvent</code> is used |
---|
38 | internally in a <code>pythia.next()</code> call to do such a listing |
---|
39 | automatically. Ultimately, in both cases, a |
---|
40 | <code>pythia.event.list()</code> call is the one that generates |
---|
41 | the listing, explicitly in the main program in the former case, |
---|
42 | implicitly called from <code>pythia.next()</code> in the latter. |
---|
43 | |
---|
44 | <p/> |
---|
45 | The settings names on this page thus fall into four main groups |
---|
46 | <ul> |
---|
47 | <li><code>Init:...</code> denote actions that automatically may be |
---|
48 | taken during the <code>pythia.init()</code> call.</li> |
---|
49 | <li><code>Next:...</code> denote actions that automatically may be |
---|
50 | taken during the <code>pythia.next()</code> call.</li> |
---|
51 | <li><code>Stat:...</code> denote actions that automatically may be |
---|
52 | taken during the <code>pythia.stat()</code> call.</li> |
---|
53 | <li><code>Main:...</code> denote actions that you yourself |
---|
54 | have the freedom to make use of in your main program.</li> |
---|
55 | </ul> |
---|
56 | The use of several of the <code>Main:...</code> options is deprecated |
---|
57 | in favour of the other possibilities. |
---|
58 | |
---|
59 | <p/> |
---|
60 | The <code>Main:...</code> options works like this. Once you have used |
---|
61 | the <code>pythia.readFile(fileName)</code> method to read in the cards |
---|
62 | file, where the values have been set, you can interrogate the |
---|
63 | <code>Settings</code> database to make the values available in your |
---|
64 | main program. A slight complication is that you need to use a different |
---|
65 | <code>Settings</code> method for each of the four possible return types |
---|
66 | that you want to extract. To save some typing the same method names are |
---|
67 | found directly in the <code>Pythia</code> class, and just send on to the |
---|
68 | <code>Settings</code> ones to do the job, e.g. |
---|
69 | <pre> |
---|
70 | bool showCS = pythia.flag("Main:showChangedSettings"); |
---|
71 | int nEvent = pythia.mode("Main:numberOfEvents"); |
---|
72 | double spare1 = pythia.parm("Main:spareParm1"); |
---|
73 | string file = pythia.word("Main:allSettingsFile"); |
---|
74 | </pre> |
---|
75 | |
---|
76 | <h3>Main-program settings</h3> |
---|
77 | |
---|
78 | The settings in this section <i>must</i> be under the control of the |
---|
79 | user, i.e. there are no internal equivalents. |
---|
80 | |
---|
81 | <p/><code>mode </code><strong> Main:numberOfEvents </strong> |
---|
82 | (<code>default = <strong>1000</strong></code>; <code>minimum = 0</code>)<br/> |
---|
83 | The number of events to be generated. |
---|
84 | |
---|
85 | |
---|
86 | <p/><code>mode </code><strong> Main:timesAllowErrors </strong> |
---|
87 | (<code>default = <strong>10</strong></code>)<br/> |
---|
88 | Allow this many times that <code>pythia.next()</code> returns false, |
---|
89 | i.e. that an event is flawed, before aborting the run. |
---|
90 | |
---|
91 | |
---|
92 | <h3>Initialization settings</h3> |
---|
93 | |
---|
94 | <p/><code>flag </code><strong> Init:showProcesses </strong> |
---|
95 | (<code>default = <strong>on</strong></code>)<br/> |
---|
96 | Print a list of all processes that will be simulated, with |
---|
97 | their estimated cross section maxima, as used for the |
---|
98 | subsequent Monte Carlo selection. Also print corresponding |
---|
99 | Les Houches initialization data, where relevant. |
---|
100 | |
---|
101 | |
---|
102 | <p/><code>flag </code><strong> Init:showMultipartonInteractions </strong> |
---|
103 | (<code>default = <strong>on</strong></code>)<br/> |
---|
104 | Print initialization information for the multiparton interactions |
---|
105 | machinery. |
---|
106 | |
---|
107 | |
---|
108 | <p/><code>flag </code><strong> Init:showChangedSettings </strong> |
---|
109 | (<code>default = <strong>on</strong></code>)<br/> |
---|
110 | Print a list of the changed flag/mode/parameter/word settings. |
---|
111 | |
---|
112 | |
---|
113 | <p/><code>flag </code><strong> Init:showAllSettings </strong> |
---|
114 | (<code>default = <strong>off</strong></code>)<br/> |
---|
115 | Print a list of all flag/mode/parameter/word settings. |
---|
116 | Warning: this will be a long list. |
---|
117 | |
---|
118 | |
---|
119 | <p/><code>flag </code><strong> Init:showChangedParticleData </strong> |
---|
120 | (<code>default = <strong>on</strong></code>)<br/> |
---|
121 | Print a list of particle and decay data for those particles |
---|
122 | that were changed (one way or another). |
---|
123 | |
---|
124 | |
---|
125 | <p/><code>flag </code><strong> Init:showChangedResonanceData </strong> |
---|
126 | (<code>default = <strong>off</strong></code>)<br/> |
---|
127 | In the previous listing also include the resonances that are |
---|
128 | initialized at the beginning of a run and thus get new particle |
---|
129 | data, even if these may well agree with the default ones. |
---|
130 | Warning: this will be a rather long list. |
---|
131 | |
---|
132 | |
---|
133 | <p/><code>flag </code><strong> Init:showAllParticleData </strong> |
---|
134 | (<code>default = <strong>off</strong></code>)<br/> |
---|
135 | Print a list of all particle and decay data. |
---|
136 | Warning: this will be a long list. |
---|
137 | |
---|
138 | |
---|
139 | <p/><code>mode </code><strong> Init:showOneParticleData </strong> |
---|
140 | (<code>default = <strong>0</strong></code>; <code>minimum = 0</code>)<br/> |
---|
141 | Print particle and decay data for the particle with this particular |
---|
142 | identity code. Default means that no particle is printed. |
---|
143 | |
---|
144 | |
---|
145 | <p/><code>flag </code><strong> Main:showChangedSettings </strong> |
---|
146 | (<code>default = <strong>on</strong></code>)<br/> |
---|
147 | Deprecated. Print a list of the changed flag/mode/parameter/word settings. |
---|
148 | |
---|
149 | |
---|
150 | <p/><code>flag </code><strong> Main:showAllSettings </strong> |
---|
151 | (<code>default = <strong>off</strong></code>)<br/> |
---|
152 | Deprecated. Print a list of all flag/mode/parameter/word settings. |
---|
153 | Warning: this will be a long list. |
---|
154 | |
---|
155 | |
---|
156 | <p/><code>flag </code><strong> Main:showChangedParticleData </strong> |
---|
157 | (<code>default = <strong>off</strong></code>)<br/> |
---|
158 | Deprecated. Print a list of particle and decay data for those particles |
---|
159 | that were changed (one way or another). |
---|
160 | |
---|
161 | |
---|
162 | <p/><code>flag </code><strong> Main:showChangedResonanceData </strong> |
---|
163 | (<code>default = <strong>off</strong></code>)<br/> |
---|
164 | Deprecated. In the previous listing also include the resonances that are |
---|
165 | initialized at the beginning of a run and thus get new particle |
---|
166 | data, even if these may well agree with the default ones. |
---|
167 | Warning: this will be a rather long list. |
---|
168 | |
---|
169 | |
---|
170 | <p/><code>flag </code><strong> Main:showAllParticleData </strong> |
---|
171 | (<code>default = <strong>off</strong></code>)<br/> |
---|
172 | Deprecated. Print a list of all particle and decay data. |
---|
173 | Warning: this will be a long list. |
---|
174 | |
---|
175 | |
---|
176 | <p/><code>mode </code><strong> Main:showOneParticleData </strong> |
---|
177 | (<code>default = <strong>0</strong></code>; <code>minimum = 0</code>)<br/> |
---|
178 | Deprecated. Print particle and decay data for the particle with this |
---|
179 | particular identity code. Default means that no particle is printed. |
---|
180 | |
---|
181 | |
---|
182 | <p/><code>flag </code><strong> Main:writeChangedSettings </strong> |
---|
183 | (<code>default = <strong>off</strong></code>)<br/> |
---|
184 | Write a file with the changed flag/mode/parameter/word settings, in |
---|
185 | a format appropriate to be read in at the beginning of a new |
---|
186 | run, using the <code>pythia.readFile(fileName)</code> method. |
---|
187 | |
---|
188 | |
---|
189 | <p/><code>word </code><strong> Main:changedSettingsFile </strong> |
---|
190 | (<code>default = <strong>currentSettings.cmnd</strong></code>)<br/> |
---|
191 | The name of the file to which the changed flag/mode/parameter/word |
---|
192 | settings are written if <code>Main:writeChangedSettings</code> |
---|
193 | is on. |
---|
194 | |
---|
195 | |
---|
196 | <p/><code>flag </code><strong> Main:writeAllSettings </strong> |
---|
197 | (<code>default = <strong>off</strong></code>)<br/> |
---|
198 | Write a file with all flag/mode/parameter/word settings, in |
---|
199 | a format appropriate to be read in at the beginning of a new |
---|
200 | run, using the <code>pythia.readFile(fileName)</code> method. |
---|
201 | |
---|
202 | |
---|
203 | <p/><code>word </code><strong> Main:allSettingsFile </strong> |
---|
204 | (<code>default = <strong>allSettings.cmnd</strong></code>)<br/> |
---|
205 | The name of the file to which a flag/mode/parameter/word |
---|
206 | settings are written if <code>Main:writeAllSettings</code> |
---|
207 | is on. |
---|
208 | |
---|
209 | |
---|
210 | <h3>Event-generation settings</h3> |
---|
211 | |
---|
212 | <p/><code>mode </code><strong> Next:numberCount </strong> |
---|
213 | (<code>default = <strong>1000</strong></code>; <code>minimum = 0</code>)<br/> |
---|
214 | Print a line telling how many events have been generated so far, |
---|
215 | once every <code>numberCount</code> events. If set zero then no |
---|
216 | lines are ever printed. |
---|
217 | |
---|
218 | <p/><code>mode </code><strong> Next:numberShowLHA </strong> |
---|
219 | (<code>default = <strong>1</strong></code>; <code>minimum = 0</code>)<br/> |
---|
220 | The number of events to list the Les Houches input information for, |
---|
221 | where relevant. |
---|
222 | |
---|
223 | |
---|
224 | <p/><code>mode </code><strong> Next:numberShowInfo </strong> |
---|
225 | (<code>default = <strong>1</strong></code>; <code>minimum = 0</code>)<br/> |
---|
226 | The number of events to list the <code>Info</code> information for, |
---|
227 | where relevant. |
---|
228 | |
---|
229 | |
---|
230 | <p/><code>mode </code><strong> Next:numberShowProcess </strong> |
---|
231 | (<code>default = <strong>1</strong></code>; <code>minimum = 0</code>)<br/> |
---|
232 | The number of events to list the <code>process</code> record for, |
---|
233 | where relevant. |
---|
234 | |
---|
235 | |
---|
236 | <p/><code>mode </code><strong> Next:numberShowEvent </strong> |
---|
237 | (<code>default = <strong>1</strong></code>; <code>minimum = 0</code>)<br/> |
---|
238 | The number of events to list the <code>event</code> record for, |
---|
239 | where relevant. |
---|
240 | |
---|
241 | |
---|
242 | <p/><code>flag </code><strong> Next:showScaleAndVertex </strong> |
---|
243 | (<code>default = <strong>off</strong></code>)<br/> |
---|
244 | In addition to the normal information in the listing of the |
---|
245 | <code>process</code> and <code>event</code> records, a second line |
---|
246 | per particle provides information on the production scale, |
---|
247 | particle polarization and production vertex. |
---|
248 | |
---|
249 | |
---|
250 | <p/><code>flag </code><strong> Next:showMothersAndDaughters </strong> |
---|
251 | (<code>default = <strong>off</strong></code>)<br/> |
---|
252 | In addition to the normal information in the listing of the |
---|
253 | <code>process</code> and <code>event</code> records, further lines |
---|
254 | list all the mothers and daughters of each particle. |
---|
255 | |
---|
256 | |
---|
257 | <p/><code>mode </code><strong> Main:numberToList </strong> |
---|
258 | (<code>default = <strong>2</strong></code>; <code>minimum = 0</code>)<br/> |
---|
259 | Deprecated. The number of events to list. |
---|
260 | |
---|
261 | |
---|
262 | <p/><code>mode </code><strong> Main:timesToShow </strong> |
---|
263 | (<code>default = <strong>50</strong></code>; <code>minimum = 0</code>)<br/> |
---|
264 | Deprecated. Print the number of events generated so far, this many times, |
---|
265 | i.e. once every <code>numberOfEvents/numberToShow</code> events. |
---|
266 | |
---|
267 | |
---|
268 | <h3>Statistics</h3> |
---|
269 | |
---|
270 | <p/><code>flag </code><strong> Stat:showProcessLevel </strong> |
---|
271 | (<code>default = <strong>on</strong></code>)<br/> |
---|
272 | Print the available statistics on number of generated events and |
---|
273 | cross sections, where relevant. |
---|
274 | |
---|
275 | |
---|
276 | <p/><code>flag </code><strong> Stat:showPartonLevel </strong> |
---|
277 | (<code>default = <strong>off</strong></code>)<br/> |
---|
278 | Print the available statistics on number and types of multiparton |
---|
279 | interactions, where relevant. |
---|
280 | |
---|
281 | |
---|
282 | <p/><code>flag </code><strong> Stat:showErrors </strong> |
---|
283 | (<code>default = <strong>on</strong></code>)<br/> |
---|
284 | Print the available statistics on number and types of |
---|
285 | aborts, errors and warnings. |
---|
286 | |
---|
287 | |
---|
288 | <p/><code>flag </code><strong> Stat:reset </strong> |
---|
289 | (<code>default = <strong>off</strong></code>)<br/> |
---|
290 | Reset the statistics of the above three kinds. The default is that |
---|
291 | all stored statistics information is unaffected by the |
---|
292 | <code>pythia.stat()</code> call. Counters are automatically reset |
---|
293 | in each new <code>pythia.init()</code> call, however, so the only time |
---|
294 | the reset option makes a difference is if <code>stat()</code> |
---|
295 | is called several times in a (sub)run. |
---|
296 | |
---|
297 | |
---|
298 | <p/><code>flag </code><strong> Main:showAllStatistics </strong> |
---|
299 | (<code>default = <strong>off</strong></code>)<br/> |
---|
300 | Print all available statistics or only the minimal set at the end |
---|
301 | of the run. |
---|
302 | |
---|
303 | |
---|
304 | <h3>Subruns</h3> |
---|
305 | |
---|
306 | You can use <a href="ProgramFlow.html" target="page">subruns</a> to carry out |
---|
307 | several tasks in the same run. In that case you will need repeated |
---|
308 | instances of the first setting below in your command file, and could |
---|
309 | additionally use the second and third as well. |
---|
310 | |
---|
311 | <p/><code>mode </code><strong> Main:subrun </strong> |
---|
312 | (<code>default = <strong>-999</strong></code>; <code>minimum = 0</code>)<br/> |
---|
313 | The number of the current subrun, a non-negative integer, put as |
---|
314 | first line in a section of lines to be read for this particular subrun. |
---|
315 | |
---|
316 | |
---|
317 | <p/><code>flag </code><strong> Main:LHEFskipInit </strong> |
---|
318 | (<code>default = <strong>off</strong></code>)<br/> |
---|
319 | If you read several Les Houches Event Files that you want to see |
---|
320 | considered as one single combined event sample you can set this flag |
---|
321 | <code>on</code> after the first subrun to skip (most of) the |
---|
322 | (re-)initialization step. |
---|
323 | |
---|
324 | |
---|
325 | <p/><code>mode </code><strong> Main:numberOfSubruns </strong> |
---|
326 | (<code>default = <strong>0</strong></code>)<br/> |
---|
327 | The number of subruns you intend to use in your current run. |
---|
328 | Unlike the two settings above, <code>Pythia</code> itself will not |
---|
329 | intepret this number, but you could e.g. have a loop in your main |
---|
330 | program to loop over subruns from 0 through |
---|
331 | <code>numberOfSubruns - 1</code>. |
---|
332 | |
---|
333 | |
---|
334 | <h3>Spares</h3> |
---|
335 | |
---|
336 | For currently unforeseen purposes, a few dummy settings are made |
---|
337 | available here. The user can set the desired value in a "cards file" |
---|
338 | and then use that value in the main program as desired. |
---|
339 | |
---|
340 | <p/><code>flag </code><strong> Main:spareFlag1 </strong> |
---|
341 | (<code>default = <strong>off</strong></code>)<br/> |
---|
342 | |
---|
343 | |
---|
344 | <p/><code>flag </code><strong> Main:spareFlag2 </strong> |
---|
345 | (<code>default = <strong>off</strong></code>)<br/> |
---|
346 | |
---|
347 | |
---|
348 | <p/><code>flag </code><strong> Main:spareFlag3 </strong> |
---|
349 | (<code>default = <strong>off</strong></code>)<br/> |
---|
350 | |
---|
351 | |
---|
352 | <p/><code>mode </code><strong> Main:spareMode1 </strong> |
---|
353 | (<code>default = <strong>0</strong></code>)<br/> |
---|
354 | |
---|
355 | |
---|
356 | <p/><code>mode </code><strong> Main:spareMode2 </strong> |
---|
357 | (<code>default = <strong>0</strong></code>)<br/> |
---|
358 | |
---|
359 | |
---|
360 | <p/><code>mode </code><strong> Main:spareMode3 </strong> |
---|
361 | (<code>default = <strong>0</strong></code>)<br/> |
---|
362 | |
---|
363 | |
---|
364 | <p/><code>parm </code><strong> Main:spareParm1 </strong> |
---|
365 | (<code>default = <strong>0.</strong></code>)<br/> |
---|
366 | |
---|
367 | |
---|
368 | <p/><code>parm </code><strong> Main:spareParm2 </strong> |
---|
369 | (<code>default = <strong>0.</strong></code>)<br/> |
---|
370 | |
---|
371 | |
---|
372 | <p/><code>parm </code><strong> Main:spareParm3 </strong> |
---|
373 | (<code>default = <strong>0.</strong></code>)<br/> |
---|
374 | |
---|
375 | |
---|
376 | <p/><code>word </code><strong> Main:spareWord1 </strong> |
---|
377 | (<code>default = <strong>void</strong></code>)<br/> |
---|
378 | |
---|
379 | |
---|
380 | <p/><code>word </code><strong> Main:spareWord2 </strong> |
---|
381 | (<code>default = <strong>void</strong></code>)<br/> |
---|
382 | |
---|
383 | |
---|
384 | <p/><code>word </code><strong> Main:spareWord3 </strong> |
---|
385 | (<code>default = <strong>void</strong></code>)<br/> |
---|
386 | |
---|
387 | |
---|
388 | </body> |
---|
389 | </html> |
---|
390 | |
---|
391 | <!-- Copyright (C) 2012 Torbjorn Sjostrand --> |
---|