* vitamu.kumac * * Reads mu lifetime RAW DATA (units of 0.1 microseconds) * Fits the time distr. with ONE or TWO exponentials * * INPUT file: mudat0.dat (TDC data with trigger cut) * mudat2.dat (TDC data without trigger cut) * * OUTPUT files: 48 = vitamu.ps (plots) * 49 = vitamu.output (MINUIT printout) * 88 = vitamu.hrout (histograms) * * (C) Mario Sitta, Luciano Ramello 1999 * v/del * h/del 0 opt pto opt date opt logy opt tic opt fit set fit 111 set ygti 0.5 * fort/file 48 vitamu.ps meta 48 -111 hist/hio/output_lp 49 vitamu.output ******************************************************************** * RAW DATA file with trigger cut v/crea mu(3776) v/read mu mudat0.dat vscale mu 0.1 mu0 * h/crea/1dh 1 'TDC time' 60 0.05 6.05 v/hfill mu0 1 cr/title '[m] lifetime with trigger cut' h/plot 1 e atitle '([m]s)' 'events/(0.1 [m]s)' * h/oper/reset 1 'TDC time - Exponential fit' v/hfill mu0 1 h/fit 1(13:45) e atitle '([m]s)' ' ' * ************************************************************* * RAW DATA file without trigger cut v/crea mua(4356) v/read mua mudat2.dat vscale mua 0.1 mu2 * h/crea/1dh 2 'TDC time' 60 0.05 6.05 v/hfill mu2 2 title '[m] lifetime without trigger cut' h/plot 2 e atitle '([m]s)' 'events/(0.1 [m]s)' * h/oper/reset 2 'TDC time - Exponential fit' v/hfill mu2 2 v/crea par2(2) v/crea par(4) * Slow component (CHOPT='l' : empty bins not used) h/fit 2(12:50) e l 2 par2 vec/copy par2(1:2) par(1:2) * Fast component h/fit 2(4:7) e ! 2 par2 vec/copy par2(1:2) par(3:4) * Fast+Slow components (initial values of par. from previous fits) h/fit 2(4:45) e+e l 4 par atitle '([m]s)' 'events/(0.1 [m]s)' * * Superimpose the two exponentials from the fit: * FIT=exp(c1+s1*x)+exp(c2+s2*x) * c1=$SIGMA(par(1)) s1=$SIGMA(abs(par(2))) c2=$SIGMA(par(3)) s2=$SIGMA(abs(par(4))) * igset ltyp 12 fun/plot exp([c1]-[s1]*x) 0.5 4.5 s igset ltyp 12 fun/plot exp([c2]-[s2]*x) 0.3 2.0 s * * Save histograms onto hbook file h/file 88 vitamu.hrout ! n hrout 0 close 88 * Close PS metafile and printout file meta 0 close 48 hist/hio/output_lp -6 *