1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
|
c**********************************************************
c***** setting the final state particles' information
c***** mainly setting the color flow of the process
c**********************************************************
subroutine bcpythia(ipartic)
c...double precision and integer declarations.
implicit double precision(a-h, o-z)
implicit integer(i-n)
c...pythia common block.
parameter (maxnup=500)
common/pypars/mstp(200),parp(200),msti(200),pari(200)
common/hepeup/nup,idprup,xwgtup,scalup,aqedup,aqcdup,idup(maxnup),
&istup(maxnup),mothup(2,maxnup),icolup(2,maxnup),pup(5,maxnup),
&vtimup(maxnup),spinup(maxnup)
save /hepeup/
c...the user's own transfer of information.
common/colflow/amp2cf(10),smatval
common/ptpass/ptmin,ptmax,crossmax,etamin,etamax,
& smin,smax,ymin,ymax,psetamin,psetamax
c...color-octet.
common/coloct/ioctet
c...define number of partons - two incoming and three outgoing.
nup=5
if(ipartic.eq.21) then
c...set up flavour and history of g + g -> b_c + b + cbar.
idup(1)= 21 ! gluon 1
idup(2)= 21 ! gluon 2
else
c...set up flavour and history of q + \bar{q} -> b_c + b + cbar.
if(ipartic.eq.1) then
idup(1)= 1 ! u
idup(2)= -1 ! \bar{u}
end if
if(ipartic.eq.2) then
idup(1)= 2 ! d
idup(2)= -2 ! \bar{d}
end if
if(ipartic.eq.3) then
idup(1)= 3 ! s
idup(2)= -3 ! \bar{s}
end if
end if
idup(3)= 541 ! b_c+
idup(4)= 5 ! b-quark
idup(5)=-4 ! c-antiquark
c...status codes.
istup(1)=-1
istup(2)=-1
istup(3)= 1
istup(4)= 1
istup(5)= 1
c...mother codes.
mothup(1,1)=0 ! gluon 1 or q <-- proton 1
mothup(2,1)=0
mothup(1,2)=0 ! gluon 2 or \bar{q} <-- proton 2
mothup(2,2)=0
mothup(1,3)=1 ! bc+
mothup(2,3)=2
mothup(1,4)=1 ! b
mothup(2,4)=2
mothup(1,5)=1 !cbar
mothup(2,5)=2
c...seclect one of the three possible types of color flow at random,
c...according to its contribution to the square of amplitude.
ranmat =smatval*pyr(0)
icolnum=0
if(ipartic.eq.21) then
iuplimit=3
else
iuplimit=2
end if
if(ioctet.eq.1) then
iuplimit=10
end if
110 icolnum=icolnum+1
ranmat =ranmat-amp2cf(icolnum)
if(icolnum.lt.iuplimit .and. ranmat.gt.1.0d-16) go to 110
if(ipartic.eq.21) then
c----------------
if(ioctet.eq.0) then
c...three color flow for color-singlet in the gluon-gluon fusion.
if(icolnum.eq.1) then
icolup(1,1)=502
icolup(2,1)=501
icolup(1,2)=503
icolup(2,2)=502
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=501
end if
if(icolnum.eq.2) then
icolup(1,1)=503
icolup(2,1)=502
icolup(1,2)=502
icolup(2,2)=501
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=501
end if
if(icolnum.eq.3) then
icolup(1,1)=501
icolup(2,1)=502
icolup(1,2)=502
icolup(2,2)=501
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=503
end if
end if
c------the following is for color-octet and can be found in ref.
c... hep-ph/0504017. however, in pythia, at the present, there is
c... no color-octet meson, so practically, one might think the
c... color-octet meson will emit a soft gluon with 100% and then
c... changes to a color singlet state. under such prescription,
c... one may observe that the ten color flow are correspond to
c... three independent flow.
if(ioctet.eq.1) then
c...ten color flow for color-octet in the gluon-gluon fusion.
if(icolnum.eq.1) then
icolup(1,1)=503
icolup(2,1)=502
icolup(1,2)=502
icolup(2,2)=501
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=501
end if
if(icolnum.eq.2) then
icolup(1,1)=502
icolup(2,1)=501
icolup(1,2)=503
icolup(2,2)=502
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=501
end if
if(icolnum.eq.3) then
icolup(1,1)=503
icolup(2,1)=502
icolup(1,2)=502
icolup(2,2)=501
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=501
end if
if(icolnum.eq.4) then
icolup(1,1)=502
icolup(2,1)=501
icolup(1,2)=503
icolup(2,2)=502
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=501
end if
if(icolnum.eq.5) then
icolup(1,1)=503
icolup(2,1)=502
icolup(1,2)=502
icolup(2,2)=501
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=501
end if
if(icolnum.eq.6) then
icolup(1,1)=502
icolup(2,1)=501
icolup(1,2)=503
icolup(2,2)=502
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=501
end if
if(icolnum.eq.7) then
icolup(1,1)=503
icolup(2,1)=502
icolup(1,2)=502
icolup(2,2)=501
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=501
end if
if(icolnum.eq.8) then
icolup(1,1)=502
icolup(2,1)=501
icolup(1,2)=503
icolup(2,2)=502
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=501
end if
if(icolnum.eq.9) then
icolup(1,1)=503
icolup(2,1)=502
icolup(1,2)=502
icolup(2,2)=501
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=501
end if
if(icolnum.eq.10) then
icolup(1,1)=502
icolup(2,1)=501
icolup(1,2)=503
icolup(2,2)=502
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=503
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=501
end if
end if
c--------the following is the theoretical color-flow from
c--------hep-ph/0504017.
c if(ioctet.eq.1) then
c...three color flow for color-octet in the gluon-gluon fusion.
c if(icolnum.eq.1) then
c icolup(1,1)=503
c icolup(2,1)=502
c icolup(1,2)=502
c icolup(2,2)=501
c icolup(1,3)=504 ! bc in color-octet state.
c icolup(2,3)=503
c icolup(1,4)=504
c icolup(2,4)=0
c icolup(1,5)=0
c icolup(2,5)=501
c end if
c
c if(icolnum.eq.2) then
c icolup(1,1)=502
c icolup(2,1)=501
c icolup(1,2)=503
c icolup(2,2)=502
c icolup(1,3)=504
c icolup(2,3)=503
c icolup(1,4)=504
c icolup(2,4)=0
c icolup(1,5)=0
c icolup(2,5)=501
c end if
c
c if(icolnum.eq.3) then
c icolup(1,1)=503
c icolup(2,1)=502
c icolup(1,2)=501
c icolup(2,2)=504
c icolup(1,3)=502
c icolup(2,3)=503
c icolup(1,4)=504
c icolup(2,4)=0
c icolup(1,5)=0
c icolup(2,5)=501
c end if
c
c if(icolnum.eq.4) then
c icolup(1,1)=501
c icolup(2,1)=504
c icolup(1,2)=503
c icolup(2,2)=502
c icolup(1,3)=502
c icolup(2,3)=503
c icolup(1,4)=504
c icolup(2,4)=0
c icolup(1,5)=0
c icolup(2,5)=501
c end if
c
c if(icolnum.eq.5) then
c icolup(1,1)=503
c icolup(2,1)=502
c icolup(1,2)=502
c icolup(2,2)=501
c icolup(1,3)=501
c icolup(2,3)=503
c icolup(1,4)=504
c icolup(2,4)=0
c icolup(1,5)=0
c icolup(2,5)=504
c end if
c if(icolnum.eq.6) then
c icolup(1,1)=502
c icolup(2,1)=501
c icolup(1,2)=503
c icolup(2,2)=502
c icolup(1,3)=501
c icolup(2,3)=503
c icolup(1,4)=504
c icolup(2,4)=0
c icolup(1,5)=0
c icolup(2,5)=504
c end if
c
c if(icolnum.eq.7) then
c icolup(1,1)=504
c icolup(2,1)=503
c icolup(1,2)=503
c icolup(2,2)=502
c icolup(1,3)=502
c icolup(2,3)=501
c icolup(1,4)=504
c icolup(2,4)=0
c icolup(1,5)=0
c icolup(2,5)=501
c end if
c
c if(icolnum.eq.8) then
c icolup(1,1)=503
c icolup(2,1)=502
c icolup(1,2)=504
c icolup(2,2)=503
c icolup(1,3)=502
c icolup(2,3)=501
c icolup(1,4)=504
c icolup(2,4)=0
c icolup(1,5)=0
c icolup(2,5)=501
c end if
c
c if(icolnum.eq.9) then
c icolup(1,1)=502
c icolup(2,1)=501
c icolup(1,2)=504
c icolup(2,2)=503
c icolup(1,3)=503
c icolup(2,3)=502
c icolup(1,4)=504
c icolup(2,4)=0
c icolup(1,5)=0
c icolup(2,5)=501
c end if
c
c if(icolnum.eq.10) then
c icolup(1,1)=504
c icolup(2,1)=503
c icolup(1,2)=502
c icolup(2,2)=501
c icolup(1,3)=503
c icolup(2,3)=502
c icolup(1,4)=504
c icolup(2,4)=0
c icolup(1,5)=0
c icolup(2,5)=501
c end if
c end if
c-------
else
c...two color flow for quark-antiquark annihilation.
if(icolnum.eq.1) then
icolup(1,1)=501
icolup(2,1)=0
icolup(1,2)=0
icolup(2,2)=502
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=501
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=502
end if
if(icolnum.eq.2) then
icolup(1,1)=501
icolup(2,1)=0
icolup(1,2)=0
icolup(2,2)=501
icolup(1,3)=0
icolup(2,3)=0
icolup(1,4)=502
icolup(2,4)=0
icolup(1,5)=0
icolup(2,5)=502
end if
end if
return
end
|