3 SUBROUTINE lsigmx(NPAR,DERIV,DIFSIG,XF,IFLAG)
18 COMMON /leptou/ cut(14),lst(40),parl(30),
20 REAL cut,parl,
x,
y,w2,q2,u
24 COMMON /linter/ pari(50),ewqc(2,2,8),qc(8),zl(2,4),zq(2,8),pq(17)
25 REAL pari,ewqc,qc,zl,zq,pq
29 &q2min,q2max,w2min,w2max,ilep,inu,ig,iz
31 INTEGER ksave,ilep,inu,ig,iz
34 COMMON /loptim/ optx(4),opty(4),optq2(4),optw2(4),comfac
35 REAL optx,opty,optq2,optw2,comfac
40 common/lujets/
n,
k(nlupdm,5),
p(nlupdm,nplbuf),
v(nlupdm,5)
45 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
50 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
56 INTEGER npar,iflag,ncalls,lst2
57 REAL deriv,difsig,xf,dummy,
s,pm2,q2low,q2upp,ylow,yupp,w2low,
60 dimension
deriv(30),xf(30)
64 IF(iflag.EQ.1) ncalls=0
65 IF(iflag.EQ.2)
WRITE(6,1000)
71 difsig=(
xmin-
x)**2*1.e+11
73 ELSEIF(
x.GT.
xmax)
THEN
74 difsig=(
x-
xmax)**2*1.e+11
83 w2low=
max(w2min,(1.-
x)*
ymin*
s+pm2,q2min*(1.-
x)/
x+pm2)
84 w2upp=
min(w2max,(1.-
x)*
ymax*
s+pm2,q2max*(1.-
x)/
x+pm2)
88 difsig=(q2low-q2)**2*1.e+11
90 ELSEIF(q2.GT.q2upp)
THEN
91 difsig=(q2-q2upp)**2*1.e+11
95 w2=(1.-
x)*
y*parl(21)+pm2
96 ELSEIF(lst(31).EQ.2)
THEN
99 difsig=(ylow-
y)**2*1.e+11
101 ELSEIF(
y.GT.yupp)
THEN
102 difsig=(
y-yupp)**2*1.e+11
106 w2=(1.-
x)*
y*parl(21)+pm2
107 ELSEIF(lst(31).EQ.3)
THEN
110 difsig=(w2low-w2)**2*1.e+11
112 ELSEIF(w2.GT.w2upp)
THEN
113 difsig=(w2-w2upp)**2*1.e+11
116 y=(w2-pm2)/((1.-
x)*parl(21))
120 difsig=(q2low-q2)**2*1.e+11
122 ELSEIF(q2.GT.q2upp)
THEN
123 difsig=(q2-q2upp)**2*1.e+11
127 difsig=(ylow-
y)**2*1.e+11
129 ELSEIF(
y.GT.yupp)
THEN
130 difsig=(
y-yupp)**2*1.e+11
134 difsig=(w2low-w2)**2*1.e+11
136 ELSEIF(w2.GT.w2upp)
THEN
137 difsig=(w2-w2upp)**2*1.e+11
145 IF(lst(21).NE.0)
RETURN
146 difsig=-pq(17)*comfac
148 IF(lst(3).GE.4.AND.iflag.EQ.3)
149 &
WRITE(6,1100) ncalls,difsig,
x,
y,q2,w2
152 1000
FORMAT(
' Warning: IFLAG = 2 in call to LSIGMX, which does not '
153 &,
'calculate derivatives.')
154 1100
FORMAT(/,5
x,
'Terminating entry in LSIGMX after ',i5,
' calls.',/,
155 &5
x,
'Best estimate of minimum found to be ',e12.4,/,
156 &5
x,
'located at x, y, Q**2, W**2 = ',4g10.3,/)