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"/>
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"))
17 document.onkeypress = stopRKey;
20 if($_POST['saved'] == 1) {
21 if($_POST['filepath'] != "files/") {
22 echo "<font color='red'>SETTINGS SAVED TO FILE</font><br/><br/>"; }
24 echo "<font color='red'>NO FILE SELECTED YET.. PLEASE DO SO </font><a href='SaveSettings.php'>HERE</a><br/><br/>"; }
28 <form method='post' action='ParticleDataScheme.php'>
30 <h2>The Particle Data Scheme</h2>
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.
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.
49 The management of particle data is based on three classes:
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>
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.
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.
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
85 <h3>Stored properties for particles</h3>
87 The main properties stored for each particle are as follows.
88 Different ways to set and get these properties will be described
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>
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>
100 <li><code>chargeType</code>: three times the charge (to make it an
103 <li><code>colType</code>: the colour type, with 0 uncoloured, 1 triplet,
104 -1 antitriplet and 2 octet.</li>
106 <li><code>m0</code>: the nominal mass <i>m_0</i> (in GeV).</li>
108 <li><code>mWidth</code>: the width <i>Gamma</i> of the Breit-Wigner
109 distribution (in GeV).</li>
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>
115 <li><code>mMax</code>: the upper limit of the allowed mass range
116 generated by the Breit-Wigner (in GeV). If <i>mMax < mMin</i> then
117 no upper limit is imposed. Has no meaning for particles without width,
118 and would typically be 0 there.</li>
120 <li><code>tau0</code>: the nominal proper lifetime <i>tau_0</i>
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>
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>
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>
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>
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>
175 <h3>Stored properties for decays</h3>
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
183 <li><code>onMode</code>: integer code for use or not of channel,<br/>
184 0 if a channel is off,<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>
195 <li><code>bRatio</code>: the branching ratio of the channel.</li>
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.
203 <li><code>multiplicity</code>: the number of decay products of the
204 channel. Can be at most 8.</li>
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.
215 The normal flow of the particle data operations is:
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.
225 All lines beginning with <code><particle</code> are scanned for
226 information on a particle species, and all lines beginning with
227 <code><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 > endtoken.
232 The format of a <code><particle</code> tag is:
234 <particle id="..." name="..." antiName="..." spinType="..." chargeType="..." colType="..."
235 m0="..." mWidth="..." mMin="..." mMax="..." tau0="...">
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/>
245 The format of a <code><channel></code> tag is:
247 <channel onMode="..." bRatio="..." meMode="..." products="..." />
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.
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.
263 a) Inside your main program you can directly set values with
265 pythia.readString(string);
267 where both the variable name and the value are contained inside
268 the character string, separated by blanks and/or a =, e.g.
270 pythia.readString("111:mayDecay = off");
272 switches off the decays of the <i>pi^0</i>.<br/>
274 The particle id (> 0) and the property to be changed must be given,
275 separated by a colon.<br/>
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/>
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
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,
302 id:all = name antiName spinType chargeType colType m0 mWidth mMin mMax tau0
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.
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.
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:
332 id:channel:products = product1 product2 ....
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:
341 id:channel:all = onMode bRatio meMode product1 product2 ....
343 To add a new channel at the end, use
345 id:addChannel = onMode bRatio meMode product1 product2 ....
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
354 id:oneChannel = onMode bRatio meMode product1 product2 ....
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.
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.
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
372 will set the <code>onMode</code> property of all channels to the
375 id:offIfAny = product1 product2 ....
376 id:onIfAny = product1 product2 ....
377 id:onPosIfAny = product1 product2 ....
378 id:onNegIfAny = product1 product2 ....
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.
389 id:offIfAll = product1 product2 ....
390 id:onIfAll = product1 product2 ....
391 id:onPosIfAll = product1 product2 ....
392 id:onNegIfAll = product1 product2 ....
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,
401 id:offIfMatch = product1 product2 ....
402 id:onIfMatch = product1 product2 ....
403 id:onPosIfMatch = product1 product2 ....
404 id:onPosIfMatch = product1 product2 ....
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.
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.
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:
427 pythia.particleData.readString("111:mayDecay = off");
428 pythia.particleData.readString("15:2:products = 16 -211");
430 In this case, changes intended for <code>Settings</code> would not be
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
438 pythia.particleData.mayDecay(111, false);
440 Boolean values should here be given as <code>true</code> or
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.
449 The file can be read by the
451 pythia.readFile(fileName);
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.
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.
471 You may at any time obtain a listing of all the particle data by calling
473 pythia.particleData.listAll();
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/>
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
486 pythia.particleData.listChanged();
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>.
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<int></code>.
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
509 a) XML syntax, using the <code><particle</code> and
510 <code><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
516 b) Fixed/free format, using exactly the same information as illustrated
517 for the <code><particle</code> and <code><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
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.
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>.
548 <h2>The public methods</h2>
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.
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.
566 <h3>The ParticleData methods</h3>
568 <a name="method1"></a>
569 <p/><strong>ParticleData::ParticleData() </strong> <br/>
570 the constructor has no arguments and does not do anything. Internal.
573 <a name="method2"></a>
574 <p/><strong>void ParticleData::initPtr(Info* infoPtr,Settings* settingsPtrIn, Rndm* rndmPtrIn, CoupSM* coupSMPtrIn) </strong> <br/>
575 initialize pointers to a few other classes. Internal.
578 <a name="method3"></a>
579 <p/><strong>bool ParticleData::init(string startFile = "../xmldoc/ParticleData.xml") </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
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 "../xmldoc".
594 <a name="method4"></a>
595 <p/><strong>bool ParticleData::reInit(string startFile,bool xmlFormat = true) </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.
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).
609 <a name="method5"></a>
610 <p/><strong>void ParticleData::initWidths(vector<ResonanceWidths*> resonancePtrs) </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>.
618 <a name="method6"></a>
619 <p/><strong>bool ParticleData::readXML(string inFile, bool reset = true) </strong> <br/>
621 <strong>void ParticleData::listXML(string outFile) </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.
628 <a name="method7"></a>
629 <p/><strong>bool ParticleData::readFF(string inFile, bool reset = true) </strong> <br/>
631 <strong>void ParticleData::listFF(string outFile) </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.
638 <a name="method8"></a>
639 <p/><strong>bool ParticleData::readString(string line, bool warn = true, ostream& os = cout) </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.
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.
651 <br/><code>argument</code><strong> os </strong> (<code>default = <strong>cout</strong></code>) :
652 stream for error printout.
654 <br/><b>Note:</b> the method returns false if it fails to
655 make sense out of the input string.
658 <a name="method9"></a>
659 <p/><strong>void ParticleData::listAll(ostream& os = cout) </strong> <br/>
661 <strong>void ParticleData::listChanged(ostream& os = cout) </strong> <br/>
663 <strong>void ParticleData::listChangedAndRes(ostream& os = cout) </strong> <br/>
665 <strong>void ParticleData::list(bool changedOnly = false, bool changedRes = true, ostream& os = cout) </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.
676 <a name="method10"></a>
677 <p/><strong>void ParticleData::list(int idList, ostream& os = cout) </strong> <br/>
679 <strong>void ParticleData::list(vector<int> idList, ostream& os = cout) </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.
684 <a name="method11"></a>
685 <p/><strong>void ParticleData::checkTable(ostream& os = cout) </strong> <br/>
687 <strong>void ParticleData::checkTable(int verbosity,ostream& os = cout) </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.
698 <a name="method12"></a>
699 <p/><strong>void ParticleData::addParticle(int id, string name = " ", int spinType = 0, int chargeType = 0, int colType = 0, double m0 = 0., double mWidth = 0., double mMin = 0., double mMax = 0., double tau0 = 0.) </strong> <br/>
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.) </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.
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.) </strong> <br/>
708 change all the properties of the particle associated with a given
712 <a name="method14"></a>
713 <p/><strong>bool ParticleData::isParticle(int id) </strong> <br/>
714 query whether the particle data table contains the particle of the
718 <a name="method15"></a>
719 <p/><strong>int ParticleData::nextId(int id) </strong> <br/>
720 return the identity code of the sequentially next particle stored in table.
723 <a name="method16"></a>
724 <p/><strong>bool ParticleData::hasAnti(int id) </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
730 <a name="method17"></a>
731 <p/><strong>void ParticleData::name(int id, string name) </strong> <br/>
733 <strong>void ParticleData::antiName(int id, string antiName) </strong> <br/>
735 <strong>void ParticleData::names(int id, string name, string antiName) </strong> <br/>
737 <<strong>string ParticleData::name(int id) </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.
743 <a name="method18"></a>
744 <p/><strong>void ParticleData::spinType(int id, int spinType) </strong> <br/>
746 <strong>int ParticleData::spinType(int id) </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.
751 <a name="method19"></a>
752 <p/><strong>void ParticleData::chargeType(int id, int chargeType) </strong> <br/>
754 <strong>int ParticleData::chargeType(int id) </strong> <br/>
755 three times the charge (to make it an integer), taking into account
756 the sign of <code>id</code>.
759 <a name="method20"></a>
760 <p/><strong>double ParticleData::charge(int id) </strong> <br/>
761 the electrical charge of a particle, equal to
762 <code>chargeType(id)/3</code>.
765 <a name="method21"></a>
766 <p/><strong>void ParticleData::colType(int id, int colType) </strong> <br/>
768 <strong>int ParticleData::colType(int id) </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>.
773 <a name="method22"></a>
774 <p/><strong>void ParticleData::m0(int id, double m0) </strong> <br/>
776 <strong>double ParticleData::m0(int id) </strong> <br/>
777 the nominal mass <i>m_0</i> (in GeV).
780 <a name="method23"></a>
781 <p/><strong>void ParticleData::mWidth(int id, double mWidth) </strong> <br/>
783 <strong>double ParticleData::mWidth(int id) </strong> <br/>
784 the width <i>Gamma</i> of the Breit-Wigner distribution (in GeV).
787 <a name="method24"></a>
788 <p/><strong>void ParticleData::mMin(int id, double mMin) </strong> <br/>
790 <strong>double ParticleData::mMin(int id) </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.
796 <a name="method25"></a>
797 <p/><strong>void ParticleData::mMax(int id, double mMax) </strong> <br/>
799 <strong>double ParticleData::mMax(int id) </strong> <br/>
800 the upper limit of the allowed mass range generated by the Breit-Wigner
801 (in GeV). If <i>mMax < mMin</i> then no upper limit is imposed.
802 Has no meaning for particles without width, and would typically
806 <a name="method26"></a>
807 <p/><strong>double ParticleData::m0Min(int id) </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.
812 <a name="method27"></a>
813 <p/><strong>double ParticleData::m0Max(int id) </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.
818 <a name="method28"></a>
819 <p/><strong>void ParticleData::tau0(int id, double tau0) </strong> <br/>
821 <strong>double ParticleData::tau0(int id) </strong> <br/>
822 the nominal proper lifetime <i>tau_0</i> (in mm/c).
825 <a name="method29"></a>
826 <p/><strong>void ParticleData::isResonance(int id, bool isResonance) </strong> <br/>
828 <strong>bool ParticleData::isResonance(int id) </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.
845 <a name="method30"></a>
846 <p/><strong>void ParticleData::mayDecay(int id, bool mayDecay) </strong> <br/>
848 <strong>bool ParticleData::mayDecay(int id) </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.
858 <a name="method31"></a>
859 <p/><strong>void ParticleData::doExternalDecays(int id, bool doExternalDecays) </strong> <br/>
861 <strong>bool ParticleData::doExternalDecay(int id) </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.
870 <a name="method32"></a>
871 <p/><strong>void ParticleData::isVisible(int id, bool isVisible) </strong> <br/>
873 <strong>bool ParticleData::isVisible(int id) </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.
883 <a name="method33"></a>
884 <p/><strong>void ParticleData::doForceWidth(int id, bool doForceWidth) </strong> <br/>
886 <strong>bool ParticleData::doForceWidth(int id) </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.
898 <a name="method34"></a>
899 <p/><strong>void ParticleData::hasChanged(int id, bool hasChanged) </strong> <br/>
901 <strong>bool ParticleData::hasChanged(int id) </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.
908 <a name="method35"></a>
909 <p/><strong>bool ParticleData::useBreitWigner(int id) </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
913 <code><?php $filepath = $_GET["filepath"];
914 echo "<a href='ParticleData.php?filepath=".$filepath."' target='page'>";?>ParticleData:modeBreitWigner</a></code>
918 <a name="method36"></a>
919 <p/><strong>double ParticleData::constituentMass(int id) </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.
926 <a name="method37"></a>
927 <p/><strong>double ParticleData::mass(int id) </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.
933 <a name="method38"></a>
934 <p/><strong>double ParticleData::mRun(int id, double mH) </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
941 <a name="method39"></a>
942 <p/><strong>bool ParticleData::canDecay(int id) </strong> <br/>
943 true for a particle with at least one decay channel defined.
946 <a name="method40"></a>
947 <p/><strong>bool ParticleData::isLepton(int id) </strong> <br/>
948 true for a lepton or an antilepton (including neutrinos).
951 <a name="method41"></a>
952 <p/><strong>bool ParticleData::isQuark(int id) </strong> <br/>
953 true for a quark or an antiquark.
956 <a name="method42"></a>
957 <p/><strong>bool ParticleData::isGluon(int id) </strong> <br/>
961 <a name="method43"></a>
962 <p/><strong>bool ParticleData::isDiquark(int id) </strong> <br/>
963 true for a diquark or antidiquark.
966 <a name="method44"></a>
967 <p/><strong>bool ParticleData::isHadron(int id) </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).
972 <a name="method45"></a>
973 <p/><strong>bool ParticleData::isMeson(int id) </strong> <br/>
977 <a name="method46"></a>
978 <p/><strong>bool ParticleData::isBaryon(int id) </strong> <br/>
979 true for a baryon or antibaryon.
982 <a name="method47"></a>
983 <p/><strong>bool ParticleData::isOctetHadron(int id) </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.
990 <a name="method48"></a>
991 <p/><strong>int ParticleData::heaviestQuark(int id) </strong> <br/>
992 extracts the heaviest quark or antiquark, i.e. one with largest
993 <code>id</code> number, for a hadron.
996 <a name="method49"></a>
997 <p/><strong>int ParticleData::baryonNumberType(int id) </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.
1002 <a name="method50"></a>
1003 <p/><strong>void ParticleData::rescaleBR(int id, double newSumBR = 1.) </strong> <br/>
1004 rescales all partial branching ratios by a common factor, such that
1005 the sum afterward becomes <code>newSumBR</code>.
1008 <a name="method51"></a>
1009 <p/><strong>void setResonancePtr(int id, ResonanceWidths* resonancePtr) </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.
1018 <a name="method52"></a>
1019 <p/><strong>void ParticleData::resInit(int id) </strong> <br/>
1020 initialize the treatment of a resonance.
1023 <a name="method53"></a>
1024 <p/><strong>double ParticleData::resWidth(int id, double mHat, int idInFlav = 0, bool openOnly = false, bool setBR = false) </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.
1032 <a name="method54"></a>
1033 <p/><strong>double ParticleData::resWidthOpen(int id, double mHat, int idInFlav = 0) </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.
1038 <a name="method55"></a>
1039 <p/><strong>double ParticleData::resWidthStore(int id, double mHat, int idInFlav = 0) </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.
1044 <a name="method56"></a>
1045 <p/><strong>double ParticleData::resOpenFrac(int id1, int id2 = 0, int id3 = 0) </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.
1052 <a name="method57"></a>
1053 <p/><strong>double ParticleData::resWidthRescaleFactor(int id) </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.
1058 <a name="method58"></a>
1059 <p/><strong>double ParticleData::resWidthChan(int id,double mHat, int idAbs1 = 0, int idAbs2 = 0) </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
1065 <a name="method59"></a>
1066 <p/><strong>ParticleDataEntry* ParticleData::particleDataEntryPtr(int id) </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
1072 <h3>The ParticleDataEntry methods</h3>
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>.
1084 <a name="method60"></a>
1085 <p/><strong>ParticleDataEntry::ParticleDataEntry(int id = 0, string name = " ", int spinType = 0, int chargeType = 0, int colType = 0, double m0 = 0., double mWidth = 0., double mMin = 0., double mMax = 0., double tau0 = 0.) </strong> <br/>
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.) </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).
1095 <a name="method61"></a>
1096 <p/><strong>ParticleDataEntry::~ParticleDataEntry </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.
1101 <a name="method62"></a>
1102 <p/><strong>void ParticleDataEntry::setDefaults() </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>.
1108 <a name="method63"></a>
1109 <p/><strong>void ParticleDataEntry::initPtr(ParticleData* particleDataPtrIn) </strong> <br/>
1110 initialize pointer back to the whole database (so that masses of
1111 decay products can be accessed, e.g.).
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.) </strong> <br/>
1116 change all the properties of the particle associated with a given
1120 <a name="method65"></a>
1121 <p/><strong>int ParticleDataEntry::id() </strong> <br/>
1122 the PDG identity code.
1125 <a name="method66"></a>
1126 <p/><strong>bool ParticleDataEntry::hasAnti() </strong> <br/>
1127 tell whether a separate antiparticle exists.
1130 <a name="method67"></a>
1131 <p/><strong>void ParticleDataEntry::setName(string name) </strong> <br/>
1133 <strong>void ParticleDataEntry::setAntiName(string antiName) </strong> <br/>
1135 <strong>void ParticleDataEntry::setNames(string name,string antiName) </strong> <br/>
1137 <strong>string ParticleDataEntry::name(int id = 1) </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.
1142 <a name="method68"></a>
1143 <p/><strong>void ParticleDataEntry::setSpinType(int spinType) </strong> <br/>
1145 <strong>int ParticleDataEntry::spinType() </strong> <br/>
1146 set or get the particle spin type, i.e. <i>2 s + 1</i>, or 0 in some
1150 <a name="method69"></a>
1151 <p/><strong>void ParticleDataEntry::setChargeType(int chargeType) </strong> <br/>
1153 <strong>int ParticleDataEntry::chargeType(int id = 1) </strong> <br/>
1155 <strong>double ParticleDataEntry::charge(int id = 1) </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.
1161 <a name="method70"></a>
1162 <p/><strong>void ParticleDataEntry::setColType(int colType) </strong> <br/>
1164 <strong>int ParticleDataEntry::colType(int id = 1) </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.
1170 <a name="method71"></a>
1171 <p/><strong>void ParticleDataEntry::setM0(double m0) </strong> <br/>
1173 <strong>double ParticleDataEntry::m0() </strong> <br/>
1174 the nominal mass <i>m_0</i> (in GeV).
1177 <a name="method72"></a>
1178 <p/><strong>void ParticleDataEntry::setMWidth(double mWidth) </strong> <br/>
1180 <strong>double ParticleDataEntry::mWidth() </strong> <br/>
1181 the width <i>Gamma</i> of the Breit-Wigner distribution (in GeV).
1184 <a name="method73"></a>
1185 <p/><strong>void ParticleDataEntry::setMMin(double mMin) </strong> <br/>
1187 <strong>double ParticleDataEntry::mMin() </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.
1193 <a name="method74"></a>
1194 <p/><strong>void ParticleDataEntry::setMMax(double mMax) </strong> <br/>
1196 <strong>double ParticleDataEntry::mMax() </strong> <br/>
1197 the upper limit of the allowed mass range generated by the Breit-Wigner
1198 (in GeV). If <i>mMax < mMin</i> then no upper limit is imposed.
1199 Has no meaning for particles without width, and would typically
1203 <a name="method75"></a>
1204 <p/><strong>double ParticleDataEntry::m0Min() </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.
1209 <a name="method76"></a>
1210 <p/><strong>double ParticleDataEntry::m0Max() </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.
1215 <a name="method77"></a>
1216 <p/><strong>void ParticleDataEntry::setTau0(double tau0) </strong> <br/>
1218 <strong>double ParticleDataEntry::tau0() </strong> <br/>
1219 the nominal proper lifetime <i>tau_0</i> (in mm/c).
1222 <a name="method78"></a>
1223 <p/><strong>void ParticleDataEntry::setIsResonance(bool isResonance) </strong> <br/>
1225 <strong>bool ParticleDataEntry::isResonance() </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.
1242 <a name="method79"></a>
1243 <p/><strong>void ParticleDataEntry::setMayDecay(bool mayDecay) </strong> <br/>
1245 <strong>bool ParticleDataEntry::mayDecay() </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.
1255 <a name="method80"></a>
1256 <p/><strong>void ParticleDataEntry::setDoExternalDecays(bool doExternalDecays) </strong> <br/>
1258 <strong>bool ParticleDataEntry::doExternalDecay() </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.
1267 <a name="method81"></a>
1268 <p/><strong>void ParticleDataEntry::setIsVisible(bool isVisible) </strong> <br/>
1270 <strong>bool ParticleDataEntry::isVisible() </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.
1280 <a name="method82"></a>
1281 <p/><strong>void ParticleDataEntry::setDoForceWidth(bool doForceWidth) </strong> <br/>
1283 <strong>bool ParticleDataEntry::doForceWidth() </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.
1295 <a name="method83"></a>
1296 <p/><strong>void ParticleDataEntry::setHasChanged(bool hasChanged) </strong> <br/>
1298 <a name="method84"></a>
1299 <p/><strong>void ParticleDataEntry::hasChanged(bool hasChanged) </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.
1306 <a name="method85"></a>
1307 <p/><strong>void ParticleDataEntry::initBWmass() </strong> <br/>
1308 Prepare the Breit-Wigner mass selection by precalculating
1309 frequently-used expressions.
1312 <a name="method86"></a>
1313 <p/><strong>double ParticleDataEntry::constituentMass() </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.
1320 <a name="method87"></a>
1321 <p/><strong>double ParticleDataEntry::mass() </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.
1326 <a name="method88"></a>
1327 <p/><strong>double ParticleDataEntry::mRun(double mH) </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.
1332 <a name="method89"></a>
1333 <p/><strong>bool ParticleDataEntry::useBreitWigner() </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.
1341 <a name="method90"></a>
1342 <p/><strong>bool ParticleDataEntry::canDecay(int id) </strong> <br/>
1343 true for a particle with at least one decay channel defined.
1346 <a name="method91"></a>
1347 <p/><strong>bool ParticleDataEntry::isLepton() </strong> <br/>
1348 true for a lepton or an antilepton (including neutrinos).
1351 <a name="method92"></a>
1352 <p/><strong>bool ParticleDataEntry::isQuark() </strong> <br/>
1353 true for a quark or an antiquark.
1356 <a name="method93"></a>
1357 <p/><strong>bool ParticleDataEntry::isGluon() </strong> <br/>
1361 <a name="method94"></a>
1362 <p/><strong>bool ParticleDataEntry::isDiquark() </strong> <br/>
1363 true for a diquark or antidiquark.
1366 <a name="method95"></a>
1367 <p/><strong>bool ParticleDataEntry::isHadron() </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).
1372 <a name="method96"></a>
1373 <p/><strong>bool ParticleDataEntry::isMeson() </strong> <br/>
1377 <a name="method97"></a>
1378 <p/><strong>bool ParticleDataEntry::isBaryon() </strong> <br/>
1379 true for a baryon or antibaryon.
1382 <a name="method98"></a>
1383 <p/><strong>bool ParticleDataEntry::isOctetHadron() </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.
1390 <a name="method99"></a>
1391 <p/><strong>int ParticleDataEntry::heaviestQuark(int id) </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.
1397 <a name="method100"></a>
1398 <p/><strong>int ParticleDataEntry::baryonNumberType(int id) </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.
1404 <a name="method101"></a>
1405 <p/><strong>void ParticleDataEntry::clearChannels() </strong> <br/>
1406 resets to an empty decay table.
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,) </strong> <br/>
1411 adds a decay channel with up to 8 products.
1414 <a name="method103"></a>
1415 <p/><strong>int ParticleDataEntry::sizeChannels() </strong> <br/>
1416 returns the number of decay channels for a particle.
1419 <a name="method104"></a>
1420 <p/><strong>DecayChannel& ParticleDataEntry::channel(int i) </strong> <br/>
1422 <strong>const DecayChannel& ParticleDataEntry::channel(int i) </strong> <br/>
1423 gain access to a specified channel in the decay table.
1426 <a name="method105"></a>
1427 <p/><strong>void ParticleDataEntry::rescaleBR(double newSumBR = 1.) </strong> <br/>
1428 rescales all partial branching ratios by a common factor, such that
1429 the sum afterward becomes <code>newSumBR</code>.
1432 <a name="method106"></a>
1433 <p/><strong>bool ParticleDataEntry::preparePick(int idSgn, double mHat = 0., int idInFlav = 0) </strong> <br/>
1434 prepare to pick a decay channel.
1437 <a name="method107"></a>
1438 <p/><strong>DecayChannel& ParticleDataEntry::pickChannel() </strong> <br/>
1439 pick a decay channel according to branching ratios from
1440 <code>preparePick</code>.
1443 <a name="method108"></a>
1444 <p/><strong>void ParticleDataEntry::setResonancePtr(ResonanceWidths* resonancePtr) </strong> <br/>
1446 <strong>ResonanceWidths* ParticleDataEntry::getResonancePtr() </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.
1453 <a name="method109"></a>
1454 <p/><strong>void ParticleDataEntry::resInit(Info* infoPtrIn, Settings* settingsPtrIn, ParticleData* particleDataPtrIn, CoupSM* coupSMPtrIn) </strong> <br/>
1455 initialize the treatment of a resonance.
1458 <a name="method110"></a>
1459 <p/><strong>double ParticleDataEntry::resWidth(int idSgn,double mHat, int idInFlav = 0, bool openOnly = false, bool setBR = false) </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.
1468 <a name="method111"></a>
1469 <p/><strong>double ParticleDataEntry::resWidthOpen(int idSgn,double mHat, int idInFlav = 0) </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.
1474 <a name="method112"></a>
1475 <p/><strong>double ParticleDataEntry::resWidthStore(int idSgn,double mHat, int idInFlav = 0) </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.
1480 <a name="method113"></a>
1481 <p/><strong>double ParticleDataEntry::resOpenFrac(int idSgn) </strong> <br/>
1482 calculate the fraction of the full branching ratio that is left
1483 open by the user choice of allowed decay channels.
1486 <a name="method114"></a>
1487 <p/><strong>double ParticleDataEntry::resWidthRescaleFactor() </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.
1492 <a name="method115"></a>
1493 <p/><strong>double ParticleDataEntry::resWidthChan(double mHat, int idAbs1 = 0, int idAbs2 = 0) </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
1499 <h3>The DecayChannel methods</h3>
1501 The properties stored in an individual decay channel can be set or get
1502 by the methods in this section.
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) </strong> <br/>
1506 the constructor for a decay channel. Internal.
1509 <a name="method117"></a>
1510 <p/><strong>void DecayChannel::onMode(int onMode) </strong> <br/>
1512 <strong>int DecayChannel::onMode() </strong> <br/>
1513 set or get the <code>onMode</code> of a decay channel,<br/>
1514 0 if a channel is off,<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.
1526 <a name="method118"></a>
1527 <p/><strong>void DecayChannel::bRatio(double bRatio, bool countAsChanged = true) </strong> <br/>
1529 <strong>double DecayChannel::bRatio() </strong> <br/>
1530 set or get the branching ratio of the channel. Second argument only
1534 <a name="method119"></a>
1535 <p/><strong>void DecayChannel::rescaleBR(double fac) </strong> <br/>
1536 multiply the current branching ratio by <code>fac</code>.
1539 <a name="method120"></a>
1540 <p/><strong>void DecayChannel::meMode(int meMode) </strong> <br/>
1542 <strong>int DecayChannel::meMode() </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>
1549 <a name="method121"></a>
1550 <p/><strong>void DecayChannel::multiplicity(int multiplicity) </strong> <br/>
1552 <strong>int DecayChannel::multiplicity() </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.)
1558 <a name="method122"></a>
1559 <p/><strong>void DecayChannel::product(int i, int product) </strong> <br/>
1561 <strong>int DecayChannel::product(int i) </strong> <br/>
1562 set or get a list of the decay products, 8 products 0 <= i < 8,
1563 with trailing unused ones set to 0.
1566 <a name="method123"></a>
1567 <p/><strong>void DecayChannel::setHasChanged(bool hasChanged) </strong> <br/>
1569 <strong>bool DecayChannel::hasChanged() </strong> <br/>
1570 used for internal purposes, to know which decay modes have been changed.
1573 <a name="method124"></a>
1574 <p/><strong>bool DecayChannel::contains(int id1) </strong> <br/>
1576 <strong>bool DecayChannel::contains(int id1, int id2) </strong> <br/>
1578 <strong>bool DecayChannel::contains(int id1, int id2, int id3) </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.
1584 <a name="method125"></a>
1585 <p/><strong>void DecayChannel::currentBR(double currentBR) </strong> <br/>
1587 <strong>double DecayChannel::currentBR() </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.
1592 <a name="method126"></a>
1593 <p/><strong>void DecayChannel::onShellWidth(double onShellWidth) </strong> <br/>
1595 <strong>double DecayChannel::onShellWidth() </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.
1601 <a name="method127"></a>
1602 <p/><strong>void DecayChannel::onShellWidthFactor(double factor) </strong> <br/>
1603 multiply the current partial width by <code>factor</code>.
1606 <a name="method128"></a>
1607 <p/><strong>void DecayChannel::openSec(int idSgn, double openSecIn) </strong> <br/>
1609 <strong>double DecayChannel::openSec(nt idSgn) </strong> <br/>
1610 set or get the fraction of secondary open widths, separately for
1611 positive and negative particles. For internal use.
1617 <!-- Copyright (C) 2010 Torbjorn Sjostrand -->