COSMOS v7.655  COSMOSv7655
(AirShowerMC)
csptxy.f
Go to the documentation of this file.
1 ! *****************************************************************
2 ! * *
3 ! * csptxy: set ptx, pty
4 ! * *
5 ! *****************************************************************
6 !
7 !
8  subroutine csptxy(a, nt)
9 ! a(nt): type ptcl. Input. At this moment, pt is assumed
10 ! to be in a(i).fm.p(3) (=ptz) position.
11 !
12  implicit none
13 
14 #include "Zptcl.h"
15 !
16  integer nt
17  type(ptcl):: a(nt)
18 !
19  integer i
20  real*8 cs, sn, pt
21 !
22  do i=1, nt
23 ! sample cos and sin of random azimuthal angle
24  call kcossn(cs,sn)
25  pt = a(i)%fm%p(3)
26 ! store ptx,pty
27  a(i)%fm%p(1) = pt * cs
28  a(i)%fm%p(2) = pt * sn
29  enddo
30  end
subroutine kcossn(cs, sn)
Definition: kcossn.f:13
subroutine csptxy(a, nt)
Definition: csptxy.f:9
Definition: Zptcl.h:75