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

Go to the source code of this file.

Functions/Subroutines

real *8 function cmigdg (s)
 
real *8 function cmigdpsi (s)
 
real *8 function cmigdgzai (s)
 
real *8 function cmigdsforbrem (ee, rho, v)
 
real *8 function cmigdsforpair (eg, rho, v)
 
subroutine csetlpmcnst (s1in, logs1in, vmin, X0in)
 

Function/Subroutine Documentation

◆ cmigdg()

real*8 function cmigdg ( real*8  s)

Definition at line 52 of file cmigdFunc.f.

References d0, and parameter().

52  implicit none
53  real*8 s ! input
54 !
55 ! G(s)/( 12pi*s^2/(1+12pi*s^2)) is approximated by polinomials
56 !
57  real*8 xxx1(5) ! pol coeff. for s < 0.12 G(s) error is 3 x 10^-5
58  real*8 xxx2(7) ! pol coeff. for s > 0.11 error is 1 x 10^-3
59 
60  real*8 pi, const, f
61  integer i
62  parameter(pi= 3.141592654d0, const = 12.d0 * pi)
63 
64  data ( xxx1(i), i= 1, 5)/
65  1 0.99995995 , -6.2614068 , 57.629644 ,
66  2 -242.27058 , 450.83728
67  * /
68 
69  data ( xxx2(i), i= 1, 7)/
70  1 0.78283668 , -1.3317861 , 12.312840 ,
71  2 -33.848229 , 44.733673 , -29.201775 ,
72  3 7.5561750
73  * /
74 
75 
76  if(s .lt. 0.12) then
77  f = 0.
78  do i = 5, 2, -1
79  f = (f + xxx1(i))* s
80  enddo
81  f = f + xxx1(1)
82  cmigdg = f * const*s**2/(1. + const*s**2)
83  elseif(s .lt. 1.1) then
84  f = 0.
85  do i = 7, 2, -1
86  f = (f + xxx2(i))* s
87  enddo
88  f = f + xxx2(1)
89  cmigdg = f * const*s**2/(1. + const*s**2)
90  else
91  cmigdg = 1. - 0.022/s**4
92  endif
93 
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
nodes i
real *8 function cmigdg(s)
Definition: cmigdFunc.f:52
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
! constants thru Cosmos real * pi
Definition: Zglobalc.h:2
dE dx *! Nuc Int sampling table f
Definition: cblkMuInt.h:130
Here is the call graph for this function:

◆ cmigdgzai()

real*8 function cmigdgzai ( real*8  s)

Definition at line 146 of file cmigdFunc.f.

146  implicit none
147  real*8 s
148  common /cmigdc/ s1, logs1, vm, logvm, smpa1, smpa2, suma,
149  * a2prob, x0
150  real*8 vm, logvm, smpa1, smpa2, suma, a2prob, x0
151  real*8 s1 ! /1.1185e-4/ ! (Z^0.333/183)^2 ; Z=7.25
152  real*8 logs1 ! /-9.0983/ ! ln(s1)
153 
154 
155 !
156  if( s .gt. 1.) then
157  cmigdgzai = 1.
158  elseif(s .gt. s1) then
159  cmigdgzai = log(s)/logs1 + 1.
160  else
161  cmigdgzai =2.
162  endif
real *8 function cmigdgzai(s)
Definition: cmigdFunc.f:146

◆ cmigdpsi()

real*8 function cmigdpsi ( real*8  s)

Definition at line 103 of file cmigdFunc.f.

References d0.

103  implicit none
104  real*8 s ! input
105 
106  real*8 f
107  real*8 xxx1(4) ! coef. of pol. s<0.3 better than 0.1 % for Psi
108  real*8 xxx2(5) ! // s> 0.3 //
109  integer i
110 
111  data ( xxx1(i), i= 1, 4)/
112  1 1.00 , 2.6978063 , -9.4242869 ,
113  2 11.468298
114  * /
115 
116  data ( xxx2(i), i= 1, 5)/
117  1 1.2095058 , 0.57895055 , -1.6531094 ,
118  2 1.4846143 , -0.46392960
119  * /
120 
121  if(s .lt. 0.3) then
122  f = 0.
123  do i = 4, 2, -1
124  f = (f + xxx1(i)) * s
125  enddo
126  f = f + xxx1(1)
127  cmigdpsi = f * 6.d0 *s /(1.d0 + 6.d0*s)
128  elseif(s .lt. 1.2) then
129  f = 0.
130  do i = 5, 2, -1
131  f = (f + xxx2(i)) * s
132  enddo
133  f = f + xxx2(1)
134  cmigdpsi = f * 6.d0 *s /(1.d0 + 6.d0*s)
135  else
136  cmigdpsi = 1. - 0.012/s**4
137  endif
nodes i
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
real *8 function cmigdpsi(s)
Definition: cmigdFunc.f:103
dE dx *! Nuc Int sampling table f
Definition: cblkMuInt.h:130

◆ cmigdsforbrem()

real*8 function cmigdsforbrem ( real*8  ee,
real*8  rho,
real*8  v 
)

Definition at line 170 of file cmigdFunc.f.

References d0, e, e3, and masele.

170  implicit none
171 #include "Zmass.h"
172 ! #include "Zelemagp.h"
173 !
174  real*8 ee ! input. Electron energy in GeV.
175  real*8 rho ! input. air density in kg/m3
176  real*8 v ! input. Fractional energy of gamma, Eg/Ee
177 !
178  real*8 x, ss, ss2, cmigdgzai, temp
179  integer i
180 
181  common /cmigdc/ s1, logs1, vm, logvm, smpa1, smpa2, suma,
182  * a2prob, x0
183  real*8 vm, logvm, smpa1, smpa2, suma, a2prob, x0
184  real*8 s1 ! /1.1185e-4/ ! (Z^0.333/183)^2 ; Z=7.25
185  real*8 logs1 ! /-9.0983/ ! ln(s1)
186 
187  if(v .eq. 1.) then
188  cmigdsforbrem = 1.
189  else
190  x = ee * rho ! GeV kg/m3
191  ss = 1.
192  temp = masele* x0/x *100. * v/(1.-v) !100: X0/rho in cm
193 
194  do i = 1, 10
195 ! normally 3 to 4 iteration is ok
196  ss2 = 1.37e3 * sqrt(temp/cmigdgzai(ss))
197  if(abs(ss/ss2 -1.d0) .lt. 3.e-3) goto 200
198  ss = ss2
199  enddo
200  ss2 = 1.
201  200 continue
202  cmigdsforbrem = ss2
203 !
204 ! write(*, *) i, sngl(ss2), sngl(v), sngl(ee*rho)
205 !
206  endif
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
nodes i
real *8 function cmigdsforbrem(ee, rho, v)
Definition: cmigdFunc.f:170
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 cmigdgzai(s)
Definition: cmigdFunc.f:146
block data cblkElemag data *AnihiE e3
Definition: cblkElemag.h:7
const double masele
Definition: Zmass.h:2
! 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

◆ cmigdsforpair()

real*8 function cmigdsforpair ( real*8  eg,
real*8  rho,
real*8  v 
)

Definition at line 214 of file cmigdFunc.f.

References d0, e, e3, and masele.

214  implicit none
215 #include "Zmass.h"
216 ! #include "Zelemagp.h"
217 !
218  real*8 eg ! input. Gamma energy in GeV.
219  real*8 rho ! input. air density in kg/m3
220  real*8 v ! input. Fractional energy of e-/e+ Ee/Eg
221 !
222  real*8 x, ss, ss2, cmigdgzai, temp
223  integer i
224  common /cmigdc/ s1, logs1, vm, logvm, smpa1, smpa2, suma,
225  * a2prob, x0
226  real*8 vm, logvm, smpa1, smpa2, suma, a2prob, x0
227  real*8 s1 ! /1.1185e-4/ ! (Z^0.333/183)^2 ; Z=7.25
228  real*8 logs1 ! /-9.0983/ ! ln(s1)
229 
230  if(v .eq. 1.) then
231  cmigdsforpair = 1.
232  else
233  x = eg * rho ! GeV kg/m3
234  ss = 1.
235  temp = masele* x0/x *100./v/(1.-v) !100: X0/rho in cm
236  do i = 1, 10
237 ! normally 3 to 4 iteration is ok
238  ss2 = 1.37e3 * sqrt(temp/cmigdgzai(ss))
239  if(abs(ss/ss2 -1.d0) .lt. 3.e-3) goto 200
240  ss = ss2
241  enddo
242  ss2 = 1.
243  200 continue
244  cmigdsforpair = ss2
245 !
246 ! write(*, *) i, sngl(ss2), sngl(v), sngl(eg*rho)
247 !
248  endif
real *8 function cmigdsforpair(eg, rho, v)
Definition: cmigdFunc.f:214
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
nodes i
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 cmigdgzai(s)
Definition: cmigdFunc.f:146
block data cblkElemag data *AnihiE e3
Definition: cblkElemag.h:7
const double masele
Definition: Zmass.h:2
! 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

◆ csetlpmcnst()

subroutine csetlpmcnst ( real*8  s1in,
real*8  logs1in,
real*8  vmin,
real*8  X0in 
)

Definition at line 255 of file cmigdFunc.f.

Referenced by cbeginrun().

255  implicit none
256  real*8 s1in ! Migdals s1 = (Z^0.333/183)^2
257  real*8 logs1in ! log(s1)
258  real*8 vmin ! Egmin/Ee
259  real*8 x0in ! radiation length in kg/m^2. if it is
260  ! g/cm2, multiply it by 0.1/.00001 = 10.0
261  common /cmigdc/ s1, logs1, vm, logvm, smpa1, smpa2, suma,
262  * a2prob, x0
263  real*8 vm, logvm, smpa1, smpa2, suma, a2prob, x0
264  real*8 s1 ! /1.1185e-4/ ! (Z^0.333/183)^2 ; Z=7.25
265  real*8 logs1 ! /-9.0983/ ! ln(s1)
266 
267  s1 = s1in
268  logs1 = logs1in
269  vm = vmin
270  logvm = log(vm)
271  smpa1 = 0.5
272  smpa2 = -4.0*logvm/3.0
273  suma = smpa1 + smpa2
274  a2prob = smpa2/suma
275  x0 = x0in
Here is the caller graph for this function: