EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lqmcut.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file lqmcut.F
1 
2 C **********************************************************************
3 
4  FUNCTION lqmcut(XP,ZP,AM1,AM2,AM3)
5 
6 C...Apply cuts, if necessary, on the event configuration
7 C...obtained from QCD matrix elements.
8 
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 lqmcut
25  REAL xp,zp,am1,am2,am3,s12,s23,s13
26  REAL w,x1,x2,x3,pa1,pa2,pa3
27  DATA s12,s23,s13/3*0./
28 
29  IF(lst(24).EQ.2) THEN
30  s12=q2*(1.-xp)/xp
31  s23=q2*(xp-x)*(1.-zp)/x/xp+am2**2+am3**2
32  s13=q2*(xp-x)*zp/x/xp+am1**2+am3**2
33  ELSEIF(lst(24).EQ.3) THEN
34  s13=q2*(1.-xp)/xp
35  s23=q2*(xp-x)*(1.-zp)/x/xp+am2**2+am3**2
36  s12=q2*(xp-x)*zp/x/xp+am1**2+am2**2
37  IF(s13.LT.(am1+am3)**2) goto 900
38  ENDIF
39 
40  w=sqrt(w2)
41  x1=1.-(s23-am1**2)/w2
42  x3=1.-(s12-am3**2)/w2
43  x2=2.-x1-x3
44  pari(21)=x1
45  pari(22)=x2
46  pari(23)=x3
47 
48  IF(x1.GT.1..OR.x2.GT.1..OR.x3.GT.1.) goto 900
49  IF(x1*w/2..LT.am1.OR.x2*w/2..LT.am2.OR.x3*w/2..LT.am3) goto 900
50  pa1=sqrt((0.5*x1*w)**2-am1**2)
51  pa2=sqrt((0.5*x2*w)**2-am2**2)
52  pa3=sqrt((0.5*x3*w)**2-am3**2)
53  IF(abs((pa3**2-pa1**2-pa2**2)/(2.*pa1*pa2)).GE.1.) goto 900
54  IF(abs((pa2**2-pa1**2-pa3**2)/(2.*pa1*pa3)).GE.1.) goto 900
55  lqmcut=0
56  RETURN
57 
58  900 lqmcut=1
59  RETURN
60  END