]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PYTHIA8/pythia8145/xmldoc/MainProgramSettings.xml
Use Output directive instead of the old OutputFile and OUtputArchive. Save fileinfo...
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8145 / xmldoc / MainProgramSettings.xml
CommitLineData
9419eeef 1<chapter name="Main-Program Settings">
2
3<h2>Main-Program Settings</h2>
4
5<h3>Introduction</h3>
6
7The main program is up to the user to write. However,
8<aloc href="SampleMainPrograms">sample main programs</aloc>
9are provided. In one such class of programs, key settings of the run
10are read in from a "cards file". These commands may be of two types<br/>
11(a) instructions directly to <code>Pythia</code>, like which
12processes to generate, and<br/>
13(b) instructions to the main program for what it should do,
14like how many events to generate, i.e. how many times
15<code>pythia.next()</code> should be called.<br/>
16In principle these two kinds could be kept completely separate.
17However, to make life simpler, a number of useful main-program
18settings are defined on this page, so that they are recognized by
19the <code>Settings</code> machinery. They can thus be put among
20the other cards without distinction. It is up to you to decide which
21ones, if any, you actually want to use when you write your main program.
22For convenience, some in the second section below can also be interpreted
23directly by <code>Pythia</code>, while the subsequent ones really have
24to be used in your main program.
25
26<p/>
27Once you have used the <code>pythia.readFile(fileName)</code> method to
28read in the cards file (alternatively with an <code>istream</code> instead
29of a <code>fileName</code>), you can interrogate the <code>Settings</code>
30database to make the values available in your main program. A slight
31complication is that you need to use a different <code>Settings</code>
32method for each of the four possible return types that you want to
33extract. To save some typing the same method names are found directly
34in the <code>Pythia</code> class, and just send on to the
35<code>Settings</code> ones to do the job, e.g.
36<pre>
37 bool showCS = pythia.flag("Main:showChangedSettings");
38 int nEvent = pythia.mode("Main:numberOfEvents");
39 double spare1 = pythia.parm("Main:spareParm1");
40 string file = pythia.word("Main:allSettingsFile");
41</pre>
42
43<h3>Run settings</h3>
44
45Here settings related to how many events to generate and whether
46to print some information on data used in run. These variables
47can be set in an input "cards" file, and thereafter read out an used
48in the user-written main program. Usage is purely optional, but may help
49you reduce the need to recompile your main program.
50
51<modeopen name="Main:numberOfEvents" default="1000" min="0">
52The number of events to be generated.
53</modeopen>
54
55<modeopen name="Main:numberToList" default="2" min="0">
56The number of events to list.
57</modeopen>
58
59<modeopen name="Main:timesToShow" default="50" min="0">
60Print the number of events generated so far, this many times,
61i.e. once every <code>numberOfEvents/numberToShow</code> events.
62</modeopen>
63
64<modeopen name="Main:timesAllowErrors" default="10" min = "0">
65Allow this many times that <code>pythia.next()</code> returns false,
66i.e. that an event is flawed, before aborting the run.
67</modeopen>
68
69<flag name="Main:showChangedSettings" default="on">
70Print a list of the changed flag/mode/parameter/word settings.
71</flag>
72
73<flag name="Main:showAllSettings" default="off">
74Print a list of all flag/mode/parameter/word settings.
75Warning: this will be a long list.
76</flag>
77
78<modeopen name="Main:showOneParticleData" default="0" min="0">
79Print particle and decay data for the particle with this particular
80identity code. Default means that no particle is printed.
81</flag>
82
83<flag name="Main:showChangedParticleData" default="off">
84Print a list of particle and decay data for those particles
85that were changed (one way or another).
86</flag>
87
88<flag name="Main:showChangedResonanceData" default="off">
89In the previous listing also include the resonances that are
90initialized at the beginning of a run and thus get new particle
91data, even if these may well agree with the default ones.
92Warning: this will be a rather long list.
93</flag>
94
95<flag name="Main:showAllParticleData" default="off">
96Print a list of all particle and decay data.
97Warning: this will be a long list.
98</flag>
99
100<flag name="Main:writeChangedSettings" default="off">
101Write a file with the changed flag/mode/parameter/word settings, in
102a format appropriate to be read in at the beginning of a new
103run, using the <code>pythia.readFile(fileName)</code> method.
104</flag>
105
106<word name="Main:changedSettingsFile" default="currentSettings.cmnd">
107The name of the file to which the changed flag/mode/parameter/word
108settings are written if <code>Main:writeChangedSettings</code>
109is on.
110</word>
111
112<flag name="Main:writeAllSettings" default="off">
113Write a file with all flag/mode/parameter/word settings, in
114a format appropriate to be read in at the beginning of a new
115run, using the <code>pythia.readFile(fileName)</code> method.
116</flag>
117
118<word name="Main:allSettingsFile" default="allSettings.cmnd">
119The name of the file to which a flag/mode/parameter/word
120settings are written if <code>Main:writeAllSettings</code>
121is on.
122</word>
123
124<flag name="Main:showAllStatistics" default="off">
125Print all available statistics or only the minimal set at the end
126of the run.
127</flag>
128
129<h3>Subruns</h3>
130
131You can use <aloc href="ProgramFlow">subruns</aloc> to carry out
132several tasks in the same run. In that case you will need repeated
133instances of the first setting below in your command file, and could
134additionally use the second and third as well.
135
136<modeopen name="Main:subrun" default="-999", min="0">
137The number of the current subrun, a non-negative integer, put as
138first line in a section of lines to be read for this particular subrun.
139</modeopen>
140
141<flag name="Main:LHEFskipInit" default="off">
142If you read several Les Houches Event Files that you want to see
143considered as one single combined event sample you can set this flag
144<code>on</code> after the first subrun to skip (most of) the
145(re-)initialization step.
146</flag>
147
148<modeopen name="Main:numberOfSubruns" default="0", min = "0">
149The number of subruns you intend to use in your current run.
150Unlike the two settings above, <code>Pythia</code> itself will not
151intepret this number, but you could e.g. have a loop in your main
152program to loop over subruns from 0 through
153<code>numberOfSubruns - 1</code>.
154</flag>
155
156<h3>Spares</h3>
157
158For currently unforeseen purposes, a few dummy settings are made
159available here. The user can set the desired value in a "cards file"
160and then use that value in the main program as desired.
161
162<flag name="Main:spareFlag1" default="off">
163</flag>
164
165<flag name="Main:spareFlag2" default="off">
166</flag>
167
168<flag name="Main:spareFlag3" default="off">
169</flag>
170
171<modeopen name="Main:spareMode1" default="0">
172</modeopen>
173
174<modeopen name="Main:spareMode2" default="0">
175</modeopen>
176
177<modeopen name="Main:spareMode3" default="0">
178</modeopen>
179
180<parm name="Main:spareParm1" default="0.">
181</parm>
182
183<parm name="Main:spareParm2" default="0.">
184</parm>
185
186<parm name="Main:spareParm3" default="0.">
187</parm>
188
189<word name="Main:spareWord1" default="void">
190</word>
191
192<word name="Main:spareWord2" default="void">
193</word>
194
195<word name="Main:spareWord3" default="void">
196</word>
197
198</chapter>
199
200<!-- Copyright (C) 2010 Torbjorn Sjostrand -->