"scale": "scale" } for final_state in ["mu", "e"]: rdf = ROOT.RDataFrame("Friends", file_list) rdf = rdf.Filter("nominal_dR_l2j<0.4") if final_state == "mu": rdf = rdf.Filter("subleadingLeptons_isMuon[0]") rdf = rdf.Define("discriminant", "hnlJet_nominal_llpdnnx_ratio_LLP_QMU") elif final_state == "e": rdf = rdf.Filter("subleadingLeptons_isElectron[0]") rdf = rdf.Define("discriminant", "hnlJet_nominal_llpdnnx_ratio_LLP_QE") for key, uncertainty in uncertainty_list.items(): cv = style.makeCanvas() leg = style.makeLegend(0.50, 0.65, 0.68, 0.8) leg.SetTextSize(22) cv.SetBottomMargin(0.15) cv.SetLeftMargin(0.15) cv.SetTopMargin(0.05) cv.SetRightMargin(0.05) upperPad = ROOT.TPad("upperPad", "upperPad", 0, 0.33, 1, 1) lowerPad = ROOT.TPad("lowerPad", "lowerPad", 0, 0, 1, 0.33) upperPad.SetBottomMargin(0.00001) upperPad.SetBorderMode(0) upperPad.SetTopMargin(0.05) upperPad.SetRightMargin(0.05) upperPad.SetLeftMargin(0.13) lowerPad.SetTopMargin(0.00001) lowerPad.SetBottomMargin(0.4) lowerPad.SetRightMargin(0.05)
hist_pt_ell_1_e_coupling.SetLineColor(color2) hist_pt_ell_1_tau_coupling.SetLineColor(color3) hist_pt_ell_1_mu_coupling.GetXaxis().SetTitle("p_{T} (l_{1}) [GeV]") hist_pt_ell_1_mu_coupling.GetYaxis().SetTitle("Normalised entries") hist_pt_ell_1_mu_coupling.GetYaxis().SetRangeUser( 0, 1.2 * max(hist_pt_ell_1_mu_coupling.GetMaximum(), hist_pt_ell_1_e_coupling.GetMaximum(), hist_pt_ell_1_tau_coupling.GetMaximum())) hist_pt_ell_1_mu_coupling.Draw("HIST") hist_pt_ell_1_e_coupling.Draw("HIST SAME") hist_pt_ell_1_tau_coupling.Draw("HIST SAME") leg = style.makeLegend(0.60, 0.6, 0.80, 0.78) leg.AddEntry("hist_pt_ell_1_e_coupling", "e-only coupling", "l") leg.AddEntry("hist_pt_ell_1_mu_coupling", "#mu-only coupling", "l") leg.AddEntry("hist_pt_ell_1_tau_coupling", "#tau-only coupling", "l") leg.Draw("") style.makeText(0.3, 0.83, 0.6, 0.83, "#sqrt{s}=13 TeV, pp#rightarrowW#rightarrowNl_{1}") style.makeText(0.3, 0.78, 0.6, 0.8, "m_{N} = 12 GeV, c#tau_{0} = 0.1 mm") cv.SaveAs("kinematics/l1_pt.pdf") #==========# #==========# #==========# cv = style.makeCanvas() cv.SetBottomMargin(0.15)
hist_Q.Scale(1. / hist_Q.Integral()) hist_QL.Scale(1. / hist_QL.Integral()) hist_Q.SetLineColor(color1) hist_QL.SetLineColor(color2) hist_Q.GetXaxis().SetTitle("HNL jet p_{T} [GeV]") hist_Q.GetYaxis().SetTitle("Normalised entries") hist_Q.GetYaxis().SetRangeUser( 0, 1.4 * max(hist_Q.GetMaximum(), hist_QL.GetMaximum())) hist_Q.Draw("HIST") hist_QL.Draw("HIST SAME") leg = style.makeLegend(0.36, 0.5, 0.77, 0.63) leg.AddEntry("hist_Q", "jet (resolved)", "l") leg.AddEntry("hist_QL", "jet w/ lepton (merged)", "l") leg.Draw("") style.makeText(0.27, 0.75, 0.4, 0.8, "m_{N} = 16 GeV, V_{e} = V_{#mu} = V_{#tau}") style.makeText( 0.27, 0.81, 0.4, 0.86, "#sqrt{s}=13 TeV, pp#rightarrowW#rightarrowl_{1}N#rightarrowl_{1}l_{2}q#bar{q'}" ) #style.makeCMSText(0.17, 0.85, additionalText="Simulation Preliminary") cv.SaveAs("hnljet_pt.pdf") cv = style.makeCanvas() cv.SetBottomMargin(0.15)
jet_cpf = jet_cpf.Clone("cpf") jet_npf = jet_npf.Clone("npf") cv = style.makeCanvas() cv.SetBottomMargin(0.15) cv.SetLeftMargin(0.13) cv.Draw("") jet_cpf.Draw("") jet_npf.Draw("SAME") jet_cpf.SetLineColor(color1) jet_cpf.SetMarkerColor(color1) jet_npf.SetLineColor(color2) jet_npf.SetMarkerColor(color2) leg = style.makeLegend(0.2, 0.2, 0.35, 0.3) leg.SetTextSize(24) leg.AddEntry(jet_cpf, "charged particle", "pl") leg.AddEntry(jet_npf, "neutral particle", "pl") leg.Draw("SAME") cv.Update() cv.SetLogx() #style.makeCMSText(0.15, 0.86, additionalText="Simulation Internal") style.makeText(0.2, 0.75, 0.2, 0.75, "p_{T} > 15 GeV, |#eta| < 2.4 (gen&reco)", size=24) style.makeText(0.2, 0.8, 0.2, 0.8, "#sqrt{s}=13 TeV, N#rightarrow#mujj", size=24) jet_cpf.GetYaxis().SetRangeUser(0, 1.) jet_cpf.GetXaxis().SetRangeUser(0., 300.) jet_cpf.GetXaxis().SetNdivisions(510)