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

Go to the source code of this file.

Functions/Subroutines

subroutine cmunsmpp (Emu, prob, path)
 
subroutine cmunsmpe (Emu, Et)
 

Function/Subroutine Documentation

◆ cmunsmpe()

subroutine cmunsmpe ( real*8  Emu,
real*8  Et 
)

Definition at line 33 of file cmuNsmp.f.

References d0, kpolintp2(), and rndc().

Referenced by cmuinte().

33  implicit none
34 #include "Zcmuint.h"
35  real*8 emu ! input. muon total energy in GeV
36  real*8 et ! output. sampled energy transfer
37 !
38 
39  real*8 ale, u, uu, v
40 
41 
42  real*8 a
43  real*8 error
44 
45  data a/0.02d0/ ! to change this, you must change creation part
46 
47 
48 
49  ale = log10(min(emu, munemax))
50 
51 
52  call rndc(u)
53  uu = a*u/(1+a-u) ! uniform in this variable
54  call kpolintp2(0.d0, 1, mundu,
55  * munlemin, 1, munde,
56  * muntbl, munusize, munusize, munesize,
57  * 5, 3, uu, ale, v, error)
58  et = 10.d0**v * emu
subroutine kpolintp2(xa, xstep, dx, ya, ystep, dy,
Definition: kpolintp2.f:41
subroutine rndc(u)
Definition: rnd.f:91
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
real(4), save a
Definition: cNRLAtmos.f:20
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmunsmpp()

subroutine cmunsmpp ( real*8  Emu,
real*8  prob,
real*8  path 
)

Definition at line 2 of file cmuNsmp.f.

References kintp3(), and rndc().

Referenced by csampmuint().

2  implicit none
3 #include "Zcmuint.h"
4 
5  real*8 emu ! input. muon total energy in GeV
6  real*8 prob ! output. muon nuc. int prob. /X0
7  real*8 path ! output. sampled path in r%l
8  ! if Emu < media.cnst.muNEmin, prob=0
9  ! and path becomes big
10 
11  real*8 u, ale
12 
13  if(emu .le. munemin) then
14  prob = 0.
15  elseif(emu .le. munemax1) then
16  ale = log10(emu)
17  call kintp3(muntx, 1, muntxt, munlemin,
18  * mundetx, ale, prob)
19  else
20 ! small power dependence
21  prob = muntx(muntxt)*
22  * (emu/munemax1)**munpwtx
23  endif
24  if(prob .gt. 0.) then
25  call rndc(u)
26  path =- log(u)/prob
27  else
28  path = 1.d30
29  endif
subroutine rndc(u)
Definition: rnd.f:91
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: