1 #include "BlockData/cblkGene.h" 10 #include "Zprimaryc.h" 11 #include "Zprimaryv.h" 12 #include "Zincidentp.h" 22 real*8 cosmin, cosmax, cylr, cylh
23 real*8 ans, sum1, sum2, sum3
25 call cerrormsg(
'**********IMPORTANT**********',1)
27 *
'You must write radius and height of a cylinder',1)
28 call cerrormsg(
'or 0 0 after namelist parameter',1)
30 *
'(1 space line may be needed before data)', 1)
36 azmmax = imag_p(azimuth) + xaxisfromsouth
37 azmmin =
real(Azimuth) + XaxisFromSouth
39 if(cutofffile .eq.
' ')
then 44 if(zenvalue .eq.
'deg')
then 58 *
' fai region=',
real(Azimuth),
' to ',
59 * imag_p(azimuth),
' deg' 60 write(*,*)
' X-axis From South=', xaxisfromsouth,
' deg' 64 write(*,*)
' No rigidity cut is assumed' 66 "
' primary Int(dI/dE) sum(cumlative);',
69 write(*,*)
' Rigidity cut is applied' 71 "
' primary Int(dI/dE*RigCut) sum1(cumlative);',
75 do i = 1, prim%no_of_comps
78 write(*,*)
' ', prim%each(
i)%symb,
' ', sngl(
ans),
88 *
' primary Int(cos x dI/dE) sum2(cumlative)',
92 *
' primary Int(cos x dI/dE*RigCut) sum2(cumlative)',
96 do i = 1, prim%no_of_comps
99 write(*,*)
' ', prim%each(
i)%symb,
' ', sngl(
ans),
100 *
' ', sngl(sum2), sngl(sum2/sum1)
107 *
' primary Int((1+cos)/2 dI/dE) sum3(cumlative);',
108 *
' sum3/sum1 hemisphere' 111 *
' primary Int((1+cos)/2 dI/dE*Rigcut) sum3(cumlative);',
112 *
' sum3/sum1 hemisphere' 115 do i = 1, prim%no_of_comps
118 write(*,*)
' ', prim%each(
i)%symb,
' ', sngl(
ans),
119 *
' ', sngl(sum3), sngl(sum3/sum1)
123 if(cylr .gt. 0. .and. cylh .gt. 0.)
then 124 ratio =2*cylr*cylh/(3.141592*cylr**2)
128 *
' primary Int((cos+ratio*sin)/sqrt(1+ratio**2)dI/dE)',
129 *
' sum3(cumlative); sum3/sum1 cylinder' 131 write(*,*)
' cylinder: 2rh/pir^2=ratio=',ratio
133 *
' primary Int((cos+ratio*sin)/sqrt(1+ratio**2)dI/dE*Rc)',
134 *
' sum3(cumlative);',
' sum3/sum1 cylinder' 137 do i = 1, prim%no_of_comps
140 write(*,*)
' ', prim%each(
i)%symb,
' ', sngl(
ans),
141 *
' ', sngl(sum3), sngl(sum3/sum1)
145 *
'If N primaries are generated in simulation, ST= N/sum1' 151 #include "Zglobalc.h" 153 #include "Zprimary.h" 158 real*8 eps, error, ans2, Eth, e_or_p
172 imax = comp%no_of_seg
173 if(
rigc .eq. 0.)
then 176 if(cosfactor .eq. 0)
then 177 if(abs(ans/comp%inte_value-1.
d0) .gt. 1.
d-3 )
then 178 write(*,*)
' ans=',ans,
' internal integral=',
183 elseif(cosfactor .eq. 1)
then 185 ans = comp%inte_value * (
zen2**2-
zen1**2)/2 *
187 elseif(cosfactor .eq. 2)
then 189 ans = comp%inte_value
192 elseif(cosfactor .eq. 3)
then 194 ans = comp%inte_value *
202 write(*,*)
' error of cosin' 206 call cmkptc(comp%code, comp%subcode, comp%charge, aptcl)
207 eth =sqrt( (
rigc*comp%charge)**2 + aptcl%mass**2 )
209 call kdwhereis(e_or_p, comp%no_of_seg+1, comp%energy, 1, j)
212 call kdexpintfb(primdn, comp%energy(1), comp%energy(j+1),
213 * eps, ans, error, icon)
217 if(j+1 .lt. imax )
then 219 if(cosfactor .eq. 0 )
then 221 elseif(cosfactor .eq. 1)
then 222 ans2 = ans2 * (
zen2**2-
zen1**2)/2 *
224 elseif(cosfactor .eq. 2)
then 245 real*8 function primdn(eorp)
248 #include "Zglobalc.h" 250 #include "Zprimary.h" 268 #include "Zprimary.h" 275 real*8 eps, ans, error
287 #include "Zglobalc.h" 289 #include "Zprimary.h" 293 real*8 rig, azm, prob, flux, zeny
298 rig =sqrt( aptcl%fm%p(4)**2 - aptcl%mass**2)/aptcl%charge
304 call crigcut(azm, zeny, rig, prob)
309 if(cosfactor .eq. 0 )
then 311 elseif(cosfactor .eq. 1)
then 313 elseif(cosfactor .eq. 2)
then 317 * (
zen + ratio*sqrt(1.-
zen**2)) / sqrt(1.+ratio**2)
335 #include "Zprimary.h" subroutine cerrormsg(msg, needrtn)
real *8 function primdn(eorp)
dE dx *! Nuc Int sampling table e
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 funcazim(azm)
subroutine crigcut(azmin, zen, rig, prob)
subroutine cconv_prim_e2(comp, E, e_or_p)
subroutine kdwhereis(x, in, a, step, loc)
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
subroutine cprintprim(out)
subroutine cconv_prim_e(comp, e_or_p, aPtcl)
real *8 function funczen(zenx)
subroutine csetcosdeg(cosin, degin)
subroutine creadparam(io)
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
subroutine kdexpintf(func, a, b, eps, ans, error, icon)
subroutine k16pgaussleg(func, a, b, n, ans)
subroutine kdexpintfb(func, a, b, eps, ans, error, icon)
dE dx *! Nuc Int sampling table d
*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 coszenith
subroutine chookcerens(no, primary, angle)
subroutine inteprim2(comp, i1, i2, ans)
subroutine cprimflux0(comp, e_or_p, flux)
subroutine inteflux(comp, ans)
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
subroutine cmkptc(code, subcode, charge, p)