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

Go to the source code of this file.

Functions/Subroutines

subroutine cprcsampp (Eg, prob)
 
subroutine cprcsampe (Eg, Ee)
 

Function/Subroutine Documentation

◆ cprcsampe()

subroutine cprcsampe ( real*8  Eg,
real*8  Ee 
)

Definition at line 31 of file cPrCSamp.f.

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

Referenced by cpairenergy().

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
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
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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cprcsampp()

subroutine cprcsampp ( real*8  Eg,
real*8  prob 
)

Definition at line 2 of file cPrCSamp.f.

References d, d0, and parameter().

Referenced by cpairpath().

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 
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
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
Here is the call graph for this function:
Here is the caller graph for this function: