COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cphotoEEPath.f
Go to the documentation of this file.
1 !c cphotoEEPath, Energy
2 ! real*8 eg, egom, em/0.511e-3/, path, prob
3 ! integer i
4 ! egom=.01
5 ! do i=1,150
6 ! eg=egom*em
7 ! call cphotoEEPath(eg, prob, path)
8 ! write(*, *) eg
9 ! egom=egom*10.**(.03333)
10 ! enddo
11 ! end
12 ! ****************************************************************
13 ! *
14 ! * cphotoEEPath: samples photo electric effect path in r.l
15 ! * cphotoEEEnergy: gives energy of photo-electron in GeV
16 ! *
17 ! ****************************************************************
18 !
19 ! /usage/ call cphotEEPath(eg, prob, path)
20 ! call cphotoEEEnergy(eg, e)
21 !
22 ! --input--
23 ! eg: photon energy in GeV
24 !
25 ! -- output --
26 ! prob: prob/r.l
27 ! path: sampled path in r.l
28 !
29 
30 !
31 !
32 !
33 !
34  subroutine cphotoeepath(eg, tp, path)
35  implicit none
36 ! use XCOM result by fitting it
37 #include "ZbpCnst.h"
38 !
39 !
40  real*8 eg ! input energy in GeV
41  real*8 path ! output sample path in r%l
42  real*8 tp ! prob./r%l
43 !
44 ! XCOM result ; Energy in MeV. Xsection in b
45  real*8 x, u
46 
47  x = log10(eg) +3.0 ! log10(Eg/MeV)
48  if(x .lt. -3.0) then
49  tp = -3.0*(x+3.0) + 3.55376
50  elseif(x .lt. -0.5) then
51  tp = (-0.11136*x -3.5363)*x - 6.0163
52  elseif( x .lt. 1.5) then
53  tp =((-0.25541*x + 0.86430)*x-2.0364)*x - 5.4876
54  else
55  tp = -x- 5.964
56  endif
57  tp = 10.0**tp
58 ! tp in /(g/cm2) --> /r.l
59  tp = tp*x0g
60  call rndc(u)
61  path=-log(u) / tp
62 
63  end
64 
65 ! ************
66  subroutine cphotoeeenergy(egin, eout)
67 ! ************
68  implicit none
69 #include "Zmass.h"
70 
71  real*8 egin
72  real*8 eout
73 
74 !
75  real*8 cnsta
76  data cnsta/ -1.9859375d-04 /
77  save cnsta
78 
79  eout=egin + cnsta
80  if(eout .le. masele) then
81  eout=masele*1.0000000001d0
82  endif
83  end
subroutine rndc(u)
Definition: rnd.f:91
subroutine cphotoeeenergy(egin, eout)
Definition: cphotoEEPath.f:67
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine cphotoeepath(eg, tp, path)
Definition: cphotoEEPath.f:35
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
const double masele
Definition: Zmass.h:2