Skip to content
Snippets Groups Projects
Commit 4703fe10 authored by Stefan Wunsch's avatar Stefan Wunsch
Browse files

[Doc][RDF] Move event loop in df104 for better readability

parent 34101226
No related branches found
No related tags found
No related merge requests found
...@@ -76,7 +76,12 @@ for p in processes: ...@@ -76,7 +76,12 @@ for p in processes:
ROOT.ROOT.RDF.TH1DModel(p, "Diphoton invariant mass; m_{#gamma#gamma} [GeV];Events", 30, 105, 160), ROOT.ROOT.RDF.TH1DModel(p, "Diphoton invariant mass; m_{#gamma#gamma} [GeV];Events", 30, 105, 160),
"m_yy", "weight") "m_yy", "weight")
# Run the event loop and create the plot # Run the event loop
ggh = hists["ggH"].GetValue()
vbf = hists["VBF"].GetValue()
data = hists["data"].GetValue()
# Create the plot
# Set styles # Set styles
ROOT.gROOT.SetStyle("ATLAS") ROOT.gROOT.SetStyle("ATLAS")
...@@ -98,11 +103,6 @@ lower_pad.SetBottomMargin(0.3) ...@@ -98,11 +103,6 @@ lower_pad.SetBottomMargin(0.3)
upper_pad.Draw() upper_pad.Draw()
lower_pad.Draw() lower_pad.Draw()
# Run the event loop
ggh = hists["ggH"].GetValue()
vbf = hists["VBF"].GetValue()
data = hists["data"].GetValue()
# Fit signal + background model to data # Fit signal + background model to data
upper_pad.cd() upper_pad.cd()
fit = ROOT.TF1("fit", "([0]+[1]*x+[2]*x^2+[3]*x^3)+[4]*exp(-0.5*((x-[5])/[6])^2)", 105, 160) fit = ROOT.TF1("fit", "([0]+[1]*x+[2]*x^2+[3]*x^3)+[4]*exp(-0.5*((x-[5])/[6])^2)", 105, 160)
...@@ -209,6 +209,5 @@ text.DrawLatex(0.18 + 0.13, 0.84, "Open Data") ...@@ -209,6 +209,5 @@ text.DrawLatex(0.18 + 0.13, 0.84, "Open Data")
text.SetTextSize(0.04) text.SetTextSize(0.04)
text.DrawLatex(0.18, 0.78, "#sqrt{s} = 13 TeV, 10 fb^{-1}"); text.DrawLatex(0.18, 0.78, "#sqrt{s} = 13 TeV, 10 fb^{-1}");
# Draw and save the plot # Save the plot
c.Draw()
c.SaveAs("HiggsToTwoPhotons.pdf"); c.SaveAs("HiggsToTwoPhotons.pdf");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment