COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cxyz2det.f
Go to the documentation of this file.
1 ! cxyz2det: xyz to det
2 ! cdet2xyz: det to xyz
3 ! cxyz2detD: xyz to det for Direction cos.
4 ! cdet2xyzD: det to xyz for Direction cos.
5 !
6  subroutine cxyz2det(det, a, b)
7 ! convert coord value in the "xyz" system into "det" system.
8 ! det: /coord/ input. detector coord in "xyz"
9 ! a: /coord/ input. coord in 'xyz'
10 ! b: /coord/ outupt. coord in 'det'
11 !
12  implicit none
13 
14 #include "Zcoord.h"
15 #include "Zobs.h"
16 #include "Zpos.h"
17 #include "Zmagfield.h"
18 #include "Zobsv.h"
19 
20  type(coord)::a
21  type(coord)::b
22  type(coord)::det
23 
24 ! record /coord/ tempa
25  real(8):: temp(3)
26  temp(:) = a%r(:) - det%r(:)
27  b%r(:) = matmul( txyz2det(:,:), temp(:))
28  b%sys = 'det'
29 ! real*8 leng
30 ! coord in "xyz" from the origin of det.
31 
32 ! tempa.r(1) = a.r(1) - det.r(1)
33 ! tempa.r(2) = a.r(2) - det.r(2)
34 ! tempa.r(3) = a.r(3) - det.r(3)
35 ! make it direction cos.
36 ! call c3DV2DDCos(tempa, tempa, leng)
37 ! maket it direction cos in "det" system.
38 ! call ciTransVectZx(1, DetZaxis, DetXaxis, tempa, b)
39 ! to 3D vectors
40 !
41 ! b.r(1) = b.r(1) *leng
42 ! b.r(2) = b.r(2) *leng
43 ! b.r(3) = b.r(3) *leng
44 ! b.sys = 'det'
45  end
46 ! *******************************
47  subroutine cdet2xyz(det, a, b)
48 ! *******************************
49  implicit none
50 
51 #include "Zcoord.h"
52 #include "Zobs.h"
53 #include "Zpos.h"
54 #include "Zmagfield.h"
55 #include "Zobsv.h"
56 
57 !
58 ! why type(coord)::
59  type(coord)::a
60  type(coord)::b
61  type(coord)::det
62  real(8)::temp(3)
63  temp(:) = matmul( tdet2xyz(:,:), a%r(:))
64  b%r(:) = temp(:) + det%r(:)
65  b%sys = 'xyz'
66 ! record /coord/ tempa
67 ! real*8 leng
68 ! to direction cos in 'det'
69 ! call c3DV2DDCos(a, tempa, leng)
70 ! to direction cos in 'zyz'
71 ! call ctransVectZx(1, DetZaxis, DetXaxis,tempa, b)
72 ! to xyz sys
73 ! b.r(1) = b.r(1) *leng + det.r(1)
74 ! b.r(2) = b.r(2) *leng + det.r(2)
75 ! b.r(3) = b.r(3) *leng + det.r(3)
76 ! b.sys = 'xyz'
77  end
78 ! -----------------------------------
79  subroutine cxyz2detd(a, b)
80  implicit none
81 
82 #include "Zcoord.h"
83 #include "Zobs.h"
84 #include "Zpos.h"
85 #include "Zmagfield.h"
86 #include "Zobsv.h"
87 
88 
89 !
90  type(coord)::a
91  type(coord)::b
92  real::temp(3)
93  temp(:) =matmul(txyz2det(:,:), a%r(:))
94  b%r(:) = temp(:)
95  b%sys = 'det'
96 ! call ciTransVectZx(1, DetZaxis, DetXaxis, a, b)
97 ! b.sys = 'det'
98  end
99 ! -----------------------------------------------------
100  subroutine cdet2xyzd(a, b)
101  implicit none
102 #include "Zcoord.h"
103 #include "Zobs.h"
104 #include "Zpos.h"
105 #include "Zmagfield.h"
106 #include "Zobsv.h"
107 
108  type(coord)::a
109  type(coord)::b
110  real(8):: temp(3)
111  temp(:) = matmul( tdet2xyz(:,:), a%r(:))
112  b%r(:) = temp(:)
113 ! call ctransVectZx(1, DetZaxis, DetXaxis, a, b)
114  end
subroutine cxyz2detd(a, b)
Definition: cxyz2det.f:80
subroutine cdet2xyzd(a, b)
Definition: cxyz2det.f:101
subroutine cdet2xyz(det, a, b)
Definition: cxyz2det.f:48
Definition: Zcoord.h:43
subroutine cxyz2det(det, a, b)
Definition: cxyz2det.f:7