{ "cells": [ { "cell_type": "markdown", "id": "d239c0fa", "metadata": {}, "source": [ "# df106_HiggsToFourLeptons\n", "The Higgs to four lepton analysis from the ATLAS Open Data release of 2020, with RDataFrame.\n", "\n", "This tutorial is the Higgs to four lepton analysis from the ATLAS Open Data release in 2020\n", "(http://opendata.atlas.cern/release/2020/documentation/). The data was taken with the ATLAS detector\n", "during 2016 at a center-of-mass energy of 13 TeV. The decay of the Standard Model Higgs boson\n", "to two Z bosons and subsequently to four leptons is called the \"golden channel\". The selection leads\n", "to a narrow invariant mass peak on top a relatively smooth and small background, revealing\n", "the Higgs at 125 GeV.\n", "The analysis is translated to an RDataFrame workflow processing about 300 MB of simulated events and data.\n", "\n", "Lepton selection efficiency corrections (\"scale factors\") are applied to simulated samples to correct for the\n", "differences in the trigger, reconstruction, and identification efficiencies in simulation compared to real data.\n", "Systematic uncertainties for those scale factors are evaluated and the Vary function of RDataFrame is used to\n", "propagate the variations to the final four leptons mass distribution.\n", "\n", "See the [corresponding spec json file](https://github.com/root-project/root/blob/master/tutorials/analysis/dataframe/df106_HiggsToFourLeptons_spec.json).\n", "\n", "\n", "\n", "\n", "**Author:** Stefan Wunsch (KIT, CERN), Julia Mathe (CERN), Marta Czurylo (CERN) \n", "This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Tuesday, May 19, 2026 at 08:10 PM." ] }, { "cell_type": "code", "execution_count": null, "id": "6542e46a", "metadata": { "collapsed": false }, "outputs": [], "source": [ "%%cpp -d\n", "#include \"TInterpreter.h\"\n", "#include \n", "#include \n", "#include \n", "#include \n", "#include \n", "#include \n", "#include \n", "#include \n", "#include \n", "#include \n", "#include \n", "#include \n", "\n", "using namespace ROOT::VecOps;\n", "using PtEtaPhiEVectorF = ROOT::Math::LorentzVector>;\n", "using ROOT::RVecF;\n", "using ROOT::RDF::RSampleInfo;\n", "using namespace ROOT::RDF::Experimental;" ] }, { "cell_type": "markdown", "id": "17ab2fc2", "metadata": {}, "source": [ " Define functions needed in the analysis\n", "Select events for the analysis\n", " " ] }, { "cell_type": "code", "execution_count": null, "id": "34015981", "metadata": { "collapsed": false }, "outputs": [], "source": [ "%%cpp -d\n", "bool GoodElectronsAndMuons(const ROOT::RVecI &type, const RVecF &pt, const RVecF &eta, const RVecF &phi, const RVecF &e,\n", " const RVecF &trackd0pv, const RVecF &tracksigd0pv, const RVecF &z0)\n", "{\n", " for (size_t i = 0; i < type.size(); i++) {\n", " PtEtaPhiEVectorF p(0.001 * pt[i], eta[i], phi[i], 0.001 * e[i]);\n", " if (type[i] == 11) {\n", " if (pt[i] < 7000 || abs(eta[i]) > 2.47 || abs(trackd0pv[i] / tracksigd0pv[i]) > 5 ||\n", " abs(z0[i] * sin(p.Theta())) > 0.5)\n", " return false;\n", " } else {\n", " if (abs(trackd0pv[i] / tracksigd0pv[i]) > 5 || abs(z0[i] * sin(p.Theta())) > 0.5)\n", " return false;\n", " }\n", " }\n", " return true;\n", "}" ] }, { "cell_type": "markdown", "id": "a8a8f50f", "metadata": {}, "source": [ " Compute the invariant mass of a four-lepton-system.\n", " " ] }, { "cell_type": "code", "execution_count": null, "id": "4416b051", "metadata": { "collapsed": false }, "outputs": [], "source": [ "%%cpp -d\n", "float ComputeInvariantMass(const RVecF &pt, const RVecF &eta, const RVecF &phi, const RVecF &e)\n", "{\n", " PtEtaPhiEVectorF p1(pt[0], eta[0], phi[0], e[0]);\n", " PtEtaPhiEVectorF p2(pt[1], eta[1], phi[1], e[1]);\n", " PtEtaPhiEVectorF p3(pt[2], eta[2], phi[2], e[2]);\n", " PtEtaPhiEVectorF p4(pt[3], eta[3], phi[3], e[3]);\n", " return 0.001 * (p1 + p2 + p3 + p4).M();\n", "}" ] }, { "cell_type": "markdown", "id": "b5a9a88b", "metadata": {}, "source": [ "Enable Multithreading" ] }, { "cell_type": "code", "execution_count": null, "id": "4e3feb2a", "metadata": { "collapsed": false }, "outputs": [], "source": [ "ROOT::EnableImplicitMT();" ] }, { "cell_type": "markdown", "id": "0137c103", "metadata": {}, "source": [ "Create the RDataFrame from the spec json file. The df106_HiggsToFourLeptons_spec.json is provided in the same\n", "folder as this tutorial" ] }, { "cell_type": "code", "execution_count": null, "id": "4b6c4cdb", "metadata": { "collapsed": false }, "outputs": [], "source": [ "std::string dataset_spec = gROOT->GetTutorialsDir() + std::string(\"/analysis/dataframe/df106_HiggsToFourLeptons_spec.json\");\n", "ROOT::RDataFrame df = ROOT::RDF::Experimental::FromSpec(dataset_spec);" ] }, { "cell_type": "markdown", "id": "8385b404", "metadata": {}, "source": [ "Add the ProgressBar feature" ] }, { "cell_type": "code", "execution_count": null, "id": "cb476455", "metadata": { "collapsed": false }, "outputs": [], "source": [ "ROOT::RDF::Experimental::AddProgressBar(df);\n", "\n", "#ifndef __CLING__" ] }, { "cell_type": "markdown", "id": "50ec0e16", "metadata": {}, "source": [ "If this tutorial is compiled, rather than run as a ROOT macro, the interpreter needs to be fed the signatures\n", "of all the functions we want to JIT in our analysis, as well as any type used in those signatures.\n", "clang-format off" ] }, { "cell_type": "code", "execution_count": null, "id": "70f4b340", "metadata": { "collapsed": false }, "outputs": [], "source": [ "gInterpreter->Declare(\n", " \"using ROOT::RVecF;\"\n", " \"bool GoodElectronsAndMuons(const ROOT::RVecI &type, const RVecF &pt, const RVecF &eta, const RVecF &phi, const RVecF &e,\"\n", " \"const RVecF &trackd0pv, const RVecF &tracksigd0pv, const RVecF &z0);\"\n", " \"float ComputeInvariantMass(const RVecF &pt, const RVecF &eta, const RVecF &phi, const RVecF &e);\"\n", ");" ] }, { "cell_type": "markdown", "id": "9faa3e77", "metadata": {}, "source": [ "clang-format on" ] }, { "cell_type": "code", "execution_count": null, "id": "5e0ebdf6", "metadata": { "collapsed": false }, "outputs": [], "source": [ "#endif" ] }, { "cell_type": "markdown", "id": "0bc12c15", "metadata": {}, "source": [ "Perform the analysis\n", "Access metadata information that is stored in the JSON config file of the RDataFrame\n", "The metadata contained in the JSON file is accessible within a `DefinePerSample` call, through the `RSampleInfo`\n", "class" ] }, { "cell_type": "code", "execution_count": null, "id": "16e8791e", "metadata": { "collapsed": false }, "outputs": [], "source": [ "auto df_analysis =\n", " df.DefinePerSample(\"xsecs\", [](unsigned int slot, const RSampleInfo &id) { return id.GetD(\"xsecs\"); })\n", " .DefinePerSample(\"lumi\", [](unsigned int slot, const RSampleInfo &id) { return id.GetD(\"lumi\"); })\n", " .DefinePerSample(\"sumws\", [](unsigned int slot, const RSampleInfo &id) { return id.GetD(\"sumws\"); })\n", " .DefinePerSample(\"sample_category\",\n", " [](unsigned int slot, const RSampleInfo &id) { return id.GetS(\"sample_category\"); })" ] }, { "cell_type": "markdown", "id": "748d942f", "metadata": {}, "source": [ "Apply an MC correction for the ZZ decay due to missing gg->ZZ process" ] }, { "cell_type": "code", "execution_count": null, "id": "457d3d0c", "metadata": { "collapsed": false }, "outputs": [], "source": [ " .DefinePerSample(\"scale\",\n", " [](unsigned int slot, const ROOT::RDF::RSampleInfo &id) {\n", " return id.Contains(\"mc_363490.llll.4lep.root\") ? 1.3f : 1.0f;\n", " })" ] }, { "cell_type": "markdown", "id": "c8a420ef", "metadata": {}, "source": [ "Select electron or muon trigger" ] }, { "cell_type": "code", "execution_count": null, "id": "0bf7e6f2", "metadata": { "collapsed": false }, "outputs": [], "source": [ " .Filter(\"trigE || trigM\")" ] }, { "cell_type": "markdown", "id": "527c2dc6", "metadata": {}, "source": [ "Select events with exactly four good leptons conserving charge and lepton numbers\n", "Note that all collections are RVecs and good_lep is the mask for the good leptons.\n", "The lepton types are PDG numbers and set to 11 or 13 for an electron or muon\n", "irrespective of the charge." ] }, { "cell_type": "code", "execution_count": null, "id": "65bc2051", "metadata": { "collapsed": false }, "outputs": [], "source": [ " .Define(\"good_lep\",\n", " \"abs(lep_eta) < 2.5 && lep_pt > 5000 && lep_ptcone30 / lep_pt < 0.3 && lep_etcone20 / lep_pt < 0.3\")\n", " .Filter(\"Sum(good_lep) == 4\")\n", " .Filter(\"Sum(lep_charge[good_lep]) == 0\")\n", " .Define(\"goodlep_sumtypes\", \"Sum(lep_type[good_lep])\")\n", " .Filter(\"goodlep_sumtypes == 44 || goodlep_sumtypes == 52 || goodlep_sumtypes == 48\")" ] }, { "cell_type": "markdown", "id": "7c636407", "metadata": {}, "source": [ "Apply additional cuts depending on lepton flavour" ] }, { "cell_type": "code", "execution_count": null, "id": "e823c83a", "metadata": { "collapsed": false }, "outputs": [], "source": [ " .Filter(\n", " \"GoodElectronsAndMuons(lep_type[good_lep], lep_pt[good_lep], lep_eta[good_lep], lep_phi[good_lep], \"\n", " \"lep_E[good_lep], lep_trackd0pvunbiased[good_lep], lep_tracksigd0pvunbiased[good_lep], lep_z0[good_lep])\")" ] }, { "cell_type": "markdown", "id": "f38071da", "metadata": {}, "source": [ "Create new columns with the kinematics of good leptons" ] }, { "cell_type": "code", "execution_count": null, "id": "4968a626", "metadata": { "collapsed": false }, "outputs": [], "source": [ " .Define(\"goodlep_pt\", \"lep_pt[good_lep]\")\n", " .Define(\"goodlep_eta\", \"lep_eta[good_lep]\")\n", " .Define(\"goodlep_phi\", \"lep_phi[good_lep]\")\n", " .Define(\"goodlep_E\", \"lep_E[good_lep]\")\n", " .Define(\"goodlep_type\", \"lep_type[good_lep]\")" ] }, { "cell_type": "markdown", "id": "5b678ac7", "metadata": {}, "source": [ "Select leptons with high transverse momentum" ] }, { "cell_type": "code", "execution_count": null, "id": "50bb4f23", "metadata": { "collapsed": false }, "outputs": [], "source": [ " .Filter(\"goodlep_pt[0] > 25000 && goodlep_pt[1] > 15000 && goodlep_pt[2] > 10000\")" ] }, { "cell_type": "markdown", "id": "cdd47294", "metadata": {}, "source": [ "Compute invariant mass" ] }, { "cell_type": "code", "execution_count": null, "id": "0d3b9e49", "metadata": { "collapsed": false }, "outputs": [], "source": [ " .Define(\"m4l\", \"ComputeInvariantMass(goodlep_pt, goodlep_eta, goodlep_phi, goodlep_E)\")" ] }, { "cell_type": "markdown", "id": "e6f537e3", "metadata": {}, "source": [ "Reweighting of the samples is different for \"data\" and \"MC\"" ] }, { "cell_type": "code", "execution_count": null, "id": "d1f72a43", "metadata": { "collapsed": false }, "outputs": [], "source": [ " .DefinePerSample(\"reweighting\", [](unsigned int slot, const RSampleInfo &id) { return id.Contains(\"mc\"); });" ] }, { "cell_type": "markdown", "id": "ed6bf65d", "metadata": {}, "source": [ "Define the weight column (scale factor) for the MC samples" ] }, { "cell_type": "code", "execution_count": null, "id": "6464d38c", "metadata": { "collapsed": false }, "outputs": [], "source": [ "auto df_mc = df_analysis.Filter(\"reweighting == true\")\n", " .Define(\"weight\", (\"scaleFactor_ELE * scaleFactor_MUON * scaleFactor_LepTRIGGER * \"\n", " \"scaleFactor_PILEUP * mcWeight * scale * xsecs / sumws * lumi\"));" ] }, { "cell_type": "markdown", "id": "4a8dbdad", "metadata": {}, "source": [ "Book histograms for individual MC samples" ] }, { "cell_type": "code", "execution_count": null, "id": "6f6fd342", "metadata": { "collapsed": false }, "outputs": [], "source": [ "auto df_higgs = df_mc.Filter(R\"(sample_category == \"higgs\")\")\n", " .Histo1D(ROOT::RDF::TH1DModel(\"higgs\", \"m4l\", 24, 80, 170), \"m4l\", \"weight\");\n", "auto df_zz = df_mc.Filter(\"sample_category == \\\"zz\\\"\")\n", " .Histo1D(ROOT::RDF::TH1DModel(\"zz\", \"m4l\", 24, 80, 170), \"m4l\", \"weight\");\n", "auto df_other = df_mc.Filter(\"sample_category == \\\"other\\\"\")\n", " .Histo1D(ROOT::RDF::TH1DModel(\"other\", \"m4l\", 24, 80, 170), \"m4l\", \"weight\");" ] }, { "cell_type": "markdown", "id": "297f93a5", "metadata": {}, "source": [ "Book the invariant mass histogram for the data" ] }, { "cell_type": "code", "execution_count": null, "id": "01ea7031", "metadata": { "collapsed": false }, "outputs": [], "source": [ "auto df_h_mass_data = df_analysis.Filter(\"reweighting == false\")\n", " .Filter(\"sample_category == \\\"data\\\"\")\n", " .Define(\"weight_\", []() { return 1; })\n", " .Histo1D(ROOT::RDF::TH1DModel(\"data\", \"m4l\", 24, 80, 170), \"m4l\", \"weight_\");" ] }, { "cell_type": "markdown", "id": "439bb9ec", "metadata": {}, "source": [ "Evaluate the systematic uncertainty" ] }, { "cell_type": "markdown", "id": "1e404996", "metadata": {}, "source": [ "The systematic uncertainty in this analysis is the MC scale factor uncertainty that depends on lepton\n", "kinematics such as pT or pseudorapidity.\n", "Muons uncertainties are negligible, as stated in https://atlas.web.cern.ch/Atlas/GROUPS/PHYSICS/PAPERS/MUON\n", "Electrons uncertainties are evaluated based on the plots available in https://doi.org/10.48550/arXiv.1908.0\n", "The uncertainties are linearly interpolated, using the `TGraph::Eval()` method, to cover a range of pT values\n", "covered by the analysis." ] }, { "cell_type": "code", "execution_count": null, "id": "e587cbd2", "metadata": { "collapsed": false }, "outputs": [], "source": [ "const std::vector x{5.50e3, 5.52e3, 12.54e3, 17.43e3, 22.40e3, 27.48e3, 30e3, 10000e3};\n", "const std::vector y{0.06628, 0.06395, 0.06396, 0.03372, 0.02441, 0.01403, 0, 0};\n", "TGraph graph(x.size(), x.data(), y.data());" ] }, { "cell_type": "markdown", "id": "ee262d6c", "metadata": {}, "source": [ "Use the Vary method to add the systematic variations to the total MC scale factor (\"weight\") of the analysis\n", "The input consists of the input column to be varied and the lambda function to compute the systematic variations.\n", "The new output columns contain the varied values of the input column." ] }, { "cell_type": "code", "execution_count": null, "id": "f52a168f", "metadata": { "collapsed": false }, "outputs": [], "source": [ "auto df_with_variations_mc =\n", " df_mc\n", " .Vary(\"weight\",\n", " [&graph](double x, const RVecF &pt, const RVec &type) {\n", " const auto v = Mean(Map(pt[type == 11], [&graph](auto p) { return graph.Eval(p); }));\n", " return RVec{(1 + v) * x, (1 - v) * x};\n", " },\n", " {\"weight\", \"goodlep_pt\", \"goodlep_type\"}, {\"up\", \"down\"})\n", " .Histo1D(ROOT::RDF::TH1DModel(\"Invariant Mass\", \"m4l\", 24, 80, 170), \"m4l\", \"weight\");" ] }, { "cell_type": "markdown", "id": "b4fe7622", "metadata": {}, "source": [ "Create the total MC scale factor histograms: \"nominal\", \"weight:up\" and \"weight:down\"." ] }, { "cell_type": "code", "execution_count": null, "id": "e7893412", "metadata": { "collapsed": false }, "outputs": [], "source": [ "auto histos_mc = VariationsFor(df_with_variations_mc);" ] }, { "cell_type": "markdown", "id": "614e81dc", "metadata": {}, "source": [ "Evaluate the total MC uncertainty based on the variations. Note, in this case the uncertainties are symmetric." ] }, { "cell_type": "code", "execution_count": null, "id": "a7a37350", "metadata": { "collapsed": false }, "outputs": [], "source": [ "for (unsigned int i = 0; i < histos_mc[\"nominal\"].GetXaxis()->GetNbins(); i++) {\n", " histos_mc[\"nominal\"].SetBinError(\n", " i, (histos_mc[\"weight:up\"].GetBinContent(i) - histos_mc[\"nominal\"].GetBinContent(i)));\n", "}" ] }, { "cell_type": "markdown", "id": "492cdfa4", "metadata": {}, "source": [ "Make the plot of the data, individual MC contributions and the total MC scale factor systematic variations." ] }, { "cell_type": "code", "execution_count": null, "id": "21313601", "metadata": { "collapsed": false }, "outputs": [], "source": [ "gROOT->SetStyle(\"ATLAS\");" ] }, { "cell_type": "markdown", "id": "48f38174", "metadata": {}, "source": [ "Create canvas with pad" ] }, { "cell_type": "code", "execution_count": null, "id": "7f94c938", "metadata": { "collapsed": false }, "outputs": [], "source": [ "auto c = new TCanvas(\"c\", \" \", 600, 600);\n", "auto pad = new TPad(\"upper_pad\", \"\", 0, 0, 1, 1);\n", "pad->SetTickx(0);\n", "pad->SetTicky(0);\n", "pad->Draw();\n", "pad->cd();" ] }, { "cell_type": "markdown", "id": "a81157b3", "metadata": {}, "source": [ "Draw stack with MC contributions\n", "Draw cloned histograms to preserve graphics when original objects goes out of scope" ] }, { "cell_type": "code", "execution_count": null, "id": "717c266d", "metadata": { "collapsed": false }, "outputs": [], "source": [ "df_other->SetFillColor(kViolet - 9);\n", "df_zz->SetFillColor(kAzure - 9);\n", "df_higgs->SetFillColor(kRed + 2);\n", "\n", "auto stack = new THStack(\"stack\", \"\");\n", "auto h_other = static_cast(df_other->Clone());\n", "stack->Add(h_other);\n", "auto h_zz = static_cast(df_zz->Clone());\n", "stack->Add(h_zz);\n", "auto h_higgs = static_cast(df_higgs->Clone());\n", "stack->Add(h_higgs);\n", "stack->Draw(\"HIST\");" ] }, { "cell_type": "markdown", "id": "97e8c3f9", "metadata": {}, "source": [ "stack histogram can be accessed only after drawing" ] }, { "cell_type": "code", "execution_count": null, "id": "c3031a1e", "metadata": { "collapsed": false }, "outputs": [], "source": [ "stack->GetHistogram()->SetTitle(\"\");\n", "stack->GetHistogram()->GetXaxis()->SetLabelSize(0.035);\n", "stack->GetHistogram()->GetXaxis()->SetTitleSize(0.045);\n", "stack->GetHistogram()->GetXaxis()->SetTitleOffset(1.3);\n", "stack->GetHistogram()->GetXaxis()->SetTitle(\"m_{4l}^{H#rightarrow ZZ} [GeV]\");\n", "stack->GetHistogram()->GetYaxis()->SetLabelSize(0.035);\n", "stack->GetHistogram()->GetYaxis()->SetTitleSize(0.045);\n", "stack->GetHistogram()->GetYaxis()->SetTitle(\"Events\");\n", "stack->SetMaximum(35);\n", "stack->GetHistogram()->GetYaxis()->ChangeLabel(1, -1, 0);" ] }, { "cell_type": "markdown", "id": "2242d87d", "metadata": {}, "source": [ "Draw MC scale factor and variations" ] }, { "cell_type": "code", "execution_count": null, "id": "1dd15808", "metadata": { "collapsed": false }, "outputs": [], "source": [ "histos_mc[\"nominal\"].SetFillColor(kBlack);\n", "histos_mc[\"nominal\"].SetFillStyle(3254);\n", "auto h_nominal = histos_mc[\"nominal\"].DrawClone(\"E2 same\");\n", "histos_mc[\"weight:up\"].SetLineColor(kGreen + 2);\n", "auto h_weight_up = histos_mc[\"weight:up\"].DrawClone(\"HIST same\");\n", "histos_mc[\"weight:down\"].SetLineColor(kBlue + 2);\n", "auto h_weight_down = histos_mc[\"weight:down\"].DrawClone(\"HIST same\");" ] }, { "cell_type": "markdown", "id": "97900ad5", "metadata": {}, "source": [ "Draw data histogram" ] }, { "cell_type": "code", "execution_count": null, "id": "f4bfb06f", "metadata": { "collapsed": false }, "outputs": [], "source": [ "df_h_mass_data->SetMarkerStyle(20);\n", "df_h_mass_data->SetMarkerSize(1.);\n", "df_h_mass_data->SetLineWidth(2);\n", "df_h_mass_data->SetLineColor(kBlack);\n", "df_h_mass_data->SetStats(false);\n", "auto h_mass_data = df_h_mass_data->DrawClone(\"E sames\");" ] }, { "cell_type": "markdown", "id": "9744cf85", "metadata": {}, "source": [ "Add legend" ] }, { "cell_type": "code", "execution_count": null, "id": "5775369f", "metadata": { "collapsed": false }, "outputs": [], "source": [ "auto legend = new TLegend(0.57, 0.65, 0.94, 0.94);\n", "legend->SetTextFont(42);\n", "legend->SetFillStyle(0);\n", "legend->SetBorderSize(0);\n", "legend->SetTextSize(0.025);\n", "legend->SetTextAlign(32);\n", "legend->AddEntry(h_mass_data, \"Data\", \"lep\");\n", "legend->AddEntry(h_higgs, \"Higgs MC\", \"f\");\n", "legend->AddEntry(h_zz, \"ZZ MC\", \"f\");\n", "legend->AddEntry(h_other, \"Other MC\", \"f\");\n", "legend->AddEntry(h_weight_down, \"Total MC Variations Down\", \"l\");\n", "legend->AddEntry(h_weight_up, \"Total MC Variations Up\", \"l\");\n", "legend->AddEntry(h_nominal, \"Total MC Uncertainty\", \"f\");\n", "legend->Draw();" ] }, { "cell_type": "markdown", "id": "11804ba3", "metadata": {}, "source": [ "Add ATLAS label" ] }, { "cell_type": "code", "execution_count": null, "id": "53a80962", "metadata": { "collapsed": false }, "outputs": [], "source": [ "TLatex atlas_label;\n", "atlas_label.SetTextFont(70);\n", "atlas_label.SetTextSize(0.04);\n", "atlas_label.DrawLatexNDC(0.19, 0.85, \"ATLAS\");\n", "TLatex data_label;\n", "data_label.SetTextFont(42);\n", "data_label.DrawLatexNDC(0.19 + 0.13, 0.85, \"Open Data\");\n", "TLatex header;\n", "data_label.SetTextFont(42);\n", "header.SetTextSize(0.035);\n", "header.DrawLatexNDC(0.21, 0.8, \"#sqrt{s} = 13 TeV, 10 fb^{-1}\");" ] }, { "cell_type": "markdown", "id": "e36c5d9a", "metadata": {}, "source": [ "Save the plot." ] }, { "cell_type": "code", "execution_count": null, "id": "e093710a", "metadata": { "collapsed": false }, "outputs": [], "source": [ "c->SaveAs(\"df106_HiggsToFourLeptons_cpp.png\");\n", "std::cout << \"Saved figure to df106_HiggsToFourLeptons_cpp.png\" << std::endl;" ] }, { "cell_type": "markdown", "id": "e81f43bb", "metadata": {}, "source": [ "Draw all canvases " ] }, { "cell_type": "code", "execution_count": null, "id": "0b9f6dbc", "metadata": { "collapsed": false }, "outputs": [], "source": [ "gROOT->GetListOfCanvases()->Draw()" ] } ], "metadata": { "kernelspec": { "display_name": "ROOT C++", "language": "c++", "name": "root" }, "language_info": { "codemirror_mode": "text/x-c++src", "file_extension": ".C", "mimetype": " text/x-c++src", "name": "c++" } }, "nbformat": 4, "nbformat_minor": 5 }