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