COSMOS v7.655  COSMOSv7655
(AirShowerMC)
chookHybAS.f
Go to the documentation of this file.
1 c ******************************************************************
2 c * *
3 c * chookHybAS. There are two routines here
4 c * chookHybAS: is the interface when a component A.S has been
5 c * made from an electron.
6 c * chookHybAS2: is the interface which may be called at the
7 c * end of one event generation for air shower business.
8 c * Note: The former is called from the system.
9 c * The latter must be called in your chookEnEvent, if
10 c * necessary. These are template rouitnes. You must/may
11 c * modify them. The latter may be included in your
12 c * chookEnEvent routine directly. The latter name
13 c * can be another one.
14 c *
15 c ******************************************************************
16 c
17 c
18 c
19  subroutine chookhybas(el, never)
20  implicit none
21 
22 c This routine is called at the end of the cobAS.f in Tracking/AS/,
23 c that is, when a component A.S is made from an electron. If the
24 c user has nothing to do, give never=1, then the
25 c routine will not be called again.
26 c If you have something to do (say, business for
27 c generating air fluorescence light), do it here.
28 c Give never=0 in such a case.
29 
30 #include "Ztrack.h"
31 #include "Zobs.h"
32 #include "Zobsv.h"
33 #include "Zelemagp.h"
34 
35  record /track/ el ! input. an electron produced component A.S
36  integer never ! input /output. give 1 if you don't need
37  ! the routine else give 0.
38 
39 c The following will be the typical stuff you may want to use in
40 c this routine. (i=1, NoOfASSites; index for observation depths)
41 c
42 c CompASNe(i): component A.S size produced by the input electron.
43 c For depths where this value is 0,
44 c avoid doing something here.
45 c CompASAge(i): age of component A.S produced by the input electron.
46 c If this value is 2.0, the A.S is assumed to be very
47 c old and the CompASNe(i) is 0. You should skip
48 c treating deeper depths.
49 c
50 
51  real*8 zobas, zp
52  real*8 elog, eno, age
53  real*8 cvh2temp, tk ! temperature in Kelvin
54  real*8 dedx ! to store <dE/dx>
55  real*8 cvh2den, rho ! density of air in kg/m^3
56 
57  integer xsite
58 c
59 c **********
60  never = 1 ! change this to 0 if you need this routine
61 c **********
62 
63  zp = el.pos.depth ! starting vertical depth of
64  ! the component electron (kg/m^3)
65 c
66 c get average dE/dx for every depth.
67 c
68 
69 
70  do xsite = 1, noofassites
71  age = compasage(xsite)
72  eno = compasne(xsite)
73 
74 
75  if(age .eq. 2.) then
76 c store 0 or ... in your own array
77 
78  goto 100
79  endif
80  if(eno .gt. 0.) then
81 c
82 c you may do some business. Say generate fluorescence light.
83 c you may need some array to store the quantities
84 c you compute here. (presumably in your own common block).
85 c Following is typical quantities you may need for such a
86 c computation
87 c temerature in Kelvin of 'site'
88  tk = cvh2temp(asobssites(xsite).pos.height)
89 c density of air in kg/m^3; multiply 10^-3 to get it in
90 c g/cm^3.
91  rho = cvh2den(asobssites(xsite).pos.height)
92  call cavededx(compasne(xsite), compasage(xsite), dedx)
93 c ****** dedx >0 and in GeV/(kg/m^2). To convert it to
94 c ****** MeV/(g/cm^2). Multiply 100.
95 
96 c vertical depth of site( kg/m2)
97  zobas=asobssites(xsite).pos.depth
98 
99 c log10 of elecrton energy in terms of critical energy
100  elog = log10(el.p.fm.p(4)/ecrit)
101 
102  endif
103  enddo
104  100 continue
105  end
106 c
107  subroutine chookhybas2
108  implicit none
109 c
110 c You may utilize this routine for computing, say,
111 c air fluo. light. for a given air shower. This should
112 c be called from chookEnEvent routine.
113 c
114 c
115 #include "Ztrack.h"
116 #include "Ztrackv.h"
117 #include "Zobs.h"
118 #include "Zobsp.h"
119 #include "Zobsv.h"
120 
121 
122 
123  real*8 eno, age, zobas, nmu
124  real*8 muonno(maxnoofassites)
125  real*8 cvh2temp, tk ! temperature in Kelvin
126  real*8 dedx ! to store <dE/dx>
127  real*8 eth
128  real*8 cvh2den, rho ! density in kg/m^3.
129 c
130  data eth/1.0/ ! dummy Emu threshold
131 
132  integer xsite
133 c
134 c ******************** Below: not usable for a while
135 c (as of May/10,'97)
136 c Nmu (E>Eth)
137  call cgetnmu(eth, muonno)
138 c ********************
139 
140  if(observeas) then
141 c
142  do xsite = 1, noofassites
143  age = asobssites(xsite).esize
144  eno = asobssites(xsite).age
145  nmu = muonno(xsite)
146 c Ne or Nmu > 0
147  if(eno .gt. 0. .or. nmu .gt. 0.) then
148 c
149 c you may do some business. Say generate fluorescence light.
150 c you may need some array to store the quantities
151 c you compute here.
152 c Following is typical quantities you may need for such a
153 c computation
154 c temerature in Kelvin of 'site'
155  tk = cvh2temp(asobssites(xsite).pos.height)
156 c in kg/m^3; x 10^-3 in g/cm^3
157  rho = cvh2den(asobssites(xsite).pos.height)
158 
159 c get average <dE/dx>at site
160  call cavededx(asobssites(xsite).esize,
161  * asobssites(xsite).age, dedx)
162 c ******* dedx >0 and in GeV/(kg/m^2). To convert it to
163 c ******* MeV/(g/cm^2). Multiply 100.
164 
165 c vertical depth of site( kg/m2)
166  zobas=asobssites(xsite).pos.depth
167  endif
168  enddo
169  endif
170  end
171 
172 
173 
174 
175 
176 
177 
178 
179 
*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
Definition: Ztrack.h:44
const int maxnoofassites
Definition: Zobs.h:12
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
subroutine cgetnmu(eth, nmu)
Definition: cgetNmu.f:3
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos *Zfirst pos Zfirst pos height
Definition: ZavoidUnionMap.h:1
subroutine chookhybas(el, never)
Definition: chookHybAS.f:20
subroutine cavededx(eno, age, dedx)
Definition: cavedEdx.f:2
subroutine chookhybas2
Definition: chookHybAS.f:108