COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cprimFlux0.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine cprimflux0 (comp, e_or_p, flux)
 

Function/Subroutine Documentation

◆ cprimflux0()

subroutine cprimflux0 ( type (component comp,
real*8  e_or_p,
real*8  flux 
)

Definition at line 2 of file cprimFlux0.f.

References kdwhereis().

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
subroutine kdwhereis(x, in, a, step, loc)
Definition: kdwhereis.f:27
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
Here is the call graph for this function: