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

References mpirank.

40  implicit none
41 #if defined (DOMPI)
42 #include "mpif.h"
43 #include "Zmpi.h"
44  real*8 etime1
45  etime1 = mpi_wtime()
46  write(0,*) 'rank=',mpirank, ' time start=',etime1
47 #endif
48 !//////////////
49  call jamdummy2("begev")
50 !///////////////
51 
integer mpirank
Definition: Zmpibasic.h:1

◆ 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 
17 ! If you feel writing the parameters on stderr is
18 ! a bother, comment out the next or
19 ! use other device than ErrorOut.
20 ! Also you may comment out all output routines below.
21 
22 ! namelist output
23  call cwriteparam(errorout, 0)
24 ! primary information
25  call cprintprim(errorout)
26 ! observation level information
27  call cprintobs(errorout)
28 !//////////////
29  call jamdummy2("begrun")
30 !///////////////
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 218 of file chook.f.

218  implicit none
219 
220 #include "Ztrack.h"
221 #include "Ztrackv.h"
222 ! #include "Ztrackp.h"
223 
224  integer never ! input & output
225 
226 ! don't make never = 1, if you want to get
227 ! information after an electron made interaction
228 ! if this is made non zero, this routine will never be called.
229 !
230 ! MovedTrack is the electron that made interaction
231 ! Pwork contains produced particles.
232 ! Nproduced has the number of particles in Pwork
233 ! IntInfArray(ProcessNo) contains the type of interaction
234 !
235 ! default setting
236  never = 1
237 !
238 ! IntInfArray(ProcessNo).process will have one of
239 ! 'brems', 'mscat', 'bscat',or 'anihi'
240 !

◆ chookenevent()

subroutine chookenevent ( )

Definition at line 109 of file chook.f.

References mpirank.

109 
110  implicit none
111 #include "Ztrack.h"
112 #include "Ztrackv.h"
113 #include "Zobs.h"
114 #include "Zobsp.h"
115 #include "Zobsv.h"
116 
117  integer i
118 #if defined (DOMPI)
119 #include "mpif.h"
120 #include "Zmpi.h"
121  real*8 etime2
122  etime2 = mpi_wtime()
123  write(0,*) 'rank=',mpirank, ' time end=',etime2
124 #endif
125 
126 !////////////////////////
127  integer n, npad, k
128  real*8 p, v
129  common/jyjets/n,npad,k(1000,5),p(1000,5),v(1000,5)
130  integer j
131 !///////////////////////
132 
133  if(observeas) then
134 ! electron size in B approx.
135  write(*, *) (asobssites(i)%esize, i=1, noofassites)
136 ! size weighted age
137  write(*, *) (asobssites(i)%age, i=1, noofassites)
138  endif
139 !///////////////
140  write(*,*)'************************** k *************'
141  do i= 1, 1000
142  do j = 1, 5
143  if(k(i,j) /= 0) then
144  write(*,*) i, j, k(i,j)
145  endif
146  enddo
147  enddo
148 !//////////////
149 !//////////////
150  call jamdummy2("en1ev")
151 !///////////////
152 
153 
nodes i
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
integer mpirank
Definition: Zmpibasic.h:1
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
integer n
Definition: Zcinippxc.h:1

◆ chookenrun()

subroutine chookenrun ( )

Definition at line 161 of file chook.f.

161 
162  implicit none
163 #include "Ztrack.h"
164 #include "Ztrackp.h"
165  integer klena
166  character*24 tracefile
167  character*1 qm/"'"/
168 
169  write(*, *)
170  * '****** Congratulations: Cosmos is now your friend *******'
171 
172 
integer function klena(cha)
Definition: klena.f:20

◆ chookgint()

subroutine chookgint ( integer  never)

Definition at line 247 of file chook.f.

247  implicit none
248 
249 #include "Ztrack.h"
250 #include "Ztrackv.h"
251 ! #include "Ztrackp.h"
252 
253  integer never ! input & output
254 
255 ! don't make never = 1, if you want to get
256 ! information after a gamma ray made interaction
257 ! if this is made non zero, this routine will never be called.
258 !
259 ! MovedTrack is the gamma that made interaction
260 ! Pwork contains produced particles.
261 ! Nproduced has the number of particles in Pwork
262 ! IntInfArray(ProcessNo) contains the type of interaction
263 !
264 ! default setting
265  never = 1
266 ! IntInfArray(ProcessNo).process will have one of
267 ! 'pair', 'comp', 'photoe' or 'photop'
268 !

◆ chooknepint()

subroutine chooknepint ( integer  never)

Definition at line 275 of file chook.f.

275  implicit none
276 
277 #include "Ztrack.h"
278 #include "Ztrackv.h"
279 ! #include "Ztrackp.h"
280 
281  integer never ! input & output
282 
283 ! don't make never = 1, if you want to get
284 ! information after a non-e-g particle made interaction
285 ! if this is made non zero, this routine will never be called.
286 !
287 ! MovedTrack is the particle that made interaction
288 ! Pwork contains produced particles.
289 ! Nproduced has the number of particles in Pwork
290 ! IntInfArray(ProcessNo) contains the type of interaction
291 !
292 ! default setting
293  never = 1
294 !
295 ! IntInfArray(ProcessNo).process will have
296 ! 'coll' or 'decay'

◆ chookobs()

subroutine chookobs ( type(track aTrack,
integer  id 
)

Definition at line 60 of file chook.f.

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

◆ chooktrace()

subroutine chooktrace ( )

Definition at line 183 of file chook.f.

183  implicit none
184 
185 #include "Ztrack.h"
186 #include "Ztrackv.h"
187 #include "Ztrackp.h"
188 #include "Zobs.h"
189 #include "Zobsv.h"
190 
191  real*4 h1, h2
192 !
193 ! Every time a particle is moved in the atmosphere, this routine is called,
194 ! if trace > 60.
195 ! For a one track segment,
196 ! TrackBefMove has track information at the beginning of the segment.
197 ! MoveTrack has track information at the end of the segment.
198 !
199 ! You can know the information a track contains in the
200 ! chookObs routine. (Note however, no conversion of coordinate
201 ! has been done. The values are in the Earth xyz system.)
202 ! Besides quantities explained there, you can use, for a given 'track'
203 !
204 ! atrack.pos.xyz.x, atrack.pos.xyz.y, atrack.pos.xyz.z (x,y.z)
205 ! atrack.pos.radiallen (distance from the center of the earth)
206 ! atrack.pos.depth (vertical depth)
207 ! atrack.pos.height (vertical heigth from sea level)
208 !
209 
210  h1 = trackbefmove%pos%height- obssites(noofsites)%pos%height
211  h2 = movedtrack%pos%height - obssites(noofsites)%pos%height
212