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