COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cresetDirec.f
Go to the documentation of this file.
1 ! call this when momentum has been changed to reset the
2 ! direction information.
3 !
4  subroutine cresetdirec(aTrack)
5  implicit none
6 
7 #include "Ztrack.h"
8  type(track)::aTrack
9 !
10  real*8 pabs
11 
12  call cpxyzp(atrack%p%fm, pabs)
13  if(pabs .gt. 0) then
14  atrack%vec%w%r(1) = atrack%p%fm%p(1)/pabs
15  atrack%vec%w%r(2) = atrack%p%fm%p(2)/pabs
16  atrack%vec%w%r(3) = atrack%p%fm%p(3)/pabs
17  else
18  atrack%vec%w%r(1) = 0.
19  atrack%vec%w%r(2) = 0.
20  atrack%vec%w%r(3) = 1.
21  endif
22  call cgetzenith(atrack, atrack%vec%coszenith)
23  end
24 
25 
26 
subroutine cpxyzp(po, pabs)
Definition: cpxyzp.f:3
Definition: Ztrack.h:44
subroutine cgetzenith(aTrack, cosz)
Definition: cgetZenith.f:20
subroutine cresetdirec(aTrack)
Definition: cresetDirec.f:5