1 <chapter name="The Particle Data Scheme">
3 <h2>The Particle Data Scheme</h2>
5 The particle data scheme may take somewhat longer to understand than
6 the settings one. In particular the set of methods to access information
7 is rather more varied, to allow better functionality for advanced usage.
8 However, PYTHIA does come with a sensible default set of particle
9 properties and decay tables. Thus there is no need to learn any of the
10 methods on this page to get going. Only when you perceive a specific need
11 does it make sense to learn the basics.
14 The central section on this page is the Operation one. The preceding
15 sections are there mainly to introduce the basic structure and the set
16 of properties that can be accessed. The subsequent sections provide a
17 complete listing of the existing public methods, which most users
18 probably will have little interaction with.
22 The management of particle data is based on three classes:
24 <li><code>ParticleData</code>, which is the top-level class, with
25 methods that can be used to interrogate all particle data. It contains
26 a map of PDG particle identity numbers <ref>Yao06</ref> onto the relevant
27 <code>ParticleDataEntry</code> objects,</li>
28 <li><code>ParticleDataEntry</code>, which stores the relevant information
29 on an individual particle species, and</li>
30 <li><code>DecayChannel</code>, which stores info on one particular decay
31 mode of a particle.</li>
34 The objects of these classes together form a database that is
35 continuously being used as the program has to assign particle masses,
36 select decay modes, etc.
39 Each <code>Pythia</code> object has a public member
40 <code>particleData</code> of the <code>ParticleData</code> class.
41 Therefore you access the particle data methods as
42 <code>pythia.particleData.command(argument)</code>,
43 assuming that <code>pythia</code> is an instance of the
44 <code>Pythia</code> class. Further, for some of the most frequent user
45 tasks, <code>Pythia</code> methods have been defined, so that
46 <code>pythia.command(argument)</code>
47 would work, see further below.
50 A fundamental difference between the particle data classes and the
51 settings ones is that the former are accessed regularly during the
52 event generation process, as a new particle is produced and its mass
53 need to be set, e.g., while the latter are mainly/only used
54 at the initialization stage. Nevertheless, it is not a good idea to
55 change data in either of them in mid-run, since this may lead to
58 <h3>Stored properties for particles</h3>
60 The main properties stored for each particle are as follows.
61 Different ways to set and get these properties will be described
66 <li><code>name</code>: a character string with the name of the
67 particle. Particle and antiparticle names are stored separately,
68 with <code>void</code> returned when no antiparticle exists.</li>
70 <li><code>spinType</code>: the spin type, of the form <ei>2 s + 1</ei>,
71 with special code 0 for entries of unknown or indeterminate spin.</li>
73 <li><code>chargeType</code>: three times the charge (to make it an
76 <li><code>colType</code>: the colour type, with 0 uncoloured, 1 triplet,
77 -1 antitriplet and 2 octet. (A preliminary implementation of colour
78 sextets, available since version 8.150, further uses 3 for a sextet
79 and -3 for an antisextet.) </li>
81 <li><code>m0</code>: the nominal mass <ei>m_0</ei> (in GeV).</li>
83 <li><code>mWidth</code>: the width <ei>Gamma</ei> of the Breit-Wigner
84 distribution (in GeV).</li>
86 <li><code>mMin</code>: the lower limit of the allowed mass range
87 generated by the Breit-Wigner (in GeV). Has no meaning for particles
88 without width, and would typically be 0 there.</li>
90 <li><code>mMax</code>: the upper limit of the allowed mass range
91 generated by the Breit-Wigner (in GeV). If <ei>mMax < mMin</ei> then
92 no upper limit is imposed. Has no meaning for particles without width,
93 and would typically be 0 there.</li>
95 <li><code>tau0</code>: the nominal proper lifetime <ei>tau_0</ei>
98 <li><code>isResonance</code>: a flag telling whether a particle species
99 is considered as a resonance or not. Here
100 <aloc href="ResonanceDecays">"resonance"</aloc> is used as shorthand
101 for any massive particle where the decay process should be counted as part
102 of the hard process itself, and thus be performed before showers and other
103 event aspects are added. Restrictions on allowed decay channels is also
104 directly reflected in the cross section of simulated processes, while
105 those of normal hadrons and other light particles are not.
106 In practice, it is reserved for states above the <ei>b bbar</ei>
107 bound systems in mass, i.e. for <ei>W, Z, t</ei>, Higgs states,
108 supersymmetric states and (most?) other states in any new theory.
109 All particles with <code>m0</code> above 20 GeV are by default
110 initialized to be considered as resonances.</li>
112 <li><code>mayDecay</code>: a flag telling whether a particle species
113 may decay or not, offering the main user switch. Whether a given particle
114 of this kind then actually will decay also depends on it having allowed
115 decay channels, and on other flags for
116 <aloc href="ParticleDecays">particle decays</aloc>.
117 All particles with <code>tau0</code> below 1000 mm are
118 by default initialized to allow decays.</li>
120 <li><code>doExternalDecays</code>: a flag telling whether a particle
121 should be handled by an external decay package or not, with the latter
122 default. Can be manipulated as described on this page, but should
123 normally not be. Instead the
124 <code><aloc href="ExternalDecays">Pythia::decayPtr(...)</aloc></code>
125 method should be provided with the list of relevant particles.</li>
127 <li><code>isVisible</code>: a flag telling whether a particle species
128 is to be considered as visible in a detector or not, as used e.g. in
129 analysis routines. By default this includes neutrinos and a few BSM
130 particles (gravitino, sneutrinos, neutralinos) that have neither strong
131 nor electromagnetic charge, and are not made up of constituents that
132 have it. The value of this flag is only relevant if a particle is
133 long-lived enough actually to make it to a detector.</li>
135 <li><code>doForceWidth</code>: a flag valid only for resonances where
136 PYTHIA contains code to calculate the width of the resonance from
137 encoded matrix-element expressions, i.e. the <ei>Z^0</ei>, <ei>W^+-</ei>,
138 <ei>t</ei>, <ei>h^0</ei>, and a few more. The normal behaviour
139 (<code>false</code>) is then that the width is calculated from the mass,
140 but it is possible to <aloc href="ResonanceDecays">force</aloc> the
141 resonance to retain the nominal width. Branching ratios and the running
142 of the total width are unaffected.</li>
146 <h3>Stored properties for decays</h3>
148 An unstable particle has a decay table consisting of one or more
149 decay channel. The following properties are stored for each such channel.
150 Again different ways to set and get these properties will be described
154 <li><code>onMode</code>: integer code for use or not of channel,<br/>
155 0 if a channel is off,<br/>
157 2 if on for a particle but off for an antiparticle,<br/>
158 3 if on for an antiparticle but off for a particle.<br/>
159 If a particle is its own antiparticle then 2 is on and 3 off
160 but, of course, for such particles it is much simpler and safer
161 to use only 1 and 0.<br/>
162 The 2 and 3 options can be used e.g. to encode CP violation in
163 B decays, or to let the <ei>W</ei>'s in a <ei>q qbar -> W^+ W^-</ei>
164 process decay in different channels. </li>
166 <li><code>bRatio</code>: the branching ratio of the channel.</li>
168 <li><code>meMode</code>: the mode of processing this channel, possibly
169 with matrix elements; see the
170 <aloc href="ParticleDecays">particle decays</aloc> description</li>
171 for the list of possibilities.
173 <li><code>multiplicity</code>: the number of decay products of the
174 channel. Can be at most 8.</li>
176 <li><code>product(i)</code>: the identity code of the decay products,
177 where <code>i</code> runs between <code>0</code> and
178 <code>multiplicity - 1</code>. Trailing positions are filled with 0.
185 The normal flow of the particle data operations is:
190 When a <code>Pythia</code> object <code>pythia</code> is created, the
191 <code>pythia.particleData</code> member is asked to scan the
192 <code>ParticleData.xml</code> file.
195 All lines beginning with <code><particle</code> are scanned for
196 information on a particle species, and all lines beginning with
197 <code><channel</code> are assumed to contain a decay channel of the
198 enclosing particle. In both cases XML syntax is used, with attributes
199 used to identify the stored properties, and with omitted properties
200 defaulting back to 0 where meaningful. The particle and channel
201 information may be split over several lines, up to the > endtoken.
202 The format of a <code><particle</code> tag is:
204 <particle id="..." name="..." antiName="..." spinType="..." chargeType="..." colType="..."
205 m0="..." mWidth="..." mMin="..." mMax="..." tau0="...">
208 where the fields are the properties already introduced above.
209 Note that <code>isResonance</code>, <code>mayDecay</code>,
210 <code>doExternalDecay</code>, <code>isVisible</code> and
211 <code>doForceWidth</code> are not set here, but are provided with
212 default values by the rules described above. Once initialized, also
213 these latter properties can be changed, see below.<br/>
215 The format of a <code><channel></code> tag is:
217 <channel onMode="..." bRatio="..." meMode="..." products="..." />
219 again see properties above. The products are given as a blank-separated
220 list of <code>id</code> codes.
221 <note>Important</note>: the values in the <code>.xml</code> file should not
222 be changed, except by the PYTHIA authors. Any changes should be done
223 with the help of the methods described below.
227 Between the creation of the <code>Pythia</code> object and the
228 <code>init</code> call for it, you may use the methods of the
229 <code>ParticleData</code> class to modify some of the default values.
230 Several different approaches can be chosen for this.
233 a) Inside your main program you can directly set values with
235 pythia.readString(string);
237 where both the variable name and the value are contained inside
238 the character string, separated by blanks and/or a =, e.g.
240 pythia.readString("111:mayDecay = off");
242 switches off the decays of the <ei>pi^0</ei>.<br/>
244 The particle id (> 0) and the property to be changed must be given,
245 separated by a colon.<br/>
247 The allowed properties are: <code>name</code>, <code>antiName</code>,
248 <code>spinType</code>, <code>chargeType</code>, <code>colType</code>,
249 <code>m0</code>, <code>mWidth</code>, <code>mMin</code>,
250 <code>mMax</code>, <code>tau0</code>, <code>isResonance</code>,
251 <code>mayDecay</code>, <code>doExternalDecay</code>,
252 <code>isVisible</code> and <code>doForceWidth</code>. All of these
253 names are case-insensitive. Names that do not match an existing
254 variable are ignored.<br/>
256 Strings beginning with a non-alphanumeric character, like # or !,
257 are assumed to be comments and are not processed at all. For
258 <code>bool</code> values, the following notation may be used
259 interchangeably: <code>true = on = yes = ok = 1</code>, while everything
260 else gives <code>false</code> (including but not limited to
261 <code>false</code>, <code>off</code>, <code>no</code> and
265 Particle data often comes in sets of closely related information.
266 Therefore some properties expect the value to consist of several
267 numbers. These can then be separated by blanks (or by commas).
268 A simple example is <code>names</code>, which expects both the
269 name and antiname to be given. A more interesting one is the
270 <code>all</code> property,
272 id:all = name antiName spinType chargeType colType m0 mWidth mMin mMax tau0
274 where all the current information on the particle itself is replaced,
275 but any decay channels are kept unchanged. Using <code>new</code> instead
276 of <code>all</code> also removes any previous decay channels.
277 If the string contains fewer fields than expected the trailing
278 properties are set to vanish ("void", 0 or 0.). Note that such a
279 truncated string should not be followed by a comment, since this
280 comment would then be read in as if it contained the missing properties.
281 The truncation can be done anywhere, specifically a string with only
282 <code>id:new</code> defines a new "empty" particle.
283 As before, <code>isResonance</code>, <code>mayDecay</code>,
284 <code>doExternalDecay</code>, <code>isVisible</code> and
285 <code>doForceWidth</code> are (re)set to their default values, and
286 would have to be changed separately if required.
289 A further command is <code>rescaleBR</code>, which rescales each of the
290 existing branching ratios with a common factor, such that their new
291 sum is the provided value. This may be a first step towards adding
292 new decay channels, see further below.
295 Alternatively the <code>id</code> code may be followed by another integer,
296 which then gives the decay channel number. This then has to be
297 followed by the property specific to this channel, either
298 <code>onMode</code>, <code>bRatio</code>, <code>meMode</code> or
299 <code>products</code>. In the latter case all the products of
300 the channel should be given:
302 id:channel:products = product1 product2 ....
304 The line will be scanned until the end of the line, or until a
305 non-number word is encountered, or until the maximum allowed number
306 of eight products is encountered, whichever happens first. (Thus the
307 multiplicity of a decay channel need not be input; it is automatically
308 calculated from the products list.) It is also possible to replace all
309 the properties of a channel in a similar way:
311 id:channel:all = onMode bRatio meMode product1 product2 ....
313 To add a new channel at the end, use
315 id:addChannel = onMode bRatio meMode product1 product2 ....
319 It is currently not possible to remove a channel selectively, but
320 setting its branching ratio vanishing is as effective. If you want to
321 remove all existing channels and force decays into one new channel
324 id:oneChannel = onMode bRatio meMode product1 product2 ....
326 A first <code>oneChannel</code> command could be followed by
327 several subsequent <code>addChannel</code> ones, to build
328 up a completely new decay table for an existing particle.
331 When adding new channels or changing branching ratios in general,
332 note that, once a particle is to be decayed, the sum of branching
333 ratios is always rescaled to unity. Beforehand, <code>rescaleBR</code>
334 may be used to rescale an existing branching ratio by the given factor.
337 There are a few commands that will study all the decay channels of the
338 given particle, to switch them on or off as desired. The
342 will set the <code>onMode</code> property of all channels to the
345 id:offIfAny = product1 product2 ....
346 id:onIfAny = product1 product2 ....
347 id:onPosIfAny = product1 product2 ....
348 id:onNegIfAny = product1 product2 ....
350 will set the <code>onMode</code> 0, 1, 2 or 3, respectively, for all
351 channels which contain any of the enumerated products, where the matching
352 to these products is done without distinction of particles and
353 antiparticles. Note that "<code>Pos</code>" and "<code>Neg</code>"
354 are slightly misleading since it refers to the particle and antiparticle
355 of the <code>id</code> species rather than charge, but should still be
356 simpler to remember and understand than alternative notations.
359 id:offIfAll = product1 product2 ....
360 id:onIfAll = product1 product2 ....
361 id:onPosIfAll = product1 product2 ....
362 id:onNegIfAll = product1 product2 ....
364 will set the <code>onMode</code> 0, 1, 2 or 3, respectively, for all
365 channels which contain all of the enumerated products, again without
366 distinction of particles and antiparticles. If the same product appears
367 twice in the list it must also appear twice in the decay channel, and
368 so on. The decay channel is allowed to contain further particles,
369 beyond the product list. By contrast,
371 id:offIfMatch = product1 product2 ....
372 id:onIfMatch = product1 product2 ....
373 id:onPosIfMatch = product1 product2 ....
374 id:onPosIfMatch = product1 product2 ....
376 requires the decay-channel multiplicity to agree with that of the product
377 list, but otherwise works as the <code>onIfAll/offIfAll</code> methods.
380 Note that the action of several of the commands depends on the order
381 in which they are executed, as one would logically expect. For instance,
382 <code>id:oneChannel</code> removes all decay channels of <code>id</code>
383 and thus all previous changes in this decay table, while subsequent
384 additions or changes would still take effect. Another example would be that
385 <code>23:onMode = off</code> followed by <code>23:onIfAny = 1 2 3 4 5</code>
386 would let the <ei>Z^0</ei> decay to quarks, while no decays would be
387 allowed if the order were to be reversed.
390 b) The <code>Pythia</code> <code>readString(string)</code> method actually
391 does not do changes itself, but sends on the string either to the
392 <code>ParticleData</code> class or to the <code>Settings</code> one,
393 depending on whether the string begins with a digit or a letter.
394 If desired, it is possible to communicate directly with the corresponding
395 <code>ParticleData</code> method:
397 pythia.particleData.readString("111:mayDecay = off");
398 pythia.particleData.readString("15:2:products = 16 -211");
400 In this case, changes intended for <code>Settings</code> would not be
404 c) Underlying this are commands for all the individual properties in
405 the <code>ParticleData</code> class, one for each. These are
406 further described below. Thus, an example now reads
408 pythia.particleData.mayDecay(111, false);
410 Boolean values should here be given as <code>true</code> or
414 d) A simpler and more useful way is to collect all your changes
415 in a separate file, with one line per change, e.g.
419 The file can be read by the
421 pythia.readFile(fileName);
423 method, where <code>fileName</code> is a string, e.g.
424 <code>pythia.readFile("main.cmnd")</code> (or an <code>istream</code>
425 instead of a <code>fileName</code>). Each line is processed as
426 described for the string in 2a). This file can freely mix commands to
427 the <code>Settings</code> and <code>ParticleData</code> classes.
431 A routine <code>reInit(fileName)</code> is provided, and can be used to
432 zero the particle data table and reinitialize it from scratch.
433 Such a call might be useful if several subruns are to be made with
434 widely different particle data - normally the maps are only built
435 from scratch once, namely when the <code>Pythia()</code> object is
436 created. Also, there is no other possibility to restore the default
437 values, unlike for the settings.
441 You may at any time obtain a listing of all the particle data by calling
443 pythia.particleData.listAll();
445 The listing is by increasing <code>id</code> number. It shows the basic
446 quantities introduced above. Some are abbreviated in the header to fit on
447 the lines: <code>spn = spinType</code>, <code>chg = chargeType</code>,
448 <code>col = colType</code>, <code>res = isResonance</code>,
449 <code>dec = mayDecay && canDecay</code> (the latter checks that decay
450 channels have been defined), <code>ext = doExternalDecay</code>,
451 <code>vis = isVisible</code> and <code>wid = doForceWidth</code>.<br/>
453 To list only those particles that were changed (one way or another, the
454 listing will not tell what property or decay channel was changed), instead use
456 pythia.particleData.listChanged();
458 (This info is based on a further <code>hasChanged</code> flag of a particle
459 or a channel, set <code>true</code> whenever any of the changing methods are
460 used. It is possible to manipulate this value, but this is not recommended.)
461 By default the internal initialization of the widths of resonances such as
462 <ei>gamma^*/Z^0, W^+-, t/tbar, H^0</ei> do not count as changes; if you want
463 to list also those changes instead call <code>listChanged(true)</code>.
466 To list only one particle, give its <code>id</code> code as argument to
467 the <code>list(...)</code> function.. To list a restricted set of particles,
468 give in their <code>id</code> codes to <code>list(...)</code> as a
469 <code>vector<int></code>.
473 For wholesale changes of particle properties all available data can be
474 written out, edited, and then read back in again. These methods are
475 mainly intended for expert users. You can choose between two alternative
479 a) XML syntax, using the <code><particle</code> and
480 <code><channel</code> lines already described. You use the method
481 <code>particleData.listXML(fileName)</code> to produce such an XML
482 file and <code>particleData.readXML(fileName)</code> to read it back
486 b) Fixed/free format, using exactly the same information as illustrated
487 for the <code><particle</code> and <code><channel</code> lines
488 above, but now without any tags. This means that all information fields
489 must be provided (if there is no antiparticle then write
490 <code>void</code>), in the correct order (while the order is irrelevant
491 with XML syntax), and all on one line. Information is written out in
492 properly lined-up columns, but the reading is done using free format,
493 so fields need only be separated by at least one blank. Each new particle
494 is supposed to be separated by (at least) one blank line, whereas no
495 blank lines are allowed between the particle line and the subsequent
496 decay channel lines, if any. You use the method
497 <code>particleData.listFF(fileName)</code> to produce such a fixed/free
498 file and <code>particleData.readFF(fileName)</code> to read it back
502 As an alternative to the <code>readXML</code> and <code>readFF</code>
503 methods you can also use the
504 <code>particleData.reInit(fileName, xmlFormat)</code> method, where
505 <code>xmlFormat = true</code> (default) corresponds to reading an XML
506 file and <code>xmlFormat = false</code> to a fixed/free format one.
509 To check that the new particle and decay tables makes sense, you can use
510 the <code>particleData.checkTable()</code> method, either directly or by
511 switching it on among the standard
512 <aloc href="ErrorChecks">error checks</aloc>.
517 <h2>The public methods</h2>
519 In the following we present briefly the public methods in the three
520 classes used to build up the particle database. The order
521 is top-down, i.e from the full table of all particles to a single
522 particle to a single channel.
523 Note that these methods usually are less elegant and safe than the
524 input methods outlined above. If you use any of these methods, it is
525 likely to be the ones in the full database, i.e. the first ones to be
526 covered in the following.
529 For convenience, we have grouped related input and output methods
530 together. It should be obvious from the context which is which:
531 the input is of type <code>void</code> and has an extra last argument,
532 namely is the input value, while the output method returns a
533 quantity of the expected type.
535 <h3>The ParticleData methods</h3>
537 <method name="ParticleData::ParticleData()">
538 the constructor has no arguments and does not do anything. Internal.
541 <method name="void ParticleData::initPtr(Info* infoPtr,
542 Settings* settingsPtrIn, Rndm* rndmPtrIn, CoupSM* coupSMPtrIn)">
543 initialize pointers to a few other classes. Internal.
546 <method name="bool ParticleData::init(string
547 startFile = "../xmldoc/ParticleData.xml")">
548 read in an XML-style file with particle data and initialize the
549 particle data tables accordingly. This command is executed
550 in the <code>Pythia</code> constructor, i.e. is mainly for
552 <argument name="startFile" default ="../xmldoc/ParticleData.xml">
553 the name of the data file to be read. When called from the
554 <code>Pythia</code> constructor the directory is provided by the
555 <code><aloc href="ProgramFlow">PYTHIA8DATA</aloc></code>
556 environment variable, if set, else by the argument of this constructor,
557 which has the default value "../xmldoc".
561 <method name="bool ParticleData::reInit(string startFile,
562 bool xmlFormat = true)">
563 overwrite the existing database by reading from the specified file.
564 Unlike <code>init</code> above this method is not called by the
565 <code>Pythia</code> constructor, but is entirely intended for users
566 who want to replace the existing particle data with their own.
567 <argument name="startFile">the path and name of file to be read.
569 <argument name="xmlFormat">if true read the same kind of XML-style file
570 as used by <code>init</code>, if not use an alternative "free format"
571 file (i.e. without any XML tags, but with well-defined rules
572 specifying in which order properties are stored).
576 <method name="void ParticleData::initWidths(
577 vector<ResonanceWidths*> resonancePtrs)">
578 initialize Breit-Wigner shape parameters for all particles,
579 and the detailed handling of resonances, i.e. particles with
580 perturbatively calculable partial widths, which can be used to
581 obtain a mass-dependent Breit-Wigner and a dynamic choice of
582 decay channels. Called from <code>Pythia::init()</code>.
585 <method name="bool ParticleData::readXML(string inFile,
588 <methodmore name="void ParticleData::listXML(string outFile)">
589 read in XML-style data from a file or write it out to a file. For the
590 former one can also decide whether to reset all particles to scratch,
591 or only overwrite those particles in the file. The former method is
592 used by <code>init</code> and <code>reInit</code> above.
595 <method name="bool ParticleData::readFF(string inFile,
598 <methodmore name="void ParticleData::listFF(string outFile)">
599 read in free-format-style data from a file or write it out to a file.
600 For the former one can also decide whether to reset all particles to
601 scratch, or only overwrite those particles in the file. The former
602 method is used by <code>reInit</code> above.
605 <method name="bool ParticleData::readString(string line,
606 bool warn = true, ostream& os = cout)">
607 read in a string and interpret is as a new or changed particle data.
608 The possibilities are extensively described above. It is normally
609 used indirectly, via <code>Pythia::readString(...)</code> and
610 <code>Pythia::readFile(...)</code>.
611 <argument name="line">
612 the string to be interpreted as an instruction.
614 <argument name="warn" default="true">
615 write a warning message or not whenever the instruction does not make
616 sense, e.g. if the particle does not exist in the database.
618 <argument name="os" default="cout">
619 stream for error printout.
621 <note>Note:</note> the method returns false if it fails to
622 make sense out of the input string.
625 <method name="void ParticleData::listAll(ostream& os = cout)">
627 <methodmore name="void ParticleData::listChanged(ostream& os = cout)">
629 <methodmore name="void ParticleData::listChangedAndRes(ostream& os
632 <methodmore name="void ParticleData::list(bool changedOnly = false,
633 bool changedRes = true, ostream& os = cout)">
634 methods intended to present a listing of particle data in a readable
635 format. The first three are special cases of the fourth. The first
636 lists all particle data, the second only data for those particles that
637 were changed after the original creation of the particle data table.
638 Resonances are a special case since they can get their data changed
639 by being linked to an object that does the calculation of branching
640 ratios. The second method does not count such resonances as changed,
641 whereas the third does and thus lists all resonances.
644 <method name="void ParticleData::list(int idList, ostream& os = cout)">
646 <methodmore name="void ParticleData::list(vector<int> idList,
647 ostream& os = cout)">
648 list particle data for one single particle, with the identity code as
649 input, or for a set of particles, with an input vector of identity codes.
652 <method name="void ParticleData::checkTable(ostream& os = cout)">
654 <methodmore name="void ParticleData::checkTable(int verbosity,
655 ostream& os = cout)">
656 check that the particle decay table makes sense, especially for decays.
657 <argument name="verbosity"> level of checks. 0 is only mininal,
658 e.g. if a particle has no open decay channels. 1, which is the level
659 of the first method, provides warning if any individual channel is
660 closed, except for resonances. 2 also prints the
661 branching-ratio-averaged threshold mass. 11 and 12 are like 1 and 2,
662 but also include resonances in the detailed checks.
666 <method name="void ParticleData::addParticle(int id,
667 string name = " ", int spinType = 0, int chargeType = 0,
668 int colType = 0, double m0 = 0., double mWidth = 0., double mMin = 0.,
669 double mMax = 0., double tau0 = 0.)">
671 <methodmore name="void ParticleData::addParticle(int id,
672 string name, string antiName, int spinType = 0, int chargeType = 0,
673 int colType = 0, double m0 = 0., double mWidth = 0., double mMin = 0.,
674 double mMax = 0., double tau0 = 0.)">
675 add a particle to the decay table; in the first form a partcle which is
676 its own antiparticle, in the second where a separate antiparticle exists.
679 <method name="void ParticleData::setAll(int id,
680 string name, string antiName, int spinType = 0, int chargeType = 0,
681 int colType = 0, double m0 = 0., double mWidth = 0., double mMin = 0.,
682 double mMax = 0.,double tau0 = 0.)">
683 change all the properties of the particle associated with a given
687 <method name="bool ParticleData::isParticle(int id)">
688 query whether the particle data table contains the particle of the
692 <method name="int ParticleData::nextId(int id)">
693 return the identity code of the sequentially next particle stored in table.
696 <method name="bool ParticleData::hasAnti(int id)">
697 bool whether a distinct antiparticle exists or not. Is true if an
698 antiparticle name has been set (and is different from
702 <method name="void ParticleData::name(int id, string name)">
704 <methodmore name="void ParticleData::antiName(int id, string antiName)">
706 <methodmore name="void ParticleData::names(int id,
707 string name, string antiName)">
709 <methodmore name="string ParticleData::name(int id)">
710 particle and antiparticle names are stored separately, the sign of
711 <code>id</code> determines which of the two is returned, with
712 <code>void</code> used to indicate the absence of an antiparticle.
715 <method name="void ParticleData::spinType(int id, int spinType)">
717 <methodmore name="int ParticleData::spinType(int id)">
718 the spin type, of the form <ei>2 s + 1</ei>, with special code 0
719 for entries of unknown or indeterminate spin.
722 <method name="void ParticleData::chargeType(int id, int chargeType)">
724 <methodmore name="int ParticleData::chargeType(int id)">
725 three times the charge (to make it an integer), taking into account
726 the sign of <code>id</code>.
729 <method name="double ParticleData::charge(int id)">
730 the electrical charge of a particle, equal to
731 <code>chargeType(id)/3</code>.
734 <method name="void ParticleData::colType(int id, int colType)">
736 <methodmore name="int ParticleData::colType(int id)">
737 the colour type, with 0 uncoloured, 1 triplet, -1 antitriplet and 2
738 octet, taking into account the sign of <code>id</code>.
741 <method name="void ParticleData::m0(int id, double m0)">
743 <methodmore name="double ParticleData::m0(int id)">
744 the nominal mass <ei>m_0</ei> (in GeV).
747 <method name="void ParticleData::mWidth(int id, double mWidth)">
749 <methodmore name="double ParticleData::mWidth(int id)">
750 the width <ei>Gamma</ei> of the Breit-Wigner distribution (in GeV).
753 <method name="void ParticleData::mMin(int id, double mMin)">
755 <methodmore name="double ParticleData::mMin(int id)">
756 the lower limit of the allowed mass range generated by the Breit-Wigner
757 (in GeV). Has no meaning for particles without width, and would
758 typically be 0 there.
761 <method name="void ParticleData::mMax(int id, double mMax)">
763 <methodmore name="double ParticleData::mMax(int id)">
764 the upper limit of the allowed mass range generated by the Breit-Wigner
765 (in GeV). If <ei>mMax < mMin</ei> then no upper limit is imposed.
766 Has no meaning for particles without width, and would typically
770 <method name="double ParticleData::m0Min(int id)">
771 similar to <code>mMin()</code> above, except that for particles with
772 no width the <code>m0(id)</code> value is returned.
775 <method name="double ParticleData::m0Max(int id)">
776 similar to <code>mMax()</code> above, except that for particles with
777 no width the <code>m0(id)</code> value is returned.
780 <method name="void ParticleData::tau0(int id, double tau0)">
782 <methodmore name="double ParticleData::tau0(int id)">
783 the nominal proper lifetime <ei>tau_0</ei> (in mm/c).
786 <method name="void ParticleData::isResonance(int id, bool isResonance)">
788 <methodmore name="bool ParticleData::isResonance(int id)">
789 a flag telling whether a particle species are considered as a resonance
790 or not. Here <aloc href="ResonanceDecays">"resonance"</aloc>
791 is used as shorthand for any massive particle
792 where the decay process should be counted as part of the hard process
793 itself, and thus be performed before showers and other event aspects
794 are added. Restrictions on allowed decay channels is also directly
795 reflected in the cross section of simulated processes, while those of
796 normal hadrons and other light particles are not.
797 In practice, it is reserved for states above the <ei>b bbar</ei>
798 bound systems in mass, i.e. for <ei>W, Z, t</ei>, Higgs states,
799 supersymmetric states and (most?) other states in any new theory.
800 All particles with <code>m0</code> above 20 GeV are by default
801 initialized to be considered as resonances.
804 <method name="void ParticleData::mayDecay(int id, bool mayDecay)">
806 <methodmore name="bool ParticleData::mayDecay(int id)">
807 a flag telling whether a particle species may decay or not, offering
808 the main user switch. Whether a given particle of this kind then actually
809 will decay also depends on it having allowed decay channels, and on
810 other flags for <aloc href="ParticleDecays">particle decays</aloc>.
811 All particles with <code>tau0</code> below 1000 mm are
812 by default initialized to allow decays.
815 <method name="void ParticleData::doExternalDecays(int id,
816 bool doExternalDecays)">
818 <methodmore name="bool ParticleData::doExternalDecay(int id)">
819 a flag telling whether a particle should be handled by an external
820 decay package or not, with the latter default. Can be manipulated as
821 described on this page, but should normally not be. Instead the
822 <code><aloc href="ExternalDecays">pythia.decayPtr</aloc></code>
823 method should be provided with the list of relevant particles.
826 <method name="void ParticleData::isVisible(int id, bool isVisible)">
828 <methodmore name="bool ParticleData::isVisible(int id)">
829 a flag telling whether a particle species is to be considered as
830 visible in a detector or not, as used e.g. in analysis routines.
831 By default this includes neutrinos and a few BSM particles
832 (gravitino, sneutrinos, neutralinos) that have neither strong nor
833 electromagnetic charge, and are not made up of constituents that
834 have it. The value of this flag is only relevant if a particle is
835 long-lived enough actually to make it to a detector.
838 <method name="void ParticleData::doForceWidth(int id, bool doForceWidth)">
840 <methodmore name="bool ParticleData::doForceWidth(int id)">
841 a flag valid only for resonances where PYTHIA contains code to
842 calculate the width of the resonance from encoded matrix-element
843 expressions, i.e. the <ei>Z^0</ei>, <ei>W^+-</ei>, <ei>t</ei>,
844 <ei>h^0</ei>, and a few more. The normal behaviour (<code>false</code>)
845 is then that the width is calculated from the mass, but it is
846 possible to <aloc href="ResonanceDecays">force</aloc> the resonance
847 to retain the nominal width. Branching ratios and the running of the
848 total width are unaffected.
851 <method name="void ParticleData::hasChanged(int id, bool hasChanged)">
853 <methodmore name="bool ParticleData::hasChanged(int id)">
854 keep track of whether the data for a particle has been changed
855 in any respect between initialization and the current status.
856 Is used e.g. by the <code>listChanged</code> method to determine
857 which particles to list.
860 <method name="bool ParticleData::useBreitWigner(int id)">
861 tells whether a particle will have a Breit-Wigner mass distribution or
862 not. Is determined by an internal logic based on the particle width and
864 <code><aloc href="ParticleData">ParticleData:modeBreitWigner</aloc></code>
868 <method name="double ParticleData::constituentMass(int id)">
869 is the constituent mass for a quark, hardcoded as
870 <ei>m_u = m_d = 0.325</ei>, <ei>m_s = 0.50</ei>, <ei>m_c = 1.60</ei>
871 and <ei>m_b = 5.0</ei> GeV, for a diquark the sum of quark constituent
872 masses, and for everything else the same as the ordinary mass.
875 <method name="double ParticleData::mass(int id)">
876 returns a mass distributed according to a truncated Breit-Wigner,
877 with parameters as described here. Is equal to <code>m0(id)</code> for
878 particles without width.
881 <method name="double ParticleData::mRun(int id, double mH)">
882 calculate the running mass of species <code>id</code> when probed at a
883 hard mass scale of <code>mH</code>. Only applied to obtain the
884 running quark masses; for all other particle the normal fixed mass
888 <method name="bool ParticleData::canDecay(int id)">
889 true for a particle with at least one decay channel defined.
892 <method name="bool ParticleData::isLepton(int id)">
893 true for a lepton or an antilepton (including neutrinos).
896 <method name="bool ParticleData::isQuark(int id)">
897 true for a quark or an antiquark.
900 <method name="bool ParticleData::isGluon(int id)">
904 <method name="bool ParticleData::isDiquark(int id)">
905 true for a diquark or antidiquark.
908 <method name="bool ParticleData::isParton()">
909 true for a gluon, a quark or antiquark up to the b (but excluding top),
910 and a diquark or antidiquark consisting of quarks up to the b.
913 <method name="bool ParticleData::isHadron(int id)">
914 true for a hadron (made up out of normal quarks and gluons,
915 i.e. not for R-hadrons and other exotic states).
918 <method name="bool ParticleData::isMeson(int id)">
922 <method name="bool ParticleData::isBaryon(int id)">
923 true for a baryon or antibaryon.
926 <method name="bool ParticleData::isOctetHadron(int id)">
927 true for an intermediate hadron-like state with a colour octet charge
928 as used in the colour octet model for
929 <aloc href="OniaProcesses">onia</aloc> production.
932 <method name="int ParticleData::heaviestQuark(int id)">
933 extracts the heaviest quark or antiquark, i.e. one with largest
934 <code>id</code> number, for a hadron.
937 <method name="int ParticleData::baryonNumberType(int id)">
938 is 1 for a quark, 2 for a diquark, 3 for a baryon, the same with a
939 minus sign for antiparticles, and else zero.
942 <method name="void ParticleData::rescaleBR(int id, double newSumBR = 1.)">
943 rescales all partial branching ratios by a common factor, such that
944 the sum afterward becomes <code>newSumBR</code>.
947 <method name="void setResonancePtr(int id, ResonanceWidths* resonancePtr)">
948 set a pointer for a particle kind to a <code>ResonanceWidths</code> object.
949 This is done, from inside <code>ParticleData::initWidths</code>, only for
950 resonances, i.e. for particles such as <ei>Z^0</ei>, <ei>W^+-</ei>, top,
951 Higgs, and new unstable states beyond the Standard Model. The presence
952 of such an object will allow a more dynamic calculation of partial and
953 total widths, as illustrated by the following methods.
956 <method name="void ParticleData::resInit(int id)">
957 initialize the treatment of a resonance.
960 <method name="double ParticleData::resWidth(int id, double mHat,
961 int idInFlav = 0, bool openOnly = false, bool setBR = false)">
962 calculate the total with for a resonance of a given current mass,
963 optionally including coupling to incoming flavour state (consider
964 the <ei>gamma*/Z^0</ei> combination), optionally excluding decay
965 channels that have been closed by the user, and optionally storing
966 the results in the normal decay table.
969 <method name="double ParticleData::resWidthOpen(int id, double mHat,
971 special case of <code>resWidth</code>, where only open channels are
972 included, but results are not stored in the normal decay table.
975 <method name="double ParticleData::resWidthStore(int id, double mHat,
977 special case of <code>resWidth</code>, where only open channels are
978 included, and results are stored in the normal decay table.
981 <method name="double ParticleData::resOpenFrac(int id1, int id2 = 0,
983 calculate the fraction of the full branching ratio that is left
984 open by the user choice of allowed decay channels. Can be applied
985 to a final state with up to three resonances. Since the procedure
986 is multiplicative, it would be easy to generalize also to more.
989 <method name="double ParticleData::resWidthRescaleFactor(int id)">
990 the factor used to rescale all partial widths in case the total
991 width is being forced to a specific value by the user.
994 <method name="double ParticleData::resWidthChan(int id,
995 double mHat, int idAbs1 = 0, int idAbs2 = 0)">
996 special case to calculate one final-state width; currently only used
997 for Higgs decay to <ei>q qbar</ei>, <ei>g g</ei> or
998 <ei>gamma gamma</ei>.
1001 <method name="ParticleDataEntry*
1002 ParticleData::particleDataEntryPtr(int id)">
1003 returns a pointer to the <code>ParticleDataEntry</code> object.
1004 The methods in the next section can then be used to manipulate
1008 <h3>The ParticleDataEntry methods</h3>
1010 Most of the methods that can be applied to a single
1011 <code>ParticleDataEntry</code> object are almost identical with
1012 those used above for the <code>ParticleData</code>, except
1013 that the <code>id</code> argument is no longer needed to find
1014 the right entry in the table. By and large, this makes direct
1015 access to the <code>ParticleDataEntry</code> methods superfluous.
1016 There are a few methods that are unique to each class, however.
1017 Furthermore, to avoid some naming ambiguities, many methods that
1018 set values begin with <code>set</code>.
1020 <method name="ParticleDataEntry::ParticleDataEntry(int id = 0,
1021 string name = " ", int spinType = 0, int chargeType = 0,
1022 int colType = 0, double m0 = 0., double mWidth = 0.,
1023 double mMin = 0., double mMax = 0., double tau0 = 0.)">
1025 <methodmore name="ParticleDataEntry::ParticleDataEntry(int id,
1026 string name, string antiName, int spinType = 0, int chargeType = 0,
1027 int colType = 0, double m0 = 0., double mWidth = 0.,
1028 double mMin = 0., double mMax = 0., double tau0 = 0.)">
1029 there are two alternative constructors, that both expect the
1030 properties of a particle as input. The first assumes that there
1031 is only one particle, thet latter that there is a
1032 particle-antiparticle pair (but if the antiparticle name is
1033 <code>void</code> one reverts back to the particle-only case).
1036 <method name="ParticleDataEntry::~ParticleDataEntry">
1037 the destructor is needed to delete any <code>ResonanceWidths</code>
1038 objects that have been created and linked to the respective particle.
1041 <method name="void ParticleDataEntry::setDefaults()">
1042 initialize some particle flags with default values, e.g. whether
1043 a particle is a resonance, may decay, or is visible. Is called from the
1044 constructors and from <code>setAll</code>.
1047 <method name="void ParticleDataEntry::initPtr(ParticleData*
1048 particleDataPtrIn)">
1049 initialize pointer back to the whole database (so that masses of
1050 decay products can be accessed, e.g.).
1053 <method name="void ParticleDataEntry::setAll(
1054 string name, string antiName, int spinType = 0, int chargeType = 0,
1055 int colType = 0, double m0 = 0., double mWidth = 0., double mMin = 0.,
1056 double mMax = 0.,double tau0 = 0.)">
1057 change all the properties of the particle associated with a given
1061 <method name="int ParticleDataEntry::id()">
1062 the PDG identity code.
1065 <method name="bool ParticleDataEntry::hasAnti()">
1066 tell whether a separate antiparticle exists.
1069 <method name="void ParticleDataEntry::setName(string name)">
1071 <methodmore name="void ParticleDataEntry::setAntiName(string antiName)">
1073 <methodmore name="void ParticleDataEntry::setNames(string name,
1076 <methodmore name="string ParticleDataEntry::name(int id = 1)">
1077 set or get the particle or antiparticle name. Only the sign of
1078 <code>id</code> is needed to distinguish particle/antiparticle.
1081 <method name="void ParticleDataEntry::setSpinType(int spinType)">
1083 <methodmore name="int ParticleDataEntry::spinType()">
1084 set or get the particle spin type, i.e. <ei>2 s + 1</ei>, or 0 in some
1088 <method name="void ParticleDataEntry::setChargeType(int chargeType)">
1090 <methodmore name="int ParticleDataEntry::chargeType(int id = 1)">
1092 <methodmore name="double ParticleDataEntry::charge(int id = 1)">
1093 set or get the particle charge type, i.e. three times the charge,
1094 or the charge itself. Only the sign of <code>id</code> is needed
1095 to distinguish particle/antiparticle.
1098 <method name="void ParticleDataEntry::setColType(int colType)">
1100 <methodmore name="int ParticleDataEntry::colType(int id = 1)">
1101 set or get the particle colour type, 0 for singlet, 1 for triplet,
1102 -1 for antitriplet, 2 for octet. Only the sign of <code>id</code>
1103 is needed to distinguish particle/antiparticle.
1106 <method name="void ParticleDataEntry::setM0(double m0)">
1108 <methodmore name="double ParticleDataEntry::m0()">
1109 the nominal mass <ei>m_0</ei> (in GeV).
1112 <method name="void ParticleDataEntry::setMWidth(double mWidth)">
1114 <methodmore name="double ParticleDataEntry::mWidth()">
1115 the width <ei>Gamma</ei> of the Breit-Wigner distribution (in GeV).
1118 <method name="void ParticleDataEntry::setMMin(double mMin)">
1120 <methodmore name="double ParticleDataEntry::mMin()">
1121 the lower limit of the allowed mass range generated by the Breit-Wigner
1122 (in GeV). Has no meaning for particles without width, and would
1123 typically be 0 there.
1126 <method name="void ParticleDataEntry::setMMax(double mMax)">
1128 <methodmore name="double ParticleDataEntry::mMax()">
1129 the upper limit of the allowed mass range generated by the Breit-Wigner
1130 (in GeV). If <ei>mMax < mMin</ei> then no upper limit is imposed.
1131 Has no meaning for particles without width, and would typically
1135 <method name="double ParticleDataEntry::m0Min()">
1136 similar to <code>mMin()</code> above, except that for particles with
1137 no width the <code>m0(id)</code> value is returned.
1140 <method name="double ParticleDataEntry::m0Max()">
1141 similar to <code>mMax()</code> above, except that for particles with
1142 no width the <code>m0(id)</code> value is returned.
1145 <method name="void ParticleDataEntry::setTau0(double tau0)">
1147 <methodmore name="double ParticleDataEntry::tau0()">
1148 the nominal proper lifetime <ei>tau_0</ei> (in mm/c).
1151 <method name="void ParticleDataEntry::setIsResonance(bool isResonance)">
1153 <methodmore name="bool ParticleDataEntry::isResonance()">
1154 a flag telling whether a particle species are considered as a resonance
1155 or not. Here <aloc href="ResonanceDecays">"resonance"</aloc>
1156 is used as shorthand for any massive particle
1157 where the decay process should be counted as part of the hard process
1158 itself, and thus be performed before showers and other event aspects
1159 are added. Restrictions on allowed decay channels is also directly
1160 reflected in the cross section of simulated processes, while those of
1161 normal hadrons and other light particles are not.
1162 In practice, it is reserved for states above the <ei>b bbar</ei>
1163 bound systems in mass, i.e. for <ei>W, Z, t</ei>, Higgs states,
1164 supersymmetric states and (most?) other states in any new theory.
1165 All particles with <code>m0</code> above 20 GeV are by default
1166 initialized to be considered as resonances.
1169 <method name="void ParticleDataEntry::setMayDecay(bool mayDecay)">
1171 <methodmore name="bool ParticleDataEntry::mayDecay()">
1172 a flag telling whether a particle species may decay or not, offering
1173 the main user switch. Whether a given particle of this kind then actually
1174 will decay also depends on it having allowed decay channels, and on
1175 other flags for <aloc href="ParticleDecays">particle decays</aloc>.
1176 All particles with <code>tau0</code> below 1000 mm are
1177 by default initialized to allow decays.
1180 <method name="void ParticleDataEntry::setDoExternalDecays(bool
1183 <methodmore name="bool ParticleDataEntry::doExternalDecay()">
1184 a flag telling whether a particle should be handled by an external
1185 decay package or not, with the latter default. Can be manipulated as
1186 described on this page, but should normally not be. Instead the
1187 <code><aloc href="ExternalDecays">pythia.decayPtr</aloc></code>
1188 method should be provided with the list of relevant particles.
1191 <method name="void ParticleDataEntry::setIsVisible(bool isVisible)">
1193 <methodmore name="bool ParticleDataEntry::isVisible()">
1194 a flag telling whether a particle species is to be considered as
1195 visible in a detector or not, as used e.g. in analysis routines.
1196 By default this includes neutrinos and a few BSM particles
1197 (gravitino, sneutrinos, neutralinos) that have neither strong nor
1198 electromagnetic charge, and are not made up of constituents that
1199 have it. The value of this flag is only relevant if a particle is
1200 long-lived enough actually to make it to a detector.
1203 <method name="void ParticleDataEntry::setDoForceWidth(bool
1206 <methodmore name="bool ParticleDataEntry::doForceWidth()">
1207 a flag valid only for resonances where PYTHIA contains code to
1208 calculate the width of the resonance from encoded matrix-element
1209 expressions, i.e. the <ei>Z^0</ei>, <ei>W^+-</ei>, <ei>t</ei>,
1210 <ei>h^0</ei>, and a few more. The normal behaviour (<code>false</code>)
1211 is then that the width is calculated from the mass, but it is
1212 possible to <aloc href="ResonanceDecays">force</aloc> the resonance
1213 to retain the nominal width. Branching ratios and the running of the
1214 total width are unaffected.
1217 <method name="void ParticleDataEntry::setHasChanged(bool hasChanged)">
1219 <method name="void ParticleDataEntry::hasChanged(bool hasChanged)">
1220 keep track of whether the data for a particle has been changed
1221 in any respect between initialization and the current status.
1222 Is used e.g. by the <code>ParticleData::listChanged</code> method
1223 to determine which particles to list.
1226 <method name="void ParticleDataEntry::initBWmass()">
1227 Prepare the Breit-Wigner mass selection by precalculating
1228 frequently-used expressions.
1231 <method name="double ParticleDataEntry::constituentMass()">
1232 is the constituent mass for a quark, hardcoded as
1233 <ei>m_u = m_d = 0.325</ei>, <ei>m_s = 0.50</ei>, <ei>m_c = 1.60</ei>
1234 and <ei>m_b = 5.0</ei> GeV, for a diquark the sum of quark constituent
1235 masses, and for everything else the same as the ordinary mass.
1238 <method name="double ParticleDataEntry::mass()">
1239 give the mass of a particle, either at the nominal value
1240 or picked according to a (linear or quadratic) Breit-Wigner.
1243 <method name="double ParticleDataEntry::mRun(double mH)">
1244 calculate the running quark mass at a hard scale <code>mH</code>.
1245 For other particles the on-shell mass is given.
1248 <method name="bool ParticleDataEntry::useBreitWigner()">
1249 tells whether a particle will have a Breit-Wigner mass distribution or
1250 not. Is determined by an internal logic based on the particle width and
1251 on the value of the <code><aloc href="ParticleData">
1252 ParticleData:modeBreitWigner</aloc></code> switch.
1255 <method name="bool ParticleDataEntry::canDecay(int id)">
1256 true for a particle with at least one decay channel defined.
1259 <method name="bool ParticleDataEntry::isLepton()">
1260 true for a lepton or an antilepton (including neutrinos).
1263 <method name="bool ParticleDataEntry::isQuark()">
1264 true for a quark or an antiquark.
1267 <method name="bool ParticleDataEntry::isGluon()">
1271 <method name="bool ParticleDataEntry::isDiquark()">
1272 true for a diquark or antidiquark.
1275 <method name="bool ParticleDataEntry::isParton()">
1276 true for a gluon, a quark or antiquark up to the b (but excluding top),
1277 and a diquark or antidiquark consisting of quarks up to the b.
1280 <method name="bool ParticleDataEntry::isHadron()">
1281 true for a hadron (made up out of normal quarks and gluons,
1282 i.e. not for R-hadrons and other exotic states).
1285 <method name="bool ParticleDataEntry::isMeson()">
1289 <method name="bool ParticleDataEntry::isBaryon()">
1290 true for a baryon or antibaryon.
1293 <method name="bool ParticleDataEntry::isOctetHadron()">
1294 true for an intermediate hadron-like state with a colour octet charge
1295 as used in the colour octet model for
1296 <aloc href="OniaProcesses">onia</aloc> production.
1299 <method name="int ParticleDataEntry::heaviestQuark(int id)">
1300 extracts the heaviest quark or antiquark, i.e. one with largest
1301 <code>id</code> number, for a hadron. Only the sign of the input
1302 argument is relevant.
1305 <method name="int ParticleDataEntry::baryonNumberType(int id)">
1306 is 1 for a quark, 2 for a diquark, 3 for a baryon, the same with a
1307 minus sign for antiparticles, and else zero. Only the sign of the
1308 input argument is relevant.
1311 <method name="void ParticleDataEntry::clearChannels()">
1312 resets to an empty decay table.
1315 <method name="void ParticleDataEntry::addChannel(int onMode = 0,
1316 double bRatio = 0., int meMode = 0, int prod0 = 0, int prod1 = 0,
1317 int prod2 = 0, int prod3 = 0, int prod4 = 0, int prod5 = 0,
1318 int prod6 = 0, int prod7 = 0,)">
1319 adds a decay channel with up to 8 products.
1322 <method name="int ParticleDataEntry::sizeChannels()">
1323 returns the number of decay channels for a particle.
1326 <method name="DecayChannel& ParticleDataEntry::channel(int i)">
1328 <methodmore name="const DecayChannel& ParticleDataEntry::channel(int i)">
1329 gain access to a specified channel in the decay table.
1332 <method name="void ParticleDataEntry::rescaleBR(double newSumBR = 1.)">
1333 rescales all partial branching ratios by a common factor, such that
1334 the sum afterward becomes <code>newSumBR</code>.
1337 <method name="bool ParticleDataEntry::preparePick(int idSgn,
1338 double mHat = 0., int idInFlav = 0)">
1339 prepare to pick a decay channel.
1342 <method name="DecayChannel& ParticleDataEntry::pickChannel()">
1343 pick a decay channel according to branching ratios from
1344 <code>preparePick</code>.
1347 <method name="void ParticleDataEntry::setResonancePtr(ResonanceWidths*
1350 <methodmore name="ResonanceWidths* ParticleDataEntry::getResonancePtr()">
1351 set or get a pointer to an object that can be used for dynamic calculation
1352 of partial and total resonance widths. Here a resonance is a particle
1353 such as top, <ei>Z^0</ei>, <ei>W^+-</ei>, Higgs, and new unstable states
1354 beyond the Standard Model.
1357 <method name="void ParticleDataEntry::resInit(Info* infoPtrIn,
1358 Settings* settingsPtrIn, ParticleData* particleDataPtrIn,
1359 CoupSM* coupSMPtrIn)">
1360 initialize the treatment of a resonance.
1363 <method name="double ParticleDataEntry::resWidth(int idSgn,
1364 double mHat, int idInFlav = 0, bool openOnly = false,
1365 bool setBR = false)">
1366 calculate the total with for a resonance of a given current mass,
1367 optionally including coupling to incoming flavour state (consider
1368 the <ei>gamma*/Z^0</ei> combination), optionally excluding decay
1369 channels that have been closed by the user, and optionally storing
1370 the results in the normal decay table. For the first argument only
1371 the sign is relevant.
1374 <method name="double ParticleDataEntry::resWidthOpen(int idSgn,
1375 double mHat, int idInFlav = 0)">
1376 special case of <code>resWidth</code>, where only open channels are
1377 included, but results are not stored in the normal decay table.
1380 <method name="double ParticleDataEntry::resWidthStore(int idSgn,
1381 double mHat, int idInFlav = 0)">
1382 special case of <code>resWidth</code>, where only open channels are
1383 included, and results are stored in the normal decay table.
1386 <method name="double ParticleDataEntry::resOpenFrac(int idSgn)">
1387 calculate the fraction of the full branching ratio that is left
1388 open by the user choice of allowed decay channels.
1391 <method name="double ParticleDataEntry::resWidthRescaleFactor()">
1392 the factor used to rescale all partial widths in case the total
1393 width is being forced to a specific value by the user.
1396 <method name="double ParticleDataEntry::resWidthChan(double mHat,
1397 int idAbs1 = 0, int idAbs2 = 0)">
1398 special case to calculate one final-state width; currently only used
1399 for Higgs decay to <ei>q qbar</ei>, <ei>g g</ei> or
1400 <ei>gamma gamma</ei>.
1403 <h3>The DecayChannel methods</h3>
1405 The properties stored in an individual decay channel can be set or get
1406 by the methods in this section.
1408 <method name="DecayChannel::DecayChannel(int onMode = 0,
1409 double bRatio = 0., int meMode = 0, int prod0 = 0, int prod1 = 0,
1410 int prod2 = 0, int prod3 = 0, int prod4 = 0, int prod5 = 0,
1411 int prod6 = 0, int prod7 = 0)">
1412 the constructor for a decay channel. Internal.
1415 <method name="void DecayChannel::onMode(int onMode)">
1417 <methodmore name="int DecayChannel::onMode()">
1418 set or get the <code>onMode</code> of a decay channel,<br/>
1419 0 if a channel is off,<br/>
1421 2 if on for a particle but off for an antiparticle,<br/>
1422 3 if on for an antiparticle but off for a particle.<br/>
1423 If a particle is its own antiparticle then 2 is on and 3 off
1424 but, of course, for such particles it is much simpler and safer
1425 to use only 1 and 0.<br/>
1426 The 2 and 3 options can be used e.g. to encode CP violation in
1427 B decays, or to let the <ei>W</ei>'s in a <ei>q qbar -> W^+ W^-</ei>
1428 process decay in different channels.
1431 <method name="void DecayChannel::bRatio(double bRatio,
1432 bool countAsChanged = true)">
1434 <methodmore name="double DecayChannel::bRatio()">
1435 set or get the branching ratio of the channel. Second argument only
1439 <method name="void DecayChannel::rescaleBR(double fac)">
1440 multiply the current branching ratio by <code>fac</code>.
1443 <method name="void DecayChannel::meMode(int meMode)">
1445 <methodmore name="int DecayChannel::meMode()">
1446 set or get the mode of processing this channel, possibly with matrix
1447 elements (see the <aloc href="ParticleDecays">particle decays</aloc>
1451 <method name="void DecayChannel::multiplicity(int multiplicity)">
1453 <methodmore name="int DecayChannel::multiplicity()">
1454 set or get the number of decay products in a channel, at most 8.
1455 (Is normally not to be set by hand, since it is automatically
1456 updated whenever the products list is changed.)
1459 <method name="void DecayChannel::product(int i, int product)">
1461 <methodmore name="int DecayChannel::product(int i)">
1462 set or get a list of the decay products, 8 products 0 <= i < 8,
1463 with trailing unused ones set to 0.
1466 <method name="void DecayChannel::setHasChanged(bool hasChanged)">
1468 <methodmore name="bool DecayChannel::hasChanged()">
1469 used for internal purposes, to know which decay modes have been changed.
1472 <method name="bool DecayChannel::contains(int id1)">
1474 <methodmore name="bool DecayChannel::contains(int id1, int id2)">
1476 <methodmore name="bool DecayChannel::contains(int id1, int id2, int id3)">
1477 find if the decay product list contains the one, two or three particle
1478 identities provided. If the same code is repeated then so must it be in
1479 the products list. Matching also requires correct sign.
1482 <method name="void DecayChannel::currentBR(double currentBR)">
1484 <methodmore name="double DecayChannel::currentBR()">
1485 set or get the current branching ratio, taking into account on/off
1486 switches and dynamic width for resonances. For internal use.
1489 <method name="void DecayChannel::onShellWidth(double onShellWidth)">
1491 <methodmore name="double DecayChannel::onShellWidth()">
1492 set or get the current partial width of the channel; intended for
1493 resonances where the widhts are recalculated based on the current
1494 resonance mass. For internal use.
1497 <method name="void DecayChannel::onShellWidthFactor(double factor)">
1498 multiply the current partial width by <code>factor</code>.
1501 <method name="void DecayChannel::openSec(int idSgn, double openSecIn)">
1503 <methodmore name="double DecayChannel::openSec(nt idSgn)">
1504 set or get the fraction of secondary open widths, separately for
1505 positive and negative particles. For internal use.
1510 <!-- Copyright (C) 2012 Torbjorn Sjostrand -->