COSMOS v7.655
COSMOSv7655
(AirShowerMC)
ce2p.f
Go to the documentation of this file.
1
! ce2p: compute px, py, pz from energy with a given
2
! direction vector and mass.
3
!
4
subroutine
ce2p
(aTrack)
5
implicit none
6
!---- include 'Ztrack.h'
7
#include "Ztrack.h"
8
type
(
track
)::aTrack
9
!
10
real*8
p
11
p = atrack%p%fm%p(4)**2 - atrack%p%mass**2
12
if
(p .lt. 0.)
then
13
! write(*,*) ' p=',p,' code =',aTrack.p.code
14
! since |p| is order of 10^-12
15
p = 0.
16
endif
17
p = sqrt(p)
18
! p = sqrt( aTrack.p.fm.p(4)**2 - aTrack.p.mass**2 )
19
atrack%p%fm%p(1) = p * atrack%vec%w%r(1)
20
atrack%p%fm%p(2) = p * atrack%vec%w%r(2)
21
atrack%p%fm%p(3) = p * atrack%vec%w%r(3)
22
end
ce2p
subroutine ce2p(aTrack)
Definition:
ce2p.f:5
track
Definition:
Ztrack.h:44
Tracking
ce2p.f
Generated by
1.8.13