COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cmollerPath.f
Go to the documentation of this file.
1 ! ****************************************************************
2 ! *
3 ! * cmollerPath: moller scattering prob. / r.l
4 ! * cmollerea: energy of survival and recoil electrons and angles
5 ! *
6 !
7 !
8  subroutine cmollerpath(ein, w, prob, path)
9  implicit none
10 #include "Zmass.h"
11 
12  real*8 ein ! input. electron energy in GeV
13  real*8 w ! input. minimum kinetic energy of recoil electron
14  ! to be treated in GeV. (around 200 kev)
15  real*8 prob ! output. prob. per r%l
16  real*8 path ! output. sampled path in r%l
17 ! --------------------------------
18 
19 
20  real*8 em, beta2, t0, g, u
21 ! constm=.03*z/a*x0inkgpm
22  real*8 constm/5.4859d0/
23  real*8 cmollertx
24 !
25  save constm
26 
27 
28  g=ein/masele
29  beta2=1.0d0 - 1./g**2
30  t0=ein-masele
31  if(t0 .gt. 0.) then
32  em= w/t0
33  else
34  em=1000.
35  endif
36  if(em .ge. 0.5d0) then
37  prob= 1.d-35
38  else
39 ! ( .3*z/a) *x0ing = media.basearea*2; prob /r.l
40  prob =
41 ! * epmollertx(g, em)*masele/t0/beta2 * media.basearea*2.0
42  * cmollertx(g, em)*masele/t0/beta2 * constm
43  endif
44  call rndc(u)
45  path = - log(u)/prob
46  end
47 ! ************
48  subroutine cmollerea(ein, w, es, er, coss, cosr)
49  implicit none
50 #include "Zmass.h"
51  real*8 ein ! input. electron energy in GeV
52  real*8 w ! input. minimum kinetic energy of recoil electron
53  ! to be treated( in GeV). (around 200 kev)
54  real*8 es ! output. survival(higher) electron energy in GeV
55  real*8 er ! output. recoiled electron energy in GeV
56  real*8 coss ! output. cos angle of the survival electron
57  real*8 cosr ! output. cos angle of the recoiled //
58 ! --------------------------------
59 
60  real*8 g, em, t0, u, ep, ge, tr, gr, gs
61  real*8 cmollerrf
62  g = ein/masele
63  t0=ein-masele
64  if(t0 .gt. 0.) then
65  em= w/t0
66  else
67  em=1000.
68  endif
69  if(em .ge. 0.50d0) then
70  er=masele
71  es=ein
72  tr=0.
73  else
74 ! rejection method
75 ! *** until loop***
76  do while (.true.)
77  call rndc(u)
78  ep=1.d0/ ( (1.d0-em*2.d0)*u/em + 2.d0 )
79  ge = cmollerrf(g, ep)
80  call rndc(u)
81  if ( u .lt. ge)
82  * goto 100
83  enddo
84  100 continue
85  tr=ep*t0
86  er= tr + masele
87  endif
88  es = ein - er + masele
89  if(es .lt. masele) then
90  es=masele
91  er=max(ein-es+masele, masele)
92  tr=er-masele
93  endif
94 ! angle part
95  gr = er/masele
96  gs = es/masele
97  if(g .gt. 1.) then
98  cosr =sqrt( (gr-1.0)*(g+1.0)/(gr+1.)/(g-1.0))
99  coss = sqrt( (gs-1.0)*(g+1.)/(gs+1.)/(g-1.0))
100  else
101  cosr = 1.0
102  coss= 1.0
103  endif
104 
105  end
106 
107  real*8 function cmollerg(g,x)
108  implicit none
109  real*8 g ! input gamma factor of electron
110  real*8 x ! input. w/T0. w is cut-off kinetic energy.
111 ! ds/dx= cmollerG / x**2 * 2pir^2mZ/beta^2/T0
112  real*8 temp
113  real*8 g1, g2, gsave
114  data gsave/0.d0/
115  save g1, g2, gsave
116  if(g .ne. gsave) then
117  gsave = g
118  g1= (g-1.)/g
119  g2 = (2.0*g-1.0)/g**2
120  endif
121  temp= x/(1.0-x)
122  cmollerg = (g1*x)**2 +
123  * temp*(temp-g2) + 1.0
124  end
125 
126  real*8 function cmollerrf(g,x)
127  implicit none
128  real*8 g ! input.
129  real*8 x ! input.
130 
131  real*8 cmollerG
132 ! rejection function; G(g, x)/G(g,0.5d0)
133  cmollerrf= cmollerg(g,x)/cmollerg(g,0.5d0)
134  end
135 
136  real*8 function cmollertx(g, xm)
137  implicit none
138 ! a part of the moller scattering total x-section
139 ! if 2pi r^2 m/beta^2Z/T0 is
140 ! multiplied, you will get the total x-section for
141 ! a charge Z atom.
142 !
143 ! if 2pir^2/beta^2/T0 *Z Na/A = 0.300/beta^2* Z/A*m/T0 is
144 ! multiplied, you will get the total cross
145 ! section in 1/(g/cm^2), and its inverse is the m.f.p in g/cm^2.
146 !
147  real*8 g ! input gamma factor
148  real*8 xm ! input. w/T0.
149 
150  cmollertx = ((g-1.0)/g)**2 *(0.5-xm) + (1./xm-2.0) -
151  * (1./(1.0-xm)-2.0) + (2.0*g-1.0)/g**2*log(4.0*xm*(1.0-xm))
152  end
real *8 function cmollertx(g, xm)
Definition: cmollerPath.f:137
real *8 function cmollerrf(g, x)
Definition: cmollerPath.f:127
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
subroutine cmollerpath(ein, w, prob, path)
Definition: cmollerPath.f:9
subroutine cmollerea(ein, w, es, er, coss, cosr)
Definition: cmollerPath.f:49
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
real *8 function cmollerg(g, x)
Definition: cmollerPath.f:108