]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HIJING/hijing1_36/hiptdi.F
25edbb64eb333a75e8774e4fada3525c211ce8f3
[u/mrichter/AliRoot.git] / HIJING / hijing1_36 / hiptdi.F
1 * $Id$
2 C
3 C
4 C
5         SUBROUTINE HIPTDI(PT,PTMAX,IOPT)
6 #include "hiparnt.inc"
7         SAVE
8         IF(IOPT.EQ.2) THEN
9                 PT=HIRND2(7,0.0,PTMAX)
10                 IF(PT.GT.HIPR1(8)) 
11      &          PT=HIPR1(2)*SQRT(-ALOG(EXP(-HIPR1(8)**2/HIPR1(2)**2)
12      &                  -RLU_HIJING(0)*(EXP(-HIPR1(8)**2/HIPR1(2)**2)-
13      &                  EXP(-PTMAX**2/HIPR1(2)**2))))
14
15         ELSE
16                 PT=HIPR1(2)*SQRT(-ALOG(1.0-RLU_HIJING(0)*
17      &                  (1.0-EXP(-PTMAX**2/HIPR1(2)**2))))
18         ENDIF
19         PTMAX0=MAX(PTMAX,0.01)
20         PT=MIN(PTMAX0-0.01,PT)
21         RETURN
22         END