13 #include "Zincidentv.h" 17 integer klena, leng, icon
18 real*8 zAngleSave, r1, r2, cosx, lengx
19 real*8 clenbetween2h, cnewcos
20 character*80 tracefile
24 data zanglesave/-1.d30/
34 if(job .eq.
'flesh')
then 35 call csetemin(generate2, keminobs2(1), kemin2, kemincas2)
36 call csetemin(generate, keminobs(1), kemin, kemincas)
38 call csetemin(generate, keminobs(1), kemin, kemincas)
45 if((trace .gt. 0 .and. trace .lt. 60) .or.
46 * (trace .gt. 100 .and. trace .lt. 160) )
then 48 write(tracefile, *) tracedir(1:klena(tracedir))//
'/trace',
50 call kseblk(tracefile,
' ', leng)
51 call copenfw(tracedev, tracefile(1:leng), icon)
53 call cerrormsg(
'tracefile couldnot be opened',0)
55 elseif(trace .gt. 60 .and. trace .lt. 100 .or.
56 * trace .gt. 160 .and. trace .lt. 200)
then 67 call cxyz2prim(obssites(noofsites)%pos%xyz,
68 * incident%pos%xyz, xyz)
70 if(xyz%r(3) .gt. obssites(i)%zpl )
then 75 incident%where = noofsites + 1
76 incidentcopy%where = incident%where
78 elseif(obsplane .eq.
notused )
then 82 call cerrormsg(
'ObsPlane value is wrong', 0)
88 usetbl = onedim .eq. 3 .or.
89 * ( onedim .eq. 2 .and.
90 * abs( angleatobscopy%r(3) ) .lt. 0.5 )
91 usetbl = usetbl .and. .not. upgoing
92 if(usetbl .and. zanglesave .ne. angleatobscopy%r(3) )
then 93 hbase = heightlist(noofsites) - 0.3
d0 97 lengx = clenbetween2h(r2, r1, -angleatobscopy%r(3))
98 cosx = cnewcos(r2, -angleatobscopy%r(3), lengx)
99 call cl2ttbl(htop, hbase, cosx, -angleatobscopy%r(3),
101 * lentbl, heighttbl, costbl, thicktbl,
maxl2t, numstep)
102 zanglesave = angleatobscopy%r(3)
105 if( howgeomag .le. 2 .or. howgeomag .eq. 31 )
then 106 call cgeomag(yearofgeomag, incident%pos%xyz, mag, icon)
107 call ctransmagto(
'xyz', incident%pos%xyz, mag, mag)
118 #include "Zincidentv.h" 133 zprimary%r(:) = - dcatobsxyz%r(:)
134 call cvecprod(zprimary, detzaxis, xprimary)
136 temp= sum( xprimary%r(:)**2 )
137 if(temp .lt. 1.
e-12)
then 142 xprimary%r(1) = xprimary%r(1)/temp
143 xprimary%r(2) = xprimary%r(2)/temp
144 xprimary%r(3) = xprimary%r(3)/temp
146 call cvecprod(zprimary, xprimary, yprimary)
147 txyz2prim(1,:) = xprimary%r(:)
148 txyz2prim(2,:) = yprimary%r(:)
149 txyz2prim(3,:) = zprimary%r(:)
150 tprim2xyz(:,:) = transpose(txyz2prim(:,:))
161 #include "Zmagfield.h" 173 call converter(obssites(noofsites)%pos%xyz,
174 * obssites(i)%pos%xyz,
176 obssites(i)%zpl = temp%r(3)
179 do i = 1, noofassites
180 call converter(asobssites(noofassites)%pos%xyz,
181 * asobssites(i)%pos%xyz,
183 asobssites(i)%zpl = temp%r(3)
195 depth = zfirst%pos%depth
215 integer,
intent(out):: A
216 integer,
intent(out):: Z
217 real(8),
intent(out):: xs
228 #include "Zmagfield.h" 235 do i = 1, noofassites
236 asobssites(i)%esize = 0.
237 asobssites(i)%age = 0.
241 subroutine csetemin(gen, eminob, emin, emCas)
244 #include "Zmanagerp.h" 249 #include "Zincidentv.h" 265 cas = index(gen,
'em') .gt. 0
266 obas = index(gen,
'as') .gt. 0 .or.
267 * index(gen,
'lat') .gt. 0
271 if(incidentcopy%p%code .eq.
kgnuc)
then 273 * incidentcopy%p%fm%p(4)/incidentcopy%p%subcode
274 elseif(incidentcopy%p%code .ge.
kalfa .and.
275 * incidentcopy%p%code .le.
khvymax)
then 278 * incidentcopy%p%fm%p(4)/code2massn(incidentcopy%p%code)
280 ergpn = incidentcopy%p%fm%p(4)
286 easwait =ergpn * waitratio
296 emcas =min(eminob, emcas)
300 emin = min(emin, max(ratiotoe0* ergpn, 1.
d0) )
303 if(thinsampling)
then 305 if(ethinratio(1) .lt. 0.)
then 306 ethin(1) = abs(ethinratio(1))
308 ethin(1) = ethinratio(1)*ergpn
310 if(ethinratio(3) .lt. 0.)
then 311 ethin(3) = abs(ethinratio(3))
312 elseif(ethinratio(3) .eq. 0.)
then 313 ethin(3) = ethin(1)/10.
315 ethin(3) = ethinratio(3)*ergpn
325 ethin(2) = ethinratio(2)
326 if( ethinratio(4) .eq. 0.)
then 327 ethin(4) = ethin(2)/10.
329 ethin(4) = ethinratio(4)
346 #include "Zelemagp.h" subroutine cerrormsg(msg, needrtn)
dE dx *! Nuc Int sampling table e
max ptcl codes in the kgnuc
block data cblkIncident data *Za1ry *HeightOfInj d3
subroutine csetobsz(converter)
subroutine cgeomag(yearin, llh, h, icon)
subroutine cxyz2prim(base, a, b)
subroutine cvecprod(a, b, c)
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kalfa
subroutine csetemin(gen, eminob, emin, emCas)
! Zobs h header file for observation sites definition ! integer horizontal
subroutine cqfirstid(depth)
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
subroutine cqfirstcolmedia(A, Z, xs)
subroutine cqfirstipi(ptrack)
subroutine cinitracking(incident)
! for length to thickness conversion or v v ! integer maxl2t
subroutine copenfw(io, fnin, icon)
max ptcl codes in the khvymax
subroutine ctransmagto(sys, pos, a, b)
subroutine cxyz2det(det, a, b)
! Zobs h header file for observation sites definition ! integer * perpendicular
subroutine kseblk(text, c, lc)
subroutine cl2ttbl(h1, h2, cosz1, cosz2, step, lengtb, htb, costb, thicktb, maxsize, tblsize)