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

54 
55  call xbgevent
56 

◆ chookbgrun()

subroutine chookbgrun ( )

Definition at line 10 of file chook.f.

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

10  implicit none
11 #include "Zmanagerp.h"
12 #include "Ztrack.h"
13 #include "Ztrackv.h"
14 
15 !
16 !
17 
18 ! If you feel writing the parameters on stderr is
19 ! a bother, comment out the next or
20 ! use other device than ErrorOut.
21 ! Also you may comment out all output routines below.
22 #ifdef sun4
23  external csighandler
24  integer ieeer, ieee_handler
25  ieeer = ieee_handler('set', 'invalid', csighandler)
26 #endif
27 
28 !
29 ! namelist output
30  call cwriteparam(errorout, 0)
31 ! primary information
32  call cprintprim(errorout)
33 ! observation level information
34  call cprintobs(errorout)
35 
36  call xbgrun
37 
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
subroutine xbgrun
Definition: interface.f:10
Here is the call graph for this function:

◆ chookeint()

subroutine chookeint ( integer  never)

Definition at line 160 of file chook.f.

160  implicit none
161 
162 #include "Ztrack.h"
163 #include "Ztrackv.h"
164 ! #include "Ztrackp.h"
165 
166  integer never ! input & output
167 
168 ! don't make never = 1, if you want to get
169 ! information after an electron made interaction
170 ! if this is made non zero, this routine will never be called.
171 !
172 ! MovedTrack is the electron that made interaction
173 ! Pwork contains produced particles.
174 ! Nproduced has the number of particles in Pwork
175 ! IntInfArray(ProcessNo) contains the type of interaction
176 !
177 ! default setting
178  never = 1
179 !
180 ! IntInfArray(ProcessNo).process will have one of
181 ! 'brems', 'mscat', 'bscat', 'anihi' or 'mbrem'
182 !

◆ chookenevent()

subroutine chookenevent ( )

Definition at line 92 of file chook.f.

References cqeventno().

92 
93  implicit none
94 #include "Zmanagerp.h"
95 #include "Ztrack.h"
96 #include "Ztrackv.h"
97 #include "Zobs.h"
98 #include "Zobsp.h"
99 #include "Zobsv.h"
100  integer nevent, ntevent
101 
102  call xenevent
103 
104  call cqeventno(nevent, ntevent)
105  write(0,*) 'end_of_event #=',ntevent
subroutine cqeventno(num, cumnum)
Definition: cqEventNo.f:3
Here is the call graph for this function:

◆ chookenrun()

subroutine chookenrun ( )

Definition at line 111 of file chook.f.

111 
112  implicit none
113  write(0,*) " end of run"

◆ chookgint()

subroutine chookgint ( integer  never)

Definition at line 189 of file chook.f.

189  implicit none
190 
191 #include "Ztrack.h"
192 #include "Ztrackv.h"
193 ! #include "Ztrackp.h"
194 
195  integer never ! input & output
196 
197 ! don't make never = 1, if you want to get
198 ! information after a gamma ray made interaction
199 ! if this is made non zero, this routine will never be called.
200 !
201 ! MovedTrack is the gamma that made interaction
202 ! Pwork contains produced particles.
203 ! Nproduced has the number of particles in Pwork
204 ! IntInfArray(ProcessNo) contains the type of interaction
205 !
206 ! default setting
207  never = 1
208 ! IntInfArray(ProcessNo).process will have one of
209 ! 'pair', 'comp', 'photoe' 'photop' 'mpair'
210 !

◆ chooknepint()

subroutine chooknepint ( integer  never)

Definition at line 217 of file chook.f.

References cirot3vec(), crot3vec(), cutptcl(), d0, p, and process().

217  implicit none
218 
219 
220 #include "Zcode.h"
221 #include "Ztrack.h"
222 #include "Ztrackv.h"
223 
224 ! #include "Ztrackp.h"
225 
226  integer never ! input & output
227 
228 ! don't make never = 1, if you want to get
229 ! information after a non-e-g particle made interaction
230 ! if this is made 1, this routine will never be called.
231 ! make never 5 if the event is not good for you
232 ! and retry the event generation.
233 ! MovedTrack is the particle that made interaction
234 ! Pwork contains produced particles.
235 ! Nproduced has the number of particles in Pwork
236 ! IntInfArray(ProcessNo) contains the type of interaction
237 !
238 ! default setting
239 ! never = 1
240 !
241  integer::i
242  type(ptcl):: proj
243  real(8):: pz
244 
245  if( intinfarray(processno).process /= 'coll' ) then ! even if this is absent, OK
246  return ! ;inside cutptcl same is done
247  endif
248 
249 ! first make Z axis as the incident particle
250  do i = 1, nproduced
251  call cirot3vec(i, movedtrack.p.fm, pwork(i).fm, pwork(i).fm)
252  enddo
253 
254 ! make projectile move +z direction
255 ! with the same energy as MovedTrack.p
256  proj = movedtrack.p
257  pz =sqrt( dot_product(proj.fm.p(1:3), proj.fm.p(1:3)) )
258  proj.fm.p(1:3) =(/0.d0, 0.d0, pz/)
259  call cutptcl(proj)
260 
261 ! again convert Z axis to be the one where
262 ! MovedTrack is defined
263  do i = 1, nproduced
264  call crot3vec( movedtrack.p.fm, pwork(i).fm, pwork(i).fm )
265  enddo
266  never = 0
nodes i
! parameters for Elemag process(-> ---------------------------------------------- real *8 RecoilKineMinE !2 Recoil Kinetic Min Energy above which the recoil(=knock-on process) ! is treated. Below this energy, the effect is included as continuous ! energy loss. Used only if KnockOnRatio $>$ 1. ! If this is 0 or if KnockOnRatio=1, KEminObs(gamma)=KEminObs(elec) is used. ! See also KnockOnRatio. real *8 KnockOnRatio !2 KnockOnRatio *KEminoObs is used instead of RecoilKineMinE if KnockOnRatio $< $1. real *8 X0 !2 Radiation length in kg/m$^2$ for air. Normally the user should not touch this. real *8 Ecrit !2 Critical energy in GeV. \newline ! Employed only when calculating air shower size in the hybrid ! air shower generation. The value would be dependent on the ! experimental purpose. The default value, 81 MeV, is bit too ! small in many applications(The air shower size is overestimated). ! Comparisons of sizes by the hybrid method and by the full Monte ! Carlo tell that \newline ! $N_e$(full 3-D M.C) $< N_e$(hybrid AS with $E_c=81$ MeV) $< N_e$(full 1-D M.C) ! $ {\ \lower-1.2pt\vbox{\hbox{\rlap{$<$}\lower5pt\vbox{\hbox{$\sim$}}}}\ } ! N_e$(hybrid AS with $E_c={76}$ MeV) at around shower maximum. ! Hybrid AS is always essentially 1-D. logical Knockon !2 Obsolete. Don 't use this. See RecoilKineMinE ! and KnockonRatio. real *8 AnihiE !2 If E(positron) $<$ AnihiE, annihilation is considered. real *8 Es !2 Modified scattering constant. 19.3d-3 GeV real *8 MaxComptonE !2 Above this energy, Compton scattering is neglected. real *8 MaxPhotoE !2 Above this energy, photoelectric effect is neglected. real *8 MinPhotoProdE !1 Below this energy, no photo-prod of hadron. See also PhotoProd. logical PhotoProd !1 Switch. if .false., no photo prod. of hadron is considered at all. ! See also MinPhotoProdE, HowPhotoP real *8 Excom1 !2(GeV). If photon energy is<=Excom1, use XCOM data for ! compton/p.e/coherent scattering(must be< 100 GeV). real *8 Excom2 !2(GeV). If photon energy is<=Excom2, use XCOM data for ! pair creation cross-section.(must be< 100 GeV). integer Moliere !2 2$\rightarrow$ use Moliere scat.\newline ! 0$\rightarrow$ use Gaussian scattrign. \newline ! 1$\rightarrow$ use Moli\`ere scattering for non-electrons \newline ! 2$\rightarrow$ use Moli\`ere scattering for all charged ! particles. But treatment is not so rigorous as case of 3. ! \newline ! 3$\rightarrow$ use rigorus Moliere scattering. Diff. from 2 is verysmall. May be some effect in the ! core region. integer ALateCor !2 1$\rightarrow$ angular and lateral correlation is taken into account when Moliere=0 .\newline ! t$\rightarrow$ Use angular-lateral correlation by Gaussian ! approximation. No effect is seen if path length is short. !<-) ---------------------------------------------- common/Zelemagc/RecoilKineMinE
subroutine cutptcl(proj)
Definition: cutptcl.f:2
subroutine cirot3vec(init, p1, p2, po)
Definition: crot3vec.f:97
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine crot3vec(zax, vec1, vec2)
Definition: crot3vec.f:33
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real pz
Definition: Zptcl.h:21
Definition: Zptcl.h:75
Here is the call graph for this function:

◆ chookobs()

subroutine chookobs ( type(track aTrack,
integer  id 
)

Definition at line 64 of file chook.f.

64 !
65 ! Note that every real variable is in double precision so
66 ! that you may output it in sigle precision to save the memory.
67 ! In some cases it is essential to put it in sigle (say,
68 ! for gnuplot).
69 !
70  implicit none
71 #include "Zmanagerp.h"
72 #include "Zcode.h"
73 #include "Ztrack.h"
74 #include "Ztrackv.h"
75 #include "Zheavyp.h"
76 #include "Zobs.h"
77 #include "Zobsp.h"
78 
79  integer id ! input. 1 ==> aTrack is going out from
80 ! outer boundery.
81 ! 2 ==> reached at an observation level
82 ! 3 ==> reached at inner boundery.
83  type(track):: atrack
84 
85  call xobs(atrack, id)
Definition: Ztrack.h:44

◆ chooktrace()

subroutine chooktrace ( )

Definition at line 124 of file chook.f.

References height.

124  implicit none
125 
126 #include "Ztrack.h"
127 #include "Ztrackv.h"
128 #include "Ztrackp.h"
129 #include "Zobs.h"
130 #include "Zobsv.h"
131 
132  real*4 h1, h2
133 !
134 ! Every time a particle is moved in the atmosphere, this routine is called,
135 ! if trace > 100
136 ! For a one track segment,
137 ! TrackBefMove has track information at the beginning of the segment.
138 ! MoveTrack has track information at the end of the segment.
139 !
140 ! You can know the information a track contains in the
141 ! chookObs routine. (Note however, no conversion of coordinate
142 ! has been done. The values are in the Earth xyz system.)
143 ! Besides quantities explained there, you can use, for a given 'track'
144 !
145 ! atrack.pos.xyz.x, atrack.pos.xyz.y, atrack.pos.xyz.z (x,y.z)
146 ! atrack.pos.radiallen (distance from the center of the earth)
147 ! atrack.pos.depth (vertical depth)
148 ! atrack.pos.height (vertical heigth from sea level)
149 !
150 
151  h1 = trackbefmove.pos.height- obssites(noofsites).pos.height
152  h2 = movedtrack.pos.height - obssites(noofsites).pos.height
153 
*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 41 of file chook.f.

41  implicit none
42 #include "Zmanagerp.h"
43  integer sig, code, context(5)
44  write(errorout, *) ' f.p exception content=' , context(4)
45 ! call abort()
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1