COSMOS v7.655  COSMOSv7655
(AirShowerMC)
psran.f
Go to the documentation of this file.
1 ! defined in QGSJETII-03 but not in II-04
2  real*8 function psran(seed)
3  implicit none
4  real*8 seed
5  real*8 u
6  call rndc(u)
7  psran = u
8  end
9 !=======================================================================
10 ! GAMFUN is defined in qgsjetII-03 but not in II-04.
11  DOUBLE PRECISION FUNCTION gamfun(Y)
12 ! Gamma function : See Abramowitz, page 257, form. 6.4.40
13 !-----------------------------------------------------------------------
14  IMPLICIT DOUBLE PRECISION(a-h,o-z)
15  double precision
16  + y,r,s,t,afspl,x,
17  + coef(10),pi,zerod,halfd,oned,twod,tend
18  SAVE
19 !
20  DATA coef/8.3333333333333334d-02,-2.7777777777777778d-03,
21  . 7.9365079365079365d-04,-5.9523809523809524d-04,
22  . 8.4175084175084175d-04,-1.9175269175269175d-03,
23  . 6.4102564102564103d-03,-2.9550653594771242d-02,
24  . 0.1796443723688306 ,-0.6962161084529506 /
25  DATA pi/ 3.141592653589793d0/
26  DATA zerod/0.d0/,halfd/0.5d0/,oned/1.d0/,twod/2.d0/,tend/10.d0/
27 !
28  x=y
29  afspl=oned
30  n=int(tend-y)
31  DO 10 i=0,n
32  afspl=afspl*x
33  x=x+oned
34 10 CONTINUE
35  r=(x-halfd)* log(x)-x+halfd* log(twod*pi)
36  s=x
37  t=zerod
38  DO 20 i=1,10
39  t=t+coef(i)/s
40  s=s*x**2
41 20 CONTINUE
42  gamfun = exp(r+t)/afspl
43  END
nodes z
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz r
Definition: ZavoidUnionMap.h:1
nodes i
subroutine rndc(u)
Definition: rnd.f:91
real *8 function psran(seed)
Definition: psran.f:3
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
struct ob o[NpMax]
Definition: Zprivate.h:34
! constants thru Cosmos real * pi
Definition: Zglobalc.h:2
double precision function gamfun(Y)
Definition: psran.f:12
latitude latitude this system is used *****************************************************************! type coord sequence union map real y
Definition: Zcoord.h:25
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
nodes a
dE dx *! Nuc Int sampling table h
Definition: cblkMuInt.h:130
nodes t
integer n
Definition: Zcinippxc.h:1
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21