COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cobLateral.f
Go to the documentation of this file.
1 c ******************************************************************
2 c * *
3 c * mfoblt: observe lateral distribution of a.s generated by mfobas*
4 c * *
5 c ******************************************************************
6 c
7 c /usage/ call mfoblt(zs, zobas, lvl)
8 c
9 c -- input --
10 c zs: slant depth of electron position (g/cm**2)
11 c zobas: slatn depth of observation position //
12 c lvl: level index of depth
13 c /$mfoo/ age, eno, xa, ya, w1a, w2a
14 c /$mfoi/ rsyma2,
15 c /$mfci/ hrasi, hraso, szarcr, rcrosm, w3inp
16 c /$mfco/ inas1, inas2, rmol2
17 c /$mfch/ blat
18 c
19 c -- process --
20 c 1) a.s. center is obtained assuming the incident electron keeps
21 c current directon upto zobas
22 c 2) establish a.s is symmetric around the center of arrays or not.
23 c 3) lateral distribution is taken as density map
24 c 4) at distances > rcrosm, lateral distribution is taken by arrays
25 c distributed like cross. arrays are equi-distanced in log10
26 c scale.
27 c
28 c -- output --
29 c /$mfoo/ xas, yas, rmoll
30 c /$mfco/ sizei, sizeo, arhorp, arhorm, arverp, arverm
31 c
32 c = = = =
33 c
34  subroutine mfoblt(zs, zobas, lvl)
35 c
36 c
37  include 'Zmfparm.f'
38  include 'Zmfoo.f'
39  include 'Zmfoi.f'
40  include 'Zmfco.f'
41  include 'Zmfci.f'
42  include 'Zmfch.f'
43 c
44 c
45  logical symm
46 c
47 c
48 c
49 c get distance between z and zobas
50  dst = dstair(w3inp, zs, zobas)
51 c a.s. core
52  xas=xa + dst*w1a
53  yas=ya + dst*w2a
54 c molier unit at the level (this may be the one 2 r.l above
55 c the level if blat contains '2'.
56 c and may be halved one if blat contains 'h')
57  rmoll=rmol2(lvl)
58 c (distance from center)**2
59  ras2=xas**2+yas**2
60  if(ras2 .lt. rsyma2) then
61 c a.s. core is very close to center; regard it symmetric
62  symm=.true.
63  else
64  symm=.false.
65  endif
66  if(sqary) then
67 c detect a.s. as densitymap
68  call mfrgas(sizei(1,1,lvl), hrasi, lszi, symm)
69  endif
70 c
71 c lateral by cross:
72 c
73  if(crsary) then
74  call mflcra( arhorp(1,lvl), arhorm(1,lvl), arverp(1,lvl),
75  * arverm(1,lvl), ncrsar, szarcr, rmoll, rcrosm, eno, symm)
76  endif
77 c
78  end
79 c ******************************************************************
80 c * *
81 c * mfrgas: take lateral distribution of a.s with mesh-like arrays *
82 c * *
83 c ******************************************************************
84 c
85 c /usage/ call mfrgas(array,hspan,nm, symm)
86 c
87 c
88 c -- input --
89 c hspan: half of a.s array span (assumed to be rectangular)
90 c nm: no. of arrays is nm*nm
91 c arrays are numbered from 1 to nm in x- as well as y-
92 c direction.
93 c symm: logical. if t, a.s is regarded as symmetric around center
94 c /$mfoo/ eno, rmoll
95 c
96 c -- process --
97 c 1) for each array, compute distance from center of a.s. compute ne
98 c in each array and count it up
99 c 2) in doing so, if a.s. can be regarded as symmetric around array
100 c center, counting-up of ne is done by using symmetry condition
101 c
102 c -- output --
103 c array: 2 dimensional a.s array of which (i,j) component
104 c represents unit array of size hspan*2/nm. the center of
105 c the array span is assumed to be on the 1ry direction.
106 c no. of electrons falling in each unit is counted up.
107 c dimension is (nm,nm).
108 c
109 c
110 c
111 c = = = =
112 c
113  subroutine mfrgas(array, hspan, nm, symm)
114 c
115 c
116 c -inc $mfparm
117 c -inc $mfoo
118  include 'Zmfparm.f'
119  include 'Zmfoo.f'
120  include 'Zmfch.f'
121 c
122 c
123 c
124 c
125  dimension array(nm,nm)
126  logical symm
127 c
128 c
129 c
130 c half size of unit mesh ...
131  harrys=hspan/nm
132 c unit array size
133  arrys=harrys * 2
134 c unit array size in m.u.
135  arrysm=arrys/rmoll
136 c
137 c init of y coordinate of mesh ...
138  ymsh=hspan+harrys
139 c set index for array counter
140  if(symm) then
141  mxindx=nm/2
142  if(mod(nm,2) .ne. 0) mxindx=mxindx+1
143  else
144  mxindx=nm
145  endif
146 c
147 c count ne in each array
148  do j=1,mxindx
149  if(symm) then
150  i1=j
151  else
152  i1=1
153  endif
154 c array y position
155  ymsh=ymsh-arrys
156 c
157 c init of x coordinate of mesh
158  xmsh=-hspan+(i1-2)*arrys+harrys
159 c
160  do i=i1,mxindx
161 c array x position
162  xmsh=xmsh+arrys
163 c
164 c get relative ne in array(i,j): enr
165  call mfnems(harrys, arrysm, xmsh, ymsh, enr)
166 c ne in array
167  an=eno*enr
168 c count-up
169  array(i,j)=array(i,j)+an
170  if(symm) then
171 c use symmetry condition
172 c
173 c
174 c
175 c symmetry position and indexes
176 c
177 c * ! -->i
178 c * a ! b .
179 c * (i,j) ! (m-i+1,j) .
180 c h * ! . c
181 c (j,i) * ! .
182 c * ! . (m-j+1,i)
183 c __________________!_________________
184 c . ! *(m-j+1,m-i+1)
185 c (j,m-i+1). ! *
186 c g . ! * d
187 c . (i,m-j+1) !(m-i+1,m-j+1)
188 c . f ! e *
189 c . ! *
190 c !
191 c j
192 c *** logic for symm case has been tested (82.07.16)
193 c
194  k1=nm-i+1
195  k2=nm-j+1
196 c avoid overlapped counting
197  if(i .ne. k1) then
198 c /b/
199  array(k1,j)=array(k1,j)+an
200 c /d/
201  array(k2,k1)=array(k2,k1) + an
202 c /f/
203  array(i,k2)=array(i,k2) + an
204  endif
205  if(i .ne. j) then
206 c /c/
207  array(k2,i)=array(k2,i) + an
208 c /g/
209  array(j, k1)=array(j, k1) + an
210 c /e/
211  array(k1,k2)=array(k1,k2) + an
212 c /h/; for /h/ overlap with /g/ also
213 c avoided
214  if(i .ne. k1)
215  * array(j,i)=array(j,i) + an
216  endif
217  endif
218  enddo
219  enddo
220  end
221 c ******************************************************************
222 c * *
223 c * mfnems: computes electron no. in a given square mesh using *
224 c * n-k function. electron no. is normalized to give 1 *
225 c * when integralated over area. *
226 c * *
227 c ******************************************************************
228 c
229 c /usage/ call mfnems(ha, am, xmsh, ymsh, enr)
230 c
231 c
232 c -- input --
233 c ha: half of array size (in cm)
234 c am: array size in m.u.
235 c xmsh: x of the center of the array, measured in 1ry system (cm)
236 c ymsh: y //
237 c /$mfoo/ age, xas, yas, rmoll
238 c
239 c -- process --
240 c 1) using n-k or greisen's formula or formula by m.c
241 c for lateral structure function,
242 c normalized electron no. is computed which falls in a given
243 c mesh area.
244 c
245 c -- output --
246 c enr: normalized electron no. falling in the given mesh.
247 c
248 c
249 c
250 c = = = =
251 c
252  subroutine mfnems(ha, am, xmsh, ymsh, enr)
253 c
254 c -inc $mfparm
255 c -inc $mfoo
256  include 'Zmfparm.f'
257  include 'Zmfoo.f'
258  include 'Zmfch.f'
259 c
260  data sqrtpi/1.77246/
261 c
262 c
263 c distance to a.s. core from the current mesh (m.u.)
264 c
265 c
266  r=sqrt( (xmsh-xas)**2 + (ymsh-yas)**2 ) /rmoll
267  if(abs(xmsh-xas) .gt. ha .or. abs(ymsh-yas) .gt. ha) then
268 c a.s core is outside of mesh
269  if(blat .eq. 'mc') then
270  call mnkg(age, r, rho)
271  else
272  call nkg(age, r, rho)
273  endif
274  enr=rho*am*am
275  else
276 c a.s core is inside of mesh
277  if(blat .eq. 'mc') then
278  call mnkgsf(age, r0, a, b, cs)
279  rr=(r+am/sqrtpi)/r0
280  enr=cs*2/(age+2.-a)*am*am* rr**(age-a)
281  else
282  rr=(r+am/sqrtpi)
283  cs=csnkg(age)
284  enr=cs*2/age* am*am * rr**(age-2.)
285  endif
286  endif
287  end
288 c ******************************************************************
289 c * *
290 c * mflcra: takes lateral distribution of a.s. with cross-like *
291 c * arrayes. each array is separated equally on log10 *
292 c * scale (1 scale is devided by 5). *
293 c * *
294 c ******************************************************************
295 c
296 c /usage/ call mflcra(ahp, ahm, avp, avm, nm, aa, rmoll,
297 c * r1, eno, symm)
298 c
299 c -- input --
300 c nm: no. of arrays in each wing. (see fig.)
301 c aa: unit array size (in cm)
302 c r1: minimum array position from center of
303 c 1ry direction (in cm). must be > 0
304 c rmoll: m.u. at the level
305 c eno: total electron no. of the shower
306 c symm: if symmetrical shower, t
307 c
308 c c
309 c * nm
310 c
311 c * 2
312 c * 1
313 c
314 c b : : : + : : : a
315 c !-r1-! 1 2 nm
316 c *
317 c *
318 c
319 c *
320 c d
321 c
322 c -- process --
323 c 1) using mfnems, electron no. is computed in each array and counted
324 c up.
325 c
326 c -- output --
327 c ahp: to express arrays in a-direction
328 c ahm: // b
329 c avp: // c
330 c avm: // d
331 c
332 c
333 c = = = =
334 c
335  subroutine mflcra(ahp, ahm, avp, avm, nm, aa, rmoll,
336  * r1, eno, symm)
337 c
338 c
339 c
340  dimension ahp(nm),ahm(nm),avp(nm),avm(nm)
341  logical symm
342 c
343 c 10**.2 array position step(equi-distance in log10)
344  data dz/1.58489/
345 c
346 c half of array size
347  harys=aa/2
348 c array size in m.u
349  arysm= aa/rmoll
350 c first array position (x or y)
351  z = r1
352 c
353  do k=1,nm
354 c
355 c array in a-direction
356  call mfnems(harys, arysm, z, 0., enr)
357  ahp(k)=ahp(k) + enr*eno
358 c array in b-direction
359  if(.not. symm) then
360  call mfnems(harys, arysm, -z, 0., enr)
361  endif
362  ahm(k)=ahm(k) + enr*eno
363 c array in c-direction
364  if(.not. symm) then
365  call mfnems(harys, arysm, 0., z, enr)
366  endif
367  avp(k)=avp(k) + enr*eno
368 c array in d-direction
369  if(.not. symm) then
370  call mfnems(harys, arysm, 0., -z, enr)
371  endif
372  avm(k)=avm(k) + enr*eno
373 c
374  z =z * dz
375  enddo
376  end
nodes z
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz r
Definition: ZavoidUnionMap.h:1
nodes i
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon true
Definition: cblkElemag.h:7
subroutine mfrgas(array, hspan, nm, symm)
Definition: cobLateral.f:114
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
! constants thru Cosmos real * sqrtpi
Definition: Zglobalc.h:2
subroutine mflcra(ahp, ahm, avp, avm, nm, aa, rmoll, r1, eno, symm)
Definition: cobLateral.f:337
nodes a
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hlhmi common comstdatm ha
Definition: Zstdatmos.h:7
dE dx *! Nuc Int sampling table b
Definition: cblkMuInt.h:130
subroutine mfnems(ha, am, xmsh, ymsh, enr)
Definition: cobLateral.f:253
subroutine mfoblt(zs, zobas, lvl)
Definition: cobLateral.f:35
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon ! knockon is considered Obsolete *PhotoProd false
Definition: cblkElemag.h:7