for icat in cats: frp.sources = zip(filenames, workspaces, [snapshot % (icat.name, lo, hi) for lo, hi in binedges]) frp.getters = var_vs_pt('chi2Prob') frp.title = ', '.join(icat.labels) frp.getdata() frp.makegraph() canvases.next('strue_pvalues_vs_phoEt') frp.plotall(title = 'MC Truth Fits') plotters.append(frp) ## Make the distribution of the p-values hist = frp.histogramall( name = 'h_strue_pvalues', title = 's_{true} = E^{#gamma}_{reco}/E^{#gamma}_{gen};p-value;Fits', nbins = 5, xlow = 0, xhigh = 1 ) canvases.next('strue_pvalues_distro') hist.Draw('e0') plotters.append(hist) ################################################################################ ## Plot the p-values of the reco s-Fits fits filenames = [filename2] * n workspaces = ['ws1'] * n snapshot = 'chi2_sreco_mc_cbShape_mmMass90_%s_PhoEt%d-%d_iter0' frp = FitResultPlotter( sources = zip([filename2] * n, ['ws1'] * n,
frp.sources = zip( filenames, workspaces, [snapshot % (name, icat.name, lo, hi) for lo, hi in binedges]) frp.getters = var_vs_pt('chi2Prob') frp.title = ', '.join(icat.labels) frp.getdata() frp.makegraph() canvases.next('strue_pvalues_vs_phoEt_%s' % name) frp.plotall(title=title) plotters.append(frp) ## Make the distribution of the p-values hist = frp.histogramall(name='h_strue_pvalues_%s' % name, title='%s;p-value;Fits' % title, nbins=5, xlow=0, xhigh=1) canvases.next('strue_pvalues_distro_%s' % name) hist.Draw('e0') hists.append(hist) canvases.canvases[-1].Update() ################################################################################ ## Plot the p-values for 71% range name = 'FitRange71' title = '+3% Fit Range' filenames = [os.path.join(path, 'strue_%s.root' % name)] * n workspaces = ['ws1'] * n snapshot = 'chi2_strue_mc_Nominal%s_mmMass80_%s_PhoEt%d-%d_bifurGauss'
frp.sources = zip(filenames, workspaces, [snapshot % (name, icat.name, lo, hi) for lo, hi in binedges]) frp.getters = var_vs_pt('chi2Prob') frp.title = ', '.join(icat.labels) frp.getdata() frp.makegraph() canvases.next('strue_pvalues_vs_phoEt_%s' % name) frp.plotall(title = title) plotters.append(frp) ## Make the distribution of the p-values hist = frp.histogramall( name = 'h_strue_pvalues_%s' % name, title = '%s;p-value;Fits' % title, nbins = 5, xlow = 0, xhigh = 1 ) canvases.next('strue_pvalues_distro_%s' % name) hist.Draw('e0') hists.append(hist) canvases.canvases[-1].Update() ################################################################################ ## Plot the p-values for 71% range name = 'FitRange71' title = '+3% Fit Range' filenames = [os.path.join(path, 'strue_%s.root' % name)] * n workspaces = ['ws1'] * n