4 #include "BlockData/cblkGene.h" 13 #include "Zprimaryc.h" 14 #include "Zprimaryv.h" 15 #include "Zincidentp.h" 34 azmmax = imag_p(azimuth) + xaxisfromsouth
35 azmmin =
real(Azimuth) + XaxisFromSouth
37 if(cosmax .ne. cosmin .or. ( cosmax .ne. 1.
d0 .and.
39 write(*,*)
' this progam is to compute integral of' 40 write(*,*)
' primary for a given cos and fai' 41 write(*,*)
' give the same value for upper and lower' 42 write(*,*)
' limit of CosZenith and Azimuth' 45 if(cosmax .eq. 1.
d0)
then 47 *
' getST3 with fai=0~2pi may give you a different result',
50 *
' both should give the same result but due to the' 52 *
' table usage, the results are different. ' 54 if(cutofffile .eq.
' ')
then 59 if(zenvalue .eq.
'deg')
then 74 *
' fai value=', imag_p(azimuth)
76 write(*,*)
' X-axis From South=', xaxisfromsouth,
' deg' 79 write(*,*)
' No rigidity cut is assumed' 81 *
' primary Int(dI/dE) sum(cumlative);' 83 write(*,*)
' Rigidity cut is applied' 85 *
' primary Int(dI/dE*RigCut) sum(cumlative);' 88 do i = 1, prim%no_of_comps
91 write(*,*)
' ', prim%each(
i)%symb,
' ', sngl(
ans),
96 *
'If N primaries are generated in simulation,' 97 write(*,*)
' STdOmega= N/sum' 103 #include "Zglobalc.h" 105 #include "Zprimary.h" 110 real*8 eps, error, ans2, Eth, e_or_p
124 imax = comp%no_of_seg
125 if(
rigc .eq. 0.)
then 129 call cmkptc(comp%code, comp%subcode, comp%charge, aptcl)
130 eth =sqrt( (
rigc*comp%charge)**2 + aptcl%mass**2 )
132 call kdwhereis(e_or_p, comp%no_of_seg+1, comp%energy, 1, j)
135 call kdexpintfb(primdn, comp%energy(1), comp%energy(j+1),
136 * eps, ans, error, icon)
140 if(j+1 .lt. imax )
then 150 real*8 function primdn(eorp)
153 #include "Zglobalc.h" 155 #include "Zprimary.h" 164 real*8 rig, prob, flux, zeny
170 rig =sqrt( aptcl%fm%p(4)**2 - aptcl%mass**2)/aptcl%charge
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
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 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)