COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cqPtclDen.f
Go to the documentation of this file.
1  subroutine cqptclden(lat, depindx, how, r, rho)
2 
3 ! Since the observed particle density is heavily affected by
4 ! the detector structure, we assume here some detecotrs for
5 ! certain input parameters.
6 
7  implicit none
8  integer lat ! input. 1 --> Lateral distribution used in GENAS
9  ! is employed. (recomended)
10  ! 2 --> nkg function is used, making the
11  ! Moliere unit length half.
12  ! 3 --> nkg function is used with normal
13  ! Moriele unit
14  ! 4 --> Bare electron lateral distribution
15  ! is used which created by an electron
16  ! primary.
17  integer depindx ! input. A%S observation depth index.
18  ! 1 to NoOfASSites.
19 
20  integer how ! input. has sence, if lat = 1.
21  ! 1--> very normal scintillator detector is
22  ! assumed; thin iron + scintillator
23  ! of ~ 4cm thick.
24  !
25  ! 2--> 0.5 cm lead plate is added to the
26  ! how=1 case.
27  !
28  real*8 r ! input. distance from the core in m (pependicular
29  ! to the axis) where you want to have the
30  ! effective particle density.
31 
32  real*8 rho ! output. effective average particle number in an area of
33  ! 1 m2 at r. The area is assumed to be
34  ! horiazontal (if ObsPlane = 1) or perpendicular
35  ! to the shower direction (if ObsPlane =2)
36 
37 #include "Ztrack.h"
38 #include "Ztrackv.h"
39 #include "Zobs.h"
40 #include "Zobsp.h"
41 #include "Zobsv.h"
42 #include "Zcode.h"
43 
44  type(track):: inci
45 
46  type(coord):: angle
47  real*4 s, e0, cosz, rmu, rhog
48  real*8 hr, cnkg, mu, s8
49 
50  call cqincident(inci, angle)
51  s = asobssites(depindx)%age
52  e0 = inci%p%fm%p(4) /1000. ! TeV
53  cosz = inci%vec%coszenith
54  mu = asobssites(depindx)%mu
55  rmu = r /mu ! in Moriele unit
56 
57  if(lat .eq. 1) then
58  if(inci%p%code .eq. kphoton .or.
59  * inci%p%code .eq. kelec) then
60  if(how .eq. 1) then
61  call kdig0(e0, cosz, s, rmu, rhog)
62  elseif(how .eq. 2) then
63  call kdigb0(e0, cosz, s, rmu, rhog)
64  else
65  call cerrormsg('how is wrong in cqPtclDen.f', 0)
66  endif
67  else
68  if(how .eq. 1) then
69  call kdip0(e0, cosz, s, rmu, rhog)
70  elseif(how .eq. 2) then
71  call kdipb0(e0, cosz, s, rmu, rhog)
72  else
73  call cerrormsg('how is wrong in cqPtclDen.f', 0)
74  endif
75  endif
76  elseif(lat .eq. 2) then
77  hr = rmu*2.
78  s8 = s
79  rhog = cnkg(s8, hr)
80  elseif(lat .eq. 3) then
81  hr = rmu
82  s8 = s
83  rhog = cnkg(s8, hr)
84  elseif(lat .eq. 4) then
85  call klee(s, rmu, rhog)
86  else
87  call cerrormsg('lat is wwong in cqPtclDen', 0)
88  endif
89  rho = rhog * mu * mu
90  if(obsplane .eq. 1) then
91  rho =rho * cosz
92  endif
93  end
94 
95 
96 
97 
98 
99 
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
subroutine cqincident(incident, AngleAtObs)
Definition: cmkIncident.f:486
const int kphoton
Definition: Zcode.h:6
subroutine kdig0(e0, cosz, s, r, rho)
Definition: genas.f:1622
Definition: Ztrack.h:44
max ptcl codes in the kelec
Definition: Zcode.h:2
subroutine kdip0(e0, cosz, s, r, rho)
Definition: genas.f:1636
subroutine klee(s, r, rho)
kklibg >>>>>>>>>>>>>>>>>>>>>>>>>>>>
Definition: genas.f:3552
subroutine kdigb0(e0, cosz, s, r, rho)
Definition: genas.f:1615
Definition: Zcoord.h:43
subroutine cqptclden(lat, depindx, how, r, rho)
Definition: cqPtclDen.f:2
subroutine kdipb0(e0, cosz, s, r, rho)
Definition: genas.f:1629