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

Go to the source code of this file.

Functions/Subroutines

subroutine mfgmf0 (bh, bv, w01, w02, w03, bt)
 

Function/Subroutine Documentation

◆ mfgmf0()

subroutine mfgmf0 (   bh,
  bv,
  w01,
  w02,
  w03,
  bt 
)

Definition at line 88 of file cgmf0orig.f.

References b, dx, e, p, x, xs, y, and z.

88 c
89  dimension tm(3,3)
90  data small /1.e-3/
91  save b, tm, cosa, sina
92  real*8 dst
93 c
94 c mag. of gmf
95  b=sqrt(bh**2 + bv**2)
96 c cos(alfa)
97  cosa=(bh * w02 + bv * w03)/b
98  cosa2=cosa**2
99  sina=sqrt(1. - cosa2)
100  bt=b * sina
101  sb2= w01**2 + (bh/b-w02)**2 + (bv/b-w03)**2
102  if(sb2 .gt. small) then
103  cota=cosa/sina
104  tm(1,1)= ( bh*w03 - bv*w02 ) /bt
105  tm(1,2)= -cota*w01
106  tm(1,3)= w01
107  tm(2,1)= bv*w01/bt
108  tm(2,2)= bh/bt - cota*w02
109  tm(2,3)= w02
110  tm(3,1)= -bh*w01/bt
111  tm(3,2)= bv/bt - cota*w03
112  tm(3,3)= w03
113  else
114  tm(1,1)= 1.
115  tm(1,2)= 0.
116  tm(1,3)= 0.
117  tm(2,1)= 0.
118  tm(2,2)=bv/b
119  tm(2,3)=bh/b
120  tm(3,1)=0.
121  tm(3,2)= -bh/b
122  tm(3,3)= bv/b
123  endif
124  return
125 c
126 c
127 c ************
128  entry mfgeom(p, iz, dst, w1i, w2i, w3i, dx, dy, tx, ty)
129 c ************
130 c
131  if(iz .eq. 0) then
132  dx=0
133  dy=0
134  tx=0
135  ty=0
136  else
137  z=iz
138  wt=z*b*dst*3.e-10/p
139  wt2=wt**2/2
140  ak=wt*dst/2
141 c
142  dx= (cosa*w2i - sina*w3i) *ak
143  dy= - ak*cosa*w1i
144 c
145 c tx= (cosa*w2i - sina*w3i) *wt - wt2 *w1i
146  tx= (cosa*w2i - sina*w3i) *wt
147 c ty= -wt*cosa*w1i - (cosa2*w2i - sina2*w3i)*wt2
148  ty= -wt*cosa*w1i
149 c tz= sina*wt*w1i + (csa *w2i - sina2*w3i)*wt2
150  tz= sina*wt*w1i
151  endif
152  return
153 c
154 c convert (x,y,z) in 1ry system into * system
155 c ************
156  entry mfptos(x, y, z, xs, ys, zs)
157 c ************
158 c
159  tmp1= tm(1,1)*x + tm(1,2)*y + tm(1,3)*z
160  tmp2= tm(2,1)*x + tm(2,2)*y + tm(2,3)*z
161  zs = tm(3,1)*x + tm(3,2)*y + tm(3,3)*z
162  xs = tmp1
163  ys = tmp2
164  return
165 c
166 c convert (x,y,z) in * system into 1ry system
167 c ************
168  entry mfstop(xs, ys, zs, x, y, z)
169 c ************
170 c
171  tmp1= tm(1,1)*xs + tm(2,1)*ys + tm(3,1)*zs
172  tmp2= tm(1,2)*xs + tm(2,2)*ys + tm(3,2)*zs
173  z = tm(1,3)*xs + tm(2,3)*ys + tm(3,3)*zs
174  x = tmp1
175  y = tmp2
nodes z
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
integer npitbl real *nx dx real dx
Definition: Zcinippxc.h:10
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
latitude latitude this system is used *****************************************************************! type coord sequence union map real y
Definition: Zcoord.h:25
real(4), save b
Definition: cNRLAtmos.f:21
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21