COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cPrTSamp.f
Go to the documentation of this file.
1  subroutine cprtsampp( Eg, prob)
2 !
3 !
4 ! sampling of occurence of pair electron production / X0
5 ! near threshold energy.
6 ! total cross-section in unit of Z^2 ar02 was computed
7 ! by using testPairLowE2.f and approximated by
8 ! polinomials in two devided regions.
9 !
10  implicit none
11 #include "Zmass.h"
12 !cccccccccccccinclude "Zglobalc.h"
13 #include "ZbpCnst.h"
14  real*8 Eg
15  real*8 prob ! output probability of Pair / X0
16  real*8 thresh, y, s
17  parameter( thresh = 2.001d0 * masele)
18  integer i
19  real*8 coef1(5), coef2(5)
20  real*8 Z2
21 
22 ! Basic constant; excerpt from ZbasicCnst.h
23  real*8 r0 ! classical elecron radius. m
24  real*8 alpha ! fine structure const.
25  real*8 m2Tomb ! m2 to mb conversion
26  real*8 ar02 ! alpha * r0**2 in mb
27  parameter(
28  * r0 = 2.81794092d-15,
29  * alpha = 1./137.0359895d0,
30  * m2tomb = 1./1.0d-31,
31  * ar02 = alpha * r0**2 * m2tomb
32  * )
33 
34 ! y< 3; y = (Eg-2me)/me
35  data ( coef1(i), i= 1, 5)/
36  1 0.77366610e-03, -0.31574438e-01, 0.14388056,
37  2 -0.26702841e-01, 0.16673182e-02/
38 ! 3 < y 40
39  data ( coef2(i), i= 1, 5)/
40  1 -0.40412775, 0.37073868, -0.11235537e-01,
41  2 0.21697910e-03, -0.17697363e-05/
42 !
43  data z2/54.54/
44 
45  if(eg .lt. thresh) then
46  prob= 1.d-40
47  else
48  y = (eg - thresh)/masele
49  if(y .lt. 3.0) then
50 ! better than 0.1 %
51  s = 0.
52  do i = 5, 1, -1
53  s = s * y + coef1(i)
54  enddo
55  else
56  s = 0.
57 ! better than 0.1 %
58  do i = 5, 1, -1
59  s = s * y + coef2(i)
60  enddo
61  endif
62 ! media.Z2 is sum of No*Z^2 of each element
63  prob = s * z2 * ar02 * mbtopx0
64  endif
65  end
66 ! ************
67  subroutine cprtsampe(Eg, Ee)
68 ! ************
69 ! samples higher energy pair electron;
70 ! We know that the pair energy spectrum is well approximated
71 ! by the following function where x is (Ee-me)/(Eg-2me)
72 ! ( 0<x<1).
73 ! f(x) = sqrt(x(1-x)) (x**p + (1-x)**p)
74 ! p is the function of Eg as
75 ! p = 0.022(Eg/me) + 0.956
76 ! This approximation is good up to Eg~50me where B.H non screened
77 ! cross-section can be applied.
78 !
79  implicit none
80 #include "Zmass.h"
81 
82  real*8 Ee, Eg
83 
84  real*8 u, p, x
85 
86  p = 0.022d0* eg/masele + 0.956d0
87 ! the sampling function is x^(1/2+p)(1-x)^(1/2) dx
88 ! + x^(1/2) (1-x)^(p+1/2) dx
89 !
90  call rndc(u)
91  if(u .lt. 0.5) then
92 ! use first term; note power is diff. by 1.
93  call kbetar( p+1.5d0, 1.5d0, x)
94  else
95 ! use second term
96  call kbetar( 1.5d0, p+1.5d0, x)
97  endif
98  if(x .lt. 0.5) then
99  x = 1.-x
100  endif
101  ee = x * (eg-2*masele) + masele
102  end
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
subroutine cprtsampe(Eg, Ee)
Definition: cPrTSamp.f:68
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
subroutine rndc(u)
Definition: rnd.f:91
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
const double masele
Definition: Zmass.h:2
subroutine kbetar(a, b, x)
Definition: kbetar.f:19
subroutine cprtsampp(Eg, prob)
Definition: cPrTSamp.f:2