source: HiSusy/trunk/Pythia8/pythia8170/htmldoc/MainProgramSettings.html @ 1

Last change on this file since 1 was 1, checked in by zerwas, 11 years ago

first import of structure, PYTHIA8 and DELPHES

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