COSMOS v7.655
COSMOSv7655
(AirShowerMC)
ksplandau.f
Go to the documentation of this file.
1
! test ksplandau
2
! integer i
3
! real*8 b, c, x
4
!
5
! b =1.
6
! c =0.20
7
! do i= 1, 100000
8
! call ksplandau(b, c, x)
9
! write(*,*) sngl(x)
10
! enddo
11
! end
12
13
! ksplandau.f
14
! samples a random variable x following the
15
! psudo-Landau energy loss distribution
16
! which is
17
! exp(-1/2(y +exp(-y)) dy
18
! where y=(x-b)/c.
19
!
20
! The peak of the distribution is at x=b.
21
! <y> = 1.2696 FWHM(y) = 3.56
22
! <x> = 1.2696 c + b
23
! FWHM(x) = c(y2-y2) = 3.56c
24
! If kappa = <x>/Wmax << 1, FWHM(x)= 3.98<x> ???
25
! We may use, for Kappa<<1,
26
! 0.35*b = FWHM(x) = 3.56c
27
! so b ~ 10 c
28
! <x> =11.3c;
29
! finally, we obtain
30
! c = <x>/11.3 b=<x>10/11.3
31
!
32
! Method:
33
! let z=exp(-y).
34
! Then, dz=-zdy.
35
! exp(-1/2(y +exp(-y)) dy = exp(-y)^1/2 exp(-1/2exp(-y))dy
36
! = z^1/2 exp(-z/2) /z dz
37
! = z^(-1/2)exp(-z/2)dz
38
! So, sample z from this distribution. get y= -log(z).
39
!
40
!
41
subroutine
ksplandau
(b, c, x)
42
implicit none
43
real*8
b, c, x
44
45
real*8
y, z
46
47
48
call
ksgmrs
(-0.5
d0
, 2.
d0
, z)
49
50
y = -log(z)
51
x = c*y + b
52
end
53
d0
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition:
cblkEvhnp.h:5
ksplandau
subroutine ksplandau(b, c, x)
Definition:
ksplandau.f:42
ksgmrs
subroutine ksgmrs(s, a, x)
Definition:
ksgamd.f:73
KKlib
ksplandau.f
Generated by
1.8.13