4 SUBROUTINE hijhrd(JP,JT,JOUT,JFLG,IOPJET0)
16 dimension ip(100,2),ipq(50),ipb(50),
it(100,2),itq(50),itb(50)
17 common/hijcrdn/
yp(3,300),
yt(3,300)
21 common/hijdat/hidat0(10,10),hidat(10)
23 common/histrng/
nfp(300,15),
pp(300,15),
nft(300,15),
pt(300,15)
25 common/hijjet1/
npj(300),
kfpj(300,500),
pjpx(300,500),
49 common/lujets/
n,
k(9000,5),
p(9000,5),
v(9000,5)
51 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
53 common/pyhisubs/msel,msub(200),kfin(2,-40:40),ckin(200)
59 common/pyhiint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
61 common/pyhiint5/
ngen(0:200,3),
xsec(0:200,3)
63 common/hipyint/mint4,mint5,atco(200,20),atxs(0:200)
78 IF(iopjet.EQ.1.AND.(
nfp(jp,6).NE.0.OR.
nft(jt,6).NE.0))
81 IF(
nfp(jp,6).LT.0 .OR.
nft(jt,6).LT.0)
RETURN
89 IF(epp.LT.0.0)
go to 1000
90 IF(epm.LT.0.0)
go to 1000
91 IF(etp.LT.0.0)
go to 1000
92 IF(etm.LT.0.0)
go to 1000
93 IF(epp/(epm+0.01).LE.etp/(etm+0.01))
RETURN
100 IF(
pp(jp,4).LE.ecut1)
THEN
104 IF(
pt(jt,4).LE.ecut2)
THEN
114 IF(
nfp(jp,10).EQ.0 .AND.
nft(jt,10).EQ.0)
THEN
122 coef(11,
i)=atco(11,
i)
123 coef(12,
i)=atco(12,
i)
124 coef(28,
i)=atco(28,
i)
130 IF(
xsec(11,1).NE.0) isub11=1
131 IF(
xsec(12,1).NE.0) isub12=1
132 IF(
xsec(28,1).NE.0) isub28=1
133 mint(44)=mint4-isub11-isub12-isub28
134 mint(45)=mint5-isub11-isub12-isub28
135 xsec(0,1)=atxs(0)-atxs(11)-atxs(12)-atxs(28)
150 IF(jj.NE.1)
go to 155
152 IF(
k(7,2).EQ.-
k(8,2))
THEN
153 qmass2=(
p(7,4)+
p(8,4))**2-(
p(7,1)+
p(8,1))**2
154 & -(
p(7,2)+
p(8,2))**2-(
p(7,3)+
p(8,3))**2
156 IF(qmass2.LT.(2.0*qm+
hipr1(1))**2)
go to 155
168 IF(pep.LE.ecut1)
THEN
170 IF(misp.LT.50)
go to 155
174 IF(pet.LE.ecut2)
THEN
176 IF(mist.LT.50)
go to 155
185 IF(wp.LT.0.0 .OR. wm.LT.0.0)
THEN
187 IF(miss.LT.50)
go to 155
192 ampx=sqrt((ecut1-
hipr1(8))**2+pxp**2+
pyp**2+0.01)
193 amtx=sqrt((ecut2-
hipr1(8))**2+pxt**2+pyt**2+0.01)
195 IF(sw.LT.sxx.OR.
vint(43).LT.
hipr1(1))
THEN
197 IF(miss.LT.50)
go to 155
209 hint1(46)=sqrt(
p(7,1)**2+
p(7,2)**2)
215 hint1(56)=sqrt(
p(8,1)**2+
p(8,2)**2)
219 pinirad=(1.0-exp(-2.0*(
vint(47)-hidat(1))))
220 & /(1.0+exp(-2.0*(
vint(47)-hidat(1))))
223 IF(
k(7,2).EQ.-
k(8,2))
go to 190
224 IF(
k(7,2).EQ.21.AND.
k(8,2).EQ.21.AND.iopjet.EQ.1)
go to 190
247 IF(
k(
i,3).EQ.1 .OR.
k(
i,3).EQ.2.OR.
248 & abs(
k(
i,2)).GT.30)
go to 180
263 IF(
k(
i,2).GT.21.AND.
k(
i,2).LE.30)
THEN
283 IF(
k(
i,3).EQ.7.OR.
k(
i,3).EQ.3)
THEN
284 IF(
k(
i,3).EQ.7.AND.
k(
i,2).NE.21.AND.
k(
i,2).EQ.
k(7,2)
285 & .AND.is7.EQ.0)
THEN
295 IF(
k(
i,3).EQ.3.AND.(
k(
i,2).NE.21.OR.
296 & i_inirad.EQ.0))
THEN
306 IF(
k(
i,2).NE.21)
THEN
311 ELSE IF(
k(
i,2).LT.0)
THEN
317 ELSE IF(
k(
i,3).EQ.8.OR.
k(
i,3).EQ.4)
THEN
318 IF(
k(
i,3).EQ.8.AND.
k(
i,2).NE.21.AND.
k(
i,2).EQ.
k(8,2)
319 & .AND.is8.EQ.0)
THEN
329 IF(
k(
i,3).EQ.4.AND.(
k(
i,2).NE.21.OR.
330 & i_inirad.EQ.0))
THEN
340 IF(
k(
i,2).NE.21)
THEN
345 ELSE IF(
k(
i,2).LT.0)
THEN
355 IF(lpq.NE.lpb .OR. ltq.NE.ltb)
THEN
357 IF(miss.LE.50)
go to 155
358 WRITE(6,*)
' Q -QBAR NOT MATCHED IN HIJHRD'
367 IF(
j.GT.jpp)
go to 182
368 IF(ip(
j,2).EQ.0)
THEN
370 ELSE IF(ip(
j,2).NE.0)
THEN
374 ip(
j,1)=ip(ipq(lp),1)
375 ip(
j,2)=ip(ipq(lp),2)
380 ELSE IF(ip2.LT.0)
THEN
386 ip(
j+1,1)=ip(ipb(lp),1)
387 ip(
j+1,2)=ip(ipb(lp),2)
392 ELSE IF(ip2.LT.0)
THEN
402 IF(
j.GT.jtt)
go to 184
403 IF(
it(
j,2).EQ.0)
THEN
405 ELSE IF(
it(
j,2).NE.0)
THEN
409 it(
j,1)=
it(itq(lt),1)
410 it(
j,2)=
it(itq(lt),2)
415 ELSE IF(it2.LT.0)
THEN
421 it(
j+1,1)=
it(itb(lt),1)
422 it(
j+1,2)=
it(itb(lt),2)
427 ELSE IF(it2.LT.0)
THEN
437 IF(
npj(jp)+jpp.GT.mxjt.OR.
ntj(jt)+jtt.GT.mxjt)
THEN
439 WRITE(6,*)
'number of partons per string exceeds'
440 WRITE(6,*)
'the common block size'
467 IF(
k(7,2).NE.21.AND.
k(8,2).NE.21.AND.
468 &
k(7,2)*
k(8,2).GT.0)
go to 155
473 IF(
k(
i,3).EQ.1.OR.
k(
i,3).EQ.2.OR.
474 & abs(
k(
i,2)).GT.30)
go to 200
475 IF(
k(
i,2).GT.21.AND.
k(
i,2).LE.30)
THEN
495 IF(
k(
i,3).EQ.3.AND.(
k(
i,2).NE.21.OR.
496 & i_inirad.EQ.0))
THEN
503 IF(
k(
i,3).EQ.4.AND.(
k(
i,2).NE.21.OR.
504 & i_inirad.EQ.0))
THEN
514 IF(
k(
i,2).NE.21)
THEN
519 ELSE IF(
k(
i,2).LT.0)
THEN
528 IF(miss.LE.50)
go to 155
529 WRITE(6,*) lpq,lpb,
'Q-QBAR NOT CONSERVED OR NOT MATCHED'
538 IF(
j.GT.jpp)
go to 222
539 IF(ip(
j,2).EQ.0)
go to 220
543 ip(
j,1)=ip(ipq(lp),1)
544 ip(
j,2)=ip(ipq(lp),2)
549 ELSE IF(ip2.LT.0)
THEN
556 ip(
j+1,1)=ip(ipb(lp),1)
557 ip(
j+1,2)=ip(ipb(lp),2)
562 ELSE IF(ip2.LT.0)
THEN
575 ip(2*l0-3,1)=ip(ipq(l0),1)
576 ip(2*l0-3,2)=ip(ipq(l0),2)
581 ELSE IF(ip2.LT.0)
THEN
588 ip(2*l0-2,1)=ip(ipb(l0),1)
589 ip(2*l0-2,2)=ip(ipb(l0),2)
594 ELSE IF(ip2.LT.0)
THEN
603 ip(2*lpq-1,1)=ip(ipq(1),1)
604 ip(2*lpq-1,2)=ip(ipq(1),2)
609 ELSE IF(ip2.LT.0)
THEN
617 ip(jpp,1)=ip(ipb(1),1)
618 ip(jpp,2)=ip(ipb(1),2)
623 ELSE IF(ip2.LT.0)
THEN
632 WRITE(6,*)
'number of jets forming single strings exceeds'
633 WRITE(6,*)
'the common block size'
638 WRITE(6,*)
'number of partons per single jet system'
639 WRITE(6,*)
'exceeds the common block size'
677 IF(
ihpr2(10).EQ.0)
RETURN
678 WRITE(6,*)
'Fatal HIJHRD error'
679 WRITE(6,*) jp,
' proj E+,E-',epp,epm,
' status',
nfp(jp,5)
680 WRITE(6,*) jt,
' targ E+,E_',etp,etm,
' status',
nft(jt,5)