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

Go to the source code of this file.

Functions/Subroutines

subroutine cxyz2prim (base, a, b)
 
subroutine cxyz2primd (a, b)
 
subroutine cprim2xyz (base, a, b)
 
subroutine cprim2xyzd (a, b)
 

Function/Subroutine Documentation

◆ cprim2xyz()

subroutine cprim2xyz ( type(coord base,
type(coord a,
type(coord b 
)

Definition at line 64 of file cxyz2prim.f.

Referenced by cprim2detfe(), cprim2xyzfe(), and cxyz2primfe().

64  implicit none
65 ! inverse of xyz2prim
66 #include "Zcoord.h"
67 #include "Zobs.h"
68 #include "Zpos.h"
69 #include "Zmagfield.h"
70 #include "Zobsv.h"
71 
72 
73 ! origin of base detector
74  type(coord)::base ! base detector coord. whose origin is the
75  ! origin of 1ry system.
76  type(coord)::a ! input. coord. in 'prim'
77  type(coord)::b ! output. transformed coord. in 'xyz'
78 
79  real(8):: temp(3)
80  temp(:) = matmul(tprim2xyz(:,:), a%r(:))
81  b%r(:) = temp(:) + base%r(:)
82  b%sys = 'xyz'
real(4), dimension(:), allocatable, save temp
Definition: cNRLAtmos.f:29
real(4), save a
Definition: cNRLAtmos.f:20
real(4), save b
Definition: cNRLAtmos.f:21
Definition: Zcoord.h:43
Here is the caller graph for this function:

◆ cprim2xyzd()

subroutine cprim2xyzd ( type(coord a,
type(coord b 
)

Definition at line 86 of file cxyz2prim.f.

Referenced by cprim2detfe(), cprim2xyzfe(), and cxyz2primfe().

86  implicit none
87 !
88 #include "Zcoord.h"
89 #include "Zobs.h"
90 #include "Zpos.h"
91 #include "Zmagfield.h"
92 #include "Zobsv.h"
93 
94  type(coord)::a
95  type(coord)::b
96  real(8):: temp(3)
97  temp(:) = matmul(tprim2xyz(:,:), a%r(:))
98  b%r(:) = temp(:)
99  b%sys = 'xyz'
real(4), dimension(:), allocatable, save temp
Definition: cNRLAtmos.f:29
real(4), save a
Definition: cNRLAtmos.f:20
real(4), save b
Definition: cNRLAtmos.f:21
Definition: Zcoord.h:43
Here is the caller graph for this function:

◆ cxyz2prim()

subroutine cxyz2prim ( type(coord base,
type(coord a,
type(coord b 
)

Definition at line 5 of file cxyz2prim.f.

Referenced by ccoordfortr(), cdet2primfe(), cifxperpen(), cinitracking(), cobservation(), convcoord(), and csetthinwgt().

5  implicit none
6 !
7 #include "Zcoord.h"
8 #include "Zobs.h"
9 #include "Zpos.h"
10 #include "Zmagfield.h"
11 #include "Zobsv.h"
12 
13 ! origin of primary system is the
14 ! origin of this deepest detector
15  type(coord)::base ! base detector coord. whose origin is the
16  ! origin of 1ry system.
17  type(coord)::a ! input. coord. in 'xyz'
18  type(coord)::b ! output. transformed coord. in 'prim'
19 
20  real(8):: temp(3)
21  temp(:) = a%r(:) - base%r(:)
22  b%r(:) = matmul(txyz2prim(:,:), temp)
23  b%sys = 'prim'
24 ! old one (<= v7.637)
25 ! record /coord/ tempa
26 ! coord in "xyz" from the origin of det.
27 ! tempa.r(1) = a.r(1) - base.r(1)
28 ! tempa.r(2) = a.r(2) - base.r(2)
29 ! tempa.r(3) = a.r(3) - base.r(3)
30 ! call cscalerProd(tempa, Xprimary, b.r(1))
31 ! call cscalerProd(tempa, Yprimary, b.r(2))
32 ! call cscalerProd(tempa, Zprimary, b.r(3))
33 ! b.sys = 'prim'
real(4), dimension(:), allocatable, save temp
Definition: cNRLAtmos.f:29
real(4), save a
Definition: cNRLAtmos.f:20
real(4), save b
Definition: cNRLAtmos.f:21
Definition: Zcoord.h:43
Here is the caller graph for this function:

◆ cxyz2primd()

subroutine cxyz2primd ( type(coord a,
type(coord b 
)

Definition at line 37 of file cxyz2prim.f.

Referenced by cdet2primfe(), cifxperpen(), and cobservation().

37  implicit none
38 !
39 #include "Zcoord.h"
40 #include "Zobs.h"
41 #include "Zpos.h"
42 #include "Zmagfield.h"
43 #include "Zobsv.h"
44 
45  type(coord)::a
46  type(coord)::b
47  real(8):: temp(3)
48  temp(:) = matmul(txyz2prim(:,:), a%r(:))
49  b%r(:) = temp(:)
50  b%sys = 'prim'
51 ! old version (<= 7.637)
52 ! record /coord/temp
53 
54 ! b can be a
55 
56 ! call cscalerProd(a, Xprimary, temp.r(1))
57 ! call cscalerProd(a, Yprimary, temp.r(2))
58 ! call cscalerProd(a, Zprimary, temp.r(3))
59 ! b = temp
60 ! b.sys = 'prim'
real(4), dimension(:), allocatable, save temp
Definition: cNRLAtmos.f:29
real(4), save a
Definition: cNRLAtmos.f:20
real(4), save b
Definition: cNRLAtmos.f:21
Definition: Zcoord.h:43
Here is the caller graph for this function: