13 SUBROUTINE pyptfs(MODE,PTMAX,PTMIN,PTGEN)
16 IMPLICIT DOUBLE PRECISION(a-
h, o-
z)
20 parameter(ksusy1=1000000,ksusy2=2000000,ktechn=3000000,
21 &kexcit=4000000,kdimen=5000000)
23 parameter(maxnur=1000)
25 common/pypart/
npart,npartd,ipart(maxnur),ptpart(maxnur)
27 common/pyctag/nct,mct(4000,2)
28 common/
pydat1/mstu(200),paru(200),mstj(200),parj(200)
29 common/
pydat2/kchg(500,4),pmas(500,4),parf(2000),vckm(4,4)
35 dimension ipos(2*maxnur),irec(2*maxnur),iflg(2*maxnur),
36 &iscol(2*maxnur),ischg(2*maxnur),ptsca(2*maxnur),imesav(2*maxnur),
37 &pt2sav(2*maxnur),zsav(2*maxnur),shtsav(2*maxnur),
38 &mesys(maxnur,0:2),psum(5),dpt(5,4)
40 shat(
i,
j)=(
p(
i,4)+
p(
j,4))**2-(
p(
i,1)+
p(
j,1))**2-
41 &(
p(
i,2)+
p(
j,2))**2-(
p(
i,3)+
p(
j,3))**2
45 IF(mstj(41).NE.1.AND.mstj(41).NE.2.AND.mstj(41).NE.11.AND.
46 &mstj(41).NE.12)
RETURN
48 CALL
pyerrm(2,
'(PYPTFS:) showering system too small')
57 alam4=alam5*(pmb/alam5)**(2d0/25d0)
58 alam3=alam4*(pmc/alam4)**(2d0/27d0)
66 nflav=
max(0,min(5,mstj(45)))
68 pt2cmn=
max(ptmin,pt0c,1.1d0*alam3)**2
71 aem2pi=paru(101)/paru(2)
81 IF(
k(
i,2).GT.0.AND.
k(
i,2).LT.6)
THEN
85 IF(
k(
i,2).LT.0.AND.
k(
i,2).GT.-6)
THEN
95 IF(mode.NE.1.OR.
i.GT.npartd)
THEN
96 IF(
k(
i,1).GT.10) goto 210
97 ELSEIF(
k(
i,3).GT.
mint(84))
THEN
98 IF(
k(
i,3).GT.
mint(84)+2) goto 210
100 IF(
k(
k(
i,3),3).GT.
mint(83)+6) goto 210
103 psum(
j)=psum(
j)+
p(
i,
j)
107 IF(iabs(
k(
i,2)).GT.1000.AND.iabs(
k(
i,2)).LT.10000) goto 210
112 DO 160 jsgcol=1,-1,-2
113 IF(kcol.EQ.jsgcol.OR.kcol.EQ.2)
THEN
123 ptsca(nevol)=ptpart(ip)
129 irnew=
k(irold,jcol)/mstu(5)
144 130
IF(irnew.EQ.0)
THEN
149 ELSEIF(
mstp(72).LE.1.AND.irnew.GT.
mint(53))
THEN
154 ELSEIF(
k(irnew,2).EQ.88)
THEN
159 ELSEIF(mode.EQ.1.AND.irnew.GT.
mint(84)+2.AND.
160 & irnew.LE.npartd)
THEN
163 ELSEIF(move.EQ.1.AND.
k(irnew,jcolr)/mstu(5).EQ.irold)
165 IF(
k(irnew,1).LT.10)
THEN
170 irnew=mod(
k(irnew,jcolr),mstu(5))
176 ELSEIF(move.EQ.1.AND.mod(
k(irnew,jcol),mstu(5)).EQ.
179 irnew=
k(irold,jcol)/mstu(5)
183 ELSEIF(move.EQ.2.AND.
k(irnew,jcolr)/mstu(5).EQ.irold)
185 IF(
k(irnew,1).LT.10)
THEN
190 irnew=mod(
k(irnew,jcolr),mstu(5))
196 ELSEIF(move.EQ.2.AND.mod(
k(irnew,jcol),mstu(5)).EQ.
198 IF(
k(irnew,1).LT.10)
THEN
201 irnew=
k(irnew,jcol)/mstu(5)
210 irnew=
k(irold,jcol)/mstu(5)
211 140
IF(
k(irnew,jcolr)/mstu(5).NE.irold)
THEN
213 IF(
k(irnew,2).EQ.
k(irold,2))
THEN
215 irnew=
k(irold,jcol)/mstu(5)
219 IF(irold.GT.1.AND.
k(irold-1,3).EQ.
k(irold,3))
THEN
221 ELSEIF(irold.LT.
n.AND.
k(irold+1,3).EQ.
k(irold,3))
227 irnew=ipart(1+mod(ip+istep-1,
npart))
232 150
IF(
k(irnew,1).GT.10)
THEN
233 irnew=mod(
k(irnew,jcolr),mstu(5))
244 IF((mstj(41).EQ.2.OR.mstj(41).EQ.12).AND.kcha.NE.0.AND.
245 & iabs(
k(
i,2)).LE.18)
THEN
253 ptsca(nevol)=ptpart(ip)
261 IF(ip2.EQ.ip) goto 170
262 IF(ip2.LE.
npart)
THEN
264 IF(mode.NE.1.OR.
i2.GT.npartd)
THEN
265 IF(
k(
i2,1).GT.10) goto 170
266 ELSEIF(
k(
i2,3).GT.
mint(84))
THEN
267 IF(
k(
i2,3).GT.
mint(84)+2) goto 170
269 IF(
k(
k(
i2,3),3).GT.
mint(83)+6) goto 170
274 IF(kchg(
pycomp(
k(
i2,2)),1).EQ.0) goto 170
275 pm2inv=(
p(
i,4)+
p(
i2,4))**2-(
p(
i,1)+
p(
i2,1))**2-
277 IF(pm2inv.LT.pm2min)
THEN
291 180
IF(
k(irold,3).GT.0.AND.
k(
k(irold,3),2).EQ.
k(irold,2))
THEN
295 IF(irold.GT.1.AND.
k(irold-1,3).EQ.
k(irold,3))
THEN
297 ELSEIF(irold.LT.
n.AND.
k(irold+1,3).EQ.
k(irold,3))
THEN
302 irnew=ipart(1+mod(ip+istep-1,
npart))
305 190
IF(
k(irnew,1).GT.10)
THEN
307 IF(
k(ir,3).EQ.irnew.AND.
k(ir,2).EQ.
k(irnew,2))
THEN
319 IF(nevol.LE.0)
RETURN
320 psum(5)=sqrt(
max(0d0,psum(4)**2-psum(1)**2-psum(2)**2-psum(3)**2))
326 IF(mstj(47).GE.1)
THEN
332 220
IF(ipart1.EQ.ipart2.AND.ipart1.GT.0)
THEN
333 kfsrce=iabs(
k(ipart1,2))
334 ELSEIF(ipart1.GT.ipart2.AND.ipart2.GT.0)
THEN
337 ELSEIF(ipart2.GT.ipart1.AND.ipart1.GT.0)
THEN
342 IF(kfsrce.GE.1.AND.kfsrce.LE.8) itypes=1
343 IF(kfsrce.GE.ksusy1+1.AND.kfsrce.LE.ksusy1+8) itypes=2
344 IF(kfsrce.GE.ksusy2+1.AND.kfsrce.LE.ksusy2+8) itypes=2
345 IF(kfsrce.GE.21.AND.kfsrce.LE.24) itypes=3
346 IF(kfsrce.GE.32.AND.kfsrce.LE.34) itypes=3
347 IF(kfsrce.EQ.25.OR.(kfsrce.GE.35.AND.kfsrce.LE.37)) itypes=4
348 IF(kfsrce.GE.ksusy1+22.AND.kfsrce.LE.ksusy1+37) itypes=5
349 IF(kfsrce.EQ.ksusy1+21) itypes=6
352 kfla1=iabs(
k(ipart(1),2))
354 IF(kfla1.GE.1.AND.kfla1.LE.8) itype1=1
355 IF(kfla1.GE.ksusy1+1.AND.kfla1.LE.ksusy1+8) itype1=2
356 IF(kfla1.GE.ksusy2+1.AND.kfla1.LE.ksusy2+8) itype1=2
357 IF(kfla1.GE.21.AND.kfla1.LE.24) itype1=3
358 IF(kfla1.GE.32.AND.kfla1.LE.34) itype1=3
359 IF(kfla1.EQ.25.OR.(kfla1.GE.35.AND.kfla1.LE.37)) itype1=4
360 IF(kfla1.GE.ksusy1+22.AND.kfla1.LE.ksusy1+37) itype1=5
361 IF(kfla1.EQ.ksusy1+21) itype1=6
362 kfla2=iabs(
k(ipart(2),2))
364 IF(kfla2.GE.1.AND.kfla2.LE.8) itype2=1
365 IF(kfla2.GE.ksusy1+1.AND.kfla2.LE.ksusy1+8) itype2=2
366 IF(kfla2.GE.ksusy2+1.AND.kfla2.LE.ksusy2+8) itype2=2
367 IF(kfla2.GE.21.AND.kfla2.LE.24) itype2=3
368 IF(kfla2.GE.32.AND.kfla2.LE.34) itype2=3
369 IF(kfla2.EQ.25.OR.(kfla2.GE.35.AND.kfla2.LE.37)) itype2=4
370 IF(kfla2.GE.ksusy1+22.AND.kfla2.LE.ksusy1+37) itype2=5
371 IF(kfla2.EQ.ksusy1+21) itype2=6
374 itypmn=min(itype1,itype2)
375 itypmx=
max(itype1,itype2)
377 IF(itype1.GT.itype2) iord=2
379 IF(itype1.EQ.6.OR.itype2.EQ.6) iglui=1
384 IF(
k(
i,3).EQ.ipart1.AND.
k(
i,2).NE.
k(ipart1,2)) nprim=nprim+1
389 ELSEIF(mstj(38).NE.0)
THEN
393 ELSEIF(mstj(47).GE.6)
THEN
400 IF(itypmn.EQ.1.AND.itypmx.EQ.1.AND.(itypes.EQ.0.OR.
403 IF(kfsrce.EQ.21.OR.kfsrce.EQ.22)
THEN
405 ELSEIF(kfsrce.EQ.23.OR.(kfsrce.EQ.0.AND.
406 &
k(ipart(1),2)+
k(ipart(2),2).EQ.0))
THEN
409 IF(kfsrce.EQ.23)
THEN
411 IF(
k(iannfl,2).EQ.23) iannfl=
k(iannfl,3)
413 IF(
k(iannfl,2).EQ.23) iannfl=
k(iannfl,3)
416 kannfl=iabs(
k(iannfl,2))
417 IF(kannfl.GE.1.AND.kannfl.LE.18)
ei=kchg(kannfl,1)/3d0
421 vi=ai-4d0*
ei*paru(102)
423 af=
sign(1d0,ef+0.1d0)
424 vf=af-4d0*ef*paru(102)
425 xwc=1d0/(16d0*paru(102)*(1d0-paru(102)))
428 sqwz=psum(5)*pmas(23,2)
429 sbwz=1d0/((sh-sqmz)**2+sqwz**2)
430 vect=
ei**2*ef**2+2d0*
ei*vi*ef*vf*xwc*sh*(sh-sqmz)*sbwz+
431 & (vi**2+ai**2)*vf**2*xwc**2*sh**2*sbwz
432 axiv=(vi**2+ai**2)*af**2*xwc**2*sh**2*sbwz
434 alpha=vect/(vect+axiv)
435 ELSEIF(kfsrce.EQ.24.OR.kfsrce.EQ.0)
THEN
439 ELSEIF(itypmn.EQ.1.AND.itypmx.EQ.1.AND.itypes.EQ.5)
THEN
441 ELSEIF(itypmn.EQ.1.AND.itypmx.EQ.3.AND.(itypes.EQ.0.OR.
446 ELSEIF(itypmn.EQ.1.AND.itypmx.EQ.1.AND.itypes.EQ.4)
THEN
448 IF(kfsrce.EQ.25.OR.kfsrce.EQ.35.OR.kfsrce.EQ.37)
THEN
450 ELSEIF(kfsrce.EQ.36)
THEN
453 ELSEIF(itypmn.EQ.1.AND.itypmx.EQ.4.AND.(itypes.EQ.0.OR.
458 ELSEIF(itypmn.EQ.2.AND.itypmx.EQ.2.AND.(itypes.EQ.0.OR.
461 ELSEIF(itypmn.EQ.2.AND.itypmx.EQ.3.AND.(itypes.EQ.0.OR.
464 ELSEIF(itypmn.EQ.2.AND.itypmx.EQ.2.AND.itypes.EQ.4)
THEN
466 ELSEIF(itypmn.EQ.2.AND.itypmx.EQ.4.AND.(itypes.EQ.0.OR.
471 ELSEIF(itypmn.EQ.1.AND.itypmx.EQ.2.AND.(itypes.EQ.0.OR.
474 ELSEIF(itypmn.EQ.1.AND.itypmx.EQ.5.AND.(itypes.EQ.0.OR.
477 ELSEIF(itypmn.EQ.2.AND.itypmx.EQ.5.AND.(itypes.EQ.0.OR.
482 ELSEIF(itypmn.EQ.1.AND.itypmx.EQ.2.AND.itypes.EQ.6)
THEN
484 ELSEIF(itypmn.EQ.1.AND.itypmx.EQ.6.AND.(itypes.EQ.0.OR.
487 ELSEIF(itypmn.EQ.2.AND.itypmx.EQ.6.AND.(itypes.EQ.0.OR.
492 ELSEIF(itypmn.EQ.6.AND.itypmx.EQ.6.AND.itypes.EQ.0)
THEN
502 mesys(nmesys,1)=ipart(1)
503 mesys(nmesys,2)=ipart(2)
507 IF(kfla1.LE.18.AND.kfla2.LE.18)
THEN
510 IF(
k(ipart(1),2)+
k(ipart(2),2).EQ.0) mesys(nmesys,0)=102
511 mesys(nmesys,1)=ipart(1)
512 mesys(nmesys,2)=ipart(2)
517 IF(
k(
i1,1).GT.10.OR.iabs(
k(
i1,2)).GT.18) goto 270
519 240
IF(i1m.GT.0.AND.
k(i1m,2).EQ.
k(
i1,2))
THEN
524 IF(i1m.EQ.0) goto 270
525 IF(
k(i1m,2).NE.21.AND.
k(i1m,2).NE.22) goto 270
527 IF(
k(
i2,1).GT.10.OR.
k(
i2,2)+
k(
i1,2).NE.0) goto 260
529 250
IF(i2m.GT.0.AND.
k(i2m,2).EQ.
k(
i2,2))
THEN
533 IF(i1m.EQ.i2m.AND.i1m.GT.0)
THEN
555 IF(iflg(ievol).EQ.0)
THEN
565 shtcor=(sqrt(sht)-
p(ir,5))**2-pm2i
566 pt2=min(pt2cmx,0.25d0*shtcor,ptsca(ievol)**2)
569 IF(iscol(ievol).NE.0)
THEN
572 IF(
mstp(72).EQ.0)
THEN
574 IF(ir.EQ.ipart(iprt))
pt2=min(
pt2,ptpart(iprt)**2)
579 IF(
pt2.LT.pt2cmn)
THEN
587 IF((
i.EQ.mesys(ime,1).OR.
i.EQ.mesys(ime,2)).AND.
588 & mesys(ime,0).LT.100) imesys=ime
593 IF(
k(
i,2).EQ.21) moct=1
594 IF(
k(
i,2).EQ.ksusy1+21) moct=2
600 IF(moct.GE.1) colfac=3d0/2d0
601 IF(iglui.EQ.1.AND.imesys.EQ.1.AND.moct.EQ.0) colfac=3d0
602 wtpsqq=0.5d0*0.5d0*nflav
609 IF(
pt2.GT.1.01d0*pmcs)
THEN
615 IF(
pt2.GT.1.01d0*pmbs)
THEN
621 zmncut=0.5d0-sqrt(
max(0d0,0.25d0-pt2mne/shtcor))
622 IF(zmncut.LT.1d-8) zmncut=pt2mne/shtcor
625 evemgl=wtpsgl*colfac*
log(1d0/zmncut-1d0)/b0
628 evemqq=wtpsqq*(1d0-2d0*zmncut)/b0
633 330
pt2=alams*(
pt2/alams)**(
pyr(0)**(1d0/evcoef))
636 IF(izrg.EQ.3.AND.
pt2.LT.pmbs)
THEN
640 IF(izrg.EQ.2.AND.
pt2.LT.pmcs)
THEN
646 IF(
pt2.LT.pt2cmn)
THEN
653 IF(moct.EQ.1.AND.evemgl.LT.
pyr(0)*evcoef) iflag=2
657 z=1d0-zmncut*(1d0/zmncut-1d0)**
pyr(0)
659 z=zmncut+
pyr(0)*(1d0-2d0*zmncut)
663 zmnnow=0.5d0-sqrt(
max(0d0,0.25d0-
pt2/shtcor))
664 IF(zmnnow.LT.1d-8) zmnnow=
pt2/shtcor
665 IF(
z.LE.zmnnow.OR.
z.GE.1d0-zmnnow) goto 330
666 pm2=pm2i+
pt2/(
z*(1d0-
z))
667 IF(
z*(1d0-
z).LE.pm2*sht/(sht+pm2-pm2r)**2) goto 330
673 ELSEIF(iflag.EQ.1.AND.moct.NE.1)
THEN
674 IF(1d0+
z**2.LT.wtpsgl*
pyr(0)) goto 330
677 ELSEIF(iflag.EQ.1)
THEN
678 IF(1d0+
z**3.LT.wtpsgl*
pyr(0)) goto 330
682 kfq=min(5,1+int(nflav*
pyr(0)))
684 rootqq=sqrt(
max(0d0,1d0-4d0*pmq**2/pm2))
685 wtme=rootqq*(
z**2+(1d0-
z)**2)
686 IF(wtme.LT.
pyr(0)) goto 330
691 ELSEIF(ischg(ievol).NE.0)
THEN
695 IF(iabs(
k(
i,2)).GT.10) pt2emn=pt0el**2
696 IF(
pt2.LT.pt2emn)
THEN
704 IF((
i.EQ.mesys(ime,1).OR.
i.EQ.mesys(ime,2)).AND.
705 & mesys(ime,0).GT.100) imesys=ime
713 zmncut=0.5d0-sqrt(
max(0d0,0.25d0-pt2emn/shtcor))
714 IF(zmncut.LT.1d-8) zmncut=pt2emn/shtcor
715 evcoef=aem2pi*chg**2*wtpsga*
log(1d0/zmncut-1d0)
721 IF(
pt2.LT.pt2emn)
THEN
727 z=1d0-zmncut*(1d0/zmncut-1d0)**
pyr(0)
730 zmnnow=0.5d0-sqrt(
max(0d0,0.25d0-
pt2/shtcor))
731 IF(zmnnow.LT.1d-8) zmnnow=
pt2/shtcor
732 IF(
z.LE.zmnnow.OR.
z.GE.1d0-zmnnow) goto 350
733 pm2=pm2i+
pt2/(
z*(1d0-
z))
734 IF(
z*(1d0-
z).LE.pm2*sht/(sht+pm2-pm2r)**2) goto 350
738 IF(1d0+
z**2.LT.wtpsga*
pyr(0)) goto 350
752 IF(iflg(ievol).GE.1.AND.pt2sav(ievol).GT.pt2mx)
THEN
759 IF(imx.EQ.0) goto 480
772 pm2=pm2i+
pt2/(
z*(1d0-
z))
776 IF(
k(
i,2).EQ.21) moct=1
777 IF(
k(
i,2).EQ.ksusy1+21) moct=2
781 IF(iflg(imx).GT.10)
THEN
784 rootqq=sqrt(
max(0d0,1d0-4d0*pmq**2/pm2))
789 IF(moct.EQ.1.AND.mod(mstj(46),2).EQ.1)
THEN
793 370
IF(
k(im,3).NE.
k(im-1,3).AND.
k(im,3).NE.
k(im+1,3).AND.
796 IF(im.GT.
mint(84)) goto 370
799 IF(igm.GT.
mint(84).AND.igm.LT.im.AND.im.LE.
i)
800 & kfgm=iabs(
k(igm,2))
803 IF(iau.GT.
n-3.OR.
k(iau,3).NE.igm) iau=im-1
804 IF(kfgm.NE.0.AND.(kfgm.LE.6.OR.kfgm.EQ.21))
THEN
805 zold=
p(im,4)/(
p(im,4)+
p(iau,4))
808 asypol=2d0*(1d0-zold)/(1d0+(1d0-zold)**2)
810 asypol=((1d0-zold)/(1d0-zold*(1d0-zold)))**2
814 asypol=asypol*(
z*(1d0-
z)/(1d0-
z*(1d0-
z)))**2
816 asypol=-asypol*2d0*
z*(1d0-
z)/(1d0-2d0*
z*(1d0-
z))
830 IF(kcha.NE.0)
k(ignew,1)=1
835 IF(kcha.NE.0)
k(ignew,2)=22
837 k(inew,2)=-isign(kfq,kcol)
838 k(ignew,2)=-
k(inew,2)
851 betax=(
p(inew,1)+
p(irnew,1))/(
p(inew,4)+
p(irnew,4))
852 betay=(
p(inew,2)+
p(irnew,2))/(
p(inew,4)+
p(irnew,4))
853 betaz=(
p(inew,3)+
p(irnew,3))/(
p(inew,4)+
p(irnew,4))
854 CALL
pyrobo(inew,irnew,0d0,0d0,-betax,-betay,-betaz)
856 theta=
pyangl(
p(inew,3),sqrt(
p(inew,1)**2+
p(inew,2)**2))
863 pem=0.5d0*(sht+pm2-pm2r)/sqrt(sht)
864 pzm=0.5d0*sqrt(
max(0d0,(sht-pm2-pm2r)**2-4d0*pm2*pm2r)/sht)
865 pt2cor=pm2*(pem**2*
z*(1d0-
z)-0.25d0*pm2)/pzm**2
866 ptcor=sqrt(
max(0d0,pt2cor))
867 pzn=(pem**2*
z-0.5d0*pm2)/pzm
868 pzg=(pem**2*(1d0-
z)-0.5d0*pm2)/pzm
871 ptcor=(1d0-pm2i/pm2)*ptcor
873 pzg=(1d0-pm2i/pm2)*pzg
875 ELSEIF(kfq.NE.0)
THEN
879 pzn=0.5d0*((1d0+rootqq)*pzn+(1d0-rootqq)*pzg)
884 400 phirot=paru(2)*
pyr(0)
885 p(inew,1)=ptcor*cos(phirot)
886 p(inew,2)=ptcor*sin(phirot)
888 p(inew,4)=sqrt(ptcor**2+
p(inew,3)**2+
p(inew,5)**2)
889 p(ignew,1)=-
p(inew,1)
890 p(ignew,2)=-
p(inew,2)
892 p(ignew,4)=sqrt(ptcor**2+
p(ignew,3)**2+
p(ignew,5)**2)
896 p(irnew,4)=0.5d0*(sht+pm2r-pm2)/sqrt(sht)
899 CALL
pyrobo(inew,irnew,theta,
phi,betax,betay,betaz)
902 IF(abs(asypol).GT.1d-3)
THEN
908 dpma=dpt(1,1)*dpt(2,1)+dpt(1,2)*dpt(2,2)+dpt(1,3)*dpt(2,3)
909 dpmd=dpt(1,1)*dpt(3,1)+dpt(1,2)*dpt(3,2)+dpt(1,3)*dpt(3,3)
910 dpmm=dpt(1,1)**2+dpt(1,2)**2+dpt(1,3)**2
912 dpt(4,
j)=dpt(2,
j)-dpma*dpt(1,
j)/
max(1d-10,dpmm)
913 dpt(5,
j)=dpt(3,
j)-dpmd*dpt(1,
j)/
max(1d-10,dpmm)
915 dpt(4,4)=sqrt(dpt(4,1)**2+dpt(4,2)**2+dpt(4,3)**2)
916 dpt(5,4)=sqrt(dpt(5,1)**2+dpt(5,2)**2+dpt(5,3)**2)
917 IF(min(dpt(4,4),dpt(5,4)).GT.0.1d0*parj(82))
THEN
918 cad=(dpt(4,1)*dpt(5,1)+dpt(4,2)*dpt(5,2)+
919 & dpt(4,3)*dpt(5,3))/(dpt(4,4)*dpt(5,4))
920 IF(1d0+asypol*(2d0*cad**2-1d0).LT.
pyr(0)*(1d0+abs(asypol)))
931 IF(irp.EQ.
i) irp=mesys(imesys,2)
932 IF(irp.EQ.ir) irp=irnew
934 psum(
j)=
p(inew,
j)+
p(irp,
j)+
p(ignew,
j)
936 psum(5)=sqrt(
max(0d0,psum(4)**2-psum(1)**2-psum(2)**2-
938 x1=2d0*(psum(4)*
p(inew,4)-psum(1)*
p(inew,1)-psum(2)*
p(inew,2)-
939 & psum(3)*
p(inew,3))/psum(5)**2
940 x2=2d0*(psum(4)*
p(irp,4)-psum(1)*
p(irp,1)-psum(2)*
p(irp,2)-
941 & psum(3)*
p(irp,3))/psum(5)**2
943 r1me=
p(inew,5)/psum(5)
944 r2me=
p(irp,5)/psum(5)
950 IF(mesys(imesys,iord).EQ.
i)
THEN
958 IF((m3jc.GE.16.AND.m3jc.LE.19).OR.(m3jc.GE.26.AND.m3jc.LE.29)
959 & .OR.(m3jc.GE.36.AND.m3jc.LE.39).OR.(m3jc.GE.46.AND.m3jc.LE.49)
960 & .OR.(m3jc.GE.56.AND.m3jc.LE.64)) isprad=0
961 IF(isprad.EQ.1) wme=wme*
max(1d-10,1d0+r1me**2-r2me**2-x1)/
962 &
max(1d-10,2d0-x1-x2)
965 wps=2d0/(
max(1d-10,2d0-x1-x2)*
966 &
max(1d-10,1d0+r2me**2-r1me**2-x2))
967 IF(iglui.EQ.1) wps=(9d0/4d0)*wps
974 chg1=kchg(
pycomp(
k(
i,2)),1)*isign(1,
k(
i,2))/3d0
975 chg2=kchg(
pycomp(
k(irp,2)),1)*isign(1,
k(irp,2))/3d0
976 wme=(chg1*(1d0-x1)/x3-chg2*(1d0-x2)/x3)**2*(x1**2+x2**2)
977 wps=2d0*(chg1**2*(1d0-x1)/x3+chg2**2*(1d0-x2)/x3)
981 wme=
pymael(11,x1,x2,r1me,r2me,0d0)*
max(1d-10,
982 & 1d0+r1me**2-r2me**2-x1)/
max(1d-10,2d0-x1-x2)
983 wps=2d0/(
max(1d-10,2d0-x1-x2)*
984 &
max(1d-10,1d0+r2me**2-r1me**2-x2))
989 IF(wme.LT.
pyr(0)*wps)
THEN
1005 IF(ipart(ip).EQ.
i) ipart(ip)=inew
1006 IF(ipart(ip).EQ.ir) ipart(ip)=irnew
1029 IF(iabs(kcha).EQ.3)
THEN
1032 ELSEIF(kcha.NE.0)
THEN
1033 IF(
k(
i,4).NE.0)
THEN
1036 mct(inew,1)=mct(
i,1)
1038 IF(
k(
i,5).NE.0)
THEN
1041 mct(inew,2)=mct(
i,2)
1045 ELSEIF(kfq.EQ.0)
THEN
1046 k(
i,jcolp)=
k(
i,jcolp)+ignew
1047 k(ignew,jcolp)=mstu(5)*
i
1048 k(inew,jcolp)=mstu(5)*ignew
1049 k(ignew,jcoln)=mstu(5)*inew
1050 mct(ignew,jcolp-3)=mct(
i,jcolp-3)
1052 mct(inew,jcolp-3)=nct
1053 mct(ignew,jcoln-3)=nct
1055 k(
i,jcoln)=
k(
i,jcoln)+inew
1056 k(inew,jcoln)=mstu(5)*
i
1057 mct(inew,jcoln-3)=mct(
i,jcoln-3)
1062 k(
i,jcoln)=
k(
i,jcoln)+inew
1063 k(inew,jcoln)=mstu(5)*
i
1064 k(
i,jcolp)=
k(
i,jcolp)+ignew
1065 k(ignew,jcolp)=mstu(5)*
i
1066 mct(inew,jcoln-3)=mct(
i,jcoln-3)
1067 mct(ignew,jcolp-3)=mct(
i,jcolp-3)
1071 IF(
k(ir,4).EQ.0.AND.
k(ir,5).EQ.0)
THEN
1079 IF(
k(ir,4).NE.0)
THEN
1080 k(ir,4)=
k(ir,4)+irnew
1081 k(irnew,4)=mstu(5)*ir
1082 mct(irnew,1)=mct(ir,1)
1084 IF(
k(ir,5).NE.0)
THEN
1085 k(ir,5)=
k(ir,5)+irnew
1086 k(irnew,5)=mstu(5)*ir
1087 mct(irnew,2)=mct(ir,2)
1099 DO 460 ievol=1,nevol
1100 IF(ipos(ievol).EQ.
i.AND.irec(ievol).EQ.ir)
THEN
1102 IF(kcol.NE.0.AND.iscol(ievol).EQ.kcol) ipos(ievol)=ignew
1105 ELSEIF(ipos(ievol).EQ.
i)
THEN
1108 ELSEIF(ipos(ievol).EQ.ir.AND.irec(ievol).EQ.
i)
THEN
1111 IF(kcol.NE.0.AND.iscol(ievol).NE.kcol) irec(ievol)=ignew
1113 ELSEIF(ipos(ievol).EQ.ir)
THEN
1118 IF(irec(ievol).EQ.
i)
THEN
1121 ELSEIF(irec(ievol).EQ.ir)
THEN
1128 IF(kcol.NE.0.AND.kfq.EQ.0)
THEN
1135 ptsca(nevol)=sqrt(
pt2)
1142 ptsca(nevol)=ptsca(nevol-1)
1147 IF(mesys(ime,1).EQ.
i) mesys(ime,1)=inew
1148 IF(mesys(ime,2).EQ.
i) mesys(ime,2)=inew
1149 IF(mesys(ime,1).EQ.ir) mesys(ime,1)=irnew
1150 IF(mesys(ime,2).EQ.ir) mesys(ime,2)=irnew
1155 mesys(nmesys,1)=inew
1156 mesys(nmesys,2)=ignew
1159 mesys(nmesys,1)=inew
1160 mesys(nmesys,2)=ignew
1166 IF (
mint(353).EQ.1)
vint(358)=ptcor
1170 IF(
npart.LT.maxnur-1.AND.nevol.LT.2*maxnur-2.AND.
1171 &nmesys.LT.maxnur-2.AND.
n.LT.mstu(4)-mstu(32)-5)
THEN
1174 CALL
pyerrm(11,
'(PYPTFS:) no more memory left for shower')