COSMOS v7.655  COSMOSv7655
(AirShowerMC)
kcossn.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine kcossn (cs, sn)
 

Function/Subroutine Documentation

◆ kcossn()

subroutine kcossn ( real*8  cs,
real*8  sn 
)

Definition at line 13 of file kcossn.f.

References d0, and rndc().

Referenced by __test.f__(), c2bdc0(), c2bdcp(), c2bdcy(), canihi(), cbrems(), ccapnu(), ccohs(), ccompt(), celecdef(), cknockon(), cnbdc1(), cpair(), cpcos2pxyz(), cphotoee(), cresetposang(), csampfermim(), csampfragmom(), csetknock(), csprimang(), and csptxy().

13 ! to generate cos(phy),sin(phy), where phy is uniform in (0,2pi).
14 ! reuired subprogram. rndc
15  implicit none
16  real*8 cs, sn
17 !
18  real*8 u, v, a, b, c
19  c = 5.d0
20 
21  do while (c .gt. 1.d0)
22  call rndc(u)
23  call rndc(v)
24  v=v+v-1.
25  a=u*u
26  b=v*v
27  c=a+b
28  enddo
29 
30  cs=(a-b)/c
31  sn=2.*u*v/c
subroutine rndc(u)
Definition: rnd.f:91
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
real(4), save a
Definition: cNRLAtmos.f:20
real(4), save b
Definition: cNRLAtmos.f:21
dE dx *! Nuc Int sampling table c
Definition: cblkMuInt.h:130
Here is the call graph for this function:
Here is the caller graph for this function: