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

Go to the source code of this file.

Functions/Subroutines

subroutine chookbgrun
 
integer function csighandler (sig, code, context)
 
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 124 of file chook.f.

References cqincident(), cqinirn(), cqnoofprim(), and cqprime().

124  implicit none
125 #include "Ztrack.h"
126 
127  type(track):: atrack
128  type(coord):: angleatobs
129 !
130  integer no,seed(2)
131  real*8 pore
132 ! write(*, *) ' bigin event generation'
133  call cqinirn(seed)
134  call cqincident(atrack,angleatobs)
135  call cqnoofprim(no)
136  call cqprime(pore)
137 
138 
subroutine cqincident(incident, AngleAtObs)
Definition: cmkIncident.f:486
subroutine cqnoofprim(no)
Definition: csampPrimary.f:356
Definition: Ztrack.h:44
subroutine cqinirn(ir)
Definition: cwriteSeed.f:4
subroutine cqprime(p_or_e)
Definition: csampPrimary.f:313
Definition: Zcoord.h:43
Here is the call graph for this function:

◆ chookbgrun()

subroutine chookbgrun ( )

Definition at line 79 of file chook.f.

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

79  implicit none
80 #include "Zmanagerp.h"
81 
82 !
83 ! If you feel writing the parameters on stderr is
84 ! a bother, comment out the next or
85 ! use other device than ErrorOut.
86 ! Also you may comment out all output routines below.
87 #ifdef sun4
88  external csighandler
89  integer ieeer, ieee_handler
90 
91  ieeer = ieee_handler('set', 'invalid', csighandler)
92 #endif
93 !
94 ! namelist output
95  call cwriteparam(errorout, 0)
96 ! primary information
97  call cprintprim(errorout)
98 ! observation level information
99  call cprintobs(errorout)
100 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
101 ! open component disk file, and get some over all
102 ! informaiton such as number of component showers
103 
104  call chookbgrunas
105 
subroutine cprintobs(io)
Definition: cprintObs.f:2
subroutine cprintprim(out)
Definition: cprintPrim.f:3
subroutine cwriteparam(io, force)
Definition: cwriteParam.f:4
integer function csighandler(sig, code, context)
Definition: chook.f:63
Here is the call graph for this function:

◆ chookeint()

subroutine chookeint ( integer  never)

Definition at line 297 of file chook.f.

297  implicit none
298 
299 #include "Ztrack.h"
300 #include "Ztrackv.h"
301 ! #include "Ztrackp.h"
302 
303  integer never ! input & output
304 
305 ! don't make never = 1, if you want to get
306 ! information after an electron made interaction
307 ! if this is made non zero, this routine will never be called.
308 !
309 ! MovedTrack is the electron that made interaction
310 ! Pwork contains produced particles.
311 ! Nproduced has the number of particles in Pwork
312 ! IntInfArray(ProcessNo) contains the type of interaction
313 !
314 ! default setting
315  never = 1
316 !
317 ! IntInfArray(ProcessNo).process will have one of
318 ! 'brems', 'mscat', 'bscat', 'anihi' or 'mbrem'
319 !

◆ chookenevent()

subroutine chookenevent ( )

Definition at line 202 of file chook.f.

References cqfirstid(), and depth.

202 
203  implicit none
204 #include "Ztrack.h"
205 #include "Ztrackv.h"
206 #include "Zobs.h"
207 #include "Zobsp.h"
208 #include "Zobsv.h"
209  include "ZASbyH.h"
210 
211 
212 
213 ! type(track):: inci
214 ! type(coord):: angle
215  integer i
216  real*8 fdepth
217 
218 !
219 
220 ! open(59,file='cosmos.dat',access='append')
221 ! write(59,*) (-1,i=1,8)
222  if(observeas) then
223  call cqfirstid(fdepth)
224 ! call cqIncident(inci, angle)
225 ! bsin = cgetBsin(inci.p, Mag)*1.e4
226 ! electron size in B approx.
227 ! write(59, *) (ASObsSites(i).esize, i=1, NoOfASSites)
228 ! size weighted age
229 ! write(*, *) (ASObsSites(i).age, i=1, NoOfASSites)
230  do i = 1, noofassites
231  write(*, *) 's ', sngl(asobssites(i).pos.depth/10.),
232  * sngl(asobssites(i).esize),
233  * sngl(asobssites(i).age)
234 ! * ,sngl(fdepth)
235 ! * ,sngl(bsin)
236  enddo
237  write(*, *)
238 ! close(59)
239  endif
240 
241 
*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
nodes i
subroutine cqfirstid(depth)
Definition: ciniTracking.f:188
Here is the call graph for this function:

◆ chookenrun()

subroutine chookenrun ( )

Definition at line 249 of file chook.f.

249 
250  implicit none

◆ chookgint()

subroutine chookgint ( integer  never)

Definition at line 326 of file chook.f.

326  implicit none
327 
328 #include "Ztrack.h"
329 #include "Ztrackv.h"
330 
331 
332  integer never ! input & output
333 
334 ! don't make never = 1, if you want to get
335 ! information after a gamma ray made interaction
336 ! if this is made non zero, this routine will never be called.
337 !
338 ! MovedTrack is the gamma that made interaction
339 ! Pwork contains produced particles.
340 ! Nproduced has the number of particles in Pwork
341 ! IntInfArray(ProcessNo) contains the type of interaction
342 !
343 ! default setting
344  never = 1
345 ! IntInfArray(ProcessNo).process will have one of
346 ! 'pair', 'comp', 'photoe' 'photop' 'mpair'
347 !

◆ chooknepint()

subroutine chooknepint ( integer  never)

Definition at line 354 of file chook.f.

354  implicit none
355 #include "Zcode.h"
356 #include "Ztrack.h"
357 #include "Ztrackv.h"
358 ! #include "Ztrackp.h"
359 
360  integer never ! input & output
361 
362 ! don't make never = 1, if you want to get
363 ! information after a non-e-g particle made interaction.
364 ! if this is made non zero, this routine will never be called.
365 !
366 ! MovedTrack is the particle that made interaction
367 ! Pwork contains produced particles.
368 ! Nproduced has the number of particles in Pwork
369 ! IntInfArray(ProcessNo) contains the type of interaction
370 !
371 ! IntInfArray(ProcessNo).process will have
372 ! 'col' or 'decay'
373 ! %%%%%%%%%%%%%%%%%%%%%%%%%%
374 ! replace interacting nucleons by c.s. give never = 2
375 ! so that no further development by the interacting nucleons.
376 !
377  call chooknepinta
378  never = 2

◆ chookobs()

subroutine chookobs ( type(track aTrack,
integer  id 
)

Definition at line 147 of file chook.f.

147 !
148 ! Note that every real variable is in double precision so
149 ! that you may output it in sigle precision to save the memory.
150 ! In some cases it is essential to put it in sigle (say,
151 ! for gnuplot).
152 !
153  implicit none
154 #include "Zcode.h"
155 #include "Ztrack.h"
156  integer id ! input. 1 ==> aTrack is going out from
157 ! outer boundery.
158 ! 2 ==> reached at an observation level
159 ! 3 ==> reached at inner boundery.
160  type(track):: atrack
161 
162 !
163 ! For id =2, you need not output the z value, because it is always
164 ! 0 (within the computational accuracy).
165 !
166  if(id .eq. 2) then
167 ! output typical quantities.
168 ! write(*, *)
169 ! * aTrack.where, ! observation level. integer*2. 1 is highest.
170 ! * aTrack.p.code, ! ptcl code. integer*2.
171 ! * aTrack.p.charge, ! charge, integer*2
172 ! * sngl(aTrack.t), ! relateive arrival time in nsec (NOT sec).
173 ! ! if TimeStructure is F, nonsense.
174 ! * sngl(aTrack.p.fm.e) ! total energy in GeV.
175 ! * sngl(aTrack.pos.xyz.x), sngl(aTrack.pos.xyz.y), ! x, y in m
176 ! * sngl(aTrack.vec.w.x), ! direc. cos.x in the current detector system.
177 ! * sngl(aTrack.vec.w.y), ! direc. cos.y
178 ! * sngl(aTrack.vec.w.z), ! direc. cos.z
179 ! * sngl(aTrack.vec.coszenith) ! cos of zenith angle
180 ! if(aTrack.p.code .eq. kelec) then
181 ! write(*, *) aTrack.where
182 ! endif
183 ! endif
184 ! you may need in some case other information such as
185 ! aTrack.p.subcode ! sub code of the particle integer*2
186 ! aTrack.p.mass ! mass
187 ! aTrack.wgt ! weight of the particle (may not be 1. if
188 ! ! ThinSampling =T)
189 ! aTrack.p.fm.x ! momentum x component. Note. Momentum is
190 ! given in the Earth xyz system.
191 
192 ! aTrack.p.fm.y ! y
193 ! aTrack.p.fm.z ! z
194 
195  endif
Definition: Ztrack.h:44

◆ chooktrace()

subroutine chooktrace ( )

Definition at line 261 of file chook.f.

References height.

261  implicit none
262 
263 #include "Ztrack.h"
264 #include "Ztrackv.h"
265 #include "Ztrackp.h"
266 #include "Zobs.h"
267 #include "Zobsv.h"
268 
269  real*4 h1, h2
270 !
271 ! Every time a particle is moved in the atmosphere, this routine is called,
272 ! if trace > 60.
273 ! For a one track segment,
274 ! TrackBefMove has track information at the beginning of the segment.
275 ! MoveTrack has track information at the end of the segment.
276 !
277 ! You can know the information a track contains in the
278 ! chookObs routine. (Note however, no conversion of coordinate
279 ! has been done. The values are in the Earth xyz system.)
280 ! Besides quantities explained there, you can use, for a given 'track'
281 !
282 ! atrack.pos.xyz.x, atrack.pos.xyz.y, atrack.pos.xyz.z (x,y.z)
283 ! atrack.pos.radiallen (distance from the center of the earth)
284 ! atrack.pos.depth (vertical depth)
285 ! atrack.pos.height (vertical heigth from sea level)
286 !
287 
288  h1 = trackbefmove.pos.height- obssites(noofsites).pos.height
289  h2 = movedtrack.pos.height - obssites(noofsites).pos.height
290 
*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

◆ csighandler()

integer function csighandler ( integer  sig,
integer  code,
integer, dimension(5)  context 
)

Definition at line 110 of file chook.f.

110  implicit none
111 #include "Zmanagerp.h"
112  integer sig, code, context(5)
113  write(errorout, *) ' f.p exception content=' , context(4)
114 ! call abort()
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1