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