COSMOS v7.655
COSMOSv7655
(AirShowerMC)
cgetcm.f
Go to the documentation of this file.
1
! testing cgetcm; getting cm frame of two particles
2
! include 'cgetlf.f'
3
! include 'clorez.f'
4
! include 'cgeqm.f'
5
! --------------------------------------
6
!
7
! implicit none
8
! include '../Zptcl.h'
9
!
10
! type(fmom):: gc, p1, p2, gci
11
! type(ptcl):: pp1, pp2, t1, t2
12
! integer icon
13
! p1.x=0.
14
! p1.y=0.
15
! p1.z=1.e3
16
! p2.x=0.
17
! p2.y=0.
18
! p2.z=0.
19
!
20
! pp1.mass=.938
21
! pp2.mass=.938
22
! p1.e=sqrt(p1.x**2 + p1.y**2+p1.z**2 + pp1.mass**2)
23
! p2.e=sqrt(p2.x**2 + p2.y**2+p2.z**2 + pp2.mass**2)
24
! pp1.fm = p1
25
! pp2.fm = p2
26
! call cgetcm(pp1, pp2, gc, icon)
27
! write(*, *) gc.p
28
! t1 = pp1
29
! t2 = pp2
30
! gci.x = - gc.x
31
! gci.y = - gc.y
32
! gci.z = - gc.z
33
! gci.t = gc.t
34
! call clorez(gci, pp1, t1)
35
! call clorez(gci, pp2, t2)
36
! write(*, *) t1.fm.p, t2.fm.p
37
! call cgetcm(t1, t2, gc, icon)
38
! write(*, *) gc.p
39
! end
40
subroutine
cgetcm
(p1, p2, gc, icon)
41
! get Lorentz factor of the Center of Momentum
42
! system of arbitrary two particles.
43
! p1: type ptcl. Input. particle 1
44
! p2: type ptcl. Input. particle 2
45
! gc: type fmom. Output. (g*beta, g) of the
46
! cm frame.
47
! icon: integer. output. 0 -> ok. 1 -> no cms definable.
48
! if icon = 1, gc is undef.
49
implicit none
50
!---- include '../Zptcl.h'
51
#include "Zptcl.h"
52
type
(
ptcl
):: p1, p2
53
type
(
fmom
):: gc
54
!
55
type
(
fmom
):: q
56
57
integer
icon
58
!
59
call
cgeqm
(p1, p2, q, icon)
60
if
(icon .eq. 0)
then
61
! get Lorentz factor of q
62
call
cgetlf
(q, gc)
63
endif
64
end
65
cgeqm
subroutine cgeqm(p1, p2, q, icon)
Definition:
cgeqm.f:2
fmom
Definition:
Zptcl.h:72
cgetlf
subroutine cgetlf(p, gb)
Definition:
cgetlf.f:2
ptcl
Definition:
Zptcl.h:75
cgetcm
subroutine cgetcm(p1, p2, gc, icon)
Definition:
cgetcm.f:41
Particle
Clib
cgetcm.f
Generated by
1.8.13