EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lqqbev.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file lqqbev.F
1 
2 C **********************************************************************
3 
4  SUBROUTINE lqqbev
5 
6  IMPLICIT NONE
7 
8 C...Generate boson-gluon fusion event, choose xp and zp according to
9 C...QCD matrix elements and apply cuts for softness and collinearness.
10 
11 
12 *
13 * to avoid variable conflictions, a second keep element is necessary
14 * with the same common block name (see LPTOU2)
15 *
16  COMMON /leptou/ cut(14),lst(40),parl(30),
17  & x,y,w2,q2,u
18  REAL cut,parl,x,y,w2,q2,u
19  INTEGER lst
20  SAVE /leptou/
21 
22  COMMON /linter/ pari(50),ewqc(2,2,8),qc(8),zl(2,4),zq(2,8),pq(17)
23  REAL pari,ewqc,qc,zl,zq,pq
24  SAVE /linter/
25 
26  INTEGER nlupdm,nplbuf
27  parameter(nlupdm=4000,nplbuf=5)
28  common/lujets/n,k(nlupdm,5),p(nlupdm,nplbuf),v(nlupdm,5)
29  INTEGER n,k
30  REAL p,v
31  SAVE /lujets/
32 
33  common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
34  INTEGER mstu,mstj
35  REAL paru,parj
36  SAVE /ludat1/
37 
38  common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
39  INTEGER kchg
40  REAL pmas,parf,vckm
41  SAVE /ludat2/
42 
43 
44  INTEGER j1,j2,j3,j4,ifail,lqmcut
45  REAL w,xp,zp,xt,pt,phi,pt2,epz,
46  +amifl1,amifl3,amr1,amr2,tm2r1,tm2r2
47  REAL ulmass,rlu,plu
48  INTEGER ifl1,iflr2,iflr1,ifl3,ifl1a,ifl3a,nremh,ir1,ir2,
49  + i,j,ifl1s
50  INTEGER lucomp,kfifl1,kfifl2
51 
52  lst(24)=3
53  w=sqrt(w2)
54  j1=mstu(1)
55  j2=mstu(1)+1
56  j3=mstu(1)+2
57  j4=mstu(1)+3
58 
59  CALL lxp(xp,ifail)
60  IF(ifail.NE.0) goto 999
61 
62 C...Choose flavour of produced quark-antiquark pair.
63  200 CALL lflav(ifl1,ifl3)
64 
65  IF(lst(21).NE.0) RETURN
66  IF(ifl1.LT.0) THEN
67 C...Put quark in first position
68  ifl1s=ifl1
69  ifl1=ifl3
70  ifl3=ifl1s
71  ENDIF
72  CALL lzp(xp,zp,ifail)
73  IF(ifail.NE.0) goto 999
74  ifl1a=iabs(ifl1)
75  ifl3a=iabs(ifl3)
76  mstj(93)=1
77  amifl1=ulmass(ifl1)
78  mstj(93)=1
79  amifl3=ulmass(ifl3)
80 
81 
82  IF(lst(14).EQ.0.OR.(lst(8).GE.2.AND.mod(lst(8),10).NE.9)) THEN
83 C...If baryon production from target remnant is neglected the
84 C...target remnant is approximated by a gluon.
85  IF(w.LT.amifl1+amifl3+parj(32)) goto 999
86  IF(lqmcut(xp,zp,amifl1,0.,amifl3).NE.0) goto 999
87 C Pass the (consituent quark) masses we are using to LU3ENT
88  p(j1,5)=amifl1
89  p(j2,5)=0
90  p(j3,5)=amifl3
91  mstu(10)=1
92  CALL lu3ent(j1,ifl1,21,ifl3,w,pari(21),pari(23))
93  mstu(10)=2
94  k(mstu(1)+1,3)=2
95 C...Align target remnant (gluon) along -z axis
96  CALL lurobo(-acos(-p(j2,3)/sqrt(p(j2,3)**2+p(j2,1)**2)),
97  & 0.,0.,0.,0.)
98 C...Phi-rotation to bring quark to phi=0.
99  CALL lurobo(0.,-plu(j1,15),0.,0.,0.)
100  ELSE
101 
102  IF(w.LT.amifl1+amifl3+0.9+2.*parj(32)) goto 999
103  IF(lqmcut(xp,zp,amifl1,1.,amifl3).NE.0) goto 999
104  p(j1,5)=amifl1
105  p(j3,5)=amifl3
106 C...Choose target valence quark/diquark to form jet system with
107 C...produced antiquark/quark.
108  iflr2=int(1.+lst(22)/3.+rlu(0))
109  IF(iflr2.EQ.lst(22)) THEN
110  iflr1=2101
111  IF(rlu(0).GT.parl(4)) iflr1=2103
112  ELSE
113  iflr1=1000*iflr2+100*iflr2+3
114  ENDIF
115  iflr2=3-iflr2
116  mstj(93)=1
117  amr1=ulmass(iflr1)
118 CJR--
119  kfifl1=lucomp(iflr1)
120  IF (kfifl1.EQ.90) THEN
121  amr1=amr1-2*parl(20)
122  ELSEIF (1.LE.kfifl1 .AND. kfifl1.LE.6) THEN
123  amr1=amr1-parl(20)
124  ENDIF
125  mstj(93)=1
126  amr2=ulmass(iflr2)
127  kfifl2=lucomp(iflr2)
128  IF (kfifl2.EQ.90) THEN
129  amr2=amr2-2.*parl(20)
130  ELSEIF (1.LE.kfifl2 .AND. kfifl2.LE.6) THEN
131  amr2=amr2-parl(20)
132  ENDIF
133 CJR--
134 
135  nremh=0
136  310 nremh=nremh+1
137  IF(nremh.GT.100) goto 999
138  CALL lprikt(parl(14),pt,phi)
139  CALL lremh(0,pt,iflr1,iflr2,xt)
140  pt2=pt**2
141  tm2r1=amr1**2+pt2
142  tm2r2=amr2**2+pt2
143  p(j2,5)=sqrt(tm2r1/(1.-xt)+tm2r2/xt)
144  IF(lqmcut(xp,zp,amifl1,p(j2,5),amifl3).NE.0) goto 310
145  mstu(10)=1
146  CALL lu3ent(j1,ifl1,21,ifl3,w,pari(21),pari(23))
147  mstu(10)=2
148 C...Align target remnant (effective gluon) along -z axis
149  CALL lurobo(-acos(-p(j2,3)/sqrt(p(j2,3)**2+p(j2,1)**2)),
150  &0.,0.,0.,0.)
151 C...Phi-rotation to bring quark to phi=0.
152  CALL lurobo(0.,-plu(j1,15),0.,0.,0.)
153  epz=p(j2,4)-p(j2,3)
154  IF(ifl1.GT.0) THEN
155  ir1=j2
156  ir2=j4
157  ELSE
158  ir1=j4
159  ir2=j2
160  ENDIF
161  p(ir1,1)=pt*cos(phi)
162  p(ir1,2)=pt*sin(phi)
163  p(ir1,3)=-0.5*((1.-xt)*epz-tm2r1/(1.-xt)/epz)
164  p(ir1,4)= 0.5*((1.-xt)*epz+tm2r1/(1.-xt)/epz)
165  p(ir1,5)=amr1
166  p(ir2,1)=-p(ir1,1)
167  p(ir2,2)=-p(ir1,2)
168  p(ir2,3)=-0.5*(xt*epz-tm2r2/xt/epz)
169  p(ir2,4)= 0.5*(xt*epz+tm2r2/xt/epz)
170  p(ir2,5)=amr2
171  k(ir1,1)=1
172  k(ir1,2)=iflr1
173  k(ir2,1)=1
174  k(ir2,2)=iflr2
175  k(j3,1)=2
176  DO 320 i=j1,j4
177  DO 320 j=3,5
178  320 k(i,j)=0
179  n=j4
180  k(ir1,3)=2
181  k(ir2,3)=2
182  IF((p(j1,4)+p(j2,4))**2-(p(j1,1)+p(j2,1))**2-(p(j1,3)+p(j2,3))**2
183  & -p(j2,2)**2.LT.(p(j1,5)+p(j2,5)+parj(32))**2) goto 310
184  IF((p(j3,4)+p(j4,4))**2-(p(j3,1)+p(j4,1))**2-(p(j3,3)+p(j4,3))**2
185  & -p(j4,2)**2.LT.(p(j3,5)+p(j4,5)+parj(32))**2) goto 310
186 
187  ENDIF
188 
189  CALL lazimu(xp,zp)
190  lst(21)=0
191  RETURN
192 
193  999 lst(21)=5
194  RETURN
195  END