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

Go to the source code of this file.

Functions/Subroutines

subroutine cgetrotmat4 (m, ang, rm)
 
subroutine cinvrotmat4 (rm, rmn)
 
subroutine cmultrotmat4 (a, b, c)
 
subroutine capplyrot4 (a, v, vn)
 

Function/Subroutine Documentation

◆ capplyrot4()

subroutine capplyrot4 ( real*8, dimension(4,4)  a,
type(fmom v,
type(fmom vn 
)

Definition at line 148 of file cgetRotMat4.f.

Referenced by clorep(), and cuonsphere().

148 ! 3-d transformation matrix a is multiplied by
149 ! a vector v to obtain a new vector vn.
150 ! vn can be v.
151 !
152  implicit none
153 !---- include '../Zptcl.h'
154 #include "Zptcl.h"
155  type(fmom):: v, vn
156  real*8 a(4,4)
157  type(fmom):: tmp
158 !
159  real*8 sum
160  integer i, j
161 !
162  do i=1, 3
163  sum=0.
164  do j=1, 4
165  sum=sum + a(i, j)*v%p(j)
166  enddo
167  tmp%p(i)=sum
168  enddo
169  vn = tmp
nodes i
Definition: Zptcl.h:72
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
real(4), save a
Definition: cNRLAtmos.f:20
Here is the caller graph for this function:

◆ cgetrotmat4()

subroutine cgetrotmat4 ( integer  m,
real*8  ang,
real*8, dimension(4, 4)  rm 
)

Definition at line 79 of file cgetRotMat4.f.

References cos, and d0.

Referenced by clorep(), and cuonsphere().

79  implicit none
80 !
81  integer m
82  real*8 ang
83  real*8 rm(4, 4)
84 !
85  integer i, j, m1, m2
86  real*8 c, s
87 !
88  if(m .ge. 1 .and. m .le. 3) then
89  do i=1, 4
90  do j=1, 4
91  rm(i, j)= 0.d0
92  enddo
93  enddo
94  rm(4,4)=1.d0
95  rm(m, m)=1.d0
96  m1=mod(m,3)+1
97  m2=mod(m1,3)+1
98  c=cos(ang)
99  s=sin(ang)
100  rm(m1,m1)=c
101  rm(m2,m2)=c
102  rm(m1,m2)=s
103  rm(m2,m1)=-s
104  else
105  write(*,*) ' invalid m=',m,' to cgetRotMat4 '
106  stop 9999
107  endif
nodes i
! for length to thickness conversion or v v ! integer maxnodes real Hinf ! This is used when making table for dim simulation ! The slant length for vertical height to km is ! divided by LenStep m steps ! It can cover the slant length of about km for cos
Definition: Zatmos.h:8
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
block data include Zlatfit h c fitting region data data data data data d0 data data d0 data data m
Definition: ZlatfitBD.h:35
dE dx *! Nuc Int sampling table c
Definition: cblkMuInt.h:130
Here is the caller graph for this function:

◆ cinvrotmat4()

subroutine cinvrotmat4 ( real*8, dimension(4,4)  rm,
real*8, dimension(4,4)  rmn 
)

Definition at line 110 of file cgetRotMat4.f.

Referenced by clorep().

110 ! Invert rotation matrix rm and put into rmn.
111 ! rm should be a roation matrix made by calling
112 ! cgetRotMat4 (with ang). rmn can be made by calling
113 ! cgetRotMat4 with -ang, too. this one is to avoid
114 ! computing the cos and sin for reducing time.
115 ! rmn cannot be the same arrays as rm.
116 ! rmn is nothing but the transposed matrix of rm.
117  implicit none
118  real*8 rm(4,4), rmn(4,4)
119  integer i, j
120  do i=1,4
121  do j=i+1, 4
122  rmn(i,j)=rm(j, i)
123  rmn(j,i)=rm(i, j)
124  enddo
125  enddo
126  do i=1, 4
127  rmn(i,i)=rm(i, i)
128  enddo
nodes i
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
Here is the caller graph for this function:

◆ cmultrotmat4()

subroutine cmultrotmat4 ( real*8, dimension(4,4)  a,
real*8, dimension(4,4)  b,
real*8, dimension(4,4)  c 
)

Definition at line 131 of file cgetRotMat4.f.

Referenced by clorep(), and cuonsphere().

131 ! 3-d matrix product c=a*b
132 ! c cannot be either of a or b.
133  implicit none
134  real*8 a(4,4), b(4,4), c(4,4)
135  integer i, j, k
136  real*8 ab
137  do i=1, 4
138  do j=1, 4
139  ab=0.
140  do k=1, 4
141  ab=ab+ a(i,k)*b(k,j)
142  enddo
143  c(i,j)=ab
144  enddo
145  enddo
nodes i
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
real(4), save a
Definition: cNRLAtmos.f:20
real(4), save b
Definition: cNRLAtmos.f:21
dE dx *! Nuc Int sampling table c
Definition: cblkMuInt.h:130
Here is the caller graph for this function: