9 common/lujets/
n,
k(9000,5),
p(9000,5),
v(9000,5)
11 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
13 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
15 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
17 dimension kfis(100,2),npis(100,0:10),kffs(400),npfs(400,4),
18 &fevfm(10,4),fm1fm(3,10,4),fm2fm(3,10,4),fmoma(4),fmoms(4),
19 &fevee(50),fe1ec(50),fe2ec(50),fe1ea(25),fe2ea(25),
20 &kfdm(8),kfdc(200,0:8),npdc(200)
21 SAVE nevis,nkfis,kfis,npis,nevfs,nprfs,nfifs,nchfs,nkffs,
22 &kffs,npfs,nevfm,nmufm,fm1fm,fm2fm,nevee,fe1ec,fe2ec,fe1ea,
23 &fe2ea,nevdc,nkfdc,nredc,kfdc,npdc
24 CHARACTER chau*16,chis(2)*12,chdc(8)*12
25 DATA nevis/0/,nkfis/0/,nevfs/0/,nprfs/0/,nfifs/0/,nchfs/0/,
26 &nkffs/0/,nevfm/0/,nmufm/0/,fm1fm/120*0./,fm2fm/120*0./,
27 &nevee/0/,fe1ec/50*0./,fe2ec/50*0./,fe1ea/25*0./,fe2ea/25*0./,
28 &nevdc/0/,nkfdc/0/,nredc/0/
36 ELSEIF(mtabu.EQ.11)
THEN
38 kfm1=2*iabs(mstu(161))
39 IF(mstu(161).GT.0) kfm1=kfm1-1
40 kfm2=2*iabs(mstu(162))
41 IF(mstu(162).GT.0) kfm2=kfm2-1
45 IF(kfmn.EQ.kfis(
i,1).AND.kfmx.EQ.kfis(
i,2))
THEN
48 ELSEIF(kfmn.LT.kfis(
i,1).OR.(kfmn.EQ.kfis(
i,1).AND.
49 & kfmx.LT.kfis(
i,2)))
THEN
55 110
IF(ikfis.LT.0)
THEN
58 IF(nkfis.GE.100)
RETURN
59 DO 120
i=nkfis,ikfis,-1
63 120 npis(
i+1,
j)=npis(
i,
j)
70 npis(ikfis,0)=npis(ikfis,0)+1
75 IF(
k(
i,1).LE.0.OR.
k(
i,1).GT.12)
THEN
76 ELSEIF(iabs(
k(
i,2)).GT.80.AND.iabs(
k(
i,2)).LE.100)
THEN
77 ELSEIF(iabs(
k(
i,2)).GT.100.AND.mod(iabs(
k(
i,2))/10,10).NE.0)
82 IF(im.LE.0.OR.im.GT.
n)
THEN
84 ELSEIF(
k(im,1).LE.0.OR.
k(im,1).GT.20)
THEN
86 ELSEIF(iabs(
k(im,2)).GT.80.AND.iabs(
k(im,2)).LE.100)
THEN
87 ELSEIF(iabs(
k(im,2)).GT.100.AND.mod(iabs(
k(im,2))/10,10).NE.0)
100 npis(ikfis,npco)=npis(ikfis,npco)+1
104 ELSEIF(mtabu.EQ.12)
THEN
106 WRITE(mstu(11),1000) nevis
109 IF(kfmn.EQ.0) kfmn=kfis(
i,2)
111 IF(2*kfm1.EQ.kfmn) kfm1=-kfm1
114 IF(chau(13:13).NE.
' ') chis(1)(12:12)=
'?'
116 IF(kfis(
i,1).EQ.0) kfmx=0
118 IF(2*kfm2.EQ.kfmx) kfm2=-kfm2
121 IF(chau(13:13).NE.
' ') chis(2)(12:12)=
'?'
122 160
WRITE(mstu(11),1100) chis(1),chis(2),fac*npis(
i,0),
123 & (npis(
i,
j)/float(npis(
i,0)),
j=1,10)
126 ELSEIF(mtabu.EQ.13)
THEN
130 IF(kfmn.EQ.0) kfmn=kfis(
i,2)
132 IF(2*kfm1.EQ.kfmn) kfm1=-kfm1
134 IF(kfis(
i,1).EQ.0) kfmx=0
136 IF(2*kfm2.EQ.kfmx) kfm2=-kfm2
144 170
v(
i,
j)=fac*npis(
i,
j+5)
156 ELSEIF(mtabu.EQ.20)
THEN
164 ELSEIF(mtabu.EQ.21)
THEN
168 IF(
k(
i,1).LE.0.OR.
k(
i,1).GT.20.OR.
k(
i,1).EQ.13) goto 230
172 IF(
k(
i,3).LE.0.OR.
k(
i,3).GT.
n)
THEN
174 ELSEIF(
k(
k(
i,3),1).LE.0.OR.
k(
k(
i,3),1).GT.20)
THEN
177 ELSEIF(
k(
k(
i,3),1).EQ.13)
THEN
179 IF(im.LE.0.OR.im.GT.
n)
THEN
181 ELSEIF(
k(im,1).LE.0.OR.
k(im,1).GT.20)
THEN
184 ELSEIF(kchg(kc,2).EQ.0)
THEN
187 IF(kchg(kcm,2).NE.0) mpri=1
190 IF(kc.NE.0.AND.mpri.EQ.1)
THEN
191 IF(kchg(kc,2).EQ.0) nprfs=nprfs+1
193 IF(
k(
i,1).LE.10)
THEN
195 IF(
luchge(
k(
i,2)).NE.0) nchfs=nchfs+1
200 kfs=3-isign(1,
k(
i,2))-mpri
202 IF(kfa.EQ.kffs(ip))
THEN
205 ELSEIF(kfa.LT.kffs(ip))
THEN
211 200
IF(ikffs.LT.0)
THEN
214 IF(nkffs.GE.400)
RETURN
215 DO 210 ip=nkffs,ikffs,-1
218 210 npfs(ip+1,
j)=npfs(ip,
j)
224 npfs(ikffs,kfs)=npfs(ikffs,kfs)+1
228 ELSEIF(mtabu.EQ.22)
THEN
230 WRITE(mstu(11),1200) nevfs,fac*nprfs,fac*nfifs,fac*nchfs
235 IF(kc.NE.0) mdcyf=mdcy(kc,1)
236 240
WRITE(mstu(11),1300) kffs(
i),chau,mdcyf,(fac*npfs(
i,
j),
j=1,4),
237 & fac*(npfs(
i,1)+npfs(
i,2)+npfs(
i,3)+npfs(
i,4))
240 ELSEIF(mtabu.EQ.23)
THEN
247 k(
i,5)=npfs(
i,1)+npfs(
i,2)+npfs(
i,3)+npfs(
i,4)
267 ELSEIF(mtabu.EQ.30)
THEN
274 280 fm2fm(im,ib,ip)=0.
277 ELSEIF(mtabu.EQ.31)
THEN
282 IF(
k(
i,1).LE.0.OR.
k(
i,1).GT.10) goto 360
283 IF(mstu(41).GE.2)
THEN
285 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
287 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(
k(
i,2)).EQ.0)
291 IF(mstu(42).EQ.1.AND.
k(
i,2).NE.22) pmr=
ulmass(211)
292 IF(mstu(42).GE.2) pmr=
p(
i,5)
293 pr=
max(1
e-20,pmr**2+
p(
i,1)**2+
p(
i,2)**2)
294 yeta=
sign(
log(min((sqrt(pr+
p(
i,3)**2)+abs(
p(
i,3)))/sqrt(pr),
296 IF(abs(yeta).GT.paru(57)) goto 360
298 iyeta=512.*(yeta+paru(57))/(2.*paru(57))
299 iyeta=
max(0,min(511,iyeta))
300 iphi=512.*(
phi+paru(1))/paru(2)
301 iphi=
max(0,min(511,iphi))
304 290 iyep=iyep+4**ib*(2*mod(iyeta/2**ib,2)+mod(iphi/2**ib,2))
307 IF(nupp.GT.mstu(4)-5-mstu(32))
THEN
308 CALL
luerrm(11,
'(LUTABU:) no more memory left in LUJETS')
312 IF(nupp.EQ.nlow+1)
THEN
317 DO 300
i1=nupp-1,nlow+1,-1
318 IF(iyeta.GE.
k(
i1,1)) goto 310
321 DO 320
i1=nupp-1,nlow+1,-1
322 IF(iphi.GE.
k(
i1,2)) goto 330
325 DO 340
i1=nupp-1,nlow+1,-1
326 IF(iyep.GE.
k(
i1,3)) goto 350
341 IF(im.LE.2) ibin=2**(10-ib)
342 IF(im.EQ.3) ibin=4**(10-ib)
343 iagr=
k(nlow+1,im)/ibin
345 DO 380
i=nlow+2,nupp+1
347 IF(icut.EQ.iagr)
THEN
351 ELSEIF(nagr.EQ.2)
THEN
352 fevfm(ib,1)=fevfm(ib,1)+2.
353 ELSEIF(nagr.EQ.3)
THEN
354 fevfm(ib,1)=fevfm(ib,1)+6.
355 fevfm(ib,2)=fevfm(ib,2)+6.
356 ELSEIF(nagr.EQ.4)
THEN
357 fevfm(ib,1)=fevfm(ib,1)+12.
358 fevfm(ib,2)=fevfm(ib,2)+24.
359 fevfm(ib,3)=fevfm(ib,3)+24.
361 fevfm(ib,1)=fevfm(ib,1)+nagr*(nagr-1.)
362 fevfm(ib,2)=fevfm(ib,2)+nagr*(nagr-1.)*(nagr-2.)
363 fevfm(ib,3)=fevfm(ib,3)+nagr*(nagr-1.)*(nagr-2.)*(nagr-3.)
364 fevfm(ib,4)=fevfm(ib,4)+nagr*(nagr-1.)*(nagr-2.)*(nagr-3.)*
375 IF(fevfm(1,ip).LT.0.5)
THEN
378 fevfm(ib,ip)=2**((ib-1)*ip)*fevfm(ib,ip)/fevfm(1,ip)
380 fevfm(ib,ip)=4**((ib-1)*ip)*fevfm(ib,ip)/fevfm(1,ip)
382 fm1fm(im,ib,ip)=fm1fm(im,ib,ip)+fevfm(ib,ip)
383 390 fm2fm(im,ib,ip)=fm2fm(im,ib,ip)+fevfm(ib,ip)**2
385 nmufm=nmufm+(nupp-nlow)
389 ELSEIF(mtabu.EQ.32)
THEN
391 IF(mstu(42).LE.0)
WRITE(mstu(11),1400) nevfm,
'eta'
392 IF(mstu(42).EQ.1)
WRITE(mstu(11),1400) nevfm,
'ypi'
393 IF(mstu(42).GE.2)
WRITE(mstu(11),1400) nevfm,
'y '
398 IF(im.NE.2) byeta=byeta/2**(ib-1)
400 IF(im.NE.1) bphi=bphi/2**(ib-1)
401 IF(im.LE.2) bnave=fac*nmufm/float(2**(ib-1))
402 IF(im.EQ.3) bnave=fac*nmufm/float(4**(ib-1))
404 fmoma(ip)=fac*fm1fm(im,ib,ip)
405 410 fmoms(ip)=sqrt(
max(0.,fac*(fac*fm2fm(im,ib,ip)-fmoma(ip)**2)))
406 420
WRITE(mstu(11),1600) byeta,bphi,bnave,(fmoma(ip),fmoms(ip),
410 ELSEIF(mtabu.EQ.33)
THEN
418 IF(im.NE.2)
k(
i,3)=2**(ib-1)
420 IF(im.NE.1)
k(
i,4)=2**(ib-1)
422 p(
i,1)=2.*paru(57)/
k(
i,3)
423 v(
i,1)=paru(2)/
k(
i,4)
425 p(
i,ip+1)=fac*fm1fm(im,ib,ip)
426 430
v(
i,ip+1)=sqrt(
max(0.,fac*(fac*fm2fm(im,ib,ip)-
p(
i,ip+1)**2)))
438 ELSEIF(mtabu.EQ.40)
THEN
449 ELSEIF(mtabu.EQ.41)
THEN
455 IF(
k(
i,1).LE.0.OR.
k(
i,1).GT.10) goto 460
456 IF(mstu(41).GE.2)
THEN
458 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
460 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(
k(
i,2)).EQ.0)
464 IF(mstu(42).EQ.1.AND.
k(
i,2).NE.22) pmr=
ulmass(211)
465 IF(mstu(42).GE.2) pmr=
p(
i,5)
466 IF(nupp.GT.mstu(4)-5-mstu(32))
THEN
467 CALL
luerrm(11,
'(LUTABU:) no more memory left in LUJETS')
474 p(nupp,4)=sqrt(pmr**2+
p(
i,1)**2+
p(
i,2)**2+
p(
i,3)**2)
475 p(nupp,5)=
max(1
e-10,sqrt(
p(
i,1)**2+
p(
i,2)**2+
p(
i,3)**2))
478 IF(nupp.EQ.nlow)
RETURN
481 fac=(2./ecm**2)*50./paru(1)
484 DO 480
i1=nlow+2,nupp
485 DO 480
i2=nlow+1,
i1-1
488 the=acos(
max(-1.,min(1.,cthe)))
489 ithe=
max(1,min(50,1+int(50.*the/paru(1))))
490 480 fevee(ithe)=fevee(ithe)+fac*
p(
i1,4)*
p(
i2,4)
492 fe1ec(
j)=fe1ec(
j)+fevee(
j)
493 fe2ec(
j)=fe2ec(
j)+fevee(
j)**2
494 fe1ec(51-
j)=fe1ec(51-
j)+fevee(51-
j)
495 fe2ec(51-
j)=fe2ec(51-
j)+fevee(51-
j)**2
496 fe1ea(
j)=fe1ea(
j)+(fevee(51-
j)-fevee(
j))
497 490 fe2ea(
j)=fe2ea(
j)+(fevee(51-
j)-fevee(
j))**2
501 ELSEIF(mtabu.EQ.42)
THEN
503 WRITE(mstu(11),1700) nevee
506 fees1=sqrt(
max(0.,fac*(fac*fe2ec(
j)-feec1**2)))
507 feec2=fac*fe1ec(51-
j)
508 fees2=sqrt(
max(0.,fac*(fac*fe2ec(51-
j)-feec2**2)))
510 feesa=sqrt(
max(0.,fac*(fac*fe2ea(
j)-feeca**2)))
511 500
WRITE(mstu(11),1800) 3.6*(
j-1),3.6*
j,feec1,fees1,feec2,fees2,
515 ELSEIF(mtabu.EQ.43)
THEN
524 v(
i,1)=sqrt(
max(0.,fac*(fac*fe2ec(
i)-
p(
i,1)**2)))
525 p(
i,2)=fac*fe1ec(51-
i)
526 v(
i,2)=sqrt(
max(0.,fac*(fac*fe2ec(51-
i)-
p(
i,2)**2)))
528 v(
i,3)=sqrt(
max(0.,fac*(fac*fe2ea(
i)-
p(
i,3)**2)))
529 p(
i,4)=paru(1)*(
i-1)/50.
544 ELSEIF(mtabu.EQ.50)
THEN
550 ELSEIF(mtabu.EQ.51)
THEN
554 IF(
k(
i,1).LE.0.OR.
k(
i,1).GE.6) goto 550
561 IF(
k(
i,2).LT.0) kfm=kfm-1
562 DO 530 ids=nds-1,1,-1
564 IF(kfm.LT.kfdm(ids)) goto 540
565 530 kfdm(ids+1)=kfdm(ids)
572 IF(nds.LT.kfdc(idc,0))
THEN
575 ELSEIF(nds.EQ.kfdc(idc,0))
THEN
577 IF(kfdm(
i).LT.kfdc(idc,
i))
THEN
580 ELSEIF(kfdm(
i).GT.kfdc(idc,
i))
THEN
589 580
IF(ikfdc.LT.0)
THEN
591 ELSEIF(nkfdc.GE.200)
THEN
595 DO 590 idc=nkfdc,ikfdc,-1
596 npdc(idc+1)=npdc(idc)
598 590 kfdc(idc+1,
i)=kfdc(idc,
i)
602 600 kfdc(ikfdc,
i)=kfdm(
i)
605 npdc(ikfdc)=npdc(ikfdc)+1
608 ELSEIF(mtabu.EQ.52)
THEN
610 WRITE(mstu(11),1900) nevdc
612 DO 610
i=1,kfdc(idc,0)
615 IF(2*kf.NE.kfm) kf=-kf
618 610
IF(chau(13:13).NE.
' ') chdc(
i)(12:12)=
'?'
619 620
WRITE(mstu(11),2000) fac*npdc(idc),(chdc(
i),
i=1,kfdc(idc,0))
620 IF(nredc.NE.0)
WRITE(mstu(11),2100) fac*nredc
623 ELSEIF(mtabu.EQ.53)
THEN
634 DO 640
i=1,kfdc(idc,0)
637 IF(2*kf.NE.kfm) kf=-kf
638 IF(
i.LE.5)
p(idc,
i)=kf
639 640
IF(
i.GE.6)
v(idc,
i-5)=kf
640 650
v(idc,5)=fac*npdc(idc)
654 1000
FORMAT(///20
x,
'Event statistics - initial state'/
655 &20
x,
'based on an analysis of ',i6,
' events'//
656 &3
x,
'Main flavours after',8
x,
'Fraction',4
x,
'Subfractions ',
657 &
'according to fragmenting system multiplicity'/
658 &4
x,
'hard interaction',24
x,
'1',7
x,
'2',7
x,
'3',7
x,
'4',7
x,
'5',
659 &6
x,
'6-7',5
x,
'8-10',3
x,
'11-15',3
x,
'16-25',4
x,
'>25'/)
660 1100
FORMAT(3
x,a12,1
x,a12,f10.5,1
x,10f8.4)
661 1200
FORMAT(///20
x,
'Event statistics - final state'/
662 &20
x,
'based on an analysis of ',i6,
' events'//
663 &5
x,
'Mean primary multiplicity =',f8.3/
664 &5
x,
'Mean final multiplicity =',f8.3/
665 &5
x,
'Mean charged multiplicity =',f8.3//
666 &5
x,
'Number of particles produced per event (directly and via ',
667 &
'decays/branchings)'/
668 &5
x,
'KF Particle/jet MDCY',8
x,
'Particles',9
x,
'Antiparticles',
669 &5
x,
'Total'/34
x,
'prim seco prim seco'/)
670 1300
FORMAT(1
x,i6,4
x,a16,
i2,5(1
x,f9.4))
671 1400
FORMAT(///20
x,
'Factorial moments analysis of multiplicity'/
672 &20
x,
'based on an analysis of ',i6,
' events'//
673 &3
x,
'delta-',a3,
' delta-phi <n>/bin',10
x,
'<F2>',18
x,
'<F3>',
674 &18
x,
'<F4>',18
x,
'<F5>'/35
x,4(
' value error '))
676 1600
FORMAT(2
x,2f10.4,f12.4,4(f12.4,f10.4))
677 1700
FORMAT(///20
x,
'Energy-Energy Correlation and Asymmetry'/
678 &20
x,
'based on an analysis of ',i6,
' events'//
679 &2
x,
'theta range',8
x,
'EEC(theta)',8
x,
'EEC(180-theta)',7
x,
680 &
'EECA(theta)'/2
x,
'in degrees ',3(
' value error')/)
681 1800
FORMAT(2
x,f4.1,
' - ',f4.1,3(f11.4,f9.4))
682 1900
FORMAT(///20
x,
'Decay channel analysis - final state'/
683 &20
x,
'based on an analysis of ',i6,
' events'//
684 &2
x,
'Probability',10
x,
'Complete final state'/)
685 2000
FORMAT(2
x,f9.5,5
x,8(a12,1
x))
686 2100
FORMAT(2
x,f9.5,5
x,
'into other channels (more than 8 particles ',
687 &
'or table overflow)')