Ejemplo n.º 1
0
def BackgroundFit_f4_trigcorr_bbl(x, par):
    if 1 + par[1] * x[0] / 8.e3 + par[2] * (x[0] / 8.e3)**2 <= 0:
        return 0
    else:
        return par[0] / (
            (1 + par[1] * x[0] / 8.e3 + par[2] * (x[0] / 8.e3)**2)**
            par[3]) * trigger_efficiency.trigger_efficiency_bbl(x[0])
Ejemplo n.º 2
0
def BackgroundFit_f4_trigcorr_bbl(x, par):
	den = 1 + par[1]*x[0]/8.e3 + par[2] * (x[0]/8.e3)**2
	if den <= 0:
		return 0
	elif den**par[3] <= 0:
		return 0 # Float problem???
	else:
		return par[0] / ((den)**par[3]) * trigger_efficiency.trigger_efficiency_bbl(x[0])
Ejemplo n.º 3
0
def BackgroundFit_f6_trigcorr_bbl(x, par):
    if 1 + par[1] * x[0] / 8.e3 + par[2] * (x[0] / 8.e3)**2 + par[3] * (
            x[0] / 8.e3)**3 <= 0:
        return 0
    elif ((1 + par[1] * x[0] / 8.e3 + par[2] * (x[0] / 8.e3)**2 + par[3] *
           (x[0] / 8.e3)**3)**par[4]) < 1.e-15:
        return 0
    else:
        return (par[0] /
                ((1 + par[1] * x[0] / 8.e3 + par[2] *
                  (x[0] / 8.e3)**2 + par[3] * (x[0] / 8.e3)**3)**
                 par[4])) * trigger_efficiency.trigger_efficiency_bbl(x[0])
Ejemplo n.º 4
0
	for strategy in strategies:
		f_mc = TFile(analysis_config.get_b_histogram_filename(mc_analyses[signal_region][strategy], "QCD_TuneZ2star_8TeV_pythia6"), "READ")
		mc_hist = f_mc.Get("BHistograms/h_pfjet_mjj")
		mc_hist.SetName("mjj_mc_" + signal_region + "_" + strategy)
		mc_hist.SetDirectory(0)
		if strategy == "datatrigger":
			if signal_region == "lowmass":
				mc_hist.Scale(trigger_efficiency.online_btag_eff["trigbbl_CSVTM"][0])
			elif signal_region == "highmass":
				mc_hist.Scale(trigger_efficiency.online_btag_eff["trigbbh_CSVTM"][0])

			data_hist = data_hist_raw.Clone()
			for bin in xrange(1, data_hist.GetNbinsX() + 1):
				mjj = data_hist.GetXaxis().GetBinCenter(bin)
				if signal_region == "lowmass":
					data_hist.SetBinContent(bin, data_hist.GetBinContent(bin) / trigger_efficiency.trigger_efficiency_bbl(mjj))
					data_hist.SetBinError(bin, data_hist.GetBinError(bin) / trigger_efficiency.trigger_efficiency_bbl(mjj))
				elif signal_region == "highmass":
					data_hist.SetBinContent(bin, data_hist.GetBinContent(bin) / trigger_efficiency.trigger_efficiency_bbh(mjj))
					data_hist.SetBinError(bin, data_hist.GetBinError(bin) / trigger_efficiency.trigger_efficiency_bbh(mjj))
				# Zero histograms below where the trigger correction is known
				if signal_region == "lowmass":
					if mjj < 176.:
						data_hist.SetBinContent(bin, 0.)
						data_hist.SetBinError(bin, 0.)
						mc_hist.SetBinContent(bin, 0.)
						mc_hist.SetBinError(bin, 0.)
				elif signal_region == "highmass":
					if mjj < 325.:
						data_hist.SetBinContent(bin, 0.)
						data_hist.SetBinError(bin, 0.)
Ejemplo n.º 5
0
def BackgroundFit_f3_trigcorr_bbl(x, par):
    return par[0] / (
        1 + par[1] *
        (x[0] / 8.e3))**par[2] * trigger_efficiency.trigger_efficiency_bbl(
            x[0])
Ejemplo n.º 6
0
def BackgroundFit_f2_trigcorr_bbl(x, par):
    return par[0] * (x[0] / 8.e3)**(-1. * par[1]) * (1. - (
        x[0] / 8.e3))**par[2] * trigger_efficiency.trigger_efficiency_bbl(x[0])
Ejemplo n.º 7
0
def BackgroundFit_f1_trigcorr_bbl(x, par):
    return par[0] * (1. - (x[0] / 8.e3))**par[1] / (
        (x[0] / 8.e3)**(par[2] + par[3] * TMath.Log(
            (x[0] / 8.e3)))) * trigger_efficiency.trigger_efficiency_bbl(x[0])
Ejemplo n.º 8
0
        if strategy == "datatrigger":
            if signal_region == "lowmass":
                mc_hist.Scale(
                    trigger_efficiency.online_btag_eff["trigbbl_CSVTM"][0])
            elif signal_region == "highmass":
                mc_hist.Scale(
                    trigger_efficiency.online_btag_eff["trigbbh_CSVTM"][0])

            data_hist = data_hist_raw.Clone()
            for bin in xrange(1, data_hist.GetNbinsX() + 1):
                mjj = data_hist.GetXaxis().GetBinCenter(bin)
                if signal_region == "lowmass":
                    data_hist.SetBinContent(
                        bin,
                        data_hist.GetBinContent(bin) /
                        trigger_efficiency.trigger_efficiency_bbl(mjj))
                    data_hist.SetBinError(
                        bin,
                        data_hist.GetBinError(bin) /
                        trigger_efficiency.trigger_efficiency_bbl(mjj))
                elif signal_region == "highmass":
                    data_hist.SetBinContent(
                        bin,
                        data_hist.GetBinContent(bin) /
                        trigger_efficiency.trigger_efficiency_bbh(mjj))
                    data_hist.SetBinError(
                        bin,
                        data_hist.GetBinError(bin) /
                        trigger_efficiency.trigger_efficiency_bbh(mjj))
                # Zero histograms below where the trigger correction is known
                if signal_region == "lowmass":