COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cmBremE.f
Go to the documentation of this file.
1  subroutine cmbreme(up, x)
2 !
3 !
4  implicit none
5 !
6  real*8 up ! input. Upsilon value. = Ee/Me * B/Bcr
7 !
8  real*8 x ! output. sampled fractional gamma energy
9 
10  real*8 cmBremI1, cmBremI2, sum, u, xs1
11  integer nc
12 
13 ! select 1st term or 2nd term in Eq.(5) of Brainerd and Petrosian.
14 ! APJ, 320, 1987
15 !
16  xs1 = cmbremi1(up, 0.d0)
17  sum = xs1 + cmbremi2(up)
18  call rndc(u)
19  if(u .lt. xs1/sum) then
20 ! use first term
21  call cmbreme1(up, x)
22  else
23  call cmbreme2(up, x, nc)
24  endif
25  end
subroutine rndc(u)
Definition: rnd.f:91
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine cmbreme1(up, x)
Definition: cmBremE1.f:2
subroutine cmbreme(up, x)
Definition: cmBremE.f:2
subroutine cmbreme2(up, v, nc)
Definition: cmBremE2.f:38