source: HiSusy/trunk/Pythia8/pythia8170/htmldoc/HadronLevelStandalone.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: 11.9 KB
Line 
1<html>
2<head>
3<title>Hadron-Level Standalone</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>Hadron-Level Standalone</h2>
10
11The Les Houches Accord allows external process-level configurations
12to be fed in, for subsequent parton-level and hadron-level generation
13to be handled internally by PYTHIA. There is no correspondingly
14standardized interface if you have external events that have also
15been generated through the parton-level stage, so that only the
16hadron-level remains to be handled. A non-standard way to achieve this
17exists, however, and can be useful both for real applications and
18for various tests of the hadronization model on its own.
19
20<p/>
21The key trick is to set the flag <code>ProcessLevel:all = off</code>.
22When <code>pythia.next()</code> is called it then does not try to
23generate a hard process. Since there are no beams, it is also not
24possible to perform the normal <code>PartonLevel</code> step.
25(It is still possible to generate final-state radiation, but this
26is not automatic. It would have to be done by hand, using the
27<code>pythia.forceTimeShower(...)</code> method, before
28<code>pythia.next()</code> is called.)
29Thus only the <code>HadronLevel</code> methods are
30called, to take the current content of the event record stored in
31<code>pythia.event</code> as a starting point for any hadronization
32and decays that are allowed by the normal parameters of this step.
33Often the input would consist solely of partons grouped into colour
34singlets, but also (colour-singlet) particles are allowed.
35
36<p/>
37To set up all the parameters, a <code>pythia.init()</code> call has
38to be used, without any arguments. In brief, the structure of the
39main program therefore should be something like
40<pre>
41  Pythia pythia;                               // Declare generator.
42  Event& event = pythia.event                  // Convenient shorthand.
43  pythia.readString("ProcessLevel:all = off"); // The trick!
44  pythia.init();                               // Initialization.
45  for (int iEvent = 0; iEvent < nEvent; ++iEvent) {
46    // Insert filling of event here!
47    pythia.next();                             // Do the hadron level.
48  }
49</pre> 
50Of course this should be supplemented by analysis of events, error checks,
51and so on, as for a normal PYTHIA run. The unique aspect is how to fill
52the <code>event</code> inside the loop, before <code>pythia.next()</code> 
53is called.
54
55<h3>Input configuration</h3>
56
57To set up a new configuration the first step is to throw away the current
58one, with <code>event.reset()</code>. This routine will also reserve
59the zeroth entry in the even record to represent the event as a whole.
60
61<p/>
62With the <code>event.append(...)</code> methods a new entry is added at the
63bottom of the current record, i.e. the first time it is called entry
64number 1 is filled, and so on. The <code>append</code>  method basically
65exists in four variants, either without or with history information,
66and with four-momentum provided either as a <code>Vec4</code> four-vector
67or as four individual components:
68<pre>
69  append( id, status, col, acol, p, m)
70  append( id, status, col, acol, px, py, pz, e, m)
71  append( id, status, mother1, mother2, daughter1, daughter2, col, acol, p, m)
72  append( id, status, mother1, mother2, daughter1, daughter2, col, acol, px, py, pz, e, m)
73</pre> 
74The methods return the index at which the entry has been stored,
75but normally you would not use this feature.
76
77<p/>
78You can find descriptions of the input variables
79<a href="ParticleProperties.html" target="page">here</a>.
80The PDG particle code <code>id</code> and the Les Houches Accord colour
81<code>col</code> and anticolour <code>acol</code> tags must be set
82correctly. The four-momentum and mass have to be provided in units of GeV;
83if you omit the mass it defaults to 0.
84
85<p/>
86Outgoing particles that should hadronize should be given status code 23.
87Often this is the only status code you need. You could e.g. also fill in
88incoming partons with -21 and intermediate ones with -22, if you so wish.
89Usually the choice of status codes is not crucial, so long as you recall
90that positive numbers correspond to particles that are still around, while
91negative numbers denote ones that already hadronized or decayed. However,
92so as not to run into contradictions with the internal PYTHIA checks
93(when <code>Check:event = on</code>), or with external formats such as
94HepMC, we do recommend the above codes. When <code>pythia.next()</code> 
95is called the positive-status particles that hadronize/decay get the sign
96of the status code flipped to negative but the absolute value is retained.
97The new particles are added with normal PYTHIA status codes.
98
99<p/>
100For normal hadronization/decays in <code>pythia.next()</code> the
101history encoded in the mother and daughter indices is not used.
102Therefore the first two <code>append</code> methods, which set all these
103indices vanishing, should suffice. The subsequent hadronization/decays
104will still be properly documented.
105
106<p/>
107The exception is when you want to include junctions in your string
108topology, i.e. have three string pieces meet. Then you must insert in
109your event record the (decayed) particle that is the reason for the
110presence of a junction, e.g. a baryon beam remnant from which several
111valence quarks have been kicked out, or a neutralino that underwent a
112baryon-number-violating decay. This particle must have as daughters
113the three partons that together carry the baryon number.
114 
115<p/>
116The sample program in <code>main21.cc</code> illustrates how you can work
117with this facility, both for simple parton configurations and for more
118complicated ones with junctions.
119
120<p/>
121As an alternative to setting up a topology with the methods above,
122a <a href="LesHouchesAccord.html" target="page">Les Houches Event File</a> (LHEF)
123can also provide the configurations. Since no beams or processes are
124defined, only the <code>&lt;event&gt;....&lt;/event&gt;</code> blocks
125need to be present, one for each event, so strictly it is not a true
126LHEF. You need to select <code>Beams:frameType = 4</code>, provide
127the file name in <code>Beams:LHEF</code> and, as above, set
128<code>ProcessLevel:all = off</code>. Needless to say, an externally
129linked <code>LHAup</code> class works as well as an LHEF,
130with <code>Beams:frameType = 5</code>.
131
132<p/>
133The event information to store in the LHEF, or provide by the
134<code>LHAup</code>, is essentially the same as above. The only
135difference is in status codes: outgoing particles should have 1
136instead of 23, and intermediate resonances 2 instead of -22.
137Incoming partons, if any, are -1 instead of -21.
138
139<h3>Extensions to resonance decays</h3>
140
141With the above scheme, <code>pythia.next()</code> will generate
142hadronization, i.e. string fragmentation and subsequent decays of
143normal unstable particles. It will not decay
144<a href="ResonanceDecays.html" target="page">resonances</a>, i.e.
145<i>W, Z</i>, top, Higgs, SUSY and other massive particles.
146
147<p/>
148If the decay products are already provided, of course those
149products will be hadronized, but without any of the showers
150that one would expect in <i>Z^0 -> q qbar</i>, say. That is, the
151presence of a decayed resonance in the event record can be nice
152for documentation purposes, but otherwise it plays no role.
153It is possible to change this behaviour with the following flag.
154
155<p/><code>flag&nbsp; </code><strong> Standalone:allowResDec &nbsp;</strong> 
156 (<code>default = <strong>off</strong></code>)<br/>
157If off, then resonances are stable if final-state particles,
158and irrelevant if intermediate particles. If on, then
159resonances are decayed, sequentially if necessary. After each
160decay step a parton shower is applied, and subsequent decay
161kinematics is shifted by the recoil of such branchings.
162If the decay chain and kinematics of the resonance is provided
163at input, this information is used, otherwise it is generated
164internally according to built-in branching ratios etc.
165 
166
167<p/>
168The input configuration has to follow the rules described above,
169with <code>ProcessLevel:all = off</code>. (Terminology not quite
170consistent, since resonance decays normally is part of the
171process-level step.) It is possible to combine several resonances,
172and other coloured or uncoloured particles into the same event.
173 
174<p/>
175Final-state radiation is applied to each step of the decay
176sequence by default, but can be switched off with
177<code>PartonLevel:FSR = off</code> or
178<code>PartonLevel:FSRinResonances</code>.
179
180<h3>Repeated hadronization or decay</h3>
181
182An alternative approach is possible with the
183<code>pythia.forceHadronLevel()</code> routine. This method does
184a call to the <code>HadronLevel</code> methods, irrespective of the
185value of the <code>HadronLevel:all</code> flag. If you hadronize
186externally generated events it is equivalent to a
187<code>pythia.next()</code> call with
188<code>ProcessLevel:all = off</code>.
189
190<p/>
191This method truly sticks to the hadron level, and thus cannot handle
192resonance decays. You therefore <b>must not</b> mix it with the
193<code>Standalone:allowResDec = on</code> framework.
194
195<p/>
196The similarity of names indicates that
197<code>pythia.forceTimeShower( int iBeg, int iEnd, double pTmax,
198int nBranchMax = 0)</code> is intended to belong to the same set of
199work-by-hand methods. Here <code>iBeg</code> and <code>iEnd</code>
200give the range of partons that should be allowed to shower,
201<code>pTmax</code> the maximum <i>pT</i> scale of emissions,
202and a nonzero <code>nBranchMax</code> a maximum number of allowed
203branchings. Additionally, a <code>scale</code> has to be set for each
204parton that should shower, which requires an additional final argument
205to the <code>append</code> methods above. This scale limits the maximum
206<i>pT</i> allowed for each parton, in addition to the global
207<code>pTmax</code>. When not set the scale defaults to 0, meaning no
208radiation for that parton.
209
210<p/>
211The real application instead is for repeated hadronization of the same
212PYTHIA process- and parton-level event. This may for some studies
213help to save time, given that these two first step are more
214time-consuming than the hadronization one.
215
216<p/>
217For repeated hadronization you should first generate an event as usual,
218but with <code>HadronLevel:all = off</code>. This event you can save
219in a temporary copy, e.g. <code>Event savedEvent = pythia.event</code>.
220Inside a loop you copy back with <code>pythia.event = savedEvent</code>,
221and call <code>pythia.forceHadronLevel()</code> to obtain a new
222hadronization history.
223
224<p/>
225A more limited form of repetition is if you want to decay a given kind
226of particle repeatedly, without having to generate the rest of the event
227anew. This could be the case e.g. in <i>B</i> physics applications.
228Then you can use the <code>pythia.moreDecays()</code> method, which
229decays all particles in the event record that have not been decayed
230but should have been done so. The
231<code>pythia.particleData.mayDecay( id, false/true)</code> method
232may be used to switch off/on the decays of a particle species
233<code>id</code>, so that it is not decayed in the
234<code>pythia.next()</code> call but only inside a loop over a number of
235tries.
236
237<p/>
238Between each loop the newly produced decay products must be
239removed and the decayed particle status restored to undecayed.
240The former is simple, since the new products are appended to the
241end of the event record: <code>event.saveSize()</code> saves the
242initial size of the event record, and <code>event.restoreSize()</code>
243can later be used repeatedly to restore this original size, which means
244that the new particles at the end are thrown away. The latter is more
245complicated, and requires the user to identify the positions of all
246particles of the species and restore a positive status code with
247<code>event[i].statusPos()</code>.
248
249<p/>
250The <code>main15.cc</code> program illustrates both these methods,
251i.e. either repeated hadronization or repeated decay of PYTHIA
252events.
253
254</body>
255</html>
256
257<!-- Copyright (C) 2012 Torbjorn Sjostrand -->
Note: See TracBrowser for help on using the repository browser.