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

Go to the source code of this file.

Functions/Subroutines

subroutine cbrcsampp (Ee, prob)
 
subroutine cbrcsampe (Ee, Eg)
 

Function/Subroutine Documentation

◆ cbrcsampe()

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

Definition at line 37 of file cBrCSamp.f.

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

Referenced by cbremsenergy().

37 ! ************
38  implicit none
39 #include "Zmass.h"
40 #include "ZbpCnst.h"
41 
42  real*8 ee ! input. Electron energy in GeV
43  real*8 eg ! output. sampled Eg
44 
45  real*8 vc, x, u, u1, u2, term1, term2
46 
47  vc = bremegmin/(ee-masele)
48 
49 
50  term1 = cscrmain * (log(1.d0/vc) - (1.d0-vc))
51  term2 = cscrc1 * (1.0d0-vc)*(1.0+vc)/2.d0
52  call rndc(u)
53  if(u .le. term1/(term1+term2)) then
54 ! (1/x -1)dx
55  do while (.true.)
56 ! average number of trials is 1.0xx; xx depends on vc
57  call rndc(u)
58  x = vc**u
59  call rndc(u)
60  if( u .lt. (1.0-x)) goto 10
61  enddo
62  10 continue
63  else
64 ! x dx in [vc:1]
65  do while (.true.)
66  call rndc(u1)
67  call rndc(u2)
68  x = max(u1,u2)
69  if(x .gt. vc ) goto 20
70  enddo
71  20 continue
72  endif
73  eg = (ee-masele) * x
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:

◆ cbrcsampp()

subroutine cbrcsampp ( real*8  Ee,
real*8  prob 
)

Definition at line 2 of file cBrCSamp.f.

References d, d0, masele, and parameter().

Referenced by cbremspath().

2  implicit none
3 #include "Zglobalc.h"
4 #include "Zmass.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 
20 
21 
22  real*8 ee ! input. Electron energy in GeV
23  real*8 prob ! output. prob. of Brems / r%l
24 
25  real*8 vc
26 
27  vc = bremegmin/(ee-masele)
28  prob = 4. * ar02 * ( ( log(1.d0/vc) -
29  * (1.d0-vc)) * cscrmain +
30  + (1.d0-vc)* (1.d0+vc)/2 * cscrc1 )
31  * * mbtopx0
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
const double masele
Definition: Zmass.h:2
Here is the call graph for this function:
Here is the caller graph for this function: