3 ! below cthick2h1 and cthick2h2 are so made that they coincide at
7 ! -------------------------------------
9 ! --------------------------vertical
height to density
10 ! at
z > 50 km, very bad. but ok
for our purpose
12 !---- include
'Zstdatmos.h' 24 ans = 10.d0*hlhmi*( (
ha-
z)/
hl)**(
hmi-1.d0)
31 ! -------------------------------------------------------------
33 !
do z = 0., 1250.
d3, 1
d3 39 ! vettical
height to temperatur (Kelvin)
42 ! output
is temperature of the atmospher in Kelvin
51 data h/91, 100, 110, 120, 130, 140, 160, 180, 200, 250,
52 * 300, 350, 400, 450, 500, 550, 600/
53 data t/186.87, 195.08, 240.0, 360.0, 469.27, 559.63,
54 * 696.29, 790.07, 854.56, 941.33, 976.01, 990.06, 995.83,
55 * 998.22, 999.24, 999.67, 999.85/
58 if(z .lt. 11.1
d3) then
60 elseif(z .lt. 20.0
d3) then
62 elseif(z .lt. 32.2
d3) then
65 elseif(z .lt. 47.4
d3) then
68 elseif(z .lt. 51.
d3) then
70 elseif(z .lt. 72.
d3) then
73 elseif(z .lt. 86.
d3) then
76 elseif( z .lt. 91.
d3) then
78 elseif( z .lt. 600
d3) then
81 j = min(max(loc - (m-1)/2,1), nh+1-m) ! max of m points
from j
82 call
kpolintp(h(j), 1, t(j), 1, m, hx, ans, error)
89 !---------------------------------------------
93 #include "Zstdatmos.h" 100 cthick2h =
ha -
hl * (t/10.d0)**
hm !
for t > t0
103 ! -------------------------------------
105 ! -------------------------------------
107 !---- include
'Zstdatmos.h' 114 cthick2den =10.d0*hlhmi*
115 * (t/10.d0)**(1.
d0 -
hm)
118 ! -------------------------------------
120 ! -------------------------------------
124 !---- include
'Zstdatmos.h' 131 if(z .
ne. zsave) then
140 ! * ( (
ha-
z)/
hl)**cnst3
147 ! ----------------------------------
149 ! ----------------------------------
151 ! - rho/ (
d rho/
d z). This has discontinuity at
159 ! -------------------------------------
161 ! -------------------------------------
164 !---- include
'Zstdatmos.h' 169 !
real*8 cnst1, cnst2, cnst3
170 ! save cnst1, cnst2, cnst3
177 ! cnst2 = 10.d0*hlhmi*(
hmi-1.d0)*(
hmi-2.
d0)
180 ! firsttime = .false.
182 if(z .
ne. zsave) then
198 ! -------------------------------------
200 ! -------------------------------------
203 !---- include
'Zstdatmos.h' 204 #include
"Zstdatmos.h" 208 !
real*8 cnst1, cnst2, cnst3
209 ! save cnst1, cnst2, cnst3
210 real*8 zsave, ans, cvh2den2p, cvh2den
216 ! cnst2 =- 10.d0*hlhmi*(
hmi-1.d0)*(
hmi-2.
d0)*(
hmi-3.d0)
219 ! firsttime = .
false.
221 if(z .
ne. zsave) then
237 ! ---------------------------------------
239 ! ---------------------------------------
241 !---- include
'Zstdatmos.h' 250 ! the next factor
is -1.5d-11 and
is neglected.
252 ! * 10.d0*exp( (
hb-hc)/
hn)
259 !
d rho/dz
is discontinuous at
hc, but others are
260 ! continuous. Thickness values are almost the same
263 data ha/4512224.7572830657d-2/,
hb/4541933.9782793734d-2/,
264 *
hl/1244541.6061892177d-2/,
hm/.1854893358365053d0/,
265 *
hn/6.3300000000746224d3/, t0/230.000458235099d1/,
266 * hc /10.996296495761545d3/
267 data hmi/5.3911455097420/, hlhmi/4.3318322850207d-04/
269 ! coef.
to have continuous density values
for h=
h(t) and its derivative
270 ! about t=t0.
However, the absolute thickness
is little bit larger
271 ! than the standard, so that we don
't use this one. 273 ! data ha/25289.093750000d0/, hb/48490.145953733/, 274 ! * hl/2712.61d0/, hm/0.32397778012688d0/, 275 ! * hn/6800 .0/, hmi/3.0866314338235/, hc/11.1d3/, 276 ! * hlhmi/1.1378815278872D-03/, t0/2443.3759999999/ integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
real(8), parameter, public m
real *8 function cvh2denp(z)
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hm
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
real *8 function cvh2den3p(z)
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hb
subroutine kpolintp(xa, xstep, ya, ystep, n, x, y, error)
block data cblkIncident data *Za1ry *HeightOfInj d3
subroutine kdwhereis(x, in, a, step, loc)
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hc
block data cblkMuInt integer i ! Pair total X sec data(MuPrTX(i), i=1, 38)/1 0.431132E-02
real(4), dimension(:), allocatable, save h
! Parameters used for hadronic cascade shower is generated newline ! For you may give as as or em as(order/case/separator insensitive) is to generate EM-cascade and AS. \newline ! Generate
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
real(8) function cthick2den(t)
integer maxbin nregion c minsave drx2 ! drawing region real maxdep integer maxpos integer to
integer maxFiles ! actual logical file ! it will be used during mpi skeleton making time ! so when the program starts to normal ! it will not be used block
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hl
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
! Parameters used for hadronic cascade shower is generated newline ! For you may give as as or em quick generation of AS for heavy primaries is tried See chookASbyH f character *Generate2 don t touch this for skeleton flesh use integer MagBrem no magnetic bremsstrahlung is considered newline ! if and Ee energy loss due to magnetic brems is considered newline ! if and Ee real sampling of gamma is performed WaitRatio ! must be made small so that WaitRatio *E0 sim MagBremEmin integer MagPair no magnetic pair creation is considered newline ! if and Eg real sampling is the LPM effect is considered when Ee LpmBremEmin for electrons and ! Eg LpmPairEmin for gamma rays real *MagBremEmin E magnetic bremsstrahlung by electrons may be considered However
! this is to treat the stange code generated in Lund Fritiof ! If you find that you can get reliable events by discarding ! events with such strange then you may define ! the machine definition here ! If you want to discard the strange code events but ! want to be define below ! if you want discard the strage code events without ! any define below If DEBUG_STRANGECODE is you should not give the below ! if none of above two is defined
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos *Zfirst pos Zfirst pos height
real *8 function cvh2den2p(z)
nodes a atmos atmos temp real * cthick2h
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hmi
dE dx *! Nuc Int sampling table d
real(8) function cvh2scaleh(vh)
integer lengid integer lengdir character *dir integer kgetenv2 character *numb character *execid character *msg logical takehist save do nsites tkarspec nsites if(histdep(i) .gt. 0) then takehist
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hlhmi common comstdatm ha
real *8 function cvh2den(z)
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there t0
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there hn
! Zkcele h ! unit here is SI(m, s, kg) real *8 sidcor
integer maxbin nregion c minsave drx2 ! drawing region real maxdep integer maxpos integer from
real *8 function cvh2thick(z)
real(8) function cvh2temp(vh)
block data cblkIncident data *Za1ry is