4 character*120 tracefile
5 integer leng, icon, i, outtype
6 real*4 mint, maxt, dt, t1, t2
15 * tracefile, dir, mint, maxt, dt, pixel, dothin, split,
19 * tracefile(1:
klena(tracefile)), dir(1:
klena(dir)),
20 * mint, maxt, dt, pixel, dothin, split,
23 call copenfw2(11, tracefile, 1, icon)
25 write(0,*) tracefile,
' cannot be opened' 30 do while (t2 .lt. maxt)
32 t2 = min(t1+ dt*
n , maxt)
35 call slice(t1, t2, dt)
36 write(0,*)
' t1=',t1,
't2=',t2,
' slice ended' 39 write(0,*)
' thinning ended' 43 if( ibits(outtype, 0, 1) .ne. 0)
then 46 if( ibits(outtype, 1, 1) .ne. 0)
then 49 write(0,*)
' all output finished' 51 if(ibits(outtype, 0, 1) .ne. 0)
then 54 if(ibits(outtype, 1, 1) .ne. 0)
then 57 write(0,*)
' ouput to a file ended' 68 subroutine slice(mint, maxt, dt)
77 real*4 xx1, yy1, zz1, time1
78 real*4 xx2, yy2, zz2, time2
88 read(11,
'(a)', end=1000 ) input
89 if( input .ne.
" " )
then 90 read(input, * ) xx1, yy1, zz1, time1, code, chg
91 do while( input .ne.
" ")
92 read(11,
'(a)', end =1000) input
93 if( input .ne.
" " )
then 94 read(input, * ) xx2, yy2, zz2, time2, code, chg
95 it1 = (time1- mint)/dt +1
96 it2 = (time2- mint)/dt
97 if(it1 .lt. 1)
goto 900
98 if(it2 .gt.
n)
goto 900
99 if(time2 .gt. maxt)
goto 900
100 jmin = min(jmin, it1)
101 jmax = max(jmax, it2)
106 *
'ptcls at time=', t ,
' > ',
maxp 108 *
'try to thin ptcls in the same pixel' 113 write(0,*)
'ptcls > ',
maxp 114 write(0,*)
'thinning not worked' 119 k = (t - time1) /(time2-time1)
120 x(
idx(j), j) = (xx2-xx1) * k + xx1
121 y(
idx(j), j) = (yy2-yy1) * k + yy1
122 z(
idx(j), j) = (zz2-zz1) * k + zz1
123 codex(
idx(j), j) = code
124 chgx(
idx(j), j) = chg
142 include
"Zprivate2.f" 147 integer nc, j, i, k1, k2, l, nc0
152 if(
idx(j) .gt. 0)
then 157 if(k1 .lt. 0)
goto 20
160 if(k2 .lt. 0)
goto 10
161 if(abs(
x(k1, j)-
x(k2,j)) .gt. pixel )
goto 20
165 if(abs(
y(k1, j)-
y(k2,j)) .gt. pixel )
goto 10
166 if(abs(
z(k1, j)-
z(k2,j)) .gt. pixel )
goto 10
183 write(0,*)
' thinning ', nc0,
"-->", nc
190 subroutine mvdata(f, j, nc)
192 include
"Zprivate2.f" 218 include
"Zprivate2.f" 243 include
"Zprivate2.f" 245 character* 130 filename
255 if(
idx(j) .gt. 0)
then 257 write(filename,
'(a, a, i5.5,a)') dir(1:klena(dir)),
260 open(20, file=filename, form=
'formatted')
262 write(20,
'(3g16.8,i3,i3)')
263 *
x(i, j),
y(i,j),
z(i,j), codex(i,j), chgx(i,j)
272 include
"Zprivate2.f" 274 character* 130 filename
284 if(
idx(j) .gt. 0)
then 286 write(filename,
'(a, a, i5.5, a)') dir(1:klena(dir)),
289 open(20, file=filename, form=
'formatted')
291 write(20,
'(a)')
"SKEL" 293 * codex(1,j), chgx(1, j),
idx(j), mulalpha)
302 include
"Zprivate2.f" 305 character* 130 filename
312 if( filec .eq. 0 )
then 313 filename = dir(1:klena(dir))//
"/timesorted.dat" 314 open(20, file=filename,
321 write(20,
'(3g16.8, i3,i3)' )
322 *
x(i, j),
y(i,j),
z(i,j), codex(i,j), chgx(i,j)
324 if(
idx(j) .gt. 0 )
write(20,*)
329 include
"Zprivate2.f" 332 character* 130 filename
339 if( filec .eq. 0 )
then 340 filename = dir(1:klena(dir))//
"/timesorted.skel" 341 open(20, file=filename,
347 if(
idx(j) .gt. 0)
then 348 write(20,
'(a)')
"SKEL" 350 *
x(1, j),
y(1,j),
z(1,j), codex(1,j), chgx(1,j),
idx(j),
358 subroutine wtaskel(fno, xa, ya, za, code, chg, np, mulalpha)
362 real*4 xa(np), ya(np), za(np)
364 integer*2 code(np), chg(np)
369 write(fno,
'(2i9)') np, np
371 write(fno,
'(3g16.8)' ) xa(i), ya(i), za(i)
374 call code2rgb(code(i), chg(i), r, g, b, alpha)
375 write(fno,
'("1 ", i8, 3f5.2,f6.3)')
376 * i-1, r, g, b, alpha*mulalpha
380 subroutine code2rgb(codei, chgi, r, g, b, alpha)
382 integer*2 codei, chgi
385 integer ncolor, mncolor
395 type(colortab):: tab(mncolor)
405 if(first .eq. 0)
then 407 open(13, file=
'colortab')
410 read(13,
'(a)',end=10) input
411 if(input(1:1) .ne.
"#" .and. input .ne.
' ')
then 413 if(i .gt. mncolor)
then 414 write(0,*)
' too many color spec. in colortab' 418 * tab(i).
code, tab(i).chg,
419 * tab(i).r, tab(i).g, tab(i).b,
430 if(tab(i).
code .eq. codei .and. tab(i).chg .eq. chgi)
goto 100
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
subroutine mvdata(f, j, nc)
subroutine thinning(i1, i2)
subroutine wtaskel(fno, xa, ya, za, code, chg, np, mulalpha)
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon true
averg real MaxCPU integer idx(Maxp)
subroutine copenfw2(io, fnin, form, icon)
*Zfirst p fm *Zfirst p Zfirst p code
subroutine code2rgb(codei, chgi, r, g, b, alpha)
latitude latitude this system is used *****************************************************************! type coord sequence union map real y
integer function klena(cha)
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon ! knockon is considered Obsolete *PhotoProd false
subroutine mvdatai(f, j, nc)
subroutine kqsortr(A, ORD, N)
! 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 e endmap map real * x
subroutine slice(mint, maxt, dt)