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

Go to the source code of this file.

Functions/Subroutines

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 37 of file chook.f.

37  implicit none
38 ! write(*, *) ' bigin event generation'

◆ chookbgrun()

subroutine chookbgrun ( )

Definition at line 13 of file chook.f.

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

13  implicit none
14 #include "Zmanagerp.h"
15 
16 ! If you feel writing the parameters on stderr is
17 ! a bother, comment out the next or
18 ! use other device than ErrorOut.
19 ! Also you may comment out all output routines below.
20 
21 !
22 ! namelist output
23  call cwriteparam(errorout, 0)
24 ! primary information
25  call cprintprim(errorout)
26 ! observation level information
27  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 172 of file chook.f.

172  implicit none
173 
174 #include "Ztrack.h"
175 #include "Ztrackv.h"
176 ! #include "Ztrackp.h"
177 
178  integer never ! input & output
179 
180 ! don't make never = 1, if you want to get
181 ! information after an electron made interaction
182 ! if this is made non zero, this routine will never be called.
183 !
184 ! MovedTrack is the electron that made interaction
185 ! Pwork contains produced particles.
186 ! Nproduced has the number of particles in Pwork
187 ! IntInfArray(ProcessNo) contains the type of interaction
188 !
189 ! default setting
190  never = 1
191 !
192 ! IntInfArray(ProcessNo).process will have one of
193 ! 'brems', 'mscat', 'bscat' 'anihi' or 'mbrem'
194 !

◆ chookenevent()

subroutine chookenevent ( )

Definition at line 99 of file chook.f.

99 
100  implicit none
101 #include "Ztrack.h"
102 #include "Ztrackv.h"
103 #include "Zobs.h"
104 #include "Zobsp.h"
105 #include "Zobsv.h"
106 
107 
108  integer i
109  if(observeas) then
110 ! electron size in B approx.
111  write(*, *) (asobssites(i)%esize, i=1, noofassites)
112 ! size weighted age
113  write(*, *) (asobssites(i)%age, i=1, noofassites)
114  endif
115 ! ************ if you want to flesh this event later
116 ! you may keep the random no. seed by the following
117 ! call cwriteSeed ! SeedFile
nodes i

◆ chookenrun()

subroutine chookenrun ( )

Definition at line 125 of file chook.f.

References cprintstatus().

125  implicit none
126  call cprintstatus ! if don't like, comment out
subroutine cprintstatus
Definition: cendRun.f:35
Here is the call graph for this function:

◆ chookgint()

subroutine chookgint ( integer  never)

Definition at line 201 of file chook.f.

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

◆ chooknepint()

subroutine chooknepint ( integer  never)

Definition at line 229 of file chook.f.

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

◆ chookobs()

subroutine chookobs ( type(track aTrack,
integer  id 
)

Definition at line 47 of file chook.f.

47 !
48 ! Note that every real variable is in double precision so
49 ! that you may output it in sigle precision to save the memory.
50 ! In some cases it is essential to put it in sigle (say,
51 ! for gnuplot).
52 !
53  implicit none
54 #include "Ztrack.h"
55  integer id ! input. 1 ==> aTrack is going out from
56 ! outer boundery.
57 ! 2 ==> reached at an observation level
58 ! 3 ==> reached at inner boundery.
59  type(track):: atrack
60 ! record /track/ aTrack
61 !
62 ! For id =2, you need not output the z value, because it is always
63 ! 0 (within the computational accuracy).
64 !
65  if(id .eq. 2) then
66 ! output typical quantities.
67  write(*, *)
68  * atrack%where, ! observation level. integer*2. 1 is highest.
69  * atrack%p%code, ! ptcl code integer*2.
70  * atrack%p%charge, ! charge, integer*2
71  * sngl(atrack%t), ! relateive arrival time in nsec (NOT sec).
72  ! if TimeStructure is F, nonsense.
73  * sngl(atrack%p%fm%p(4)), ! total energy in GeV.
74  * sngl(atrack%pos%xyz%r(1)), sngl(atrack%pos%xyz%r(2)), ! x, y in m
75  * sngl(atrack%vec%w%r(1)), ! direc. cos.x in the current detector system.
76  * sngl(atrack%vec%w%r(2)), ! direc. cos.y
77  * sngl(atrack%vec%w%r(3)), ! direc. cos.z
78  * sngl(atrack%vec%coszenith) ! cos of zenith angle
79  endif
80 ! you may need in some case other information such as
81 ! aTrack%p%subcode ! sub code of the particle integer*2
82 ! aTrack%p%mass ! mass
83 ! aTrack%wgt ! weight of the particle (may not be 1. if
84  ! ThinSampling =T)
85 ! aTrack%p%fm%p(1) ! momentum x component. Note. Momentum is
86 ! given in the Earth xyz system%
87 ! aTrack%p%fm%p(2) ! y
88 ! aTrack%p%fm%p(3) ! z
89 
90 ! To convert the momentum into the observational
91 ! coordinate system, you may call
92 ! call cresetMom(aTrack)
Definition: Ztrack.h:44

◆ chooktrace()

subroutine chooktrace ( )

Definition at line 137 of file chook.f.

137  implicit none
138 
139 #include "Ztrack.h"
140 #include "Ztrackv.h"
141 #include "Ztrackp.h"
142 #include "Zobs.h"
143 #include "Zobsv.h"
144 
145  real*4 h1, h2
146 !
147 ! Every time a particle is moved in the atmosphere, this routine is called,
148 ! if trace > 100
149 ! For a one track segment,
150 ! TrackBefMove has track information at the beginning of the segment.
151 ! MoveTrack has track information at the end of the segment.
152 !
153 ! You can know the information a track contains in the
154 ! chookObs routine. (Note however, no conversion of coordinate
155 ! has been done. The values are in the Earth xyz system.)
156 ! Besides quantities explained there, you can use, for a given 'track'
157 !
158 ! atrack.pos.xyz.x, atrack.pos.xyz.y, atrack.pos.xyz.z (x,y.z)
159 ! atrack.pos.radiallen (distance from the center of the earth)
160 ! atrack.pos.depth (vertical depth)
161 ! atrack.pos.height (vertical heigth from sea level)
162 !
163 
164  h1 = trackbefmove%pos%height- obssites(noofsites)%pos%height
165  h2 = movedtrack%pos%height - obssites(noofsites)%pos%height
166