COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cPrCSamp.f
Go to the documentation of this file.
1  subroutine cprcsampp(Eg, prob)
2  implicit none
3 ! include "Zglobalc.h"
4 ! include "ZbasicCnst.h"
5 #include "ZbpCnst.h"
6 ! Basic constant; excerpt from ZbasicCnst.h
7  real*8 r0 ! classical elecron radius. m
8  real*8 alpha ! fine structure const.
9  real*8 m2Tomb ! m2 to mb conversion
10  real*8 ar02 ! alpha * r0**2 in mb
11  parameter(
12  * r0 = 2.81794092d-15,
13  * alpha = 1./137.0359895d0,
14  * m2tomb = 1./1.0d-31,
15  * ar02 = alpha * r0**2 * m2tomb
16  * )
17 
18 
19  real*8 Eg ! input. Gamma energy in GeV
20  real*8 prob ! output. prob. of Pair cre. / r%l
21 
22  prob = 4* ar02 *
23  * ( cscrc1 - cscrmain/6.d0)
24  * *mbtopx0
25 
26  end
27 
28 !
29 ! ************
30  subroutine cprcsampe(Eg, Ee)
31 ! ************
32  implicit none
33 #include "ZbpCnst.h"
34 #include "Zmass.h"
35 
36  real*8 Ee ! input. Gammaa energy in GeV
37  real*8 Eg ! output. sampled Ee : higher one of pair
38 
39  real*8 x, u, u1, u2, u3, term1, term2
40 
41 
42  term1 = cscrmain/12.d0
43  term2 = cscrc1 - cscrmain/4.d0
44  do while (.true.)
45  call rndc(u)
46  if(u .lt. term2/(term1+term2)) then
47 ! uniform
48  call rndc(u)
49  else
50 ! x**2
51  call rndc(u1)
52  call rndc(u2)
53  call rndc(u3)
54  u = max(u1,u2,u3)
55  endif
56  x = (u +1.d0)/2.d0
57  if(x .lt. ( 1.d0 - masele/eg)) goto 10
58  enddo
59  10 continue
60  ee = x * eg
61  end
62 
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
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 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
subroutine cprcsampp(Eg, prob)
Definition: cPrCSamp.f:2
const double masele
Definition: Zmass.h:2
subroutine cprcsampe(Eg, Ee)
Definition: cPrCSamp.f:31