]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HIJING/hipyset1_35/pyw2au_hijing.F
Protection against division by 0 added.
[u/mrichter/AliRoot.git] / HIJING / hipyset1_35 / pyw2au_hijing.F
CommitLineData
e74335a4 1* $Id$
2
3C***********************************************************************
4
5 FUNCTION PYW2AU_HIJING(EPS,IREIM)
6
7C...Calculates real and imaginary parts of the auxiliary function W2;
8C...see R. K. Ellis, I. Hinchliffe, M. Soldate and J. J. van der Bij,
9C...FERMILAB-Pub-87/100-T, LBL-23504, June, 1987
10#include "ludat1_hijing.inc"
11
12 ASINH(X)=LOG(X+SQRT(X**2+1.))
13 ACOSH(X)=LOG(X+SQRT(X**2-1.))
14
15 IF(EPS.LT.0.) THEN
16 W2RE=4.*(ASINH(SQRT(-1./EPS)))**2
17 W2IM=0.
18 ELSEIF(EPS.LT.1.) THEN
19 W2RE=4.*(ACOSH(SQRT(1./EPS)))**2-PARU(1)**2
20 W2IM=-4.*PARU(1)*ACOSH(SQRT(1./EPS))
21 ELSE
22 W2RE=-4.*(ASIN(SQRT(1./EPS)))**2
23 W2IM=0.
24 ENDIF
25
26 IF(IREIM.EQ.1) PYW2AU_HIJING=W2RE
27 IF(IREIM.EQ.2) PYW2AU_HIJING=W2IM
28
29 RETURN
30 END