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

Go to the source code of this file.

Functions/Subroutines

subroutine cbremerglpm (ee, rho, eg)
 

Function/Subroutine Documentation

◆ cbremerglpm()

subroutine cbremerglpm ( real*8  ee,
real*8  rho,
real*8  eg 
)

Definition at line 20 of file cbremErgLPM.f.

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

Referenced by cbrems().

20  implicit none
21 #include "Zmass.h"
22  real*8 ee !input. electron energy in GeV
23  real*8 rho !input. air density in kg/m3
24  real*8 eg !output. sampled gamma ray energy. GeV
25 !
26  real*8 u, v, temp, s
28 
29  common /cmigdc/ s1, logs1, vm, logvm, smpa1, smpa2, suma,
30  * a2prob, x0
31  real*8 vm, logvm, smpa1, smpa2, suma, a2prob, x0
32  real*8 s1 ! /1.1185e-4/ ! (Z^0.333/183)^2 ; Z=7.25
33  real*8 logs1 ! /-9.0983/ ! ln(s1)
34 
35 ! real*8 a1, a2, vm, logvm, suma, a2prob
36 ! parameter (vm = 1.d-4, logvm = -4*2.3025851,
37 ! * a1 = 0.5, a2 = -4.d0*logvm/3.,
38 ! * suma = a1 + a2, a2prob = a2/suma)
39 !
40  do while (.true.)
41  call rndc(u)
42  if(u .lt. a2prob) then
43 ! sampling by 1/v
44  call rndc(u)
45  v = exp(u * logvm) ! fractional energy
46 ! rejection
47  call rndc(u)
48  if(u .lt. 1.-v) then
49 ! further check; get s
50  s = cmigdsforbrem(ee, rho, v)
51  if(u .lt. (1.-v) * cmigdgzai(s)*cmigdpsi(s)) then
52 ! accepted
53  eg =min( v, 1.d0- masele/ee) * ee
54  goto 100
55  endif
56  endif
57  else
58 ! sampling by 2vdv
59  call rndc(u)
60  call rndc(v)
61  v = max(u, v)
62 ! rejection, get s
63  s = cmigdsforbrem(ee, rho, v)
64  temp = cmigdgzai(s) * (cmigdg(s) + 2* cmigdpsi(s))/3.
65  call rndc(u)
66  if(u .lt. temp) then
67 ! accepted
68  eg = min(v, 1.d0-masele/ee) * ee
69  goto 100
70  endif
71  endif
72  enddo
73  100 continue
real *8 function cmigdsforbrem(ee, rho, v)
Definition: cmigdFunc.f:170
real *8 function cmigdg(s)
Definition: cmigdFunc.f:52
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
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
const double masele
Definition: Zmass.h:2
real *8 function cmigdpsi(s)
Definition: cmigdFunc.f:103
Here is the call graph for this function:
Here is the caller graph for this function: