5 SUBROUTINE linit(LFILE,LEPIN,PLZ,PPZ,INTER)
16 &q2min,q2max,w2min,w2max,ilep,inu,ig,iz
18 INTEGER ksave,ilep,inu,ig,iz
25 COMMON /leptou/ cut(14),lst(40),parl(30),
27 REAL cut,parl,
x,
y,w2,q2,u
31 COMMON /linter/ pari(50),ewqc(2,2,8),qc(8),zl(2,4),zq(2,8),pq(17)
32 REAL pari,ewqc,qc,zl,zq,pq
35 COMMON /lgrid/ nxx,nww,xx(31),ww(21),
pqg(31,21,3),pqqb(31,21,2),
36 &qgmax(31,21,3),qqbmax(31,21,2),ycut(31,21),xtot(31,21),
np
37 REAL xx,ww,
pqg,pqqb,qgmax,qqbmax,ycut,xtot
42 COMMON /loptim/ optx(4),opty(4),optq2(4),optw2(4),comfac
43 REAL optx,opty,optq2,optw2,comfac
48 common/lujets/
n,
k(nlupdm,5),
p(nlupdm,nplbuf),
v(nlupdm,5)
53 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
58 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
63 COMMON /lboost/ dbeta(2,3),stheta(2),sphi(2),pb(5),phir
64 DOUBLE PRECISION dbeta
65 REAL stheta,sphi,pb,phir
68 COMMON /lminui/ xkin(4),ukin(4),wkin(4),ain(4),
bin(4),
69 &maxfin,relup,relerr,reler2,fcnmax
70 REAL xkin,ukin,wkin,ain,
bin,relerr,relup,reler2,fcnmax
74 COMMON /lminuc/ namkin(4),nam(30)
75 CHARACTER*10 namkin,nam
82 COMMON /pypara/ ipy(80),pypar(80),pyvar(80)
87 common/pypars/mstp(200),parp(200),msti(200),paripy(200)
94 COMMON /pepadm/cpdfnam(2,imxpdf),ipdfnam(2,imxpdf),
95 & iplst(10),cunpol,cpol
96 CHARACTER*256 cpdfnam,cunpol,cpol
100 common/maxfromhand/ fmaxfh
104 INTEGER inter,lfile,lepin,ncall,i,j,ifl
105 REAL plz,ppz,
pi,pm2,roots
107 INTEGER lqcd,ltm,ipmax,
ip,iw,ix
112 DATA pi/3.1415927/,ncall/0/
118 IF(lst(15).eq.ipdfnam(1,i))
THEN
119 cunpol=cpdfnam(1,ipdfnam(2,i))
120 cpol =cpdfnam(2,ipdfnam(2,i))
124 IF (lst(15).EQ.150) CALL
setctq5(3)
125 IF (lst(15).EQ.151) CALL
setctq5(1)
126 IF (lst(15).EQ.152) CALL
setctq5(8)
127 IF (lst(15).EQ.173) CALL
setctq6(1)
128 IF (lst(15).EQ.174) CALL
setctq6(2)
129 IF (lst(15).EQ.175) CALL
setctq6(3)
130 CALL
pollinit(lfile,lepin,plz,ppz,inter)
131 IF (lst(40).NE.0)
RETURN
136 IF(lst(18).GE.1)
THEN
138 pmas(24,1)=sqrt(
pi*parl(16)/(sqrt(2.)*parl(17)*parl(5)*
140 pmas(23,1)=pmas(24,1)/sqrt(1.-parl(5))
152 zq(1,ifl)=
sign(0.5,qc(ifl))-qc(ifl)*parl(5)
153 10 zq(2,ifl)=-qc(ifl)*parl(5)
173 p(1,4)=sqrt(
p(1,3)**2+
p(1,5)**2)
178 p(2,4)=sqrt(
p(2,3)**2+
p(2,5)**2)
184 20 psave(3,i,j)=
p(i,j)
186 parl(21)=2.*(dble(
p(1,4))*dble(
p(2,4))-dble(
p(1,3))*dble(
p(2,3)))
187 roots=sqrt((dble(
p(1,4))+dble(
p(2,4)))**2
188 & -(dble(
p(1,3))+dble(
p(2,3)))**2)
189 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
WRITE(6,1000)
190 &lepin,(
p(1,j),j=1,3),parl(1),parl(2),(
p(2,j),j=1,3),inter,roots
191 write(*,*)
'INTER,ROOT',inter,roots
192 IF(plz*ppz.GT.0.1)
THEN
200 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
201 &
WRITE(6,1020) mstu(181),mstu(182),mstp(181),mstp(182)
204 IF(mstu(181).LE.7.AND.mstu(182).LT.402)
THEN
206 WRITE(6,1030) mstj(46)
209 IF(lst(15).GT.0)
THEN
216 write(*,*)
'PYINIT not included !'
225 IF(mod(lst(8),10).EQ.3.OR.mod(lst(8),10).EQ.5) ipy(13)=0
227 &(mod(lst(8),10).EQ.4.OR.mod(lst(8),10).EQ.5)) ipy(14)=0
230 IF(psave(3,1,3).LT.0.)
THEN
238 dbeta(1,3)=(dble(
p(1,3))+dble(
p(2,3)))/(dble(
p(1,4))+dble(
p(2,4)))
241 IF(lst(17).NE.0)
THEN
243 CALL ludbrb(0,0,0.,0.,0.d0,0.d0,-dbeta(1,3))
245 CALL ludbrb(0,0,0.,-sphi(1),0.d0,0.d0,0.d0)
247 CALL ludbrb(0,0,-stheta(1),0.,0.d0,0.d0,0.d0)
261 w2max=
min(cut(8),
s+pm2)
263 umax=
min(cut(10),
s/(2.*
p(2,5)))
267 &1.-(w2max-pm2)/
max(2.*
p(2,5)*umin,1.e-22))
269 &q2max/
max(2.*
p(2,5)*umin,1.e-22),
270 &1.-(w2min-pm2)/(
s*
ymax),1.-(w2min-pm2)/(2.*
p(2,5)*umax))
272 &(w2min-pm2+q2min)/
s,2.*
p(2,5)*umin/
s)
274 &(w2max-pm2)/
max(
s*(1.-
xmax),1.e-22),
275 &(w2max-pm2+q2max)/
s,2.*
p(2,5)*umax/
s)
281 &
s*
ymin-q2max+pm2,2.*
p(2,5)*umin*(1.-
xmax)+pm2)
284 &
s*
ymax-q2min+pm2,2.*
p(2,5)*umax*(1.-
xmin)+pm2)
288 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
WRITE(6,1050)
289 &cut,
xmin,
xmax,
ymin,
ymax,q2min,q2max,w2min,w2max,umin,umax
291 &w2max.LT.w2min)
THEN
292 IF(lst(3).GE.1)
WRITE(6,1100)
298 IF(
xmin.LT.1.e-10.OR.q2min.LT.1.e-01)
THEN
299 IF(lst(3).GE.1)
WRITE(6,1110)
306 pari(11)=(parl(1)-parl(2))/parl(1)
309 IF(lepin.LT.0) ilep=2
311 IF(iabs(lepin).EQ.12.OR.iabs(lepin).EQ.14
312 &.OR.iabs(lepin).EQ.16) inu=1
316 IF(lepin.LT.0) parl(6)=1.
318 IF(lst(23).EQ.1.AND.inu.EQ.0)
THEN
323 ELSEIF(lst(23).EQ.2)
THEN
325 IF(ksave(1).LT.0.AND.parl(6).LT.-0.99
326 & .OR.ksave(1).GT.0.AND.parl(6).GT.0.99)
THEN
327 IF(lst(3).GE.1)
WRITE(6,1150) lepin,parl(6)
333 IF(mod(iabs(lepin),2).EQ.0)
THEN
334 ksave(3)=isign(24,lepin)
335 ksave(4)=isign(iabs(lepin)-1,lepin)
337 ksave(3)=isign(24,-lepin)
338 ksave(4)=isign(iabs(lepin)+1,lepin)
340 ELSEIF(lst(23).EQ.3.OR.(lst(23).EQ.4.AND.inu.EQ.1))
THEN
345 ELSEIF(lst(23).EQ.4.AND.inu.EQ.0)
THEN
351 IF(lst(3).GE.1)
WRITE(6,1200) inter,lepin
361 IF(inter.EQ.2.OR.inter.EQ.3) lst(31)=2
365 IF(lst(31).LT.1.OR.lst(31).GT.3)
THEN
366 IF(lst(3).GE.1)
WRITE(6,1210) lst(1),lst(31)
374 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
375 &
WRITE(6,1220) optx,opty,optq2,optw2
388 ELSEIF(inter.EQ.4)
THEN
413 IF(lst(23).EQ.2)
THEN
415 pari(31)=parl(17)**2/
pi*0.39e+09
418 pari(31)=2.*
pi*parl(16)**2*0.39e+09
420 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
421 &
WRITE(6,1250) (i,lst(i),lst(i+10),parl(i),parl(i+10),i=1,10)
426 ltm=mod(lst(11)/10,10)
427 IF(lst(11).NE.0.AND.(inter.EQ.1.OR.inter.EQ.4)) CALL
fltabl
431 IF(lst(10).GT.0) CALL
lxsect
432 IF(lqcd.EQ.2.OR.ltm.EQ.2)
THEN
434 IF(lqcd.EQ.2)
WRITE(6,1310)
435 IF(ltm .EQ.2)
WRITE(6,1320)
445 IF(lst(31).EQ.1)
THEN
446 ukin(2)=(q2max+q2min)/2.
447 wkin(2)=0.8*(q2max-q2min)/2.
451 ELSEIF(lst(31).EQ.2)
THEN
457 ELSEIF(lst(31).EQ.3)
THEN
458 ukin(2)=(w2max+w2min)/2.
459 wkin(2)=0.8*(w2max-w2min)/2.
468 pari(lst(23))=fcnmax*1.1
470 IF(pari(lst(23)).EQ.0.0) pari(lst(23))=fmaxfh
471 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
472 &
WRITE(6,1400) pari(lst(23)),ti2-ti1
475 IF(lfile.GT.0.AND.lst(19).GE.0)
THEN
477 READ(lfile) lstw,parlw,nxx,nww,
np,xx,ww
479 IF(lstw(17).NE.0) ipmax=3
480 READ(lfile) (((
pqg(ix,iw,
ip),ix=1,nxx),iw=1,nww),
ip=1,
np),
481 & (((pqqb(ix,iw,
ip),ix=1,nxx),iw=1,nww),
ip=1,
np),
482 & (((qgmax(ix,iw,
ip),ix=1,nxx),iw=1,nww),
ip=1,ipmax),
483 & (((qqbmax(ix,iw,
ip),ix=1,nxx),iw=1,nww),
ip=1,
min(2,ipmax)),
485 IF(
np.NE.1)
READ(lfile) xtot
495 IF(lst(12).NE.lstw(12).OR.lst(13).NE.lstw(13)
496 & .OR.lst(15).NE.lstw(15).OR.lst(16).NE.lstw(16)
497 & .OR.lst(17).NE.lstw(17).OR.lst(23).NE.lstw(23)
498 & .OR.abs(parl(1)-parlw(1)).GT.0.1.OR.abs(parl(2)-parlw(2)).GT.0.1
499 & .OR.abs(parl(5)-parlw(5)).GT.0.01
500 & .OR.abs(parl(6)-parlw(6)).GT.0.1)
THEN
502 &
WRITE(6,1500) lst(12),lstw(12),lst(13),lstw(13),lst(15),
503 & lstw(15),lst(16),lstw(16),lst(17),lstw(17),lst(23),lstw(23),
504 & parl(1),parlw(1),parl(2),parlw(2),parl(5),parlw(5),parl(6),
511 ELSEIF((lst(19).GE.0.OR.lst(19).EQ.-10).AND.
512 &(lst(8).EQ.1.OR.lst(8)/10.EQ.1.OR.mod(lst(8),10).EQ.9))
THEN
517 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
518 &
WRITE(6,1510) ti2-ti1
529 1000
FORMAT(
' ',68(
'='),//,
530 &
'A MONTE CARLO GENERATOR FOR DEEP INELASTIC LEPTON-'
531 &,
'NUCLEON SCATTERING',//,
532 &
'LEPTO version 6.5, April 20, 1996',/,68(
'='),//,
533 &
'Lepton: type =',i3,5
x,
'momentum (px,py,pz) =',3f8.1,
534 &
' GeV',//,
'Target: A, Z =',2f3.0,2
x,
535 &
'momentum (px,py,pz) =',3f8.1,
' GeV',//,
536 &
'Interaction :',i3,14
x,
' CMS energy =',1pg12.4,
' GeV',/68(
'='))
537 1010
FORMAT(
' Warning: lepton and nucleon momenta in same direction',
538 &
' not allowed.',/,10
x,
'Execution stopped.')
539 1020
FORMAT(/,
' JETSET version ',i3,
'.',i3,
' is used.',/,
540 &
' Parton densities in PYTHIA version ',i3,
'.',i3,
' are used.',/)
541 1030
FORMAT(
' Warning (LINIT): JETSET version before 7.402, MSTJ(46)'
542 & ,
' set to',i4,/,18
x,
'to avoid mismatch LEPTO<-->LUSHOW.',/)
543 1050
FORMAT(/,
' User applied cuts (+ phase space) : ',1
p,
544 & g12.4,
' < x < ',g12.4,
545 &/,37
x,g12.4,
' < y < ',g12.4,
546 &/,37
x,g12.4,
' < Q**2 < ',g12.4,
547 &/,37
x,g12.4,
' < W**2 < ',g12.4,
548 &/,37
x,g12.4,
' < nu < ',g12.4,
549 &/,37
x,g12.4,
' < E'' < ',g12.4,
550 &/,37
x,g12.4,
' < theta < ',g12.4,/,
551 &/,
' Effective ranges (from above cuts): ',
552 & g12.4,
' < x < ',g12.4,
553 &/,37
x,g12.4,
' < y < ',g12.4,
554 &/,37
x,g12.4,
' < Q**2 < ',g12.4,
555 &/,37
x,g12.4,
' < W**2 < ',g12.4,
556 &/,37
x,g12.4,
' < nu < ',g12.4)
557 1100
FORMAT(
' Warning: effective upper limit of kinematical ',
558 &
'variable(s) smaller than corresponding lower limit.')
559 1110
FORMAT(
' Warning: lower limit in x and/or Q2 too small for ',
561 1150
FORMAT(
' Warning: weak charged current cross section zero for ',
562 &
'specified lepton helicity; LEPIN, PARL(6) =',i3,f5.2)
563 1200
FORMAT(
' Warning: unrecognized interaction in LINIT call: ',
564 &
'INTER = ',i5,
' for lepton LEPIN =',i5)
565 1210
FORMAT(
' Warning: unallowed value of LST(1) =',i3,
566 &
' and/or LST(31) =',i3)
567 1220
FORMAT(/,
' User-defined optimization parameters:',
568 &/,5
x,
'OPTX(1...4) =',4g11.3,/,5
x,
'OPTY(1...4) =',4g11.3,
569 &/,5
x,
'OPYQ2(1...4) =',4g11.3,/,5
x,
'OPTW2(1...4) =',4g11.3,/)
570 1250
FORMAT(/,
' Parameter values:',
571 &
'LST(I+10)',8
x,
'PARL(I)',5
x,
'PARL(I+10)',1
p,
572 &/,5
x,55(
'-'),10(/,3i10,2g15.4),/)
573 1300
FORMAT(
' Warning: cross section, PARL(23), excludes FL (see ',
575 1310
FORMAT(10
x,
'QCD, since evaluated event by event for LQCD=2')
576 1320
FORMAT(10
x,
'TM , since evaluated event by event for LTM =2')
577 1330
FORMAT(
' Cross section in PARL(24) includes these contributions.')
578 1400
FORMAT(
' Max of differential cross section (for weighting) =',
579 &e12.4,/,
' obtained in ',f7.2,
' seconds.',/)
581 &
'with those used when calculating QCD weights.',
582 &
'current value value for weights',/,
583 &/,
' LST(12) ',i12,10
x,i12,
584 &/,
' LST(13) ',i12,10
x,i12,
585 &/,
' LST(15) ',i12,10
x,i12,
586 &/,
' LST(16) ',i12,10
x,i12,
587 &/,
' LST(17) ',i12,10
x,i12,
588 &/,
' LST(23) ',i12,10
x,i12,
589 &/,
' PARL(1) ',e12.4,10
x,e12.4,
590 &/,
' PARL(2) ',e12.4,10
x,e12.4,
591 &/,
' PARL(5) ',e12.4,10
x,e12.4,
592 &/,
' PARL(6) ',e12.4,10
x,e12.4)
593 1510
FORMAT(/,
' Time for calculating QCD weights =',f5.1,
' seconds',/)
594 1900
FORMAT(
' Execution stopped ',/)