1 | <chapter name="Sample Main Programs"> |
---|
2 | |
---|
3 | <h2>Sample Main Programs</h2> |
---|
4 | |
---|
5 | Descriptions of available classes, methods and settings are all |
---|
6 | very good and useful. Ultimately they are necessary for you to |
---|
7 | be able to fine-tune your runs to the task at hand. To get going, |
---|
8 | however, nothing helps like having explicit examples to study. |
---|
9 | This is what is provided in the <code>examples</code> subdirectory, |
---|
10 | along with instructions how they should be run: |
---|
11 | <ul> |
---|
12 | |
---|
13 | <li><code>main00.cc</code> : does not exist, but it has been defined |
---|
14 | in the <code>Makefile</code>, so this name could be used for a simple |
---|
15 | first test run. |
---|
16 | |
---|
17 | <li><code>main01.cc</code> : a simple study of the charged multiplicity |
---|
18 | for jet events at the LHC. (Brief example fitting on one slide.)</li> |
---|
19 | |
---|
20 | <li><code>main02.cc</code> : a simple study of the <ei>pT</ei> spectrum |
---|
21 | of Z bosons at the Tevatron. (Brief example fitting on one slide.)</li> |
---|
22 | |
---|
23 | <li><code>main03.cc</code> : a simple study of several different kinds |
---|
24 | of events, with the choice to be made in the <code>main03.cmnd</code> |
---|
25 | "cards file".</li> |
---|
26 | |
---|
27 | <li><code>main04.cc</code> : tests of cross sections, multiplicities and |
---|
28 | average transverse momenta for elastic, diffractive and nondiffractive |
---|
29 | topologies, using <code>main04.cmnd</code> to pick processes.</li> |
---|
30 | |
---|
31 | <li><code>main05.cc</code> : generation of QCD jet events at the LHC, |
---|
32 | with jet analysis using the <code>SlowJet</code> inclusive anti-<ei>kT</ei> |
---|
33 | sequential-recombination finder and the <code>CellJet</code> |
---|
34 | cone-jet finder.</li> |
---|
35 | |
---|
36 | <li><code>main06.cc</code> : generation of LEP1 hadronic events, i.e. |
---|
37 | <ei>e^+e^- -> gamma*/Z^0 -> q qbar</ei>, with charged multiplicity, |
---|
38 | sphericity, thrust and jet analysis.</li> |
---|
39 | |
---|
40 | <li><code>main07.cc</code> : set up a fictitious production process |
---|
41 | to a generic resonance, where you easily can compose your own list |
---|
42 | of (two-body) decay modes to a variety of final states. Also traces |
---|
43 | decay chains down to truly stable particles: gamma, e+-, p/pbar and |
---|
44 | neutrinos. Suitable for astroparticle applications, like neutralino |
---|
45 | pair annihilation, where cross sections are calculated separately |
---|
46 | in another program.</li> |
---|
47 | |
---|
48 | <li><code>main08.cc</code> : generation of the QCD jet cross section |
---|
49 | biased towards higher pT values, by two different techniques. |
---|
50 | Firstly, by splitting the run into subruns, each in its own <ei>pT</ei> |
---|
51 | bin, and adding the results properly reweighted. Two suboptions, with |
---|
52 | limits set either in the main program or by subrun specification in the |
---|
53 | <code>main08.cmnd</code> file. Secondly, by a continuous reweighting |
---|
54 | with a <ei>pT^4</ei> bias in the selection, compensated by a |
---|
55 | <ei>1/pT^4</ei> event weight. Also inclusion of soft processes is |
---|
56 | illustrated, with subruns and weighted events.</li> |
---|
57 | |
---|
58 | <li><code>main09.cc</code> : generation of two predetermined hard |
---|
59 | interactions in each event.</li> |
---|
60 | |
---|
61 | <li><code>main10.cc</code> : illustration how userHooks can be used |
---|
62 | interact directly with the event-generation process.</li> |
---|
63 | |
---|
64 | <li><code>main11.cc</code> : a study of top events, fed in from the |
---|
65 | Les Houches Event File <code>ttbar.lhe</code>, here generated by |
---|
66 | PYTHIA 6.4. This file currently only contains 100 events |
---|
67 | so as not to make the distributed PYTHIA package too big, and so serves |
---|
68 | mainly as a demonstration of the principles involved. </li> |
---|
69 | |
---|
70 | <li><code>main12.cc</code> : a more sophisticated variant of |
---|
71 | <code>main11.cc</code>, where two Les Houches Event Files |
---|
72 | (<code>ttbar.lhe</code> and <code>ttbar2.lhe</code>) successively |
---|
73 | are used as input. Also illustrating some other aspects, like the |
---|
74 | capability to mix in internally generated events.</li> |
---|
75 | |
---|
76 | <li><code>main13.cc</code> : a streamlined version of |
---|
77 | <code>main12.cc</code>, where two Les Houches Event Files |
---|
78 | (<code>ttbar.lhe</code> and <code>ttbar2.lhe</code>) successively |
---|
79 | are used as input in <code>main13.cmnd</code> file.</li> |
---|
80 | |
---|
81 | <li><code>main14.cc</code> : a systematic comparison of several |
---|
82 | cross section values with their corresponding values in PYTHIA 6.4, |
---|
83 | the latter available as a table in the code.</li> |
---|
84 | |
---|
85 | <li><code>main15.cc</code> : loop over several tries, either to redo |
---|
86 | B decays only or to redo the complete hadronization chain of an event. |
---|
87 | Since much of the generation process is only made once this is a way |
---|
88 | to increase efficiency.</li> |
---|
89 | |
---|
90 | <li><code>main16.cc</code> : put all user analysis code into a class |
---|
91 | of its own, separate from the main program; provide the "cards file" |
---|
92 | name as a command-line argument.</li> |
---|
93 | |
---|
94 | <li><code>main17.cc</code> : shows (a) how to use UserHooks to |
---|
95 | regularize onium cross section for pT -> 0, and (b) how decays |
---|
96 | could be handled externally.</li> |
---|
97 | |
---|
98 | <li><code>main18.cc</code> : shows how to write an event filter class, |
---|
99 | where you keep a vector of pointers to the subset of particles you |
---|
100 | want to study further. The event record itself remains unchanged.</li> |
---|
101 | |
---|
102 | <li><code>main19.cc</code> : use several instances of Pythia, one for |
---|
103 | signal events and others for a variable number of pileup and "beam-gas" |
---|
104 | events, combined into one common event record.</li> |
---|
105 | |
---|
106 | <li><code>main20.cc</code> : shows how PYTHIA 8 can write a Les Houches |
---|
107 | Event File, using facilities potentially useful also for other programs |
---|
108 | to write an LHEF.</li> |
---|
109 | |
---|
110 | <li><code>main21.cc</code> : an example how a single particle or various |
---|
111 | parton-level configurations can be input directly for hadronization, |
---|
112 | without being tied to the full process-generation machinery, e.g. to |
---|
113 | study the hadronization of junction topologies. Can also be used for |
---|
114 | single-resonance decays, with showers.</li> |
---|
115 | |
---|
116 | <li><code>main22.cc</code> : shows how an external resonance can be |
---|
117 | implemented as a new class derived from a PYTHIA base class, and be |
---|
118 | used in an external process, both of them handed in for generation |
---|
119 | as with normal internal classes.</li> |
---|
120 | |
---|
121 | <li><code>main23.cc</code> : shows how an external beam momentum spread |
---|
122 | and vertex location generator can be implemented as a new class derived |
---|
123 | from a PYTHIA base class, and then handed in for internal use. |
---|
124 | Also how to use an external random-number generator and an external |
---|
125 | parton distribution set.</li> |
---|
126 | |
---|
127 | <li><code>main24.cc</code> : tests of internally implemented cross sections |
---|
128 | for Supersymmetric particle production, with SYSY spectrum defined in |
---|
129 | <code>cmssm.spc</code> and settings in <code>main24.cmnd</code>. For |
---|
130 | illustration, an alternative example spectrum is also |
---|
131 | available, <code>sps1aWithDecays.spc</code>, which contains a decay |
---|
132 | table in SLHA format.</li> |
---|
133 | |
---|
134 | <li><code>main25.cc</code> : input RPV-SUSY events from an LHEF file that |
---|
135 | contains an SLHA spectrum inside its header. The event file, |
---|
136 | <code>main25.lhe</code>, contains a sample events that |
---|
137 | illustrate how to arrange color tags in the presence of the |
---|
138 | color-space epsilon tensors that accompany baryon number violating |
---|
139 | event topologies. </li> |
---|
140 | |
---|
141 | <li><code>main26.cc</code> : test program for processes in scenarios |
---|
142 | with large extra dimensions or unparticles. </li> |
---|
143 | |
---|
144 | <li><code>main27.cc</code> : production of Kaluza-Klein <ei>gamma/Z</ei> |
---|
145 | states in TeV-sized extra dimensions. </li> |
---|
146 | |
---|
147 | <li><code>main28.cc</code> : production of long-lived R-hadrons, that |
---|
148 | are forced to decay at a separate vertices and possibly with changed |
---|
149 | momenta.</li> |
---|
150 | |
---|
151 | <li><code>main31.cc</code> : exemplifies an improved matching of |
---|
152 | parton showers to LHEF-style input based on the POWHEG approach. |
---|
153 | The <code>main31.cmnd</code> allows to switch between several |
---|
154 | different matching options. It also allows to select input process, |
---|
155 | in this case either for the POWHEG-hvq program applied to top |
---|
156 | pair production <ref>Cor10</ref> or for QCD 2+3-jet events. The small |
---|
157 | samples of input events are stored in the <code>powheg-hvq.lhe</code> |
---|
158 | and <code>powheg-dijets.lhe</code> files, respectively. |
---|
159 | </li> |
---|
160 | |
---|
161 | <li><code>main32.cc</code> : exemplifies MLM merging for ALPGEN events, |
---|
162 | see <aloc href="AlpgenAndMLM">ALPGEN and MLM merging</aloc> for further |
---|
163 | details. Traditionally the ALPGEN output is split into one file with |
---|
164 | events and another with parameters and cross sections (unlike in LHEF). |
---|
165 | Here a sample of <ei>W + 3 jets</ei> events is stored in |
---|
166 | <code>main32.unw</code> and the parameters to go with it in |
---|
167 | <code>main32_unw.par</code>, while normal PYTHIA control cards are in |
---|
168 | <code>main32.cmnd</code>. |
---|
169 | </li> |
---|
170 | |
---|
171 | <li><code>main41.cc</code> : similar to <code>main01</code>, except that |
---|
172 | the event record is output in the HepMC event record format. Requires that |
---|
173 | HepMC is properly linked. Note that the <code>hepmcout41.dat</code> output |
---|
174 | file can become quite big; so no example is included in this |
---|
175 | distribution.</li> |
---|
176 | |
---|
177 | <li><code>main42.cc</code> : a streamlined version for the generation |
---|
178 | of events that are then stored in HepMC format, without any event |
---|
179 | analysis. That is, all physics studies will have to be done afterwards. |
---|
180 | The name of the input "cards file" (e.g. <code>main42.cmnd</code>) |
---|
181 | and output HepMC event file (e.g. <code>hepmcout42.dat</code>) are to |
---|
182 | be provided as command-line arguments. Requires that HepMC is properly |
---|
183 | linked. Note that the HepMC output file can become quite big; so no |
---|
184 | example is included in this distribution.</li> |
---|
185 | |
---|
186 | <li><code>main51.cc</code> : a test of the shape of parton densities, |
---|
187 | as a check prior to using a given PDF set in a generator. Requires |
---|
188 | that LHAPDF is properly linked.</li> |
---|
189 | |
---|
190 | <li><code>main52.cc</code> : compares the charged multiplicity |
---|
191 | distribution, and a few other minimum-bias physics aspects, between |
---|
192 | default PYTHIA PDF and another one. Requires that LHAPDF is properly |
---|
193 | linked.</li> |
---|
194 | |
---|
195 | <li><code>main53.cc</code> : tests the possibility to do backwards |
---|
196 | evolution from an incoming photon at the hard interaction. Requires |
---|
197 | that you link to a LHAPDF set that includes the photon PDF.</li> |
---|
198 | |
---|
199 | <li><code>main61.cc</code> : a streamlined version for the generation |
---|
200 | of events that are then stored in HepMC format, without any event |
---|
201 | analysis. That is, just like <code>main42.cc</code>, with the difference |
---|
202 | that <code>main61.cc</code> can be used in conjunction with LHAPDF. |
---|
203 | The name of the input "cards file" (e.g. <code>main61.cmnd</code>) |
---|
204 | and output HepMC event file (e.g. <code>hepmcout61.dat</code>) are to |
---|
205 | be provided as command-line arguments. Requires that HepMC and LHAPDF |
---|
206 | are properly linked. Note that the HepMC output file can become quite |
---|
207 | big; so no example is included in this distribution.</li> |
---|
208 | |
---|
209 | <li><code>main62.cc</code> : a further extension of <code>main61.cc</code>, |
---|
210 | where subruns are used to process several consecutive LHEF, |
---|
211 | as in <code>main13.cc</code>, with information stored e.g in |
---|
212 | <code>main62.cmnd</code>. Other comments as for <code>main61.cc</code>.</li> |
---|
213 | |
---|
214 | <li><code>main71.cc</code> : an example how the FastJet jet finding |
---|
215 | package can be linked to allow an analysis of the final state, |
---|
216 | in this case for a study of W + jet production.</li> |
---|
217 | |
---|
218 | <li><code>main72.cc</code> : a comparison of SlowJet and FastJet |
---|
219 | jet finding, showing that they find the same jets if run under |
---|
220 | identical conditions, in this case for QCD jets.</li> |
---|
221 | |
---|
222 | <li><code>main81.cc</code> : do CKKW-L merging with a merging scale |
---|
223 | defined in <ei>kT</ei>. Input is provided by the <code>main81.cmnd</code> |
---|
224 | file and the three data files <code>w+_production_lhc_0.lhe</code>, |
---|
225 | <code>w+_production_lhc_1.lhe</code> and <code>w+_production_lhc_2.lhe</code>. |
---|
226 | </li> |
---|
227 | |
---|
228 | <li><code>main82.cc</code> : do CKKW-L merging with a user-defined |
---|
229 | merging scale function. Input is provided by the <code>main82.cmnd</code> |
---|
230 | file and the three data files <code>w+_production_lhc_0.lhe</code>, |
---|
231 | <code>w+_production_lhc_1.lhe</code> and <code>w+_production_lhc_2.lhe</code>. |
---|
232 | </li> |
---|
233 | |
---|
234 | <li><code>main83.cc</code> : as <code>main82.cc</code> but with an |
---|
235 | additional cut on the lowest multiplicity allowed for the reclustered |
---|
236 | state. The same input as for <code>main82.cc</code> can be used. |
---|
237 | </li> |
---|
238 | |
---|
239 | <li><code>main84.cc</code> : do CKKW-L merging with output in such a way |
---|
240 | that it can be used in subsequent RIVET analyses. Input is provided by |
---|
241 | the <code>main84.cmnd</code> file and the three data files |
---|
242 | <code>w+_production_lhc_0.lhe</code>, <code>w+_production_lhc_1.lhe</code> |
---|
243 | and <code>w+_production_lhc_2.lhe</code>. |
---|
244 | </li> |
---|
245 | |
---|
246 | <li><code>main91.cc</code> : exemplifies how you can link in runtime |
---|
247 | generation of hard processes from PYTHIA 6, using the Les Houches |
---|
248 | Accord facilities. This example is deprecated, since PYTHIA 8 by now |
---|
249 | contains essentially all hard processes found in PYTHIA 6.</li> |
---|
250 | |
---|
251 | </ul> |
---|
252 | |
---|
253 | In addition two main program illustrating the use of ROOT are available |
---|
254 | in the <code>rootexamples</code> subdirectory: |
---|
255 | |
---|
256 | <ul> |
---|
257 | |
---|
258 | <li><code>hist.cc</code> : shows how ROOT can be used for histogramming |
---|
259 | in a program that for the rest is structured like a normal PYTHIA run. |
---|
260 | </li> |
---|
261 | |
---|
262 | <li><code>tree.cc</code> : shows how PYTHIA events can be stored as |
---|
263 | ROOT trees.</li> |
---|
264 | |
---|
265 | </ul> |
---|
266 | |
---|
267 | This subdirectory also contains a special Makefile and related |
---|
268 | documentation. |
---|
269 | |
---|
270 | |
---|
271 | </chapter> |
---|
272 | |
---|
273 | <!-- Copyright (C) 2012 Torbjorn Sjostrand --> |
---|