]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA8/pythia8145/phpdoc/ParticleDataScheme.php
New pythia8 version
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8145 / phpdoc / ParticleDataScheme.php
1 <html>
2 <head>
3 <title>The Particle Data Scheme</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 <script language=javascript type=text/javascript>
10 function stopRKey(evt) {
11 var evt = (evt) ? evt : ((event) ? event : null);
12 var node = (evt.target) ? evt.target :((evt.srcElement) ? evt.srcElement : null);
13 if ((evt.keyCode == 13) && (node.type=="text"))
14 {return false;}
15 }
16
17 document.onkeypress = stopRKey;
18 </script>
19 <?php
20 if($_POST['saved'] == 1) {
21 if($_POST['filepath'] != "files/") {
22 echo "<font color='red'>SETTINGS SAVED TO FILE</font><br/><br/>"; }
23 else {
24 echo "<font color='red'>NO FILE SELECTED YET.. PLEASE DO SO </font><a href='SaveSettings.php'>HERE</a><br/><br/>"; }
25 }
26 ?>
27
28 <form method='post' action='ParticleDataScheme.php'>
29
30 <h2>The Particle Data Scheme</h2>
31
32 The particle data scheme may take somewhat longer to understand than
33 the settings one. In particular the set of methods to access information
34 is rather more varied, to allow better functionality for advanced usage. 
35 However, PYTHIA does come with a sensible default set of particle 
36 properties and decay tables. Thus there is no need to learn any of the
37 methods on this page to get going. Only when you perceive a specific need
38 does it make sense to learn the basics.
39
40 <p/>
41 The central section on this page is the Operation one. The preceding 
42 sections are there mainly to introduce the basic structure and the set 
43 of properties that can be accessed. The subsequent sections provide a 
44 complete listing of the existing public methods, which most users 
45 probably will have little interaction with.
46
47 <h3>Databases</h3>
48
49 The management of particle data is based on three classes:
50 <ul>
51 <li><code>ParticleData</code>, which is the top-level class, with
52 methods that can be used to interrogate all particle data. It contains
53 a map of PDG particle identity numbers [<a href="Bibliography.php" target="page">Yao06</a>] onto the relevant 
54 <code>ParticleDataEntry</code> objects,</li> 
55 <li><code>ParticleDataEntry</code>, which stores the relevant information 
56 on an individual particle species, and</li>
57 <li><code>DecayChannel</code>, which stores info on one particular decay 
58 mode of a particle.</li>
59
60 </ul>
61 The objects of these classes together form a database that is 
62 continuously being used as the program has to assign particle masses, 
63 select decay modes, etc.
64
65 <p/>
66 Each <code>Pythia</code> object has a public member 
67 <code>particleData</code> of the <code>ParticleData</code> class. 
68 Therefore you access the particle data methods as 
69 <code>pythia.particleData.command(argument)</code>,
70 assuming that <code>pythia</code> is an instance of the 
71 <code>Pythia</code> class. Further, for some of the most frequent user 
72 tasks, <code>Pythia</code> methods have been defined, so that 
73 <code>pythia.command(argument)</code> 
74 would work, see further below.
75
76 <p/>
77 A fundamental difference between the particle data classes and the 
78 settings ones is that the former are accessed regularly during the 
79 event generation process, as a new particle is produced and its mass 
80 need to be set, e.g., while the latter are mainly/only used 
81 at the initialization stage. Nevertheless, it is not a good idea to 
82 change data in either of them in mid-run, since this may lead to 
83 inconsistencies. 
84
85 <h3>Stored properties for particles</h3>
86
87 The main properties stored for each particle are as follows. 
88 Different ways to set and get these properties will be described
89 further down.
90
91 <ul>
92
93 <li><code>name</code>: a character string with the name of the 
94 particle. Particle and antiparticle names are stored separately,
95 with <code>void</code> returned when no antiparticle exists.</li>
96
97 <li><code>spinType</code>: the spin type, of the form <i>2 s + 1</i>, 
98 with special code 0 for entries of unknown or indeterminate spin.</li> 
99
100 <li><code>chargeType</code>: three times the charge (to make it an 
101 integer).</li> 
102
103 <li><code>colType</code>: the colour type, with 0 uncoloured, 1 triplet, 
104 -1 antitriplet and 2 octet.</li> 
105
106 <li><code>m0</code>: the nominal mass <i>m_0</i> (in GeV).</li> 
107
108 <li><code>mWidth</code>: the width <i>Gamma</i> of the Breit-Wigner 
109 distribution (in GeV).</li> 
110
111 <li><code>mMin</code>: the lower limit of the allowed mass range 
112 generated by the Breit-Wigner (in GeV). Has no meaning for particles 
113 without width, and would typically be 0 there.</li> 
114
115 <li><code>mMax</code>: the upper limit of the allowed mass range 
116 generated by the Breit-Wigner (in GeV). If <i>mMax &lt; mMin</i> then 
117 no upper limit is imposed. Has no meaning for particles without width, 
118 and would typically be 0 there.</li> 
119
120 <li><code>tau0</code>: the nominal proper lifetime <i>tau_0</i> 
121 (in mm/c).</li> 
122
123 <li><code>isResonance</code>: a flag telling whether a particle species 
124 is considered as a resonance or not. Here 
125 <?php $filepath = $_GET["filepath"];
126 echo "<a href='ResonanceDecays.php?filepath=".$filepath."' target='page'>";?>"resonance"</a> is used as shorthand 
127 for any massive particle where the decay process should be counted as part 
128 of the hard process itself, and thus be performed before showers and other 
129 event aspects are added. Restrictions on allowed decay channels is also 
130 directly reflected in the cross section of simulated processes, while 
131 those of normal hadrons and other light particles are not.
132 In practice, it is reserved for states above the <i>b bbar</i> 
133 bound systems in mass, i.e. for <i>W, Z, t</i>, Higgs states, 
134 supersymmetric states and (most?) other states in any new theory. 
135 All particles with <code>m0</code> above 20 GeV are by default
136 initialized to be considered as resonances.</li> 
137
138 <li><code>mayDecay</code>: a flag telling whether a particle species 
139 may decay or not, offering the main user switch. Whether a given particle 
140 of this kind then actually will decay also depends on it having allowed 
141 decay channels, and on other flags for 
142 <?php $filepath = $_GET["filepath"];
143 echo "<a href='ParticleDecays.php?filepath=".$filepath."' target='page'>";?>particle decays</a>. 
144 All particles with <code>tau0</code> below 1000 mm are 
145 by default initialized to allow decays.</li> 
146
147 <li><code>doExternalDecays</code>: a flag telling whether a particle 
148 should be handled by an external decay package or not, with the latter 
149 default. Can be manipulated as described on this page, but should 
150 normally not be. Instead the 
151 <code><?php $filepath = $_GET["filepath"];
152 echo "<a href='ExternalDecays.php?filepath=".$filepath."' target='page'>";?>Pythia::decayPtr(...)</a></code> 
153 method should be provided with the list of relevant particles.</li> 
154
155 <li><code>isVisible</code>: a flag telling whether a particle species 
156 is to be considered as visible in a detector or not, as used e.g. in 
157 analysis routines. By default this includes neutrinos and a few BSM 
158 particles (gravitino, sneutrinos, neutralinos) that have neither strong 
159 nor electromagnetic charge, and are not made up of constituents that
160 have it. The value of this flag is only relevant if a particle is
161 long-lived enough actually to make it to a detector.</li> 
162
163 <li><code>doForceWidth</code>: a flag valid only for resonances where 
164 PYTHIA contains code to calculate the width of the resonance from 
165 encoded matrix-element expressions, i.e. the <i>Z^0</i>, <i>W^+-</i>, 
166 <i>t</i>, <i>h^0</i>, and a few more. The normal behaviour 
167 (<code>false</code>) is then that the width is calculated from the mass, 
168 but it is possible to <?php $filepath = $_GET["filepath"];
169 echo "<a href='ResonanceDecays.php?filepath=".$filepath."' target='page'>";?>force</a> the 
170 resonance to retain the nominal width. Branching ratios and the running 
171 of the total width are unaffected.</li> 
172
173 </ul>
174
175 <h3>Stored properties for decays</h3>
176
177 An unstable particle has a decay table consisting of one or more 
178 decay channel. The following properties are stored for each such channel. 
179 Again different ways to set and get these properties will be described
180 further down.
181 <ul>
182
183 <li><code>onMode</code>: integer code for use or not of channel,<br/>
184 0 if a channel is off,<br/>
185 1 if on,<br/>
186 2 if on for a particle but off for an antiparticle,<br/>
187 3 if on for an antiparticle but off for a particle.<br/>
188 If a particle is its own antiparticle then 2 is on and 3 off 
189 but, of course, for such particles it is much simpler and safer 
190 to use only 1 and 0.<br/>
191 The 2 and 3 options can be used e.g. to encode CP violation in 
192 B decays, or to let the <i>W</i>'s in a <i>q qbar -> W^+ W^-</i> 
193 process decay in different channels. </li>
194
195 <li><code>bRatio</code>: the branching ratio of the channel.</li>
196
197 <li><code>meMode</code>: the mode of processing this channel, possibly 
198 with matrix elements; see the 
199 <?php $filepath = $_GET["filepath"];
200 echo "<a href='ParticleDecays.php?filepath=".$filepath."' target='page'>";?>particle decays</a> description</li>
201 for the list of possibilities.
202
203 <li><code>multiplicity</code>: the number of decay products of the 
204 channel. Can be at most 8.</li>
205
206 <li><code>product(i)</code>: the identity code of the decay products,
207 where <code>i</code> runs between <code>0</code> and 
208 <code>multiplicity - 1</code>. Trailing positions are filled with 0.
209 </li>
210
211 </ul>
212
213 <h3>Operation</h3>
214
215 The normal flow of the particle data operations is:
216
217 <ol>
218
219 <li>
220 When a <code>Pythia</code> object <code>pythia</code> is created, the 
221 <code>pythia.particleData</code> member is asked to scan the 
222 <code>ParticleData.xml</code> file.
223
224 <p/>
225 All lines beginning with <code>&lt;particle</code> are scanned for 
226 information on a particle species, and all lines beginning with 
227 <code>&lt;channel</code> are assumed to contain a decay channel of the 
228 enclosing particle. In both cases XML syntax is used, with attributes
229 used to identify the stored properties, and with omitted properties
230 defaulting back to 0 where meaningful. The particle and channel 
231 information may be split over several lines, up to the &gt; endtoken. 
232 The format of a <code>&lt;particle</code> tag is:
233 <pre>
234     &lt;particle id="..." name="..." antiName="..." spinType="..." chargeType="..." colType="..." 
235        m0="..." mWidth="..." mMin="..." mMax="..." tau0="..."&gt;
236     &lt;/particle&gt;
237 </pre>
238 where the fields are the properties already introduced above.
239 Note that <code>isResonance</code>, <code>mayDecay</code>, 
240 <code>doExternalDecay</code>, <code>isVisible</code> and
241 <code>doForceWidth</code> are not set here, but are provided with 
242 default values by the rules described above. Once initialized, also 
243 these latter properties can be changed, see below.<br/> 
244
245 The format of  a <code>&lt;channel></code> tag is:
246 <pre>
247     &lt;channel onMode="..." bRatio="..." meMode="..." products="..." /&gt;
248 </pre>
249 again see properties above. The products are given as a blank-separated 
250 list of <code>id</code> codes.  
251 <br/><b>Important</b>: the values in the <code>.xml</code> file should not 
252 be changed, except by the PYTHIA authors. Any changes should be done 
253 with the help of the methods described below.
254 </li> 
255
256 <li> <p/>
257 Between the creation of the <code>Pythia</code> object and the 
258 <code>init</code> call for it, you may use the methods of the 
259 <code>ParticleData</code> class to modify some of the default values. 
260 Several different approaches can be chosen for this.
261
262 <p/> 
263 a) Inside your main program you can directly set values with
264 <pre>
265     pythia.readString(string);
266 </pre>
267 where both the variable name and the value are contained inside
268 the character string, separated by blanks and/or a =, e.g. 
269 <pre>
270     pythia.readString("111:mayDecay = off"); 
271 </pre>
272 switches off the decays of the <i>pi^0</i>.<br/>    
273
274 The particle id (> 0) and the property to be changed must be given, 
275 separated by a colon.<br/> 
276
277 The allowed properties are: <code>name</code>, <code>antiName</code>, 
278 <code>spinType</code>, <code>chargeType</code>, <code>colType</code>, 
279 <code>m0</code>, <code>mWidth</code>, <code>mMin</code>, 
280 <code>mMax</code>, <code>tau0</code>, <code>isResonance</code>,
281 <code>mayDecay</code>, <code>doExternalDecay</code>,
282 <code>isVisible</code> and <code>doForceWidth</code>. All of these 
283 names are case-insensitive. Names that do not match an existing 
284 variable are ignored.<br/> 
285
286 Strings beginning with a non-alphanumeric character, like # or !, 
287 are assumed to be comments and are not processed at all. For 
288 <code>bool</code> values, the following notation may be used 
289 interchangeably: <code>true = on = yes = ok = 1</code>, while everything 
290 else gives <code>false</code> (including but not limited to 
291 <code>false</code>, <code>off</code>, <code>no</code> and 
292 <code>0</code>).
293
294 <p/>
295 Particle data often comes in sets of closely related information.
296 Therefore some properties expect the value to consist of several
297 numbers. These can then be separated by blanks (or by commas). 
298 A simple example is <code>names</code>, which expects both the 
299 name and antiname to be given. A more interesting one is the 
300 <code>all</code> property,
301 <pre>  
302     id:all = name antiName spinType chargeType colType m0 mWidth mMin mMax tau0
303 </pre>
304 where all the current information on the particle itself is replaced, 
305 but any decay channels are kept unchanged. Using <code>new</code> instead 
306 of <code>all</code> also removes any previous decay channels.   
307 If the string contains fewer fields than expected the trailing
308 properties are set to vanish ("void", 0 or 0.). Note that such a 
309 truncated string should not be followed by a comment, since this 
310 comment would then be read in as if it contained the missing properties.  
311 The truncation can be done anywhere, specifically a string with only 
312 <code>id:new</code> defines a new "empty" particle.
313 As before, <code>isResonance</code>, <code>mayDecay</code>,
314 <code>doExternalDecay</code>, <code>isVisible</code> and 
315 <code>doForceWidth</code> are (re)set to their default values, and 
316 would have to be changed separately if required.
317
318 <p/>
319 A further command is <code>rescaleBR</code>, which rescales each of the
320 existing branching ratios with a common factor, such that their new
321 sum is the provided value. This may be a first step towards adding 
322 new decay channels, see further below. 
323
324 <p/>
325 Alternatively the <code>id</code> code may be followed by another integer, 
326 which then gives the decay channel number. This then has to be 
327 followed by the property specific to this channel, either 
328 <code>onMode</code>, <code>bRatio</code>, <code>meMode</code> or 
329 <code>products</code>. In the latter case all the products of 
330 the channel should be given:
331 <pre>
332     id:channel:products =  product1 product2 ....  
333 </pre>
334 The line will be scanned until the end of the line, or until a
335 non-number word is encountered, or until the maximum allowed number
336 of eight products is encountered, whichever happens first. (Thus the 
337 multiplicity of a decay channel need not be input; it is automatically 
338 calculated from the products list.) It is also possible to replace all 
339 the properties of a channel in a similar way:
340 <pre>
341     id:channel:all = onMode bRatio meMode product1 product2 ....  
342 </pre>
343 To add a new channel at the end, use
344 <pre>
345     id:addChannel = onMode bRatio meMode product1 product2 ....
346 </pre>
347
348 <p/>
349 It is currently not possible to remove a channel selectively, but 
350 setting its branching ratio vanishing is as effective. If you want to
351 remove all existing channels and force decays into one new channel
352 you can use
353 <pre>
354     id:oneChannel = onMode bRatio meMode product1 product2 ....
355 </pre>
356  A first <code>oneChannel</code> command could be followed by
357 several subsequent <code>addChannel</code> ones, to build
358 up a completely new decay table for an existing particle.
359
360 <p/>
361 When adding new channels or changing branching ratios in general,
362 note that, once a particle is to be decayed, the sum of branching 
363 ratios is always rescaled to unity. Beforehand, <code>rescaleBR</code> 
364 may be used to rescale an existing branching ratio by the given factor.
365
366 <p/>
367 There are a few commands that will study all the decay channels of the
368 given particle, to switch them on or off as desired. The 
369 <pre>
370     id:onMode = onMode
371 </pre> 
372 will set the <code>onMode</code> property of all channels to the 
373 desired value. The 
374 <pre> 
375     id:offIfAny   = product1 product2 .... 
376     id:onIfAny    = product1 product2 .... 
377     id:onPosIfAny = product1 product2 .... 
378     id:onNegIfAny = product1 product2 .... 
379 </pre>
380 will set the <code>onMode</code> 0, 1, 2 or 3, respectively, for all 
381 channels which contain any of the enumerated products, where the matching 
382 to these products is done without distinction of particles and 
383 antiparticles. Note that "<code>Pos</code>" and "<code>Neg</code>" 
384 are slightly misleading since it refers to the particle and antiparticle 
385 of the <code>id</code> species rather than charge, but should still be 
386 simpler to remember and understand than alternative notations. 
387 Correspondingly
388 <pre> 
389     id:offIfAll   = product1 product2 .... 
390     id:onIfAll    = product1 product2 .... 
391     id:onPosIfAll = product1 product2 .... 
392     id:onNegIfAll = product1 product2 .... 
393 </pre>
394 will set the <code>onMode</code> 0, 1, 2 or 3, respectively, for all 
395 channels which contain all of the enumerated products, again without 
396 distinction of particles and antiparticles. If the same product appears 
397 twice in the list it must also appear twice in the decay channel, and 
398 so on. The decay channel is allowed to contain further particles, 
399 beyond the product list. By contrast,
400 <pre> 
401     id:offIfMatch   = product1 product2 .... 
402     id:onIfMatch    = product1 product2 .... 
403     id:onPosIfMatch = product1 product2 .... 
404     id:onPosIfMatch = product1 product2 .... 
405 </pre>
406 requires the decay-channel multiplicity to agree with that of the product
407 list, but otherwise works as the <code>onIfAll/offIfAll</code> methods.
408
409 <p/>
410 Note that the action of several of the commands depends on the order
411 in which they are executed, as one would logically expect. For instance, 
412 <code>id:oneChannel</code> removes all decay channels of <code>id</code>
413 and thus all previous changes in this decay table, while subsequent
414 additions or changes would still take effect. Another example would be that
415 <code>23:onMode = off</code> followed by <code>23:onIfAny = 1 2 3 4 5</code>
416 would let the <i>Z^0</i> decay to quarks, while no decays would be
417 allowed if the order were to be reversed.   
418
419 <p/> 
420 b) The <code>Pythia</code> <code>readString(string)</code> method actually 
421 does not do changes itself, but sends on the string either to the
422 <code>ParticleData</code> class or to the <code>Settings</code> one,
423 depending on whether the string begins with a digit or a letter. 
424 If desired, it is possible to communicate directly with the corresponding 
425 <code>ParticleData</code> method:
426 <pre>
427     pythia.particleData.readString("111:mayDecay = off"); 
428     pythia.particleData.readString("15:2:products = 16 -211"); 
429 </pre>
430 In this case, changes intended for <code>Settings</code> would not be 
431 understood.
432
433 <p/>
434 c) Underlying this are commands for all the individual properties in  
435 the <code>ParticleData</code> class, one for each. These are 
436 further described below. Thus, an example now reads 
437 <pre>
438     pythia.particleData.mayDecay(111, false);
439 </pre>
440 Boolean values should here be given as <code>true</code> or 
441 <code>false</code>. 
442
443 <p/>
444 d) A simpler and more useful way is to collect all your changes
445 in a separate file, with one line per change, e.g. 
446 <pre>
447     111:mayDecay = off
448 </pre>
449 The file can be read by the 
450 <pre>
451     pythia.readFile(fileName); 
452 </pre>
453 method, where <code>fileName</code> is a string, e.g.
454 <code>pythia.readFile("main.cmnd")</code> (or an <code>istream</code> 
455 instead of a <code>fileName</code>). Each line is processed as 
456 described for the string in 2a). This file can freely mix commands to 
457 the <code>Settings</code> and <code>ParticleData</code> classes. 
458 </li> 
459
460 <li> <p/>
461 A routine <code>reInit(fileName)</code> is provided, and can be used to 
462 zero the particle data table and reinitialize it from scratch.
463 Such a call might be useful if several subruns are to be made with 
464 widely different particle data - normally the maps are only built 
465 from scratch once, namely when the <code>Pythia()</code> object is 
466 created. Also, there is no other possibility to restore the default 
467 values, unlike for the settings.
468 </li> 
469
470 <li> <p/>
471 You may at any time obtain a listing of all the particle data by calling
472 <pre>
473     pythia.particleData.listAll();
474 </pre>
475 The listing is by increasing <code>id</code> number. It shows the basic 
476 quantities introduced above. Some are abbreviated in the header to fit on
477 the lines: <code>spn = spinType</code>, <code>chg = chargeType</code>, 
478 <code>col = colType</code>, <code>res = isResonance</code>, 
479 <code>dec = mayDecay && canDecay</code> (the latter checks that decay 
480 channels have been defined), <code>ext = doExternalDecay</code>,
481 <code>vis = isVisible</code> and <code>wid = doForceWidth</code>.<br/>
482
483 To list only those particles that were changed (one way or another, the 
484 listing will not tell what property or decay channel was changed), instead use
485 <pre>
486     pythia.particleData.listChanged();
487 </pre>
488 (This info is based on a further <code>hasChanged</code> flag of a particle
489 or a channel, set <code>true</code> whenever any of the changing methods are 
490 used. It is possible to manipulate this value, but this is not recommended.) 
491 By default the internal initialization of the widths of resonances such as 
492 <i>gamma^*/Z^0, W^+-, t/tbar, H^0</i> do not count as changes; if you want
493 to list also those changes instead call <code>listChanged(true)</code>.
494 <br/>
495
496 To list only one particle, give its <code>id</code> code as argument to
497 the <code>list(...)</code> function.. To list a restricted set of particles, 
498 give in their <code>id</code> codes to <code>list(...)</code> as a 
499 <code>vector&lt;int></code>.
500 </li> 
501
502 <li> <p/>
503 For wholesale changes of particle properties all available data can be 
504 written out, edited, and then read back in again. These methods are
505 mainly intended for expert users. You can choose between two alternative
506 syntaxes.
507
508 <p/>
509 a) XML syntax, using the <code>&lt;particle</code> and 
510 <code>&lt;channel</code> lines already described. You use the method
511 <code>particleData.listXML(fileName)</code> to produce such an XML
512 file and <code>particleData.readXML(fileName)</code> to read it back
513 in after editing.
514
515 <p/>
516 b) Fixed/free format, using exactly the same information as illustrated
517 for the <code>&lt;particle</code> and <code>&lt;channel</code> lines
518 above, but now without any tags. This means that all information fields
519 must be provided (if there is no antiparticle then write 
520 <code>void</code>), in the correct order (while the order is irrelevant 
521 with XML syntax), and all on one line. Information is written out in 
522 properly lined-up columns, but the reading is done using free format, 
523 so fields need only be separated by at least one blank. Each new particle 
524 is supposed to be separated by (at least) one blank line, whereas no
525 blank lines are allowed between the particle line and the subsequent 
526 decay channel lines, if any.  You use the method
527 <code>particleData.listFF(fileName)</code> to produce such a fixed/free
528 file and <code>particleData.readFF(fileName)</code> to read it back
529 in after editing.
530
531 <p/>
532 As an alternative to the <code>readXML</code> and <code>readFF</code> 
533 methods you can also use the 
534 <code>particleData.reInit(fileName, xmlFormat)</code> method, where
535 <code>xmlFormat = true</code> (default) corresponds to reading an XML
536 file and <code>xmlFormat = false</code> to a fixed/free format one.
537
538 <p/>
539 To check that the new particle and decay tables makes sense, you can use 
540 the <code>particleData.checkTable()</code> method, either directly or by 
541 switching it on among the standard 
542 <?php $filepath = $_GET["filepath"];
543 echo "<a href='ErrorChecks.php?filepath=".$filepath."' target='page'>";?>error checks</a>. 
544 </li>
545
546 </ol>
547
548 <h2>The public methods</h2>
549
550 In the following we present briefly the public methods in the three 
551 classes used to build up the particle database. The order
552 is top-down, i.e from the full table of all particles to a single
553 particle to a single channel.
554 Note that these methods usually are less elegant and safe than the 
555 input methods outlined above. If you use any of these methods, it is
556 likely to be the ones in the full database, i.e. the first ones to be
557 covered in the following.
558
559 <p/>
560 For convenience, we have grouped related input and output methods
561 together. It should be obvious from the context which is which:
562 the input is of type <code>void</code> and has an extra last argument, 
563 namely is the input value, while the output method returns a
564 quantity of the expected type.
565
566 <h3>The ParticleData methods</h3>
567
568 <a name="method1"></a>
569 <p/><strong>ParticleData::ParticleData() &nbsp;</strong> <br/>
570 the constructor has no arguments and does not do anything. Internal.
571   
572
573 <a name="method2"></a>
574 <p/><strong>void ParticleData::initPtr(Info* infoPtr,Settings* settingsPtrIn, Rndm* rndmPtrIn, CoupSM* coupSMPtrIn) &nbsp;</strong> <br/>
575 initialize pointers to a few other classes. Internal.
576   
577
578 <a name="method3"></a>
579 <p/><strong>bool ParticleData::init(string startFile = &quot;../xmldoc/ParticleData.xml&quot;) &nbsp;</strong> <br/>
580 read in an XML-style file with particle data and initialize the
581 particle data tables accordingly. This command is executed
582 in the <code>Pythia</code> constructor, i.e. is mainly for
583 internal use.
584 <br/><code>argument</code><strong> startFile </strong> (<code>default = <strong>../xmldoc/ParticleData.xml</strong></code>) :  
585 the name of the data file to be read. When called from the 
586 <code>Pythia</code> constructor the directory is provided by the 
587 <code><?php $filepath = $_GET["filepath"];
588 echo "<a href='ProgramFlow.php?filepath=".$filepath."' target='page'>";?>PYTHIA8DATA</a></code> 
589 environment variable, if set, else by the argument of this constructor,
590 which has the default value &quot;../xmldoc&quot;. 
591     
592   
593
594 <a name="method4"></a>
595 <p/><strong>bool ParticleData::reInit(string startFile,bool xmlFormat = true) &nbsp;</strong> <br/>
596 overwrite the existing database by reading from the specified file.
597 Unlike <code>init</code> above this method is not called by the 
598 <code>Pythia</code> constructor, but is entirely intended for users
599 who want to replace the existing particle data with their own.
600 <br/><code>argument</code><strong> startFile </strong>  : the path and name of file to be read. 
601     
602 <br/><code>argument</code><strong> xmlFormat </strong>  : if true read the same kind of XML-style file
603 as used by <code>init</code>, if not use an alternative "free format" 
604 file (i.e. without any XML tags, but with well-defined rules 
605 specifying in which order properties are stored). 
606     
607   
608
609 <a name="method5"></a>
610 <p/><strong>void ParticleData::initWidths(vector&lt;ResonanceWidths*&gt; resonancePtrs) &nbsp;</strong> <br/>
611 initialize Breit-Wigner shape parameters for all particles,
612 and the detailed handling of resonances, i.e. particles with 
613 perturbatively calculable partial widths, which can be used to
614 obtain a mass-dependent Breit-Wigner and a dynamic choice of
615 decay channels. Called from <code>Pythia::init()</code>.
616   
617
618 <a name="method6"></a>
619 <p/><strong>bool ParticleData::readXML(string inFile, bool reset = true) &nbsp;</strong> <br/>
620   
621 <strong>void ParticleData::listXML(string outFile) &nbsp;</strong> <br/>
622 read in XML-style data from a file or write it out to a file. For the 
623 former one can also decide whether to reset all particles to scratch,
624 or only overwrite those particles in the file. The former method is 
625 used by <code>init</code> and <code>reInit</code> above.
626   
627
628 <a name="method7"></a>
629 <p/><strong>bool ParticleData::readFF(string inFile, bool reset = true) &nbsp;</strong> <br/>
630   
631 <strong>void ParticleData::listFF(string outFile) &nbsp;</strong> <br/>
632 read in free-format-style data from a file or write it out to a file. 
633 For the former one can also decide whether to reset all particles to 
634 scratch, or only overwrite those particles in the file. The former 
635 method is used by <code>reInit</code> above.
636   
637
638 <a name="method8"></a>
639 <p/><strong>bool ParticleData::readString(string line, bool warn = true, ostream& os = cout) &nbsp;</strong> <br/>
640 read in a string and interpret is as a new or changed particle data.
641 The possibilities are extensively described above. It is normally 
642 used indirectly, via <code>Pythia::readString(...)</code> and
643 <code>Pythia::readFile(...)</code>.
644 <br/><code>argument</code><strong> line </strong>  : 
645 the string to be interpreted as an instruction.
646   
647 <br/><code>argument</code><strong> warn </strong> (<code>default = <strong>true</strong></code>) : 
648 write a warning message or not whenever the instruction does not make
649 sense, e.g. if the particle does not exist in the database.
650   
651 <br/><code>argument</code><strong> os </strong> (<code>default = <strong>cout</strong></code>) : 
652 stream for error printout.  
653   
654 <br/><b>Note:</b> the method returns false if it fails to 
655 make sense out of the input string.
656   
657
658 <a name="method9"></a>
659 <p/><strong>void ParticleData::listAll(ostream& os = cout) &nbsp;</strong> <br/>
660   
661 <strong>void ParticleData::listChanged(ostream& os = cout) &nbsp;</strong> <br/>
662   
663 <strong>void ParticleData::listChangedAndRes(ostream& os = cout) &nbsp;</strong> <br/>
664   
665 <strong>void ParticleData::list(bool changedOnly = false, bool changedRes = true, ostream& os = cout) &nbsp;</strong> <br/>
666 methods intended to present a listing of particle data in a readable
667 format. The first three are special cases of the fourth. The first
668 lists all particle data, the second only data for those particles that
669 were changed after the original creation of the particle data table.
670 Resonances are a special case since they can get their data changed 
671 by being linked to an object that does the calculation of branching
672 ratios. The second method does not count such resonances as changed,
673 whereas the third does and thus lists all resonances.
674   
675
676 <a name="method10"></a>
677 <p/><strong>void ParticleData::list(int idList, ostream& os = cout) &nbsp;</strong> <br/>
678   
679 <strong>void ParticleData::list(vector&lt;int&gt; idList, ostream& os = cout) &nbsp;</strong> <br/>
680 list particle data for one single particle, with the identity code as
681 input, or for a set of particles, with an input vector of identity codes. 
682   
683
684 <a name="method11"></a>
685 <p/><strong>void ParticleData::checkTable(ostream& os = cout) &nbsp;</strong> <br/>
686   
687 <strong>void ParticleData::checkTable(int verbosity,ostream& os = cout) &nbsp;</strong> <br/>
688 check that the particle decay table makes sense, especially for decays.
689 <br/><code>argument</code><strong> verbosity </strong>  :  level of checks. 0 is only mininal,
690 e.g. if a particle has no open decay channels. 1, which is the level
691 of the first method, provides warning if any individual channel is 
692 closed, except for resonances. 2 also prints the 
693 branching-ratio-averaged threshold mass. 11 and 12 are like 1 and 2,
694 but also include resonances in the detailed checks.  
695   
696   
697
698 <a name="method12"></a>
699 <p/><strong>void ParticleData::addParticle(int id, string name = &quot; &quot;, int spinType = 0, int chargeType = 0, int colType = 0, double m0 = 0., double mWidth = 0., double mMin = 0., double mMax = 0., double tau0 = 0.) &nbsp;</strong> <br/>
700   
701 <strong>void ParticleData::addParticle(int id, string name, string antiName, int spinType = 0, int chargeType = 0, int colType = 0, double m0 = 0., double mWidth = 0., double mMin = 0., double mMax = 0., double tau0 = 0.) &nbsp;</strong> <br/>
702 add a particle to the decay table; in the first form a partcle which is 
703 its own antiparticle, in the second where a separate antiparticle exists.
704   
705
706 <a name="method13"></a>
707 <p/><strong>void ParticleData::setAll(int id, string name, string antiName, int spinType = 0, int chargeType = 0, int colType = 0, double m0 = 0., double mWidth = 0., double mMin = 0., double mMax = 0.,double tau0 = 0.) &nbsp;</strong> <br/>
708 change all the properties of the particle associated with a given
709 identity code.
710   
711
712 <a name="method14"></a>
713 <p/><strong>bool ParticleData::isParticle(int id) &nbsp;</strong> <br/>
714 query whether the particle data table contains the particle of the 
715 identity code.
716   
717
718 <a name="method15"></a>
719 <p/><strong>int ParticleData::nextId(int id) &nbsp;</strong> <br/>
720 return the identity code of the sequentially next particle stored in table.
721   
722
723 <a name="method16"></a>
724 <p/><strong>bool ParticleData::hasAnti(int id) &nbsp;</strong> <br/>
725 bool whether a distinct antiparticle exists or not. Is true if an
726 antiparticle name has been set (and is different from 
727 <code>void</code>).
728   
729
730 <a name="method17"></a>
731 <p/><strong>void ParticleData::name(int id, string name) &nbsp;</strong> <br/>
732   
733 <strong>void ParticleData::antiName(int id, string antiName) &nbsp;</strong> <br/>
734   
735 <strong>void ParticleData::names(int id, string name, string antiName) &nbsp;</strong> <br/>
736   
737 <<strong>string ParticleData::name(int id) &nbsp;</strong> <br/>
738 particle and antiparticle names are stored separately, the sign of 
739 <code>id</code> determines which of the two is returned, with 
740 <code>void</code> used to indicate the absence of an antiparticle. 
741   
742
743 <a name="method18"></a>
744 <p/><strong>void ParticleData::spinType(int id, int spinType) &nbsp;</strong> <br/>
745   
746 <strong>int ParticleData::spinType(int id) &nbsp;</strong> <br/>
747 the spin type, of the form <i>2 s + 1</i>, with special code 0
748 for entries of unknown or indeterminate spin.
749   
750
751 <a name="method19"></a>
752 <p/><strong>void ParticleData::chargeType(int id, int chargeType) &nbsp;</strong> <br/>
753   
754 <strong>int ParticleData::chargeType(int id) &nbsp;</strong> <br/>
755 three times the charge (to make it an integer), taking into account
756 the sign of <code>id</code>.
757   
758
759 <a name="method20"></a>
760 <p/><strong>double ParticleData::charge(int id) &nbsp;</strong> <br/>
761 the electrical charge of a particle, equal to 
762 <code>chargeType(id)/3</code>.
763   
764
765 <a name="method21"></a>
766 <p/><strong>void ParticleData::colType(int id, int colType) &nbsp;</strong> <br/>
767   
768 <strong>int ParticleData::colType(int id) &nbsp;</strong> <br/>
769 the colour type, with 0 uncoloured, 1 triplet, -1 antitriplet and 2 
770 octet, taking into account the sign of <code>id</code>.
771   
772
773 <a name="method22"></a>
774 <p/><strong>void ParticleData::m0(int id, double m0) &nbsp;</strong> <br/>
775   
776 <strong>double ParticleData::m0(int id) &nbsp;</strong> <br/>
777 the nominal mass <i>m_0</i> (in GeV).
778   
779
780 <a name="method23"></a>
781 <p/><strong>void ParticleData::mWidth(int id, double mWidth) &nbsp;</strong> <br/>
782   
783 <strong>double ParticleData::mWidth(int id) &nbsp;</strong> <br/>
784 the width <i>Gamma</i> of the Breit-Wigner distribution (in GeV).
785   
786
787 <a name="method24"></a>
788 <p/><strong>void ParticleData::mMin(int id, double mMin) &nbsp;</strong> <br/>
789   
790 <strong>double ParticleData::mMin(int id) &nbsp;</strong> <br/>
791 the lower limit of the allowed mass range generated by the Breit-Wigner 
792 (in GeV). Has no meaning for particles without width, and would 
793 typically be 0 there.
794   
795
796 <a name="method25"></a>
797 <p/><strong>void ParticleData::mMax(int id, double mMax) &nbsp;</strong> <br/>
798   
799 <strong>double ParticleData::mMax(int id) &nbsp;</strong> <br/>
800 the upper limit of the allowed mass range generated by the Breit-Wigner 
801 (in GeV). If <i>mMax &lt; mMin</i> then no upper limit is imposed. 
802 Has no meaning for particles without width, and would typically 
803 be 0 there.
804   
805
806 <a name="method26"></a>
807 <p/><strong>double ParticleData::m0Min(int id) &nbsp;</strong> <br/>
808 similar to <code>mMin()</code> above, except that for particles with 
809 no width the <code>m0(id)</code> value is returned.
810   
811
812 <a name="method27"></a>
813 <p/><strong>double ParticleData::m0Max(int id) &nbsp;</strong> <br/>
814 similar to <code>mMax()</code> above, except that for particles with 
815 no width the <code>m0(id)</code> value is returned.
816   
817
818 <a name="method28"></a>
819 <p/><strong>void ParticleData::tau0(int id, double tau0) &nbsp;</strong> <br/>
820   
821 <strong>double ParticleData::tau0(int id) &nbsp;</strong> <br/>
822 the nominal proper lifetime <i>tau_0</i> (in mm/c).
823   
824
825 <a name="method29"></a>
826 <p/><strong>void ParticleData::isResonance(int id, bool isResonance) &nbsp;</strong> <br/>
827   
828 <strong>bool ParticleData::isResonance(int id) &nbsp;</strong> <br/>
829 a flag telling whether a particle species are considered as a resonance 
830 or not. Here <?php $filepath = $_GET["filepath"];
831 echo "<a href='ResonanceDecays.php?filepath=".$filepath."' target='page'>";?>"resonance"</a> 
832 is used as shorthand for any massive particle 
833 where the decay process should be counted as part of the hard process
834 itself, and thus be performed before showers and other event aspects 
835 are added. Restrictions on allowed decay channels is also directly
836 reflected in the cross section of simulated processes, while those of
837 normal hadrons and other light particles are not.
838 In practice, it is reserved for states above the <i>b bbar</i> 
839 bound systems in mass, i.e. for <i>W, Z, t</i>, Higgs states, 
840 supersymmetric states and (most?) other states in any new theory. 
841 All particles with <code>m0</code> above 20 GeV are by default
842 initialized to be considered as resonances. 
843   
844
845 <a name="method30"></a>
846 <p/><strong>void ParticleData::mayDecay(int id, bool mayDecay) &nbsp;</strong> <br/>
847   
848 <strong>bool ParticleData::mayDecay(int id) &nbsp;</strong> <br/>
849 a flag telling whether a particle species may decay or not, offering 
850 the main user switch. Whether a given particle of this kind then actually 
851 will decay also depends on it having allowed decay channels, and on
852 other flags for <?php $filepath = $_GET["filepath"];
853 echo "<a href='ParticleDecays.php?filepath=".$filepath."' target='page'>";?>particle decays</a>. 
854 All particles with <code>tau0</code> below 1000 mm are 
855 by default initialized to allow decays.
856   
857
858 <a name="method31"></a>
859 <p/><strong>void ParticleData::doExternalDecays(int id, bool doExternalDecays) &nbsp;</strong> <br/>
860   
861 <strong>bool ParticleData::doExternalDecay(int id) &nbsp;</strong> <br/>
862 a flag telling whether a particle should be handled by an external 
863 decay package or not, with the latter default. Can be manipulated as 
864 described on this page, but should normally not be. Instead the
865 <code><?php $filepath = $_GET["filepath"];
866 echo "<a href='ExternalDecays.php?filepath=".$filepath."' target='page'>";?>pythia.decayPtr</a></code> 
867 method should be provided with the list of relevant particles.
868   
869
870 <a name="method32"></a>
871 <p/><strong>void ParticleData::isVisible(int id, bool isVisible) &nbsp;</strong> <br/>
872   
873 <strong>bool ParticleData::isVisible(int id) &nbsp;</strong> <br/>
874 a flag telling whether a particle species is to be considered as
875 visible in a detector or not, as used e.g. in analysis routines.
876 By default this includes neutrinos and a few BSM particles
877 (gravitino, sneutrinos, neutralinos) that have neither strong nor
878 electromagnetic charge, and are not made up of constituents that
879 have it. The value of this flag is only relevant if a particle is
880 long-lived enough actually to make it to a detector.
881   
882
883 <a name="method33"></a>
884 <p/><strong>void ParticleData::doForceWidth(int id, bool doForceWidth) &nbsp;</strong> <br/>
885   
886 <strong>bool ParticleData::doForceWidth(int id) &nbsp;</strong> <br/>
887 a flag valid only for resonances where PYTHIA contains code to
888 calculate the width of the resonance from encoded matrix-element
889 expressions, i.e. the <i>Z^0</i>, <i>W^+-</i>, <i>t</i>, 
890 <i>h^0</i>, and a few more. The normal behaviour (<code>false</code>)
891 is then that the width is calculated from the mass, but it is 
892 possible to <?php $filepath = $_GET["filepath"];
893 echo "<a href='ResonanceDecays.php?filepath=".$filepath."' target='page'>";?>force</a> the resonance 
894 to retain the nominal width. Branching ratios and the running of the 
895 total width are unaffected.
896   
897
898 <a name="method34"></a>
899 <p/><strong>void ParticleData::hasChanged(int id, bool hasChanged) &nbsp;</strong> <br/>
900   
901 <strong>bool ParticleData::hasChanged(int id) &nbsp;</strong> <br/>
902 keep track of whether the data for a particle has been changed
903 in any respect between initialization and the current status.
904 Is used e.g. by the <code>listChanged</code> method to determine
905 which particles to list.
906   
907
908 <a name="method35"></a>
909 <p/><strong>bool ParticleData::useBreitWigner(int id) &nbsp;</strong> <br/>
910 tells whether a particle will have a Breit-Wigner mass distribution or 
911 not. Is determined by an internal logic based on the particle width and
912 on the value of the 
913 <code><?php $filepath = $_GET["filepath"];
914 echo "<a href='ParticleData.php?filepath=".$filepath."' target='page'>";?>ParticleData:modeBreitWigner</a></code> 
915 switch.
916   
917
918 <a name="method36"></a>
919 <p/><strong>double ParticleData::constituentMass(int id) &nbsp;</strong> <br/>
920 is the constituent mass for a quark, hardcoded as 
921 <i>m_u = m_d = 0.325</i>, <i>m_s = 0.50</i>, <i>m_c = 1.60</i> 
922 and <i>m_b = 5.0</i> GeV, for a diquark the sum of quark constituent 
923 masses, and for everything else the same as the ordinary mass.
924   
925
926 <a name="method37"></a>
927 <p/><strong>double ParticleData::mass(int id) &nbsp;</strong> <br/>
928 returns a mass distributed according to a truncated Breit-Wigner, 
929 with parameters as described here. Is equal to <code>m0(id)</code> for 
930 particles without width. 
931   
932
933 <a name="method38"></a>
934 <p/><strong>double ParticleData::mRun(int id, double mH) &nbsp;</strong> <br/>
935 calculate the running mass of species <code>id</code> when probed at a 
936 hard mass scale of <code>mH</code>. Only applied to obtain the 
937 running quark masses; for all other particle the normal fixed mass
938 is used.
939   
940
941 <a name="method39"></a>
942 <p/><strong>bool ParticleData::canDecay(int id) &nbsp;</strong> <br/>
943 true for a particle with at least one decay channel defined.
944   
945
946 <a name="method40"></a>
947 <p/><strong>bool ParticleData::isLepton(int id) &nbsp;</strong> <br/>
948 true for a lepton or an antilepton (including neutrinos).
949   
950
951 <a name="method41"></a>
952 <p/><strong>bool ParticleData::isQuark(int id) &nbsp;</strong> <br/>
953 true for a quark or an antiquark.
954   
955
956 <a name="method42"></a>
957 <p/><strong>bool ParticleData::isGluon(int id) &nbsp;</strong> <br/>
958 true for a gluon.
959   
960
961 <a name="method43"></a>
962 <p/><strong>bool ParticleData::isDiquark(int id) &nbsp;</strong> <br/>
963 true for a diquark or antidiquark.
964   
965
966 <a name="method44"></a>
967 <p/><strong>bool ParticleData::isHadron(int id) &nbsp;</strong> <br/>
968 true for a hadron (made up out of normal quarks and gluons, 
969 i.e. not for R-hadrons and other exotic states).
970   
971
972 <a name="method45"></a>
973 <p/><strong>bool ParticleData::isMeson(int id) &nbsp;</strong> <br/>
974 true for a meson.
975   
976
977 <a name="method46"></a>
978 <p/><strong>bool ParticleData::isBaryon(int id) &nbsp;</strong> <br/>
979 true for a baryon or antibaryon.
980   
981
982 <a name="method47"></a>
983 <p/><strong>bool ParticleData::isOctetHadron(int id) &nbsp;</strong> <br/>
984 true for an intermediate hadron-like state with a colour octet charge
985 as used in the colour octet model for 
986 <?php $filepath = $_GET["filepath"];
987 echo "<a href='OniaProcesses.php?filepath=".$filepath."' target='page'>";?>onia</a> production.
988   
989
990 <a name="method48"></a>
991 <p/><strong>int ParticleData::heaviestQuark(int id) &nbsp;</strong> <br/>
992 extracts the heaviest quark or antiquark, i.e. one with largest 
993 <code>id</code> number, for a hadron. 
994   
995
996 <a name="method49"></a>
997 <p/><strong>int ParticleData::baryonNumberType(int id) &nbsp;</strong> <br/>
998 is 1 for a quark, 2 for a diquark, 3 for a baryon, the same with a 
999 minus sign for antiparticles, and else zero.
1000   
1001
1002 <a name="method50"></a>
1003 <p/><strong>void ParticleData::rescaleBR(int id, double newSumBR = 1.) &nbsp;</strong> <br/>
1004 rescales all partial branching ratios by a common factor, such that 
1005 the sum afterward becomes <code>newSumBR</code>.
1006   
1007
1008 <a name="method51"></a>
1009 <p/><strong>void setResonancePtr(int id, ResonanceWidths* resonancePtr) &nbsp;</strong> <br/>
1010 set a pointer for a particle kind to a <code>ResonanceWidths</code> object. 
1011 This is done, from inside <code>ParticleData::initWidths</code>, only for 
1012 resonances, i.e. for particles such as <i>Z^0</i>, <i>W^+-</i>, top, 
1013 Higgs, and new unstable states beyond the Standard Model. The presence
1014 of such an object will allow a more dynamic calculation of partial and
1015 total widths, as illustrated by the following methods.
1016   
1017
1018 <a name="method52"></a>
1019 <p/><strong>void ParticleData::resInit(int id) &nbsp;</strong> <br/>
1020 initialize the treatment of a resonance.
1021   
1022
1023 <a name="method53"></a>
1024 <p/><strong>double ParticleData::resWidth(int id, double mHat, int idInFlav = 0, bool openOnly = false, bool setBR = false) &nbsp;</strong> <br/>
1025 calculate the total with for a resonance of a given current mass,
1026 optionally including coupling to incoming flavour state (consider
1027 the <i>gamma*/Z^0</i> combination), optionally excluding decay 
1028 channels that have been closed by the user, and optionally storing 
1029 the results in the normal decay table.
1030   
1031
1032 <a name="method54"></a>
1033 <p/><strong>double ParticleData::resWidthOpen(int id, double mHat, int idInFlav = 0) &nbsp;</strong> <br/>
1034 special case of <code>resWidth</code>, where only open channels are 
1035 included, but results are not stored in the normal decay table.
1036   
1037
1038 <a name="method55"></a>
1039 <p/><strong>double ParticleData::resWidthStore(int id, double mHat, int idInFlav = 0) &nbsp;</strong> <br/>
1040 special case of <code>resWidth</code>, where only open channels are 
1041 included, and results are stored in the normal decay table.
1042   
1043
1044 <a name="method56"></a>
1045 <p/><strong>double ParticleData::resOpenFrac(int id1, int id2 = 0, int id3 = 0) &nbsp;</strong> <br/>
1046 calculate the fraction of the full branching ratio that is left
1047 open by the user choice of allowed decay channels. Can be applied
1048 to a final state with up to three resonances. Since the procedure 
1049 is multiplicative, it would be easy to generalize also to more.
1050   
1051
1052 <a name="method57"></a>
1053 <p/><strong>double ParticleData::resWidthRescaleFactor(int id) &nbsp;</strong> <br/>
1054 the factor used to rescale all partial widths in case the total
1055 width is being forced to a specific value by the user.
1056   
1057
1058 <a name="method58"></a>
1059 <p/><strong>double ParticleData::resWidthChan(int id,double mHat, int idAbs1 = 0, int idAbs2 = 0) &nbsp;</strong> <br/>
1060 special case to calculate one final-state width; currently only used 
1061 for Higgs decay to <i>q qbar</i>, <i>g g</i> or 
1062 <i>gamma gamma</i>. 
1063   
1064
1065 <a name="method59"></a>
1066 <p/><strong>ParticleDataEntry* ParticleData::particleDataEntryPtr(int id) &nbsp;</strong> <br/>
1067 returns a pointer to the <code>ParticleDataEntry</code> object.
1068 The methods in the next section can then be used to manipulate
1069 this object. 
1070   
1071  
1072 <h3>The ParticleDataEntry methods</h3>
1073
1074 Most of the methods that can be applied to a single 
1075 <code>ParticleDataEntry</code> object are almost identical with
1076 those used above for the <code>ParticleData</code>, except
1077 that the <code>id</code> argument is no longer needed to find 
1078 the right entry in the table. By and large, this makes direct 
1079 access to the <code>ParticleDataEntry</code> methods superfluous.
1080 There are a few methods that are unique to each class, however. 
1081 Furthermore, to avoid some naming ambiguities, many methods that 
1082 set values begin with <code>set</code>. 
1083
1084 <a name="method60"></a>
1085 <p/><strong>ParticleDataEntry::ParticleDataEntry(int id = 0, string name = &quot; &quot;, int spinType = 0, int chargeType = 0, int colType = 0, double m0 = 0., double mWidth = 0., double mMin = 0., double mMax = 0., double tau0 = 0.) &nbsp;</strong> <br/>
1086   
1087 <strong>ParticleDataEntry::ParticleDataEntry(int id, string name, string antiName, int spinType = 0, int chargeType = 0, int colType = 0, double m0 = 0., double mWidth = 0., double mMin = 0., double mMax = 0., double tau0 = 0.) &nbsp;</strong> <br/>
1088 there are two alternative constructors, that both expect the
1089 properties of a particle as input. The first assumes that there
1090 is only one particle, thet latter that there is a 
1091 particle-antiparticle pair (but if the antiparticle name is
1092 <code>void</code> one reverts back to the particle-only case).
1093   
1094
1095 <a name="method61"></a>
1096 <p/><strong>ParticleDataEntry::~ParticleDataEntry &nbsp;</strong> <br/>
1097 the destructor is needed to delete any <code>ResonanceWidths</code>
1098 objects that have been created and linked to the respective particle.
1099   
1100
1101 <a name="method62"></a>
1102 <p/><strong>void ParticleDataEntry::setDefaults() &nbsp;</strong> <br/>
1103 initialize some particle flags with default values, e.g. whether 
1104 a particle is a resonance, may decay, or is visible. Is called from the
1105 constructors and from <code>setAll</code>.
1106   
1107
1108 <a name="method63"></a>
1109 <p/><strong>void ParticleDataEntry::initPtr(ParticleData* particleDataPtrIn) &nbsp;</strong> <br/>
1110 initialize pointer back to the whole database (so that masses of 
1111 decay products can be accessed, e.g.).
1112   
1113
1114 <a name="method64"></a>
1115 <p/><strong>void ParticleDataEntry::setAll( string name, string antiName, int spinType = 0, int chargeType = 0, int colType = 0, double m0 = 0., double mWidth = 0., double mMin = 0., double mMax = 0.,double tau0 = 0.) &nbsp;</strong> <br/>
1116 change all the properties of the particle associated with a given
1117 identity code.
1118   
1119
1120 <a name="method65"></a>
1121 <p/><strong>int ParticleDataEntry::id() &nbsp;</strong> <br/>
1122 the PDG identity code.
1123   
1124
1125 <a name="method66"></a>
1126 <p/><strong>bool ParticleDataEntry::hasAnti() &nbsp;</strong> <br/>
1127 tell whether a separate antiparticle exists.
1128   
1129
1130 <a name="method67"></a>
1131 <p/><strong>void ParticleDataEntry::setName(string name) &nbsp;</strong> <br/>
1132   
1133 <strong>void ParticleDataEntry::setAntiName(string antiName) &nbsp;</strong> <br/>
1134   
1135 <strong>void ParticleDataEntry::setNames(string name,string antiName) &nbsp;</strong> <br/>
1136   
1137 <strong>string ParticleDataEntry::name(int id = 1) &nbsp;</strong> <br/>
1138 set or get the particle or antiparticle name. Only the sign of 
1139 <code>id</code> is needed to distinguish particle/antiparticle. 
1140   
1141
1142 <a name="method68"></a>
1143 <p/><strong>void ParticleDataEntry::setSpinType(int spinType) &nbsp;</strong> <br/>
1144   
1145 <strong>int ParticleDataEntry::spinType() &nbsp;</strong> <br/>
1146 set or get the particle spin type, i.e. <i>2 s + 1</i>, or 0 in some
1147 special cases.
1148   
1149
1150 <a name="method69"></a>
1151 <p/><strong>void ParticleDataEntry::setChargeType(int chargeType) &nbsp;</strong> <br/>
1152   
1153 <strong>int ParticleDataEntry::chargeType(int id = 1) &nbsp;</strong> <br/>
1154   
1155 <strong>double ParticleDataEntry::charge(int id = 1) &nbsp;</strong> <br/>
1156 set or get the particle charge type, i.e. three times the charge, 
1157 or the charge itself. Only the sign of <code>id</code> is needed 
1158 to distinguish particle/antiparticle. 
1159   
1160
1161 <a name="method70"></a>
1162 <p/><strong>void ParticleDataEntry::setColType(int colType) &nbsp;</strong> <br/>
1163   
1164 <strong>int ParticleDataEntry::colType(int id = 1) &nbsp;</strong> <br/>
1165 set or get the particle colour type, 0 for singlet, 1 for triplet,
1166 -1 for antitriplet, 2 for octet. Only the sign of <code>id</code> 
1167 is needed to distinguish particle/antiparticle.  
1168   
1169
1170 <a name="method71"></a>
1171 <p/><strong>void ParticleDataEntry::setM0(double m0) &nbsp;</strong> <br/>
1172   
1173 <strong>double ParticleDataEntry::m0() &nbsp;</strong> <br/>
1174 the nominal mass <i>m_0</i> (in GeV).
1175   
1176
1177 <a name="method72"></a>
1178 <p/><strong>void ParticleDataEntry::setMWidth(double mWidth) &nbsp;</strong> <br/>
1179   
1180 <strong>double ParticleDataEntry::mWidth() &nbsp;</strong> <br/>
1181 the width <i>Gamma</i> of the Breit-Wigner distribution (in GeV).
1182   
1183
1184 <a name="method73"></a>
1185 <p/><strong>void ParticleDataEntry::setMMin(double mMin) &nbsp;</strong> <br/>
1186   
1187 <strong>double ParticleDataEntry::mMin() &nbsp;</strong> <br/>
1188 the lower limit of the allowed mass range generated by the Breit-Wigner 
1189 (in GeV). Has no meaning for particles without width, and would 
1190 typically be 0 there.
1191   
1192
1193 <a name="method74"></a>
1194 <p/><strong>void ParticleDataEntry::setMMax(double mMax) &nbsp;</strong> <br/>
1195   
1196 <strong>double ParticleDataEntry::mMax() &nbsp;</strong> <br/>
1197 the upper limit of the allowed mass range generated by the Breit-Wigner 
1198 (in GeV). If <i>mMax &lt; mMin</i> then no upper limit is imposed. 
1199 Has no meaning for particles without width, and would typically 
1200 be 0 there.
1201   
1202
1203 <a name="method75"></a>
1204 <p/><strong>double ParticleDataEntry::m0Min() &nbsp;</strong> <br/>
1205 similar to <code>mMin()</code> above, except that for particles with 
1206 no width the <code>m0(id)</code> value is returned.
1207   
1208
1209 <a name="method76"></a>
1210 <p/><strong>double ParticleDataEntry::m0Max() &nbsp;</strong> <br/>
1211 similar to <code>mMax()</code> above, except that for particles with 
1212 no width the <code>m0(id)</code> value is returned.
1213   
1214
1215 <a name="method77"></a>
1216 <p/><strong>void ParticleDataEntry::setTau0(double tau0) &nbsp;</strong> <br/>
1217   
1218 <strong>double ParticleDataEntry::tau0() &nbsp;</strong> <br/>
1219 the nominal proper lifetime <i>tau_0</i> (in mm/c).
1220   
1221
1222 <a name="method78"></a>
1223 <p/><strong>void ParticleDataEntry::setIsResonance(bool isResonance) &nbsp;</strong> <br/>
1224   
1225 <strong>bool ParticleDataEntry::isResonance() &nbsp;</strong> <br/>
1226 a flag telling whether a particle species are considered as a resonance 
1227 or not. Here <?php $filepath = $_GET["filepath"];
1228 echo "<a href='ResonanceDecays.php?filepath=".$filepath."' target='page'>";?>"resonance"</a> 
1229 is used as shorthand for any massive particle 
1230 where the decay process should be counted as part of the hard process
1231 itself, and thus be performed before showers and other event aspects 
1232 are added. Restrictions on allowed decay channels is also directly
1233 reflected in the cross section of simulated processes, while those of
1234 normal hadrons and other light particles are not.
1235 In practice, it is reserved for states above the <i>b bbar</i> 
1236 bound systems in mass, i.e. for <i>W, Z, t</i>, Higgs states, 
1237 supersymmetric states and (most?) other states in any new theory. 
1238 All particles with <code>m0</code> above 20 GeV are by default
1239 initialized to be considered as resonances. 
1240   
1241
1242 <a name="method79"></a>
1243 <p/><strong>void ParticleDataEntry::setMayDecay(bool mayDecay) &nbsp;</strong> <br/>
1244   
1245 <strong>bool ParticleDataEntry::mayDecay() &nbsp;</strong> <br/>
1246 a flag telling whether a particle species may decay or not, offering 
1247 the main user switch. Whether a given particle of this kind then actually 
1248 will decay also depends on it having allowed decay channels, and on
1249 other flags for <?php $filepath = $_GET["filepath"];
1250 echo "<a href='ParticleDecays.php?filepath=".$filepath."' target='page'>";?>particle decays</a>. 
1251 All particles with <code>tau0</code> below 1000 mm are 
1252 by default initialized to allow decays.
1253   
1254
1255 <a name="method80"></a>
1256 <p/><strong>void ParticleDataEntry::setDoExternalDecays(bool doExternalDecays) &nbsp;</strong> <br/>
1257   
1258 <strong>bool ParticleDataEntry::doExternalDecay() &nbsp;</strong> <br/>
1259 a flag telling whether a particle should be handled by an external 
1260 decay package or not, with the latter default. Can be manipulated as 
1261 described on this page, but should normally not be. Instead the
1262 <code><?php $filepath = $_GET["filepath"];
1263 echo "<a href='ExternalDecays.php?filepath=".$filepath."' target='page'>";?>pythia.decayPtr</a></code> 
1264 method should be provided with the list of relevant particles.
1265   
1266
1267 <a name="method81"></a>
1268 <p/><strong>void ParticleDataEntry::setIsVisible(bool isVisible) &nbsp;</strong> <br/>
1269   
1270 <strong>bool ParticleDataEntry::isVisible() &nbsp;</strong> <br/>
1271 a flag telling whether a particle species is to be considered as
1272 visible in a detector or not, as used e.g. in analysis routines.
1273 By default this includes neutrinos and a few BSM particles
1274 (gravitino, sneutrinos, neutralinos) that have neither strong nor
1275 electromagnetic charge, and are not made up of constituents that
1276 have it. The value of this flag is only relevant if a particle is
1277 long-lived enough actually to make it to a detector.
1278   
1279
1280 <a name="method82"></a>
1281 <p/><strong>void ParticleDataEntry::setDoForceWidth(bool doForceWidth) &nbsp;</strong> <br/>
1282   
1283 <strong>bool ParticleDataEntry::doForceWidth() &nbsp;</strong> <br/>
1284 a flag valid only for resonances where PYTHIA contains code to
1285 calculate the width of the resonance from encoded matrix-element
1286 expressions, i.e. the <i>Z^0</i>, <i>W^+-</i>, <i>t</i>, 
1287 <i>h^0</i>, and a few more. The normal behaviour (<code>false</code>)
1288 is then that the width is calculated from the mass, but it is 
1289 possible to <?php $filepath = $_GET["filepath"];
1290 echo "<a href='ResonanceDecays.php?filepath=".$filepath."' target='page'>";?>force</a> the resonance 
1291 to retain the nominal width. Branching ratios and the running of the 
1292 total width are unaffected.
1293   
1294
1295 <a name="method83"></a>
1296 <p/><strong>void ParticleDataEntry::setHasChanged(bool hasChanged) &nbsp;</strong> <br/>
1297   
1298 <a name="method84"></a>
1299 <p/><strong>void ParticleDataEntry::hasChanged(bool hasChanged) &nbsp;</strong> <br/>
1300 keep track of whether the data for a particle has been changed
1301 in any respect between initialization and the current status.
1302 Is used e.g. by the <code>ParticleData::listChanged</code> method 
1303 to determine which particles to list.
1304   
1305
1306 <a name="method85"></a>
1307 <p/><strong>void ParticleDataEntry::initBWmass() &nbsp;</strong> <br/>
1308 Prepare the Breit-Wigner mass selection by precalculating 
1309 frequently-used expressions.
1310   
1311
1312 <a name="method86"></a>
1313 <p/><strong>double ParticleDataEntry::constituentMass() &nbsp;</strong> <br/>
1314 is the constituent mass for a quark, hardcoded as 
1315 <i>m_u = m_d = 0.325</i>, <i>m_s = 0.50</i>, <i>m_c = 1.60</i> 
1316 and <i>m_b = 5.0</i> GeV, for a diquark the sum of quark constituent 
1317 masses, and for everything else the same as the ordinary mass.
1318   
1319
1320 <a name="method87"></a>
1321 <p/><strong>double ParticleDataEntry::mass() &nbsp;</strong> <br/>
1322 give the mass of a particle, either at the nominal value
1323 or picked according to a (linear or quadratic) Breit-Wigner. 
1324   
1325
1326 <a name="method88"></a>
1327 <p/><strong>double ParticleDataEntry::mRun(double mH) &nbsp;</strong> <br/>
1328 calculate the running quark mass at a hard scale <code>mH</code>.
1329 For other particles the on-shell mass is given.
1330   
1331
1332 <a name="method89"></a>
1333 <p/><strong>bool ParticleDataEntry::useBreitWigner() &nbsp;</strong> <br/>
1334 tells whether a particle will have a Breit-Wigner mass distribution or 
1335 not. Is determined by an internal logic based on the particle width and
1336 on the value of the <code><?php $filepath = $_GET["filepath"];
1337 echo "<a href='ParticleData.php?filepath=".$filepath."' target='page'>";?>
1338 ParticleData:modeBreitWigner</a></code> switch.
1339   
1340
1341 <a name="method90"></a>
1342 <p/><strong>bool ParticleDataEntry::canDecay(int id) &nbsp;</strong> <br/>
1343 true for a particle with at least one decay channel defined.
1344   
1345
1346 <a name="method91"></a>
1347 <p/><strong>bool ParticleDataEntry::isLepton() &nbsp;</strong> <br/>
1348 true for a lepton or an antilepton (including neutrinos).
1349   
1350
1351 <a name="method92"></a>
1352 <p/><strong>bool ParticleDataEntry::isQuark() &nbsp;</strong> <br/>
1353 true for a quark or an antiquark.
1354   
1355
1356 <a name="method93"></a>
1357 <p/><strong>bool ParticleDataEntry::isGluon() &nbsp;</strong> <br/>
1358 true for a gluon.
1359   
1360
1361 <a name="method94"></a>
1362 <p/><strong>bool ParticleDataEntry::isDiquark() &nbsp;</strong> <br/>
1363 true for a diquark or antidiquark.
1364   
1365
1366 <a name="method95"></a>
1367 <p/><strong>bool ParticleDataEntry::isHadron() &nbsp;</strong> <br/>
1368 true for a hadron (made up out of normal quarks and gluons, 
1369 i.e. not for R-hadrons and other exotic states).
1370   
1371
1372 <a name="method96"></a>
1373 <p/><strong>bool ParticleDataEntry::isMeson() &nbsp;</strong> <br/>
1374 true for a meson.
1375   
1376
1377 <a name="method97"></a>
1378 <p/><strong>bool ParticleDataEntry::isBaryon() &nbsp;</strong> <br/>
1379 true for a baryon or antibaryon.
1380   
1381
1382 <a name="method98"></a>
1383 <p/><strong>bool ParticleDataEntry::isOctetHadron() &nbsp;</strong> <br/>
1384 true for an intermediate hadron-like state with a colour octet charge
1385 as used in the colour octet model for 
1386 <?php $filepath = $_GET["filepath"];
1387 echo "<a href='OniaProcesses.php?filepath=".$filepath."' target='page'>";?>onia</a> production.
1388   
1389
1390 <a name="method99"></a>
1391 <p/><strong>int ParticleDataEntry::heaviestQuark(int id) &nbsp;</strong> <br/>
1392 extracts the heaviest quark or antiquark, i.e. one with largest 
1393 <code>id</code> number, for a hadron. Only the sign of the input
1394 argument is relevant.
1395   
1396
1397 <a name="method100"></a>
1398 <p/><strong>int ParticleDataEntry::baryonNumberType(int id) &nbsp;</strong> <br/>
1399 is 1 for a quark, 2 for a diquark, 3 for a baryon, the same with a 
1400 minus sign for antiparticles, and else zero. Only the sign of the 
1401 input argument is relevant.
1402   
1403
1404 <a name="method101"></a>
1405 <p/><strong>void ParticleDataEntry::clearChannels() &nbsp;</strong> <br/>
1406 resets to an empty decay table.
1407   
1408
1409 <a name="method102"></a>
1410 <p/><strong>void ParticleDataEntry::addChannel(int onMode = 0, double bRatio = 0., int meMode = 0, int prod0 = 0, int prod1 = 0,int prod2 = 0, int prod3 = 0, int prod4 = 0, int prod5 = 0, int prod6 = 0,  int prod7 = 0,) &nbsp;</strong> <br/>
1411 adds a decay channel with up to 8 products.
1412   
1413
1414 <a name="method103"></a>
1415 <p/><strong>int ParticleDataEntry::sizeChannels() &nbsp;</strong> <br/>
1416 returns the number of decay channels for a particle.
1417   
1418
1419 <a name="method104"></a>
1420 <p/><strong>DecayChannel& ParticleDataEntry::channel(int i) &nbsp;</strong> <br/>
1421   
1422 <strong>const DecayChannel& ParticleDataEntry::channel(int i) &nbsp;</strong> <br/>
1423 gain access to a specified channel in the decay table.
1424   
1425
1426 <a name="method105"></a>
1427 <p/><strong>void ParticleDataEntry::rescaleBR(double newSumBR = 1.) &nbsp;</strong> <br/>
1428 rescales all partial branching ratios by a common factor, such that 
1429 the sum afterward becomes <code>newSumBR</code>.
1430   
1431
1432 <a name="method106"></a>
1433 <p/><strong>bool ParticleDataEntry::preparePick(int idSgn, double mHat = 0., int idInFlav = 0) &nbsp;</strong> <br/>
1434 prepare to pick a decay channel.
1435   
1436
1437 <a name="method107"></a>
1438 <p/><strong>DecayChannel& ParticleDataEntry::pickChannel() &nbsp;</strong> <br/>
1439 pick a decay channel according to branching ratios from 
1440 <code>preparePick</code>.
1441   
1442
1443 <a name="method108"></a>
1444 <p/><strong>void ParticleDataEntry::setResonancePtr(ResonanceWidths* resonancePtr) &nbsp;</strong> <br/>
1445   
1446 <strong>ResonanceWidths* ParticleDataEntry::getResonancePtr() &nbsp;</strong> <br/>
1447 set or get a pointer to an object that can be used for dynamic calculation
1448 of partial and total resonance widths. Here a resonance is a particle 
1449 such as top, <i>Z^0</i>, <i>W^+-</i>, Higgs, and new unstable states
1450 beyond the Standard Model.
1451   
1452
1453 <a name="method109"></a>
1454 <p/><strong>void ParticleDataEntry::resInit(Info* infoPtrIn, Settings* settingsPtrIn, ParticleData* particleDataPtrIn, CoupSM* coupSMPtrIn) &nbsp;</strong> <br/>
1455 initialize the treatment of a resonance.
1456   
1457
1458 <a name="method110"></a>
1459 <p/><strong>double ParticleDataEntry::resWidth(int idSgn,double mHat, int idInFlav = 0, bool openOnly = false, bool setBR = false) &nbsp;</strong> <br/>
1460 calculate the total with for a resonance of a given current mass,
1461 optionally including coupling to incoming flavour state (consider
1462 the <i>gamma*/Z^0</i> combination), optionally excluding decay 
1463 channels that have been closed by the user, and optionally storing 
1464 the results in the normal decay table. For the first argument only 
1465 the sign is relevant.
1466   
1467
1468 <a name="method111"></a>
1469 <p/><strong>double ParticleDataEntry::resWidthOpen(int idSgn,double mHat, int idInFlav = 0) &nbsp;</strong> <br/>
1470 special case of <code>resWidth</code>, where only open channels are 
1471 included, but results are not stored in the normal decay table.
1472   
1473
1474 <a name="method112"></a>
1475 <p/><strong>double ParticleDataEntry::resWidthStore(int idSgn,double mHat, int idInFlav = 0) &nbsp;</strong> <br/>
1476 special case of <code>resWidth</code>, where only open channels are 
1477 included, and results are stored in the normal decay table.
1478   
1479
1480 <a name="method113"></a>
1481 <p/><strong>double ParticleDataEntry::resOpenFrac(int idSgn) &nbsp;</strong> <br/>
1482 calculate the fraction of the full branching ratio that is left
1483 open by the user choice of allowed decay channels.
1484   
1485
1486 <a name="method114"></a>
1487 <p/><strong>double ParticleDataEntry::resWidthRescaleFactor() &nbsp;</strong> <br/>
1488 the factor used to rescale all partial widths in case the total
1489 width is being forced to a specific value by the user.
1490   
1491
1492 <a name="method115"></a>
1493 <p/><strong>double ParticleDataEntry::resWidthChan(double mHat, int idAbs1 = 0, int idAbs2 = 0) &nbsp;</strong> <br/>
1494 special case to calculate one final-state width; currently only used 
1495 for Higgs decay to <i>q qbar</i>, <i>g g</i> or 
1496 <i>gamma gamma</i>. 
1497   
1498
1499 <h3>The DecayChannel methods</h3>
1500
1501 The properties stored in an individual decay channel can be set or get 
1502 by the methods in this section. 
1503
1504 <a name="method116"></a>
1505 <p/><strong>DecayChannel::DecayChannel(int onMode = 0, double bRatio = 0., int meMode = 0, int prod0 = 0, int prod1 = 0, int prod2 = 0, int prod3 = 0, int prod4 = 0, int prod5 = 0, int prod6 = 0, int prod7 = 0) &nbsp;</strong> <br/>
1506 the constructor for a decay channel. Internal.
1507   
1508
1509 <a name="method117"></a>
1510 <p/><strong>void DecayChannel::onMode(int onMode) &nbsp;</strong> <br/>
1511   
1512 <strong>int DecayChannel::onMode() &nbsp;</strong> <br/>
1513 set or get the <code>onMode</code> of a decay channel,<br/>
1514 0 if a channel is off,<br/>
1515 1 if on,<br/>
1516 2 if on for a particle but off for an antiparticle,<br/>
1517 3 if on for an antiparticle but off for a particle.<br/>
1518 If a particle is its own antiparticle then 2 is on and 3 off 
1519 but, of course, for such particles it is much simpler and safer 
1520 to use only 1 and 0.<br/>
1521 The 2 and 3 options can be used e.g. to encode CP violation in 
1522 B decays, or to let the <i>W</i>'s in a <i>q qbar -> W^+ W^-</i> 
1523 process decay in different channels.
1524   
1525
1526 <a name="method118"></a>
1527 <p/><strong>void DecayChannel::bRatio(double bRatio, bool countAsChanged = true) &nbsp;</strong> <br/>
1528   
1529 <strong>double DecayChannel::bRatio() &nbsp;</strong> <br/>
1530 set or get the branching ratio of the channel. Second argument only 
1531 for internal use.
1532   
1533
1534 <a name="method119"></a>
1535 <p/><strong>void DecayChannel::rescaleBR(double fac) &nbsp;</strong> <br/>
1536 multiply the current branching ratio by <code>fac</code>.
1537   
1538
1539 <a name="method120"></a>
1540 <p/><strong>void DecayChannel::meMode(int meMode) &nbsp;</strong> <br/>
1541   
1542 <strong>int DecayChannel::meMode() &nbsp;</strong> <br/>
1543 set or get the mode of processing this channel, possibly with matrix 
1544 elements (see the <?php $filepath = $_GET["filepath"];
1545 echo "<a href='ParticleDecays.php?filepath=".$filepath."' target='page'>";?>particle decays</a> 
1546 description).
1547   
1548
1549 <a name="method121"></a>
1550 <p/><strong>void DecayChannel::multiplicity(int multiplicity) &nbsp;</strong> <br/>
1551   
1552 <strong>int DecayChannel::multiplicity() &nbsp;</strong> <br/>
1553 set or get the number of decay products in a channel, at most 8.
1554 (Is normally not to be set by hand, since it is automatically 
1555 updated whenever the products list is changed.)
1556   
1557
1558 <a name="method122"></a>
1559 <p/><strong>void DecayChannel::product(int i, int product) &nbsp;</strong> <br/>
1560   
1561 <strong>int DecayChannel::product(int i) &nbsp;</strong> <br/>
1562 set or get a list of the decay products, 8 products 0 &lt;= i &lt; 8,
1563 with trailing unused ones set to 0.
1564   
1565
1566 <a name="method123"></a>
1567 <p/><strong>void DecayChannel::setHasChanged(bool hasChanged) &nbsp;</strong> <br/>
1568   
1569 <strong>bool DecayChannel::hasChanged() &nbsp;</strong> <br/>
1570 used for internal purposes, to know which decay modes have been changed.
1571   
1572
1573 <a name="method124"></a>
1574 <p/><strong>bool DecayChannel::contains(int id1) &nbsp;</strong> <br/>
1575   
1576 <strong>bool DecayChannel::contains(int id1, int id2) &nbsp;</strong> <br/>
1577   
1578 <strong>bool DecayChannel::contains(int id1, int id2, int id3) &nbsp;</strong> <br/>
1579 find if the decay product list contains the one, two or three particle
1580 identities provided. If the same code is repeated then so must it be in 
1581 the products list. Matching also requires correct sign.
1582   
1583
1584 <a name="method125"></a>
1585 <p/><strong>void DecayChannel::currentBR(double currentBR) &nbsp;</strong> <br/>
1586   
1587 <strong>double DecayChannel::currentBR() &nbsp;</strong> <br/>
1588 set or get the current branching ratio, taking into account on/off 
1589 switches and dynamic width for resonances. For internal use.
1590   
1591
1592 <a name="method126"></a>
1593 <p/><strong>void DecayChannel::onShellWidth(double onShellWidth) &nbsp;</strong> <br/>
1594   
1595 <strong>double DecayChannel::onShellWidth() &nbsp;</strong> <br/>
1596 set or get the current partial width of the channel; intended for
1597 resonances where the widhts are recalculated based on the current
1598 resonance mass. For internal use.
1599   
1600
1601 <a name="method127"></a>
1602 <p/><strong>void DecayChannel::onShellWidthFactor(double factor) &nbsp;</strong> <br/>
1603 multiply the current partial width by <code>factor</code>.
1604   
1605
1606 <a name="method128"></a>
1607 <p/><strong>void DecayChannel::openSec(int idSgn, double openSecIn) &nbsp;</strong> <br/>
1608   
1609 <strong>double DecayChannel::openSec(nt idSgn) &nbsp;</strong> <br/>
1610 set or get the fraction of secondary open widths, separately for 
1611 positive and negative particles. For internal use.
1612   
1613
1614 </body>
1615 </html>
1616
1617 <!-- Copyright (C) 2010 Torbjorn Sjostrand -->