macro a exec init1 do i=1,1 set XVAL 0.3 nt/cre 10 ' ' 11 ' ' 1000 n l x y z th ph e t s a nt/rea 10 z.[i] ent=$HINFO(10,'ENTRIES') if [ent].gt.0 then vec/cre av(5) R 0 0 0 0 0 appl comis quit real function ave real n,l,x,y,z,th,ph,e,t,s,a logical chain character*128 cfile common /pawchn/ chain,nchevt,ichevt common /pawchc/ cfile common /pawidn/ idnevt,obs(13),n,l,x,y,z,th,ph,e,t,s,a vector av av(1)=av(1)+x av(2)=av(2)+y av(3)=av(3)+z av(4)=av(4)+log10(e) av(5)=av(5)+t end quit nt/lo 10 ave sigma av=av/[ent] xc=av(1) yc=av(2) zc=av(3) ec=av(4) tc=av(5) MESS [xc] [yc] [zc] [ec] [tc] lmin=0 lmax=2 tmin=[tc]-50 tmax=[tc]+50 emin=[ec]-0.2 emax=[ec]+0.2 xmin=[xc]-50 xmax=[xc]+50 ymin=[yc]-50 ymax=[yc]+50 zmin=[zc]-50 zmax=[zc]+50 thmin=0 thmax=180 phmin=-180 phmax=180 smin=0.5 smax=1.5 amin=0.5 amax=1.5 x2=[ent]+10 null -10 [x2] [lmin] [lmax] nt/pl 10.l%n ! ! ! ! sl atit 'step number' 'reduced likelihood' ! 222 wait exec b l z [lmin] [lmax] [zmin] [zmax] 'reduced likelihood' 'z "M# m "N#' exec b log10(e) t [emin] [emax] [tmin] [tmax] 'log?10!( E "M# GeV "N# )' 'start time "M# ns "N#' exec b x y [xmin] [xmax] [ymin] [ymax] 'x "M# m "N#' 'y "M# m "N#' exec b ph th [phmin] [thmax] [thmin] [thmax] 'azimuth "M# degrees "N#' 'zenith "M# degrees "N#' * exec b s a [smin] [smax] [amin] [amax] 'b?e! multiplier' 'b?a! multiplier' endif enddo exec plot1 a return macro b ent=$HINFO(10,'ENTRIES') num=[ent]/10 null [3] [4] [5] [6] nt/pl 10.[2]%[1] ! ! ! ! s set ncol 11 pal 1 do i=1,10 i1=[num]*([i]-1) i2=[num]*([i]) ik=11-[i] set PLCI [ik] nt/pl 10.[2]%[1] [i1]0.and.n<=[num] ! ! ! s 101 h1m=$HINFO(101,'MEAN') h1r=$HINFO(101,'RMS') set hcol 2 1d 102 ' ' 100 [3] [4] nt/pl 10.[1] n>[num] ! ! ! s 102 h2m=$HINFO(102,'MEAN') h2r=$HINFO(102,'RMS') null 0 1 0 1 sa set TXCI 4 itx 0.1 0.95 $FORMAT([h1m], 'f4.3')"A#$FORMAT([h1r], 'f4.3') set TXCI 2 itx 0.6 0.95 $FORMAT([h2m], 'f4.3')"A#$FORMAT([h2r], 'f4.3') set TXCI 1 atit [7] 'entries' ! 222 wait set hcol 3 1d 100 ' ' 100 [5] [6] nt/pl 10.[2] ! ! ! ! ! 100 set hcol 4 1d 101 ' ' 100 [5] [6] nt/pl 10.[2] n>0.and.n<=[num] ! ! ! s 101 h1m=$HINFO(101,'MEAN') h1r=$HINFO(101,'RMS') set hcol 2 1d 102 ' ' 100 [5] [6] nt/pl 10.[2] n>[num] ! ! ! s 102 h2m=$HINFO(102,'MEAN') h2r=$HINFO(102,'RMS') null 0 1 0 1 sa set TXCI 4 itx 0.1 0.95 $FORMAT([h1m], 'f4.3')"A#$FORMAT([h1r], 'f4.3') set TXCI 2 itx 0.6 0.95 $FORMAT([h2m], 'f4.3')"A#$FORMAT([h2r], 'f4.3') set TXCI 1 atit [8] 'entries' ! 222 wait return macro c exec init1 set YSIZ 16 opt logy nt/cre 10 ' ' 4 ' ' 1000 s o t q nt/rea 10 dat nt/cre 20 ' ' 4 ' ' 1000 s o t q nt/rea 20 out set dmod 1 do str=1,86 do dom=1,60 opt=q*(s.eq.[str].and.o.eq.[dom]) 1d 100 ' ' 100 -100 2400 nt/pl 10.t [opt] ! ! ! n 100 n1=$HINFO(100,'SUM') 1d 101 ' ' 100 -100 2400 nt/pl 20.t 0.01*[opt] ! ! ! n 101 n2=$HINFO(101,'SUM') tot=[n1]+[n2] MESS [str] [dom] [n1] [n2] [tot] if [tot].gt.10 then null -100 2400 0.05 1.e4 set hcol 1 hi/pl 100 s set hcol 2 hi/pl 101 s atit 'time in DOM '//[str]//','//[dom]//' "M# ns "N#' 'charge in 25 ns "M# p.e. "N#' ! 222 *wait endif hi/del 100 hi/del 101 enddo enddo exec plot1 c return macro s exec init1 null 0 2 0 2 ab set ncol 11 pal 1 set TXAL 23 num=40 do i=1,10 i1=[num]*([i]-1)+1 i2=[num]*([i]) ik=11-[i] set TXCI [ik] j=0.5+[ik]/11. itx 1 [j] [i1]...[i2] enddo exec plot1 s return macro init1 set * opt * pic/del * vec/del * hi/del * opt zfl opt NBOX set XMGL 3.0 set YMGL 2.4 set XVAL 0.8 set YVAL 0.4 set XLAB 2.0 set YLAB 1.4 set KSIZ .50 set GSIZ .50 set TSIZ .50 set ASIZ .50 set CSIZ .50 set PSIZ .50 set VSIZ .50 set SSIZ .50 set 2SIZ .50 igset LASI .50 igset TMSI .50 set HWID 5 set BWID 1 set PWID 5 set FWID 5 set XWID 1 set YWID 1 set CWID 5 igset LWID 5 igset TXFP -130 set CHHE .50 set cfon -40 set gfon -60 set lfon -40 set tfon -40 set vfon -40 return macro plot1 fort/file 66 [1].ps meta 66 -111 pict/plot * close 66 sh rm -f [1].ps.gz sh gzip [1].ps return