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

Go to the source code of this file.

Functions/Subroutines

program __getst2.f__
 
subroutine inteflux (comp, ans)
 
real *8 function primdn (eorp)
 
subroutine chooktrace
 
subroutine chookceren
 
subroutine chookcerens
 
subroutine chookcerene
 
subroutine chookbgrun
 

Function/Subroutine Documentation

◆ __getst2.f__()

program __getst2.f__ ( )

Definition at line 23 of file getST2.f.

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

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

◆ chookbgrun()

subroutine chookbgrun ( )

Definition at line 191 of file getST2.f.

◆ chookceren()

subroutine chookceren ( )

Definition at line 185 of file getST2.f.

◆ chookcerene()

subroutine chookcerene ( )

Definition at line 189 of file getST2.f.

◆ chookcerens()

subroutine chookcerens ( )

Definition at line 187 of file getST2.f.

◆ chooktrace()

subroutine chooktrace ( )

Definition at line 183 of file getST2.f.

◆ inteflux()

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

Definition at line 102 of file getST2.f.

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

102  implicit none
103 #include "Zglobalc.h"
104 #include "Zptcl.h"
105 #include "Zprimary.h"
106  type(component):: comp
107  real*8 ans
108  include 'Zflux.h'
109 
110  real*8 eps, error, ans2, eth, e_or_p
111  integer icon
112 
113 
114  integer imax
115  external primdn
116  real*8 primdn
117  type(ptcl)::aptcl
118  integer j
119  data eps/1.d-4/
120 
121 
122 
123  compx = comp
124  imax = comp%no_of_seg
125  if(rigc .eq. 0.) then
126 ! no rigidy cut. integrate segmented power functions
127  call inteprim2(comp, 1, imax, ans)
128  else
129  call cmkptc(comp%code, comp%subcode, comp%charge, aptcl)
130  eth =sqrt( (rigc*comp%charge)**2 + aptcl%mass**2 )
131  call cconv_prim_e2(comp, eth, e_or_p)
132  call kdwhereis(e_or_p, comp%no_of_seg+1, comp%energy, 1, j)
133  if(j .le. imax) then
134 ! energy integral;
135  call kdexpintfb(primdn, comp%energy(1), comp%energy(j+1),
136  * eps, ans, error, icon)
137  ans = ans
138  endif
139 ! add E> comp.energy(j+1)
140  if(j+1 .lt. imax ) then
141  call inteprim2(comp, j+1, imax, ans2)
142  else
143  ans2 = 0.
144  endif
145  ans = ans + ans2
146  endif
real *8 function primdn(eorp)
Definition: getST.f:246
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
********************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
Definition: Zptcl.h:75
float eth[nth]
Definition: Zprivate.h:8
Here is the call graph for this function:

◆ primdn()

real*8 function primdn ( real*8  eorp)

Definition at line 151 of file getST2.f.

References azmmin, cconv_prim_e(), cprimflux0(), crigcut(), degree, e, primdn(), and zen1.

151  implicit none
152 
153 #include "Zglobalc.h"
154 #include "Zptcl.h"
155 #include "Zprimary.h"
156 ! primary flux at E
157  real*8 eorp
158 
159  include 'Zflux.h'
160 
161 
162 
163  type(ptcl):: aptcl
164  real*8 rig, prob, flux, zeny
165 
166  e = eorp
167 ! E= E_or_P must be converted to rigidity
168  call cconv_prim_e(compx, e, aptcl)
169 
170  rig =sqrt( aptcl%fm%p(4)**2 - aptcl%mass**2)/aptcl%charge
171  if(degree) then
172  zeny = zen1/torad
173  else
174  zeny = zen1
175  endif
176  call crigcut(azmmin, zeny, rig, prob)
177  call cprimflux0(compx, e, flux) ! E = EorP
178 
179  primdn = flux * prob
real *8 function primdn(eorp)
Definition: getST.f:246
real zen1
Definition: Zflux.h:1
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
subroutine crigcut(azmin, zen, rig, prob)
Definition: crigCut.f:6
real * azmmin
Definition: Zflux.h:1
subroutine cconv_prim_e(comp, e_or_p, aPtcl)
Definition: csampPrimary.f:128
subroutine cprimflux0(comp, e_or_p, flux)
Definition: cprimFlux0.f:2
Definition: Zptcl.h:75
real zen logical degree
Definition: Zflux.h:1
Here is the call graph for this function: