Corrections for F77 compliance
[u/mrichter/AliRoot.git] / HIJING / hijing1_36 / fjetrig.F
CommitLineData
e74335a4 1* $Id$
2C
3C
4C
5 FUNCTION FJETRIG(X,WGT)
6 IMPLICIT REAL*8(A-H,O-Z)
7#include "hiparnt.inc"
8 DIMENSION X(10)
9 SAVE
10 PTMIN=ABS(HIPR1(10))-0.25
70090d58 11 PTMIN=MAX(PTMIN,DBLE(HIPR1(8)))
e74335a4 12 AM2=0.D0
13 IF(IHPR2(3).EQ.3) THEN
14 AM2=HIPR1(7)**2
15 PTMIN=MAX(0.0,HIPR1(10))
16 ENDIF
17 PTMAX=ABS(HIPR1(10))+0.25
18 IF(HIPR1(10).LE.0.0) PTMAX=HINT1(1)/2.0-AM2
19 IF(PTMAX.LE.PTMIN) PTMAX=PTMIN+0.25
20 PT2=(PTMAX**2-PTMIN**2)*X(1)+PTMIN**2
21 AMT2=PT2+AM2
22 XT=2.0*DSQRT(AMT2)/HINT1(1)
23 YMX1=DLOG(1.0/XT+DSQRT(1.0/XT**2-1.0))
24 Y1=2.0*YMX1*X(2)-YMX1
25 YMX2=DLOG(2.0/XT-DEXP(Y1))
26 YMN2=DLOG(2.0/XT-DEXP(-Y1))
27 Y2=(YMX2+YMN2)*X(3)-YMN2
28 IF(IHPR2(3).EQ.3) THEN
29 GTRIG=2.0*GHVQ(Y1,Y2,AMT2)
30 ELSE IF(IHPR2(3).EQ.2) THEN
31 GTRIG=2.0*GPHOTON(Y1,Y2,PT2)
32 ELSE
33 GTRIG=G(Y1,Y2,PT2)
34 ENDIF
35 FJETRIG=2.0*YMX1*(YMX2+YMN2)*(PTMAX**2-PTMIN**2)
36 & *GTRIG/2.0
37 RETURN
38 END