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

Go to the source code of this file.

Functions/Subroutines

subroutine crecprob (depthin, code, limit, dfai, E0in, NN, cosz, nr, recprob, nptcl, age, sum, Nx)
 

Function/Subroutine Documentation

◆ crecprob()

subroutine crecprob ( real  depthin,
integer  code,
real  limit,
real  dfai,
real  E0in,
integer  NN,
real  cosz,
integer  nr,
real, dimension(nr)  recprob,
real, dimension(nr)  nptcl,
real  age,
real  sum,
real  Nx 
)

Definition at line 3 of file crecprob.f.

Referenced by __checknrfai.f__(), and howmuch().

3  implicit none
4 !
5 ! compute probabilty that we accept observed particles
6 ! which fall in at Moliere unit r and r+dr with dfai
7 ! azimuthal angle range; the probabilty is determined
8 ! so that the maximumk number may not exceed 'limit'
9 ! in each region.
10 ! This is based on 10^18 eV shower.
11 !
12  real depthin ! input g/cm^2
13  integer code ! input gamma-1, e-2, mu-3, had-4
14  real limit ! input max number of particls to be recorded
15  ! in actual simulation run.
16  integer nr ! input number of r bin; 42. is standard
17  ! r is digitized from r1=0.01 (m.u) with 0.1 log10
18  ! bin.
19  real dfai ! input fai angle (deg) bin. 30 is standard
20  real e0in ! input primary total energy in GeV.
21  integer nn ! input primary nucleon number.
22  real cosz ! input primary zenith angle in cosine
23  real recprob(nr) ! ouput. probability to record particles
24  ! at r (at depth) in dfai region. if >1.
25  ! accept always
26  real nptcl(nr) ! output. average number of particles falling
27  ! on the given band region.
28  real age ! output. given depth is at age
29 
30  real sum ! output sum of particles
31  real nx ! output number of particles at depth (Nx ~ sum)
32 
33  integer idep, ir
34  real r1, r2, a, s, r
35  real sizex, asdensity, rho, n
36  real pi, fita, fitb, fitc
37  real eps, depth, e0, fac
38  real cogdep, dep2cogdep, cogdep2s
39 !
40  pi=3.141592
41  sum = 0.
42  if(nn .ge. 1) then
43  e0=e0in/nn
44  fac = nn
45  else
46 ! to be updateded
47  e0 = e0in
48  fac = 1
49  endif
50  depth = depthin/cosz
51  cogdep = dep2cogdep(e0in, nn, depth)
52  s = cogdep2s(e0in, nn, cogdep)
53  nx = sizex(e0in, nn, code, s)
54  r1 = 0.01/10**0.05
55  do ir=1, nr
56  r2=r1*10.**0.1
57  a = pi*(r2**2- r1**2)*dfai/360.
58  r = sqrt(r1*r2)
59  rho=asdensity(e0, code, s, r)
60  n= nx*rho*a
61  nptcl(ir)=n
62  sum = sum + n
63  eps =limit/n
64 ! if(code .ge. 3 .and. ir .lt. 20 ) then
65 ! eps = eps*10.
66 ! elseif(code .ge. 3 ) then
67 ! eps = eps*2.
68 ! elseif(code .eq. 2 .and. ir .lt. 20 ) then
69 ! eps = eps*1.5
70 ! endif
71  if(eps .lt. 0.) then
72  recprob(ir) = 1.1
73  else
74  recprob(ir)= eps
75  endif
76  r1= r2
77  enddo
78  age = s
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos *Zfirst pos depth
Definition: ZavoidUnionMap.h:1
real function cogdep2s(E0, NN, cogdep)
Definition: asinfo.f:188
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz r
Definition: ZavoidUnionMap.h:1
real function dep2cogdep(E0in, NN, dep)
Definition: asinfo.f:56
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1
! constants thru Cosmos real * pi
Definition: Zglobalc.h:2
real(4), save a
Definition: cNRLAtmos.f:20
integer n
Definition: Zcinippxc.h:1
real function sizex(E0in, NN, code, s)
Definition: asinfo.f:17
real function asdensity(E0, code, age, r)
Definition: asdensity.f:37
Here is the caller graph for this function: