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

Go to the source code of this file.

Functions/Subroutines

subroutine cresetdirec (aTrack)
 

Function/Subroutine Documentation

◆ cresetdirec()

subroutine cresetdirec ( type(track aTrack)

Definition at line 5 of file cresetDirec.f.

References cgetzenith(), and cpxyzp().

Referenced by cmove_c_stack(), cmoveptcl3(), and movetrack().

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)
subroutine cpxyzp(po, pabs)
Definition: cpxyzp.f:3
Definition: Ztrack.h:44
subroutine cgetzenith(aTrack, cosz)
Definition: cgetZenith.f:20
Here is the call graph for this function:
Here is the caller graph for this function: