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

Go to the source code of this file.

Functions/Subroutines

subroutine cmbreme2 (up, v, nc)
 

Function/Subroutine Documentation

◆ cmbreme2()

subroutine cmbreme2 ( real*8  up,
real*8  v,
integer  nc 
)

Definition at line 38 of file cmBremE2.f.

References d, d0, false, ksamppw(), ksamppwmrg(), ksamppwx(), parameter(), rndc(), and true.

Referenced by cmbreme().

38  real*8 up ! input Upsilon value
39  real*8 v ! output. sampled fractional value
40  integer nc ! output. number of rejections. average trial
41 ! number is 1.16 for up=0.01 and 1.26 for
42 ! up=10.
43 !
44  integer n1, n2, n, i, na
45  parameter(n1 = 3, n2 = 5, n= 12)
46  real*8 c1(n1), x10(n1), p1(n1), x1p(n1+1), coef1(n1) ! for 1/(2+3Uz)^3
47 !
48  real*8 c2(n2), x20(n2), p2(n2), x2p(n2+1), coef2(n2) ! for z^2K2/3(z)
49 !
50  real*8 coef(n), p(n), xp(n+1)
51  real*8 z, fz, ft, ck23, u
52  logical first
53 
54  data p1/0.04433d0, 1.5d0, 2.8125d0/
55  data c1/0.1195d0, 1.5625d-2, 3.05175d-5/
56 
57 !
58  data x20/0.01d0, 1.d0, 2.511886d0, 7.4131d0,
59  * 19.95d0/
60  data c2/2.3096d-3, 4.9463d-1, 0.41808d0,
61  * 1.5448d-2, 2.427d-7/
62  data p2/-1.3298d0, -0.446d0, 1.04103, 5.92368d0,
63  * 18.007d0/
64 
65 
66  data first/.true./
67  save first, x1p, coef1, x2p, coef2, x10, x20
68 
69 !
70 
71  x10(1) = 0.01d0/up
72  x10(2) = 2.d0/3.d0/up
73  x10(3) = 10.d0/up
74 !
75 
76  call ksamppwx(c1, p1, x10, n1, x1p(2), coef1 )
77  x1p(1) = 0.
78  x1p(n1+1) = 30./up
79 ! write(*,*)' x1p, coef1=', x1p, coef1
80 !
81  if(first) then
82  call ksamppwx(c2, p2, x20, n2, x2p(2), coef2 )
83  first = .false.
84  x2p(1) = 0.
85  x2p(n2+1) = 30.
86 ! write(*,*) ' x2p, coef2=', x2p, coef2
87  endif
88  call ksamppwmrg(coef1, p1, x1p, n1,
89  * coef2, p2, x2p, n2,
90  * coef, p, xp, na)
91 ! write(*,*)'n, coef, p, xp=', na, coef, p, xp
92  do i =1, 1000
93  call ksamppw(i, coef, p, xp, na, z, fz)
94 ! write(*,*) ' z, fz=', z, fz
95  ft = z*z * ck23(z) / (2.+ 3.* up*z)**3
96  call rndc(u)
97  if(u .lt. ft/fz) goto 10
98  enddo
99  10 continue
100  nc = i
101  v = 3.*up*z/(2.+ 3.*up*z)
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
nodes z
real *8 function ck23(x)
Definition: ck23.f:18
block data include Zlatfit h c fitting region data data data data data d0 data data d0 data data h g *is for param c g data up(2, 1)/7.0d0/
logical, save first
Definition: cNRLAtmos.f:8
nodes i
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
Definition: cblkElemag.h:7
subroutine rndc(u)
Definition: rnd.f:91
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine ksamppwx(c, p, x0, n, xp, c2)
Definition: ksampPw.f:240
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
subroutine ksamppwmrg(c1, p1, x1, n1, c2, p2, x2, n2, c, p, x, n)
Definition: ksampPw.f:273
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
Definition: cblkElemag.h:7
real cut integer nc
Definition: Zprivate.h:1
subroutine ksamppw(ini, coef, power, node, n, x, fx)
Definition: ksampPw.f:95
integer n
Definition: Zcinippxc.h:1
Here is the call graph for this function:
Here is the caller graph for this function: