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

Go to the source code of this file.

Functions/Subroutines

subroutine xbgrun
 

Function/Subroutine Documentation

◆ xbgrun()

subroutine xbgrun ( )

Definition at line 2 of file interface.f.

References b, bin, c, cgetfname(), charge, cmintime2websec(), copenfw2(), cos, cqfirstid(), cqincident(), csetmuonpol(), csortstack(), d, d0, e, false, histdep(), kelec, kmuon, kphoton, kseblk(), kwhist(), kwhistai(), kwhistc(), kwhistd(), kwhistdir(), kwhistev(), kwhisti(), kwhistid(), kwhistp(), kwhists(), kwhistso(), mass, ne, nfai, ng, nmu, nrbin, p, subcode, t, tkarspec, tkrtspec, true, wgt, x, xyz, and y.

2  implicit none
3 #include "Zmaxdef.h"
4 #include "Zglobalc.h"
5 #include "Zmanagerp.h"
6 #include "Ztrack.h"
7 #include "Ztrackp.h"
8 #include "Ztrackv.h"
9 #include "Zcode.h"
10 #include "Zheavyp.h"
11 #include "Zobs.h"
12 #include "Zobsp.h"
13 #include "Zobsv.h"
14 #include "Zstackv.h"
15 #include "Zprivate.h"
16 #include "Zprivate2.h"
17 #include "../Zabsorb.h"
18  integer id ! input. 1 ==> aTrack is going out from
19 ! outer boundery.
20 ! 2 ==> reached at an observation level
21 ! 3 ==> reached at inner boundery.
22  type(track):: atrack
23 
24 ! type(track):: inci
25 !////////////
26  type(coord):: pdir, cdir
27 !////////////
28  type(coord):: tetafai
29 
30  character*128 input
31  character*64 dirstr
32  real sr, dr, tempr
33  integer i, j, k, m, icon
34  integer ansites
35  save ansites
36  integer iij, code
37  integer i1, i2, ic
38  integer ir, ifai, l, ridx, faiidx
39  real*8 e0, cosz
40  real*8 fai0, fai, sint
41  real*8 delta
42  integer reducedtime
43  integer nn
44  integer klena
45  integer w2hl(maxnoofsites)
46  real*8 r, eloss, rinmu, cosang
47  real*8 dedt, dedtf, rho, dist, disto, binfai
48  real*8 aa
49  real*8 wx, wy, wz, temp
50  real za
51  real de, ek, f, molu
52  real dt, tmin
53  real*8 cvh2den
54  data binfai/30./
55  integer ldep
56 ! integer ndummy
57  character*9 ptcln(4)
58  data ptcln/"Photons", "Electrons","Muons", "hadron"/
59  character*9 ptcl2(3)
60  data ptcl2/"Electrons", "Muons","All"/
61  real power(4)
62  integer nstr
63  data power/1.,1.,1., 1./
64  real power2(3)
65  data power2/1.,1.,1./
66  character*128 title
67  character*96 evid(nsites)
68  save evid
69  real*8 cog, cog2, sumne, obstimes, savederg(5)
70  real*8 firstcdepth, dd
71  logical dosort
72  real*4 wt, stime
73  real*8 sumebydedx, sumebydeath,sumebydeathneu,sumebydeathnut
74  real*8 sumebydeathe, sumebydeathg, sumebydeathmupik,
75  * sumebydeathp, sumebydeatho
76  real*8 sumecrash, sumespace
77  real*8 sumall, sumdeinair, summissing, sumuncertain
78  integer vn/2/ ! version number for the fnoB output
79  save
80 
81 ! ***********************
82  include "interface1.h"
83 ! *********************
84 
85 
86  do i = 1, nsites
87  w2hl(i) = 0
88  enddo
89 
90  do i = 1, nsites
91 ! histdep(i) is the layer number
92  if(histdep(i) .eq. 0) exit
93  ansites = i
94  w2hl( histdep(i) ) = i
95  enddo
96 
97  r=rmin
98  dr = 10.**bin
99 
100  do i = 1, nrbin
101 ! center of the bin:
102  rbin(i) = r
103  r = r* dr
104  enddo
105 #if defined (MACOSX)
106 #else
107 ! specify bin or ascii output
108  call kwhistso( binw )
109 #endif
110 
111  return
112 ! *********************************** hook for Beginning of 1 event
113 ! * All system-level initialization for 1 event generation has been
114 ! * eneded at this moment.
115 ! * After this is executed, event generation starts.
116 ! *
117  entry xbgevent
118 
119  call cqincident(inci, angle)
120  e0 = inci.p.fm.p(4)
121  if(inci.p.code .eq. kmuon) then
122  call csetmuonpol(1.0d0)
123  endif
124  cosz = -angle.r(3)
125  fai0 = atan2(-angle.r(2), -angle.r(1))*todeg
126  sint = sqrt(1.0-cosz**2)
127 
128  if(inci.p.code .eq. 9) then
129  nn= inci.p.subcode
130  elseif(inci.p.code .eq. 1) then
131  nn=0
132  else
133  nn=1
134  endif
135 
136  write(0,'("i ", i6, i4, g13.4,3f11.7,f7.1)')
137  * eventno, inci.p.code,
138  * inci.p.fm.e, -angle.r(1), -angle.r(2), -angle.r(3)
139  write(0,'(a, 1p, 6g15.5)')
140  * '### ', detxaxis.r(1:3), detzaxis.r(1:3)
141  do i = 1, noofsites
142  sumeloss(i) = 0.
143  do j = 1, 4
144  ng(i) = 0.
145  ne(i) = 0.
146  nmu(i) = 0.
147  nhad(i) = 0.
148  enddo
149  decent(i) = 0.
150  do ifai = 1, nfai
151  do ir= 1, nrbin
152  derfai(ir, ifai, i) = 0.
153 ! do j = 1, 4
154 ! nrfaiAll(ir, ifai, j, i) = 0.
155 ! enddo
156  enddo
157  enddo
158  enddo
159 
160 
161 ! estimate time minimum and time bin for eeach web sector
162 
163  do i = 1, ansites
164  ldep = histdep(i)
165  call cmintime2websec(obssites(ldep).pos.xyz,
166  * ldep, i, webmin )
167  enddo
168 
169 #if defined (MACOSX)
170 #else
171 ! histogram: instanciate
172 ! t spectrum at each web sector
173  if(tkrtspec) then
174  do i = 1, ansites
175  do j = 1, 4
176 ! at center
177  call kwhisti( tspec0(j, i),
178  * -5., 0.05, 200, b'00000')
179  call kwhistai( tspec0(j, i),
180  * "Arrival time dist. of "//ptcln(j)//" at center",
181  * "t", "ptcls", .false., 0., "time", "ns")
182 ! clear
183  call kwhistc(tspec0(j, i))
184 
185  do ir=1, nrbin
186  do ifai=1, nfai
187  if(reducedtime .eq. 1) then
188  tmin = webmin(ir, 7, i)
189  else
190  tmin = webmin(ir, ifai,i)
191  endif
192  dt = 0.01*10.0**(bin*(ir-1))*100. ! approx core distnace m
193  dt = dt**0.75*1.e9/3.0e8/100. ! if sqrt 1m-->0.03 ns 10 m-->0.15 ns
194  ! 100m 1ns 1km 5ns 4km 10ns
195  ! dt**0.65 makes larger bin at large distance (<=x2)
196  if(j .eq. 4) dt=dt*10.0*ir/35.0 ! for delayed hadrons
197  dt= max(dt, 0.02)
198 
199  call kwhisti( tspec(j, ir, ifai, i),
200  * tmin, dt, 2000, b'00000')
201 
202  call kwhistai( tspec(j, ir, ifai, i),
203  * "Arrival time of "//ptcln(j)//" at (r,fai)",
204  * "rt", "ptcls", .false., 0., "time", "ns")
205 ! clear
206  call kwhistc(tspec(j, ir, ifai, i))
207  enddo
208  enddo
209  enddo
210  enddo
211  endif
212 
213 ! lateral in each fai bin
214  if(tkarspec) then
215 
216  do i = 1, ansites
217  do j = 1, 4 ! g,e,mu,h
218  do ifai = 1, nfai
219  call kwhisti(rspec(j, ifai, i),
220  * rmin, bin, nrbin, b'00011' )
221  call kwhistai(rspec(j, ifai, i),
222  * "Lateral Dist. of "//ptcln(j)//" at diff. azimuth",
223  * "ar", "ptcls", .true., power(j), "r", "m.u")
224 ! clear
225  call kwhistc( rspec(j, ifai, i) )
226  enddo
227  enddo
228  enddo
229  endif
230 #endif
231 
232  obstimes = 0.
233 
234  return
235 ! ***************
236  entry xobs(atrack, id)
237 !
238 ! For id =2, you need not output the z value, because it is always
239 ! 0 (within the computational accuracy).
240 !
241  obstimes = obstimes + 1.d0
242  if(mod(obstimes, 100000.d0) .eq. 0. ) then
243  dosort=.false.
244  do i = 1, min(4,stack_pos)
245  if(stack(i).p.fm.p(4) .ne. savederg(i)) then
246  savederg(i)=stack(i).p.fm.p(4)
247  dosort=.true.
248  endif
249  enddo
250  if(dosort) then
251  call csortstack
252  endif
253  write(0, *) ' obstimes=', obstimes, ' ptclE=',atrack.p.fm.p(4)
254  do i = 1, min(4,stack_pos)
255  write(0,*)' stack tops=', stack(i).p.fm.p(4)
256  enddo
257  endif
258 ! ***************
259  code = atrack.p.code
260  ldep = atrack.where
261 ! ************
262  if(id .eq. 2 .and. code .le. 6 ) then ! neglect rare ptcls
263  wz = atrack.vec.w.r(3) ! downgoing < 0
264  if(wz .gt. 0) return
265  wz = -wz
266  r = sqrt( atrack.pos.xyz.x**2 +
267  * atrack.pos.xyz.y**2 )
268  molu = obssites(ldep).mu
269  rinmu =r/molu
270  sr = rinmu ! single precision
271  ridx = (log10( rinmu/rmin )/bin +0.5) +1
272 
273  ek = atrack.p.fm.p(4) -atrack.p.mass
274  wt = atrack.wgt ! wt is single
275  if(code .eq. kphoton) then
276  ng(ldep) = ng(ldep) + atrack.wgt
277  elseif(code .eq. kelec) then
278  ne(ldep) = ne(ldep) + atrack.wgt
279  elseif(code .eq. kmuon) then
280  nmu(ldep) = nmu(ldep) + atrack.wgt
281  elseif(code .le. 6) then
282  nhad(ldep) = nhad(ldep) +atrack.wgt
283  endif
284 ! ---------- compute energy loss
285  if(atrack.p.charge .ne. 0 ) then
286 ! -----------------
287 ! /| |
288 ! / | 1g/cm2
289 ! /A | |
290 ! -------------------
291 ! / ptcl direction
292 ! get energy loss when aTrack goes some distance
293 ! of which vertical gramage is 1g/cm2.
294 ! Gramage the particle travel is
295 ! 1/cos where cos is the cos of angle (i.e, A if Fig)
296 ! in the detctor system.
297 ! 1g/cm^2 = 10-3kg/10-4 m^2 =10 kg/m^2.
298 ! To travel 1 g/cm^2, the ptcl must
299 ! run dist kg/m^2
300  if(abs(wz) .gt. 1.d-2) then
301  dist =10./wz ! in kg/m2/(g/cm2)
302  else
303 ! for safety
304  dist =1000.
305  endif
306 
307  call cqelossrate(dedt,dedtf) ! loss rate GeV/(kg/m^2)
308 ! dedtF is the full eloss ; dedt is the restricted
309 ! loss. We may better use full here.
310 ! energy in 1 g/cm2 of vertical direction
311  eloss =min( real(dedtF*dist), ek) ! GeV/(g/cm2)
312  eloss = eloss*atrack.wgt ! GeV/(g/cm2)
313  sumeloss(ldep)=sumeloss(ldep) + eloss
314  else
315  eloss=0.
316  endif
317 
318  if(code .ge. 4) code=4
319  if( atrack.p.charge .ne. 0 .or.
320  * w2hl(ldep) .gt. 0 ) then
321 ! fai
322 ! fai is in -15 to 345 (for dfai=30.)
323  aa=atan2(atrack.pos.xyz.y, atrack.pos.xyz.x)*
324  * todeg -fai0
325  fai = aa/todeg
326  aa= mod(aa + 360.d0, 360.d0)
327  if(aa .gt. (360.d0-dfai/2.0d0)) aa= aa-360.d0
328  faiidx=(aa+dfai/2.0d0) /dfai + 1
329  if(ridx .ge. 1 .and. ridx .le. nrbin) then
330  derfai(ridx, faiidx, ldep) = derfai(ridx, faiidx, ldep)
331  * + eloss
332  elseif(ridx .le. 0) then
333  decent(ldep) = decent(ldep) + eloss
334  endif
335 !
336 ! do following for specified histo layers (typically only 1 layer)
337 !
338 #if defined (MACOSX)
339 #else
340  if( w2hl(ldep) .gt. 0 ) then
341  i = w2hl(ldep)
342  if(tkarspec) then
343  call kwhist( rspec(code, faiidx, i),
344  * sr, wt)
345  endif
346 
347  if( tkrtspec ) then
348  stime = atrack.t
349  if(reducedtime .eq. 1) then
350  delta = r*(cos(fai) + 1.)*sint*1.d9/c ! ns
351  stime = stime + delta
352  endif
353  ir = ridx
354  if(ir .lt. 1) then
355  call kwhist( tspec0(code, i),
356  * stime, wt)
357  elseif(ir .le. nrbin) then
358  call kwhist( tspec(code, ir, faiidx, i),
359  * stime, wt)
360  endif
361  endif
362  endif
363 #endif
364  endif
365  endif
366  return
367 ! **************
368  entry xenevent
369 ! **************
370 ! replace @ # % in basefilename by hostname, etc
371 ! and put it in basefilename2
372 !
373 !////////////
374 ! call sleep(1)
375 !///////////////
376 
377  write(0,*) 'ev#=',eventno,
378  * ' generation phase finished. now writing data'
379 
380  call cgetfname(basefilename, basefilename2)
381  call cqfirstid(firstcdepth)
382  firstcdepth = firstcdepth* 0.1 ! in g/cm2 First col depth.
383 
384 
385 
386  if(observeas) then
387  cog = 0.
388  sumne = 0.
389  do i = 1, noofassites
390  if(i .gt. 1 .and. i .lt. noofassites ) then
391  dd =(asdepthlist(i+1) - asdepthlist(i-1))/2.0
392  elseif(i .eq. 1) then
393  dd =(asdepthlist(2) - asdepthlist(1))
394  else
395  dd =(asdepthlist(noofassites) -
396  * asdepthlist(noofassites-1))
397  endif
398  cog = cog + asobssites(i).esize*dd*asdepthlist(i)
399  sumne= sumne +asobssites(i).esize*dd
400  enddo
401 ! 0.1 is for g/cm2
402  cog = cog*0.1/sumne
403 
404  cog2 = 0.
405  sumne = 0.
406  do i = 1, noofassites
407  if( asobssites(i).age .gt.
408  * (2.0-asobssites(noofassites).age)) then
409  if(i .gt. 1 .and. i .lt. noofassites ) then
410  dd =( asdepthlist(i+1) - asdepthlist(i-1))/2.0
411  elseif(i .eq. 1) then
412  dd =(asdepthlist(2) - asdepthlist(1))
413  else
414  dd =(asdepthlist(noofassites) -
415  * asdepthlist(noofassites-1))
416  endif
417  dd = dd
418  cog2 = cog2 + asobssites(i).esize*asdepthlist(i)*dd
419  sumne= sumne +asobssites(i).esize*dd
420  endif
421  enddo
422  if(sumne .gt. 0.) then
423  cog2 = cog2*0.1/sumne
424  else
425 ! to deep penetration
426  cog2 = asdepthlist(noofassites)*0.1
427  endif
428 
429  filename = basefilename2(1:klena(basefilename2))//".hyb"
430  call copenfw2(fnob, filename, 1, icon)
431 
432  write(fnob,
433  * '("h ", i4, 3i3, 1pE11.3, 0p 3f11.7, 1pE11.3, 0p,
434  * 2f7.0,i2,a )')
435  * eventno, inci.p.code,
436  * inci.p.subcode, inci.p.charge,
437  * inci.p.fm.e, -angle.r(1), -angle.r(2), -angle.r(3),
438  * firstcdepth, cog, cog2, vn, ' /'
439 
440  sumebydedx = 0.
441  sumebydeathg =0.
442  sumebydeathe =0.
443  sumebydeathmupik =0.
444  sumebydeathneu = 0.
445  sumebydeathnut = 0.
446  sumebydeathp = 0.
447  sumebydeatho = 0.
448  sumebydeath = 0.
449  sumuncertain = 0.
450  sumecrash = 0.
451  sumespace = 0.
452 
453  do i = 1, noofassites
454  if(eabsorb(1) .ne. 0) then
455  write(fnob, '("t ", i3, 2f7.1, 2f6.3,
456  * 1p14g12.3 )')
457  * i,
458  * asdepthlist(i)*0.1, asobssites(i).mu,
459  * asobssites(i).age, asdepthlist(i)*0.1/cog2,
460  * ng(i), ne(i), nmu(i), nhad(i),
461  * asobssites(i).esize, sumeloss(i),
462  * debydedx(i), debydeath(i),
463 ! next ones are from 7.51
464  * debydeathg(i), debydeathe(i), debydeathmupik(i),
465  * debydeathp(i), debydeathnut(i), debydeatho(i)
466 
467  if(i .le. eabsorb(2) ) then
468 ! to see E consv. we should not count
469 ! level > Eabsorb(2).
470  sumebydedx = sumebydedx + debydedx(i)
471  sumebydeath = sumebydeath + debydeath(i)
472  sumebydeathneu = sumebydeathneu +debydeathneu(i)
473  sumebydeathnut = sumebydeathnut +debydeathnut(i)
474  sumebydeathg = sumebydeathg + debydeathg(i)
475  sumebydeathe = sumebydeathe + debydeathe(i)
476  sumebydeathmupik = sumebydeathmupik +
477  * debydeathmupik(i)
478  sumebydeathp = sumebydeathp +debydeathp(i)
479  sumebydeatho = sumebydeatho +debydeatho(i)
480  endif
481  else
482  write(fnob, '("t ", i3, 2f7.1, 2f6.3,
483  * 1p6E11.3 )')
484  * i,
485  * asdepthlist(i)*0.1, asobssites(i).mu,
486  * asobssites(i).age, asdepthlist(i)*0.1/cog2,
487  * ng(i), ne(i), nmu(i), nhad(i),
488  * asobssites(i).esize, sumeloss(i)
489  endif
490  enddo
491  if(eabsorb(1) .ne. 0) then
492  do i = 1, 7
493  sumecrash = sumecrash + ecrash(i)
494  sumespace = sumespace + espace(i)
495  enddo
496  write(fnob,'("b ", 1p7E11.3)') (espace(i), i=1,7)
497  write(fnob,'("b ", 1p7E11.3, i4)') (ecrash(i), i=1,7),
498  * eabsorb(2)
499  write(fnob,
500  * '("c ",1p7E11.3)' )
501  * maxebreak, maxrelebreak, sumediff, sumabsediff,
502  * maxebreak(1)/inci.p.fm.p(4)
503 
504  summissing = sumecrash + sumespace + sumebydeathneu
505  sumuncertain = sumebydeathnut
506  sumdeinair = sumebydedx + sumebydeath
507  sumall = sumdeinair + summissing + sumuncertain
508 
509  write(fnob,'("s ", 1p8E11.3)')
510  * sumebydedx, sumebydeath, sumdeinair,
511  * sumecrash, sumespace, sumebydeathnut,
512  * sumebydeathneu, sumall
513 
514  write(fnob,'("r ", 1p4E11.3)')
515  * sumdeinair/e0, sumuncertain/e0, summissing/e0, sumall/e0
516 ! normalized one
517  write(fnob,'("n ", 1p4E11.3)')
518  * sumdeinair/sumall, sumuncertain/sumall,summissing/sumall,
519  * 1.0
520 ! additional info for more details
521  write(fnob,'("a ", 1p5g12.3 )')
522  * sumebydeathg, sumebydeathe, sumebydeathmupik,
523  * sumebydeathp, sumebydeatho
524  endif
525  endif
526  write(fnob,*)
527  close(fnob)
528 
529  do i = 1, ansites
530  j=histdep(i)
531  write(evid(i),
532  * '(i3, i5, f5.2, f5.2,
533  * f7.1, i4)')
534  * histdep(i), int( asdepthlist(j)*0.1 ),
535  * asobssites(j).age, asdepthlist(j)*0.1/cog2,
536  * asobssites(j).mu, int(cog2)
537  enddo
538 #if defined (MACOSX)
539 #else
540  if(tkarspec) then
541  filename = basefilename2(1:klena(basefilename2))//"-r.hist"
542  call copenfw2(fnol, filename, binw, icon)
543  do i = 1, ansites
544  k=histdep(i)
545  do j = 1, 4
546  write(dirstr,'(a,"/d",i4, "/")')
547  * ptcln(j), int( depthlist(k)*0.1 )
548  call kseblk(dirstr, "|", nstr)
549  do l = 1, nfai
550  call kwhistdir(rspec(j, l, i), dirstr)
551 ! call kwhists( rspec(j, l, i), 0. )
552  call kwhists( rspec(j, l, i), 0. )
553  call kwhistev( rspec(j, l, i), eventno)
554  call kwhistid( rspec(j, l, i), evid(i))
555  call kwhistp( rspec(j, l, i), fnol)
556 ! *********** deallocate ********
557  call kwhistd( rspec(j, l, i) )
558  enddo ! code loop
559  enddo ! fai loop
560  enddo ! depth loop
561 
562  close(fnol)
563  endif
564 
565  if( tkrtspec ) then
566  filename = basefilename2(1:klena(basefilename2))//"-t.hist"
567  call copenfw2(fnot, filename, binw, icon)
568 
569  do i = 1, ansites
570  do j = 1, 4
571  call kwhists( tspec0(j,i), 0.)
572  call kwhistev( tspec0(j,i), eventno)
573  call kwhistid( tspec0(j,i), evid(i))
574  k=histdep(i)
575  dirstr = " "
576  write( dirstr,'(a,"/d",i4, "/")')
577  * ptcln(j), int( asdepthlist(k)*0.1 )
578  call kseblk( dirstr, "|", nstr)
579  call kwhistdir( tspec0(j,i), dirstr )
580  call kwhistp( tspec0(j,i), fnot )
581 ! *********** deallocate ********
582  call kwhistd( tspec0(j,i) )
583  enddo
584  enddo
585 
586  do i = 1, ansites
587  do j = 1, 4
588  do ifai= 1, nfai
589  do ir= 1, nrbin
590  call kwhists( tspec(j,ir, ifai,i), 0.)
591  call kwhistev(tspec(j,ir, ifai,i), eventno)
592  call kwhistid( tspec(j,ir, ifai,i), evid(i))
593  dirstr = " "
594  write(dirstr,'(a,"/d",i4, "/F",i2,"/")')
595  * ptcln(j), int( depthlist(k)*0.1), ifai
596  call kseblk(dirstr, "|", nstr)
597  call kwhistdir(tspec(j,ir, ifai,i), dirstr)
598  call kwhistp( tspec(j,ir, ifai,i), fnot)
599 ! *********** deallocate ********
600  call kwhistd( tspec(j, ir, ifai, i) )
601  enddo
602  enddo
603  enddo ! code loop
604  enddo ! depth loop
605  close(fnot)
606  endif
607 #endif
608 ! output web data
609  if(tkweb) then
610  filename = basefilename2(1:klena(basefilename2))//".nrfai"
611  call copenfw2(fnon, filename, 1, icon)
612 
613  write(fnon,
614  * '(i4,1pE11.3, 0p,i3, f8.4, 1pE11.3,0p, 4i4, 1p,8g11.3)')
615  * eventno, e0, nn, cosz, firstcdepth, nrbin, nfai, ansites,
616  * noofsites, keminobs ! this is not exist in the older version
617 !
618 ! dE/dx lateral
619  do i = 1, noofsites
620  do k = 1, nfai
621  write(fnon, '("dE/dx",f7.1, 3i4)' )
622  * depthlist(i)*0.1, i, i, k
623  write(fnon, '(1p10E11.3)')
624  * ( derfai(m,k,i), m=1,nrbin ), decent(i)
625 ! same center value is put for all fai
626  enddo
627  enddo
628  close(fnon)
629  endif
630 
631  write(0,*) 'ev#=',eventno,' finished completely'
632 
subroutine cgetfname(fnin, fn)
Definition: copenf.f:275
void kwhistid(struct histogram1 *h, char *id)
subroutine cqincident(incident, AngleAtObs)
Definition: cmkIncident.f:486
integer lengid integer lengdir character *dir integer kgetenv2 character *numb character *execid character *msg logical takehist save do nsites histdep(i)=0indivdep(i)=0enddo leng
integer nsites ! max real bin
Definition: Zprivate0.h:2
const int maxnoofsites
Definition: Zobs.h:7
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
others if is ng
Definition: cblkManager.h:9
subroutine csetmuonpol(val)
Definition: cinteNuc.f:224
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz r
Definition: ZavoidUnionMap.h:1
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
const int kphoton
Definition: Zcode.h:6
latitude latitude this system is used *****************************************************************! type coord sequence union map real z z in m endmap xyz map real ! latitude in deg is to the north ! longitude in deg is to the east *h ! height in m endmap llh map real ! polar angle ! azimuthal angle *radius ! radial distance endmap sph endunion character *sys ! which system xyz
Definition: Zcoord.h:25
void kwhistp(struct histogram1 *h, FILE *fno)
Definition: Ztrack.h:44
int nmu[nl][nth]
Definition: Zprivate.h:12
void kwhisti(struct histogram1 *h, float ixmin, float ibinORxmax, int inbin, int itklg)
void kwhistd(struct histogram1 *h)
max ptcl codes in the kelec
Definition: Zcode.h:2
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
void kwhistev(struct histogram1 *h, int evno)
logical KeepWeight ! see setupenv sh logical tkarspec ! get lateral histo in a web fai bin logical tkrtspec ! get time histo in each web bin logical SeeLowdE common Zprivatec2 tkrtspec
Definition: Zprivate4.h:7
void kwhist(struct histogram1 *h, float x, float w)
void kwhistdir(struct histogram1 *h, char *dir)
int ne[nl][nth]
Definition: Zprivate.h:11
! timing nrbin
Definition: Zprivate2.h:12
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
void kwhistso(int binw)
subroutine copenfw2(io, fnin, form, icon)
Definition: copenf.f:205
real(4), dimension(:), allocatable, save temp
Definition: cNRLAtmos.f:29
logical KeepWeight ! see setupenv sh logical tkarspec ! get lateral histo in a web fai bin logical tkrtspec ! get time histo in each web bin logical SeeLowdE common Zprivatec2 tkarspec
Definition: Zprivate4.h:7
integer w2hl(nsites)
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1
subroutine cqfirstid(depth)
Definition: ciniTracking.f:188
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
latitude latitude this system is used *****************************************************************! type coord sequence union map real y
Definition: Zcoord.h:25
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
void kwhistc(struct histogram1 *h)
real *8 function cvh2den(z)
Definition: ciniSegAtoms.f:54
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p charge
Definition: ZavoidUnionMap.h:1
block data include Zlatfit h c fitting region data data data data data d0 data data d0 data data m
Definition: ZlatfitBD.h:35
integer function klena(cha)
Definition: klena.f:20
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
subroutine csortstack
Definition: cstack.f:102
nodes t
void kwhistai(struct histogram1 *h, char *title, char *categ, char *dNunit, int logv, float pw, char *label, char *unit)
real(4), save b
Definition: cNRLAtmos.f:21
void kwhists(struct histogram1 *h, float inorm)
Definition: Zcoord.h:43
*Zfirst p fm *Zfirst p mass
Definition: ZavoidUnionMap.h:1
max ptcl codes in the kmuon
Definition: Zcode.h:2
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos *Zfirst pos Zfirst pos *Zfirst pos *Zfirst Zfirst vec w *Zfirst vec w Zfirst vec *Zfirst wgt
Definition: ZavoidUnionMap.h:1
subroutine kseblk(text, c, lc)
Definition: kseblk.f:18
subroutine cmintime2websec(obsdetxyz, ldep, depidx, awebmin)
! timing nfai
Definition: Zprivate2.h:12
! 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
*Zfirst p fm *Zfirst p Zfirst p Zfirst p subcode
Definition: ZavoidUnionMap.h:1
dE dx *! Nuc Int sampling table f
Definition: cblkMuInt.h:130
dE dx *! Nuc Int sampling table c
Definition: cblkMuInt.h:130
Here is the call graph for this function: