EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
riwfun.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file riwfun.F
1 
2 C **********************************************************************
3 
4  DOUBLE PRECISION FUNCTION riwfun(V)
5 
6  IMPLICIT NONE
7 
8  DOUBLE PRECISION v(2)
9 
10 *
11 * to avoid variable conflictions, a second keep element is necessary
12 * with the same common block name (see LPTOU2)
13 *
14  COMMON /leptou/ cut(14),lst(40),parl(30),
15  & x,y,w2,q2,u
16  REAL cut,parl,x,y,w2,q2,u
17  INTEGER lst
18  SAVE /leptou/
19 
20  COMMON /lintrl/ psave(3,4,5),ksave(4),xmin,xmax,ymin,ymax,
21  &q2min,q2max,w2min,w2max,ilep,inu,ig,iz
22  REAL psave,xmin,xmax,ymin,ymax,q2min,q2max,w2min,w2max
23  INTEGER ksave,ilep,inu,ig,iz
24  SAVE /lintrl/
25 
26 
27  REAL v2min,v2max,v1min,v1max,v1,v2,dcross
28  DATA v2min,v2max/2*0./
29 
30  riwfun=0.d0
31  v1min=xmin
32  v1max=xmax
33  IF(lst(31).EQ.1) THEN
34  v2min=q2min
35  v2max=q2max
36  ELSEIF(lst(31).EQ.2) THEN
37  v2min=ymin
38  v2max=ymax
39  ELSEIF(lst(31).EQ.3) THEN
40  v2min=w2min
41  v2max=w2max
42  ENDIF
43  v1=v1min+v(1)*(v1max-v1min)
44  v2=v2min+v(2)*(v2max-v2min)
45  riwfun=dcross(v1,v2)*(v1max-v1min)*(v2max-v2min)
46 
47  RETURN
48  END