4 character*120 tracefile
5 integer leng, icon, i, outtype
6 real*4 mint, maxt, dt, t1, t2
14 open(11, file=
'input')
16 * tracefile, dir, mint, maxt, dt, pixel, dothin, split,
20 * tracefile(1:
klena(tracefile)), dir(1:
klena(dir)),
21 * mint, maxt, dt, pixel, dothin, split,
24 call copenfw2(11, tracefile, 1, icon)
26 write(0,*) tracefile,
' cannot be opened' 31 do while (t2 .lt. maxt)
33 t2 = min(t1+ dt*
n , maxt)
36 call slice(t1, t2, dt)
37 write(0,*)
' t1=',t1,
't2=',t2,
' slice ended' 40 write(0,*)
' thinning ended' 44 if( ibits(outtype, 0, 1) .ne. 0)
then 47 if( ibits(outtype, 1, 1) .ne. 0)
then 50 write(0,*)
' all output finished' 52 if(ibits(outtype, 0, 1) .ne. 0)
then 55 if(ibits(outtype, 1, 1) .ne. 0)
then 58 write(0,*)
' ouput to a file ended' 62 write(0,*)
' rewind impossilbe' 73 subroutine slice(mint, maxt, dt)
83 real*4 xx1, yy1, zz1, time1
84 real*4 xx2, yy2, zz2, time2
94 read(*,
'(a)', end=1000 ) input
95 if( input .ne.
" " )
then 96 read(input, * ) xx1, yy1, zz1, time1, code, chg
97 do while( input .ne.
" ")
99 if( input .ne.
" " )
then 100 read(input, * ) xx2, yy2, zz2, time2, code, chg
101 it1 = (time1- mint)/dt +1
102 it2 = (time2- mint)/dt
103 if(it1 .lt. 1)
goto 900
104 if(it2 .gt.
n)
goto 900
105 if(time2 .gt. maxt)
goto 900
106 jmin = min(jmin, it1)
107 jmax = max(jmax, it2)
112 *
'ptcls at time=', t ,
' > ',
maxp 114 *
'try to thin ptcls in the same pixel' 119 write(0,*)
'ptcls > ',
maxp 120 write(0,*)
'thinning not worked' 125 k = (t - time1) /(time2-time1)
126 temp = (xx2-xx1) * k + xx1
127 if( abs(temp) .gt. max16bit)
goto 200
129 temp = (yy2-yy1) * k + yy1
130 if( abs(temp) .gt. max16bit)
goto 200
132 temp = (zz2-zz1) * k + zz1
133 if( abs(temp) .gt. max16bit)
goto 200
135 codex(
idx(j), j) = code
136 chgx(
idx(j), j) = chg
158 include
"Zprivate2.f" 163 integer nc, j, i, k1, k2, l, nc0
168 if(
idx(j) .gt. 0)
then 172 if(k1 .lt. 0)
goto 20
175 if(k2 .lt. 0)
goto 10
176 if(abs(
x(k1, j)-
x(k2,j)) .gt. pixel )
goto 20
180 if(abs(
y(k1, j)-
y(k2,j)) .gt. pixel )
goto 10
181 if(abs(
z(k1, j)-
z(k2,j)) .gt. pixel )
goto 10
198 write(0,*)
' thinning ', nc0,
"-->", nc
205 subroutine mvdata(f, j, nc)
207 include
"Zprivate2.f" 233 include
"Zprivate2.f" 258 include
"Zprivate2.f" 260 character* 130 filename
270 if(
idx(j) .gt. 0)
then 272 write(filename,
'(a, a, i5.5,a)') dir(1:klena(dir)),
275 open(20, file=filename, form=
'formatted')
277 write(20,
'(3i7,i3,i3)')
278 *
x(i, j),
y(i,j),
z(i,j), codex(i,j), chgx(i,j)
287 include
"Zprivate2.f" 289 character* 130 filename
299 if(
idx(j) .gt. 0)
then 301 write(filename,
'(a, a, i5.5, a)') dir(1:klena(dir)),
303 open(20, file=filename, form=
'formatted')
305 write(20,
'(a)')
"SKEL" 307 * codex(1,j), chgx(1, j),
idx(j), mulalpha)
316 include
"Zprivate2.f" 319 character* 130 filename
326 if( filec .eq. 0 )
then 327 filename = dir(1:klena(dir))//
"/timesorted.dat" 328 open(20, file=filename,
335 write(20,
'(3i7, i3,i3)' )
336 *
x(i, j),
y(i,j),
z(i,j), codex(i,j), chgx(i,j)
338 if(
idx(j) .gt. 0 )
write(20,*)
343 include
"Zprivate2.f" 346 character* 130 filename
353 if( filec .eq. 0 )
then 354 filename = dir(1:klena(dir))//
"/timesorted.skel" 355 open(20, file=filename,
361 if(
idx(j) .gt. 0)
then 362 write(20,
'(a)')
"SKEL" 364 *
x(1, j),
y(1,j),
z(1,j), codex(1,j), chgx(1,j),
idx(j),
372 subroutine wtaskel(fno, xa, ya, za, code, chg, np, mulalpha)
376 real*4 xa(np), ya(np), za(np)
378 integer*2 code(np), chg(np)
383 write(fno,
'(2i9)') np, np
385 write(fno,
'(3i7)' ) xa(i), ya(i), za(i)
388 call code2rgb(code(i), chg(i), r, g, b, alpha)
389 write(fno,
'("1 ", i8, 3f5.2,f6.3)')
390 * i-1, r, g, b, alpha*mulalpha
394 subroutine code2rgb(codei, chgi, r, g, b, alpha)
396 integer*2 codei, chgi
399 integer ncolor, mncolor
409 type(colortab):: tab(mncolor)
418 if(first .eq. 0)
then 420 open(13, file=
'colortab')
423 read(12,
'(a)',end=10) input
424 if(input(1:1) .ne.
"#" .and. input .ne.
' ')
then 426 if(i .gt. mncolor)
then 427 write(0,*)
' too many color spec. in colortab' 431 * tab(i).
code, tab(i).chg,
432 * tab(i).r, tab(i).g, tab(i).b,
443 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
subroutine kqsorth(A, ORD, N)
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)
! 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)