Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:42

0001 C
0002 C
0003 C The next three subroutines are for Monte Carlo generation 
0004 C according to a given function FHB. One calls first HIFUN 
0005 C with assigned channel number I, low and up limits. Then to 
0006 C generate the distribution one can call HIRND(I) which gives 
0007 C you a random number generated according to the given function.
0008 C 
0009         SUBROUTINE HIFUN(I,XMIN,XMAX,FHB)
0010         COMMON/HIJHB/RR(10,201),XX(10,201)
0011         SAVE  /HIJHB/
0012         EXTERNAL FHB
0013         FNORM=GAUSS1(FHB,XMIN,XMAX,0.001)
0014         DO 100 J=1,201
0015                 XX(I,J)=XMIN+(XMAX-XMIN)*(J-1)/200.0
0016                 XDD=XX(I,J)
0017                 RR(I,J)=GAUSS1(FHB,XMIN,XDD,0.001)/FNORM
0018 100     CONTINUE
0019         RETURN
0020         END