Corrected path to mapping libraries.
[u/mrichter/AliRoot.git] / PYTHIA6 / pythia6150.f
1 C*********************************************************************
2 C*********************************************************************
3 C*                                                                  **
4 C*                                                    March 1997    **
5 C*                                                                  **
6 C*           The Lund Monte Carlo for Hadronic Processes            **
7 C*                                                                  **
8 C*                        PYTHIA version 6.1                        **
9 C*                                                                  **
10 C*                        Torbjorn Sjostrand                        **
11 C*                Department of Theoretical Physics 2               **
12 C*                         Lund University                          **
13 C*               Solvegatan 14A, S-223 62 Lund, Sweden              **
14 C*                    phone +46 - 46 - 222 48 16                    **
15 C*                    E-mail torbjorn@thep.lu.se                    **
16 C*                                                                  **
17 C*                          SUSY parts by                           **
18 C*                         Stephen Mrenna                           **
19 C*                   Physics Department, UC Davis                   **
20 C*             One Shields Avenue, Davis, CA 95616, USA             **
21 C*                   phone + 1 - 530 - 752 - 2661                   **
22 C*                E-mail mrenna@physics.ucdavis.edu                 **
23 C*                                                                  **
24 C*         Several parts are written by Hans-Uno Bengtsson          **
25 C*          PYSHOW is written together with Mats Bengtsson          **
26 C*     advanced popcorn baryon production written by Patrik Eden    **
27 C*    code for virtual photons mainly written by Christer Friberg   **
28 C*    code for low-mass strings mainly written by Emanuel Norrbin   **
29 C*        Bose-Einstein code mainly written by Leif Lonnblad        **
30 C*      CTEQ  parton distributions are by the CTEQ collaboration    **
31 C*      GRV 94 parton distributions are by Glueck, Reya and Vogt    **
32 C*   SaS photon parton distributions together with Gerhard Schuler  **
33 C*     g + g and q + qbar -> t + tbar + H code by Zoltan Kunszt     **
34 C*         MSSM Higgs mass calculation code by M. Carena,           **
35 C*           J.R. Espinosa, M. Quiros and C.E.M. Wagner             **
36 C*         PYGAUS adapted from CERN library (K.S. Kolbig)           **
37 C*                                                                  **
38 C*   The latest program version and documentation is found on WWW   **
39 C*            http://www.thep.lu.se/~torbjorn/Pythia.html           **
40 C*                                                                  **
41 C*              Copyright Torbjorn Sjostrand, Lund 1997             **
42 C*                                                                  **
43 C*********************************************************************
44 C*********************************************************************
45 C                                                                    *
46 C  List of subprograms in order of appearance, with main purpose     *
47 C  (S = subroutine, F = function, B = block data)                    *
48 C                                                                    *
49 C  B   PYDATA   to contain all default values                        *
50 C  S   PYTEST   to test the proper functioning of the package        *
51 C  S   PYHEPC   to convert between /PYJETS/ and /HEPEVT/ records     *
52 C                                                                    *
53 C  S   PYINIT   to administer the initialization procedure           *
54 C  S   PYEVNT   to administer the generation of an event             *
55 C  S   PYSTAT   to print cross-section and other information         *
56 C  S   PYINRE   to initialize treatment of resonances                *
57 C  S   PYINBM   to read in beam, target and frame choices            *
58 C  S   PYINKI   to initialize kinematics of incoming particles       *
59 C  S   PYINPR   to set up the selection of included processes        *
60 C  S   PYXTOT   to give total, elastic and diffractive cross-sect.   *
61 C  S   PYMAXI   to find differential cross-section maxima            *
62 C  S   PYPILE   to select multiplicity of pileup events              *
63 C  S   PYSAVE   to save alternatives for gamma-p and gamma-gamma     *
64 C  S   PYGAGA   to handle lepton -> lepton + gamma branchings        *
65 C  S   PYRAND   to select subprocess and kinematics for event        *
66 C  S   PYSCAT   to set up kinematics and colour flow of event        *
67 C  S   PYSSPA   to simulate initial state spacelike showers          *
68 C  S   PYRESD   to perform resonance decays                          *
69 C  S   PYMULT   to generate multiple interactions                    *
70 C  S   PYREMN   to add on target remnants                            *
71 C  S   PYDIFF   to set up kinematics for diffractive events          *
72 C  S   PYDISG   to set up kinematics, remnant and showers for DIS    *
73 C  S   PYDOCU   to compute cross-sections and handle documentation   *
74 C  S   PYFRAM   to perform boosts between different frames           *
75 C  S   PYWIDT   to calculate full and partial widths of resonances   *
76 C  S   PYOFSH   to calculate partial width into off-shell channels   *
77 C  S   PYRECO   to handle colour reconnection in W+W- events         *
78 C  S   PYKLIM   to calculate borders of allowed kinematical region   *
79 C  S   PYKMAP   to construct value of kinematical variable           *
80 C  S   PYSIGH   to calculate differential cross-sections             *
81 C  S   PYPDFU   to evaluate parton distributions                     *
82 C  S   PYPDFL   to evaluate parton distributions at low x and Q^2    *
83 C  S   PYPDEL   to evaluate electron parton distributions            *
84 C  S   PYPDGA   to evaluate photon parton distributions (generic)    *
85 C  S   PYGGAM   to evaluate photon parton distributions (SaS sets)   *
86 C  S   PYGVMD   to evaluate VMD part of photon parton distributions  *
87 C  S   PYGANO   to evaluate anomalous part of photon pdf's           *
88 C  S   PYGBEH   to evaluate Bethe-Heitler part of photon pdf's       *
89 C  S   PYGDIR   to evaluate direct contribution to photon pdf's      *
90 C  S   PYPDPI   to evaluate pion parton distributions                *
91 C  S   PYPDPR   to evaluate proton parton distributions              *
92 C  F   PYCTEQ   to evaluate the CTEQ 3 proton parton distributions   *
93 C  S   PYGRVL   to evaluate the GRV 94L proton parton distributions  *
94 C  S   PYGRVM   to evaluate the GRV 94M proton parton distributions  *
95 C  S   PYGRVD   to evaluate the GRV 94D proton parton distributions  *
96 C  F   PYGRVV   auxiliary to the PYGRV* routines                     *
97 C  F   PYGRVW   auxiliary to the PYGRV* routines                     *
98 C  F   PYGRVS   auxiliary to the PYGRV* routines                     *
99 C  F   PYCT5L   to evaluate the CTEQ 5L proton parton distributions  *
100 C  F   PYCT5M   to evaluate the CTEQ 5M1 proton parton distributions *
101 C  S   PYPDPO   to evaluate old proton parton distributions          *
102 C  F   PYHFTH   to evaluate threshold factor for heavy flavour       *
103 C  S   PYSPLI   to find flavours left in hadron when one removed     *
104 C  F   PYGAMM   to evaluate ordinary Gamma function Gamma(x)         *
105 C  S   PYWAUX   to evaluate auxiliary functions W1(s) and W2(s)      *
106 C  S   PYI3AU   to evaluate auxiliary function I3(s,t,u,v)           *
107 C  F   PYSPEN   to evaluate Spence (dilogarithm) function Sp(x)      *
108 C  S   PYQQBH   to evaluate matrix element for g + g -> Q + Qbar + H *
109 C                                                                    *
110 C  S   PYMSIN   to initialize the supersymmetry simulation           *
111 C  S   PYAPPS   to determine MSSM parameters from SUGRA input        *
112 C  F   PYRNMQ   to determine running quark masses                    *
113 C  F   PYRNMT   to determine running top mass                        *
114 C  S   PYTHRG   to calculate sfermion third-gen. mass eigenstates    *
115 C  S   PYINOM   to calculate neutralino/chargino mass eigenstates    *
116 C  F   PYRNM3   to determine running M3, gluino mass                 *
117 C  S   PYEIG4   to calculate eigenvalues and -vectors in 4*4 matrix  *
118 C  S   PYHGGM   to determine Higgs mass spectrum                     *
119 C  S   PYSUBH   to determine Higgs masses in the MSSM                *
120 C  S   PYPOLE   to determine Higgs masses in the MSSM                *
121 C  S   PYVACU   to determine Higgs masses in the MSSM                *
122 C  S   PYRGHM   auxiliary to PYVACU                                  *
123 C  S   PYGFXX   auxiliary to PYRGHM                                  *
124 C  F   PYFINT   auxiliary to PYVACU                                  *
125 C  F   PYFISB   auxiliary to PYFINT                                  *
126 C  S   PYSFDC   to calculate sfermion decay partial widths           *
127 C  S   PYGLUI   to calculate gluino decay partial widths             *
128 C  S   PYTBBN   to calculate 3-body decay of gluino to neutralino    *
129 C  S   PYTBBC   to calculate 3-body decay of gluino to chargino      *
130 C  S   PYNJDC   to calculate neutralino decay partial widths         *
131 C  S   PYCJDC   to calculate chargino decay partial widths           *
132 C  F   PYXXZ5   auxiliary for neutralino 3-body decay                *
133 C  F   PYXXW5   auxiliary for ino charge change 3-body decay         *
134 C  F   PYXXGA   auxiliary for ino -> ino + gamma decay               *
135 C  F   PYX2XG   auxiliary for ino -> ino + gauge boson decay         *
136 C  F   PYX2XH   auxiliary for ino -> ino + Higgs decay               *
137 C  F   PYXXZ2   auxiliary for chargino 3-body decay                  *
138 C  S   PYHEXT   to calculate non-SM Higgs decay partial widths       *
139 C  F   PYH2XX   auxiliary for H -> ino + ino decay                   *
140 C  F   PYGAUS   to perform Gaussian integration                      *
141 C  F   PYSIMP   to perform Simpson integration                       *
142 C  F   PYLAMF   to evaluate the lambda kinematics function           *
143 C  S   PYTBDY   to perform 3-body decay of gauginos                  *
144 C  S   PYTECM   to calculate techni_rho/omega masses                 *
145 C  S   PYEICG   to calculate eigenvalues of a 4*4 complex matrix     *
146 C                                                                    *
147 C  S   PY1ENT   to fill one entry (= parton or particle)             *
148 C  S   PY2ENT   to fill two entries                                  *
149 C  S   PY3ENT   to fill three entries                                *
150 C  S   PY4ENT   to fill four entries                                 *
151 C  S   PY2FRM   to interface to generic two-fermion generator        *
152 C  S   PY4FRM   to interface to generic four-fermion generator       *
153 C  S   PY6FRM   to interface to generic six-fermion generator        *
154 C  S   PY4JET   to generate a shower from a given 4-parton config    *
155 C  S   PY4JTW   to evaluate the weight od a shower history for above *
156 C  S   PY4JTS   to set up the parton configuration for above         *
157 C  S   PYJOIN   to connect entries with colour flow information      *
158 C  S   PYGIVE   to fill (or query) commonblock variables             *
159 C  S   PYEXEC   to administrate fragmentation and decay chain        *
160 C  S   PYPREP   to rearrange showered partons along strings          *
161 C  S   PYSTRF   to do string fragmentation of jet system             *
162 C  S   PYINDF   to do independent fragmentation of one or many jets  *
163 C  S   PYDECY   to do the decay of a particle                        *
164 C  S   PYDCYK   to select parton and hadron flavours in decays       *
165 C  S   PYKFDI   to select parton and hadron flavours in fragm        *
166 C  S   PYNMES   to select number of popcorn mesons                   *
167 C  S   PYKFIN   to calculate falvour prod. ratios from input params. *
168 C  S   PYPTDI   to select transverse momenta in fragm                *
169 C  S   PYZDIS   to select longitudinal scaling variable in fragm     *
170 C  S   PYSHOW   to do timelike parton shower evolution               *
171 C  S   PYBOEI   to include Bose-Einstein effects (crudely)           *
172 C  S   PYBESQ   auxiliary to PYBOEI                                  *
173 C  F   PYMASS   to give the mass of a particle or parton             *
174 C  F   PYMRUN   to give the running MSbar mass of a quark            *
175 C  S   PYNAME   to give the name of a particle or parton             *
176 C  F   PYCHGE   to give three times the electric charge              *
177 C  F   PYCOMP   to compress standard KF flavour code to internal KC  *
178 C  S   PYERRM   to write error messages and abort faulty run         *
179 C  F   PYALEM   to give the alpha_electromagnetic value              *
180 C  F   PYALPS   to give the alpha_strong value                       *
181 C  F   PYANGL   to give the angle from known x and y components      *
182 C  F   PYR      to provide a random number generator                 *
183 C  S   PYRGET   to save the state of the random number generator     *
184 C  S   PYRSET   to set the state of the random number generator      *
185 C  S   PYROBO   to rotate and/or boost an event                      *
186 C  S   PYEDIT   to remove unwanted entries from record               *
187 C  S   PYLIST   to list event record or particle data                *
188 C  S   PYLOGO   to write a logo                                      *
189 C  S   PYUPDA   to update particle data                              *
190 C  F   PYK      to provide integer-valued event information          *
191 C  F   PYP      to provide real-valued event information             *
192 C  S   PYSPHE   to perform sphericity analysis                       *
193 C  S   PYTHRU   to perform thrust analysis                           *
194 C  S   PYCLUS   to perform three-dimensional cluster analysis        *
195 C  S   PYCELL   to perform cluster analysis in (eta, phi, E_T)       *
196 C  S   PYJMAS   to give high and low jet mass of event               *
197 C  S   PYFOWO   to give Fox-Wolfram moments                          *
198 C  S   PYTABU   to analyze events, with tabular output               *
199 C                                                                    *
200 C  S   PYEEVT   to administrate the generation of an e+e- event      *
201 C  S   PYXTEE   to give the total cross-section at given CM energy   *
202 C  S   PYRADK   to generate initial state photon radiation           *
203 C  S   PYXKFL   to select flavour of primary qqbar pair              *
204 C  S   PYXJET   to select (matrix element) jet multiplicity          *
205 C  S   PYX3JT   to select kinematics of three-jet event              *
206 C  S   PYX4JT   to select kinematics of four-jet event               *
207 C  S   PYXDIF   to select angular orientation of event               *
208 C  S   PYONIA   to perform generation of onium decay to gluons       *
209 C                                                                    *
210 C  S   PYBOOK   to book a histogram                                  *
211 C  S   PYFILL   to fill an entry in a histogram                      *
212 C  S   PYFACT   to multiply histogram contents by a factor           *
213 C  S   PYOPER   to perform operations between histograms             *
214 C  S   PYHIST   to print and reset all histograms                    *
215 C  S   PYPLOT   to print a single histogram                          *
216 C  S   PYNULL   to reset contents of a single histogram              *
217 C  S   PYDUMP   to dump histogram contents onto a file               *
218 C                                                                    *
219 C  S   PYKCUT   dummy routine for user kinematical cuts              *
220 C  S   PYEVWT   dummy routine for weighting events                   *
221 C  S   PYUPIN   dummy routine to initialize a user process           *
222 C  S   PYUPEV   dummy routine to generate a user process event       *
223 C  S   PDFSET   dummy routine to be removed when using PDFLIB        *
224 C  S   STRUCTM  dummy routine to be removed when using PDFLIB        *
225 C  S   STRUCTP  dummy routine to be removed when using PDFLIB        *
226 C  S   PYTAUD   dummy routine for interface to tau decay libraries   *
227 C  S   PYTIME   dummy routine for giving date and time               *
228 C                                                                    *
229 C*********************************************************************
230  
231 C*********************************************************************
232  
233 C...PYDATA
234 C...Default values for switches and parameters,
235 C...and particle, decay and process data.
236  
237       BLOCK DATA PYDATA
238  
239 C...Double precision and integer declarations.
240       IMPLICIT DOUBLE PRECISION(A-H, O-Z)
241       IMPLICIT INTEGER(I-N)
242       INTEGER PYK,PYCHGE,PYCOMP
243 C...Commonblocks.
244       COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
245       COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
246       COMMON/PYDAT3/MDCY(500,3),MDME(4000,2),BRAT(4000),KFDP(4000,5)
247       COMMON/PYDAT4/CHAF(500,2)
248       CHARACTER CHAF*16
249       COMMON/PYDATR/MRPY(6),RRPY(100)
250       COMMON/PYSUBS/MSEL,MSELPD,MSUB(500),KFIN(2,-40:40),CKIN(200)
251       COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
252       COMMON/PYINT1/MINT(400),VINT(400)
253       COMMON/PYINT2/ISET(500),KFPR(500,2),COEF(500,20),ICOL(40,4,2)
254       COMMON/PYINT3/XSFX(2,-40:40),ISIG(1000,3),SIGH(1000)
255       COMMON/PYINT4/MWID(500),WIDS(500,5)
256       COMMON/PYINT5/NGENPD,NGEN(0:500,3),XSEC(0:500,3)
257       COMMON/PYINT6/PROC(0:500)
258       CHARACTER PROC*28
259       COMMON/PYINT7/SIGT(0:6,0:6,0:5)
260       COMMON/PYMSSM/IMSS(0:99),RMSS(0:99)
261       COMMON/PYSSMT/ZMIX(4,4),UMIX(2,2),VMIX(2,2),SMZ(4),SMW(2),
262      &SFMIX(16,4)
263       COMMON/PYBINS/IHIST(4),INDX(1000),BIN(20000)
264       SAVE /PYDAT1/,/PYDAT2/,/PYDAT3/,/PYDAT4/,/PYDATR/,/PYSUBS/,
265      &/PYPARS/,/PYINT1/,/PYINT2/,/PYINT3/,/PYINT4/,/PYINT5/,
266      &/PYINT6/,/PYINT7/,/PYMSSM/,/PYSSMT/,/PYBINS/
267  
268 C...PYDAT1, containing status codes and most parameters.
269       DATA MSTU/
270      &   0,    0,    0, 4000,10000,  500, 4000,    0,    0,    2,
271      1   6,    1,    1,    0,    1,    1,    0,    0,    0,    0,
272      2   2,   10,    0,    0,    1,   10,    0,    0,    0,    0,
273      3   0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
274      4   2,    2,    1,    4,    2,    1,    1,    0,    0,    0,
275      5  25,   24,    0,    1,    0,    0,    0,    0,    0,    0,
276      6   0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
277      7  30*0,
278      1   1,    0,    0,    0,    0,    0,    0,    0,    0,    0,
279      2   1,    5,    3,    5,    0,    0,    0,    0,    0,    0,
280      &  80*0/
281       DATA (PARU(I),I=1,100)/
282      &  3.141592653589793D0, 6.283185307179586D0,
283      &  0.197327D0, 5.06773D0, 0.389380D0, 2.56819D0,  4*0D0,
284      1  0.001D0, 0.09D0, 0.01D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0, 0D0,
285      2  0D0,   0D0,   0D0,   0D0,  0D0,  0D0,  0D0,  0D0,  0D0,  0D0,
286      3  0D0,   0D0,   0D0,   0D0,  0D0,  0D0,  0D0,  0D0,  0D0,  0D0,
287      4  2.0D0,  1.0D0, 0.25D0,  2.5D0, 0.05D0,
288      4  0D0,   0D0, 0.0001D0, 0D0,   0D0,
289      5  2.5D0,1.5D0,7.0D0,1.0D0,0.5D0,2.0D0,3.2D0, 0D0, 0D0, 0D0,
290      6  40*0D0/
291       DATA (PARU(I),I=101,200)/
292      &  0.00729735D0, 0.232D0, 0.007764D0, 1.0D0, 1.16639D-5,
293      &  0D0, 0D0, 0D0, 0D0,  0D0,
294      1  0.20D0, 0.25D0, 1.0D0, 4.0D0, 10D0, 0D0, 0D0,  0D0, 0D0, 0D0,
295      2 -0.693D0, -1.0D0, 0.387D0, 1.0D0, -0.08D0,
296      2 -1.0D0,  1.0D0,  1.0D0,  1.0D0,  0D0,
297      3  1.0D0,-1.0D0, 1.0D0,-1.0D0, 1.0D0,  0D0,  0D0, 0D0, 0D0, 0D0,
298      4  5.0D0, 1.0D0, 1.0D0,  0D0, 1.0D0, 1.0D0,  0D0, 0D0, 0D0, 0D0,
299      5  1.0D0, 0D0, 0D0, 0D0, 1000D0, 1.0D0, 1.0D0, 1.0D0, 1.0D0,0D0,
300      6  1.0D0, 1.0D0, 1.0D0, 1.0D0, 1.0D0,  0D0,  0D0, 0D0, 0D0, 0D0,
301      7  1.0D0, 1.0D0, 1.0D0, 1.0D0, 1.0D0, 1.0D0, 1.0D0, 0D0,0D0,0D0,
302      8  1.0D0, 1.0D0, 1.0D0, 0.0D0, 0.0D0, 1.0D0, 1.0D0, 0D0,0D0,0D0,
303      9  0D0,  0D0,  0D0,  0D0, 1.0D0,  0D0,  0D0, 0D0, 0D0, 0D0/
304       DATA MSTJ/
305      &  1,    3,    0,    0,    0,    0,    0,    0,    0,    0,
306      1  4,    2,    0,    1,    0,    2,    2,    0,    0,    0,
307      2  2,    1,    1,    2,    1,    2,    2,    0,    0,    0,
308      3  0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
309      4  2,    2,    4,    2,    5,    3,    3,    0,    0,    3,
310      5  0,    3,    0,    2,    0,    0,    1,    0,    0,    0,
311      6  40*0,
312      &  5,    2,    7,    5,    1,    1,    0,    2,    0,    2,
313      1  0,    0,    0,    0,    1,    1,    0,    0,    0,    0,
314      2  80*0/
315       DATA PARJ/
316      &  0.10D0, 0.30D0, 0.40D0, 0.05D0, 0.50D0,
317      &  0.50D0, 0.50D0,   0.6D0,   1.2D0,   0.6D0,
318      1  0.50D0,0.60D0,0.75D0, 0D0, 0D0, 0D0, 0D0, 1.0D0, 1.0D0, 0D0,
319      2  0.36D0, 1.0D0,0.01D0, 2.0D0,1.0D0,0.4D0, 0D0, 0D0, 0D0, 0D0,
320      3  0.10D0, 1.0D0, 0.8D0, 1.5D0,0D0,2.0D0,0.2D0, 0D0,0.08D0,0D0,
321      4  0.3D0, 0.58D0, 0.5D0, 0.9D0,0.5D0,1.0D0,1.0D0,1.0D0,0D0,0D0,
322      5  0.77D0, 0.77D0, 0.77D0, -0.05D0, -0.005D0,
323      5 -0.00001D0, -0.00001D0, -0.00001D0, 1.0D0, 0D0,
324      6  4.5D0, 0.7D0, 0D0,0.003D0, 0.5D0, 0.5D0, 0D0, 0D0, 0D0, 0D0,
325      7  10D0, 1000D0, 100D0, 1000D0, 0D0, 0.7D0,10D0, 0D0, 0D0, 0D0,
326      8  0.29D0, 1.0D0, 1.0D0,  0D0,  10D0, 10D0, 0D0, 0D0, 0D0,1D-4,
327      9  0.02D0, 1.0D0, 0.2D0,  0D0,  0D0,  0D0,  0D0, 0D0, 0D0, 0D0,
328      &  0D0,  0D0,  0D0,  0D0,   0D0,   0D0,  0D0,  0D0,  0D0,  0D0,
329      1  0D0,  0D0,  0D0,  0D0,   0D0,   0D0,  0D0,  0D0,  0D0,  0D0,
330      2  1.0D0, 0.25D0,91.187D0,2.489D0, 0.01D0,
331      2  2.0D0,  1.0D0, 0.25D0,0.002D0,   0D0,
332      3  0D0, 0D0, 0D0, 0D0, 0.01D0, 0.99D0, 0D0, 0D0,  0.2D0,   0D0,
333      4  10*0D0,
334      5  10*0D0,
335      6  10*0D0,
336      7  0D0, 200D0, 200D0, .333D0, .05D0, 0D0, 0D0, 0D0, 0D0, -0.693D0, 
337      8 -1.0D0, 0.387D0, 1.0D0, -0.08D0, -1.0D0,  
338      8  1.0D0,  1.0D0, -0.693D0, -1.0D0, 0.387D0, 
339      9  1.0D0, -0.08D0, -1.0D0,   1.0D0, 1.0D0,  
340      9  5*0D0/  
341  
342 C...PYDAT2, with particle data and flavour treatment parameters.
343       DATA (KCHG(I,1),I=   1, 500)/-1,2,-1,2,-1,2,-1,2,2*0,-3,0,-3,0,   
344      &-3,0,-3,6*0,3,9*0,3,2*0,3,0,-1,12*0,3,2*0,3,5*0,2*6,3,20*0,2,-1,  
345      &20*0,4*3,8*0,3*3,4*0,3*3,3*0,3*3,7*0,3*3,3*0,3*3,3*0,-2,-3,2*1,   
346      &3*0,4,3*3,6,2*-2,2*-3,0,2*1,2*0,2*3,-2,2*-3,2*0,-3,2*1,2*0,3,0,   
347      &2*4,2*3,2*6,3,2*1,2*0,2*3,2*0,4,2*3,2*6,2*3,6,2*-2,2*-3,0,-3,0,   
348      &2*1,2*0,2*3,0,3,2*-2,2*-3,2*0,2*-3,0,2*1,2*0,2*3,2*0,2*3,-2,2*-3, 
349      &2*0,2*-3,2*0,-3,2*0,2*3,4*0,2*3,2*0,2*3,2*0,2*3,4*0,2*3,2*0,2*3,  
350      &3*0,3,2*0,3,0,3,0,3,2*0,3,0,3,3*0,-1,2,-1,2,-1,2,-3,0,-3,0,-3,    
351      &4*0,3,2*0,3,0,-1,2,-1,2,-1,2,-3,0,-3,0,-3,0,-1,2,-3,164*0/        
352       DATA (KCHG(I,2),I=   1, 500)/8*1,12*0,2,16*0,2,1,113*0,-1,0,2*-1, 
353      &3*0,-1,4*0,2*-1,3*0,2*-1,4*0,-1,5*0,2*-1,4*0,2*-1,5*0,2*-1,6*0,   
354      &-1,7*0,2*-1,5*0,2*-1,6*0,2*-1,7*0,2*-1,8*0,-1,56*0,6*1,6*0,2,7*0, 
355      &6*1,6*0,2*1,165*0/                                                
356       DATA (KCHG(I,3),I=   1, 500)/8*1,2*0,8*1,5*0,1,9*0,1,2*0,1,0,2*1, 
357      &11*0,1,2*0,1,5*0,6*1,15*0,1,0,2*1,20*0,4*1,5*0,6*1,4*0,9*1,4*0,   
358      &12*1,3*0,102*1,2*0,2*1,2*0,4*1,2*0,6*1,2*0,8*1,3*0,1,0,2*1,0,3*1, 
359      &0,4*1,3*0,12*1,3*0,1,2*0,1,0,16*1,163*0/                          
360       DATA (KCHG(I,4),I=   1, 293)/1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, 
361      &16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,   
362      &37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,   
363      &58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,   
364      &79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,   
365      &100,110,111,113,115,130,210,211,213,215,220,221,223,225,310,311,  
366      &313,315,321,323,325,330,331,333,335,411,413,415,421,423,425,431,  
367      &433,435,440,441,443,445,511,513,515,521,523,525,531,533,535,541,  
368      &543,545,551,553,555,1103,1114,2101,2103,2110,2112,2114,2203,2210, 
369      &2212,2214,2224,3101,3103,3112,3114,3122,3201,3203,3212,3214,3222, 
370      &3224,3303,3312,3314,3322,3324,3334,4101,4103,4112,4114,4122,4132, 
371      &4201,4203,4212,4214,4222,4224,4232,4301,4303,4312,4314,4322,4324, 
372      &4332,4334,4403,4412,4414,4422,4424,4432,4434,4444,5101,5103,5112, 
373      &5114,5122,5132,5142,5201,5203,5212,5214,5222,5224,5232,5242,5301, 
374      &5303,5312,5314,5322,5324,5332,5334,5342,5401,5403,5412,5414,5422, 
375      &5424,5432,5434,5442,5444,5503,5512,5514,5522,5524,5532,5534,5542, 
376      &5544,5554,10111,10113,10211,10213,10221,10223,10311,10313,10321,  
377      &10323,10331,10333,10411,10413,10421,10423,10431,10433,10441,      
378      &10443,10511,10513,10521,10523,10531,10533,10541,10543,10551,      
379      &10553,20113,20213,20223,20313,20323,20333,20413,20423,20433/      
380       DATA (KCHG(I,4),I= 294, 500)/20443,20513,20523,20533,20543,20553, 
381      &100443,100553,1000001,1000002,1000003,1000004,1000005,1000006,    
382      &1000011,1000012,1000013,1000014,1000015,1000016,1000021,1000022,  
383      &1000023,1000024,1000025,1000035,1000037,1000039,2000001,2000002,  
384      &2000003,2000004,2000005,2000006,2000011,2000012,2000013,2000014,  
385      &2000015,2000016,4000001,4000002,4000011,4000012,163*0/            
386       DATA (PMAS(I,1),I=   1, 211)/0.33D0,0.33D0,0.50D0,1.50D0,    
387      &4.80D0,175D0,2*400D0,2*0D0,0.00051D0,0D0,0.10566D0,0D0,1.777D0,  
388      &0D0,400D0,5*0D0,91.187D0,80.33D0,80D0,6*0D0,500D0,900D0,500D0,        
389      &3*300D0,350D0,200D0,5000D0,10*0D0,3*110D0,3*210D0,4*0D0,2*200D0,  
390      &4*750D0,16*0D0,1D0,2D0,5D0,16*0D0,0.13498D0,0.7685D0,1.318D0,     
391      &0.49767D0,0D0,0.13957D0,0.7669D0,1.318D0,0D0,0.54745D0,0.78194D0, 
392      &1.275D0,2*0.49767D0,0.8961D0,1.432D0,0.4936D0,0.8916D0,1.425D0,   
393      &0D0,0.95777D0,1.0194D0,1.525D0,1.8693D0,2.01D0,2.46D0,1.8645D0,   
394      &2.0067D0,2.46D0,1.9685D0,2.1124D0,2.5735D0,0D0,2.9798D0,          
395      &3.09688D0,3.5562D0,5.2792D0,5.3248D0,5.83D0,5.2789D0,5.3248D0,    
396      &5.83D0,5.3693D0,5.4163D0,6.07D0,6.594D0,6.602D0,7.35D0,9.4D0,     
397      &9.4603D0,9.9132D0,0.77133D0,1.234D0,0.57933D0,0.77133D0,0D0,      
398      &0.93957D0,1.233D0,0.77133D0,0D0,0.93827D0,1.232D0,1.231D0,        
399      &0.80473D0,0.92953D0,1.19744D0,1.3872D0,1.11568D0,0.80473D0,       
400      &0.92953D0,1.19255D0,1.3837D0,1.18937D0,1.3828D0,1.09361D0,        
401      &1.3213D0,1.535D0,1.3149D0,1.5318D0,1.67245D0,1.96908D0,2.00808D0, 
402      &2.4521D0,2.5D0,2.2849D0,2.4703D0,1.96908D0,2.00808D0,2.4535D0,    
403      &2.5D0,2.4529D0,2.5D0,2.4656D0,2.15432D0,2.17967D0,2.55D0,2.63D0,  
404      &2.55D0,2.63D0,2.704D0,2.8D0,3.27531D0,3.59798D0,3.65648D0,        
405      &3.59798D0,3.65648D0,3.78663D0,3.82466D0,4.91594D0,5.38897D0/      
406       DATA (PMAS(I,1),I= 212, 500)/5.40145D0,5.8D0,5.81D0,5.641D0,      
407      &5.84D0,7.00575D0,5.38897D0,5.40145D0,5.8D0,5.81D0,5.8D0,5.81D0,   
408      &5.84D0,7.00575D0,5.56725D0,5.57536D0,5.96D0,5.97D0,5.96D0,5.97D0, 
409      &6.12D0,6.13D0,7.19099D0,6.67143D0,6.67397D0,7.03724D0,7.0485D0,   
410      &7.03724D0,7.0485D0,7.21101D0,7.219D0,8.30945D0,8.31325D0,         
411      &10.07354D0,10.42272D0,10.44144D0,10.42272D0,10.44144D0,           
412      &10.60209D0,10.61426D0,11.70767D0,11.71147D0,15.11061D0,0.9835D0,  
413      &1.231D0,0.9835D0,1.231D0,1D0,1.17D0,1.429D0,1.29D0,1.429D0,       
414      &1.29D0,2*1.4D0,2.272D0,2.424D0,2.272D0,2.424D0,2.5D0,2.536D0,     
415      &3.4151D0,3.46D0,5.68D0,5.73D0,5.68D0,5.73D0,5.92D0,5.97D0,7.25D0, 
416      &7.3D0,9.8598D0,9.875D0,2*1.23D0,1.282D0,2*1.402D0,1.427D0,        
417      &2*2.372D0,2.56D0,3.5106D0,2*5.78D0,6.02D0,7.3D0,9.8919D0,3.686D0, 
418      &10.0233D0,32*500D0,4*400D0,163*0D0/                               
419       DATA (PMAS(I,2),I=   1, 500)/5*0D0,1.39883D0,16*0D0,2.48009D0,    
420      &2.07002D0,0.00237D0,6*0D0,14.54848D0,0D0,16.6708D0,8.42842D0,     
421      &4.92026D0,5.75967D0,0.10158D0,0.39162D0,417.4648D0,10*0D0,        
422      &0.04104D0,0.0105D0,0.02807D0,0.82101D0,0.64973D0,0.1575D0,4*0D0,  
423      &0.88161D0,0.88001D0,19.33905D0,39*0D0,0.151D0,0.107D0,3*0D0,      
424      &0.149D0,0.107D0,2*0D0,0.00843D0,0.185D0,2*0D0,0.0505D0,0.109D0,   
425      &0D0,0.0498D0,0.098D0,0D0,0.0002D0,0.00443D0,0.076D0,2*0D0,        
426      &0.023D0,2*0D0,0.023D0,2*0D0,0.015D0,0D0,0.0013D0,0D0,0.002D0,     
427      &2*0D0,0.02D0,2*0D0,0.02D0,2*0D0,0.02D0,2*0D0,0.02D0,4*0D0,0.12D0, 
428      &4*0D0,0.12D0,3*0D0,2*0.12D0,3*0D0,0.0394D0,4*0D0,0.036D0,0D0,     
429      &0.0358D0,2*0D0,0.0099D0,0D0,0.0091D0,74*0D0,0.06D0,0.142D0,       
430      &0.06D0,0.142D0,0D0,0.36D0,0.287D0,0.09D0,0.287D0,0.09D0,0.25D0,   
431      &0.08D0,0.05D0,0.02D0,0.05D0,0.02D0,0.05D0,0D0,0.014D0,0.01D0,     
432      &8*0.05D0,0D0,0.01D0,2*0.4D0,0.025D0,2*0.174D0,0.053D0,3*0.05D0,   
433      &0.0009D0,4*0.05D0,3*0D0,19*1D0,0D0,7*1D0,0D0,1D0,0D0,1D0,0D0,     
434      &2.65171D0,2.65499D0,0.42901D0,0.41917D0,163*0D0/                  
435       DATA (PMAS(I,3),I=   1, 500)/5*0D0,13.98835D0,16*0D0,24.8009D0,   
436      &20.70015D0,0.02369D0,6*0D0,145.48484D0,0D0,166.70801D0,           
437      &84.28416D0,49.20256D0,57.59671D0,1.0158D0,3.91624D0,4174.64797D0, 
438      &10*0D0,0.41042D0,0.10504D0,0.28068D0,8.21005D0,6.49728D0,         
439      &1.57496D0,4*0D0,8.81606D0,8.80013D0,193.39048D0,39*0D0,0.4D0,     
440      &0.25D0,3*0D0,0.4D0,0.25D0,2*0D0,0.1D0,0.17D0,2*0D0,0.2D0,0.12D0,  
441      &0D0,0.2D0,0.12D0,0D0,0.002D0,0.015D0,0.2D0,2*0D0,0.12D0,2*0D0,    
442      &0.12D0,2*0D0,0.05D0,0D0,0.005D0,0D0,0.01D0,2*0D0,0.05D0,2*0D0,    
443      &0.05D0,2*0D0,0.05D0,2*0D0,0.05D0,4*0D0,0.14D0,4*0D0,0.14D0,3*0D0, 
444      &2*0.14D0,3*0D0,0.04D0,4*0D0,0.035D0,0D0,0.035D0,2*0D0,0.05D0,0D0, 
445      &0.05D0,74*0D0,0.05D0,0.25D0,0.05D0,0.25D0,0D0,0.2D0,0.4D0,        
446      &0.005D0,0.4D0,0.01D0,0.35D0,0.001D0,0.1D0,0.08D0,0.1D0,0.08D0,    
447      &0.1D0,0D0,0.05D0,0.02D0,6*0.1D0,0.05D0,0.1D0,0D0,0.02D0,2*0.3D0,  
448      &0.05D0,2*0.3D0,0.02D0,2*0.1D0,0.03D0,0.001D0,4*0.1D0,3*0D0,       
449      &19*10D0,0.00001D0,7*10D0,0.00001D0,10D0,0.00001D0,10D0,0.00001D0, 
450      &26.51715D0,26.54994D0,4.29011D0,4.19173D0,163*0D0/                
451       DATA (PMAS(I,4),I=   1, 500)/12*0D0,658654D0,0D0,0.0872D0,68*0D0, 
452      &0.1D0,0.387D0,16*0D0,0.00003D0,2*0D0,15500D0,0D0,7804.5D0,6*0D0,  
453      &26.762D0,3*0D0,3709D0,6*0D0,0.317D0,2*0D0,0.1244D0,2*0D0,0.14D0,  
454      &6*0D0,0.468D0,2*0D0,0.462D0,2*0D0,0.483D0,2*0D0,0.15D0,19*0D0,    
455      &44.34D0,0D0,78.88D0,4*0D0,23.96D0,2*0D0,49.1D0,0D0,87.1D0,0D0,    
456      &24.6D0,4*0D0,0.0618D0,0.029D0,6*0D0,0.106D0,6*0D0,0.019D0,2*0D0,  
457      &7*0.1D0,4*0D0,0.342D0,2*0.387D0,6*0D0,2*0.387D0,6*0D0,0.387D0,    
458      &0D0,0.387D0,2*0D0,8*0.387D0,0D0,9*0.387D0,83*0D0,163*0D0/         
459       DATA PARF/
460      &  0.5D0,0.25D0, 0.5D0,0.25D0, 1D0, 0.5D0,  0D0,  0D0,  0D0, 0D0,
461      1  0.5D0,  0D0, 0.5D0,  0D0,  1D0,  1D0,  0D0,  0D0,  0D0, 0D0,
462      2  0.5D0,  0D0, 0.5D0,  0D0,  1D0,  1D0,  0D0,  0D0,  0D0, 0D0,
463      3  0.5D0,  0D0, 0.5D0,  0D0,  1D0,  1D0,  0D0,  0D0,  0D0, 0D0,
464      4  0.5D0,  0D0, 0.5D0,  0D0,  1D0,  1D0,  0D0,  0D0,  0D0, 0D0,
465      5  0.5D0,  0D0, 0.5D0,  0D0,  1D0,  1D0,  0D0,  0D0,  0D0, 0D0,
466      6  0.75D0, 0.5D0, 0D0,0.1667D0,0.0833D0,0.1667D0,0D0,0D0,0D0, 0D0,
467      7  0D0,  0D0,  1D0,0.3333D0,0.6667D0,0.3333D0,0D0,0D0,0D0, 0D0,
468      8  0D0,  0D0,  0D0,  0D0,  0D0,  0D0,  0D0,  0D0,  0D0, 0D0,
469      9  0.0099D0, 0.0056D0, 0.199D0, 1.35D0, 4.5D0, 5*0D0,
470      & 0.325D0,0.325D0,0.5D0,1.6D0, 5.0D0,  0D0,  0D0,  0D0,  0D0, 0D0,
471      1 0D0,0.11D0,0.16D0,0.048D0,0.50D0,0.45D0,0.55D0,0.60D0,0D0,0D0,
472      2 0.2D0, 0.1D0,  0D0,  0D0,  0D0,  0D0,  0D0,  0D0,  0D0, 0D0,
473      3 60*0D0,
474      4 0.2D0,  0.5D0,  8*0D0,
475      5 1800*0D0/
476       DATA ((VCKM(I,J),J=1,4),I=1,4)/
477      &  0.95113D0,  0.04884D0,  0.00003D0,  0.00000D0,
478      &  0.04884D0,  0.94940D0,  0.00176D0,  0.00000D0,
479      &  0.00003D0,  0.00176D0,  0.99821D0,  0.00000D0,
480      &  0.00000D0,  0.00000D0,  0.00000D0,  1.00000D0/
481  
482 C...PYDAT3, with particle decay parameters and data.        
483       DATA (MDCY(I,1),I=   1, 500)/5*0,3*1,6*0,1,0,1,5*0,3*1,6*0,1,0,   
484      &7*1,10*0,6*1,4*0,3*1,19*0,3*1,16*0,3*1,3*0,2*1,0,7*1,0,2*1,0,     
485      &12*1,0,18*1,0,1,4*0,1,3*0,2*1,2*0,3*1,2*0,4*1,0,5*1,2*0,4*1,2*0,  
486      &5*1,2*0,6*1,0,7*1,2*0,5*1,2*0,6*1,2*0,7*1,2*0,8*1,0,75*1,0,7*1,0, 
487      &1,0,1,0,4*1,163*0/                                                
488       DATA (MDCY(I,2),I=   1, 500)/1,9,17,25,33,41,56,66,2*0,76,80,82,  
489      &87,89,143,145,150,2*0,153,162,174,190,210,6*0,289,0,311,334,416,  
490      &496,523,526,527,10*0,536,544,550,558,582,608,4*0,632,639,646,     
491      &19*0,658,659,663,16*0,672,674,679,688,0,697,699,701,0,708,716,    
492      &722,731,733,735,738,748,754,757,0,768,774,785,791,854,857,865,    
493      &926,928,936,969,971,0,975,976,979,981,1017,1018,1026,1062,1063,   
494      &1071,1110,1111,1115,1146,1147,1151,1152,1161,0,1163,4*0,1164,3*0, 
495      &1167,1170,2*0,1171,1173,1176,2*0,1180,1181,1184,1187,0,1190,1195, 
496      &1197,1200,1202,2*0,1206,1207,1208,1284,2*0,1288,1289,1290,1291,   
497      &1292,2*0,1296,1297,1299,1300,1302,1306,0,1307,1311,1315,1319,     
498      &1323,1327,1331,2*0,1335,1336,1337,1354,1363,2*0,1372,1373,1374,   
499      &1375,1376,1385,2*0,1394,1395,1396,1397,1398,1407,1408,2*0,1417,   
500      &1426,1435,1444,1453,1462,1471,1480,0,1489,1498,1507,1516,1525,    
501      &1534,1543,1552,1561,1570,1571,1572,1573,1574,1579,1582,1584,1589, 
502      &1591,1596,1603,1607,1609,1611,1613,1615,1617,1619,1621,1622,1624, 
503      &1626,1628,1630,1632,1634,1636,1638,1640,1641,1643,1645,1659,1661, 
504      &1663,1667,1669,1671,1673,1675,1677,1679,1681,1683,1685,1696,1710, 
505      &1722,1734,1746,1758,1770,1785,1796,1807,1818,1829,1840,1851,1912, 
506      &1919,2021,2077,2195,2329,0,2400,2416,2432,2448,2464,2480,2496,0,  
507      &2511,0,2526,0,2541,2545,2549,2552,163*0/                          
508       DATA (MDCY(I,3),I=   1, 500)/5*8,15,2*10,2*0,4,2,5,2,54,2,5,3,    
509      &2*0,9,12,16,20,79,6*0,22,0,23,82,80,27,3,1,9,10*0,8,6,8,24,26,24, 
510      &4*0,2*7,12,19*0,1,4,9,16*0,2,5,2*9,0,2*2,7,0,8,6,9,2*2,3,10,6,3,  
511      &11,0,6,11,6,63,3,8,61,2,8,33,2,4,0,1,3,2,36,1,8,36,1,8,39,1,4,31, 
512      &1,4,1,9,2,0,1,4*0,3,3*0,3,1,2*0,2,3,4,2*0,1,3*3,0,5,2,3,2,4,2*0,  
513      &2*1,76,4,2*0,4*1,4,2*0,1,2,1,2,4,1,0,7*4,2*0,2*1,17,2*9,2*0,4*1,  
514      &2*9,2*0,4*1,9,1,9,2*0,8*9,0,9*9,4*1,5,3,2,5,2,5,7,4,7*2,1,9*2,1,  
515      &2*2,14,2*2,4,9*2,11,14,5*12,15,6*11,61,7,102,56,118,134,71,0,     
516      &6*16,15,0,15,0,15,0,2*4,3,2,163*0/                                
517       DATA (MDME(I,1),I=   1,4000)/6*1,-1,7*1,-1,7*1,-1,7*1,-1,7*1,-1,  
518      &7*1,-1,1,7*-1,8*1,2*-1,8*1,2*-1,73*1,-1,2*1,-1,5*1,0,2*-1,6*1,0,
519      &2*-1, 3*1,-1,6*1,2*-1,6*1,2*-1,3*1,-1,3*1,-1,3*1,5*-1,3*1,-1,6*1,
520      &2*-1,3*1,-1,5*1,62*1,6*1,2*-1,6*1,8*-1,3*1,-1,3*1,-1,3*1,5*-1,3*1,    
521      &4*-1,6*1,2*-1,3*1,-1,8*1,62*1,6*1,2*-1,3*1,-1,6*1,62*1,3*1,-1,  
522      &3*1,-1,1,18*1,8*1,2*-1,2*1,-1,36*1,2*-1,6*1,2*-1,9*1,-1,3*1,-1,  
523      &3*1,5*-1,3*1,-1,14*1,2*-1,6*1,2*-1,1151*1,2*-1,132*1,2*-1,635*1,  
524      &1447*0/                                                           
525       DATA (MDME(I,2),I=   1,4000)/43*102,4*0,102,0,6*53,3*102,4*0,102, 
526      &2*0,3*102,4*0,102,2*0,6*102,42,6*102,2*42,2*0,8*41,2*0,36*41,     
527      &8*102,0,102,0,102,2*0,21*102,8*32,8*0,16*32,4*0,8*32,9*0,62*53,   
528      &8*32,14*0,16*32,7*0,8*32,12*0,62*53,8*32,10*0,62*53,4*32,5*0,     
529      &18*53,3*32,0,6*32,3*0,4*32,3*0,4*32,3*0,4*32,3*0,32,8*0,8*32,     
530      &14*0,16*32,12*0,8*32,22*0,9*32,3*0,12,2*42,2*11,9*42,0,2,3,15*0,  
531      &4*42,5*0,3,12*0,2,3*0,1,0,3,16*0,2*3,15*0,2*42,2*3,18*0,2*3,3*0,  
532      &1,11*0,22*42,41*0,2*3,9*0,16*42,45*0,3,10*0,10*42,20*0,2*13,6*0,  
533      &12,2*0,12,0,12,14*42,16*0,48,3*13,2*42,9*0,14*42,16*0,48,3*13,    
534      &2*42,9*0,14*42,19*0,48,3*13,2*42,6*0,2*11,28*42,5*0,32,3*0,4*32,  
535      &2*4,0,32,45*0,14*42,52*0,10*13,2*42,2*11,4*0,2*42,2*11,6*0,2*42,  
536      &2*11,0,2*42,2*11,2*42,2*11,2*42,2*11,2*42,2*11,2*42,2*11,2*42,    
537      &2*11,2*42,2*11,2*0,3*42,8*0,48,3*13,20*42,4*0,18*42,4*0,9*42,0,   
538      &162*42,50*0,2*12,17*0,2*32,33*0,12,9*0,32,2*0,12,11*0,4*32,2*4,   
539      &5*0,832*53,1459*0/                                                
540       DATA (BRAT(I)  ,I=   1, 348)/43*0D0,0.00003D0,0.001765D0,         
541      &0.998205D0,35*0D0,1D0,6*0D0,0.1783D0,0.1735D0,0.1131D0,0.2494D0,  
542      &0.003D0,0.09D0,0.0027D0,0.01D0,0.0014D0,0.0012D0,2*0.00025D0,     
543      &0.0071D0,0.012D0,0.0004D0,0.00075D0,0.00006D0,2*0.00078D0,        
544      &0.0034D0,0.08D0,0.011D0,0.0191D0,0.00006D0,0.005D0,0.0133D0,      
545      &0.0067D0,0.0005D0,0.0035D0,0.0006D0,0.0015D0,0.00021D0,0.0002D0,  
546      &0.00075D0,0.0001D0,0.0002D0,0.0011D0,3*0.0002D0,0.00022D0,        
547      &0.0004D0,0.0001D0,2*0.00205D0,2*0.00069D0,0.00025D0,0.00051D0,    
548      &0.00025D0,35*0D0,0.154075D0,0.119483D0,0.154072D0,0.119346D0,     
549      &0.152196D0,3*0D0,0.033549D0,0.066752D0,0.033549D0,0.066752D0,     
550      &0.033473D0,0.066752D0,2*0D0,0.321502D0,0.016502D0,2*0D0,          
551      &0.016509D0,0.320778D0,2*0D0,0.00001D0,0.000591D0,6*0D0,           
552      &2*0.108062D0,0.107983D0,0D0,0.000001D0,0D0,0.000327D0,0.053489D0, 
553      &0.852249D0,4*0D0,0.000244D0,0.06883D0,0D0,0.023981D0,0.000879D0,  
554      &65*0D0,0.145869D0,0.113303D0,0.145869D0,0.113298D0,0.14581D0,     
555      &0.049013D0,2*0D0,0.032007D0,0.063606D0,0.032007D0,0.063606D0,     
556      &0.032004D0,0.063606D0,8*0D0,0.251276D0,0.012903D0,0.000006D0,0D0, 
557      &0.012903D0,0.250816D0,0.00038D0,0D0,0.000008D0,0.000465D0,        
558      &0.215459D0,5*0D0,2*0.085262D0,0.08526D0,7*0D0,0.000046D0,         
559      &0.000754D0,5*0D0,0.000074D0,0D0,0.000439D0,0.000015D0,0.000061D0/ 
560       DATA (BRAT(I)  ,I= 349, 642)/0.306171D0,0.68864D0,0D0,0.003799D0, 
561      &66*0D0,0.000079D0,0.001292D0,5*0D0,0.000126D0,0D0,0.002256D0,     
562      &0.00001D0,0.000002D0,2*0D0,0.996233D0,63*0D0,0.000013D0,          
563      &0.067484D0,2*0D0,0.00001D0,0.002701D0,0D0,0.929792D0,18*0D0,      
564      &0.452899D0,0D0,0.547101D0,1D0,2*0.215134D0,0.215133D0,0.214738D0, 
565      &2*0D0,2*0.06993D0,0D0,0.000225D0,0.036777D0,0.596654D0,2*0D0,     
566      &0.000177D0,0.050055D0,0.316112D0,0.041762D0,0.90916D0,2*0D0,      
567      &0.000173D0,0.048905D0,0.000328D0,0.053776D0,0.872444D0,2*0D0,     
568      &0.000259D0,0.073192D0,0D0,0.153373D0,2*0.342801D0,0D0,0.086867D0, 
569      &0.03128D0,0.001598D0,0.000768D0,0.004789D0,0.006911D0,0.004789D0, 
570      &0.006911D0,0.004789D0,3*0D0,0.003077D0,0.00103D0,0.003077D0,      
571      &0.00103D0,0.003077D0,0.00103D0,2*0D0,0.138845D0,0.474102D0,       
572      &0.176299D0,0D0,0.109767D0,0.008161D0,0.028584D0,0.001468D0,2*0D0, 
573      &0.001468D0,0.02853D0,0.000007D0,0D0,0.000001D0,0.000053D0,        
574      &0.003735D0,5*0D0,2*0.009661D0,0.00966D0,0D0,0.163019D0,           
575      &0.004003D0,0.45294D0,0.008334D0,2*0.038042D0,0.001999D0,0D0,      
576      &0.017733D0,0.045908D0,0.017733D0,0.045908D0,0.017733D0,3*0D0,     
577      &0.038354D0,0.011181D0,0.038354D0,0.011181D0,0.038354D0,           
578      &0.011181D0,2*0D0,0.090264D0,2*0.001805D0,0.090264D0,0.001805D0,   
579      &0.81225D0,0.001806D0,0.090428D0,0.001809D0,0.001808D0,0.090428D0/ 
580       DATA (BRAT(I)  ,I= 643, 803)/0.001808D0,0.81372D0,0D0,0.325914D0, 
581      &0.016735D0,0.000009D0,0.016736D0,0.32532D0,0.000554D0,0.00001D0,  
582      &0.000603D0,0.314118D0,3*0D0,1D0,2*0.08D0,0.76D0,0.08D0,2*0.105D0, 
583      &0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,0.015D0,0.005D0,0.988D0,        
584      &0.012D0,0.998739D0,0.00079D0,0.00038D0,0.000046D0,0.000045D0,     
585      &2*0.34725D0,0.144D0,0.104D0,0.0245D0,2*0.01225D0,0.0028D0,        
586      &0.0057D0,0.2112D0,0.1256D0,2*0.1939D0,2*0.1359D0,0.002D0,0.001D0, 
587      &0.0006D0,0.999877D0,0.000123D0,0.99955D0,0.00045D0,2*0.34725D0,   
588      &0.144D0,0.104D0,0.049D0,0.0028D0,0.0057D0,0.3923D0,0.321D0,       
589      &0.2317D0,0.0478D0,0.0049D0,0.0013D0,0.0003D0,0.0007D0,0.89D0,     
590      &0.08693D0,0.0221D0,0.00083D0,2*0.00007D0,0.564D0,0.282D0,0.072D0, 
591      &0.028D0,0.023D0,2*0.0115D0,0.005D0,0.003D0,0.6861D0,0.3139D0,     
592      &2*0.5D0,0.665D0,0.333D0,0.002D0,0.333D0,0.166D0,0.168D0,0.084D0,  
593      &0.087D0,0.043D0,0.059D0,2*0.029D0,0.002D0,0.6352D0,0.2116D0,      
594      &0.0559D0,0.0173D0,0.0482D0,0.0318D0,0.666D0,0.333D0,0.001D0,      
595      &0.332D0,0.166D0,0.168D0,0.084D0,0.086D0,0.043D0,0.059D0,          
596      &2*0.029D0,2*0.002D0,0.437D0,0.208D0,0.302D0,0.0302D0,0.0212D0,    
597      &0.0016D0,0.48947D0,0.34D0,3*0.043D0,0.027D0,0.0126D0,0.0013D0,    
598      &0.0003D0,0.00025D0,0.00008D0,0.444D0,2*0.222D0,0.104D0,2*0.004D0, 
599      &0.07D0,0.065D0,2*0.005D0,2*0.011D0,5*0.001D0,0.07D0,0.065D0/      
600       DATA (BRAT(I)  ,I= 804, 977)/2*0.005D0,2*0.011D0,5*0.001D0,       
601      &0.026D0,0.019D0,0.066D0,0.041D0,0.045D0,0.076D0,0.0073D0,         
602      &2*0.0047D0,0.026D0,0.001D0,0.0006D0,0.0066D0,0.005D0,2*0.003D0,   
603      &2*0.0006D0,2*0.001D0,0.006D0,0.005D0,0.012D0,0.0057D0,0.067D0,    
604      &0.008D0,0.0022D0,0.027D0,0.004D0,0.019D0,0.012D0,0.002D0,0.009D0, 
605      &0.0218D0,0.001D0,0.022D0,0.087D0,0.001D0,0.0019D0,0.0015D0,       
606      &0.0028D0,0.683D0,0.306D0,0.011D0,0.3D0,0.15D0,0.16D0,0.08D0,      
607      &0.13D0,0.06D0,0.08D0,0.04D0,0.034D0,0.027D0,2*0.002D0,2*0.004D0,  
608      &2*0.002D0,0.034D0,0.027D0,2*0.002D0,2*0.004D0,2*0.002D0,0.0365D0, 
609      &0.045D0,0.073D0,0.062D0,3*0.021D0,0.0061D0,0.015D0,0.025D0,       
610      &0.0088D0,0.074D0,0.0109D0,0.0041D0,0.002D0,0.0035D0,0.0011D0,     
611      &0.001D0,0.0027D0,2*0.0016D0,0.0018D0,0.011D0,0.0063D0,0.0052D0,   
612      &0.018D0,0.016D0,0.0034D0,0.0036D0,0.0009D0,0.0006D0,0.015D0,      
613      &0.0923D0,0.018D0,0.022D0,0.0077D0,0.009D0,0.0075D0,0.024D0,       
614      &0.0085D0,0.067D0,0.0511D0,0.017D0,0.0004D0,0.0028D0,0.619D0,      
615      &0.381D0,0.3D0,0.15D0,0.16D0,0.08D0,0.13D0,0.06D0,0.08D0,0.04D0,   
616      &0.01D0,2*0.02D0,0.03D0,2*0.005D0,2*0.02D0,0.03D0,2*0.005D0,       
617      &0.015D0,0.037D0,0.028D0,0.079D0,0.095D0,0.052D0,0.0078D0,         
618      &4*0.001D0,0.028D0,0.033D0,0.026D0,0.05D0,0.01D0,4*0.005D0,0.25D0, 
619      &0.0952D0,0.94D0,0.06D0,2*0.4D0,2*0.1D0,1D0,0.0602D0,0.0601D0/     
620       DATA (BRAT(I)  ,I= 978,1136)/0.8797D0,0.135D0,0.865D0,0.02D0,     
621      &0.055D0,2*0.005D0,0.008D0,0.012D0,0.02D0,0.055D0,2*0.005D0,       
622      &0.008D0,0.012D0,0.01D0,0.03D0,0.0035D0,0.011D0,0.0055D0,0.0042D0, 
623      &0.009D0,0.018D0,0.015D0,0.0185D0,0.0135D0,0.025D0,0.0004D0,       
624      &0.0007D0,0.0008D0,0.0014D0,0.0019D0,0.0025D0,0.4291D0,0.08D0,     
625      &0.07D0,0.02D0,0.015D0,0.005D0,1D0,0.3D0,0.15D0,0.16D0,0.08D0,     
626      &0.13D0,0.06D0,0.08D0,0.04D0,0.02D0,0.055D0,2*0.005D0,0.008D0,     
627      &0.012D0,0.02D0,0.055D0,2*0.005D0,0.008D0,0.012D0,0.01D0,0.03D0,   
628      &0.0035D0,0.011D0,0.0055D0,0.0042D0,0.009D0,0.018D0,0.015D0,       
629      &0.0185D0,0.0135D0,0.025D0,0.0004D0,0.0007D0,0.0008D0,0.0014D0,    
630      &0.0019D0,0.0025D0,0.4291D0,0.08D0,0.07D0,0.02D0,0.015D0,0.005D0,  
631      &1D0,0.3D0,0.15D0,0.16D0,0.08D0,0.13D0,0.06D0,0.08D0,0.04D0,       
632      &0.02D0,0.055D0,2*0.005D0,0.008D0,0.012D0,0.02D0,0.055D0,          
633      &2*0.005D0,0.008D0,0.012D0,0.01D0,0.03D0,0.0035D0,0.011D0,         
634      &0.0055D0,0.0042D0,0.009D0,0.018D0,0.015D0,0.0185D0,0.0135D0,      
635      &0.025D0,2*0.0002D0,0.0007D0,2*0.0004D0,0.0014D0,0.001D0,0.0009D0, 
636      &0.0025D0,0.4291D0,0.08D0,0.07D0,0.02D0,0.015D0,0.005D0,1D0,       
637      &2*0.3D0,2*0.2D0,0.047D0,0.122D0,0.006D0,0.012D0,0.035D0,0.012D0,  
638      &0.035D0,0.003D0,0.007D0,0.15D0,0.037D0,0.008D0,0.002D0,0.05D0,    
639      &0.015D0,0.003D0,0.001D0,0.014D0,0.042D0,0.014D0,0.042D0,0.24D0/   
640       DATA (BRAT(I)  ,I=1137,1341)/0.065D0,0.012D0,0.003D0,0.001D0,     
641      &0.002D0,0.001D0,0.002D0,0.014D0,0.003D0,1D0,2*0.3D0,2*0.2D0,1D0,  
642      &0.0252D0,0.0248D0,0.0267D0,0.015D0,0.045D0,0.015D0,0.045D0,       
643      &0.7743D0,0.029D0,0.22D0,0.78D0,1D0,0.331D0,0.663D0,0.006D0,       
644      &0.663D0,0.331D0,0.006D0,1D0,0.999D0,0.001D0,0.88D0,2*0.06D0,      
645      &0.639D0,0.358D0,0.002D0,0.001D0,1D0,0.88D0,2*0.06D0,0.516D0,      
646      &0.483D0,0.001D0,0.88D0,2*0.06D0,0.9988D0,0.0001D0,0.0006D0,       
647      &0.0004D0,0.0001D0,0.667D0,0.333D0,0.9954D0,0.0011D0,0.0035D0,     
648      &0.333D0,0.667D0,0.676D0,0.234D0,0.085D0,0.005D0,2*1D0,0.018D0,    
649      &2*0.005D0,0.003D0,0.002D0,2*0.006D0,0.018D0,2*0.005D0,0.003D0,    
650      &0.002D0,2*0.006D0,0.0066D0,0.025D0,0.016D0,0.0088D0,2*0.005D0,    
651      &0.0058D0,0.005D0,0.0055D0,4*0.004D0,2*0.002D0,2*0.004D0,0.003D0,  
652      &0.002D0,2*0.003D0,3*0.002D0,2*0.001D0,0.002D0,2*0.001D0,          
653      &2*0.002D0,0.0013D0,0.0018D0,5*0.001D0,4*0.003D0,2*0.005D0,        
654      &2*0.002D0,2*0.001D0,2*0.002D0,2*0.001D0,0.2432D0,0.057D0,         
655      &2*0.035D0,0.15D0,2*0.075D0,0.03D0,2*0.015D0,2*0.08D0,0.76D0,      
656      &0.08D0,4*1D0,2*0.08D0,0.76D0,0.08D0,1D0,2*0.5D0,1D0,2*0.5D0,      
657      &2*0.08D0,0.76D0,0.08D0,1D0,2*0.08D0,0.76D0,3*0.08D0,0.76D0,       
658      &3*0.08D0,0.76D0,3*0.08D0,0.76D0,3*0.08D0,0.76D0,3*0.08D0,0.76D0,  
659      &3*0.08D0,0.76D0,0.08D0,2*1D0,2*0.105D0,0.04D0,0.0077D0,0.02D0/    
660       DATA (BRAT(I)  ,I=1342,1522)/0.0235D0,0.0285D0,0.0435D0,0.0011D0, 
661      &0.0022D0,0.0044D0,0.4291D0,0.08D0,0.07D0,0.02D0,0.015D0,0.005D0,  
662      &2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,0.015D0,0.005D0,      
663      &2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,0.015D0,0.005D0,      
664      &4*1D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,0.015D0,        
665      &0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,0.015D0,      
666      &0.005D0,4*1D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,        
667      &0.015D0,0.005D0,1D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,  
668      &0.015D0,0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,      
669      &0.015D0,0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,      
670      &0.015D0,0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,      
671      &0.015D0,0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,      
672      &0.015D0,0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,      
673      &0.015D0,0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,      
674      &0.015D0,0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,      
675      &0.015D0,0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,      
676      &0.015D0,0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,      
677      &0.015D0,0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,      
678      &0.015D0,0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0,      
679      &0.015D0,0.005D0,2*0.105D0,0.04D0,0.5D0,0.08D0,0.14D0,0.01D0/      
680       DATA (BRAT(I)  ,I=1523,2548)/0.015D0,0.005D0,2*0.105D0,0.04D0,    
681      &0.5D0,0.08D0,0.14D0,0.01D0,0.015D0,0.005D0,2*0.105D0,0.04D0,      
682      &0.5D0,0.08D0,0.14D0,0.01D0,0.015D0,0.005D0,2*0.105D0,0.04D0,      
683      &0.5D0,0.08D0,0.14D0,0.01D0,0.015D0,0.005D0,2*0.105D0,0.04D0,      
684      &0.5D0,0.08D0,0.14D0,0.01D0,0.015D0,0.005D0,2*0.105D0,0.04D0,      
685      &0.5D0,0.08D0,0.14D0,0.01D0,0.015D0,0.005D0,4*1D0,0.52D0,0.26D0,   
686      &0.11D0,2*0.055D0,0.333D0,0.334D0,0.333D0,0.667D0,0.333D0,0.28D0,  
687      &0.14D0,0.313D0,0.157D0,0.11D0,0.667D0,0.333D0,0.28D0,0.14D0,      
688      &0.313D0,0.157D0,0.11D0,0.36D0,0.18D0,0.03D0,2*0.015D0,2*0.2D0,    
689      &4*0.25D0,0.667D0,0.333D0,0.667D0,0.333D0,0.667D0,0.333D0,0.667D0, 
690      &0.333D0,4*0.5D0,0.007D0,0.993D0,1D0,0.667D0,0.333D0,0.667D0,      
691      &0.333D0,0.667D0,0.333D0,0.667D0,0.333D0,8*0.5D0,0.02D0,0.98D0,    
692      &1D0,4*0.5D0,3*0.146D0,3*0.05D0,0.15D0,2*0.05D0,4*0.024D0,0.066D0, 
693      &0.667D0,0.333D0,0.667D0,0.333D0,4*0.25D0,0.667D0,0.333D0,0.667D0, 
694      &0.333D0,2*0.5D0,0.273D0,0.727D0,0.667D0,0.333D0,0.667D0,0.333D0,  
695      &4*0.5D0,0.35D0,0.65D0,2*0.0083D0,0.1866D0,0.324D0,0.184D0,        
696      &0.027D0,0.001D0,0.093D0,0.087D0,0.078D0,0.0028D0,3*0.014D0,       
697      &0.008D0,0.024D0,0.008D0,0.024D0,0.425D0,0.02D0,0.185D0,0.088D0,   
698      &0.043D0,0.067D0,0.066D0,831*0D0,0.85422D0,0.005292D0,0.044039D0,  
699      &0.096449D0,0.853165D0,0.021144D0,0.029361D0,0.096329D0/           
700       DATA (BRAT(I)  ,I=2549,4000)/0.294414D0,0.109437D0,0.596149D0,    
701      &0.389861D0,0.610139D0,1447*0D0/                                   
702       DATA (KFDP(I,1),I=   1, 374)/21,22,23,4*-24,25,21,22,23,4*24,25,  
703      &21,22,23,4*-24,25,21,22,23,4*24,25,21,22,23,4*-24,25,21,22,23,    
704      &4*24,25,37,1000022,1000023,1000025,1000035,1000021,1000039,21,22, 
705      &23,4*-24,25,2*-37,21,22,23,4*24,25,2*37,22,23,-24,25,23,24,-12,   
706      &22,23,-24,25,23,24,-12,-14,48*16,22,23,-24,25,23,24,22,23,-24,25, 
707      &-37,23,24,37,1,2,3,4,5,6,7,8,21,1,2,3,4,5,6,7,8,11,13,15,17,1,2,  
708      &3,4,5,6,7,8,11,12,13,14,15,16,17,18,4*-1,4*-3,4*-5,4*-7,-11,-13,  
709      &-15,-17,1,2,3,4,5,6,7,8,11,13,15,17,21,2*22,23,24,1000022,        
710      &2*1000023,3*1000025,4*1000035,2*1000024,2*1000037,1000001,        
711      &2000001,1000001,-1000001,1000002,2000002,1000002,-1000002,        
712      &1000003,2000003,1000003,-1000003,1000004,2000004,1000004,         
713      &-1000004,1000005,2000005,1000005,-1000005,1000006,2000006,        
714      &1000006,-1000006,1000011,2000011,1000011,-1000011,1000012,        
715      &2000012,1000012,-1000012,1000013,2000013,1000013,-1000013,        
716      &1000014,2000014,1000014,-1000014,1000015,2000015,1000015,         
717      &-1000015,1000016,2000016,1000016,-1000016,1,2,3,4,5,6,7,8,11,12,  
718      &13,14,15,16,17,18,24,37,2*23,25,35,4*-1,4*-3,4*-5,4*-7,-11,-13,   
719      &-15,-17,3*24,1,2,3,4,5,6,7,8,11,13,15,17,21,2*22,23,24,23,25,36,  
720      &1000022,2*1000023,3*1000025,4*1000035,2*1000024,2*1000037,        
721      &1000001,2000001,1000001,-1000001,1000002,2000002,1000002/         
722       DATA (KFDP(I,1),I= 375, 587)/-1000002,1000003,2000003,1000003,    
723      &-1000003,1000004,2000004,1000004,-1000004,1000005,2000005,        
724      &1000005,-1000005,1000006,2000006,1000006,-1000006,1000011,        
725      &2000011,1000011,-1000011,1000012,2000012,1000012,-1000012,        
726      &1000013,2000013,1000013,-1000013,1000014,2000014,1000014,         
727      &-1000014,1000015,2000015,1000015,-1000015,1000016,2000016,        
728      &1000016,-1000016,1,2,3,4,5,6,7,8,11,13,15,17,21,2*22,23,24,23,    
729      &1000022,2*1000023,3*1000025,4*1000035,2*1000024,2*1000037,        
730      &1000001,2000001,1000001,-1000001,1000002,2000002,1000002,         
731      &-1000002,1000003,2000003,1000003,-1000003,1000004,2000004,        
732      &1000004,-1000004,1000005,2000005,1000005,-1000005,1000006,        
733      &2000006,1000006,-1000006,1000011,2000011,1000011,-1000011,        
734      &1000012,2000012,1000012,-1000012,1000013,2000013,1000013,         
735      &-1000013,1000014,2000014,1000014,-1000014,1000015,2000015,        
736      &1000015,-1000015,1000016,2000016,1000016,-1000016,-1,-3,-5,-7,    
737      &-11,-13,-15,-17,24,2*1000022,2*1000023,2*1000025,2*1000035,       
738      &1000006,2000006,1000006,2000006,-1000001,-1000003,-1000011,       
739      &-1000013,-1000015,-2000015,5,6,21,2,1,2,3,4,5,6,11,13,15,3,4,5,6, 
740      &11,13,15,21,2*4,24,-11,-13,-15,3,4,5,6,11,13,15,21,2*24,2*52,     
741      &2*22,2*23,1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,2*24,3*52,24/   
742       DATA (KFDP(I,1),I= 588, 979)/4*-1,4*-3,4*-5,4*-7,-11,-13,-15,-17, 
743      &22,23,22,23,24,52,24,52,1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,  
744      &3*-11,2*-13,-15,24,3*-11,2*-13,-15,63,3*-1,3*-3,3*-5,-11,-13,-15, 
745      &82,-11,-13,2*2,-12,-14,-16,2*-2,2*-4,-2,-4,2*22,211,111,221,13,   
746      &11,213,-213,221,223,321,130,310,111,331,111,211,-12,12,-14,14,    
747      &211,111,22,-13,-11,2*211,213,113,221,223,321,211,331,22,111,211,  
748      &2*22,211,22,111,211,22,211,221,111,11,211,111,2*211,321,130,310,  
749      &221,111,211,111,130,310,321,2*311,321,311,323,313,323,313,321,    
750      &3*311,-13,3*211,12,14,311,2*321,311,321,313,323,313,323,311,      
751      &4*321,211,111,3*22,111,321,130,-213,113,213,211,22,111,11,13,211, 
752      &321,130,310,221,211,111,11*-11,11*-13,-311,-313,-311,-313,-20313, 
753      &2*-311,-313,-311,-313,2*111,2*221,2*331,2*113,2*223,2*333,-311,   
754      &-313,2*-321,211,-311,-321,333,-311,-313,-321,211,2*-321,2*-311,   
755      &-321,211,113,421,2*411,421,411,423,413,423,413,421,411,8*-11,     
756      &8*-13,-321,-323,-321,-323,-311,2*-313,-311,-313,2*-311,-321,      
757      &-10323,-321,-323,-321,-311,2*-313,211,111,333,3*-321,-311,-313,   
758      &-321,-313,310,333,211,2*-321,-311,-313,-311,211,-321,3*-311,211,  
759      &113,321,2*421,411,421,413,423,413,423,411,421,-15,5*-11,5*-13,    
760      &221,331,333,221,331,333,10221,211,213,211,213,321,323,321,323,    
761      &2212,221,331,333,221,2*2,2*431,421,411,423,413,82,11,13,82,443/   
762       DATA (KFDP(I,1),I= 980,1419)/82,6*12,6*14,2*16,3*-411,3*-413,     
763      &2*-411,2*-413,2*441,2*443,2*20443,2*2,2*4,2,4,511,521,511,523,    
764      &513,523,513,521,511,6*12,6*14,2*16,3*-421,3*-423,2*-421,2*-423,   
765      &2*441,2*443,2*20443,2*2,2*4,2,4,521,511,521,513,523,513,523,511,  
766      &521,6*12,6*14,2*16,3*-431,3*-433,2*-431,2*-433,3*441,3*443,       
767      &3*20443,2*2,2*4,2,4,531,521,511,523,513,16,2*4,2*12,2*14,2*16,    
768      &4*2,4*4,2*-11,2*-13,2*-1,2*-3,2*-11,2*-13,2*-1,541,511,521,513,   
769      &523,21,11,13,15,1,2,3,4,21,22,553,21,2112,2212,2*2112,2212,2112,  
770      &2*2212,2112,-12,3122,3212,3112,2212,2*2112,-12,2*3122,3222,3112,  
771      &2212,2112,2212,3122,3222,3212,3122,3112,-12,-14,-12,3322,3312,    
772      &2*3122,3212,3322,3312,3122,3322,3312,-12,2*4122,7*-11,7*-13,      
773      &2*2224,2*2212,2*2214,2*3122,2*3212,2*3214,5*3222,4*3224,2*3322,   
774      &3324,2*2224,7*2212,5*2214,2*2112,2*2114,2*3122,2*3212,2*3214,     
775      &2*3222,2*3224,4*2,3,2*2,1,2*2,-11,-13,2*2,4*4122,-11,-13,2*2,     
776      &3*4132,3*4232,-11,-13,2*2,4332,-11,-13,2*2,-11,-13,2*2,-11,-13,   
777      &2*2,-11,-13,2*2,-11,-13,2*2,-11,-13,2*2,-11,-13,2*2,2*5122,-12,   
778      &-14,-16,5*4122,441,443,20443,2*-2,2*-4,-2,-4,-12,-14,-16,2*-2,    
779      &2*-4,-2,-4,-12,-14,-16,2*-2,2*-4,-2,-4,4*5122,-12,-14,-16,2*-2,   
780      &2*-4,-2,-4,-12,-14,-16,2*-2,2*-4,-2,-4,2*5132,2*5232,-12,-14,-16, 
781      &2*-2,2*-4,-2,-4,5332,-12,-14,-16,2*-2,2*-4,-2,-4,-12,-14,-16/     
782       DATA (KFDP(I,1),I=1420,1739)/2*-2,2*-4,-2,-4,-12,-14,-16,2*-2,    
783      &2*-4,-2,-4,-12,-14,-16,2*-2,2*-4,-2,-4,-12,-14,-16,2*-2,2*-4,-2,  
784      &-4,-12,-14,-16,2*-2,2*-4,-2,-4,-12,-14,-16,2*-2,2*-4,-2,-4,-12,   
785      &-14,-16,2*-2,2*-4,-2,-4,-12,-14,-16,2*-2,2*-4,-2,-4,-12,-14,-16,  
786      &2*-2,2*-4,-2,-4,-12,-14,-16,2*-2,2*-4,-2,-4,-12,-14,-16,2*-2,     
787      &2*-4,-2,-4,-12,-14,-16,2*-2,2*-4,-2,-4,-12,-14,-16,2*-2,2*-4,-2,  
788      &-4,-12,-14,-16,2*-2,2*-4,-2,-4,-12,-14,-16,2*-2,2*-4,-2,-4,-12,   
789      &-14,-16,2*-2,2*-4,-2,-4,-12,-14,-16,2*-2,2*-4,-2,-4,221,223,221,  
790      &223,211,111,321,130,310,213,113,-213,321,311,321,311,323,313,     
791      &2*311,321,311,321,313,323,321,211,111,321,130,310,2*211,313,-313, 
792      &323,-323,421,411,423,413,411,421,413,423,411,421,423,413,443,     
793      &2*82,521,511,523,513,511,521,513,523,521,511,523,513,511,521,513, 
794      &523,553,2*21,213,-213,113,213,10211,10111,-10211,2*221,213,2*113, 
795      &-213,2*321,2*311,113,323,2*313,323,313,-313,323,-323,423,2*413,   
796      &2*423,413,443,82,523,2*513,2*523,2*513,523,553,21,11,13,82,4*443, 
797      &10441,20443,445,441,11,13,15,1,2,3,4,21,22,2*553,10551,20553,555, 
798      &1000039,-1000024,-1000037,1000022,1000023,1000025,1000035,        
799      &1000002,2000002,1000002,2000002,1000021,1000039,1000024,1000037,  
800      &1000022,1000023,1000025,1000035,1000001,2000001,1000001,2000001,  
801      &1000021,1000039,-1000024,-1000037,1000022,1000023,1000025/        
802       DATA (KFDP(I,1),I=1740,1907)/1000035,1000004,2000004,1000004,     
803      &2000004,1000021,1000039,1000024,1000037,1000022,1000023,1000025,  
804      &1000035,1000003,2000003,1000003,2000003,1000021,1000039,-1000024, 
805      &-1000037,1000022,1000023,1000025,1000035,1000006,2000006,1000006, 
806      &2000006,1000021,1000039,1000024,1000037,1000022,1000023,1000025,  
807      &1000035,1000005,2000005,1000005,2000005,1000021,1000022,1000016,  
808      &-1000015,1000039,-1000024,-1000037,1000022,1000023,1000025,       
809      &1000035,1000012,2000012,1000012,2000012,1000039,1000024,1000037,  
810      &1000022,1000023,1000025,1000035,1000011,2000011,1000011,2000011,  
811      &1000039,-1000024,-1000037,1000022,1000023,1000025,1000035,        
812      &1000014,2000014,1000014,2000014,1000039,1000024,1000037,1000022,  
813      &1000023,1000025,1000035,1000013,2000013,1000013,2000013,1000039,  
814      &-1000024,-1000037,1000022,1000023,1000025,1000035,1000016,        
815      &2000016,1000016,2000016,1000039,1000024,1000037,1000022,1000023,  
816      &1000025,1000035,1000015,2000015,1000015,2000015,1000039,1000001,  
817      &-1000001,2000001,-2000001,1000002,-1000002,2000002,-2000002,      
818      &1000003,-1000003,2000003,-2000003,1000004,-1000004,2000004,       
819      &-2000004,1000005,-1000005,2000005,-2000005,1000006,-1000006,      
820      &2000006,-2000006,6*1000022,6*1000023,6*1000025,6*1000035,1000024, 
821      &-1000024,1000024,-1000024,1000024,-1000024,1000037,-1000037/      
822       DATA (KFDP(I,1),I=1908,2126)/1000037,-1000037,1000037,-1000037,   
823      &5*1000039,4,1,5*1000039,16*1000022,1000024,-1000024,1000024,      
824      &-1000024,1000024,-1000024,1000024,-1000024,1000024,-1000024,      
825      &1000024,-1000024,1000037,-1000037,1000037,-1000037,1000037,       
826      &-1000037,1000037,-1000037,1000037,-1000037,1000037,-1000037,      
827      &1000024,-1000024,1000037,-1000037,1000001,-1000001,2000001,       
828      &-2000001,1000002,-1000002,2000002,-2000002,1000003,-1000003,      
829      &2000003,-2000003,1000004,-1000004,2000004,-2000004,1000005,       
830      &-1000005,2000005,-2000005,1000006,-1000006,2000006,-2000006,      
831      &1000011,-1000011,2000011,-2000011,1000012,-1000012,2000012,       
832      &-2000012,1000013,-1000013,2000013,-2000013,1000014,-1000014,      
833      &2000014,-2000014,1000015,-1000015,2000015,-2000015,1000016,       
834      &-1000016,2000016,-2000016,5*1000021,2*1000039,6*1000022,          
835      &6*1000023,6*1000025,6*1000035,1000022,1000023,1000025,1000035,    
836      &1000002,2000002,-1000001,-2000001,1000004,2000004,-1000003,       
837      &-2000003,1000006,2000006,-1000005,-2000005,1000012,2000012,       
838      &-1000011,-2000011,1000014,2000014,-1000013,-2000013,1000016,      
839      &2000016,-1000015,-2000015,2*1000021,5*1000039,16*1000022,         
840      &16*1000023,1000024,-1000024,1000024,-1000024,1000024,-1000024,    
841      &1000024,-1000024,1000024,-1000024,1000024,-1000024,1000037/       
842       DATA (KFDP(I,1),I=2127,2315)/-1000037,1000037,-1000037,1000037,   
843      &-1000037,1000037,-1000037,1000037,-1000037,1000037,-1000037,      
844      &1000024,-1000024,1000037,-1000037,1000001,-1000001,2000001,       
845      &-2000001,1000002,-1000002,2000002,-2000002,1000003,-1000003,      
846      &2000003,-2000003,1000004,-1000004,2000004,-2000004,1000005,       
847      &-1000005,2000005,-2000005,1000006,-1000006,2000006,-2000006,      
848      &1000011,-1000011,2000011,-2000011,1000012,-1000012,2000012,       
849      &-2000012,1000013,-1000013,2000013,-2000013,1000014,-1000014,      
850      &2000014,-2000014,1000015,-1000015,2000015,-2000015,1000016,       
851      &-1000016,2000016,-2000016,5*1000021,5*1000039,16*1000022,         
852      &16*1000023,16*1000025,1000024,-1000024,1000024,-1000024,1000024,  
853      &-1000024,1000024,-1000024,1000024,-1000024,1000024,-1000024,      
854      &1000037,-1000037,1000037,-1000037,1000037,-1000037,1000037,       
855      &-1000037,1000037,-1000037,1000037,-1000037,1000024,-1000024,      
856      &1000037,-1000037,1000001,-1000001,2000001,-2000001,1000002,       
857      &-1000002,2000002,-2000002,1000003,-1000003,2000003,-2000003,      
858      &1000004,-1000004,2000004,-2000004,1000005,-1000005,2000005,       
859      &-2000005,1000006,-1000006,2000006,-2000006,1000011,-1000011,      
860      &2000011,-2000011,1000012,-1000012,2000012,-2000012,1000013,       
861      &-1000013,2000013,-2000013,1000014,-1000014,2000014,-2000014/      
862       DATA (KFDP(I,1),I=2316,2516)/1000015,-1000015,2000015,-2000015,   
863      &1000016,-1000016,2000016,-2000016,5*1000021,2*1000039,15*1000024, 
864      &6*1000022,6*1000023,6*1000025,6*1000035,1000022,1000023,1000025,  
865      &1000035,1000002,2000002,-1000001,-2000001,1000004,2000004,        
866      &-1000003,-2000003,1000006,2000006,-1000005,-2000005,1000012,      
867      &2000012,-1000011,-2000011,1000014,2000014,-1000013,-2000013,      
868      &1000016,2000016,-1000015,-2000015,2*1000021,1000039,-1000024,     
869      &-1000037,1000022,1000023,1000025,1000035,4*1000001,1000002,       
870      &2000002,1000002,2000002,1000021,1000039,1000024,1000037,1000022,  
871      &1000023,1000025,1000035,4*1000002,1000001,2000001,1000001,        
872      &2000001,1000021,1000039,-1000024,-1000037,1000022,1000023,        
873      &1000025,1000035,4*1000003,1000004,2000004,1000004,2000004,        
874      &1000021,1000039,1000024,1000037,1000022,1000023,1000025,1000035,  
875      &4*1000004,1000003,2000003,1000003,2000003,1000021,1000039,        
876      &-1000024,-1000037,1000022,1000023,1000025,1000035,4*1000005,      
877      &1000006,2000006,1000006,2000006,1000021,1000039,1000024,1000037,  
878      &1000022,1000023,1000025,1000035,4*1000006,1000005,2000005,        
879      &1000005,2000005,1000021,1000039,-1000024,-1000037,1000022,        
880      &1000023,1000025,1000035,4*1000011,1000012,2000012,1000012,        
881      &2000012,1000039,-1000024,-1000037,1000022,1000023,1000025/        
882       DATA (KFDP(I,1),I=2517,4000)/1000035,4*1000013,1000014,2000014,   
883      &1000014,2000014,1000039,-1000024,-1000037,1000022,1000023,        
884      &1000025,1000035,4*1000015,1000016,2000016,1000016,2000016,21,22,  
885      &23,-24,21,22,23,24,22,23,-24,23,24,1447*0/                        
886       DATA (KFDP(I,2),I=   1, 339)/3*1,2,4,6,8,1,3*2,1,3,5,7,2,3*3,2,4, 
887      &6,8,3,3*4,1,3,5,7,4,3*5,2,4,6,8,5,3*6,1,3,5,7,6,5,6*1000006,3*7,  
888      &2,4,6,8,7,4,6,3*8,1,3,5,7,8,5,7,2*11,12,11,12,2*11,2*13,14,13,14, 
889      &13,11,13,-211,-213,-211,-213,-211,-213,-211,-213,2*-211,-321,     
890      &-323,-321,2*-323,3*-321,4*-211,-213,-211,-213,-211,-213,-211,     
891      &-213,-211,-213,3*-211,-213,4*-211,-323,-321,2*-211,2*-321,3*-211, 
892      &2*15,16,15,16,15,2*17,18,17,2*18,2*17,-1,-2,-3,-4,-5,-6,-7,-8,21, 
893      &-1,-2,-3,-4,-5,-6,-7,-8,-11,-13,-15,-17,-1,-2,-3,-4,-5,-6,-7,-8,  
894      &-11,-12,-13,-14,-15,-16,-17,-18,2,4,6,8,2,4,6,8,2,4,6,8,2,4,6,8,  
895      &12,14,16,18,-1,-2,-3,-4,-5,-6,-7,-8,-11,-13,-15,-17,21,22,2*23,   
896      &-24,2*1000022,1000023,1000022,1000023,1000025,1000022,1000023,    
897      &1000025,1000035,-1000024,-1000037,-1000024,-1000037,-1000001,     
898      &2*-2000001,2000001,-1000002,2*-2000002,2000002,-1000003,          
899      &2*-2000003,2000003,-1000004,2*-2000004,2000004,-1000005,          
900      &2*-2000005,2000005,-1000006,2*-2000006,2000006,-1000011,          
901      &2*-2000011,2000011,-1000012,2*-2000012,2000012,-1000013,          
902      &2*-2000013,2000013,-1000014,2*-2000014,2000014,-1000015,          
903      &2*-2000015,2000015,-1000016,2*-2000016,2000016,-1,-2,-3,-4,-5,-6, 
904      &-7,-8,-11,-12,-13,-14,-15,-16,-17,-18,-24,-37,22,25,2*36,2,4,6,8, 
905      &2,4,6,8,2,4,6,8,2,4,6,8,12,14,16,18,23,22,25,-1,-2,-3,-4,-5,-6/   
906       DATA (KFDP(I,2),I= 340, 526)/-7,-8,-11,-13,-15,-17,21,22,2*23,    
907      &-24,2*25,36,2*1000022,1000023,1000022,1000023,1000025,1000022,    
908      &1000023,1000025,1000035,-1000024,-1000037,-1000024,-1000037,      
909      &-1000001,2*-2000001,2000001,-1000002,2*-2000002,2000002,-1000003, 
910      &2*-2000003,2000003,-1000004,2*-2000004,2000004,-1000005,          
911      &2*-2000005,2000005,-1000006,2*-2000006,2000006,-1000011,          
912      &2*-2000011,2000011,-1000012,2*-2000012,2000012,-1000013,          
913      &2*-2000013,2000013,-1000014,2*-2000014,2000014,-1000015,          
914      &2*-2000015,2000015,-1000016,2*-2000016,2000016,-1,-2,-3,-4,-5,-6, 
915      &-7,-8,-11,-13,-15,-17,21,22,2*23,-24,25,2*1000022,1000023,        
916      &1000022,1000023,1000025,1000022,1000023,1000025,1000035,-1000024, 
917      &-1000037,-1000024,-1000037,-1000001,2*-2000001,2000001,-1000002,  
918      &2*-2000002,2000002,-1000003,2*-2000003,2000003,-1000004,          
919      &2*-2000004,2000004,-1000005,2*-2000005,2000005,-1000006,          
920      &2*-2000006,2000006,-1000011,2*-2000011,2000011,-1000012,          
921      &2*-2000012,2000012,-1000013,2*-2000013,2000013,-1000014,          
922      &2*-2000014,2000014,-1000015,2*-2000015,2000015,-1000016,          
923      &2*-2000016,2000016,2,4,6,8,12,14,16,18,25,1000024,1000037,        
924      &1000024,1000037,1000024,1000037,1000024,1000037,2*-1000005,       
925      &2*-2000005,1000002,1000004,1000012,1000014,2*1000016,-5,-6,21,11/ 
926       DATA (KFDP(I,2),I= 527, 931)/-3,-4,-5,-6,-7,-8,-13,-15,-17,-3,-4, 
927      &-5,-6,-11,-13,-15,21,-3,-5,5,12,14,16,-3,-4,-5,-6,-11,-13,-15,21, 
928      &-24,-52,-24,-52,51,53,51,53,-1,-2,-3,-4,-5,-6,-7,-8,-11,-12,-13,  
929      &-14,-15,-16,-17,-18,23,51,23,51,22,53,2,4,6,8,2,4,6,8,2,4,6,8,2,  
930      &4,6,8,12,14,16,18,2*51,2*53,-52,2*-24,-52,-1,-2,-3,-4,-5,-6,-7,   
931      &-8,-11,-12,-13,-14,-15,-16,-17,-18,-11,-13,-15,-13,2*-15,24,-11,  
932      &-13,-15,-13,2*-15,63,2,4,6,2,4,6,2,4,6,64,65,66,-82,12,14,-1,-3,  
933      &11,13,15,1,4,3,4,1,3,22,11,-211,2*22,-13,-11,-211,211,111,211,    
934      &-321,130,310,22,2*111,-211,11,-11,13,-13,-211,111,22,14,12,111,   
935      &22,111,3*211,-311,22,211,22,111,-211,211,11,-211,13,22,-211,111,  
936      &-211,22,111,-11,-211,111,2*-211,-321,130,310,221,111,-211,111,    
937      &2*0,-211,111,22,-211,111,-211,111,-211,211,-213,113,223,221,14,   
938      &111,211,111,-11,-13,211,111,22,211,111,211,111,2*211,213,113,223, 
939      &221,22,-211,111,113,223,22,111,-321,310,211,111,2*-211,221,22,    
940      &-11,-13,-211,-321,130,310,221,-211,111,11*12,11*14,2*211,2*213,   
941      &211,20213,2*321,2*323,211,213,211,213,211,213,211,213,211,213,    
942      &211,213,3*211,213,211,2*321,8*211,2*113,3*211,111,22,211,111,211, 
943      &111,4*211,8*12,8*14,2*211,2*213,2*111,221,2*113,223,333,20213,    
944      &211,2*321,323,2*311,313,-211,111,113,2*211,321,2*211,311,321,310, 
945      &211,-211,4*211,321,4*211,113,2*211,-321,111,22,-211,111,-211,111/ 
946       DATA (KFDP(I,2),I= 932,1317)/-211,211,-211,211,16,5*12,5*14,      
947      &3*211,3*213,211,2*111,2*113,2*-311,2*-313,-2112,3*321,323,2*-1,   
948      &22,111,321,311,321,311,-82,-11,-13,-82,22,-82,6*-11,6*-13,2*-15,  
949      &211,213,20213,211,213,20213,431,433,431,433,311,313,311,313,311,  
950      &313,-1,-4,-3,-4,-1,-3,22,-211,111,-211,111,-211,211,-211,211,     
951      &6*-11,6*-13,2*-15,211,213,20213,211,213,20213,431,433,431,433,    
952      &321,323,321,323,321,323,-1,-4,-3,-4,-1,-3,22,211,111,211,111,     
953      &4*211,6*-11,6*-13,2*-15,211,213,20213,211,213,20213,431,433,431,  
954      &433,221,331,333,221,331,333,221,331,333,-1,-4,-3,-4,-1,-3,22,     
955      &-321,-311,-321,-311,-15,-3,-1,2*-11,2*-13,2*-15,-1,-4,-3,-4,-3,   
956      &-4,-1,-4,2*12,2*14,2,3,2,3,2*12,2*14,2,1,22,411,421,411,421,21,   
957      &-11,-13,-15,-1,-2,-3,-4,2*21,22,21,2*-211,111,22,111,211,22,211,  
958      &-211,11,2*-211,111,-211,111,22,11,22,111,-211,211,111,211,22,211, 
959      &111,211,-211,22,11,13,11,-211,2*111,2*22,111,211,-321,-211,111,   
960      &11,2*-211,7*12,7*14,-321,-323,-311,-313,-311,-313,211,213,211,    
961      &213,211,213,111,221,331,113,223,111,221,113,223,321,323,321,-211, 
962      &-213,111,221,331,113,223,333,10221,111,221,331,113,223,211,213,   
963      &211,213,321,323,321,323,321,323,311,313,311,313,2*-1,-3,-1,2203,  
964      &3201,3203,2203,2101,2103,12,14,-1,-3,2*111,2*211,12,14,-1,-3,22,  
965      &111,2*22,111,22,12,14,-1,-3,22,12,14,-1,-3,12,14,-1,-3,12,14,-1/  
966       DATA (KFDP(I,2),I=1318,1756)/-3,12,14,-1,-3,12,14,-1,-3,12,14,-1, 
967      &-3,12,14,-1,-3,2*-211,11,13,15,-211,-213,-20213,-431,-433,3*3122, 
968      &1,4,3,4,1,3,11,13,15,1,4,3,4,1,3,11,13,15,1,4,3,4,1,3,2*111,      
969      &2*211,11,13,15,1,4,3,4,1,3,11,13,15,1,4,3,4,1,3,4*22,11,13,15,1,  
970      &4,3,4,1,3,22,11,13,15,1,4,3,4,1,3,11,13,15,1,4,3,4,1,3,11,13,15,  
971      &1,4,3,4,1,3,11,13,15,1,4,3,4,1,3,11,13,15,1,4,3,4,1,3,11,13,15,1, 
972      &4,3,4,1,3,11,13,15,1,4,3,4,1,3,11,13,15,1,4,3,4,1,3,11,13,15,1,4, 
973      &3,4,1,3,11,13,15,1,4,3,4,1,3,11,13,15,1,4,3,4,1,3,11,13,15,1,4,3, 
974      &4,1,3,11,13,15,1,4,3,4,1,3,11,13,15,1,4,3,4,1,3,11,13,15,1,4,3,4, 
975      &1,3,11,13,15,1,4,3,4,1,3,11,13,15,1,4,3,4,1,3,11,13,15,1,4,3,4,1, 
976      &3,2*111,2*211,-211,111,-321,130,310,-211,111,211,-211,111,-213,   
977      &113,-211,111,223,211,111,213,113,211,111,223,-211,111,-321,130,   
978      &310,2*-211,-311,311,-321,321,211,111,211,111,-211,111,-211,111,   
979      &311,2*321,311,22,2*-82,-211,111,-211,111,211,111,211,111,-321,    
980      &-311,-321,-311,411,421,411,421,22,2*21,-211,2*211,111,-211,111,   
981      &2*211,111,-211,211,111,211,-321,2*-311,-321,22,-211,111,211,111,  
982      &-311,311,-321,321,211,111,-211,111,321,311,22,-82,-211,111,211,   
983      &111,-321,-311,411,421,22,21,-11,-13,-82,211,111,221,111,4*22,-11, 
984      &-13,-15,-1,-2,-3,-4,2*21,211,111,3*22,1,2*2,4*1,2*-24,2*-37,1,2,  
985      &2*1,4*2,2*24,2*37,2,3,2*4,4*3,2*-24,2*-37,3,4,2*3,4*4,2*24,2*37/  
986       DATA (KFDP(I,2),I=1757,2220)/4,5,2*6,4*5,2*-24,2*-37,5,6,2*5,4*6, 
987      &2*24,2*37,6,4,-15,16,11,2*12,4*11,2*-24,2*-37,12,2*11,4*12,2*24,  
988      &2*37,13,2*14,4*13,2*-24,2*-37,14,2*13,4*14,2*24,2*37,15,2*16,     
989      &4*15,2*-24,2*-37,16,2*15,4*16,2*24,2*37,21,-1,1,-1,1,-2,2,-2,2,   
990      &-3,3,-3,3,-4,4,-4,4,-5,5,-5,5,-6,6,-6,6,1,3,5,2,4,6,1,3,5,2,4,6,  
991      &1,3,5,2,4,6,1,3,5,2,4,6,1,-1,3,-3,5,-5,1,-1,3,-3,5,-5,22,23,25,   
992      &35,36,-1,-3,22,23,25,35,36,22,23,11,13,15,12,14,16,1,3,5,2,4,25,  
993      &35,36,-24,24,11,-11,13,-13,15,-15,1,-1,3,-3,-24,24,11,-11,13,-13, 
994      &15,-15,1,-1,3,-3,-37,37,-37,37,-1,1,-1,1,-2,2,-2,2,-3,3,-3,3,-4,  
995      &4,-4,4,-5,5,-5,5,-6,6,-6,6,-11,11,-11,11,-12,12,-12,12,-13,13,    
996      &-13,13,-14,14,-14,14,-15,15,-15,15,-16,16,-16,16,1,3,5,2,4,24,37, 
997      &24,-11,-13,-15,-1,-3,24,-11,-13,-15,-1,-3,24,-11,-13,-15,-1,-3,   
998      &24,-11,-13,-15,-1,-3,4*37,2*-1,2*2,2*-3,2*4,2*-5,2*6,2*-11,2*12,  
999      &2*-13,2*14,2*-15,2*16,-1,-3,22,23,25,35,36,22,23,11,13,15,12,14,  
1000      &16,1,3,5,2,4,25,35,36,22,23,11,13,15,12,14,16,1,3,5,2,4,25,35,36, 
1001      &-24,24,11,-11,13,-13,15,-15,1,-1,3,-3,-24,24,11,-11,13,-13,15,    
1002      &-15,1,-1,3,-3,-37,37,-37,37,-1,1,-1,1,-2,2,-2,2,-3,3,-3,3,-4,4,   
1003      &-4,4,-5,5,-5,5,-6,6,-6,6,-11,11,-11,11,-12,12,-12,12,-13,13,-13,  
1004      &13,-14,14,-14,14,-15,15,-15,15,-16,16,-16,16,1,3,5,2,4,22,23,25,  
1005      &35,36,22,23,11,13,15,12,14,16,1,3,5,2,4,25,35,36,22,23,11,13,15/  
1006       DATA (KFDP(I,2),I=2221,4000)/12,14,16,1,3,5,2,4,25,35,36,22,23,   
1007      &11,13,15,12,14,16,1,3,5,2,4,25,35,36,-24,24,11,-11,13,-13,15,-15, 
1008      &1,-1,3,-3,-24,24,11,-11,13,-13,15,-15,1,-1,3,-3,-37,37,-37,37,-1, 
1009      &1,-1,1,-2,2,-2,2,-3,3,-3,3,-4,4,-4,4,-5,5,-5,5,-6,6,-6,6,-11,11,  
1010      &-11,11,-12,12,-12,12,-13,13,-13,13,-14,14,-14,14,-15,15,-15,15,   
1011      &-16,16,-16,16,1,3,5,2,4,24,37,23,11,13,15,12,14,16,1,3,5,2,4,25,  
1012      &35,36,24,-11,-13,-15,-1,-3,24,-11,-13,-15,-1,-3,24,-11,-13,-15,   
1013      &-1,-3,24,-11,-13,-15,-1,-3,4*37,2*-1,2*2,2*-3,2*4,2*-5,2*6,2*-11, 
1014      &2*12,2*-13,2*14,2*-15,2*16,-1,-3,1,2*2,4*1,23,25,35,36,2*-24,     
1015      &2*-37,1,2,2*1,4*2,23,25,35,36,2*24,2*37,2,3,2*4,4*3,23,25,35,36,  
1016      &2*-24,2*-37,3,4,2*3,4*4,23,25,35,36,2*24,2*37,4,5,2*6,4*5,23,25,  
1017      &35,36,2*-24,2*-37,5,6,2*5,4*6,23,25,35,36,2*24,2*37,6,11,2*12,    
1018      &4*11,23,25,35,36,2*-24,2*-37,13,2*14,4*13,23,25,35,36,2*-24,      
1019      &2*-37,15,2*16,4*15,23,25,35,36,2*-24,2*-37,3*1,4*2,1,2*11,2*12,   
1020      &11,1447*0/                                                        
1021       DATA (KFDP(I,3),I=   1,1134)/81*0,14,6*0,2*16,2*0,6*111,310,130,  
1022      &2*0,3*111,310,130,321,113,211,223,221,2*113,2*211,2*223,2*221,    
1023      &2*113,221,2*113,2*213,-213,113,2*111,310,130,310,130,2*310,130,   
1024      &407*0,-5,112*0,4*3,4*4,1,4,3,2*2,0,-11,8*0,-211,5*0,2*111,211,    
1025      &-211,211,-211,10*0,111,4*0,2*111,-211,-11,11,-13,22,111,3*0,22,   
1026      &3*0,111,211,4*0,111,11*0,111,-211,6*0,-211,3*111,7*0,111,-211,    
1027      &5*0,2*221,3*0,111,5*0,111,11*0,-311,-313,-311,-321,-313,-323,111, 
1028      &221,331,113,223,-311,-313,-311,-321,-313,-323,111,221,331,113,    
1029      &223,22*0,111,113,2*211,-211,-311,211,111,3*211,-211,7*211,7*0,    
1030      &111,-211,111,-211,-321,-323,-311,-321,-313,-323,-211,-213,-321,   
1031      &-323,-311,-321,-313,-323,-211,-213,22*0,111,113,-311,2*-211,211,  
1032      &-211,310,-211,2*111,211,2*-211,-321,-211,2*211,-211,111,-211,     
1033      &2*211,6*0,111,-211,111,-211,0,221,331,333,321,311,221,331,333,    
1034      &321,311,20*0,3,13*0,-411,-413,-10413,-10411,-20413,-415,-411,     
1035      &-413,-10413,-10411,-20413,-415,-411,-413,16*0,-4,-1,-4,-3,2*-2,   
1036      &5*0,111,-211,111,-211,-421,-423,-10423,-10421,-20423,-425,-421,   
1037      &-423,-10423,-10421,-20423,-425,-421,-423,16*0,-4,-1,-4,-3,2*-2,   
1038      &5*0,111,-211,111,-211,-431,-433,-10433,-10431,-20433,-435,-431,   
1039      &-433,-10433,-10431,-20433,-435,-431,-433,19*0,-4,-1,-4,-3,2*-2,   
1040      &8*0,441,443,441,443,441,443,-4,-1,-4,-3,-4,-3,-4,-1,531,533,531/  
1041       DATA (KFDP(I,3),I=1135,2233)/533,3,2,3,2,511,513,511,513,1,2,     
1042      &13*0,2*21,11*0,2112,6*0,2212,12*0,2*3122,3212,10*0,3322,2*0,3122, 
1043      &3212,3214,2112,2114,2212,2112,3122,3212,3214,2112,2114,2212,2112, 
1044      &52*0,3*3,1,6*0,4*3,4*0,4*3,6*0,4*3,0,28*3,2*0,3*4122,8*0,4,1,4,3, 
1045      &2*2,4*4,1,4,3,2*2,4*4,1,4,3,2*2,4*0,4*4,1,4,3,2*2,4*4,1,4,3,2*2,  
1046      &4*0,4*4,1,4,3,2*2,0,4*4,1,4,3,2*2,4*4,1,4,3,2*2,4*4,1,4,3,2*2,    
1047      &4*4,1,4,3,2*2,4*4,1,4,3,2*2,4*4,1,4,3,2*2,4*4,1,4,3,2*2,4*4,1,4,  
1048      &3,2*2,4*4,1,4,3,2*2,4*4,1,4,3,2*2,4*4,1,4,3,2*2,4*4,1,4,3,2*2,    
1049      &4*4,1,4,3,2*2,4*4,1,4,3,2*2,4*4,1,4,3,2*2,4*4,1,4,3,2*2,4*4,1,4,  
1050      &3,2*2,4*4,1,4,3,2*2,31*0,211,111,45*0,-211,2*111,-211,3*111,-211, 
1051      &111,211,30*0,-211,111,13*0,2*21,-211,111,76*0,2*5,91*0,-1,-3,-5,  
1052      &-2,-4,-6,-1,-3,-5,-2,-4,-6,-1,-3,-5,-2,-4,-6,-1,-3,-5,-2,-4,-6,   
1053      &-2,2,-4,4,-6,6,-2,2,-4,4,-6,6,5*0,11,12,7*0,-11,-13,-15,-12,-14,  
1054      &-16,-1,-3,-5,-2,-4,5*0,-12,12,-14,14,-16,16,-2,2,-4,4,2*0,-12,12, 
1055      &-14,14,-16,16,-2,2,-4,4,52*0,-1,-3,-5,-2,-4,3*0,12,14,16,2,4,0,   
1056      &12,14,16,2,4,0,12,14,16,2,4,0,12,14,16,2,4,28*0,2,4,7*0,-11,-13,  
1057      &-15,-12,-14,-16,-1,-3,-5,-2,-4,5*0,-11,-13,-15,-12,-14,-16,-1,-3, 
1058      &-5,-2,-4,5*0,-12,12,-14,14,-16,16,-2,2,-4,4,2*0,-12,12,-14,14,    
1059      &-16,16,-2,2,-4,4,52*0,-1,-3,-5,-2,-4,7*0,-11,-13,-15,-12,-14,-16, 
1060      &-1,-3,-5,-2,-4,5*0,-11,-13,-15,-12,-14,-16,-1,-3,-5,-2,-4,5*0/    
1061       DATA (KFDP(I,3),I=2234,4000)/-11,-13,-15,-12,-14,-16,-1,-3,-5,-2, 
1062      &-4,5*0,-12,12,-14,14,-16,16,-2,2,-4,4,2*0,-12,12,-14,14,-16,16,   
1063      &-2,2,-4,4,52*0,-1,-3,-5,-2,-4,3*0,-11,-13,-15,-12,-14,-16,-1,-3,  
1064      &-5,-2,-4,4*0,12,14,16,2,4,0,12,14,16,2,4,0,12,14,16,2,4,0,12,14,  
1065      &16,2,4,28*0,2,4,1601*0/                                           
1066       DATA (KFDP(I,4),I=   1,4000)/94*0,4*111,6*0,111,2*0,-211,0,-211,  
1067      &3*0,111,2*-211,0,111,0,2*111,113,221,2*111,-213,-211,211,113,     
1068      &6*111,310,2*130,520*0,13*81,41*0,-11,10*0,111,-211,4*0,111,62*0,  
1069      &111,211,111,211,7*0,111,211,111,211,35*0,2*-211,2*111,211,111,    
1070      &-211,2*211,2*-211,13*0,-211,111,-211,111,4*0,-211,111,-211,111,   
1071      &34*0,111,-211,3*111,3*-211,2*111,3*-211,14*0,-321,-311,3*0,-321,  
1072      &-311,20*0,-3,43*0,6*1,39*0,6*2,42*0,6*3,14*0,8*4,4*0,4*-5,4*0,    
1073      &2*-5,67*0,-211,111,5*0,-211,111,52*0,2101,2103,2*2101,6*0,4*81,   
1074      &4*0,4*81,6*0,4*81,0,28*81,13*0,6*2101,18*81,4*0,18*81,4*0,9*81,0, 
1075      &162*81,31*0,-211,111,2398*0/                                      
1076       DATA (KFDP(I,5),I=   1,4000)/96*0,2*111,17*0,111,7*0,2*111,0,     
1077      &3*111,0,111,715*0,-211,2*111,-211,111,-211,111,65*0,111,-211,     
1078      &3*111,-211,111,3075*0/                                            
1079        
1080 C...PYDAT4, with particle names (character strings). 
1081       DATA (CHAF(I,1),I=   1, 185)/'d','u','s','c','b','t','b''','t''', 
1082      &2*' ','e-','nu_e','mu-','nu_mu','tau-','nu_tau','tau''-',         
1083      &'nu''_tau',2*' ','g','gamma','Z0','W+','h0',2*' ','reggeon',      
1084      &'pomeron',2*' ','Z''0','Z"0','W''+','H0','A0','H+','eta_tech0',   
1085      &'LQ_ue','R0',10*' ','pi_tech0','pi_tech+','pi''_tech0',           
1086      &'rho_tech0','rho_tech+','omega_tech',4*' ','H_L++','H_R++',       
1087      &'W_R+','nu_Re','nu_Rmu','nu_Rtau',14*' ','specflav','rndmflav',   
1088      &'phasespa','c-hadron','b-hadron',5*' ','cluster','string',        
1089      &'indep.','CMshower','SPHEaxis','THRUaxis','CLUSjet','CELLjet',    
1090      &'table',' ','rho_diff0','pi0','rho0','a_20','K_L0','pi_diffr+',   
1091      &'pi+','rho+','a_2+','omega_di','eta','omega','f_2','K_S0','K0',   
1092      &'K*0','K*_20','K+','K*+','K*_2+','phi_diff','eta''','phi',        
1093      &'f''_2','D+','D*+','D*_2+','D0','D*0','D*_20','D_s+','D*_s+',     
1094      &'D*_2s+','J/psi_di','eta_c','J/psi','chi_2c','B0','B*0','B*_20',  
1095      &'B+','B*+','B*_2+','B_s0','B*_s0','B*_2s0','B_c+','B*_c+',        
1096      &'B*_2c+','eta_b','Upsilon','chi_2b','dd_1','Delta-','ud_0',       
1097      &'ud_1','n_diffr0','n0','Delta0','uu_1','p_diffr+','p+','Delta+',  
1098      &'Delta++','sd_0','sd_1','Sigma-','Sigma*-','Lambda0','su_0',      
1099      &'su_1','Sigma0','Sigma*0','Sigma+','Sigma*+','ss_1','Xi-','Xi*-', 
1100      &'Xi0','Xi*0','Omega-','cd_0','cd_1','Sigma_c0','Sigma*_c0'/       
1101       DATA (CHAF(I,1),I= 186, 315)/'Lambda_c+','Xi_c0','cu_0','cu_1',   
1102      &'Sigma_c+','Sigma*_c+','Sigma_c++','Sigma*_c++','Xi_c+','cs_0',   
1103      &'cs_1','Xi''_c0','Xi*_c0','Xi''_c+','Xi*_c+','Omega_c0',          
1104      &'Omega*_c0','cc_1','Xi_cc+','Xi*_cc+','Xi_cc++','Xi*_cc++',       
1105      &'Omega_cc+','Omega*_cc+','Omega*_ccc++','bd_0','bd_1','Sigma_b-', 
1106      &'Sigma*_b-','Lambda_b0','Xi_b-','Xi_bc0','bu_0','bu_1',           
1107      &'Sigma_b0','Sigma*_b0','Sigma_b+','Sigma*_b+','Xi_b0','Xi_bc+',   
1108      &'bs_0','bs_1','Xi''_b-','Xi*_b-','Xi''_b0','Xi*_b0','Omega_b-',   
1109      &'Omega*_b-','Omega_bc0','bc_0','bc_1','Xi''_bc0','Xi*_bc0',       
1110      &'Xi''_bc+','Xi*_bc+','Omega''_bc0','Omega*_bc0','Omega_bcc+',     
1111      &'Omega*_bcc+','bb_1','Xi_bb-','Xi*_bb-','Xi_bb0','Xi*_bb0',       
1112      &'Omega_bb-','Omega*_bb-','Omega_bbc0','Omega*_bbc0',              
1113      &'Omega*_bbb-','a_00','b_10','a_0+','b_1+','f_0','h_1','K*_00',    
1114      &'K_10','K*_0+','K_1+','f''_0','h''_1','D*_0+','D_1+','D*_00',     
1115      &'D_10','D*_0s+','D_1s+','chi_0c','h_1c','B*_00','B_10','B*_0+',   
1116      &'B_1+','B*_0s0','B_1s0','B*_0c+','B_1c+','chi_0b','h_1b','a_10',  
1117      &'a_1+','f_1','K*_10','K*_1+','f''_1','D*_1+','D*_10','D*_1s+',    
1118      &'chi_1c','B*_10','B*_1+','B*_1s0','B*_1c+','chi_1b','psi''',      
1119      &'Upsilon''','~d_L','~u_L','~s_L','~c_L','~b_1','~t_1','~e_L-',    
1120      &'~nu_eL','~mu_L-','~nu_muL','~tau_1-','~nu_tauL','~g','~chi_10'/  
1121       DATA (CHAF(I,1),I= 316, 500)/'~chi_20','~chi_1+','~chi_30',       
1122      &'~chi_40','~chi_2+','~gravitino','~d_R','~u_R','~s_R','~c_R',     
1123      &'~b_2','~t_2','~e_R-','~nu_eR','~mu_R-','~nu_muR','~tau_2-',      
1124      &'~nu_tauR','d*','u*','e*-','nu*_e0',163*' '/                      
1125       DATA (CHAF(I,2),I=   1, 198)/'dbar','ubar','sbar','cbar','bbar',  
1126      &'tbar','b''bar','t''bar',2*' ','e+','nu_ebar','mu+','nu_mubar',   
1127      &'tau+','nu_taubar','tau''+','nu''_taubar',5*' ','W-',9*' ',       
1128      &'W''-',2*' ','H-',' ','LQ_uebar','Rbar0',11*' ','pi_tech-',2*' ', 
1129      &'rho_tech-',5*' ','H_L--','H_R--','W_R-','nu_Rebar','nu_Rmubar',  
1130      &'nu_Rtaubar',15*' ','rndmflavbar',' ','c-hadronbar',              
1131      &'b-hadronbar',20*' ','pi_diffr-','pi-','rho-','a_2-',5*' ',       
1132      &'Kbar0','K*bar0','K*_2bar0','K-','K*-','K*_2-',4*' ','D-','D*-',  
1133      &'D*_2-','Dbar0','D*bar0','D*_2bar0','D_s-','D*_s-','D*_2s-',      
1134      &4*' ','Bbar0','B*bar0','B*_2bar0','B-','B*-','B*_2-','B_sbar0',   
1135      &'B*_sbar0','B*_2sbar0','B_c-','B*_c-','B*_2c-',3*' ','dd_1bar',   
1136      &'Deltabar+','ud_0bar','ud_1bar','n_diffrbar0','nbar0',            
1137      &'Deltabar0','uu_1bar','p_diffrbar-','pbar-','Deltabar-',          
1138      &'Deltabar--','sd_0bar','sd_1bar','Sigmabar+','Sigma*bar+',        
1139      &'Lambdabar0','su_0bar','su_1bar','Sigmabar0','Sigma*bar0',        
1140      &'Sigmabar-','Sigma*bar-','ss_1bar','Xibar+','Xi*bar+','Xibar0',   
1141      &'Xi*bar0','Omegabar+','cd_0bar','cd_1bar','Sigma_cbar0',          
1142      &'Sigma*_cbar0','Lambda_cbar-','Xi_cbar0','cu_0bar','cu_1bar',     
1143      &'Sigma_cbar-','Sigma*_cbar-','Sigma_cbar--','Sigma*_cbar--',      
1144      &'Xi_cbar-','cs_0bar','cs_1bar','Xi''_cbar0','Xi*_cbar0'/          
1145       DATA (CHAF(I,2),I= 199, 308)/'Xi''_cbar-','Xi*_cbar-',            
1146      &'Omega_cbar0','Omega*_cbar0','cc_1bar','Xi_ccbar-','Xi*_ccbar-',  
1147      &'Xi_ccbar--','Xi*_ccbar--','Omega_ccbar-','Omega*_ccbar-',        
1148      &'Omega*_cccbar-','bd_0bar','bd_1bar','Sigma_bbar+',               
1149      &'Sigma*_bbar+','Lambda_bbar0','Xi_bbar+','Xi_bcbar0','bu_0bar',   
1150      &'bu_1bar','Sigma_bbar0','Sigma*_bbar0','Sigma_bbar-',             
1151      &'Sigma*_bbar-','Xi_bbar0','Xi_bcbar-','bs_0bar','bs_1bar',        
1152      &'Xi''_bbar+','Xi*_bbar+','Xi''_bbar0','Xi*_bbar0','Omega_bbar+',  
1153      &'Omega*_bbar+','Omega_bcbar0','bc_0bar','bc_1bar','Xi''_bcbar0',  
1154      &'Xi*_bcbar0','Xi''_bcbar-','Xi*_bcbar-','Omega''_bcba',           
1155      &'Omega*_bcbar0','Omega_bccbar-','Omega*_bccbar-','bb_1bar',       
1156      &'Xi_bbbar+','Xi*_bbbar+','Xi_bbbar0','Xi*_bbbar0','Omega_bbbar+', 
1157      &'Omega*_bbbar+','Omega_bbcbar0','Omega*_bbcbar0',                 
1158      &'Omega*_bbbbar+',2*' ','a_0-','b_1-',2*' ','K*_0bar0','K_1bar0',  
1159      &'K*_0-','K_1-',2*' ','D*_0-','D_1-','D*_0bar0','D_1bar0',         
1160      &'D*_0s-','D_1s-',2*' ','B*_0bar0','B_1bar0','B*_0-','B_1-',       
1161      &'B*_0sbar0','B_1sbar0','B*_0c-','B_1c-',3*' ','a_1-',' ',         
1162      &'K*_1bar0','K*_1-',' ','D*_1-','D*_1bar0','D*_1s-',' ',           
1163      &'B*_1bar0','B*_1-','B*_1sbar0','B*_1c-',3*' ','~d_Lbar',          
1164      &'~u_Lbar','~s_Lbar','~c_Lbar','~b_1bar','~t_1bar','~e_L+'/        
1165       DATA (CHAF(I,2),I= 309, 500)/'~nu_eLbar','~mu_L+','~nu_muLbar',   
1166      &'~tau_1+','~nu_tauLbar',3*' ','~chi_1-',2*' ','~chi_2-',' ',      
1167      &'~d_Rbar','~u_Rbar','~s_Rbar','~c_Rbar','~b_2bar','~t_2bar',      
1168      &'~e_R+','~nu_eRbar','~mu_R+','~nu_muRbar','~tau_2+',              
1169      &'~nu_tauRbar','d*bar','u*bar','e*bar+','nu*_ebar0',163*' '/       
1170        
1171 C...PYDATR, with initial values for the random number generator.
1172       DATA MRPY/19780503,0,0,97,33,0/
1173  
1174 C...Default values for allowed processes and kinematics constraints.
1175       DATA MSEL/1/
1176       DATA MSUB/500*0/
1177       DATA ((KFIN(I,J),J=-40,40),I=1,2)/16*0,4*1,4*0,6*1,5*0,5*1,0,
1178      &5*1,5*0,6*1,4*0,4*1,16*0,16*0,4*1,4*0,6*1,5*0,5*1,0,5*1,5*0,
1179      &6*1,4*0,4*1,16*0/
1180       DATA CKIN/
1181      &  2.0D0, -1.0D0,  0.0D0, -1.0D0,  1.0D0,
1182      &  1.0D0,  -10D0,   10D0,  -40D0,   40D0,
1183      1  -40D0,   40D0,  -40D0,   40D0,  -40D0,
1184      1   40D0, -1.0D0,  1.0D0, -1.0D0,  1.0D0,
1185      2  0.0D0,  1.0D0,  0.0D0,  1.0D0, -1.0D0,
1186      2  1.0D0, -1.0D0,  1.0D0,    0D0,    0D0,
1187      3  2.0D0, -1.0D0,    0D0,    0D0,  0.0D0,
1188      3 -1.0D0,  0.0D0, -1.0D0,  4.0D0, -1.0D0,
1189      4 12.0D0, -1.0D0, 12.0D0, -1.0D0, 12.0D0,
1190      4 -1.0D0, 12.0D0, -1.0D0,    0D0,    0D0,
1191      5  0.0D0, -1.0D0,  0.0D0, -1.0D0,  0.0D0,
1192      5 -1.0D0,    0D0,    0D0,    0D0,    0D0,
1193      6 0.0001D0, 0.99D0, 0.0001D0, 0.99D0,    0D0,
1194      6   -1D0,    0D0,   -1D0,    0D0,   -1D0,
1195      7    0D0,   -1D0, 0.0001D0, 0.99D0, 0.0001D0,
1196      7 0.99D0,    2D0,   -1D0,    0D0,    0D0,
1197      8  120*0D0/
1198  
1199 C...Default values for main switches and parameters. Reset information.
1200       DATA (MSTP(I),I=1,100)/
1201      &  3,    1,    2,    0,    0,    0,    0,    0,    0,    0,
1202      1  1,    0,    1,   30,    0,    1,    4,    3,    4,    3,
1203      2  1,    0,    1,    0,    0,    0,    0,    0,    0,    1,
1204      3  1,    8,    0,    1,    0,    2,    1,    5,    2,    0,
1205      4  1,    1,    3,    7,    3,    1,    1,    0,    1,    0,
1206      5  4,    1,    3,    1,    5,    1,    1,    5,    1,    7,
1207      6  1,    3,    2,    2,    1,    5,    2,    1,    0,    0,
1208      7  1,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1209      8  1,    1,  100,    0,    0,    2,    0,    0,    0,    0,
1210      9  1,    3,    1,    3,    0,    0,    0,    0,    0,    0/
1211       DATA (MSTP(I),I=101,200)/
1212      &  3,    1,    0,    0,    0,    0,    0,    0,    0,    0,
1213      1  1,    1,    1,    0,    0,    0,    0,    0,    0,    0,
1214      2  0,    1,    2,    1,    1,   50,    0,    0,   10,    0,
1215      3  0,    4,    0,    1,    0,    0,    0,    0,    0,    0,
1216      4  0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1217      5  0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1218      6  0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1219      7  0,    2,    0,    0,    0,    0,    0,    0,    0,    0,
1220      8  6,  150, 2000,   06,   30,    0,    0,    0,    0,    0,
1221      9  0,    0,    0,    0,    0,    0,    0,    0,    0,    0/
1222       DATA (PARP(I),I=1,100)/
1223      &  0.25D0,  10D0, 8*0D0,
1224      1  0D0, 0D0, 1.0D0, 0.01D0, 0.5D0, 1.0D0, 1.0D0, 0.4D0, 2*0D0,
1225      2  10*0D0,
1226      3  1.5D0,2.0D0,0.075D0,1.0D0,0.2D0,0D0,2.0D0,0.70D0,0.006D0,0D0,
1227      4  0.02D0,2.0D0,0.10D0,1000D0,2054D0, 123D0, 246D0, 50D0, 2*0D0,
1228      5  10*0D0,
1229      6  0.25D0, 1.0D0,0.25D0, 1.0D0, 2.0D0,1D-3, 1.0D0,1D-3,2*0D0,
1230      7  4.0D0, 0.25D0, 8*0D0,
1231      8  1.90D0, 2.10D0, 0.5D0, 0.2D0, 0.33D0, 
1232      8  0.66D0, 0.7D0, 0.5D0, 1000D0, 0.16D0,
1233      9  1.0D0,0.40D0,5.0D0,1.0D0,0D0,3.0D0,1.0D0,0.75D0,1.0D0,5.0D0/
1234       DATA (PARP(I),I=101,200)/
1235      &  0.5D0, 0.28D0,  1.0D0, 0.8D0, 6*0D0,
1236      1  2.0D0, 3*0D0, 1.5D0, 0.5D0, 0.6D0, 2.5D0, 2.0D0, 1.0D0,
1237      2  1.0D0,  0.4D0, 8*0D0,
1238      3  0.01D0, 8*0D0, 0D0,
1239      4  0.33333D0, 82D0, 1.33333D0, 4D0, 1D0, 
1240      4  1D0,  .0182D0, 1D0, 0D0, 1.33333D0,
1241      5  0D0,   0D0,   0D0,   0D0, 6*0D0,
1242      6  2.20D0, 23.6D0, 18.4D0, 11.5D0, 0.5D0, 0D0, 0D0, 0D0, 2*0D0,
1243      7  0D0,   0D0,   0D0,  1.0D0, 6*0D0,
1244      8  0.1D0, 0.01D0, 0.01D0, 0.01D0, 0.1D0, 0.01D0, 0.01D0, 0.01D0,
1245      8  0.3D0, 0.64D0,    
1246      9  0.64D0, 5.0D0, 8*0D0/
1247       DATA MSTI/200*0/
1248       DATA PARI/200*0D0/
1249       DATA MINT/400*0/
1250       DATA VINT/400*0D0/
1251  
1252 C...Constants for the generation of the various processes.
1253       DATA (ISET(I),I=1,100)/
1254      &  1,    1,    1,   -1,    3,   -1,   -1,    3,   -2,    2,
1255      1  2,    2,    2,    2,    2,    2,   -1,    2,    2,    2,
1256      2 -1,    2,    2,    2,    2,    2,   -1,    2,    2,    2,
1257      3  2,    2,    2,    2,    2,    2,   -1,   -1,   -1,   -1,
1258      4 -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
1259      5 -1,   -1,    2,    2,   -1,   -1,   -1,    2,   -1,   -1,
1260      6 -1,   -1,   -1,   -1,   -1,   -1,   -1,    2,    2,    2,
1261      7  4,    4,    4,   -1,   -1,    4,    4,   -1,   -1,    2,
1262      8  2,    2,    2,    2,    2,    2,    2,    2,    2,   -2,
1263      9  0,    0,    0,    0,    0,    9,   -2,   -2,    8,   -2/
1264       DATA (ISET(I),I=101,200)/
1265      & -1,    1,    1,    1,    1,    2,    2,    2,   -2,    2,
1266      1  2,    2,    2,    2,    2,   -1,   -1,   -1,   -2,   -2,
1267      2  5,    5,    5,    5,   -2,   -2,   -2,   -2,   -2,   -2,
1268      3  2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
1269      4  1,    1,    1,    1,    1,    1,    1,    1,    1,   -2,
1270      5  1,    1,    1,   -2,   -2,    1,    1,    1,   -2,   -2,
1271      6  2,    2,    2,    2,    2,    2,    2,    2,    2,   -2,
1272      7  2,    2,    5,    5,   -2,    2,    2,    5,    5,   -2,
1273      8  5,    5,   -2,   -2,   -2,    5,    5,   -2,   -2,   -2,
1274      9  1,    1,    1,    2,    2,   -2,   -2,   -2,   -2,   -2/
1275       DATA (ISET(I),I=201,300)/
1276      &  2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
1277      1  2,    2,    2,    2,   -2,    2,    2,    2,    2,    2,
1278      2  2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
1279      3  2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
1280      4  2,    2,    2,    2,   -1,    2,    2,    2,    2,    2,
1281      5  2,    2,    2,    2,   -1,    2,   -1,    2,    2,   -2,
1282      6  2,    2,    2,    2,    2,   -1,   -1,   -1,   -1,   -1,
1283      7  2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
1284      8  2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
1285      9  2,    2,    2,    2,    2,    2,    2,    2,    2,    2/
1286       DATA (ISET(I),I=301,500)/
1287      &  2,   39*-2,
1288      4  1,    1,    2,    2,    2,    2,    2,    2,    2,    2,
1289      5  5,    5,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
1290      6  2,    2,    2,    2,    2,    2,    2,    2,   -1,    2,
1291      7  2,    2,    2,    2,    2,    2,    2,   -1,   -1,   -1,
1292      8  120*-2/
1293       DATA ((KFPR(I,J),J=1,2),I=1,50)/
1294      &  23,    0,   24,    0,   25,    0,   24,    0,   25,    0,
1295      &  24,    0,   23,    0,   25,    0,    0,    0,    0,    0,
1296      1   0,    0,    0,    0,   21,   21,   21,   22,   21,   23,
1297      1  21,   24,   21,   25,   22,   22,   22,   23,   22,   24,
1298      2  22,   25,   23,   23,   23,   24,   23,   25,   24,   24,
1299      2  24,   25,   25,   25,    0,   21,    0,   22,    0,   23,
1300      3   0,   24,    0,   25,    0,   21,    0,   22,    0,   23,
1301      3   0,   24,    0,   25,    0,   21,    0,   22,    0,   23,
1302      4   0,   24,    0,   25,    0,   21,    0,   22,    0,   23,
1303      4   0,   24,    0,   25,    0,   21,    0,   22,    0,   23/
1304       DATA ((KFPR(I,J),J=1,2),I=51,100)/
1305      5   0,   24,    0,   25,    0,    0,    0,    0,    0,    0,
1306      5   0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1307      6   0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1308      6   0,    0,    0,    0,   21,   21,   24,   24,   23,   24,
1309      7  23,   23,   24,   24,   23,   24,   23,   25,   22,   22,
1310      7  23,   23,   24,   24,   24,   25,   25,   25,    0,  211,
1311      8   0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1312      8 443,   21,10441,   21,20443,   21,  445,   21,    0,    0,
1313      9   0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1314      9   0,    0,    0,    0,    0,    0,    0,    0,    0,    0/
1315       DATA ((KFPR(I,J),J=1,2),I=101,150)/
1316      &  23,    0,   25,    0,   25,    0,10441,    0,  445,    0,
1317      & 443,   22,  443,   21,  443,   22,    0,    0,   22,   25,
1318      1  21,   25,    0,   25,   21,   25,   22,   22,   21,   22,
1319      1  22,   23,   23,   23,   24,   24,    0,    0,    0,    0,
1320      2  25,    6,   25,    6,   25,    0,   25,    0,    0,    0,
1321      2   0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1322      3   0,   21,    0,   21,    0,   22,    0,   22,    0,    0,
1323      3   0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
1324      4  32,    0,   34,    0,   37,    0,   40,    0,   39,    0,
1325      4 4000011, 0, 4000001, 0, 4000002, 0,  38,    0,    0,    0/
1326       DATA ((KFPR(I,J),J=1,2),I=151,200)/
1327      5  35,    0,   35,    0,   35,    0,    0,    0,    0,    0,
1328      5  36,    0,   36,    0,   36,    0,    0,    0,    0,    0,
1329      6   6,   37,   39,    0,   39,   39,   39,   39,   11,    0,
1330      6  11,    0, 0, 4000001, 0, 4000002, 0, 4000011,    0,    0,
1331      7  23,   35,   24,   35,   35,    0,   35,    0,    0,    0,
1332      7  23,   36,   24,   36,   36,    0,   36,    0,    0,    0,
1333      8  35,    6,   35,    6,    0,    0,    0,    0,    0,    0,
1334      8  36,    6,   36,    6,    0,    0,    0,    0,    0,    0,
1335      9  54,    0,   55,    0,   56,    0,   11,    0,   11,    0,
1336      9   0,    0,    0,    0,    0,    0,    0,    0,    0,    0/
1337       DATA ((KFPR(I,J),J=1,2),I=201,250)/
1338      &  1000011,   1000011,   2000011,   2000011,   1000011,
1339      &  2000011,   1000013,   1000013,   2000013,   2000013,
1340      &  1000013,   2000013,   1000015,   1000015,   2000015,
1341      &  2000015,   1000015,   2000015,   1000011,   1000012,
1342      1  1000015,   1000016,   2000015,   1000016,   1000012,
1343      1  1000012,   1000016,   1000016,         0,         0,
1344      1  1000022,   1000022,   1000023,   1000023,   1000025,
1345      1  1000025,   1000035,   1000035,   1000022,   1000023,
1346      2  1000022,   1000025,   1000022,   1000035,   1000023,
1347      2  1000025,   1000023,   1000035,   1000025,   1000035,
1348      2  1000024,   1000024,   1000037,   1000037,   1000024,
1349      2  1000037,   1000022,   1000024,   1000023,   1000024,
1350      3  1000025,   1000024,   1000035,   1000024,   1000022,
1351      3  1000037,   1000023,   1000037,   1000025,   1000037,
1352      3  1000035,   1000037,   1000021,   1000022,   1000021,
1353      3  1000023,   1000021,   1000025,   1000021,   1000035,
1354      4  1000021,   1000024,   1000021,   1000037,   1000021,
1355      4  1000021,   1000021,   1000021,         0,         0,
1356      4  1000002,   1000022,   2000002,   1000022,   1000002,
1357      4  1000023,   2000002,   1000023,   1000002,   1000025/
1358       DATA ((KFPR(I,J),J=1,2),I=251,300)/
1359      5  2000002,   1000025,   1000002,   1000035,   2000002,
1360      5  1000035,   1000001,   1000024,   2000005,   1000024,
1361      5  1000001,   1000037,   2000005,   1000037,   1000002,
1362      5  1000021,   2000002,   1000021,         0,         0,
1363      6  1000006,   1000006,   2000006,   2000006,   1000006,
1364      6  2000006,   1000006,   1000006,   2000006,   2000006,
1365      6        0,         0,         0,         0,         0,
1366      6        0,         0,         0,         0,         0,
1367      7  1000002,   1000002,   2000002,   2000002,   1000002,
1368      7  2000002,   1000002,   1000002,   2000002,   2000002,
1369      7  1000002,   2000002,   1000002,   1000002,   2000002,
1370      7  2000002,   1000002,   1000002,   2000002,   2000002,
1371      8  1000005,   1000002,   2000005,   2000002,   1000005,
1372      8  2000002,   1000005,   1000002,   2000005,   2000002,
1373      8  1000005,   2000002,   1000005,   1000005,   2000005,
1374      8  2000005,   1000005,   1000005,   2000005,   2000005,
1375      9  1000005,   1000005,   2000005,   2000005,   1000005,
1376      9  2000005,   1000005,   1000021,   2000005,   1000021,
1377      9  1000005,   2000005,        37,        25,        37,
1378      9       35,        36,        25,        36,        35/
1379       DATA ((KFPR(I,J),J=1,2),I=301,500)/
1380      &       37,        37,      78*0,
1381      4       61,         0,        62,         0,        61,
1382      4       11,        62,        11,        61,        13,
1383      4       62,        13,        61,        15,        62,  
1384      4       15,        61,        61,        62,        62,
1385      5       61,         0,        62,         0,         0,
1386      5        0,         0,         0,         0,         0,
1387      5        0,         0,         0,         0,         0,
1388      5        0,         0,         0,         0,         0,
1389      6       24,        24,        24,        52,        52,        
1390      6       52,        22,        51,        22,        53,        
1391      6       23,        51,        23,        53,        24,        
1392      6       52,         0,         0,        24,        23,        
1393      7       24,        51,        52,        23,        52,        
1394      7       51,        22,        52,        23,        52,        
1395      7       24,        51,        24,        53,         0,         
1396      7        0,         0,         0,         0,         0,
1397      8    240*0/      
1398       DATA COEF/10000*0D0/
1399       DATA (((ICOL(I,J,K),K=1,2),J=1,4),I=1,40)/
1400      &4,0,3,0,2,0,1,0,3,0,4,0,1,0,2,0,2,0,0,1,4,0,0,3,3,0,0,4,1,0,0,2,
1401      &3,0,0,4,1,4,3,2,4,0,0,3,4,2,1,3,2,0,4,1,4,0,2,3,4,0,3,4,2,0,1,2,
1402      &3,2,1,0,1,4,3,0,4,3,3,0,2,1,1,0,3,2,1,4,1,0,0,2,2,4,3,1,2,0,0,1,
1403      &3,2,1,4,1,4,3,2,4,2,1,3,4,2,1,3,3,4,4,3,1,2,2,1,2,0,3,1,2,0,0,0,
1404      &4,2,1,0,0,0,1,0,3,0,0,3,1,2,0,0,4,0,0,4,0,0,1,2,2,0,0,1,4,4,3,3,
1405      &2,2,1,1,4,4,3,3,3,3,4,4,1,1,2,2,3,2,1,3,1,2,0,0,4,2,1,4,0,0,1,2,
1406      &4,0,0,0,4,0,1,3,0,0,3,0,2,4,3,0,3,4,0,0,1,0,0,1,0,0,3,4,2,0,0,2,
1407      &3,0,0,0,1,0,0,0,0,0,3,0,2,0,0,0,2,0,3,1,2,0,0,0,3,2,1,0,1,0,0,0,
1408      &4,4,3,3,2,2,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1409      &0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0/
1410  
1411 C...Treatment of resonances.
1412       DATA (MWID(I)  ,I=   1, 500)/5*0,3*1,8*0,1,5*0,3*1,6*0,1,0,7*1,   
1413      &10*0,6*1,4*0,3*1,238*0,19*2,0,7*2,0,2,0,2,0,4*1,163*0/            
1414  
1415 C...Character constants: name of processes.
1416       DATA PROC(0)/                    'All included subprocesses   '/
1417       DATA (PROC(I),I=1,20)/
1418      &'f + fbar -> gamma*/Z0       ',  'f + fbar'' -> W+/-           ',
1419      &'f + fbar -> h0              ',  'gamma + W+/- -> W+/-        ',
1420      &'Z0 + Z0 -> h0               ',  'Z0 + W+/- -> W+/-           ',
1421      &'                            ',  'W+ + W- -> h0               ',
1422      &'                            ',  'f + f'' -> f + f'' (QFD)      ',
1423      1'f + f'' -> f + f'' (QCD)      ','f + fbar -> f'' + fbar''      ',
1424      1'f + fbar -> g + g           ',  'f + fbar -> g + gamma       ',
1425      1'f + fbar -> g + Z0          ',  'f + fbar'' -> g + W+/-       ',
1426      1'f + fbar -> g + h0          ',  'f + fbar -> gamma + gamma   ',
1427      1'f + fbar -> gamma + Z0      ',  'f + fbar'' -> gamma + W+/-   '/
1428       DATA (PROC(I),I=21,40)/
1429      2'f + fbar -> gamma + h0      ',  'f + fbar -> Z0 + Z0         ',
1430      2'f + fbar'' -> Z0 + W+/-      ', 'f + fbar -> Z0 + h0         ',
1431      2'f + fbar -> W+ + W-         ',  'f + fbar'' -> W+/- + h0      ',
1432      2'f + fbar -> h0 + h0         ',  'f + g -> f + g              ',
1433      2'f + g -> f + gamma          ',  'f + g -> f + Z0             ',
1434      3'f + g -> f'' + W+/-          ', 'f + g -> f + h0             ',
1435      3'f + gamma -> f + g          ',  'f + gamma -> f + gamma      ',
1436      3'f + gamma -> f + Z0         ',  'f + gamma -> f'' + W+/-      ',
1437      3'f + gamma -> f + h0         ',  'f + Z0 -> f + g             ',
1438      3'f + Z0 -> f + gamma         ',  'f + Z0 -> f + Z0            '/
1439       DATA (PROC(I),I=41,60)/
1440      4'f + Z0 -> f'' + W+/-         ', 'f + Z0 -> f + h0            ',
1441      4'f + W+/- -> f'' + g          ', 'f + W+/- -> f'' + gamma      ',
1442      4'f + W+/- -> f'' + Z0         ', 'f + W+/- -> f'' + W+/-       ',
1443      4'f + W+/- -> f'' + h0         ', 'f + h0 -> f + g             ',
1444      4'f + h0 -> f + gamma         ',  'f + h0 -> f + Z0            ',
1445      5'f + h0 -> f'' + W+/-         ', 'f + h0 -> f + h0            ',
1446      5'g + g -> f + fbar           ',  'g + gamma -> f + fbar       ',
1447      5'g + Z0 -> f + fbar          ',  'g + W+/- -> f + fbar''       ',
1448      5'g + h0 -> f + fbar          ',  'gamma + gamma -> f + fbar   ',
1449      5'gamma + Z0 -> f + fbar      ',  'gamma + W+/- -> f + fbar''   '/
1450       DATA (PROC(I),I=61,80)/
1451      6'gamma + h0 -> f + fbar      ',  'Z0 + Z0 -> f + fbar         ',
1452      6'Z0 + W+/- -> f + fbar''      ', 'Z0 + h0 -> f + fbar         ',
1453      6'W+ + W- -> f + fbar         ',  'W+/- + h0 -> f + fbar''      ',
1454      6'h0 + h0 -> f + fbar         ',  'g + g -> g + g              ',
1455      6'gamma + gamma -> W+ + W-    ',  'gamma + W+/- -> Z0 + W+/-   ',
1456      7'Z0 + Z0 -> Z0 + Z0          ',  'Z0 + Z0 -> W+ + W-          ',
1457      7'Z0 + W+/- -> Z0 + W+/-      ',  'Z0 + Z0 -> Z0 + h0          ',
1458      7'W+ + W- -> gamma + gamma    ',  'W+ + W- -> Z0 + Z0          ',
1459      7'W+/- + W+/- -> W+/- + W+/-  ',  'W+/- + h0 -> W+/- + h0      ',
1460      7'h0 + h0 -> h0 + h0          ',  'q + gamma -> q'' + pi+/-     '/
1461       DATA (PROC(I),I=81,100)/
1462      8'q + qbar -> Q + Qbar, mass  ',  'g + g -> Q + Qbar, massive  ',
1463      8'f + q -> f'' + Q, massive    ', 'g + gamma -> Q + Qbar, mass ',
1464      8'gamma + gamma -> F + Fbar, m',  'g + g -> J/Psi + g          ',
1465      8'g + g -> chi_0c + g         ',  'g + g -> chi_1c + g         ',
1466      8'g + g -> chi_2c + g         ',  '                            ',
1467      9'Elastic scattering          ',  'Single diffractive (XB)     ',
1468      9'Single diffractive (AX)     ',  'Double  diffractive         ',
1469      9'Low-pT scattering           ',  'Semihard QCD 2 -> 2         ',
1470      9'                            ',  '                            ',
1471      9'q + gamma* -> q             ',  '                            '/
1472       DATA (PROC(I),I=101,120)/
1473      &'g + g -> gamma*/Z0          ',  'g + g -> h0                 ',
1474      &'gamma + gamma -> h0         ',  'g + g -> chi_0c             ',
1475      &'g + g -> chi_2c             ',  'g + g -> J/Psi + gamma      ',
1476      &'gamma + g -> J/Psi + g      ',  'gamma+gamma -> J/Psi + gamma',
1477      &'                            ',  'f + fbar -> gamma + h0      ',
1478      1'f + fbar -> g + h0          ',  'q + g -> q + h0             ',
1479      1'g + g -> g + h0             ',  'g + g -> gamma + gamma      ',
1480      1'g + g -> g + gamma          ',  'g + g -> gamma + Z0         ',
1481      1'g + g -> Z0 + Z0            ',  'g + g -> W+ + W-            ',
1482      1'                            ',  '                            '/
1483       DATA (PROC(I),I=121,140)/
1484      2'g + g -> Q + Qbar + h0      ',  'q + qbar -> Q + Qbar + h0   ',
1485      2'f + f'' -> f + f'' + h0       ',
1486      2'f + f'' -> f" + f"'' + h0     ',
1487      2'                            ',  '                            ',
1488      2'                            ',  '                            ',
1489      2'                            ',  '                            ',
1490      3'f + gamma*_T -> f + g       ',  'f + gamma*_L -> f + g       ',
1491      3'f + gamma*_T -> f + gamma   ',  'f + gamma*_L -> f + gamma   ',
1492      3'g + gamma*_T -> f + fbar    ',  'g + gamma*_L -> f + fbar    ',
1493      3'gamma*_T+gamma*_T -> f+fbar ',  'gamma*_T+gamma*_L -> f+fbar ',
1494      3'gamma*_L+gamma*_T -> f+fbar ',  'gamma*_L+gamma*_L -> f+fbar '/
1495       DATA (PROC(I),I=141,160)/
1496      4'f + fbar -> gamma*/Z0/Z''0   ', 'f + fbar'' -> W''+/-          ',
1497      4'f + fbar'' -> H+/-           ', 'f + fbar'' -> R              ',
1498      4'q + l -> LQ                 ',  'e + gamma -> e*             ',
1499      4'd + g -> d*                 ',  'u + g -> u*                 ',
1500      4'g + g -> eta_techni         ',  '                            ',
1501      5'f + fbar -> H0              ',  'g + g -> H0                 ',
1502      5'gamma + gamma -> H0         ',  '                            ',
1503      5'                            ',  'f + fbar -> A0              ',
1504      5'g + g -> A0                 ',  'gamma + gamma -> A0         ',
1505      5'                            ',  '                            '/
1506       DATA (PROC(I),I=161,180)/
1507      6'f + g -> f'' + H+/-          ', 'q + g -> LQ + lbar          ',
1508      6'g + g -> LQ + LQbar         ',  'q + qbar -> LQ + LQbar      ',
1509      6'f + fbar -> f'' + fbar'' (g/Z)',
1510      6'f +fbar'' -> f" + fbar"'' (W) ',
1511      6'q + q'' -> q" + d*           ',  'q + q'' -> q" + u*           ',
1512      6'q + qbar -> e + e*          ',  '                            ',
1513      7'f + fbar -> Z0 + H0         ', 'f + fbar'' -> W+/- + H0      ',
1514      7'f + f'' -> f + f'' + H0       ',
1515      7'f + f'' -> f" + f"'' + H0     ',
1516      7'                            ',  'f + fbar -> Z0 + A0         ',
1517      7'f + fbar'' -> W+/- + A0      ',
1518      7'f + f'' -> f + f'' + A0       ',
1519      7'f + f'' -> f" + f"'' + A0     ',
1520      7'                            '/
1521       DATA (PROC(I),I=181,200)/
1522      8'g + g -> Q + Qbar + H0      ',  'q + qbar -> Q + Qbar + H0   ',
1523      8'                            ',  '                            ',
1524      8'                            ',  'g + g -> Q + Qbar + A0      ',
1525      8'q + qbar -> Q + Qbar + A0   ',  '                            ',
1526      8'                            ',  '                            ',
1527      9'f + fbar -> rho_tech0       ',  'f + f'' -> rho_tech+/-       ',
1528      9'f + fbar -> omega_tech0     ',  'f+fbar -> f''+fbar'' (ETC)  ',
1529      9'f+fbar'' -> f"+fbar"'' (ETC)','                          ',
1530      9'                            ',  '                            ',
1531      9'                            ',  '                            '/
1532       DATA (PROC(I),I=201,220)/
1533      &'f + fbar -> ~e_L + ~e_Lbar  ',  'f + fbar -> ~e_R + ~e_Rbar  ',
1534      &'f + fbar -> ~e_R + ~e_Lbar  ',  'f + fbar -> ~mu_L + ~mu_Lbar',
1535      &'f + fbar -> ~mu_R + ~mu_Rbar',  'f + fbar -> ~mu_L + ~mu_Rbar',
1536      &'f+fbar -> ~tau_1 + ~tau_1bar',  'f+fbar -> ~tau_2 + ~tau_2bar',
1537      &'f+fbar -> ~tau_1 + ~tau_2bar',  'q + qbar'' -> ~l_L + ~nulbar ',
1538      1'q+qbar''-> ~tau_1 + ~nutaubar', 'q+qbar''-> ~tau_2 + ~nutaubar',
1539      1'f + fbar -> ~nul + ~nulbar  ',  'f+fbar -> ~nutau + ~nutaubar',
1540      1'                            ',  'f + fbar -> ~chi1 + ~chi1   ',
1541      1'f + fbar -> ~chi2 + ~chi2   ',  'f + fbar -> ~chi3 + ~chi3   ',
1542      1'f + fbar -> ~chi4 + ~chi4   ',  'f + fbar -> ~chi1 + ~chi2   '/
1543       DATA (PROC(I),I=221,240)/
1544      2'f + fbar -> ~chi1 + ~chi3   ',  'f + fbar -> ~chi1 + ~chi4   ',
1545      2'f + fbar -> ~chi2 + ~chi3   ',  'f + fbar -> ~chi2 + ~chi4   ',
1546      2'f + fbar -> ~chi3 + ~chi4   ',  'f+fbar -> ~chi+-1 + ~chi-+1 ',
1547      2'f+fbar -> ~chi+-2 + ~chi-+2 ',  'f+fbar -> ~chi+-1 + ~chi-+2 ',
1548      2'q + qbar'' -> ~chi1 + ~chi+-1', 'q + qbar'' -> ~chi2 + ~chi+-1',
1549      3'q + qbar'' -> ~chi3 + ~chi+-1', 'q + qbar'' -> ~chi4 + ~chi+-1',
1550      3'q + qbar'' -> ~chi1 + ~chi+-2', 'q + qbar'' -> ~chi2 + ~chi+-2',
1551      3'q + qbar'' -> ~chi3 + ~chi+-2', 'q + qbar'' -> ~chi4 + ~chi+-2',
1552      3'q + qbar -> ~chi1 + ~g      ',  'q + qbar -> ~chi2 + ~g      ',
1553      3'q + qbar -> ~chi3 + ~g      ',  'q + qbar -> ~chi4 + ~g      '/
1554       DATA (PROC(I),I=241,260)/
1555      4'q + qbar'' -> ~chi+-1 + ~g   ', 'q + qbar'' -> ~chi+-2 + ~g  ',
1556      4'q + qbar -> ~g + ~g         ',  'g + g -> ~g + ~g            ',
1557      4'                            ',  'qj + g -> ~qj_L + ~chi1     ',
1558      4'qj + g -> ~qj_R + ~chi1     ',  'qj + g -> ~qj_L + ~chi2     ',
1559      4'qj + g -> ~qj_R + ~chi2     ',  'qj + g -> ~qj_L + ~chi3     ',
1560      5'qj + g -> ~qj_R + ~chi3     ',  'qj + g -> ~qj_L + ~chi4     ',
1561      5'qj + g -> ~qj_R + ~chi4     ',  'qj + g -> ~qk_L + ~chi+-1   ',
1562      5'qj + g -> ~qk_R + ~chi+-1   ',  'qj + g -> ~qk_L + ~chi+-2   ',
1563      5'qj + g -> ~qk_R + ~chi+-2   ',  'qj + g -> ~qj_L + ~g        ',
1564      5'qj + g -> ~qj_R + ~g        ',  '                            '/
1565       DATA (PROC(I),I=261,300)/
1566      6'f + fbar -> ~t_1 + ~t_1bar  ',  'f + fbar -> ~t_2 + ~t_2bar  ',
1567      6'f + fbar -> ~t_1 + ~t_2bar  ',  'g + g -> ~t_1 + ~t_1bar     ',
1568      6'g + g -> ~t_2 + ~t_2bar     ',  '                            ',
1569      6'                            ',  '                            ',
1570      6'                            ',  '                            ',
1571      7'qi + qj -> ~qi_L + ~qj_L    ',  'qi + qj -> ~qi_R + ~qj_R    ',
1572      7'qi + qj -> ~qi_L + ~qj_R    ',  'qi+qjbar -> ~qi_L + ~qj_Lbar',
1573      7'qi+qjbar -> ~qi_R + ~qj_Rbar',  'qi+qjbar -> ~qi_L + ~qj_Rbar',
1574      7'f + fbar -> ~qi_L + ~qi_Lbar',  'f + fbar -> ~qi_R + ~qi_Rbar',
1575      7'g + g -> ~qi_L + ~qi_Lbar   ',  'g + g -> ~qi_R + ~qi_Rbar   ',
1576      8'b + qj -> ~b_1 + ~qj_L      ',  'b + qj -> ~b_2 + ~qj_R      ',
1577      8'b + qj -> ~b_1 + ~qj_R      ',  'b + qjbar -> ~b_1 + ~qj_Lbar',
1578      8'b + qjbar -> ~b_2 + ~qj_Rbar',  'b + qjbar -> ~b_1 + ~qj_Rbar',
1579      8'f + fbar -> ~b_1 + ~b_1bar  ',  'f + fbar -> ~b_2 + ~b_2bar  ',
1580      8'g + g -> ~b_1 + ~b_1bar     ',  'g + g -> ~b_2 + ~b_2bar     ',
1581      9'b + b -> ~b_1 + ~b_1        ',  'b + b -> ~b_2 + ~b_2        ',
1582      9'b + b -> ~b_1 + ~b_2        ',  'b + g -> ~b_1 + ~g          ',
1583      9'b + g -> ~b_2 + ~g          ',  'b + bbar -> ~b_1 + ~b_2bar  ',
1584      9'f + fbar'' -> H+/- + h0     ',  'f + fbar -> H+/- + H0       ',
1585      9'f + fbar -> A0 + h0         ',  'f + fbar -> A0 + H0         '/
1586       DATA (PROC(I),I=301,340)/
1587      &'f + fbar -> H+ + H-         ', 39*'                          '/
1588       DATA (PROC(I),I=341,500)/
1589      4'l + l -> H_L++/--           ',  'l + l -> H_R++/--           ',
1590      4'l + gamma -> H_L++/-- e-/+  ',  'l + gamma -> H_R++/-- e-/+  ',
1591      4'l + gamma -> H_L++/-- mu-/+ ',  'l + gamma -> H_R++/-- mu-/+ ',
1592      4'l + gamma -> H_L++/-- tau-/+',  'l + gamma -> H_R++/-- tau-/+',
1593      4'f + fbar -> H_L++ + H_L--   ',  'f + fbar -> H_R++ + H_R--   ',
1594      5'f + f -> f'' + f'' + H_L++/-- ',  
1595      5'f + f -> f'' + f'' + H_R++/-- ', 7*'                         ',
1596      6'                            ',  'f + fbar -> W_L+ W_L-       ',
1597      6'f + fbar -> W_L+/- pi_T-/+  ',  'f + fbar -> pi_T+ pi_T-     ',
1598      6'f + fbar -> gamma pi_T0     ',  'f + fbar -> gamma pi_T0''    ',
1599      6'f + fbar -> Z0 pi_T0        ',  'f + fbar -> Z0 pi_T0''       ',
1600      6'f + fbar -> W+/- pi_T-/+    ',  '                            ',
1601      7'f + fbar'' -> W_L+/- Z_L0    ', 'f + fbar'' -> W_L+/- pi_T0   ',
1602      7'f + fbar'' -> pi_T+/- Z_L0   ', 'f + fbar'' -> pi_T+/- pi_T0  ',
1603      7'f + fbar'' -> gamma pi_T+/-  ', 'f + fbar'' -> Z0 pi_T+/-     ',
1604      7'f + fbar'' -> W+/- pi_T0     ',  
1605      7'f + fbar'' -> W+/- pi_T0''    ',
1606      7'                            ','                              ',
1607      8 121*'                      '/    
1608  
1609 C...Cross sections and slope offsets.
1610       DATA SIGT/294*0D0/
1611  
1612 C...Supersymmetry switches and parameters.
1613       DATA IMSS/0,
1614      &  0,  0,  0,  1,  0,  0,  0,  1,  0,  0,
1615      1  89*0/
1616       DATA RMSS/0D0,
1617      &  80D0,160D0,500D0,800D0,2D0,250D0,200D0,800D0,700D0,800D0,
1618      1  700D0,500D0,250D0,200D0,800D0,400D0,0D0,0.1D0,850D0,0.041D0,
1619      2   1D0,800D0,1D4,1D4,1D4,0D0,0D0,0D0,24D17,0D0,
1620      3  69*0D0/
1621  
1622 C...Data for histogramming routines.
1623       DATA IHIST/1000,20000,55,1/
1624       DATA INDX/1000*0/
1625  
1626       END
1627  
1628 C...PYTEST
1629 C...A simple program (disguised as subroutine) to run at installation
1630 C...as a check that the program works as intended.
1631  
1632       SUBROUTINE PYTEST(MTEST)
1633  
1634 C...Double precision and integer declarations.
1635       IMPLICIT DOUBLE PRECISION(A-H, O-Z)
1636       IMPLICIT INTEGER(I-N)
1637       INTEGER PYK,PYCHGE,PYCOMP
1638 C...Commonblocks.
1639       COMMON/PYJETS/N,NPAD,K(4000,5),P(4000,5),V(4000,5)
1640       COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
1641       COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
1642       COMMON/PYDAT3/MDCY(500,3),MDME(4000,2),BRAT(4000),KFDP(4000,5)
1643       COMMON/PYSUBS/MSEL,MSELPD,MSUB(500),KFIN(2,-40:40),CKIN(200)
1644       COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
1645       SAVE /PYJETS/,/PYDAT1/,/PYDAT2/,/PYDAT3/,/PYSUBS/,/PYPARS/
1646 C...Local arrays.
1647       DIMENSION PSUM(5),PINI(6),PFIN(6)
1648  
1649 C...Save defaults for values that are changed.
1650       MSTJ1=MSTJ(1)
1651       MSTJ3=MSTJ(3)
1652       MSTJ11=MSTJ(11)
1653       MSTJ42=MSTJ(42)
1654       MSTJ43=MSTJ(43)
1655       MSTJ44=MSTJ(44)
1656       PARJ17=PARJ(17)
1657       PARJ22=PARJ(22)
1658       PARJ43=PARJ(43)
1659       PARJ54=PARJ(54)
1660       MST101=MSTJ(101)
1661       MST104=MSTJ(104)
1662       MST105=MSTJ(105)
1663       MST107=MSTJ(107)
1664       MST116=MSTJ(116)
1665  
1666 C...First part: loop over simple events to be generated.
1667       IF(MTEST.GE.1) CALL PYTABU(20)
1668       NERR=0
1669       DO 180 IEV=1,500
1670  
1671 C...Reset parameter values. Switch on some nonstandard features.
1672         MSTJ(1)=1
1673         MSTJ(3)=0
1674         MSTJ(11)=1
1675         MSTJ(42)=2
1676         MSTJ(43)=4
1677         MSTJ(44)=2
1678         PARJ(17)=0.1D0
1679         PARJ(22)=1.5D0
1680         PARJ(43)=1D0
1681         PARJ(54)=-0.05D0
1682         MSTJ(101)=5
1683         MSTJ(104)=5
1684         MSTJ(105)=0
1685         MSTJ(107)=1
1686         IF(IEV.EQ.301.OR.IEV.EQ.351.OR.IEV.EQ.401) MSTJ(116)=3
1687  
1688 C...Ten events each for some single jets configurations.
1689         IF(IEV.LE.50) THEN
1690           ITY=(IEV+9)/10
1691           MSTJ(3)=-1
1692           IF(ITY.EQ.3.OR.ITY.EQ.4) MSTJ(11)=2
1693           IF(ITY.EQ.1) CALL PY1ENT(1,1,15D0,0D0,0D0)
1694           IF(ITY.EQ.2) CALL PY1ENT(1,3101,15D0,0D0,0D0)
1695           IF(ITY.EQ.3) CALL PY1ENT(1,-2203,15D0,0D0,0D0)
1696           IF(ITY.EQ.4) CALL PY1ENT(1,-4,30D0,0D0,0D0)
1697           IF(ITY.EQ.5) CALL PY1ENT(1,21,15D0,0D0,0D0)
1698  
1699 C...Ten events each for some simple jet systems; string fragmentation.
1700         ELSEIF(IEV.LE.130) THEN
1701           ITY=(IEV-41)/10
1702           IF(ITY.EQ.1) CALL PY2ENT(1,1,-1,40D0)
1703           IF(ITY.EQ.2) CALL PY2ENT(1,4,-4,30D0)
1704           IF(ITY.EQ.3) CALL PY2ENT(1,2,2103,100D0)
1705           IF(ITY.EQ.4) CALL PY2ENT(1,21,21,40D0)
1706           IF(ITY.EQ.5) CALL PY3ENT(1,2101,21,-3203,30D0,0.6D0,0.8D0)
1707           IF(ITY.EQ.6) CALL PY3ENT(1,5,21,-5,40D0,0.9D0,0.8D0)
1708           IF(ITY.EQ.7) CALL PY3ENT(1,21,21,21,60D0,0.7D0,0.5D0)
1709           IF(ITY.EQ.8) CALL PY4ENT(1,2,21,21,-2,40D0,
1710      &    0.4D0,0.64D0,0.6D0,0.12D0,0.2D0)
1711  
1712 C...Seventy events with independent fragmentation and momentum cons.
1713         ELSEIF(IEV.LE.200) THEN
1714           ITY=1+(IEV-131)/16
1715           MSTJ(2)=1+MOD(IEV-131,4)
1716           MSTJ(3)=1+MOD((IEV-131)/4,4)
1717           IF(ITY.EQ.1) CALL PY2ENT(1,4,-5,40D0)
1718           IF(ITY.EQ.2) CALL PY3ENT(1,3,21,-3,40D0,0.9D0,0.4D0)
1719           IF(ITY.EQ.3) CALL PY4ENT(1,2,21,21,-2,40D0,
1720      &    0.4D0,0.64D0,0.6D0,0.12D0,0.2D0)
1721           IF(ITY.GE.4) CALL PY4ENT(1,2,-3,3,-2,40D0,
1722      &    0.4D0,0.64D0,0.6D0,0.12D0,0.2D0)
1723  
1724 C...A hundred events with random jets (check invariant mass).
1725         ELSEIF(IEV.LE.300) THEN
1726   100     DO 110 J=1,5
1727             PSUM(J)=0D0
1728   110     CONTINUE
1729           NJET=2D0+6D0*PYR(0)
1730           DO 130 I=1,NJET
1731             KFL=21
1732             IF(I.EQ.1) KFL=INT(1D0+4D0*PYR(0))
1733             IF(I.EQ.NJET) KFL=-INT(1D0+4D0*PYR(0))
1734             EJET=5D0+20D0*PYR(0)
1735             THETA=ACOS(2D0*PYR(0)-1D0)
1736             PHI=6.2832D0*PYR(0)
1737             IF(I.LT.NJET) CALL PY1ENT(-I,KFL,EJET,THETA,PHI)
1738             IF(I.EQ.NJET) CALL PY1ENT(I,KFL,EJET,THETA,PHI)
1739             IF(I.EQ.1.OR.I.EQ.NJET) MSTJ(93)=1
1740             IF(I.EQ.1.OR.I.EQ.NJET) PSUM(5)=PSUM(5)+PYMASS(KFL)
1741             DO 120 J=1,4
1742               PSUM(J)=PSUM(J)+P(I,J)
1743   120       CONTINUE
1744   130     CONTINUE
1745           IF(PSUM(4)**2-PSUM(1)**2-PSUM(2)**2-PSUM(3)**2.LT.
1746      &    (PSUM(5)+PARJ(32))**2) GOTO 100
1747  
1748 C...Fifty e+e- continuum events with matrix elements.
1749         ELSEIF(IEV.LE.350) THEN
1750           MSTJ(101)=2
1751           CALL PYEEVT(0,40D0)
1752  
1753 C...Fifty e+e- continuum event with varying shower options.
1754         ELSEIF(IEV.LE.400) THEN
1755           MSTJ(42)=1+MOD(IEV,2)
1756           MSTJ(43)=1+MOD(IEV/2,4)
1757           MSTJ(44)=MOD(IEV/8,3)
1758           CALL PYEEVT(0,90D0)
1759  
1760 C...Fifty e+e- continuum events with coherent shower.
1761         ELSEIF(IEV.LE.450) THEN
1762           CALL PYEEVT(0,500D0)
1763  
1764 C...Fifty Upsilon decays to ggg or gammagg with coherent shower.
1765         ELSE
1766           CALL PYONIA(5,9.46D0)
1767         ENDIF
1768  
1769 C...Generate event. Find total momentum, energy and charge.
1770         DO 140 J=1,4
1771           PINI(J)=PYP(0,J)
1772   140   CONTINUE
1773         PINI(6)=PYP(0,6)
1774         CALL PYEXEC
1775         DO 150 J=1,4
1776           PFIN(J)=PYP(0,J)
1777   150   CONTINUE
1778         PFIN(6)=PYP(0,6)
1779  
1780 C...Check conservation of energy, momentum and charge;
1781 C...usually exact, but only approximate for single jets.
1782         MERR=0
1783         IF(IEV.LE.50) THEN
1784           IF((PFIN(1)-PINI(1))**2+(PFIN(2)-PINI(2))**2.GE.10D0)
1785      &    MERR=MERR+1
1786           EPZREM=PINI(4)+PINI(3)-PFIN(4)-PFIN(3)
1787           IF(EPZREM.LT.0D0.OR.EPZREM.GT.2D0*PARJ(31)) MERR=MERR+1
1788           IF(ABS(PFIN(6)-PINI(6)).GT.2.1D0) MERR=MERR+1
1789         ELSE
1790           DO 160 J=1,4
1791             IF(ABS(PFIN(J)-PINI(J)).GT.0.0001D0*PINI(4)) MERR=MERR+1
1792   160     CONTINUE
1793           IF(ABS(PFIN(6)-PINI(6)).GT.0.1D0) MERR=MERR+1
1794         ENDIF
1795         IF(MERR.NE.0) WRITE(MSTU(11),5000) (PINI(J),J=1,4),PINI(6),
1796      &  (PFIN(J),J=1,4),PFIN(6)
1797  
1798 C...Check that all KF codes are known ones, and that partons/particles
1799 C...satisfy energy-momentum-mass relation. Store particle statistics.
1800         DO 170 I=1,N
1801           IF(K(I,1).GT.20) GOTO 170
1802           IF(PYCOMP(K(I,2)).EQ.0) THEN
1803             WRITE(MSTU(11),5100) I
1804             MERR=MERR+1
1805           ENDIF
1806           PD=P(I,4)**2-P(I,1)**2-P(I,2)**2-P(I,3)**2-P(I,5)**2
1807           IF(ABS(PD).GT.MAX(0.1D0,0.001D0*P(I,4)**2).OR.P(I,4).LT.0D0)
1808      &    THEN
1809             WRITE(MSTU(11),5200) I
1810             MERR=MERR+1
1811           ENDIF
1812   170   CONTINUE
1813         IF(MTEST.GE.1) CALL PYTABU(21)
1814  
1815 C...List all erroneous events and some normal ones.
1816         IF(MERR.NE.0.OR.MSTU(24).NE.0.OR.MSTU(28).NE.0) THEN
1817           IF(MERR.GE.1) WRITE(MSTU(11),6400)
1818           CALL PYLIST(2)
1819         ELSEIF(MTEST.GE.1.AND.MOD(IEV-5,100).EQ.0) THEN
1820           CALL PYLIST(1)
1821         ENDIF
1822  
1823 C...Stop execution if too many errors.
1824         IF(MERR.NE.0) NERR=NERR+1
1825         IF(NERR.GE.10) THEN
1826           WRITE(MSTU(11),6300)
1827           CALL PYLIST(1)
1828           STOP
1829         ENDIF
1830   180 CONTINUE
1831  
1832 C...Summarize result of run.
1833       IF(MTEST.GE.1) CALL PYTABU(22)
1834  
1835 C...Reset commonblock variables changed during run.
1836       MSTJ(1)=MSTJ1
1837       MSTJ(3)=MSTJ3
1838       MSTJ(11)=MSTJ11
1839       MSTJ(42)=MSTJ42
1840       MSTJ(43)=MSTJ43
1841       MSTJ(44)=MSTJ44
1842       PARJ(17)=PARJ17
1843       PARJ(22)=PARJ22
1844       PARJ(43)=PARJ43
1845       PARJ(54)=PARJ54
1846       MSTJ(101)=MST101
1847       MSTJ(104)=MST104
1848       MSTJ(105)=MST105
1849       MSTJ(107)=MST107
1850       MSTJ(116)=MST116
1851  
1852 C...Second part: complete events of various kinds.
1853 C...Common initial values. Loop over initiating conditions.
1854       MSTP(122)=MAX(0,MIN(2,MTEST))
1855       MDCY(PYCOMP(111),1)=0
1856       DO 230 IPROC=1,8
1857  
1858 C...Reset process type, kinematics cuts, and the flags used.
1859         MSEL=0
1860         DO 190 ISUB=1,500
1861           MSUB(ISUB)=0
1862   190   CONTINUE
1863         CKIN(1)=2D0
1864         CKIN(3)=0D0
1865         MSTP(2)=1
1866         MSTP(11)=0
1867         MSTP(33)=0
1868         MSTP(81)=1
1869         MSTP(82)=1
1870         MSTP(111)=1
1871         MSTP(131)=0
1872         MSTP(133)=0
1873         PARP(131)=0.01D0
1874  
1875 C...Prompt photon production at fixed target.
1876         IF(IPROC.EQ.1) THEN
1877           PZSUM=300D0
1878           PESUM=SQRT(PZSUM**2+PYMASS(211)**2)+PYMASS(2212)
1879           PQSUM=2D0
1880           MSEL=10
1881           CKIN(3)=5D0
1882           CALL PYINIT('FIXT','pi+','p',PZSUM)
1883  
1884 C...QCD processes at ISR energies.
1885         ELSEIF(IPROC.EQ.2) THEN
1886           PESUM=63D0
1887           PZSUM=0D0
1888           PQSUM=2D0
1889           MSEL=1
1890           CKIN(3)=5D0
1891           CALL PYINIT('CMS','p','p',PESUM)
1892  
1893 C...W production + multiple interactions at CERN Collider.
1894         ELSEIF(IPROC.EQ.3) THEN
1895           PESUM=630D0
1896           PZSUM=0D0
1897           PQSUM=0D0
1898           MSEL=12
1899           CKIN(1)=20D0
1900           MSTP(82)=4
1901           MSTP(2)=2
1902           MSTP(33)=3
1903           CALL PYINIT('CMS','p','pbar',PESUM)
1904  
1905 C...W/Z gauge boson pairs + pileup events at the Tevatron.
1906         ELSEIF(IPROC.EQ.4) THEN
1907           PESUM=1800D0
1908           PZSUM=0D0
1909           PQSUM=0D0
1910           MSUB(22)=1
1911           MSUB(23)=1
1912           MSUB(25)=1
1913           CKIN(1)=200D0
1914           MSTP(111)=0
1915           MSTP(131)=1
1916           MSTP(133)=2
1917           PARP(131)=0.04D0
1918           CALL PYINIT('CMS','p','pbar',PESUM)
1919  
1920 C...Higgs production at LHC.
1921         ELSEIF(IPROC.EQ.5) THEN
1922           PESUM=15400D0
1923           PZSUM=0D0
1924           PQSUM=2D0
1925           MSUB(3)=1
1926           MSUB(102)=1
1927           MSUB(123)=1
1928           MSUB(124)=1
1929           PMAS(25,1)=300D0
1930           CKIN(1)=200D0
1931           MSTP(81)=0
1932           MSTP(111)=0
1933           CALL PYINIT('CMS','p','p',PESUM)
1934  
1935 C...Z' production at SSC.
1936         ELSEIF(IPROC.EQ.6) THEN
1937           PESUM=40000D0
1938           PZSUM=0D0
1939           PQSUM=2D0
1940           MSEL=21
1941           PMAS(32,1)=600D0
1942           CKIN(1)=400D0
1943           MSTP(81)=0
1944           MSTP(111)=0
1945           CALL PYINIT('CMS','p','p',PESUM)
1946  
1947 C...W pair production at 1 TeV e+e- collider.
1948         ELSEIF(IPROC.EQ.7) THEN
1949           PESUM=1000D0
1950           PZSUM=0D0
1951           PQSUM=0D0
1952           MSUB(25)=1
1953           MSUB(69)=1
1954           MSTP(11)=1
1955           CALL PYINIT('CMS','e+','e-',PESUM)
1956  
1957 C...Deep inelastic scattering at a LEP+LHC ep collider.
1958         ELSEIF(IPROC.EQ.8) THEN
1959           P(1,1)=0D0
1960           P(1,2)=0D0
1961           P(1,3)=8000D0
1962           P(2,1)=0D0
1963           P(2,2)=0D0
1964           P(2,3)=-80D0
1965           PESUM=8080D0
1966           PZSUM=7920D0
1967           PQSUM=0D0
1968           MSUB(10)=1
1969           CKIN(3)=50D0
1970           MSTP(111)=0
1971           CALL PYINIT('USER','p','e-',PESUM)
1972         ENDIF
1973  
1974 C...Generate 20 events of each required type.
1975         DO 220 IEV=1,20
1976           CALL PYEVNT
1977           PESUMM=PESUM
1978           IF(IPROC.EQ.4) PESUMM=MSTI(41)*PESUM
1979  
1980 C...Check conservation of energy/momentum/flavour.
1981           PINI(1)=0D0
1982           PINI(2)=0D0
1983           PINI(3)=PZSUM
1984           PINI(4)=PESUMM
1985           PINI(6)=PQSUM
1986           DO 200 J=1,4
1987             PFIN(J)=PYP(0,J)
1988   200     CONTINUE
1989           PFIN(6)=PYP(0,6)
1990           MERR=0
1991           DEVE=ABS(PFIN(4)-PINI(4))+ABS(PFIN(3)-PINI(3))
1992           DEVT=ABS(PFIN(1)-PINI(1))+ABS(PFIN(2)-PINI(2))
1993           DEVQ=ABS(PFIN(6)-PINI(6))
1994           IF(DEVE.GT.2D-3*PESUM.OR.DEVT.GT.MAX(0.01D0,1D-4*PESUM).OR.
1995      &    DEVQ.GT.0.1D0) MERR=1
1996           IF(MERR.NE.0) WRITE(MSTU(11),5000) (PINI(J),J=1,4),PINI(6),
1997      &    (PFIN(J),J=1,4),PFIN(6)
1998  
1999 C...Check that all KF codes are known ones, and that partons/particles
2000 C...satisfy energy-momentum-mass relation.
2001           DO 210 I=1,N
2002             IF(K(I,1).GT.20) GOTO 210
2003             IF(PYCOMP(K(I,2)).EQ.0) THEN
2004               WRITE(MSTU(11),5100) I
2005               MERR=MERR+1
2006             ENDIF
2007             PD=P(I,4)**2-P(I,1)**2-P(I,2)**2-P(I,3)**2-P(I,5)**2*
2008      &      SIGN(1D0,P(I,5))
2009             IF(ABS(PD).GT.MAX(0.1D0,0.002D0*P(I,4)**2,0.002D0*P(I,5)**2)
2010      &      .OR.(P(I,5).GE.0D0.AND.P(I,4).LT.0D0)) THEN
2011               WRITE(MSTU(11),5200) I
2012               MERR=MERR+1
2013             ENDIF
2014   210     CONTINUE
2015  
2016 C...Listing of erroneous events, and first event of each type.
2017           IF(MERR.GE.1) NERR=NERR+1
2018           IF(NERR.GE.10) THEN
2019             WRITE(MSTU(11),6300)
2020             CALL PYLIST(1)
2021             STOP
2022           ENDIF
2023           IF(MTEST.GE.1.AND.(MERR.GE.1.OR.IEV.EQ.1)) THEN
2024             IF(MERR.GE.1) WRITE(MSTU(11),6400)
2025             CALL PYLIST(1)
2026           ENDIF
2027   220   CONTINUE
2028  
2029 C...List statistics for each process type.
2030         IF(MTEST.GE.1) CALL PYSTAT(1)
2031   230 CONTINUE
2032  
2033 C...Summarize result of run.
2034       IF(NERR.EQ.0) WRITE(MSTU(11),6500)
2035       IF(NERR.GT.0) WRITE(MSTU(11),6600) NERR
2036  
2037 C...Format statements for output.
2038  5000 FORMAT(/' Momentum, energy and/or charge were not conserved ',
2039      &'in following event'/' sum of',9X,'px',11X,'py',11X,'pz',11X,
2040      &'E',8X,'charge'/' before',2X,4(1X,F12.5),1X,F8.2/' after',3X,
2041      &4(1X,F12.5),1X,F8.2)
2042  5100 FORMAT(/5X,'Entry no.',I4,' in following event not known code')
2043  5200 FORMAT(/5X,'Entry no.',I4,' in following event has faulty ',
2044      &'kinematics')
2045  6300 FORMAT(/5X,'This is the tenth error experienced! Something is ',
2046      &'wrong.'/5X,'Execution will be stopped after listing of event.')
2047  6400 FORMAT(5X,'Faulty event follows:')
2048  6500 FORMAT(//5X,'End result of PYTEST: no errors detected.')
2049  6600 FORMAT(//5X,'End result of PYTEST:',I2,' errors detected.'/
2050      &5X,'This should not have happened!')
2051  
2052       RETURN
2053       END
2054  
2055 C*********************************************************************
2056  
2057 C...PYHEPC
2058 C...Converts PYTHIA event record contents to or from
2059 C...the standard event record commonblock.
2060  
2061       SUBROUTINE PYHEPC(MCONV)
2062  
2063 C...Double precision and integer declarations.
2064       IMPLICIT DOUBLE PRECISION(A-H, O-Z)
2065       IMPLICIT INTEGER(I-N)
2066       INTEGER PYK,PYCHGE,PYCOMP
2067 C...Commonblocks.
2068       COMMON/PYJETS/N,NPAD,K(4000,5),P(4000,5),V(4000,5)
2069       COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
2070       COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
2071       SAVE /PYJETS/,/PYDAT1/,/PYDAT2/
2072 C...HEPEVT commonblock.
2073       PARAMETER (NMXHEP=4000)
2074       COMMON/HEPEVT/NEVHEP,NHEP,ISTHEP(NMXHEP),IDHEP(NMXHEP),
2075      &JMOHEP(2,NMXHEP),JDAHEP(2,NMXHEP),PHEP(5,NMXHEP),VHEP(4,NMXHEP)
2076       DOUBLE PRECISION PHEP,VHEP
2077       SAVE /HEPEVT/
2078  
2079 C...Conversion from PYTHIA to standard, the easy part.
2080       IF(MCONV.EQ.1) THEN
2081         NEVHEP=0
2082         IF(N.GT.NMXHEP) CALL PYERRM(8,
2083      &  '(PYHEPC:) no more space in /HEPEVT/')
2084         NHEP=MIN(N,NMXHEP)
2085         DO 140 I=1,NHEP
2086           ISTHEP(I)=0
2087           IF(K(I,1).GE.1.AND.K(I,1).LE.10) ISTHEP(I)=1
2088           IF(K(I,1).GE.11.AND.K(I,1).LE.20) ISTHEP(I)=2
2089           IF(K(I,1).GE.21.AND.K(I,1).LE.30) ISTHEP(I)=3
2090           IF(K(I,1).GE.31.AND.K(I,1).LE.100) ISTHEP(I)=K(I,1)
2091           IDHEP(I)=K(I,2)
2092           JMOHEP(1,I)=K(I,3)
2093           JMOHEP(2,I)=0
2094           IF(K(I,1).NE.3.AND.K(I,1).NE.13.AND.K(I,1).NE.14) THEN
2095             JDAHEP(1,I)=K(I,4)
2096             JDAHEP(2,I)=K(I,5)
2097           ELSE
2098             JDAHEP(1,I)=0
2099             JDAHEP(2,I)=0
2100           ENDIF
2101           DO 100 J=1,5
2102             PHEP(J,I)=P(I,J)
2103   100     CONTINUE
2104           DO 110 J=1,4
2105             VHEP(J,I)=V(I,J)
2106   110     CONTINUE
2107  
2108 C...Check if new event (from pileup).
2109           IF(I.EQ.1) THEN
2110             INEW=1
2111           ELSE
2112             IF(K(I,1).EQ.21.AND.K(I-1,1).NE.21) INEW=I
2113           ENDIF
2114  
2115 C...Fill in missing mother information.
2116           IF(I.GE.INEW+2.AND.K(I,1).EQ.21.AND.K(I,3).EQ.0) THEN
2117             IMO1=I-2
2118             IF(I.GE.INEW+3.AND.K(I-1,1).EQ.21.AND.K(I-1,3).EQ.0)
2119      &      IMO1=IMO1-1
2120             JMOHEP(1,I)=IMO1
2121             JMOHEP(2,I)=IMO1+1
2122           ELSEIF(K(I,2).GE.91.AND.K(I,2).LE.93) THEN
2123             I1=K(I,3)-1
2124   120       I1=I1+1
2125             IF(I1.GE.I) CALL PYERRM(8,
2126      &      '(PYHEPC:) translation of inconsistent event history')
2127             IF(I1.LT.I.AND.K(I1,1).NE.1.AND.K(I1,1).NE.11) GOTO 120
2128             KC=PYCOMP(K(I1,2))
2129             IF(I1.LT.I.AND.KC.EQ.0) GOTO 120
2130             IF(I1.LT.I.AND.KCHG(KC,2).EQ.0) GOTO 120
2131             JMOHEP(2,I)=I1
2132           ELSEIF(K(I,2).EQ.94) THEN
2133             NJET=2
2134             IF(NHEP.GE.I+3.AND.K(I+3,3).LE.I) NJET=3
2135             IF(NHEP.GE.I+4.AND.K(I+4,3).LE.I) NJET=4
2136             JMOHEP(2,I)=MOD(K(I+NJET,4)/MSTU(5),MSTU(5))
2137             IF(JMOHEP(2,I).EQ.JMOHEP(1,I)) JMOHEP(2,I)=
2138      &      MOD(K(I+1,4)/MSTU(5),MSTU(5))
2139           ENDIF
2140  
2141 C...Fill in missing daughter information.
2142           IF(K(I,2).EQ.94.AND.MSTU(16).NE.2) THEN
2143             DO 130 I1=JDAHEP(1,I),JDAHEP(2,I)
2144               I2=MOD(K(I1,4)/MSTU(5),MSTU(5))
2145               JDAHEP(1,I2)=I
2146   130       CONTINUE
2147           ENDIF
2148           IF(K(I,2).GE.91.AND.K(I,2).LE.94) GOTO 140
2149           I1=JMOHEP(1,I)
2150           IF(I1.LE.0.OR.I1.GT.NHEP) GOTO 140
2151           IF(K(I1,1).NE.13.AND.K(I1,1).NE.14) GOTO 140
2152           IF(JDAHEP(1,I1).EQ.0) THEN
2153             JDAHEP(1,I1)=I
2154           ELSE
2155             JDAHEP(2,I1)=I
2156           ENDIF
2157   140   CONTINUE
2158         DO 150 I=1,NHEP
2159           IF(K(I,1).NE.13.AND.K(I,1).NE.14) GOTO 150
2160           IF(JDAHEP(2,I).EQ.0) JDAHEP(2,I)=JDAHEP(1,I)
2161   150   CONTINUE
2162  
2163 C...Conversion from standard to PYTHIA, the easy part.
2164       ELSE
2165         IF(NHEP.GT.MSTU(4)) CALL PYERRM(8,
2166      &  '(PYHEPC:) no more space in /PYJETS/')
2167         N=MIN(NHEP,MSTU(4))
2168         NKQ=0
2169         KQSUM=0
2170         DO 180 I=1,N
2171           K(I,1)=0
2172           IF(ISTHEP(I).EQ.1) K(I,1)=1
2173           IF(ISTHEP(I).EQ.2) K(I,1)=11
2174           IF(ISTHEP(I).EQ.3) K(I,1)=21
2175           K(I,2)=IDHEP(I)
2176           K(I,3)=JMOHEP(1,I)
2177           K(I,4)=JDAHEP(1,I)
2178           K(I,5)=JDAHEP(2,I)
2179           DO 160 J=1,5
2180             P(I,J)=PHEP(J,I)
2181   160     CONTINUE
2182           DO 170 J=1,4
2183             V(I,J)=VHEP(J,I)
2184   170     CONTINUE
2185           V(I,5)=0D0
2186           IF(ISTHEP(I).EQ.2.AND.PHEP(4,I).GT.PHEP(5,I)) THEN
2187             I1=JDAHEP(1,I)
2188             IF(I1.GT.0.AND.I1.LE.NHEP) V(I,5)=(VHEP(4,I1)-VHEP(4,I))*
2189      &      PHEP(5,I)/PHEP(4,I)
2190           ENDIF
2191  
2192 C...Fill in missing information on colour connection in jet systems.
2193           IF(ISTHEP(I).EQ.1) THEN
2194             KC=PYCOMP(K(I,2))
2195             KQ=0
2196             IF(KC.NE.0) KQ=KCHG(KC,2)*ISIGN(1,K(I,2))
2197             IF(KQ.NE.0) NKQ=NKQ+1
2198             IF(KQ.NE.2) KQSUM=KQSUM+KQ
2199             IF(KQ.NE.0.AND.KQSUM.NE.0) THEN
2200               K(I,1)=2
2201             ELSEIF(KQ.EQ.2.AND.I.LT.N) THEN
2202               IF(K(I+1,2).EQ.21) K(I,1)=2
2203             ENDIF
2204           ENDIF
2205   180   CONTINUE
2206         IF(NKQ.EQ.1.OR.KQSUM.NE.0) CALL PYERRM(8,
2207      &  '(PYHEPC:) input parton configuration not colour singlet')
2208       ENDIF
2209  
2210       END
2211  
2212 C*********************************************************************
2213  
2214 C...PYINIT
2215 C...Initializes the generation procedure; finds maxima of the
2216 C...differential cross-sections to be used for weighting.
2217  
2218       SUBROUTINE PYINIT(FRAME,BEAM,TARGET,WIN)
2219  
2220 C...Double precision and integer declarations.
2221       IMPLICIT DOUBLE PRECISION(A-H, O-Z)
2222       IMPLICIT INTEGER(I-N)
2223       INTEGER PYK,PYCHGE,PYCOMP
2224 C...Commonblocks.
2225       COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
2226       COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
2227       COMMON/PYDAT3/MDCY(500,3),MDME(4000,2),BRAT(4000),KFDP(4000,5)
2228       COMMON/PYDAT4/CHAF(500,2)
2229       CHARACTER CHAF*16
2230       COMMON/PYSUBS/MSEL,MSELPD,MSUB(500),KFIN(2,-40:40),CKIN(200)
2231       COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
2232       COMMON/PYINT1/MINT(400),VINT(400)
2233       COMMON/PYINT2/ISET(500),KFPR(500,2),COEF(500,20),ICOL(40,4,2)
2234       COMMON/PYINT5/NGENPD,NGEN(0:500,3),XSEC(0:500,3)
2235       SAVE /PYDAT1/,/PYDAT2/,/PYDAT3/,/PYDAT4/,/PYSUBS/,/PYPARS/,
2236      &/PYINT1/,/PYINT2/,/PYINT5/
2237 C...Local arrays and character variables.
2238       DIMENSION ALAMIN(20),NFIN(20)
2239       CHARACTER*(*) FRAME,BEAM,TARGET
2240       CHARACTER CHFRAM*12,CHBEAM*12,CHTARG*12,CHLH(2)*6
2241  
2242 C...Interface to PDFLIB.
2243       COMMON/W50512/QCDL4,QCDL5
2244       SAVE /W50512/
2245       DOUBLE PRECISION VALUE(20),QCDL4,QCDL5
2246       CHARACTER*20 PARM(20)
2247       DATA VALUE/20*0D0/,PARM/20*' '/
2248  
2249 C...Data:Lambda and n_f values for parton distributions..
2250       DATA ALAMIN/0.177D0,0.239D0,0.247D0,0.2322D0,0.248D0,0.248D0,
2251      &0.192D0,0.326D0,2*0.2D0,0.2D0,0.2D0,0.29D0,0.2D0,0.4D0,5*0.2D0/,
2252      &NFIN/20*4/
2253       DATA CHLH/'lepton','hadron'/
2254  
2255 C...Reset MINT and VINT arrays. Write headers.
2256       DO 100 J=1,400
2257         MINT(J)=0
2258         VINT(J)=0D0
2259   100 CONTINUE
2260       IF(MSTU(12).GE.1) CALL PYLIST(0)
2261       IF(MSTP(122).GE.1) WRITE(MSTU(11),5100)
2262  
2263 C...Maximum 4 generations; set maximum number of allowed flavours.
2264       MSTP(1)=MIN(4,MSTP(1))
2265       MSTU(114)=MIN(MSTU(114),2*MSTP(1))
2266       MSTP(58)=MIN(MSTP(58),2*MSTP(1))
2267  
2268 C...Sum up Cabibbo-Kobayashi-Maskawa factors for each quark/lepton.
2269       DO 120 I=-20,20
2270         VINT(180+I)=0D0
2271         IA=IABS(I)
2272         IF(IA.GE.1.AND.IA.LE.2*MSTP(1)) THEN
2273           DO 110 J=1,MSTP(1)
2274             IB=2*J-1+MOD(IA,2)
2275             IF(IB.GE.6.AND.MSTP(9).EQ.0) GOTO 110
2276             IPM=(5-ISIGN(1,I))/2
2277             IDC=J+MDCY(IA,2)+2
2278             IF(MDME(IDC,1).EQ.1.OR.MDME(IDC,1).EQ.IPM) VINT(180+I)=
2279      &      VINT(180+I)+VCKM((IA+1)/2,(IB+1)/2)
2280   110     CONTINUE
2281         ELSEIF(IA.GE.11.AND.IA.LE.10+2*MSTP(1)) THEN
2282           VINT(180+I)=1D0
2283         ENDIF
2284   120 CONTINUE
2285  
2286 C...Initialize parton distributions: PDFLIB.
2287       IF(MSTP(52).EQ.2) THEN
2288         PARM(1)='NPTYPE'
2289         VALUE(1)=1
2290         PARM(2)='NGROUP'
2291         VALUE(2)=MSTP(51)/1000
2292         PARM(3)='NSET'
2293         VALUE(3)=MOD(MSTP(51),1000)
2294         PARM(4)='TMAS'
2295         VALUE(4)=PMAS(6,1)
2296 C...ALICE
2297         CALL PDFSET_ALICE(PARM,VALUE)
2298         MINT(93)=1000000+MSTP(51)
2299       ENDIF
2300  
2301 C...Choose Lambda value to use in alpha-strong.
2302       MSTU(111)=MSTP(2)
2303       IF(MSTP(3).GE.2) THEN
2304         ALAM=0.2D0
2305         NF=4
2306         IF(MSTP(52).EQ.1.AND.MSTP(51).GE.1.AND.MSTP(51).LE.20) THEN
2307           ALAM=ALAMIN(MSTP(51))
2308           NF=NFIN(MSTP(51))
2309         ELSEIF(MSTP(52).EQ.2) THEN
2310           ALAM=QCDL4
2311           NF=4
2312         ENDIF
2313         PARP(1)=ALAM
2314         PARP(61)=ALAM
2315         PARP(72)=ALAM
2316         PARU(112)=ALAM
2317         MSTU(112)=NF
2318         IF(MSTP(3).EQ.3) PARJ(81)=ALAM
2319       ENDIF
2320  
2321 C...Initialize the SUSY generation: couplings, masses,
2322 C...decay modes, branching ratios, and so on.
2323       CALL PYMSIN
2324  
2325 C...Initialize widths and partial widths for resonances.
2326       CALL PYINRE
2327 C...Set Z0 mass and width for e+e- routines.
2328       PARJ(123)=PMAS(23,1)
2329       PARJ(124)=PMAS(23,2)
2330  
2331 C...Identify beam and target particles and frame of process.
2332       CHFRAM=FRAME//' '
2333       CHBEAM=BEAM//' '
2334       CHTARG=TARGET//' '
2335       CALL PYINBM(CHFRAM,CHBEAM,CHTARG,WIN)
2336       IF(MINT(65).EQ.1) GOTO 170
2337  
2338 C...For gamma-p or gamma-gamma allow many (3 or 6) alternatives.
2339 C...For e-gamma allow 2 alternatives.
2340       MINT(121)=1
2341       IF(MSTP(14).EQ.10.AND.(MSEL.EQ.1.OR.MSEL.EQ.2)) THEN
2342         IF((MINT(11).EQ.22.OR.MINT(12).EQ.22).AND.
2343      &  (IABS(MINT(11)).GE.28.OR.IABS(MINT(12)).GE.28)) MINT(121)=3
2344         IF(MINT(11).EQ.22.AND.MINT(12).EQ.22) MINT(121)=6
2345         IF((MINT(11).EQ.22.OR.MINT(12).EQ.22).AND.
2346      &  (IABS(MINT(11)).EQ.11.OR.IABS(MINT(12)).EQ.11)) MINT(121)=2
2347       ELSEIF(MSTP(14).EQ.20.AND.(MSEL.EQ.1.OR.MSEL.EQ.2)) THEN
2348         IF((MINT(11).EQ.22.OR.MINT(12).EQ.22).AND.
2349      &  (IABS(MINT(11)).GE.28.OR.IABS(MINT(12)).GE.28)) MINT(121)=3
2350         IF(MINT(11).EQ.22.AND.MINT(12).EQ.22) MINT(121)=9
2351       ELSEIF(MSTP(14).EQ.25.AND.(MSEL.EQ.1.OR.MSEL.EQ.2)) THEN
2352         IF((MINT(11).EQ.22.OR.MINT(12).EQ.22).AND.
2353      &  (IABS(MINT(11)).GE.28.OR.IABS(MINT(12)).GE.28)) MINT(121)=2
2354         IF(MINT(11).EQ.22.AND.MINT(12).EQ.22) MINT(121)=4
2355       ELSEIF(MSTP(14).EQ.30.AND.(MSEL.EQ.1.OR.MSEL.EQ.2)) THEN
2356         IF((MINT(11).EQ.22.OR.MINT(12).EQ.22).AND.
2357      &  (IABS(MINT(11)).GE.28.OR.IABS(MINT(12)).GE.28)) MINT(121)=4
2358         IF(MINT(11).EQ.22.AND.MINT(12).EQ.22) MINT(121)=13
2359       ENDIF
2360       MINT(123)=MSTP(14)
2361       IF((MSTP(14).EQ.10.OR.MSTP(14).EQ.20.OR.MSTP(14).EQ.25.OR.
2362      &MSTP(14).EQ.30).AND.MSEL.NE.1.AND.MSEL.NE.2) MINT(123)=0
2363       IF(MSTP(14).GE.11.AND.MSTP(14).LE.19) THEN
2364         IF(MSTP(14).EQ.11) MINT(123)=0
2365         IF(MSTP(14).EQ.12.OR.MSTP(14).EQ.14) MINT(123)=5
2366         IF(MSTP(14).EQ.13.OR.MSTP(14).EQ.17) MINT(123)=6
2367         IF(MSTP(14).EQ.15) MINT(123)=2
2368         IF(MSTP(14).EQ.16.OR.MSTP(14).EQ.18) MINT(123)=7
2369         IF(MSTP(14).EQ.19) MINT(123)=3
2370       ELSEIF(MSTP(14).GE.21.AND.MSTP(14).LE.24) THEN
2371         IF(MSTP(14).EQ.21) MINT(123)=0
2372         IF(MSTP(14).EQ.22.OR.MSTP(14).EQ.23) MINT(123)=4
2373         IF(MSTP(14).EQ.24) MINT(123)=1
2374       ELSEIF(MSTP(14).GE.26.AND.MSTP(14).LE.29) THEN
2375         IF(MSTP(14).EQ.26.OR.MSTP(14).EQ.28) MINT(123)=8
2376         IF(MSTP(14).EQ.27.OR.MSTP(14).EQ.29) MINT(123)=9
2377       ENDIF
2378  
2379 C...Set up kinematics of process.
2380       CALL PYINKI(0)
2381  
2382 C...Set up kinematics for photons inside leptons.
2383       IF(MINT(141).NE.0.OR.MINT(142).NE.0) CALL PYGAGA(1,WTGAGA)
2384  
2385 C...Precalculate flavour selection weights.
2386       CALL PYKFIN
2387  
2388 C...Loop over gamma-p or gamma-gamma alternatives.
2389       CKIN3=CKIN(3)
2390       MSAV48=0  
2391       DO 160 IGA=1,MINT(121)
2392         CKIN(3)=CKIN3 
2393         MINT(122)=IGA
2394  
2395 C...Select partonic subprocesses to be included in the simulation.
2396         CALL PYINPR
2397         MINT(101)=1
2398         MINT(102)=1
2399         MINT(103)=MINT(11)
2400         MINT(104)=MINT(12)
2401   
2402 C...Count number of subprocesses on.
2403         MINT(48)=0
2404         DO 130 ISUB=1,500
2405           IF(MINT(50).EQ.0.AND.ISUB.GE.91.AND.ISUB.LE.96.AND.
2406      &    MSUB(ISUB).EQ.1.AND.MINT(121).GT.1) THEN
2407             MSUB(ISUB)=0 
2408           ELSEIF(MINT(50).EQ.0.AND.ISUB.GE.91.AND.ISUB.LE.96.AND.
2409      &    MSUB(ISUB).EQ.1) THEN
2410             WRITE(MSTU(11),5200) ISUB,CHLH(MINT(41)),CHLH(MINT(42))
2411             STOP
2412           ELSEIF(MSUB(ISUB).EQ.1.AND.ISET(ISUB).EQ.-1) THEN
2413             WRITE(MSTU(11),5300) ISUB
2414             STOP
2415           ELSEIF(MSUB(ISUB).EQ.1.AND.ISET(ISUB).LE.-2) THEN
2416             WRITE(MSTU(11),5400) ISUB
2417             STOP
2418           ELSEIF(MSUB(ISUB).EQ.1) THEN
2419             MINT(48)=MINT(48)+1
2420           ENDIF
2421   130   CONTINUE
2422         IF(MINT(121).EQ.1.AND.MINT(48).EQ.0) THEN
2423           WRITE(MSTU(11),5500)
2424           STOP
2425         ENDIF
2426         MINT(49)=MINT(48)-MSUB(91)-MSUB(92)-MSUB(93)-MSUB(94)
2427         MSAV48=MSAV48+MINT(48)
2428  
2429 C...Reset variables for cross-section calculation.
2430         DO 150 I=0,500
2431           DO 140 J=1,3
2432             NGEN(I,J)=0
2433             XSEC(I,J)=0D0
2434   140     CONTINUE
2435   150   CONTINUE
2436
2437 C...Find parametrized total cross-sections.
2438         CALL PYXTOT
2439         VINT(318)=VINT(317)
2440  
2441 C...Maxima of differential cross-sections.
2442         IF(MSTP(121).LE.1) CALL PYMAXI
2443  
2444 C...Initialize possibility of pileup events.
2445         IF(MINT(121).GT.1) MSTP(131)=0
2446         IF(MSTP(131).NE.0) CALL PYPILE(1)
2447  
2448 C...Initialize multiple interactions with variable impact parameter.
2449         IF(MINT(50).EQ.1.AND.(MINT(49).NE.0.OR.MSTP(131).NE.0).AND.
2450      &  MSTP(82).GE.2) CALL PYMULT(1)
2451  
2452 C...Save results for gamma-p and gamma-gamma alternatives.
2453         IF(MINT(121).GT.1) CALL PYSAVE(1,IGA)
2454   160 CONTINUE
2455  
2456 C...Initialization finished.
2457       IF(MSAV48.EQ.0) THEN
2458         WRITE(MSTU(11),5500)
2459         STOP
2460       ENDIF
2461   170 IF(MSTP(122).GE.1) WRITE(MSTU(11),5600)
2462  
2463 C...Formats for initialization information.
2464  5100 FORMAT('1',18('*'),1X,'PYINIT: initialization of PYTHIA ',
2465      &'routines',1X,17('*'))
2466  5200 FORMAT(1X,'Error: process number ',I3,' not meaningful for ',A6,
2467      &'-',A6,' interactions.'/1X,'Execution stopped!')
2468  5300 FORMAT(1X,'Error: requested subprocess',I4,' not implemented.'/
2469      &1X,'Execution stopped!')
2470  5400 FORMAT(1X,'Error: requested subprocess',I4,' not existing.'/
2471      &1X,'Execution stopped!')
2472  5500 FORMAT(1X,'Error: no subprocess switched on.'/
2473      &1X,'Execution stopped.')
2474  5600 FORMAT(/1X,22('*'),1X,'PYINIT: initialization completed',1X,
2475      &22('*'))
2476  
2477       RETURN
2478       END
2479  
2480 C*********************************************************************
2481  
2482 C...PYEVNT
2483 C...Administers the generation of a high-pT event via calls to
2484 C...a number of subroutines.
2485  
2486       SUBROUTINE PYEVNT
2487  
2488 C...Double precision and integer declarations.
2489       IMPLICIT DOUBLE PRECISION(A-H, O-Z)
2490       IMPLICIT INTEGER(I-N)
2491       INTEGER PYK,PYCHGE,PYCOMP
2492 C...Commonblocks.
2493       COMMON/PYJETS/N,NPAD,K(4000,5),P(4000,5),V(4000,5)
2494       COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
2495       COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
2496       COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
2497       COMMON/PYINT1/MINT(400),VINT(400)
2498       COMMON/PYINT2/ISET(500),KFPR(500,2),COEF(500,20),ICOL(40,4,2)
2499       COMMON/PYINT4/MWID(500),WIDS(500,5)
2500       COMMON/PYINT5/NGENPD,NGEN(0:500,3),XSEC(0:500,3)
2501       COMMON/PYUPPR/NUP,KUP(20,7),NFUP,IFUP(10,2),PUP(20,5),Q2UP(0:10)
2502       SAVE /PYJETS/,/PYDAT1/,/PYDAT2/,/PYPARS/,/PYINT1/,/PYINT2/,
2503      &/PYINT4/,/PYINT5/,/PYUPPR/
2504 C...Local array.
2505       DIMENSION VTX(4)
2506  
2507 C...Initial values for some counters.
2508       N=0
2509       MINT(5)=MINT(5)+1
2510       MINT(7)=0
2511       MINT(8)=0
2512       MINT(83)=0
2513       MINT(84)=MSTP(126)
2514       MSTU(24)=0
2515       MSTU70=0
2516       MSTJ14=MSTJ(14)
2517  
2518 C...If variable energies: redo incoming kinematics and cross-section.
2519       MSTI(61)=0
2520       IF(MSTP(171).EQ.1) THEN
2521         CALL PYINKI(1)
2522         IF(MSTI(61).EQ.1) THEN
2523           MINT(5)=MINT(5)-1
2524           RETURN
2525         ENDIF
2526         IF(MINT(121).GT.1) CALL PYSAVE(3,1)
2527         CALL PYXTOT
2528       ENDIF
2529  
2530 C...Loop over number of pileup events; check space left.
2531       IF(MSTP(131).LE.0) THEN
2532         NPILE=1
2533       ELSE
2534         CALL PYPILE(2)
2535         NPILE=MINT(81)
2536       ENDIF
2537       DO 260 IPILE=1,NPILE
2538         IF(MINT(84)+100.GE.MSTU(4)) THEN
2539           CALL PYERRM(11,
2540      &    '(PYEVNT:) no more space in PYJETS for pileup events')
2541           IF(MSTU(21).GE.1) GOTO 270
2542         ENDIF
2543         MINT(82)=IPILE
2544  
2545 C...Generate variables of hard scattering.
2546         MINT(51)=0
2547         MSTI(52)=0
2548   100   CONTINUE
2549         IF(MINT(51).NE.0.OR.MSTU(24).NE.0) MSTI(52)=MSTI(52)+1
2550         MINT(31)=0
2551         MINT(51)=0
2552         MINT(57)=0
2553         CALL PYRAND
2554         IF(MSTI(61).EQ.1) THEN
2555           MINT(5)=MINT(5)-1
2556           RETURN
2557         ENDIF
2558         IF(MINT(51).EQ.2) RETURN
2559         ISUB=MINT(1)
2560         IF(MSTP(111).EQ.-1) GOTO 250
2561  
2562         IF((ISUB.LE.90.OR.ISUB.GE.95).AND.ISUB.NE.99) THEN
2563 C...Hard scattering (including low-pT):
2564 C...reconstruct kinematics and colour flow of hard scattering.
2565           MINT31=MINT(31)
2566   110     MINT(31)=MINT31
2567           MINT(51)=0
2568           CALL PYSCAT
2569           IF(MINT(51).EQ.1) GOTO 100
2570           IPU1=MINT(84)+1
2571           IPU2=MINT(84)+2
2572           IF(ISUB.EQ.95) GOTO 130
2573  
2574 C...Showering of initial state partons (optional).
2575           ALAMSV=PARJ(81)
2576           PARJ(81)=PARP(72)
2577           IF(MSTP(61).GE.1.AND.MINT(47).GE.2) CALL PYSSPA(IPU1,IPU2)
2578           PARJ(81)=ALAMSV
2579           IF(MINT(51).EQ.1) GOTO 100
2580  
2581 C...Showering of final state partons (optional).
2582           ALAMSV=PARJ(81)
2583           PARJ(81)=PARP(72)
2584           IF(MSTP(71).GE.1.AND.ISET(ISUB).GE.2.AND.ISET(ISUB).LE.10)
2585      &    THEN
2586             IPU3=MINT(84)+3
2587             IPU4=MINT(84)+4
2588             IF(ISET(ISUB).EQ.5) IPU4=-3
2589             QMAX=VINT(55)
2590             IF(ISET(ISUB).EQ.2) QMAX=SQRT(PARP(71))*VINT(55)
2591             CALL PYSHOW(IPU3,IPU4,QMAX)
2592           ELSEIF(MSTP(71).GE.1.AND.ISET(ISUB).EQ.11.AND.NFUP.GE.1) THEN
2593             DO 120 IUP=1,NFUP
2594               IPU3=IFUP(IUP,1)+MINT(84)
2595               IPU4=IFUP(IUP,2)+MINT(84)
2596               QMAX=SQRT(MAX(0D0,Q2UP(IUP)))
2597               CALL PYSHOW(IPU3,IPU4,QMAX)
2598   120       CONTINUE
2599           ENDIF
2600           PARJ(81)=ALAMSV
2601  
2602 C...Decay of final state resonances.
2603           MINT(32)=0
2604           IF(MSTP(41).GE.1.AND.ISET(ISUB).LE.10) CALL PYRESD(0)
2605           IF(MINT(51).EQ.1) GOTO 100
2606           MINT(52)=N
2607  
2608 C...Multiple interactions.
2609           IF(MSTP(81).GE.1.AND.MINT(50).EQ.1) CALL PYMULT(6)
2610           MINT(53)=N
2611  
2612 C...Hadron remnants and primordial kT.
2613   130     CALL PYREMN(IPU1,IPU2)
2614           IF(MINT(51).EQ.1.AND.MINT(57).GE.1.AND.MINT(57).LE.5) GOTO 110
2615           IF(MINT(51).EQ.1) GOTO 100
2616  
2617          ELSEIF(ISUB.NE.99) THEN
2618 C...Diffractive and elastic scattering.
2619           CALL PYDIFF
2620
2621         ELSE
2622 C...DIS scattering (photon flux external).
2623           CALL PYDISG
2624           IF(MINT(51).EQ.1) GOTO 100
2625         ENDIF
2626  
2627 C...Check that no odd resonance left undecayed.
2628         IF(MSTP(111).GE.1) THEN
2629           NFIX=N
2630           DO 140 I=MINT(84)+1,NFIX
2631             IF(K(I,1).GE.1.AND.K(I,1).LE.10.AND.K(I,2).NE.21.AND.
2632      &      K(I,2).NE.22) THEN
2633               IF(MWID(PYCOMP(K(I,2))).NE.0) THEN
2634                 CALL PYRESD(I)
2635                 IF(MINT(51).EQ.1) GOTO 100
2636               ENDIF
2637             ENDIF
2638   140     CONTINUE
2639         ENDIF
2640  
2641 C...Boost hadronic subsystem to overall rest frame.
2642 C..(Only relevant when photon inside lepton beam.)
2643         IF(MINT(141).NE.0.OR.MINT(142).NE.0) CALL PYGAGA(4,WTGAGA)
2644  
2645 C...Recalculate energies from momenta and masses (if desired).
2646         IF(MSTP(113).GE.1) THEN
2647           DO 150 I=MINT(83)+1,N
2648             IF(K(I,1).GT.0.AND.K(I,1).LE.10) P(I,4)=SQRT(P(I,1)**2+
2649      &      P(I,2)**2+P(I,3)**2+P(I,5)**2)
2650   150     CONTINUE
2651           NRECAL=N
2652         ENDIF
2653  
2654 C...Rearrange partons along strings, check invariant mass cuts.
2655         MSTU(28)=0
2656         IF(MSTP(111).LE.0) MSTJ(14)=-1
2657         CALL PYPREP(MINT(84)+1)
2658         MSTJ(14)=MSTJ14
2659         IF(MSTP(112).EQ.1.AND.MSTU(28).EQ.3) GOTO 100
2660         IF(MSTP(125).EQ.0.OR.MSTP(125).EQ.1) THEN
2661           DO 180 I=MINT(84)+1,N
2662             IF(K(I,2).EQ.94) THEN
2663               DO 170 I1=I+1,MIN(N,I+3)
2664                 IF(K(I1,3).EQ.I) THEN
2665                   K(I1,3)=MOD(K(I1,4)/MSTU(5),MSTU(5))
2666                   IF(K(I1,3).EQ.0) THEN
2667                     DO 160 II=MINT(84)+1,I-1
2668                         IF(K(II,2).EQ.K(I1,2)) THEN
2669                           IF(MOD(K(II,4),MSTU(5)).EQ.I1.OR.
2670      &                    MOD(K(II,5),MSTU(5)).EQ.I1) K(I1,3)=II
2671                         ENDIF
2672   160               CONTINUE
2673                     IF(K(I+1,3).EQ.0) K(I+1,3)=K(I,3)
2674                   ENDIF
2675                 ENDIF
2676   170         CONTINUE
2677             ENDIF
2678   180     CONTINUE
2679           CALL PYEDIT(12)
2680           CALL PYEDIT(14)
2681           IF(MSTP(125).EQ.0) CALL PYEDIT(15)
2682           IF(MSTP(125).EQ.0) MINT(4)=0
2683           DO 200 I=MINT(83)+1,N
2684             IF(K(I,1).EQ.11.AND.K(I,4).EQ.0.AND.K(I,5).EQ.0) THEN
2685               DO 190 I1=I+1,N
2686                 IF(K(I1,3).EQ.I.AND.K(I,4).EQ.0) K(I,4)=I1
2687                 IF(K(I1,3).EQ.I) K(I,5)=I1
2688   190         CONTINUE
2689             ENDIF
2690   200     CONTINUE
2691         ENDIF
2692  
2693 C...Introduce separators between sections in PYLIST event listing.
2694         IF(IPILE.EQ.1.AND.MSTP(125).LE.0) THEN
2695           MSTU70=1
2696           MSTU(71)=N
2697         ELSEIF(IPILE.EQ.1) THEN
2698           MSTU70=3
2699           MSTU(71)=2
2700           MSTU(72)=MINT(4)
2701           MSTU(73)=N
2702         ENDIF
2703  
2704 C...Go back to lab frame (needed for vertices, also in fragmentation).
2705         CALL PYFRAM(1)
2706  
2707 C...Set nonvanishing production vertex (optional).
2708         IF(MSTP(151).EQ.1) THEN
2709           DO 210 J=1,4
2710             VTX(J)=PARP(150+J)*SQRT(-2D0*LOG(MAX(1D-10,PYR(0))))*
2711      &      SIN(PARU(2)*PYR(0))
2712   210     CONTINUE
2713           DO 230 I=MINT(83)+1,N
2714             DO 220 J=1,4
2715               V(I,J)=V(I,J)+VTX(J)
2716   220       CONTINUE
2717   230     CONTINUE
2718         ENDIF
2719  
2720 C...Perform hadronization (if desired).
2721         IF(MSTP(111).GE.1) THEN
2722           CALL PYEXEC
2723           IF(MSTU(24).NE.0) GOTO 100
2724         ENDIF
2725         IF(MSTP(113).GE.1) THEN
2726           DO 240 I=NRECAL,N
2727             IF(P(I,5).GT.0D0) P(I,4)=SQRT(P(I,1)**2+
2728      &      P(I,2)**2+P(I,3)**2+P(I,5)**2)
2729   240     CONTINUE
2730         ENDIF
2731         IF(MSTP(125).EQ.0.OR.MSTP(125).EQ.1) CALL PYEDIT(14)
2732  
2733 C...Store event information and calculate Monte Carlo estimates of
2734 C...subprocess cross-sections.
2735   250   IF(IPILE.EQ.1) CALL PYDOCU
2736  
2737 C...Set counters for current pileup event and loop to next one.
2738         MSTI(41)=IPILE
2739         IF(IPILE.GE.2.AND.IPILE.LE.10) MSTI(40+IPILE)=ISUB
2740         IF(MSTU70.LT.10) THEN
2741           MSTU70=MSTU70+1
2742           MSTU(70+MSTU70)=N
2743         ENDIF
2744         MINT(83)=N
2745         MINT(84)=N+MSTP(126)
2746         IF(IPILE.LT.NPILE) CALL PYFRAM(2)
2747   260 CONTINUE
2748  
2749 C...Generic information on pileup events. Reconstruct missing history.
2750       IF(MSTP(131).EQ.1.AND.MSTP(133).GE.1) THEN
2751         PARI(91)=VINT(132)
2752         PARI(92)=VINT(133)
2753         PARI(93)=VINT(134)
2754         IF(MSTP(133).GE.2) PARI(93)=PARI(93)*XSEC(0,3)/VINT(131)
2755       ENDIF
2756       CALL PYEDIT(16)
2757  
2758 C...Transform to the desired coordinate frame.
2759   270 CALL PYFRAM(MSTP(124))
2760       MSTU(70)=MSTU70
2761       PARU(21)=VINT(1)
2762  
2763       RETURN
2764       END
2765  
2766 C***********************************************************************
2767  
2768 C...PYSTAT
2769 C...Prints out information about cross-sections, decay widths, branching
2770 C...ratios, kinematical limits, status codes and parameter values.
2771  
2772       SUBROUTINE PYSTAT(MSTAT)
2773  
2774 C...Double precision and integer declarations.
2775       IMPLICIT DOUBLE PRECISION(A-H, O-Z)
2776       IMPLICIT INTEGER(I-N)
2777       INTEGER PYK,PYCHGE,PYCOMP
2778 C...Parameter statement to help give large particle numbers.
2779       PARAMETER (KSUSY1=1000000,KSUSY2=2000000,KEXCIT=4000000)
2780 C...Commonblocks.
2781       COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
2782       COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
2783       COMMON/PYDAT3/MDCY(500,3),MDME(4000,2),BRAT(4000),KFDP(4000,5)
2784       COMMON/PYSUBS/MSEL,MSELPD,MSUB(500),KFIN(2,-40:40),CKIN(200)
2785       COMMON/PYPARS/MSTP(200),PARP(200),MSTI(200),PARI(200)
2786       COMMON/PYINT1/MINT(400),VINT(400)
2787       COMMON/PYINT2/ISET(500),KFPR(500,2),COEF(500,20),ICOL(40,4,2)
2788       COMMON/PYINT4/MWID(500),WIDS(500,5)
2789       COMMON/PYINT5/NGENPD,NGEN(0:500,3),XSEC(0:500,3)
2790       COMMON/PYINT6/PROC(0:500)
2791       CHARACTER PROC*28
2792       COMMON/PYMSSM/IMSS(0:99),RMSS(0:99)
2793       SAVE /PYDAT1/,/PYDAT2/,/PYDAT3/,/PYSUBS/,/PYPARS/,/PYINT1/,
2794      &/PYINT2/,/PYINT4/,/PYINT5/,/PYINT6/,/PYMSSM/
2795 C...Local arrays, character variables and data.
2796       DIMENSION WDTP(0:200),WDTE(0:200,0:5)
2797       CHARACTER PROGA(6)*28,CHAU*16,CHKF*16,CHD1*16,CHD2*16,CHD3*16,
2798      &CHIN(2)*12,STATE(-1:5)*4,CHKIN(21)*18,DISGA(2)*28,
2799      &PROGG9(13)*28,PROGG4(4)*28,PROGG2(2)*28,PROGP4(4)*28
2800       DATA PROGA/
2801      &'VMD/hadron * VMD            ','VMD/hadron * direct         ',
2802      &'VMD/hadron * anomalous      ','direct * direct             ',
2803      &'direct * anomalous          ','anomalous * anomalous       '/
2804       DATA DISGA/'e * VMD','e * anomalous'/
2805       DATA PROGG9/
2806      &'direct * direct             ','direct * VMD                ',
2807      &'direct * anomalous          ','VMD * direct                ',
2808      &'VMD * VMD                   ','VMD * anomalous             ',
2809      &'anomalous * direct          ','anomalous * VMD             ',
2810      &'anomalous * anomalous       ','DIS * VMD                   ',
2811      &'DIS * anomalous             ','VMD * DIS                   ',
2812      &'anomalous * DIS             '/
2813       DATA PROGG4/
2814      &'direct * direct             ','direct * resolved           ',
2815      &'resolved * direct           ','resolved * resolved         '/
2816       DATA PROGG2/
2817      &'direct * hadron             ','resolved * hadron           '/
2818       DATA PROGP4/
2819      &'VMD * hadron                ','direct * hadron             ',
2820      &'anomalous * hadron          ','DIS * hadron                '/
2821       DATA STATE/'----','off ','on  ','on/+','on/-','on/1','on/2'/,
2822      &CHKIN/' m_hard (GeV/c^2) ',' p_T_hard (GeV/c) ',
2823      &'m_finite (GeV/c^2)','   y*_subsystem   ','     y*_large     ',
2824      &'     y*_small     ','    eta*_large    ','    eta*_small    ',
2825      &'cos(theta*)_large ','cos(theta*)_small ','       x_1        ',
2826      &'       x_2        ','       x_F        ',' cos(theta_hard)  ',
2827      &'m''_hard (GeV/c^2) ','       tau        ','        y*        ',
2828      &'cos(theta_hard^-) ','cos(theta_hard^+) ','      x_T^2       ',
2829      &'       tau''       '/
2830  
2831 C...Cross-sections.
2832       IF(MSTAT.LE.1) THEN
2833         IF(MINT(121).GT.1) CALL PYSAVE(5,0)
2834         WRITE(MSTU(11),5000)
2835         WRITE(MSTU(11),5100)
2836         WRITE(MSTU(11),5200) 0,PROC(0),NGEN(0,3),NGEN(0,1),XSEC(0,3)
2837         DO 100 I=1,500
2838           IF(MSUB(I).NE.1) GOTO 100
2839           WRITE(MSTU(11),5200) I,PROC(I),NGEN(I,3),NGEN(I,1),XSEC(I,3)
2840   100   CONTINUE
2841         IF(MINT(121).GT.1) THEN
2842           WRITE(MSTU(11),5300)
2843           DO 110 IGA=1,MINT(121)
2844             CALL PYSAVE(3,IGA)
2845             IF(MINT(121).EQ.2.AND.MSTP(14).EQ.10) THEN
2846               WRITE(MSTU(11),5200) IGA,DISGA(IGA),NGEN(0,3),NGEN(0,1),
2847      &        XSEC(0,3)
2848             ELSEIF(MINT(121).EQ.9.OR.MINT(121).EQ.13) THEN
2849               WRITE(MSTU(11),5200) IGA,PROGG9(IGA),NGEN(0,3),NGEN(0,1),
2850      &        XSEC(0,3)
2851             ELSEIF(MINT(121).EQ.4.AND.MSTP(14).EQ.30) THEN
2852               WRITE(MSTU(11),5200) IGA,PROGP4(IGA),NGEN(0,3),NGEN(0,1),
2853      &        XSEC(0,3)
2854             ELSEIF(MINT(121).EQ.4) THEN
2855               WRITE(MSTU(11),5200) IGA,PROGG4(IGA),NGEN(0,3),NGEN(0,1),
2856      &        XSEC(0,3)
2857             ELSEIF(MINT(121).EQ.2) THEN
2858               WRITE(MSTU(11),5200) IGA,PROGG2(IGA),NGEN(0,3),NGEN(0,1),
2859      &        XSEC(0,3)
2860             ELSE
2861               WRITE(MSTU(11),5200) IGA,PROGA(IGA),NGEN(0,3),NGEN(0,1),
2862      &        XSEC(0,3)
2863             ENDIF
2864   110     CONTINUE
2865           CALL PYSAVE(5,0)
2866         ENDIF
2867         WRITE(MSTU(11),5400) 1D0-DBLE(NGEN(0,3))/
2868      &  MAX(1D0,DBLE(NGEN(0,2)))
2869  
2870 C...Decay widths and branching ratios.
2871       ELSEIF(MSTAT.EQ.2) THEN
2872         WRITE(MSTU(11),5500)
2873         WRITE(MSTU(11),5600)
2874         DO 140 KC=1,500
2875           KF=KCHG(KC,4)
2876           CALL PYNAME(KF,CHKF)
2877           IOFF=0
2878           IF(KC.LE.22) THEN
2879             IF(KC.GT.2*MSTP(1).AND.KC.LE.10) GOTO 140
2880             IF(KC.GT.10+2*MSTP(1).AND.KC.LE.20) GOTO 140
2881             IF(KC.LE.5.OR.(KC.GE.11.AND.KC.LE.16)) IOFF=1
2882             IF(KC.EQ.18.AND.PMAS(18,1).LT.1D0) IOFF=1
2883             IF(KC.EQ.21.OR.KC.EQ.22) IOFF=1
2884           ELSE
2885             IF(MWID(KC).LE.0) GOTO 140
2886             IF(IMSS(1).LE.0.AND.(KF/KSUSY1.EQ.1.OR.
2887      &      KF/KSUSY1.EQ.2)) GOTO 140
2888           ENDIF
2889 C...Off-shell branchings.
2890           IF(IOFF.EQ.1) THEN
2891             NGP=0
2892             IF(KC.LE.20) NGP=(MOD(KC,10)+1)/2
2893             IF(NGP.LE.MSTP(1)) WRITE(MSTU(11),5700) KF,CHKF(1:10),
2894      &      PMAS(KC,1),0D0,0D0,STATE(MDCY(KC,1)),0D0
2895             DO 120 J=1,MDCY(KC,3)
2896               IDC=J+MDCY(KC,2)-1
2897               NGP1=0
2898               IF(IABS(KFDP(IDC,1)).LE.20) NGP1=
2899      &        (MOD(IABS(KFDP(IDC,1)),10)+1)/2
2900               NGP2=0
2901               IF(IABS(KFDP(IDC,2)).LE.20) NGP2=
2902      &        (MOD(IABS(KFDP(IDC,2)),10)+1)/2
2903               CALL PYNAME(KFDP(IDC,1),CHD1)
2904               CALL PYNAME(KFDP(IDC,2),CHD2)
2905               IF(KFDP(IDC,3).EQ.0) THEN
2906                 IF(MDME(IDC,2).EQ.102.AND.NGP1.LE.MSTP(1).AND.
2907      &          NGP2.LE.MSTP(1)) WRITE(MSTU(11),5800) IDC,CHD1(1:10),
2908      &          CHD2(1:10),0D0,0D0,STATE(MDME(IDC,1)),0D0
2909               ELSE
2910                 CALL PYNAME(KFDP(IDC,3),CHD3)
2911                 IF(MDME(IDC,2).EQ.102.AND.NGP1.LE.MSTP(1).AND.
2912      &          NGP2.LE.MSTP(1)) WRITE(MSTU(11),5900) IDC,CHD1(1:10),
2913      &          CHD2(1:10),CHD3(1:10),0D0,0D0,STATE(MDME(IDC,1)),0D0
2914               ENDIF
2915   120       CONTINUE
2916 C...On-shell decays.
2917           ELSE
2918             CALL PYWIDT(KF,PMAS(KC,1)**2,WDTP,WDTE)
2919             BRFIN=1D0
2920             IF(WDTE(0,0).LE.0D0) BRFIN=0D0
2921             WRITE(MSTU(11),5700) KF,CHKF(1:10),PMAS(KC,1),WDTP(0),1D0,
2922      &      STATE(MDCY(KC,1)),BRFIN
2923             DO 130 J=1,MDCY(KC,3)
2924               IDC=J+MDCY(KC,2)-1
2925               NGP1=0
2926               IF(IABS(KFDP(IDC,1)).LE.20) NGP1=
2927      &        (MOD(IABS(KFDP(IDC,1)),10)+1)/2
2928               NGP2=0
2929               IF(IABS(KFDP(IDC,2)).LE.20) NGP2=
2930      &        (MOD(IABS(KFDP(IDC,2)),10)+1)/2
2931               BRFIN=0D0
2932               IF(WDTE(0,0).GT.0D0) BRFIN=WDTE(J,0)/WDTE(0,0)
2933               CALL PYNAME(KFDP(IDC,1),CHD1)
2934               CALL PYNAME(KFDP(IDC,2),CHD2)
2935               IF(KFDP(IDC,3).EQ.0) THEN
2936                 IF(NGP1.LE.MSTP(1).AND.NGP2.LE.MSTP(1))
2937      &          WRITE(MSTU(11),5800) IDC,CHD1(1:10),
2938      &          CHD2(1:10),WDTP(J),WDTP(J)/WDTP(0),
2939      &          STATE(MDME(IDC,1)),BRFIN
2940               ELSE
2941                 CALL PYNAME(KFDP(IDC,3),CHD3)
2942                 IF(NGP1.LE.MSTP(1).AND.NGP2.LE.MSTP(1))
2943      &          WRITE(MSTU(11),5900) IDC,CHD1(1:10),
2944      &          CHD2(1:10),CHD3(1:10),WDTP(J),WDTP(J)/WDTP(0),
2945      &          STATE(MDME(IDC,1)),BRFIN
2946               ENDIF
2947   130       CONTINUE
2948           ENDIF
2949   140   CONTINUE
2950         WRITE(MSTU(11),6000)
2951  
2952 C...Allowed incoming partons/particles at hard interaction.
2953       ELSEIF(MSTAT.EQ.3) THEN
2954         WRITE(MSTU(11),6100)
2955         CALL PYNAME(MINT(11),CHAU)
2956         CHIN(1)=CHAU(1:12)
2957         CALL PYNAME(MINT(12),CHAU)
2958         CHIN(2)=CHAU(1:12)
2959         WRITE(MSTU(11),6200) CHIN(1),CHIN(2)
2960         DO 150 I=-20,22
2961           IF(I.EQ.0) GOTO 150
2962           IA=IABS(I)
2963           IF(IA.GT.MSTP(58).AND.IA.LE.10) GOTO 150
2964           IF(IA.GT.10+2*MSTP(1).AND.IA.LE.20) GOTO 150
2965           CALL PYNAME(I,CHAU)
2966           WRITE(MSTU(11),6300) CHAU,STATE(KFIN(1,I)),CHAU,
2967      &    STATE(KFIN(2,I))
2968   150   CONTINUE
2969         WRITE(MSTU(11),6400)
2970  
2971 C...User-defined limits on kinematical variables.
2972       ELSEIF(MSTAT.EQ.4) THEN
2973         WRITE(MSTU(11),6500)
2974         WRITE(MSTU(11),6600)
2975         SHRMAX=CKIN(2)
2976         IF(SHRMAX.LT.0D0) SHRMAX=VINT(1)
2977         WRITE(MSTU(11),6700) CKIN(1),CHKIN(1),SHRMAX
2978         PTHMIN=MAX(CKIN(3),CKIN(5))
2979         PTHMAX=CKIN(4)
2980         IF(PTHMAX.LT.0D0) PTHMAX=0.5D0*SHRMAX
2981         WRITE(MSTU(11),6800) CKIN(3),PTHMIN,CHKIN(2),PTHMAX
2982         WRITE(MSTU(11),6900) CHKIN(3),CKIN(6)
2983         DO 160 I=4,14
2984           WRITE(MSTU(11),6700) CKIN(2*I-1),CHKIN(I),CKIN(2*I)
2985   160   CONTINUE
2986         SPRMAX=CKIN(32)
2987         IF(SPRMAX.LT.0D0) SPRMAX=VINT(1)
2988         WRITE(MSTU(11),6700) CKIN(31),CHKIN(15),SPRMAX
2989         WRITE(MSTU(11),7000)
2990  
2991 C...Status codes and parameter values.
2992       ELSEIF(MSTAT.EQ.5) THEN
2993         WRITE(MSTU(11),7100)
2994         WRITE(MSTU(11),7200)
2995         DO 170 I=1,100
2996           WRITE(MSTU(11),7300) I,MSTP(I),PARP(I),100+I,MSTP(100+I),
2997      &    PARP(100+I)
2998   170   CONTINUE
2999  
3000 C...List of all processes implemented in the program.
3001       ELSEIF(MSTAT.EQ.6) THEN
3002         WRITE(MSTU(11),7400)
3003         WRITE(MSTU(11),7500)
3004         DO 180 I=1,500
3005           IF(ISET(I).LT.0) GOTO 180
3006           WRITE(MSTU(11),7600) I,PROC(I),ISET(I),KFPR(I,1),KFPR(I,2)
3007   180   CONTINUE
3008         WRITE(MSTU(11),7700)
3009       ENDIF
3010  
3011 C...Formats for printouts.
3012  5000 FORMAT('1',9('*'),1X,'PYSTAT:  Statistics on Number of ',
3013      &'Events and Cross-sections',1X,9('*'))
3014  5100 FORMAT(/1X,78('=')/1X,'I',34X,'I',28X,'I',12X,'I'/1X,'I',12X,
3015      &'Subprocess',12X,'I',6X,'Number of points',6X,'I',4X,'Sigma',3X,
3016      &'I'/1X,'I',34X,'I',28X,'I',12X,'I'/1X,'I',34('-'),'I',28('-'),
3017      &'I',4X,'(mb)',4X,'I'/1X,'I',34X,'I',28X,'I',12X,'I'/1X,'I',1X,
3018      &'N:o',1X,'Type',25X,'I',4X,'Generated',9X,'Tried',1X,'I',12X,
3019      &'I'/1X,'I',34X,'I',28X,'I',12X,'I'/1X,78('=')/1X,'I',34X,'I',28X,
3020      &'I',12X,'I')
3021  5200 FORMAT(1X,'I',1X,I3,1X,A28,1X,'I',1X,I12,1X,I13,1X,'I',1X,1P,
3022      &D10.3,1X,'I')
3023  5300 FORMAT(1X,'I',34X,'I',28X,'I',12X,'I'/1X,78('=')/
3024      &1X,'I',34X,'I',28X,'I',12X,'I')
3025  5400 FORMAT(1X,'I',34X,'I',28X,'I',12X,'I'/1X,78('=')//
3026      &1X,'********* Fraction of events that fail fragmentation ',
3027      &'cuts =',1X,F8.5,' *********'/)
3028  5500 FORMAT('1',27('*'),1X,'PYSTAT:  Decay Widths and Branching ',
3029      &'Ratios',1X,27('*'))
3030  5600 FORMAT(/1X,98('=')/1X,'I',49X,'I',13X,'I',12X,'I',6X,'I',12X,'I'/
3031      &1X,'I',5X,'Mother  -->  Branching/Decay Channel',8X,'I',1X,
3032      &'Width (GeV)',1X,'I',7X,'B.R.',1X,'I',1X,'Stat',1X,'I',2X,
3033      &'Eff. B.R.',1X,'I'/1X,'I',49X,'I',13X,'I',12X,'I',6X,'I',12X,'I'/
3034      &1X,98('='))
3035  5700 FORMAT(1X,'I',49X,'I',13X,'I',12X,'I',6X,'I',12X,'I'/1X,'I',1X,
3036      &I8,2X,A10,3X,'(m =',F10.3,')',2X,'-->',5X,'I',2X,1P,D10.3,0P,1X,
3037      &'I',1X,1P,D10.3,0P,1X,'I',1X,A4,1X,'I',1X,1P,D10.3,0P,1X,'I')
3038  5800 FORMAT(1X,'I',1X,I8,2X,A10,1X,'+',1X,A10,15X,'I',2X,
3039      &1P,D10.3,0P,1X,'I',1X,1P,D10.3,0P,1X,'I',1X,A4,1X,'I',1X,
3040      &1P,D10.3,0P,1X,'I')
3041  5900 FORMAT(1X,'I',1X,I8,2X,A10,1X,'+',1X,A10,1X,'+',1X,A10,2X,'I',2X,
3042      &1P,D10.3,0P,1X,'I',1X,1P,D10.3,0P,1X,'I',1X,A4,1X,'I',1X,
3043      &1P,D10.3,0P,1X,'I')