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

Go to the source code of this file.

Functions/Subroutines

subroutine cresetmom (aTrack)
 
subroutine cresetmombyedir (aTrack)
 

Function/Subroutine Documentation

◆ cresetmom()

subroutine cresetmom ( type(track aTrack)

Definition at line 2 of file cresetMom.f.

References cpxyzp().

Referenced by cputdeflection().

2 ! Assum the case where the direction cos has been changed
3 ! and the directionof vector p should be changed.
4 ! (see cresetMombyEDir)
5  implicit none
6 
7 #include "Ztrack.h"
8  type(track)::atrack ! input/output.
9 !
10  real*8 p
11  call cpxyzp(atrack%p%fm, p)
12  atrack%p%fm%p(1) = p * atrack%vec%w%r(1)
13  atrack%p%fm%p(2) = p * atrack%vec%w%r(2)
14  atrack%p%fm%p(3) = p * atrack%vec%w%r(3)
15 
subroutine cpxyzp(po, pabs)
Definition: cpxyzp.f:3
Definition: Ztrack.h:44
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cresetmombyedir()

subroutine cresetmombyedir ( type(track aTrack)

Definition at line 19 of file cresetMom.f.

Referenced by cifxobssite().

19 ! Assume the case where the direction cos is correctly given
20 ! and E has beeen changed, Vec p should not be used.
21 
22 ! If E< mass, E is reset to mass. and vec p becomes 0.
23  implicit none
24 #include "Ztrack.h"
25  type(track)::atrack ! input/output.
26  real(8)::pabs
27  pabs = atrack%p%fm%p(4)**2 - atrack%p%mass**2
28  if( pabs <= 0. ) then
29  atrack%p%fm%p(4) = atrack%p%mass
30  pabs = 0.
31  else
32  pabs = sqrt(pabs)
33  endif
34  atrack%p%fm%p(1:3) = atrack%vec%w%r(1:3)*pabs
Definition: Ztrack.h:44
Here is the caller graph for this function: