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

Go to the source code of this file.

Functions/Subroutines

program __getst.f__
 
subroutine inteflux (comp, ans)
 
real *8 function primdn (E)
 
subroutine inteprim2 (comp, i1, i2, ans)
 
subroutine chooktrace
 
subroutine chookceren
 
subroutine chookcerens
 
subroutine chookcerene
 
subroutine chookbgrun
 

Function/Subroutine Documentation

◆ __getst.f__()

program __getst.f__ ( )

Definition at line 20 of file getST.f.

References azmmax, azmmin, cbeginrun(), coszenith, cprintprim(), creadparam(), csetcosdeg(), false, i, inteflux(), rigc, true, zen1, and zen2.

20  integer i
nodes i
Here is the call graph for this function:

◆ chookbgrun()

subroutine chookbgrun ( )

Definition at line 170 of file getST.f.

◆ chookceren()

subroutine chookceren ( )

Definition at line 164 of file getST.f.

◆ chookcerene()

subroutine chookcerene ( )

Definition at line 168 of file getST.f.

◆ chookcerens()

subroutine chookcerens ( )

Definition at line 166 of file getST.f.

◆ chooktrace()

subroutine chooktrace ( )

Definition at line 162 of file getST.f.

◆ inteflux()

subroutine inteflux ( type (component comp,
real*8  ans 
)

Definition at line 64 of file getST.f.

References cconv_prim_e2(), cmkptc(), d, inteprim2(), kdexpintfb(), kdwhereis(), and primdn().

64  implicit none
65 #include "Zptcl.h"
66 #include "Zprimary.h"
67  type(component):: comp
68  real*8 ans
69 
70  real*8 azmmin, azmmax, zen1, zen2, rigc
71  type(component)::compx
72  common/zgetst/compx, zen1, zen2, azmmin, azmmax, rigc
73 
74 
75  real*8 eps, error, ans2, eth, e_or_p
76  integer icon
77 
78 
79  integer imax
80  external primdn
81  real*8 primdn
82  type(ptcl)::aptcl
83  integer j
84  data eps/1.d-4/
85 
86 ! take into account the horizontal area.
87 
88  compx = comp
89  imax = comp%no_of_seg
90  if(rigc .eq. 0.) then
91 ! no rigidy cut. integrate segmented power functions
92  call inteprim2(comp, 1, imax, ans)
93  else
94  call cmkptc(comp%code, comp%subcode, comp%charge, aptcl)
95  eth =sqrt( (rigc*comp%charge)**2 + aptcl%mass**2 )
96  call cconv_prim_e2(comp, eth, e_or_p)
97  call kdwhereis(e_or_p, comp%no_of_seg+1, comp%energy, 1, j)
98  if(j .le. imax) then
99  call kdexpintfb(primdn, comp%energy(1), comp%energy(j+1),
100  * eps, ans, error, icon)
101 ! add E> comp.energy(j+1)
102  endif
103  if(j+1 .lt. imax ) then
104  call inteprim2(comp, j+1, imax, ans2)
105  else
106  ans2 = 0.
107  endif
108  ans = ans + ans2
109  endif
real zen2
Definition: Zflux.h:1
real *8 function primdn(eorp)
Definition: getST.f:246
real zen1
Definition: Zflux.h:1
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
subroutine cconv_prim_e2(comp, E, e_or_p)
Definition: csampPrimary.f:230
subroutine kdwhereis(x, in, a, step, loc)
Definition: kdwhereis.f:27
real * azmmin
Definition: Zflux.h:1
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
real rigc
Definition: Zflux.h:1
subroutine kdexpintfb(func, a, b, eps, ans, error, icon)
Definition: kdexpIntFb.f:10
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
subroutine inteprim2(comp, i1, i2, ans)
Definition: intePrim2.f:2
subroutine cmkptc(code, subcode, charge, p)
Definition: cmkptc.f:15
real azmmax
Definition: Zflux.h:1
Definition: Zptcl.h:75
float eth[nth]
Definition: Zprivate.h:8
Here is the call graph for this function:

◆ inteprim2()

subroutine inteprim2 ( type (component comp,
integer  i1,
integer  i2,
real*8  ans 
)

Definition at line 132 of file getST.f.

132  implicit none
133 #include "Zptcl.h"
134 #include "Zprimary.h"
135 ! primary flux at E
136  type(component)::comp
137  integer i1, i2
138  real*8 ans
139 
140  real*8 sum, beta
141 
142  integer i
143  sum = 0.
144 
145  do i = i1, i2
146  beta=comp%beta(i)
147  if(beta .ne. 1.) then
148  sum = sum +
149  * comp%flux(i)*comp%energy(i)
150  * / (beta - 1.)
151  * *( 1. -
152  * (comp%energy(i+1)/comp%energy(i))**(1.-beta))
153  else
154  sum =
155  * sum + comp%flux(i)* comp%energy(i)
156  * * log(comp%energy(i+1)/comp%energy(i))
157  endif
158  enddo
159  ans = sum
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
nodes i

◆ primdn()

real*8 function primdn ( real*8  E)

Definition at line 114 of file getST.f.

References cprimflux(), and primdn().

114  implicit none
115 
116 #include "Zglobalc.h"
117 #include "Zptcl.h"
118 #include "Zprimary.h"
119 ! primary flux at E
120  real*8 e
121 
122  real*8 azmmin, azmmax, zen1, zen2, rigc
123  type(component)::compx
124  common/zgetst/compx, zen1, zen2, azmmin, azmmax, rigc
125 
126  real*8 flux
127  call cprimflux(compx, e, rigc, zen1, zen2, azmmin,
128  * azmmax, flux)
129  primdn = flux
real zen2
Definition: Zflux.h:1
real *8 function primdn(eorp)
Definition: getST.f:246
subroutine cprimflux(comp, e_or_p, rigth, cos1, cos2, fai1, fai2, flux)
Definition: cprimFlux.f:4
real zen1
Definition: Zflux.h:1
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
real * azmmin
Definition: Zflux.h:1
real rigc
Definition: Zflux.h:1
real azmmax
Definition: Zflux.h:1
Here is the call graph for this function: