COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cprimFlux0.f
Go to the documentation of this file.
1  subroutine cprimflux0(comp, e_or_p, flux)
2  implicit none
3 #include "Zptcl.h"
4 #include "Zprimary.h"
5  type(component):: comp ! input. primary component
6  real*8 e_or_p ! input. Energy or momemntum as given in primary file
7  real*8 flux ! output flux vlaue at e_or_p
8  ! if e_or_p is outside of the table, flux=0
9 
10 
11  integer j
12  real*8 beta
13 
14  call kdwhereis(e_or_p, comp%no_of_seg+1, comp%energy, 1, j)
15  if(j .gt. comp%no_of_seg) then
16  flux = 0.
17  elseif(j .lt. 1) then
18  flux = 0
19  else
20  beta = comp%beta(j)
21  flux = comp%flux(j)*(e_or_p/comp%energy(j))**(-beta)
22  endif
23  end
subroutine kdwhereis(x, in, a, step, loc)
Definition: kdwhereis.f:27
subroutine cprimflux0(comp, e_or_p, flux)
Definition: cprimFlux0.f:2