Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hiptdi.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file hiptdi.f
1 C
2 C
3 C
4  SUBROUTINE hiptdi(PT,PTMAX,IOPT)
5  common/hiparnt/hipr1(100),ihpr2(50),hint1(100),ihnt2(50)
6  SAVE /hiparnt/
7  common/ranseed/nseed
8  SAVE /ranseed/
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  & -atl_ran(nseed)*(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-atl_ran(nseed)*
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