12 IMPLICIT DOUBLE PRECISION(a-
h, o-
z)
16 parameter(ksusy1=1000000,ksusy2=2000000,ktechn=3000000,
17 &kexcit=4000000,kdimen=5000000)
20 common/
pydat1/mstu(200),paru(200),mstj(200),parj(200)
21 common/
pydat2/kchg(500,4),pmas(500,4),parf(2000),vckm(4,4)
22 common/
pydat3/mdcy(500,3),mdme(8000,2),brat(8000),kfdp(8000,5)
25 dimension kfis(100,2),npis(100,0:10),kffs(400),npfs(400,4),
26 &fevfm(10,4),fm1fm(3,10,4),fm2fm(3,10,4),fmoma(4),fmoms(4),
27 &fevee(50),fe1ec(50),fe2ec(50),fe1ea(25),fe2ea(25),
28 &kfdm(8),kfdc(200,0:8),npdc(200)
29 SAVE nevis,nkfis,kfis,npis,nevfs,nprfs,nfifs,nchfs,nkffs,
30 &kffs,npfs,nevfm,nmufm,fm1fm,fm2fm,nevee,fe1ec,fe2ec,fe1ea,
31 &fe2ea,nevdc,nkfdc,nredc,kfdc,npdc
32 CHARACTER chau*16,chis(2)*12,chdc(8)*12
33 DATA nevis/0/,nkfis/0/,nevfs/0/,nprfs/0/,nfifs/0/,nchfs/0/,
34 &nkffs/0/,nevfm/0/,nmufm/0/,fm1fm/120*0d0/,fm2fm/120*0d0/,
35 &nevee/0/,fe1ec/50*0d0/,fe2ec/50*0d0/,fe1ea/25*0d0/,fe2ea/25*0d0/,
36 &nevdc/0/,nkfdc/0/,nredc/0/
44 ELSEIF(mtabu.EQ.11)
THEN
46 kfm1=2*iabs(mstu(161))
47 IF(mstu(161).GT.0) kfm1=kfm1-1
48 kfm2=2*iabs(mstu(162))
49 IF(mstu(162).GT.0) kfm2=kfm2-1
53 IF(kfmn.EQ.kfis(
i,1).AND.kfmx.EQ.kfis(
i,2))
THEN
56 ELSEIF(kfmn.LT.kfis(
i,1).OR.(kfmn.EQ.kfis(
i,1).AND.
57 & kfmx.LT.kfis(
i,2)))
THEN
63 110
IF(ikfis.LT.0)
THEN
66 IF(nkfis.GE.100)
RETURN
67 DO 130
i=nkfis,ikfis,-1
81 npis(ikfis,0)=npis(ikfis,0)+1
86 IF(
k(
i,1).LE.0.OR.
k(
i,1).GT.12)
THEN
87 ELSEIF(iabs(
k(
i,2)).GT.80.AND.iabs(
k(
i,2)).LE.100)
THEN
88 ELSEIF(iabs(
k(
i,2)).GT.100.AND.mod(iabs(
k(
i,2))/10,10).NE.0)
93 IF(im.LE.0.OR.im.GT.
n)
THEN
95 ELSEIF(
k(im,1).LE.0.OR.
k(im,1).GT.20)
THEN
97 ELSEIF(iabs(
k(im,2)).GT.80.AND.iabs(
k(im,2)).LE.100)
THEN
98 ELSEIF(iabs(
k(im,2)).GT.100.AND.mod(iabs(
k(im,2))/10,10)
111 npis(ikfis,npco)=npis(ikfis,npco)+1
115 ELSEIF(mtabu.EQ.12)
THEN
117 WRITE(mstu(11),5000) nevis
120 IF(kfmn.EQ.0) kfmn=kfis(
i,2)
122 IF(2*kfm1.EQ.kfmn) kfm1=-kfm1
125 IF(chau(13:13).NE.
' ') chis(1)(12:12)=
'?'
127 IF(kfis(
i,1).EQ.0) kfmx=0
129 IF(2*kfm2.EQ.kfmx) kfm2=-kfm2
132 IF(chau(13:13).NE.
' ') chis(2)(12:12)=
'?'
133 WRITE(mstu(11),5100) chis(1),chis(2),fac*npis(
i,0),
134 & (npis(
i,
j)/dble(npis(
i,0)),
j=1,10)
138 ELSEIF(mtabu.EQ.13)
THEN
142 IF(kfmn.EQ.0) kfmn=kfis(
i,2)
144 IF(2*kfm1.EQ.kfmn) kfm1=-kfm1
146 IF(kfis(
i,1).EQ.0) kfmx=0
148 IF(2*kfm2.EQ.kfmx) kfm2=-kfm2
156 v(
i,
j)=fac*npis(
i,
j+5)
171 ELSEIF(mtabu.EQ.20)
THEN
179 ELSEIF(mtabu.EQ.21)
THEN
183 IF(
k(
i,1).LE.0.OR.
k(
i,1).GT.20.OR.
k(
i,1).EQ.13) goto 260
187 IF(
k(
i,3).LE.0.OR.
k(
i,3).GT.
n)
THEN
189 ELSEIF(
k(
k(
i,3),1).LE.0.OR.
k(
k(
i,3),1).GT.20)
THEN
191 ELSEIF(
k(
k(
i,3),2).GE.91.AND.
k(
k(
i,3),2).LE.93)
THEN
194 ELSEIF(
k(
k(
i,3),1).EQ.13)
THEN
196 IF(im.LE.0.OR.im.GT.
n)
THEN
198 ELSEIF(
k(im,1).LE.0.OR.
k(im,1).GT.20)
THEN
201 ELSEIF(kchg(kc,2).EQ.0)
THEN
204 IF(kchg(kcm,2).NE.0) mpri=1
207 IF(kc.NE.0.AND.mpri.EQ.1)
THEN
208 IF(kchg(kc,2).EQ.0) nprfs=nprfs+1
210 IF(
k(
i,1).LE.10)
THEN
212 IF(
pychge(
k(
i,2)).NE.0) nchfs=nchfs+1
217 kfs=3-isign(1,
k(
i,2))-mpri
219 IF(kfa.EQ.kffs(ip))
THEN
222 ELSEIF(kfa.LT.kffs(ip))
THEN
228 220
IF(ikffs.LT.0)
THEN
231 IF(nkffs.GE.400)
RETURN
232 DO 240 ip=nkffs,ikffs,-1
235 npfs(ip+1,
j)=npfs(ip,
j)
244 npfs(ikffs,kfs)=npfs(ikffs,kfs)+1
248 ELSEIF(mtabu.EQ.22)
THEN
250 WRITE(mstu(11),5200) nevfs,fac*nprfs,fac*nfifs,fac*nchfs
255 IF(kc.NE.0) mdcyf=mdcy(kc,1)
256 WRITE(mstu(11),5300) kffs(
i),chau,mdcyf,(fac*npfs(
i,
j),
j=1,4),
257 & fac*(npfs(
i,1)+npfs(
i,2)+npfs(
i,3)+npfs(
i,4))
261 ELSEIF(mtabu.EQ.23)
THEN
268 k(
i,5)=npfs(
i,1)+npfs(
i,2)+npfs(
i,3)+npfs(
i,4)
291 ELSEIF(mtabu.EQ.30)
THEN
304 ELSEIF(mtabu.EQ.31)
THEN
309 IF(
k(
i,1).LE.0.OR.
k(
i,1).GT.10) goto 410
310 IF(mstu(41).GE.2)
THEN
312 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
313 & kc.EQ.18.OR.
k(
i,2).EQ.ksusy1+22.OR.
k(
i,2).EQ.39.OR.
314 &
k(
i,2).EQ.ksusy1+39) goto 410
315 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
319 IF(mstu(42).EQ.1.AND.
k(
i,2).NE.22) pmr=
pymass(211)
320 IF(mstu(42).GE.2) pmr=
p(
i,5)
321 pr=
max(1d-20,pmr**2+
p(
i,1)**2+
p(
i,2)**2)
322 yeta=
sign(
log(min((sqrt(pr+
p(
i,3)**2)+abs(
p(
i,3)))/sqrt(pr),
324 IF(abs(yeta).GT.paru(57)) goto 410
326 iyeta=512d0*(yeta+paru(57))/(2d0*paru(57))
327 iyeta=
max(0,min(511,iyeta))
328 iphi=512d0*(
phi+paru(1))/paru(2)
329 iphi=
max(0,min(511,iphi))
332 iyep=iyep+4**ib*(2*mod(iyeta/2**ib,2)+mod(iphi/2**ib,2))
336 IF(nupp.GT.mstu(4)-5-mstu(32))
THEN
337 CALL
pyerrm(11,
'(PYTABU:) no more memory left in PYJETS')
341 IF(nupp.EQ.nlow+1)
THEN
346 DO 350
i1=nupp-1,nlow+1,-1
347 IF(iyeta.GE.
k(
i1,1)) goto 360
351 DO 370
i1=nupp-1,nlow+1,-1
352 IF(iphi.GE.
k(
i1,2)) goto 380
356 DO 390
i1=nupp-1,nlow+1,-1
357 IF(iyep.GE.
k(
i1,3)) goto 400
375 IF(im.LE.2) ibin=2**(10-ib)
376 IF(im.EQ.3) ibin=4**(10-ib)
377 iagr=
k(nlow+1,im)/ibin
379 DO 440
i=nlow+2,nupp+1
381 IF(icut.EQ.iagr)
THEN
385 ELSEIF(nagr.EQ.2)
THEN
386 fevfm(ib,1)=fevfm(ib,1)+2d0
387 ELSEIF(nagr.EQ.3)
THEN
388 fevfm(ib,1)=fevfm(ib,1)+6d0
389 fevfm(ib,2)=fevfm(ib,2)+6d0
390 ELSEIF(nagr.EQ.4)
THEN
391 fevfm(ib,1)=fevfm(ib,1)+12d0
392 fevfm(ib,2)=fevfm(ib,2)+24d0
393 fevfm(ib,3)=fevfm(ib,3)+24d0
395 fevfm(ib,1)=fevfm(ib,1)+nagr*(nagr-1d0)
396 fevfm(ib,2)=fevfm(ib,2)+nagr*(nagr-1d0)*(nagr-2d0)
397 fevfm(ib,3)=fevfm(ib,3)+nagr*(nagr-1d0)*(nagr-2d0)*
399 fevfm(ib,4)=fevfm(ib,4)+nagr*(nagr-1d0)*(nagr-2d0)*
400 & (nagr-3d0)*(nagr-4d0)
411 IF(fevfm(1,ip).LT.0.5d0)
THEN
414 fevfm(ib,ip)=2d0**((ib-1)*ip)*fevfm(ib,ip)/fevfm(1,ip)
416 fevfm(ib,ip)=4d0**((ib-1)*ip)*fevfm(ib,ip)/fevfm(1,ip)
418 fm1fm(im,ib,ip)=fm1fm(im,ib,ip)+fevfm(ib,ip)
419 fm2fm(im,ib,ip)=fm2fm(im,ib,ip)+fevfm(ib,ip)**2
423 nmufm=nmufm+(nupp-nlow)
427 ELSEIF(mtabu.EQ.32)
THEN
429 IF(mstu(42).LE.0)
WRITE(mstu(11),5400) nevfm,
'eta'
430 IF(mstu(42).EQ.1)
WRITE(mstu(11),5400) nevfm,
'ypi'
431 IF(mstu(42).GE.2)
WRITE(mstu(11),5400) nevfm,
'y '
436 IF(im.NE.2) byeta=byeta/2**(ib-1)
438 IF(im.NE.1) bphi=bphi/2**(ib-1)
439 IF(im.LE.2) bnave=fac*nmufm/dble(2**(ib-1))
440 IF(im.EQ.3) bnave=fac*nmufm/dble(4**(ib-1))
442 fmoma(ip)=fac*fm1fm(im,ib,ip)
443 fmoms(ip)=sqrt(
max(0d0,fac*(fac*fm2fm(im,ib,ip)-
446 WRITE(mstu(11),5600) byeta,bphi,bnave,(fmoma(ip),fmoms(ip),
452 ELSEIF(mtabu.EQ.33)
THEN
460 IF(im.NE.2)
k(
i,3)=2**(ib-1)
462 IF(im.NE.1)
k(
i,4)=2**(ib-1)
464 p(
i,1)=2d0*paru(57)/
k(
i,3)
465 v(
i,1)=paru(2)/
k(
i,4)
467 p(
i,ip+1)=fac*fm1fm(im,ib,ip)
468 v(
i,ip+1)=sqrt(
max(0d0,fac*(fac*fm2fm(im,ib,ip)-
485 ELSEIF(mtabu.EQ.40)
THEN
497 ELSEIF(mtabu.EQ.41)
THEN
503 IF(
k(
i,1).LE.0.OR.
k(
i,1).GT.10) goto 570
504 IF(mstu(41).GE.2)
THEN
506 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
507 & kc.EQ.18.OR.
k(
i,2).EQ.ksusy1+22.OR.
k(
i,2).EQ.39.OR.
508 &
k(
i,2).EQ.ksusy1+39) goto 570
509 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
513 IF(mstu(42).EQ.1.AND.
k(
i,2).NE.22) pmr=
pymass(211)
514 IF(mstu(42).GE.2) pmr=
p(
i,5)
515 IF(nupp.GT.mstu(4)-5-mstu(32))
THEN
516 CALL
pyerrm(11,
'(PYTABU:) no more memory left in PYJETS')
523 p(nupp,4)=sqrt(pmr**2+
p(
i,1)**2+
p(
i,2)**2+
p(
i,3)**2)
524 p(nupp,5)=
max(1d-10,sqrt(
p(
i,1)**2+
p(
i,2)**2+
p(
i,3)**2))
527 IF(nupp.EQ.nlow)
RETURN
530 fac=(2d0/ecm**2)*50d0/paru(1)
534 DO 600
i1=nlow+2,nupp
535 DO 590
i2=nlow+1,
i1-1
538 the=acos(
max(-1d0,min(1d0,cthe)))
539 ithe=
max(1,min(50,1+int(50d0*the/paru(1))))
540 fevee(ithe)=fevee(ithe)+fac*
p(
i1,4)*
p(
i2,4)
544 fe1ec(
j)=fe1ec(
j)+fevee(
j)
545 fe2ec(
j)=fe2ec(
j)+fevee(
j)**2
546 fe1ec(51-
j)=fe1ec(51-
j)+fevee(51-
j)
547 fe2ec(51-
j)=fe2ec(51-
j)+fevee(51-
j)**2
548 fe1ea(
j)=fe1ea(
j)+(fevee(51-
j)-fevee(
j))
549 fe2ea(
j)=fe2ea(
j)+(fevee(51-
j)-fevee(
j))**2
554 ELSEIF(mtabu.EQ.42)
THEN
556 WRITE(mstu(11),5700) nevee
559 fees1=sqrt(
max(0d0,fac*(fac*fe2ec(
j)-feec1**2)))
560 feec2=fac*fe1ec(51-
j)
561 fees2=sqrt(
max(0d0,fac*(fac*fe2ec(51-
j)-feec2**2)))
563 feesa=sqrt(
max(0d0,fac*(fac*fe2ea(
j)-feeca**2)))
564 WRITE(mstu(11),5800) 3.6d0*(
j-1),3.6d0*
j,feec1,fees1,
565 & feec2,fees2,feeca,feesa
569 ELSEIF(mtabu.EQ.43)
THEN
578 v(
i,1)=sqrt(
max(0d0,fac*(fac*fe2ec(
i)-
p(
i,1)**2)))
579 p(
i,2)=fac*fe1ec(51-
i)
580 v(
i,2)=sqrt(
max(0d0,fac*(fac*fe2ec(51-
i)-
p(
i,2)**2)))
582 v(
i,3)=sqrt(
max(0d0,fac*(fac*fe2ea(
i)-
p(
i,3)**2)))
583 p(
i,4)=paru(1)*(
i-1)/50d0
584 p(
i,5)=paru(1)*
i/50d0
600 ELSEIF(mtabu.EQ.50)
THEN
606 ELSEIF(mtabu.EQ.51)
THEN
610 IF(
k(
i,1).LE.0.OR.
k(
i,1).GE.6) goto 670
617 IF(
k(
i,2).LT.0) kfm=kfm-1
618 DO 650 ids=nds-1,1,-1
620 IF(kfm.LT.kfdm(ids)) goto 660
621 kfdm(ids+1)=kfdm(ids)
629 IF(nds.LT.kfdc(idc,0))
THEN
632 ELSEIF(nds.EQ.kfdc(idc,0))
THEN
634 IF(kfdm(
i).LT.kfdc(idc,
i))
THEN
637 ELSEIF(kfdm(
i).GT.kfdc(idc,
i))
THEN
646 700
IF(ikfdc.LT.0)
THEN
648 ELSEIF(nkfdc.GE.200)
THEN
652 DO 720 idc=nkfdc,ikfdc,-1
653 npdc(idc+1)=npdc(idc)
655 kfdc(idc+1,
i)=kfdc(idc,
i)
661 kfdc(ikfdc,
i)=kfdm(
i)
665 npdc(ikfdc)=npdc(ikfdc)+1
668 ELSEIF(mtabu.EQ.52)
THEN
670 WRITE(mstu(11),5900) nevdc
672 DO 740
i=1,kfdc(idc,0)
675 IF(2*kf.NE.kfm) kf=-kf
678 IF(chau(13:13).NE.
' ') chdc(
i)(12:12)=
'?'
680 WRITE(mstu(11),6000) fac*npdc(idc),(chdc(
i),
i=1,kfdc(idc,0))
682 IF(nredc.NE.0)
WRITE(mstu(11),6100) fac*nredc
685 ELSEIF(mtabu.EQ.53)
THEN
697 DO 770
i=1,kfdc(idc,0)
700 IF(2*kf.NE.kfm) kf=-kf
701 IF(
i.LE.5)
p(idc,
i)=kf
702 IF(
i.GE.6)
v(idc,
i-5)=kf
704 v(idc,5)=fac*npdc(idc)
720 5000
FORMAT(///20
x,
'Event statistics - initial state'/
721 &20
x,
'based on an analysis of ',i6,
' events'//
722 &3
x,
'Main flavours after',8
x,
'Fraction',4
x,
'Subfractions ',
723 &
'according to fragmenting system multiplicity'/
724 &4
x,
'hard interaction',24
x,
'1',7
x,
'2',7
x,
'3',7
x,
'4',7
x,
'5',
725 &6
x,
'6-7',5
x,
'8-10',3
x,
'11-15',3
x,
'16-25',4
x,
'>25'/)
726 5100
FORMAT(3
x,a12,1
x,a12,f10.5,1
x,10f8.4)
727 5200
FORMAT(///20
x,
'Event statistics - final state'/
728 &20
x,
'based on an analysis of ',i7,
' events'//
729 &5
x,
'Mean primary multiplicity =',f10.4/
730 &5
x,
'Mean final multiplicity =',f10.4/
731 &5
x,
'Mean charged multiplicity =',f10.4//
732 &5
x,
'Number of particles produced per event (directly and via ',
733 &
'decays/branchings)'/
734 &8
x,
'KF Particle/jet MDCY',10
x,
'Particles',13
x,
'Antiparticles',
735 &8
x,
'Total'/35
x,
'prim seco prim seco'/)
736 5300
FORMAT(1
x,i9,4
x,a16,
i2,5(1
x,f11.6))
737 5400
FORMAT(///20
x,
'Factorial moments analysis of multiplicity'/
738 &20
x,
'based on an analysis of ',i6,
' events'//
739 &3
x,
'delta-',a3,
' delta-phi <n>/bin',10
x,
'<F2>',18
x,
'<F3>',
740 &18
x,
'<F4>',18
x,
'<F5>'/35
x,4(
' value error '))
742 5600
FORMAT(2
x,2f10.4,f12.4,4(f12.4,f10.4))
743 5700
FORMAT(///20
x,
'Energy-Energy Correlation and Asymmetry'/
744 &20
x,
'based on an analysis of ',i6,
' events'//
745 &2
x,
'theta range',8
x,
'EEC(theta)',8
x,
'EEC(180-theta)',7
x,
746 &
'EECA(theta)'/2
x,
'in degrees ',3(
' value error')/)
747 5800
FORMAT(2
x,f4.1,
' - ',f4.1,3(f11.4,f9.4))
748 5900
FORMAT(///20
x,
'Decay channel analysis - final state'/
749 &20
x,
'based on an analysis of ',i6,
' events'//
750 &2
x,
'Probability',10
x,
'Complete final state'/)
751 6000
FORMAT(2
x,f9.5,5
x,8(a12,1
x))
752 6100
FORMAT(2
x,f9.5,5
x,
'into other channels (more than 8 particles ',
753 &
'or table overflow)')