11 IMPLICIT DOUBLE PRECISION(a-
h, o-
z)
16 common/
pydat1/mstu(200),paru(200),mstj(200),parj(200)
17 common/
pydat2/kchg(500,4),pmas(500,4),parf(2000),vckm(4,4)
18 common/
pydat3/mdcy(500,3),mdme(8000,2),brat(8000),kfdp(8000,5)
19 common/
pysubs/msel,mselpd,msub(500),kfin(2,-40:40),ckin(200)
23 dimension psum(5),pini(6),pfin(6)
43 IF(mtest.GE.1) CALL
pytabu(20)
62 IF(iev.EQ.301.OR.iev.EQ.351.OR.iev.EQ.401) mstj(116)=3
68 IF(ity.EQ.3.OR.ity.EQ.4) mstj(11)=2
69 IF(ity.EQ.1) CALL
py1ent(1,1,15d0,0d0,0d0)
70 IF(ity.EQ.2) CALL
py1ent(1,3101,15d0,0d0,0d0)
71 IF(ity.EQ.3) CALL
py1ent(1,-2203,15d0,0d0,0d0)
72 IF(ity.EQ.4) CALL
py1ent(1,-4,30d0,0d0,0d0)
73 IF(ity.EQ.5) CALL
py1ent(1,21,15d0,0d0,0d0)
76 ELSEIF(iev.LE.130)
THEN
78 IF(ity.EQ.1) CALL
py2ent(1,1,-1,40d0)
79 IF(ity.EQ.2) CALL
py2ent(1,4,-4,30d0)
80 IF(ity.EQ.3) CALL
py2ent(1,2,2103,100d0)
81 IF(ity.EQ.4) CALL
py2ent(1,21,21,40d0)
82 IF(ity.EQ.5) CALL
py3ent(1,2101,21,-3203,30d0,0.6d0,0.8d0)
83 IF(ity.EQ.6) CALL
py3ent(1,5,21,-5,40d0,0.9d0,0.8d0)
84 IF(ity.EQ.7) CALL
py3ent(1,21,21,21,60d0,0.7d0,0.5d0)
85 IF(ity.EQ.8) CALL
py4ent(1,2,21,21,-2,40d0,
86 & 0.4d0,0.64d0,0.6d0,0.12d0,0.2d0)
89 ELSEIF(iev.LE.200)
THEN
91 mstj(2)=1+mod(iev-131,4)
92 mstj(3)=1+mod((iev-131)/4,4)
93 IF(ity.EQ.1) CALL
py2ent(1,4,-5,40d0)
94 IF(ity.EQ.2) CALL
py3ent(1,3,21,-3,40d0,0.9d0,0.4d0)
95 IF(ity.EQ.3) CALL
py4ent(1,2,21,21,-2,40d0,
96 & 0.4d0,0.64d0,0.6d0,0.12d0,0.2d0)
97 IF(ity.GE.4) CALL
py4ent(1,2,-3,3,-2,40d0,
98 & 0.4d0,0.64d0,0.6d0,0.12d0,0.2d0)
101 ELSEIF(iev.LE.300)
THEN
108 IF(
i.EQ.1) kfl=int(1d0+4d0*
pyr(0))
109 IF(
i.EQ.njet) kfl=-int(1d0+4d0*
pyr(0))
111 theta=acos(2d0*
pyr(0)-1d0)
115 IF(
i.EQ.1.OR.
i.EQ.njet) mstj(93)=1
116 IF(
i.EQ.1.OR.
i.EQ.njet) psum(5)=psum(5)+
pymass(kfl)
118 psum(
j)=psum(
j)+
p(
i,
j)
121 IF(psum(4)**2-psum(1)**2-psum(2)**2-psum(3)**2.LT.
122 & (psum(5)+parj(32))**2) goto 100
125 ELSEIF(iev.LE.350)
THEN
130 ELSEIF(iev.LE.400)
THEN
131 mstj(42)=1+mod(iev,2)
132 mstj(43)=1+mod(iev/2,4)
133 mstj(44)=mod(iev/8,3)
137 ELSEIF(iev.LE.450)
THEN
160 IF((pfin(1)-pini(1))**2+(pfin(2)-pini(2))**2.GE.10d0)
162 epzrem=pini(4)+pini(3)-pfin(4)-pfin(3)
163 IF(epzrem.LT.0d0.OR.epzrem.GT.2d0*parj(31)) merr=merr+1
164 IF(abs(pfin(6)-pini(6)).GT.2.1d0) merr=merr+1
167 IF(abs(pfin(
j)-pini(
j)).GT.0.0001d0*pini(4)) merr=merr+1
169 IF(abs(pfin(6)-pini(6)).GT.0.1d0) merr=merr+1
171 IF(merr.NE.0)
WRITE(mstu(11),5000) (pini(
j),
j=1,4),pini(6),
172 & (pfin(
j),
j=1,4),pfin(6)
177 IF(
k(
i,1).GT.20) goto 170
179 WRITE(mstu(11),5100)
i
182 pd=
p(
i,4)**2-
p(
i,1)**2-
p(
i,2)**2-
p(
i,3)**2-
p(
i,5)**2
183 IF(abs(pd).GT.
max(0.1d0,0.001d0*
p(
i,4)**2).OR.
p(
i,4).LT.0d0)
185 WRITE(mstu(11),5200)
i
189 IF(mtest.GE.1) CALL
pytabu(21)
192 IF(merr.NE.0.OR.mstu(24).NE.0.OR.mstu(28).NE.0)
THEN
193 IF(merr.GE.1)
WRITE(mstu(11),6400)
195 ELSEIF(mtest.GE.1.AND.mod(iev-5,100).EQ.0)
THEN
200 IF(merr.NE.0) nerr=nerr+1
209 IF(mtest.GE.1) CALL
pytabu(22)
258 CALL
pyinit(
'FIXT',
'pi+',
'p',pzsum)
261 ELSEIF(iproc.EQ.2)
THEN
267 CALL
pyinit(
'CMS',
'p',
'p',pesum)
270 ELSEIF(iproc.EQ.3)
THEN
279 CALL
pyinit(
'CMS',
'p',
'pbar',pesum)
282 ELSEIF(iproc.EQ.4)
THEN
294 CALL
pyinit(
'CMS',
'p',
'pbar',pesum)
297 ELSEIF(iproc.EQ.5)
THEN
309 CALL
pyinit(
'CMS',
'p',
'p',pesum)
312 ELSEIF(iproc.EQ.6)
THEN
321 CALL
pyinit(
'CMS',
'p',
'p',pesum)
324 ELSEIF(iproc.EQ.7)
THEN
331 CALL
pyinit(
'CMS',
'e+',
'e-',pesum)
334 ELSEIF(iproc.EQ.8)
THEN
347 CALL
pyinit(
'3MOM',
'p',
'e-',pesum)
354 IF(iproc.EQ.4) pesumm=
msti(41)*pesum
367 deve=abs(pfin(4)-pini(4))+abs(pfin(3)-pini(3))
368 devt=abs(pfin(1)-pini(1))+abs(pfin(2)-pini(2))
369 devq=abs(pfin(6)-pini(6))
370 IF(deve.GT.2d-3*pesum.OR.devt.GT.
max(0.01d0,1d-4*pesum).OR.
371 & devq.GT.0.1d0) merr=1
372 IF(merr.NE.0)
WRITE(mstu(11),5000) (pini(
j),
j=1,4),pini(6),
373 & (pfin(
j),
j=1,4),pfin(6)
378 IF(
k(
i,1).GT.20) goto 210
380 WRITE(mstu(11),5100)
i
383 pd=
p(
i,4)**2-
p(
i,1)**2-
p(
i,2)**2-
p(
i,3)**2-
p(
i,5)**2*
385 IF(abs(pd).GT.
max(0.1d0,0.002d0*
p(
i,4)**2,0.002d0*
p(
i,5)**2)
386 & .OR.(
p(
i,5).GE.0d0.AND.
p(
i,4).LT.0d0))
THEN
387 WRITE(mstu(11),5200)
i
393 IF(merr.GE.1) nerr=nerr+1
399 IF(mtest.GE.1.AND.(merr.GE.1.OR.iev.EQ.1))
THEN
400 IF(merr.GE.1)
WRITE(mstu(11),6400)
406 IF(mtest.GE.1) CALL
pystat(1)
410 IF(nerr.EQ.0)
WRITE(mstu(11),6500)
411 IF(nerr.GT.0)
WRITE(mstu(11),6600) nerr
414 5000
FORMAT(/
' Momentum, energy and/or charge were not conserved ',
415 &
'in following event'/
' sum of',9
x,
'px',11
x,
'py',11
x,
'pz',11
x,
416 &
'E',8
x,
'charge'/
' before',2
x,4(1
x,f12.5),1
x,f8.2/
' after',3
x,
417 &4(1
x,f12.5),1
x,f8.2)
418 5100
FORMAT(/5
x,
'Entry no.',
i4,
' in following event not known code')
419 5200
FORMAT(/5
x,
'Entry no.',
i4,
' in following event has faulty ',
421 6300
FORMAT(/5
x,
'This is the tenth error experienced! Something is ',
422 &
'wrong.'/5
x,
'Execution will be stopped after listing of event.')
423 6400
FORMAT(5
x,
'Faulty event follows:')
424 6500
FORMAT(//5
x,
'End result of PYTEST: no errors detected.')
425 6600
FORMAT(//5
x,
'End result of PYTEST:',
i2,
' errors detected.'/
426 &5
x,
'This should not have happened!')