* Open an n-tuple file h/file 1 cdf_dimuon_n0.paw * change directory cd wwscal * Book histograms * (# of dimension, histogram ID, 'histogram name', # of bins, * min value, max value) 1d 1001 'Dimuon Mass all (GeV)' 120 0.0 120.0 1d 1002 'Dimuon Mass around psi (GeV)' 240 2.8 4.0 1d 1003 'Dimuon Mass around upsilon (GeV)' 50 9.0 11.0 1d 1004 'Dimuon Mass around Z (GeV)' 55 20.0 130.0 1d 1101 'Dimuon Mass all (GeV)' 120 0.0 120.0 1d 1102 'Dimuon Mass around psi (GeV)' 240 2.8 4.0 1d 1103 'Dimuon Mass around upsilon (GeV)' 50 9.0 11.0 1d 1104 'Dimuon Mass around Z (GeV)' 55 20.0 130.0 * Run a program to select events and fill histograms nt/loop 1 dimuon.for * Plot histograms * (opt stat / opt nsta : show statistics ON / OFF) opt stat zone 2 2 hist/plot 1001; hist/plot 1002; hist/plot 1003; hist/plot 1004 hist/plot 1101; hist/plot 1102; hist/plot 1103; hist/plot 1104 opt nsta * Fit histograms * (opt fit / opt nfit : show fit parameters ON / OFF) opt fit * Gaussian Fit : parameters = par(1)*exp(-0.5*((x-par(2))/par(3))**2) * e.g. fit histogram ID=1002 in the range between 3.0 and 3.2 * with gaussian distribution: * hist/fit 1002(3.0:3.2) G * Polynomial Fit : Pn * Fit parameters : par(1) + par(2)*x + par(3)*x^2, ... + par(n+1)*x^n * e.g. fit histogram ID=1002 in the range between 3.2 and 3.5 * with linear distribution * hist/fit 1002(3.2:3.5) P1 * Combined Fit : Gaussian + P1 * hist/fit 1002(2.8:3.4) g+p1 * first 4 parameters -> g * last 2 parmeters -> p1 set mtyp 20 set ksiz 0.1 vec/create par(5) * J/psi mass fit vec/input par 2500. 3.1 0.02 100.0 0. hist/fit 1002(2.8:3.4) g+p1 ! 5 par hist/copy 1002 2001 * psi(2s) mass fit vec/input par 100. 3.6 0.02 100.0 0. hist/fit 1002(3.3:3.9) g+p1 ! 5 par hist/copy 1002 2002 * Upsilon(1s) mass fit vec/input par 200. 9.4 0.1 500.0 0. hist/fit 1003(9.:9.8) g+p1 ! 5 par hist/copy 1003 2003 * Z mass fit vec/input par 20. 90.5 4.0 0. 0. hist/fit 1004(70.:110.) g+p1 ! 5 par hist/copy 1004 2004 * plotting fit results zone 2 2 hist/plot 2001(2.8:3.4) e hist/plot 2002(3.3:3.9) e hist/plot 2003(9.0:9.8) e hist/plot 2004(70.:110.) e * Close the n-tuple file close 1