This file is indexed.

/usr/share/pythia8-data/xmldoc/ParticleProperties.xml is in pythia8-data 8.1.80-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
<chapter name="Particle Properties">

<h2>Particle Properties</h2>

A <code>Particle</code> corresponds to one entry/slot in the 
event record. Its properties therefore is a mix of ones belonging 
to a particle-as-such, like its identity code or four-momentum, 
and ones related to the event-as-a-whole, like which mother it has. 

<p/>
What is stored for each particle is 
<ul>
<li>the identity code,</li> 
<li>the status code,</li> 
<li>two mother indices,</li>
<li>two daughter indices,</li> 
<li>a colour and an anticolour index,</li> 
<li>the four-momentum and mass,</li>
<li>the scale at which the particle was produced (optional),</li> 
<li>the polarization/spin/helicity of the particle (optional),</li>
<li>the production vertex and proper lifetime (optional),</li>
<li>a pointer to the particle kind in the particle data table, and</li>
<li>a pointer to the event the particle belongs to.</li>
</ul>
From these, a number of further quantities may be derived.

<h3>Basic output methods</h3>

The following member functions can be used to extract the most important 
information:

<method name="int Particle::id()">
the identity of a particle, according to the PDG particle codes 
<ref>Yao06</ref>.
</method>

<method name="int Particle::status()">
status code. The status code includes information on how a particle was 
produced, i.e. where in the program execution it was inserted into the 
event record, and why. It also tells whether the particle is still present 
or not. It does not tell how a particle disappeared, whether by a decay, 
a shower branching, a hadronization process, or whatever, but this is 
implicit in the status code of its daughter(s). The basic scheme is:
<ul>
<li>status = +- (10 * i + j)</li>
<li> +          : still remaining particles</li>
<li> -          : decayed/branched/fragmented/... and not remaining</li>
<li> i =  1 - 9 : stage of event generation inside PYTHIA</li>
<li> i = 10 -19 : reserved for future expansion</li>
<li> i >= 20    : free for add-on programs</li>
<li> j = 1 - 9  : further specification</li>
</ul>
In detail, the list of used or foreseen status codes is: 
<ul>
<li>11 - 19 : beam particles</li> 
  <ul>
  <li>11 : the event as a whole</li> 
  <li>12 : incoming beam</li>
  <li>13 : incoming beam-inside-beam (e.g. <ei>gamma</ei> 
           inside <ei>e</ei>)</li>
  <li>14 : outgoing elastically scattered</li> 
  <li>15 : outgoing diffractively scattered</li>
  </ul>
<li>21 - 29 : particles of the hardest subprocess</li>
  <ul>
  <li>21 : incoming</li>
  <li>22 : intermediate (intended to have preserved mass)</li>
  <li>23 : outgoing</li>
  </ul>
<li>31 - 39 : particles of subsequent subprocesses</li>
  <ul>
  <li>31 : incoming</li>
  <li>32 : intermediate (intended to have preserved mass)</li> 
  <li>33 : outgoing</li> 
  <li>34 : incoming that has already scattered</li> 
  </ul>
<li>41 - 49 : particles produced by initial-state-showers</li>
  <ul>
  <li>41 : incoming on spacelike main branch</li>
  <li>42 : incoming copy of recoiler</li>
  <li>43 : outgoing produced by a branching</li>
  <li>44 : outgoing shifted by a branching</li>
  <li>45 : incoming rescattered parton, with changed kinematics
           owing to ISR in the mother system (cf. status 34)</li>
  <li>46 : incoming copy of recoiler when this is a rescattered 
           parton (cf. status 42)</li>
  <li>47 : a <ei>W</ei> or <ei>Z</ei> gauge boson produced in the
           shower evolution</li>
  </ul>
<li>51 - 59 : particles produced by final-state-showers</li>
  <ul>
  <li>51 : outgoing produced by parton branching</li>
  <li>52 : outgoing copy of recoiler, with changed momentum</li>  
  <li>53 : copy of recoiler when this is incoming parton, 
           with changed momentum</li>  
  <li>54 : copy of a recoiler, when in the initial state of a 
           different system from the radiator</li>
  <li>55 : copy of a recoiler, when in the final state of a 
           different system from the radiator</li>
  <li>56 : a <ei>W</ei> or <ei>Z</ei> gauge boson produced in the
           shower evolution</li>
  </ul>
<li>61 - 69 : particles produced by beam-remnant treatment</li>
  <ul>
  <li>61 : incoming subprocess particle with primordial <ei>kT</ei> 
           included</li>
  <li>62 : outgoing subprocess particle with primordial <ei>kT</ei> 
           included</li>
  <li>63 : outgoing beam remnant</li>  
  </ul>
<li>71 - 79 : partons in preparation of hadronization process</li>
  <ul>
  <li>71 : copied partons to collect into contiguous colour singlet</li>  
  <li>72 : copied recoiling singlet when ministring collapses to
           one hadron and momentum has to be reshuffled</li>
  <li>73 : combination of very nearby partons into one</li>
  <li>74 : combination of two junction quarks (+ nearby gluons) 
           to a diquark</li>  
  <li>75 : gluons split to decouple a junction-antijunction pair</li> 
  <li>76 : partons with momentum shuffled to decouple a 
           junction-antijunction pair </li>
  <li>77 : temporary opposing parton when fragmenting first two 
           strings in to junction (should disappear again)</li>
  <li>78 : temporary combined diquark end when fragmenting last 
           string in to junction (should disappear again)</li>
  </ul>
<li>81 - 89 : primary hadrons produced by hadronization process</li>
  <ul>
  <li>81 : from ministring into one hadron</li>
  <li>82 : from ministring into two hadrons</li>
  <li>83, 84 : from normal string (the difference between the two 
           is technical, whether fragmented off from the top of the 
           string system or from the bottom, useful for debug only)</li>
  <li>85, 86 : primary produced hadrons in junction fragmentation of 
           the first two string legs in to the junction, 
           in order of treatment</li>
  </ul>
<li>91 - 99 : particles produced in decay process, or by Bose-Einstein 
  effects</li>
  <ul>
  <li>91 : normal decay products</li>
  <li>92 : decay products after oscillation <ei>B0 &lt;-> B0bar</ei> or 
           <ei>B_s0 &lt;-> B_s0bar</ei></li>
  <li>93, 94 : decay handled by external program, normally
           or with oscillation</li>
  <li>99 : particles with momenta shifted by Bose-Einstein effects
           (not a proper decay, but bookkept as an <ei>1 -> 1</ei> such,
           happening after decays of short-lived resonances but before
           decays of longer-lived particles)</li>
  </ul>
<li>101 - 109 : particles in the handling of R-hadron production and 
  decay, i.e. long-lived (or stable) particles containing a very heavy
  flavour</li>
  <ul>
  <li>101 : when a string system contains two such long-lived particles,
            the system is split up by the production of a new q-qbar
            pair (bookkept as decay chains that seemingly need not conserve
            flavour etc., but do when considered together)</li>
  <li>102 : partons rearranged from the long-lived particle end to prepare
            for fragmentation from this end</li>
  <li>103 : intermediate "half-R-hadron" formed when a colour octet particle
            (like the gluino) has been fragmented on one side, but not yet on
            the other</li>
  <li>104 : an R-hadron</li>
  <li>105 : partons or particles formed together with the R-hadron during
            the fragmentation treatment</li>
  <li>106 : subdivision of an R-hadron into its flavour content, with
           momentum split accordingly, in preparation of the decay of 
           the heavy new particle, if it is unstable</li>
  <li>107 : two temporary leftover gluons joined into one in the formation
          of a gluino-gluon R-hadron.</li>
  </ul>
<li>111 - 199 : reserved for future expansion</li>
<li>201 - : free to be used by anybody</li>   
</ul>
</method>

<method name="int Particle::mother1()">
</method>
<methodmore name="int Particle::mother2()">
the indices in the event record where the first and last mothers are 
stored, if any. There are five allowed combinations of <code>mother1</code> 
and <code>mother2</code>:
<ol>
<li><code>mother1 = mother2 = 0</code>: for lines 0 - 2, where line 0 
represents the event as a whole, and 1 and 2 the two incoming 
beam particles; </li>
<li><code>mother1 = mother2 > 0</code>: the particle is a "carbon copy" 
of its mother, but with changed momentum as a "recoil"  effect, 
e.g. in a shower;</li>
<li><code>mother1 > 0, mother2 = 0</code>: the "normal" mother case, where 
it is meaningful to speak of one single mother to several products, 
in a shower or decay;</li>
<li><code>mother1 &lt; mother2</code>, both > 0, for 
<code>abs(status) = 81 - 86</code>: primary hadrons produced from the 
fragmentation of a string spanning the range from <code>mother1</code> 
to <code>mother2</code>, so that all partons in this range should be 
considered mothers; and analogously for 
<code>abs(status) = 101 - 106</code>, the formation of R-hadrons;</li>
<li><code>mother1 &lt; mother2</code>, both > 0, except case 4: particles 
with two truly different mothers, in particular the particles emerging 
from a hard <ei>2 -> n</ei> interaction.</li>
</ol>    
<note>Note 1:</note> in backwards evolution of initial-state showers, 
the mother may well appear below the daughter in the event record. 
<note>Note 2:</note> the <code>motherList()</code> method below returns 
a vector of all the mothers, providing a uniform representation for all 
five cases. 
</methodmore>

<method name="int Particle::daughter1()">
</method>
<methodmore name="int Particle::daughter2()">
the indices in the event record where the first and last daughters 
are stored, if any. There are five allowed combinations of 
<code>daughter1</code> and <code>daughter2</code>:
<ol>
<li><code>daughter1 = daughter2 = 0</code>: there are no daughters 
(so far);</li>
<li><code>daughter1 = daughter2 > 0</code>: the particle has a 
"carbon copy" as its sole daughter, but with changed momentum 
as a "recoil" effect, e.g. in a shower;</li> 
<li><code>daughter1 > 0, daughter2 = 0</code>: each of the incoming beams 
has only (at most) one daughter, namely the initiator parton of the 
hardest interaction; further, in a <ei>2 -> 1</ei> hard interaction, 
like <ei>q qbar -> Z^0</ei>, or in a clustering of two nearby partons, 
the initial partons only have this one daughter;</li> 
<li><code>daughter1 &lt; daughter2</code>, both > 0: the particle has 
a range of decay products from <code>daughter1</code> to 
<code>daughter2</code>;</li> <li><code>daughter2 &lt; daughter1</code>, 
both > 0: the particle has two separately stored decay products (e.g. 
in backwards evolution of initial-state showers).</li>
</ol>
<note>Note 1:</note> in backwards evolution of initial-state showers, the 
daughters may well appear below the mother in the event record. 
<note>Note 2:</note> the mother-daughter relation normally is reciprocal,
but not always. An example is hadron beams (indices 1 and 2), where each 
beam remnant and the initiator of each multiparton interaction has the 
respective beam as mother, but the beam itself only has the initiator 
of the hardest interaction as daughter.
<note>Note 3:</note> the <code>daughterList()</code> method below 
returns a vector of all the daughters, providing a uniform representation 
for all five cases. With this method, also all the daughters of the beams 
are caught, with the initiators of the basic process given first,  while 
the rest are in no guaranteed order (since they are found by a scanning 
of the event record for particles with the beam as mother, with no further 
information). 
</methodmore>

<method name="int Particle::col()"> 
</method>
<methodmore name="int Particle::acol()"> 
the colour and anticolour tags, Les Houches Accord <ref>Boo01</ref> 
style (starting from tag 101 by default, see below).
<note>Note:</note> in the preliminary implementation of colour sextets
(exotic BSM particles) that exists since PYTHIA 8.150, a negative
anticolour tag is interpreted as an additional positive colour tag,
and vice versa.  
</methodmore>

<method name="double Particle::px()">
</method>
<methodmore name="double Particle::py()">
</methodmore>
<methodmore name="double Particle::pz()">
</methodmore>
<methodmore name="double Particle::e()">
the particle four-momentum components.
</methodmore>

<method name="Vec4 Particle::p()">
the particle four-momentum vector, with components as above.
</method>

<method name="double Particle::m()"> 
the particle mass, stored with a minus sign (times the absolute value)
for spacelike virtual particles.
</method>

<method name="double Particle::scale()">  
the scale at which a parton was produced, which can be used to restrict 
its radiation to lower scales in subsequent steps of the shower evolution. 
Note that scale is linear in momenta, not quadratic (i.e. <ei>Q</ei>, 
not <ei>Q^2</ei>). 
</method>

<method name="double Particle::pol()">  
the polarization/spin/helicity of a particle. Currently Pythia does not
use this variable for any internal operations, so its meaning is not 
uniquely defined. The LHA standard sets <code>SPINUP</code> to be the 
cosine of the angle between the spin vector and the 3-momentum of the
decaying particle in the lab frame, i.e. restricted to be between +1 
and -1. A more convenient choice could be the same quantity in the rest 
frame of the particle production, either the hard subprocess or the 
mother particle of a decay. Unknown or unpolarized particles should
be assigned the value 9.
</method>

<method name="double Particle::xProd()">
</method>
<methodmore name="double Particle::yProd()">
</methodmore>
<methodmore name="double Particle::zProd()">
</methodmore>
<methodmore name="double Particle::tProd()">
the production vertex coordinates, in mm or mm/c.
</methodmore>

<method name="Vec4 Particle::vProd()">
The production vertex four-vector. Note that the components of a 
<code>Vec4</code> are named <code>px(), py(), pz() and e()</code>
which of course then should be reinterpreted as above. 
</method>

<method name="double Particle::tau()">  
the proper lifetime, in mm/c. It is assigned for all hadrons with
positive nominal <ei>tau</ei>, <ei>tau_0 > 0</ei>, because it can be used 
by PYTHIA to decide whether a particle should or should not be allowed
to decay, e.g. based on the decay vertex distance to the primary interaction 
vertex.
</method>

<h3>Input methods</h3>

The same method names as above are also overloaded in versions that 
set values. These have an input argument of the same type as the 
respective output above, and are of type <code>void</code>.

<p/>
There are also a few alternative methods for input:

<method name="void Particle::statusPos()">
</method>
<methodmore name="void Particle::statusNeg()">
sets the status sign positive or negative, without changing the absolute value.
</methodmore>

<method name="void Particle::statusCode(int code)">
changes the absolute value but retains the original sign. 
</method>

<method name="void Particle::mothers(int mother1, int mother2)">
sets both mothers in one go.
</method>

<method name="void Particle::daughters(int daughter1, int daughter2)">
sets both daughters in one go.
</method>

<method name="void Particle::cols(int col, int acol)">
sets both colour and anticolour in one go.
</method>

<method name="void Particle::p(double px, double py, double pz, double e)">
sets the four-momentum components in one go.
</method>

<method name="void Particle::vProd(double xProd, double yProd, 
double zProd, double tProd)">
sets the production vertex components in one go.
</method>

<h3>Further output methods</h3>

In addition, a number of derived quantities can easily be obtained, 
but cannot be set, such as:

<method name="int Particle::idAbs()">
the absolute value of the particle identity code.
</method>

<method name="int Particle::statusAbs()">
the absolute value of the status code.
</method>

<method name="bool Particle::isFinal()">
true for a remaining particle, i.e. one with positive status code, 
else false. Thus, after an event has been fully generated, it 
separates the final-state particles from intermediate-stage ones. 
(If used earlier in the generation process, a particle then 
considered final may well decay later.)  
</method>

<method name="bool Particle::isRescatteredIncoming()">
true for particles with a status code -34, -45, -46 or -54, else false. 
This singles out partons that have been created in a previous
scattering but here are bookkept as belonging to the incoming state
of another scattering.
</method>

<method name="bool Particle::hasVertex()">
production vertex has been set; if false then production at the origin 
is assumed.
</method>

<method name="double Particle::m2()">
squared mass, which can be negative for spacelike partons.
</method>

<method name="double Particle::mCalc()">
</method>
<methodmore name="double Particle::m2Calc()">
(squared) mass calculated from the four-momentum; should agree 
with <code>m(), m2()</code> up to roundoff. Negative for spacelike
virtualities.
</methodmore>

<method name="double Particle::eCalc()">
energy calculated from the mass and three-momentum; should agree 
with <code>e()</code> up to roundoff. For spacelike partons a 
positive-energy  solution is picked. This need not be the correct 
one, so it is recommended not to use the method in such cases.
</method>

<method name="double Particle::pT()">
</method>
<methodmore name="double Particle::pT2()">
(squared) transverse momentum.
</methodmore>

<method name="double Particle::mT()">
</method>
<methodmore name="double Particle::mT2()">
(squared) transverse mass. If <ei>m_T^2</ei> is negative, which can happen
for a spacelike parton, then <code>mT()</code> returns 
<ei>-sqrt(-m_T^2)</ei>, by analogy with the negative sign used to store
spacelike masses.  
</methodmore>

<method name="double Particle::pAbs()">
</method>
<methodmore name="double Particle::pAbs2()">
(squared) three-momentum size.
</methodmore>

<method name="double Particle::eT()">
</method>
<methodmore name="double Particle::eT2()">
(squared) transverse energy,
<ei>eT = e * sin(theta) = e * pT / pAbs</ei>.
</methodmore>

<method name="double Particle::theta()">
</method>
<methodmore name="double Particle::phi()">
polar and azimuthal angle.
</methodmore>

<method name="double Particle::thetaXZ()">
angle in the <ei>(p_x, p_z)</ei> plane, between <ei>-pi</ei> and 
<ei>+pi</ei>, with 0 along the <ei>+z</ei> axis 
</method>

<method name="double Particle::pPos()">
</method>
<methodmore name="double Particle::pNeg()">
<ei>E +- p_z</ei>. 
</methodmore>

<method name="double Particle::y()">
</method>
<methodmore name="double Particle::eta()">
rapidity and pseudorapidity.
</methodmore>

<method name="double Particle::xDec()"> 
</method>
<methodmore name="double Particle::yDec()"> 
</methodmore>
<methodmore name="double Particle::zDec()"> 
</methodmore>
<methodmore name="double Particle::tDec()"> 
</methodmore>
<methodmore name="Vec4 Particle::vDec()"> 
the decay vertex coordinates, in mm or mm/c. This decay vertex is 
calculated from the production vertex, the proper lifetime and the 
four-momentum assuming no magnetic field or other detector interference. 
It can be used to decide whether a decay should be performed or not, 
and thus is defined also for particles which PYTHIA did not let decay.
</methodmore>

<p/>
Not part of the <code>Particle</code> class proper, but obviously tightly 
linked, are the two methods 

<method name="double m(const Particle& pp1, const Particle& pp2)">
</method>
<methodmore name="double m2(const Particle& pp1, const Particle& pp2)">
the (squared) invariant mass of two particles.
</methodmore>

<h3>Properties of the particle species</h3>

Each Particle contains a pointer to the respective 
<code>ParticleDataEntry</code> object in the 
<aloc href="ParticleDataScheme">particle data tables</aloc>. 
This gives access to properties of the particle species as such. It is 
there mainly for convenience, and should be thrown if an event is 
written to disk, to avoid any problems of object persistency. Should 
an event later be read back in, the pointer will be recreated from the 
<code>id</code> code if the normal input methods are used. (Use the
<code><aloc href="EventRecord">Event::restorePtrs()</aloc></code> method 
if your persistency scheme bypasses the normal methods.) This pointer is 
used by the following member functions:

<method name="string Particle::name()">
the name of the particle.
</method>

<method name="string Particle::nameWithStatus()">
as above, but for negative-status particles the name is given in 
brackets to emphasize that they are intermediaries.
</method>

<method name="int Particle::spinType()">
<ei>2 *spin + 1</ei> when defined, else 0.
</method>

<method name="double Particle::charge()">
</method>
<methodmore name="int Particle::chargeType()">
charge, and three times it to make an integer.
</methodmore>

<method name="bool Particle::isCharged()">
</method>
<methodmore name="bool Particle::isNeutral()">
charge different from or equal to 0.
</methodmore>

<method name="int Particle::colType()">
0 for colour singlets, 1 for triplets, 
-1 for antitriplets and 2 for octets. (A preliminary implementation of
colour sextets also exists, using 3 for sextets and -3 for antisextets.)
</method>

<method name="double Particle::m0()">
the nominal mass of the particle, according to the data tables.
</method>

<method name="double Particle::mWidth()">
</method>
<methodmore name="double Particle::mMin()"> 
</methodmore>
<methodmore name="double Particle::mMax()">
the width of the particle, and the minimum and maximum allowed mass value
for particles with a width, according to the data tables.
</methodmore>

<method name="double Particle::mSel()">
the mass of the particle, picked according to a Breit-Wigner 
distribution for particles with width. It is different each time called, 
and is therefore only used once per particle to set its mass
<code>m()</code>.
</method>

<method name="double Particle::constituentMass()">
will give the constituent masses for quarks and diquarks, 
else the same masses as with <code>m0()</code>.
</method>

<method name="double Particle::tau0()">  
the nominal lifetime <ei>tau_0 > 0</ei>, in mm/c, of the particle species. 
It is used to assign the actual lifetime <ei>tau</ei>.
</method>

<method name="bool Particle::mayDecay()">
flag whether particle has been declared unstable or not, offering 
the main user switch to select which particle species to decay.
</method>

<method name="bool Particle::canDecay()">
flag whether decay modes have been declared for a particle, 
so that it could be decayed, should that be requested.
</method>

<method name="bool Particle::doExternalDecay()">
particles that are decayed by an external program.
</method>

<method name="bool Particle::isResonance()">
particles where the decay is to be treated as part of the hard process,
typically with nominal mass above 20 GeV (<ei>W^+-, Z^0, t, ...</ei>). 
</method>

<method name="bool Particle::isVisible()">
particles with strong or electric charge, or composed of ones having it,  
which thereby should be considered visible in a normal detector.
</method>

<method name="bool Particle::isLepton()">
true for a lepton or an antilepton (including neutrinos).
</method>

<method name="bool Particle::isQuark()">
true for a quark or an antiquark.
</method>

<method name="bool Particle::isGluon()">
true for a gluon.
</method>

<method name="bool Particle::isDiquark()">
true for a diquark or an antidiquark.
</method>

<method name="bool Particle::isParton()">
true for a gluon, a quark or antiquark up to the b (but excluding top),
and a diquark or antidiquark consisting of quarks up to the b.
</method>

<method name="bool Particle::isHadron()">
true for a hadron (made up out of normal quarks and gluons, 
i.e. not for R-hadrons and other exotic states).
</method>

<method name="ParticleDataEntry& particleDataEntry()">
a reference to the ParticleDataEntry.
</method>

<h3>Methods that may access the event the particle belongs to</h3>

A particle can be created on its own. When inserted into an event record,
it obtains a pointer to that event-as-a-whole. It is then possible to 
use methods that do not make sense for a particle in isolation. These
methods are listed below. Whenever the pointer to the event is not 
defined, these will return an appropriate "null" value, this being -1
for an integer, false for a bool, and empty for a vector, unless otherwise
specified.  

<method name="void Particle::index()">
the index of the particle itself in the event record.
</method>

<method name="int Particle::statusHepMC()">
returns the status code according to the HepMC conventions agreed in
February 2009. This convention does not preserve the full information
provided by the internal PYTHIA status code, as obtained by
<code>Particle::status()</code>, but comes reasonably close. 
The allowed output values are:
<ul>
<li>0 : an empty entry, with no meaningful information and therefore
to be skipped unconditionally;</li> 
<li>1 : a final-state particle, i.e. a particle that is not decayed
further by the generator (may also include unstable particles that 
are to be decayed later, as part of the detector simulation);</li> 
<li>2 : a decayed Standard Model hadron or tau or mu lepton, excepting 
virtual intermediate states thereof (i.e. the particle must undergo
a normal decay, not e.g. a shower branching);</li>
<li>3 : a documentation entry (not used in PYTHIA);</li> 
<li>4 : an incoming beam particle;</li> 
<li>11 - 200 : an intermediate (decayed/branched/...) particle that does 
not fulfill the criteria of status code 2, with a generator-dependent 
classification of its nature; in PYTHIA the absolute value of the normal 
status code is used.</li> 
</ul>
<note>Note:</note> for a particle without a properly set pointer to its
event, codes 1 and 4 can still be inferred from its status code, while
everythg else is assigned code 0. 
</method>

<method name="int Particle::iTopCopy()"> 
</method>
<methodmore name="int Particle::iBotCopy()"> 
are used to trace carbon copies of the particle up to its top mother 
or down to its bottom daughter. If there are no such carbon copies, 
the index of the particle itself will be returned. A carbon copy is 
when the "same" particle appears several times in the event record, but 
with changed momentum owing to recoil effects. 
</methodmore>

<method name="int Particle::iTopCopyId()"> 
</method>
<methodmore name="int Particle::iBotCopyId()"> 
also trace top mother and bottom daughter, but do not require carbon 
copies, only that one can find an unbroken chain, of mothers or daughters, 
with the same flavour <code>id</code> code. When it encounters ambiguities,
say a <ei>g -> g g</ei> branching or a <ei>u u -> u u</ei> hard scattering,
it will stop the tracing and return the current position. It can be confused
by nontrivial flavour changes, e.g. a hard process <ei>u d -> d u</ei>  
by <ei>W^+-</ei> exchange will give the wrong answer. These methods
therefore are of limited use for common particles, in particular for the
gluon, but should work well for "rare" particles. 
</methodmore>

<method name="vector&lt;int&gt; Particle::sisterList(bool traceTopBot 
= false)"> 
returns a vector of all the sister indices of the particle, i.e. all the 
daughters of the first mother, except the particle itself. If the argument
<code>traceTopBot = true</code> the particle is first traced up with 
<code>iTopCopy()</code> before its mother is found, and then all the 
particles in the <code>daughterList()</code> of this mother are traced down 
with <code>iBotCopy()</code>, omitting the original particle itself.
The method is not meaningful for the 0 entry, with status code -11, and
there returns an empty list. 
</method>

<method name="bool Particle::isAncestor(int iAncestor)"> 
traces the particle upwards through mother, grandmother, and so on, until 
either <ei>iAncestor</ei> is found or the top of the record is reached. 
Normally one unique mother is required, as is the case e.g. in decay chains 
or in parton showers, so that e.g. the tracing through a hard scattering 
would not work. For hadronization, first-rank hadrons are identified with 
the respective string endpoint quark, which may be useful e.g. for 
<ei>b</ei> physics, while higher-rank hadrons give <code>false</code>. 
Currently also ministrings that collapsed to one single hadron and 
junction topologies give <code>false</code>.  
</method>

<method name="bool Particle::undoDecay()">
removes the decay chain of the particle and thus restores 
it to its undecayed state. It is only intended for "normal" particle
decay chains, and will return false in other cases, notably if 
the particle is coloured. The procedure would not work if non-local
momentum shifts have been performed, such as with a Bose-Einstein 
shift procedure (or for a dipole shower recoiler). As the decay products
are erased from the event record, mother and daughter indices are 
updated to retain a correct history for the remaining particles.
</method>

<h3>Methods that perform operations</h3>

There are some further methods, some of them inherited from 
<code>Vec4</code>, to modify the properties of a particle.
They are of little interest to the normal user.

<method name="void Particle::rescale3(double fac)">
multiply the three-momentum components by <code>fac</code>.
</method>

<method name="void Particle::rescale4(double fac)">
multiply the four-momentum components by <code>fac</code>.
</method>

<method name="void Particle::rescale5(double fac)">
multiply the four-momentum components and the mass by <code>fac</code>.
</method>

<method name="void Particle::rot(double theta, double phi)">
rotate three-momentum and production vertex by these polar and azimuthal 
angles.
</method>

<method name="void Particle::bst(double betaX, double betaY, double betaZ)">
boost four-momentum and production vertex by this three-vector.
</method>

<method name="void Particle::bst(double betaX, double betaY, double betaZ, 
double gamma)">
as above, but also input the <ei>gamma</ei> value, to reduce roundoff errors. 
</method>

<method name="void Particle::bst(const Vec4& pBst)">
boost four-momentum and production vertex by 
<ei>beta = (px/e, py/e, pz/e)</ei>.
</method>

<method name="void Particle::bst(const Vec4& pBst, double mBst)">
as above, but also use <ei>gamma> = e/m</ei> to reduce roundoff errors.
</method>

<method name="void Particle::bstback(const Vec4& pBst)">
</method>
<methodmore name="void Particle::bstback(const Vec4& pBst, double mBst)">
as above, but with sign of boost flipped.
</methodmore>

<method name="void Particle::rotbst(const RotBstMatrix& M)">
combined rotation and boost of the four-momentum and production vertex.  
</method>

<method name="void Particle::offsetHistory( int minMother, int addMother, 
int minDaughter, int addDaughter))">
add a positive offset to the mother and daughter indices, i.e. 
if <code>mother1</code> is above <code>minMother</code> then 
<code>addMother</code> is added to it, same with <code>mother2</code>,
if <code>daughter1</code> is above <code>minDaughter</code> then 
<code>addDaughter</code> is added to it, same with <code>daughter2</code>.
</method>

<method name="void Particle::offsetCol( int addCol)">
add a positive offset to colour indices, i.e. if <code>col</code> is 
positive then <code>addCol</code> is added to it, same with <code>acol</code>.
</method>

<h3>Constructors and operators</h3>

Normally a user would not need to create new particles. However, if 
necessary, the following constructors and methods may be of interest.

<method name="Particle::Particle()">
constructs an empty particle, i.e. where all properties have been set 0
or equivalent.
</method>

<method name="Particle::Particle(int id, int status = 0, int mother1 = 0, 
int mother2 = 0, int daughter1 = 0, int daughter2 = 0, int col = 0, 
int acol = 0, double px = 0., double py = 0., double pz = 0., double e = 0., 
double m = 0., double scale = 0., double pol = 9.)">
constructs a particle with the input properties provided, and non-provided
ones set 0 (9 for <code>pol</code>).
</method>

<method name="Particle::Particle(int id, int status, int mother1, int mother2, 
int daughter1, int daughter2, int col, int acol, Vec4 p, double m = 0., 
double scale = 0., double pol = 9.)">
constructs a particle with the input properties provided, and non-provided
ones set 0 (9 for <code>pol</code>).
</method>

<method name="Particle::Particle(const Particle& pt)">
constructs an particle that is a copy of the input one.
</method>

<method name="Particle& Particle::operator=(const Particle& pt)">
copies the input particle.
</method>

<method name="void Particle::setEvtPtr(Event* evtPtr)">
sets the pointer to the <code>Event</code> object the particle
belongs to. This method is automatically called when a particle
is appended to an event record. Also calls <code>setPDEPtr</code> below.
</method>

<method name="void Particle::setPDEPtr(ParticleDataEntry* pdePtr = 0)">
sets the pointer to the <code>ParticleDataEntry</code> object of the
particle, based on its current <code>id</code> code. If the particle
belongs to an event there is no need to provide the input argument. 
As explained above, a valid <code>ParticleDataEntry</code> pointer 
is needed for the methods that provide information generic to the 
particle species. 
</method>

</chapter>

<!-- Copyright (C) 2013 Torbjorn Sjostrand -->