EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lzp.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file lzp.F
1 
2 C **********************************************************************
3 
4  SUBROUTINE lzp(XP,ZP,IFAIL)
5 
6  IMPLICIT NONE
7 
8 C...Choose value of ZP according to QCD matrix elements.
9 *
10 * to avoid variable conflictions, a second keep element is necessary
11 * with the same common block name (see LPTOU2)
12 *
13  COMMON /leptou/ cut(14),lst(40),parl(30),
14  & x,y,w2,q2,u
15  REAL cut,parl,x,y,w2,q2,u
16  INTEGER lst
17  SAVE /leptou/
18 
19  COMMON /linter/ pari(50),ewqc(2,2,8),qc(8),zl(2,4),zq(2,8),pq(17)
20  REAL pari,ewqc,qc,zl,zq,pq
21  SAVE /linter/
22 
23 *...
24  INTEGER ifail,loop,ipart
25  REAL xp,ap,bp
26  REAL rlu,dzpmax
27  REAL d,e,dp,dqcd,zpweit
28  REAL dz,dx,da,db,dc,dd,de
29  INTEGER ih,i
30  REAL zp,c1,c2,szp,fqg,fqq,zpmin,zpmax,a,b,
31  +csign,c,cp,aa,bb,z1
32 
33  DATA c1,c2/0.2122066,0.0795775/,dzpmax,szp,cp/3*0./
34  fqg(dz,dx,da,db,dc)=da*(dz**2+dx**2)/(1.-dx)+2.*da*dx*dz*(1.-dz)
35  &+2.*da*(1.-dz)+4.*db*dx*dz*(1.-dz)+dc*(dz**2+dx**2)/(1.-dx)+
36  &2.*dc*(dx+dz)*(1.-dz)
37  fqq(dz,dx,da,db,dc,dd,de)=da*dd*(dz**2+(1.-dz)**2)+db*de*dz*
38  &(1.-dz)+dc*dd*(2.*dz-1.)
39 
40 *PEPSI>>
41  IF(lst(40).NE.0) THEN
42  CALL pollzp(xp,zp,ifail)
43  RETURN
44  ENDIF
45 *PEPSI<<
46 
47  ifail=1
48  ih=1
49  IF(lst(30).EQ.1) ih=2
50 CAE.Scheme for ME cutoff: W2, Q2, mixed, z-shat
51  IF(lst(20).LE.1) THEN
52  zpmin=(1.-x)*xp/(xp-x)*parl(27)
53  ELSEIF(lst(20).EQ.2) THEN
54  zpmin=x*xp/(xp-x)*parl(27)
55  ELSEIF(lst(20).GE.3.AND.lst(20).LE.5) THEN
56  zpmin=parl(27)
57  ELSEIF(lst(20).EQ.6) THEN
58  zpmin=parl(8)
59  ELSE
60  WRITE(6,*) 'LZP: No such jet scheme!'
61  ENDIF
62 CAE
63  IF(zpmin.LE.0..OR.zpmin.GE.0.5) RETURN
64  zpmax=1.-zpmin
65  i=iabs(lst(25))
66  ap=1.-zpmin
67  bp=zpmin/ap
68  IF(lst(23).EQ.2) THEN
69  a=pari(24)
70  b=pari(25)
71  csign=-lst(30)*isign(1,lst(25))*pari(26)
72  ELSE
73  a=(ewqc(1,ih,i)+ewqc(2,ih,i))*pari(24)
74  b=(ewqc(1,ih,i)+ewqc(2,ih,i))*pari(25)
75  c=(ewqc(1,ih,i)-ewqc(2,ih,i))*pari(26)
76  csign=-c*lst(30)*isign(1,lst(25))
77  ENDIF
78  IF(lst(24).EQ.2) THEN
79  dzpmax=max(fqg(zpmin,xp,a,b,csign),fqg(zpmax,xp,a,b,csign))
80  aa=2.*(a+csign)/(1.-xp)-4.*a*xp-8.*b*xp-4.*csign
81  IF(abs(aa).GT.1.e-20) THEN
82  bb=2.*a*(xp-1.)+4.*b*xp+2.*csign*(1.-xp)
83  z1=-bb/aa
84  IF(z1.GT.zpmin.AND.z1.LT.zpmax)
85  & dzpmax=max(dzpmax,fqg(z1,xp,a,b,csign))
86  ENDIF
87  dzpmax=dzpmax*c1*1.05
88  ELSEIF(lst(24).EQ.3) THEN
89  cp=1./bp**2
90  d=xp**2+(1.-xp)**2
91  e=8.*xp*(1-xp)
92  dzpmax=max(fqq(zpmin,xp,a,b,csign,d,e),
93  & fqq(zpmax,xp,a,b,csign,d,e))
94  aa=4.*a*d-2.*b*e
95  IF(abs(aa).GT.1.e-20) THEN
96  bb=b*e-2.*a*d+2.*csign*d
97  z1=-bb/aa
98  IF(z1.GT.zpmin.AND.z1.LT.zpmax)
99  & dzpmax=max(dzpmax,fqq(z1,xp,a,b,csign,d,e))
100  ENDIF
101  dzpmax=dzpmax*c2*1.05
102  ENDIF
103  ipart=lst(24)-1
104  loop=0
105  100 loop=loop+1
106  IF(loop.GT.1000) RETURN
107  IF(lst(24).EQ.2) THEN
108  zp=1.-ap*bp**rlu(0)
109  szp=1.-zp
110  ELSEIF(lst(24).EQ.3) THEN
111  dp=bp*cp**rlu(0)
112  zp=dp/(1.+dp)
113  szp=zp*(1.-zp)
114  ENDIF
115  zpweit=szp*(a*dqcd(0,ipart,1,xp,zp,0.)+b*dqcd(0,ipart,2,xp,zp,0.)
116  &+csign*dqcd(0,ipart,3,xp,zp,0.))/dzpmax
117  IF(zpweit.LT.rlu(0)) goto 100
118  ifail=0
119  RETURN
120  END