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

Go to the source code of this file.

Functions/Subroutines

subroutine mfoblt (zs, zobas, lvl)
 
subroutine mfrgas (array, hspan, nm, symm)
 
subroutine mfnems (ha, am, xmsh, ymsh, enr)
 
subroutine mflcra (ahp, ahm, avp, avm, nm, aa, rmoll, r1, eno, symm)
 

Function/Subroutine Documentation

◆ mflcra()

subroutine mflcra ( dimension(nm)  ahp,
dimension(nm)  ahm,
dimension(nm)  avp,
dimension(nm)  avm,
  nm,
  aa,
  rmoll,
  r1,
  eno,
logical  symm 
)

Definition at line 337 of file cobLateral.f.

References mfnems(), and z.

Referenced by mfoblt().

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
nodes z
subroutine mfnems(ha, am, xmsh, ymsh, enr)
Definition: cobLateral.f:253
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mfnems()

subroutine mfnems (   ha,
  am,
  xmsh,
  ymsh,
  enr 
)

Definition at line 253 of file cobLateral.f.

References a, b, ha, r, and sqrtpi.

Referenced by mflcra(), and mfrgas().

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
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz r
Definition: ZavoidUnionMap.h:1
! constants thru Cosmos real * sqrtpi
Definition: Zglobalc.h:2
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hlhmi common comstdatm ha
Definition: Zstdatmos.h:7
real(4), save a
Definition: cNRLAtmos.f:20
real(4), save b
Definition: cNRLAtmos.f:21
Here is the caller graph for this function:

◆ mfoblt()

subroutine mfoblt (   zs,
  zobas,
  lvl 
)

Definition at line 35 of file cobLateral.f.

References false, mflcra(), mfrgas(), and true.

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
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
subroutine mflcra(ahp, ahm, avp, avm, nm, aa, rmoll, r1, eno, symm)
Definition: cobLateral.f:337
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
Here is the call graph for this function:

◆ mfrgas()

subroutine mfrgas ( dimension(nm,nm)  array,
  hspan,
  nm,
logical  symm 
)

Definition at line 114 of file cobLateral.f.

References i, j, and mfnems().

Referenced by mfoblt().

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
nodes i
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
subroutine mfnems(ha, am, xmsh, ymsh, enr)
Definition: cobLateral.f:253
Here is the call graph for this function:
Here is the caller graph for this function: