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

Go to the source code of this file.

Functions/Subroutines

subroutine cobas (el)
 

Function/Subroutine Documentation

◆ cobas()

subroutine cobas ( type(track el)

Definition at line 9 of file cobAS.f.

References chookhybas(), cnebyapproxb(), and d0.

Referenced by ctrackingall(), and embedas().

9  implicit none
10 #include "Ztrack.h"
11 #include "Zobs.h"
12 #include "Zobsv.h"
13 #include "Zelemagp.h"
14 
15  type(track)::el ! an electron to produce A%S
16 
17  integer l, j
18  integer never
19  real*8 zobas, zp, clenbetween2h, length, clen2thick
20  real*8 t, elog, eno, age
21  real*8 enoc/1./
22 ! /////////
23  real*8 sintemp1, sintemp2
24 ! ///////
25  logical downgoing
26  integer lb, le, ls
27  save never
28  data never/0/
29 
30  zp = el%pos%depth ! depth of electron
31  downgoing = el%vec%coszenith .gt. 0.d0
32  if(downgoing) then
33  lb = 1
34  le = noofassites
35  ls = 1
36  else
37  lb = noofassites
38  le = 1
39  ls = -1
40  endif
41  do l=lb, le, ls
42 ! vertical depth kg/m2
43  zobas=asobssites(l)%pos%depth
44 
45  if( (zp .lt. zobas .and. downgoing)
46  * .or. ( zp .gt. zobas .and. .not. downgoing) ) then
47 ! electron will cross A.S site.
48 ! thickness to r.l
49  if(abs(el%vec%coszenith) .gt. 0.5) then
50  t=abs(zobas-zp)/x0/abs(el%vec%coszenith)
51  else
52 ! error check: since A.S plane is
53 ! spherical surface, particle may not pass
54 ! the next surface. (if completely horizontal,
55 ! it should pass)
56  sintemp1 = sqrt(1.d0- el%vec%coszenith**2)
57  sintemp2 = el%pos%radiallen * sintemp1/
58  * asobssites(l)%pos%radiallen
59  if( sintemp2 .le. 1.d0) then
60 ! slant length between two depths
61  length = clenbetween2h(el%pos%radiallen,
62  * asobssites(l)%pos%radiallen,
63  * el%vec%coszenith)
64  t = clen2thick(el%pos%height, el%vec%coszenith,
65  * length) / x0
66  else
67 ! particle dose not cross the surface. neglect A.S
68  compasne(l) = 0.
69  compasage(l) = 0.
70  goto 500
71  endif
72  endif
73 ! log of electron energy in unit of critical energy
74  elog = log10(el%p%fm%p(4)/ecrit)
75 ! !-get ne and age
76  call cnebyapproxb(3, elog, t, eno, age)
77 ! count ne
78 ! if thins=T, wgt may be diff. from 1.
79  eno=eno*el%wgt
80 !
81  compasne(l) = eno
82  compasage(l) = age
83 !
84  asobssites(l)%esize=asobssites(l)%esize + eno
85  asobssites(l)%age = asobssites(l)%age + eno*age
86  if(eno .lt. enoc) then
87 ! ne is very small
88  if( age .gt. 1.) then
89 ! old so that cannot become larger; discard it
90  do j = l+ls, le, ls
91  compasne(j) = 0.
92  compasage(j) = 2.
93  enddo
94  goto 600
95  else
96 ! age is young, a.s might become larger
97  endif
98  else
99 ! ne is large. if needed, lateral obs.
100  endif
101  else
102  compasne(l) = 0.
103  compasage(l) = 0.
104  endif
105  500 continue
106  enddo
107  600 continue
108  if(never .ne. 1) then
109  call chookhybas(el, never)
110  endif
real *8 function clen2thick(z, cosz, leng)
Definition: clen2thick.f:27
real *8 function clenbetween2h(h1, h2, cost)
Definition: catmosutil.f:138
Definition: Ztrack.h:44
********************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
subroutine chookhybas(el, never)
Definition: chookHybAS.f:20
nodes t
subroutine cnebyapproxb(jspec, ale, t, eno, s)
Definition: cNeByApproxB.f:13
Here is the call graph for this function:
Here is the caller graph for this function: