*
* $Id: riwfun.F,v 1.1.1.1 1996/03/08 17:40:15 mclareni Exp $
*
* $Log: riwfun.F,v $
* Revision 1.1.1.1  1996/03/08 17:40:15  mclareni
* Lepto63
*
*
C **********************************************************************
 
      DOUBLE PRECISION FUNCTION RIWFUN(V)
      DOUBLE PRECISION V(2)
      COMMON /LEPTOU/ CUT(14),LST(40),PARL(30),X,Y,W2,Q2,U
      COMMON /LINTRL/ PSAVE(3,4,5),KSAVE(4),XMIN,XMAX,YMIN,YMAX,
     &Q2MIN,Q2MAX,W2MIN,W2MAX,ILEP,INU,IG,IZ
      DATA V2MIN,V2MAX/2*0./
 
      RIWFUN=0.D0
      V1MIN=XMIN
      V1MAX=XMAX
      IF(LST(31).EQ.1) THEN
        V2MIN=Q2MIN
        V2MAX=Q2MAX
      ELSEIF(LST(31).EQ.2) THEN
        V2MIN=YMIN
        V2MAX=YMAX
      ELSEIF(LST(31).EQ.3) THEN
        V2MIN=W2MIN
        V2MAX=W2MAX
      ENDIF
      V1=V1MIN+V(1)*(V1MAX-V1MIN)
      V2=V2MIN+V(2)*(V2MAX-V2MIN)
      RIWFUN=DCROSS(V1,V2)*(V1MAX-V1MIN)*(V2MAX-V2MIN)
 
      RETURN
      END
