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

Go to the source code of this file.

Functions/Subroutines

subroutine time (xxx)
 
subroutine chookbgrun
 
subroutine chookbgevent
 
subroutine chookobs (aTrack, id)
 
subroutine chookenevent
 
subroutine chookenrun
 
subroutine chooktrace
 
subroutine chookeint (never)
 
subroutine chookgint (never)
 
subroutine chooknepint (never)
 

Function/Subroutine Documentation

◆ chookbgevent()

subroutine chookbgevent ( )

Definition at line 39 of file chook.f.

39  implicit none
40 

◆ chookbgrun()

subroutine chookbgrun ( )

Definition at line 15 of file chook.f.

References cprintobs(), cprintprim(), and cwriteparam().

15  implicit none
16 #include "Zmanagerp.h"
17 
18 
19 ! If you feel writing the parameters on stderr is
20 ! a bother, comment out the next or
21 ! use other device than ErrorOut.
22 ! Also you may comment out all output routines below.
23 
24 ! namelist output
25  call cwriteparam(errorout, 0)
26 ! primary information
27  call cprintprim(errorout)
28 ! observation level information
29  call cprintobs(errorout)
subroutine cprintobs(io)
Definition: cprintObs.f:2
subroutine cprintprim(out)
Definition: cprintPrim.f:3
subroutine cwriteparam(io, force)
Definition: cwriteParam.f:4
Here is the call graph for this function:

◆ chookeint()

subroutine chookeint ( integer  never)

Definition at line 202 of file chook.f.

202  implicit none
203 
204 #include "Ztrack.h"
205 #include "Ztrackv.h"
206 ! #include "Ztrackp.h"
207 
208  integer never ! input & output
209 
210 ! don't make never = 1, if you want to get
211 ! information after an electron made interaction
212 ! if this is made non zero, this routine will never be called.
213 !
214 ! MovedTrack is the electron that made interaction
215 ! Pwork contains produced particles.
216 ! Nproduced has the number of particles in Pwork
217 ! IntInfArray(ProcessNo) contains the type of interaction
218 !
219 ! default setting
220  never = 1
221 !
222 ! IntInfArray(ProcessNo).process will have one of
223 ! 'brems', 'mscat', 'bscat',or 'anihi'
224 !

◆ chookenevent()

subroutine chookenevent ( )

Definition at line 98 of file chook.f.

98 
99  implicit none
100 #include "Ztrack.h"
101 #include "Ztrackv.h"
102 #include "Zobs.h"
103 #include "Zobsp.h"
104 #include "Zobsv.h"
105 
106  integer i
107  if(observeas) then
108 ! electron size in B approx.
109  write(*, *) (asobssites(i).esize, i=1, noofassites)
110 ! size weighted age
111  write(*, *) (asobssites(i).age, i=1, noofassites)
112  endif
113 
nodes i

◆ chookenrun()

subroutine chookenrun ( )

Definition at line 121 of file chook.f.

121 
122  implicit none
123 #include "Ztrack.h"
124 #include "Ztrackp.h"
125  integer klena
126  character*24 tracefile
127  character*1 qm/"'"/
128 
129  write(*, *)
130  * '****** Congratulations: Cosmos is now your friend *******'
131 
132  if(trace .gt. 0) then
133  tracefile = tracedir(1:klena(tracedir))//'/trace?'
134  write(*, *)
135  * ' particle trace data has been created'//
136  * ' in '//tracefile
137  write(*, *)
138  * ' ?=1,2..you can see it by gnuplot: For that, in gnuplot do'
139  write(*, *)
140  * ' set para'
141  write(*, *)
142  * ' splot "',tracefile(1:klena(tracefile)),'" w l'
143  write(*, *)
144  * ' To see charged particles only, use following '
145  write(*, *) ' splot "< awk ',qm,' $6 != 0 ; \ '
146  write(*, *) ' NF == 0 ;',qm, ' \ '
147  write(*, *) ' ',tracefile(1:klena(tracefile)),
148  * ' " w l '
149 #ifdef sun4
150  write(*, *) ' The last 3 lines should be on 1 line or',
151  * ' you need contination backslash'
152 #endif
153  endif
154  write(*, *)
155  * '************ Have a nice day !! **************'
156 
integer function klena(cha)
Definition: klena.f:20

◆ chookgint()

subroutine chookgint ( integer  never)

Definition at line 231 of file chook.f.

231  implicit none
232 
233 #include "Ztrack.h"
234 #include "Ztrackv.h"
235 ! #include "Ztrackp.h"
236 
237  integer never ! input & output
238 
239 ! don't make never = 1, if you want to get
240 ! information after a gamma ray made interaction
241 ! if this is made non zero, this routine will never be called.
242 !
243 ! MovedTrack is the gamma that made interaction
244 ! Pwork contains produced particles.
245 ! Nproduced has the number of particles in Pwork
246 ! IntInfArray(ProcessNo) contains the type of interaction
247 !
248 ! default setting
249  never = 1
250 ! IntInfArray(ProcessNo).process will have one of
251 ! 'pair', 'comp', 'photoe' or 'photop'
252 !

◆ chooknepint()

subroutine chooknepint ( integer  never)

Definition at line 259 of file chook.f.

259  implicit none
260 
261 #include "Ztrack.h"
262 #include "Ztrackv.h"
263 ! #include "Ztrackp.h"
264 
265  integer never ! input & output
266 
267 ! don't make never = 1, if you want to get
268 ! information after a non-e-g particle made interaction
269 ! if this is made non zero, this routine will never be called.
270 !
271 ! MovedTrack is the particle that made interaction
272 ! Pwork contains produced particles.
273 ! Nproduced has the number of particles in Pwork
274 ! IntInfArray(ProcessNo) contains the type of interaction
275 !
276 ! default setting
277  never = 1
278 !
279 ! IntInfArray(ProcessNo).process will have
280 ! 'col' or 'decay'

◆ chookobs()

subroutine chookobs ( type(track aTrack,
integer  id 
)

Definition at line 49 of file chook.f.

References charge, code, coszenith, p, r, t, and xyz.

49 !
50 ! Note that every real variable is in double precision so
51 ! that you may output it in sigle precision to save the memory.
52 ! In some cases it is essential to put it in sigle (say,
53 ! for gnuplot).
54 !
55  implicit none
56 #include "Ztrack.h"
57  integer id ! input. 1 ==> aTrack is going out from
58 ! outer boundery.
59 ! 2 ==> reached at an observation level
60 ! 3 ==> reached at inner boundery.
61  type(track)::atrack
62 !
63 ! For id =2, you need not output the z value, because it is always
64 ! 0 (within the computational accuracy).
65 !
66  if(id .eq. 2) then
67 ! output typical quantities.
68  write(*, *)
69  * atrack.where, ! observation level. integer*2. 1 is highest.
70  * atrack.p.code, ! ptcl code. integer*2.
71  * atrack.p.charge, ! charge, integer*2
72  * sngl(atrack.t), ! relateive arrival time in nsec (NOT sec).
73  ! if TimeStructure is F, nonsense.
74  * sngl(atrack.p.fm.p(4)), ! total energy in GeV.
75  * sngl(atrack.pos.xyz.r(1)), sngl(atrack.pos.xyz.r(2)), ! x, y in m
76  * sngl(atrack.vec.w.r(1)), ! direc. cos.x in the current detector system.
77  * sngl(atrack.vec.w.r(2)), ! direc. cos.y
78  * sngl(atrack.vec.w.r(3)), ! direc. cos.z
79  * sngl(atrack.vec.coszenith) ! cos of zenith angle
80  endif
81 ! you may need in some case other information such as
82 ! aTrack.p.subcode ! sub code of the particle integer*2
83 ! aTrack.p.mass ! mass
84 ! aTrack.wgt ! weight of the particle (may not be 1. if
85  ! ThinSampling =T)
86 ! aTrack.p.fm.p(1) ! momentum x component. Note. Momentum is
87 ! given in the Earth xyz system.
88 
89 ! aTrack.p.fm.p(2) ! y
90 ! aTrack.p.fm.p(3) ! z
91 
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz r
Definition: ZavoidUnionMap.h:1
latitude latitude this system is used *****************************************************************! type coord sequence union map real z z in m endmap xyz map real ! latitude in deg is to the north ! longitude in deg is to the east *h ! height in m endmap llh map real ! polar angle ! azimuthal angle *radius ! radial distance endmap sph endunion character *sys ! which system xyz
Definition: Zcoord.h:25
Definition: Ztrack.h:44
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos *Zfirst pos Zfirst pos *Zfirst pos *Zfirst Zfirst vec w *Zfirst vec w Zfirst vec coszenith
Definition: ZavoidUnionMap.h:1
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p charge
Definition: ZavoidUnionMap.h:1
nodes t

◆ chooktrace()

subroutine chooktrace ( )

Definition at line 167 of file chook.f.

References height.

167  implicit none
168 
169 #include "Ztrack.h"
170 #include "Ztrackv.h"
171 #include "Ztrackp.h"
172 #include "Zobs.h"
173 #include "Zobsv.h"
174 
175  real*4 h1, h2
176 !
177 ! Every time a particle is moved in the atmosphere, this routine is called,
178 ! if trace > 60.
179 ! For a one track segment,
180 ! TrackBefMove has track information at the beginning of the segment.
181 ! MoveTrack has track information at the end of the segment.
182 !
183 ! You can know the information a track contains in the
184 ! chookObs routine. (Note however, no conversion of coordinate
185 ! has been done. The values are in the Earth xyz system.)
186 ! Besides quantities explained there, you can use, for a given 'track'
187 !
188 ! atrack.pos.xyz.x, atrack.pos.xyz.y, atrack.pos.xyz.z (x,y.z)
189 ! atrack.pos.radiallen (distance from the center of the earth)
190 ! atrack.pos.depth (vertical depth)
191 ! atrack.pos.height (vertical heigth from sea level)
192 !
193 
194  h1 = trackbefmove.pos.height- obssites(noofsites).pos.height
195  h2 = movedtrack.pos.height - obssites(noofsites).pos.height
196 
*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

◆ time()

subroutine time ( integer  xxx)

Definition at line 5 of file chook.f.

5  integer xxx
6  xxx = 1