data_fr12s_qcd = plotter.get_histogram( primds, ntuple + ':' + plot_base_name + '_fr12s_qcd', rebin = rebin, show_overflows=True, ) ############################################################ ### The final selected data events ######################### ############################################################ ult_data = plotter.get_histogram( primds, ntuple + ':' + plot_base_name + '_ult', rebin = rebin, show_overflows=True, ) # Modify ult_data_poisson = poisson.convert(ult_data.th1, x_err=False, set_zero_bins=-100) ult_data_poisson.SetMarkerSize(2) ult_data_poisson.SetMarkerStyle(20) ult_data_poisson.SetLineWidth(2) ############################################################ ### Corrected WZ and ZZ for fake rate contamination ####### ############################################################ # (these only use EWK FR) corrected_mc = ['ZZ', 'WZ'] corrected_mc_histos = [] for to_correct in corrected_mc: log.info("------- correcting final %s MC", to_correct) mc_final = plotter.get_histogram( to_correct, ntuple + ':' + plot_base_name + '_ult',
hZZ.decorate(zz) hWZ.decorate(wz) hZJets.decorate(fakes) hData.decorate(data) hHWW.decorate(signal) hHWW.SetLineWidth(2) for hist in [hZZ, hZJets, hWZ]: hist.format = 'hist' for hist in [hZZ, hZJets, hData]: pass #hist.Rebin(5) hData_poisson = poisson.convert(hData, x_err=False, set_zero_bins=-100) hData_poisson.SetMarkerSize(2) stack = HistStack() stack.Add(hZJets) stack.Add(hWZ) stack.Add(hZZ) stack.Draw() print stack stack.GetXaxis().SetTitle("Visible Mass (GeV)") bin_width = stack.GetXaxis().GetBinWidth(1) stack.GetYaxis().SetTitle("Events/%0.0f GeV" % bin_width) stack.GetYaxis().SetTitleOffset(0.9) #stack.GetYaxis().SetTitleSize(0.05) #stack.GetXaxis().SetTitleSize(0.05)
def apply_view(self, histo): graph = poisson.convert(histo, self.x_err, self.set_zero_bins) graph.SetMarkerSize(self.marker_size) return graph
def apply_view(self, histo): graph = poisson.convert(histo, self.x_err, self.set_zero_bins, self.is_scaled) graph.SetMarkerSize(self.marker_size) return asrootpy(graph)