macro prf set chhe 0.4 set asiz 0.4 set vsiz 0.4 set hwid 5 null -5 5 0 0.6 exec myplot 10011 4 'z.lt.3' 0.55 exec myplot 10012 6 'z.lt.6' 0.50 exec myplot 10013 3 'z.lt.9' 0.45 exec myplot 10014 2 'z.lt.12' 0.40 exec myplot 10015 7 'z.lt.15' 0.35 set txci 1 atit 'delta X (mm)' 'relative amplitude' return macro myplot hist col text pos set hcol [col] set txci [col] h/pl [hist] s h/pl [hist] shist itx -4 [pos] [text] return macro fit * definition of fit parameters * p1: amplitude * p2: FWHM * p3: Delta * p4: a * P5: b (keep fixed at 0) * p6: z-slice (not fitted) * to fix a parameter set the error to 0 * pmin=pmax=0 -> no bounds v/crea par(6) ! 1 5 10 1 0 1 v/crea step(6) ! 0.2 0.2 0.5 0.1 0 0 v/crea pmin(6) ! 0 0 0 0 0 1 v/crea pmax(6) ! 0 0 0 0 0 1 v/crea err(6) nbin=15 v/crea p3([nbin]) v/crea p4([nbin]) v/crea p5([nbin]) v/crea y([nbin]) v/crea e([nbin]) do i=1,[nbin] * do i=1,1 hist = 10010+[i] v/input par(6) [i] v/input pmin(6) [i] v/input pmax(6) [i] h/fit [hist] qrat.f b 6 par step pmin pmax err v/co par(3) p3([i]) v/co par(4) p4([i]) v/co par(5) p5([i]) v/co par(2) y([i]) v/co err(2) e([i]) enddo 1dh 10006 'par(5)' [nbin] 0 15 0 h/put/con 10006 p5 1dh 10008 'par(4)' [nbin] 0 15 0 h/put/con 10008 p4 1dh 10007 'par(3)' [nbin] 0 15 0 h/put/con 10007 p3 1dh 10010 'FWHM' [nbin] 0 15 0 h/put/con 10010 y h/put/err 10010 e sigma e = 2*y*e sigma y = y*y 1dh 10009 'FWHM**2' [nbin] 0 15 0 h/put/con 10009 y h/put/err 10009 e return macro ampl null -5 5 0 1.5 set hcol 1 set pmci 1 h/pl 10211 s set hcol 2 set pmci 2 h/pl 10212 s set hcol 3 set pmci 3 h/pl 10213 s set hcol 4 set pmci 4 h/pl 10214 s set hcol 6 set pmci 6 h/pl 10215 s set hcol 1 set pmci 1 return macro nice exec ~/paw/osetup c siz 12 8 set ymgu 0.3 set ymgl 1.2 set xmgr 0.3 set chhe 0.4 set hwid 5 set fwid 5 set mscf 1.5 set ndvy 505 null -5 5 0 1 null -5 5 0 1.1 abs h/pl 10012 s atit 'x / mm' 'PRF' null 0.5 15 0 10 abs itx 1 9 'charge dispersion' itx 1 8 'pad width: 2 mm' itx 1 7 'z = 2-3 cm' return macro nice1b exec ~/paw/osetup c siz 12 8 set ymgu 0.3 set ymgl 1.2 set xmgr 0.3 set chhe 0.4 set fwid 5 set hwid 5 set mscf 1.5 set ndvy 505 null -5 5 0 1 h/pl 10012 s h/pl 10032 s atit 'x / mm' 'PRF' null 0.5 15 0 10 abs itx 1 9 'direct charge ' itx 1 8 'pad width: 2 mm' itx 1 7 'z = 2-3 cm' return macro nicebias1b exec ~/paw/osetup c siz 12 10 set ymgu 1.0 set ymgl 1.5 set xmgr 0.5 set chhe 0.4 set ndvy 506 set ndvx 705 null -1 1 -0.105 0.105 h/pl 10021 s atit 'x / mm' 'bias / mm' null 0 15 0 10 abs itx 9 9 'bias across pad' itx 1 3 'direct charge' itx 1 2 'pad width: 2 mm' itx 1 1 'z = 0-3 cm' set txal 20 itx 0 10.5 'edge' itx 7.5 10.5 'center' itx 15 10.5 'edge' set txal 0 return macro nicebias exec ~/paw/osetup c siz 12 10 set ymgu 0.5 set ymgl 1.5 set xmgr 0.5 set chhe 0.4 set ndvy 506 h/set/max 10004 0.18 h/set/min 10004 -0.1 h/pl 10004 atit 'x / mm' 'bias / mm' set dmod 3 set plci 3 line -4 -1 -4 1 line -2 -1 -2 1 line 0 -1 0 1 line 2 -1 2 1 line 4 -1 4 1 null 0 15 0 10 abs itx 11 1 'global bias' itx 1 9 'charge dispersion' itx 1 8 'pad width: 2 mm' return macro nicereso * exec nt951#fit * exec nt951#fitcd (changed for hist=11010) exec ~/paw/osetup c siz 14 11 set ymgu 0.5 set xmgr 0.5 set chhe 0.32 set ndvy 506 set ndvx 503 set hwid 5 set lwid 5 set fwid 5 h/set/max 11010 0.22 h/pl 11010 set dmod 2 h/pl 12110 s set dmod 1 atit 'z / cm' 'resolution / mm' set plci 3 null 0 15 0 10 abs line 5 4 7.5 4 itx 8 4 fit * itx 5 3.2 '[s]?0! = 80 [m]m , C?D! = 0.24' itx 5 3.2 '[s]?0! = 93 [m]m , C?D! = 0.30' set dmod 2 line 5 2 7.5 2 itx 8 2 C?D! = 0.21 * itx 8 1.2 Magboltz pred. itx 8 1.2 det. from data set dmod 1 return