COSMOS v7.655
COSMOSv7655
(AirShowerMC)
ksbwig.f
Go to the documentation of this file.
1
! to test ksbwig: sampling of breight-wigner type function
2
! implicit none
3
! integer i
4
! real*8 e
5
! do i=1, 50000
6
! call ksbwig(770.d0, 150.d0, e)
7
! write(*, *) sngl(e)
8
! enddo
9
! end
10
! *************************************************************
11
! *
12
! * ksbwig: give a random variable followng the breight-wigner
13
! * type distribution
14
! *
15
! * note: no cut on the both sides of the distribution is made.
16
! * The user should do it for physical applications
17
! *
18
! *************************************************************
19
!
20
! ksbwig(e0, g, e)
21
! distribution funcition is
22
! de/( (e-e0)**2 + (g/2)**2)
23
!
24
subroutine
ksbwig
(e0, g, e)
25
implicit none
26
real*8
e0, g, e
27
real*8
u, pi
28
29
parameter
(pi=3.141592653589793238)
30
call
rndc
(u)
31
e=g/2 * tan( (u-.5)*pi ) + e0
32
end
parameter
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
rndc
subroutine rndc(u)
Definition:
rnd.f:91
ksbwig
subroutine ksbwig(e0, g, e)
Definition:
ksbwig.f:25
KKlib
ksbwig.f
Generated by
1.8.13