COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cgetZenith.f
Go to the documentation of this file.
1 #include "ZsubstRec.h"
2 !
3  subroutine csetdircos(dc, aTrack)
4  implicit none
5 
6 #include "Ztrack.h"
7  type(track)::aTrack
8  type(coord)::dc
9 !
10 #ifdef SUBSTREC
11  atrack%vec%w = dc
12 #else
13  atrack%vec%w%r = dc%r
14 #endif
15  call cgetzenith(atrack, atrack%vec%coszenith)
16  end
17 ! get cos of zenith angle from track information
18 !
19  subroutine cgetzenith(aTrack, cosz)
20  implicit none
21 
22 #include "Ztrack.h"
23  type(track)::aTrack
24  real*8 cosz
25 
26 !
27  cosz = - (atrack%vec%w%r(1) * atrack%pos%xyz%r(1) +
28  * atrack%vec%w%r(2) * atrack%pos%xyz%r(2) +
29  * atrack%vec%w%r(3) * atrack%pos%xyz%r(3))/
30  * atrack%pos%radiallen
31  if(cosz .gt. 1.d0) then
32  cosz = 1.d0
33  elseif(cosz .lt. -1.d0) then
34  cosz = -1.d0
35  endif
36  ! or
37 ! * sqrt(aTrack.pos.xyz.r(1)**2 +
38 ! * aTrack.pos.xyz.r(2)**2 +
39 ! * aTrack.pos.xyz.r(3)**2)
40  end
Definition: Ztrack.h:44
subroutine cgetzenith(aTrack, cosz)
Definition: cgetZenith.f:20
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine csetdircos(dc, aTrack)
Definition: cgetZenith.f:4
Definition: Zcoord.h:43