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

Go to the source code of this file.

Functions/Subroutines

subroutine cbrlsampp (Ee, prob)
 
subroutine cbrlsampe (Ee, Eg)
 

Function/Subroutine Documentation

◆ cbrlsampe()

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

Definition at line 29 of file cBrLSamp.f.

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

Referenced by cbremsenergy().

29 ! ************
30  implicit none
31 #include "ZbpCnst.h"
32 #include "ZbpTable.h"
33 
34 #include "Zmass.h"
35 
36  real*8 ee, eg
37 
38  real*8 u, ale, us, ans
39 
40  call rndc(u)
41  ale = log10(ee)
42  if(u .gt. bremuminla) then
43 ! region A
44 
45  call k4ptdi(brstla,
46  * bremuszla,
47  * bremesize,
48  * bremuszla,
49  * bremuminla,
50  * bremleemin,
51  * bremdula,
52  * bremdel, u, ale, ans)
53  eg= exp( ans*(1.-u))*bremegmin
54  else
55 ! region B
56  us = u**0.25d0
57 
58  call k4ptdi(brstlb,
59  * bremuszlb,
60  * bremesize,
61  * bremuszlb,
62  * 0.d0,
63  * bremleemin,
64  * bremdulb,
65  * bremdel, us, ale, ans)
66  eg = exp(-ans*u)*(ee - masele)
67  endif
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
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
subroutine k4ptdi(f, im, jm, iadj, x0, y0, hx, hy, x, y, ans)
Definition: k4ptdi.f:21
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cbrlsampp()

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

Definition at line 2 of file cBrLSamp.f.

References d, and kintp3().

Referenced by cbremspath().

2  implicit none
3 #include "ZbpCnst.h"
4 #include "ZbpTable.h"
5 
6  real*8 ee
7  real*8 prob ! output probability of Brems / X0
8 
9  real*8 ale
10 ! Ee
11 ! BremEemin BremEeCS BremEemaxL BremEemaxH
12 ! ----------------------------------------------------
13 ! | | | |
14 ! no brems p.s c.s lpm lpm by
15 ! rejection
16 !
17 
18  if(ee .le. bremeemin) then
19  prob= 1.d-40
20  else
21  ale=log10(ee)
22  call kintp3(brtxl,
23  * 1, bremtxtl, bremleemin,
24  * bremdetxl, ale, prob)
25  endif
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
subroutine kintp3(f, intv, n, x1, h, x, ans)
Definition: kintp3.f:19
Here is the call graph for this function:
Here is the caller graph for this function: