1 #include "BlockData/cblkGene.h" 10 #include "Zprimaryc.h" 11 #include "Zprimaryv.h" 12 #include "Zincidentp.h" 23 real*8 ans, sum, dazim
31 azmmax = imag_p(azimuth) + xaxisfromsouth
32 azmmin =
real(Azimuth) + XaxisFromSouth
34 if(cosmax .ne. cosmin)
then 35 write(*, *)
' this program is to compute integral of' 36 write(*, *)
' primary for a fixed zenith angle ' 37 write(*, *)
' give the same lower and upper limit for' 38 write(*, *)
' CosZenith' 40 elseif( (abs(imag_p(azimuth)-
real(azimuth))/360.
d0 -1.
d0)
43 write(*,*)
' warning: fai region is not 2pi ' 45 *
' integral will be performed in the given fai region' 47 write(*,*)
' no fai region; for a fixed fai' 48 write(*,*)
' use getST2' 52 if(cutofffile .eq.
' ')
then 57 if(zenvalue .eq.
'deg')
then 69 *
' fai region=',
real(Azimuth),
' to ',
70 * imag_p(azimuth),
' deg' 71 write(*,*)
' X-axis From South=', xaxisfromsouth,
' deg' 75 write(*,*)
' No rigidity cut is assumed' 77 "
' primary Int(dI/dE) sum(cumlative);' 79 write(*,*)
' Rigidity cut is applied' 81 "
' primary Int(dI/dE*RigCut) sum(cumlative);' 84 do i = 1, prim%no_of_comps
87 write(*,*)
' ', prim%each(
i)%symb,
' ', sngl(
ans),
88 *
' ', sngl(sum)/dazim
92 *
'If N primaries are generated in simulation,',
94 write(*,*)
'if azimuthal angle range is not 0~2pi',
95 *
' 2pi in ST2pidcos has been adjusted' 101 #include "Zglobalc.h" 103 #include "Zprimary.h" 108 real*8 eps, error, ans2, Eth, e_or_p
122 imax = comp%no_of_seg
123 if(
rigc .eq. 0.)
then 126 if(abs(ans/comp%inte_value-1.
d0) .gt. 1.
d-3 )
then 127 write(*,*)
' ans=',ans,
' internal integral=',
132 call cmkptc(comp%code, comp%subcode, comp%charge, aptcl)
133 eth =sqrt( (
rigc*comp%charge)**2 + aptcl%mass**2 )
135 call kdwhereis(e_or_p, comp%no_of_seg+1, comp%energy, 1, j)
138 call kdexpintfb(primdn, comp%energy(1), comp%energy(j+1),
139 * eps, ans, error, icon)
143 if(j+1 .lt. imax )
then 154 real*8 function primdn(eorp)
157 #include "Zglobalc.h" 159 #include "Zprimary.h" 168 real*8 eps, ans, error
181 #include "Zglobalc.h" 183 #include "Zprimary.h" 187 real*8 rig, azm, prob, flux, zeny
192 rig =sqrt( aptcl%fm%p(4)**2 - aptcl%mass**2)/aptcl%charge
198 call crigcut(azm, zeny, rig, prob)
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)
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 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)