EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dcross.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file dcross.F
1 
2 C **********************************************************************
3 
4  FUNCTION dcross(V1,V2)
5 
6  IMPLICIT NONE
7 
8 C...Differential cross-section dsigma/dv1dv2; v1=x, v2=Q2 or y or W2.
9 C...Used for numerical integration etc.
10 C...Note, non-zero result only for region defined by cuts through CUT.
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  COMMON /lintrl/ psave(3,4,5),ksave(4),xmin,xmax,ymin,ymax,
27  &q2min,q2max,w2min,w2max,ilep,inu,ig,iz
28  REAL psave,xmin,xmax,ymin,ymax,q2min,q2max,w2min,w2max
29  INTEGER ksave,ilep,inu,ig,iz
30  SAVE /lintrl/
31 
32  COMMON /loptim/ optx(4),opty(4),optq2(4),optw2(4),comfac
33  REAL optx,opty,optq2,optw2,comfac
34  SAVE /loptim/
35 
36  COMMON /linteg/ ntot,npass
37  INTEGER ntot,npass
38  SAVE /linteg/
39 
40  INTEGER nlupdm,nplbuf
41  parameter(nlupdm=4000,nplbuf=5)
42  common/lujets/n,k(nlupdm,5),p(nlupdm,nplbuf),v(nlupdm,5)
43  INTEGER n,k
44  REAL p,v
45  SAVE /lujets/
46 
47  common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
48  INTEGER kchg
49  REAL pmas,parf,vckm
50  SAVE /ludat2/
51 
52 
53  INTEGER lst2
54  REAL v1,v2,dcross,s,pm2,q2low,q2upp,ylow,yupp,w2low,w2upp
55 
56  dcross=0.
57  ntot=ntot+1
58 C...Variable V1 is x, variable V2 is either Q**2, y or W**2
59  x=v1
60  IF(x.LT.xmin.OR.x.GT.xmax) RETURN
61  s=parl(21)
62  pm2=psave(3,2,5)**2
63  IF(lst(31).EQ.1) THEN
64  q2=v2
65  y=q2/(parl(21)*x)
66  w2=(1.-x)*y*parl(21)+psave(3,2,5)**2
67  ELSEIF(lst(31).EQ.2) THEN
68  y=v2
69  q2=y*x*parl(21)
70  w2=(1.-x)*y*parl(21)+psave(3,2,5)**2
71  ELSEIF(lst(31).EQ.3) THEN
72  w2=v2
73  y=(w2-psave(3,2,5)**2)/((1.-x)*parl(21))
74  q2=x*y*parl(21)
75  ENDIF
76  q2low=max(q2min,x*ymin*s,(w2min-pm2)*x/(1.-x))
77  q2upp=min(q2max,x*ymax*s,(w2max-pm2)*x/(1.-x))
78  ylow=max(ymin,q2min/(s*x),(w2min-pm2)/(s*(1.-x)))
79  yupp=min(ymax,q2max/(s*x),(w2max-pm2)/(s*(1.-x)))
80  w2low=max(w2min,(1.-x)*ymin*s+pm2,q2min*(1.-x)/x+pm2)
81  w2upp=min(w2max,(1.-x)*ymax*s+pm2,q2max*(1.-x)/x+pm2)
82  IF(q2.LT.q2low.OR.q2.GT.q2upp) RETURN
83  IF(y.LT.ylow.OR.y.GT.yupp) RETURN
84  IF(w2.LT.w2low.OR.w2.GT.w2upp) RETURN
85  lst2=lst(2)
86  lst(2)=-2
87  CALL lepto
88  lst(2)=lst2
89  IF(lst(21).NE.0) RETURN
90  npass=npass+1
91  dcross=pari(31)*pq(17)*comfac
92 
93  RETURN
94  END