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

Go to the source code of this file.

Functions/Subroutines

subroutine cmollerpath (ein, w, prob, path)
 
subroutine cmollerea (ein, w, es, er, coss, cosr)
 
real *8 function cmollerg (g, x)
 
real *8 function cmollerrf (g, x)
 
real *8 function cmollertx (g, xm)
 

Function/Subroutine Documentation

◆ cmollerea()

subroutine cmollerea ( real*8  ein,
real*8  w,
real*8  es,
real*8  er,
real*8  coss,
real*8  cosr 
)

Definition at line 49 of file cmollerPath.f.

References d0, masele, rndc(), and true.

Referenced by cknockon().

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 
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
*************************block data cblkTracking *************************implicit none data *ExactThick *Freec *RatioToE0 *MagChgDist *TimeStructure *Truncn *Truncx data *IncMuonPolari *KEminObs *ThinSampling *EthinRatio *Generate em
Definition: cblkTracking.h:9
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
const double masele
Definition: Zmass.h:2
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there t0
Definition: Zstdatmos.h:7
dE dx *! Nuc Int sampling table g
Definition: cblkMuInt.h:130
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmollerg()

real*8 function cmollerg ( real*8  g,
real*8  x 
)

Definition at line 108 of file cmollerPath.f.

References d0.

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
real(4), dimension(:), allocatable, save temp
Definition: cNRLAtmos.f:29
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
real *8 function cmollerg(g, x)
Definition: cmollerPath.f:108
dE dx *! Nuc Int sampling table g
Definition: cblkMuInt.h:130
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21

◆ cmollerpath()

subroutine cmollerpath ( real*8  ein,
real*8  w,
real*8  prob,
real*8  path 
)

Definition at line 9 of file cmollerPath.f.

References d, masele, and rndc().

Referenced by csampeintl().

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
real *8 function cmollertx(g, xm)
Definition: cmollerPath.f:137
subroutine rndc(u)
Definition: rnd.f:91
*************************block data cblkTracking *************************implicit none data *ExactThick *Freec *RatioToE0 *MagChgDist *TimeStructure *Truncn *Truncx data *IncMuonPolari *KEminObs *ThinSampling *EthinRatio *Generate em
Definition: cblkTracking.h:9
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
! common for std atmosphere real *AlmostVacH ! almost vacuum height real *AlmostVacT ! thickness there t0
Definition: Zstdatmos.h:7
dE dx *! Nuc Int sampling table g
Definition: cblkMuInt.h:130
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmollerrf()

real*8 function cmollerrf ( real*8  g,
real*8  x 
)

Definition at line 127 of file cmollerPath.f.

References d0.

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)
real *8 function cmollerrf(g, x)
Definition: cmollerPath.f:127
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
real *8 function cmollerg(g, x)
Definition: cmollerPath.f:108
dE dx *! Nuc Int sampling table g
Definition: cblkMuInt.h:130
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21

◆ cmollertx()

real*8 function cmollertx ( real*8  g,
real*8  xm 
)

Definition at line 137 of file cmollerPath.f.

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))
real *8 function cmollertx(g, xm)
Definition: cmollerPath.f:137
dE dx *! Nuc Int sampling table g
Definition: cblkMuInt.h:130