Df 1 0 3_ Nano A O D Higgs Analysis

This tutorial is a simplified but yet complex example of an analysis reconstructing the Higgs boson decaying to two Z bosons from events with four leptons. The data and simulated events are taken from CERN OpenData representing a subset of the data recorded in 2012 with the CMS detector at the LHC. The tutorials follows the Higgs to four leptons analysis published on CERN Open Data portal (10.7483/OPENDATA.CMS.JKB8.RR42). The resulting plots show the invariant mass of the selected four lepton systems in different decay modes (four muons, four electrons and two of each kind) and in a combined plot indicating the decay of the Higgs boson with a mass of about 125 GeV.

The following steps are performed for each sample with data and simulated events in order to reconstruct the Higgs boson from the selected muons and electrons:

  1. Select interesting events with multiple cuts on event properties, e.g., number of leptons, kinematics of the leptons and quality of the tracks.
  2. Reconstruct two Z bosons of which only one on the mass shell from the selected events and apply additional cuts on the reconstructed objects.
  3. Reconstruct the Higgs boson from the remaining Z boson candidates and calculate its invariant mass.

Author: Stefan Wunsch (KIT, CERN)
This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Sunday, January 19, 2020 at 01:10 AM.

In [1]:
%%cpp -d
#include "ROOT/RDataFrame.hxx"
#include "ROOT/RVec.hxx"
#include "ROOT/RDF/RInterface.hxx"
#include "TCanvas.h"
#include "TH1D.h"
#include "TLatex.h"
#include "TLegend.h"
#include "Math/Vector4Dfwd.h"
#include "TStyle.h"

using namespace ROOT::VecOps;
using RNode = ROOT::RDF::RNode;
using rvec_f = const RVec<float> &;
using rvec_i = const RVec<int> &;

const auto z_mass = 91.2;

Select interesting events with four muons

In [2]:
RNode selection_4mu(RNode df)
{
   auto df_ge4m = df.Filter("nMuon>=4", "At least four muons");
   auto df_iso = df_ge4m.Filter("All(abs(Muon_pfRelIso04_all)<0.40)", "Require good isolation");
   auto df_kin = df_iso.Filter("All(Muon_pt>5) && All(abs(Muon_eta)<2.4)", "Good muon kinematics");
   auto df_ip3d = df_kin.Define("Muon_ip3d", "sqrt(Muon_dxy*Muon_dxy + Muon_dz*Muon_dz)");
   auto df_sip3d = df_ip3d.Define("Muon_sip3d", "Muon_ip3d/sqrt(Muon_dxyErr*Muon_dxyErr + Muon_dzErr*Muon_dzErr)");
   auto df_pv = df_sip3d.Filter("All(Muon_sip3d<4) && All(abs(Muon_dxy)<0.5) && All(abs(Muon_dz)<1.0)",
                                "Track close to primary vertex with small uncertainty");
   auto df_2p2n = df_pv.Filter("nMuon==4 && Sum(Muon_charge==1)==2 && Sum(Muon_charge==-1)==2",
                               "Two positive and two negative muons");
   return df_2p2n;
}

Select interesting events with four electrons

In [3]:
RNode selection_4el(RNode df)
{
   auto df_ge4el = df.Filter("nElectron>=4", "At least our electrons");
   auto df_iso = df_ge4el.Filter("All(abs(Electron_pfRelIso03_all)<0.40)", "Require good isolation");
   auto df_kin = df_iso.Filter("All(Electron_pt>7) && All(abs(Electron_eta)<2.5)", "Good Electron kinematics");
   auto df_ip3d = df_kin.Define("Electron_ip3d", "sqrt(Electron_dxy*Electron_dxy + Electron_dz*Electron_dz)");
   auto df_sip3d = df_ip3d.Define("Electron_sip3d",
                                  "Electron_ip3d/sqrt(Electron_dxyErr*Electron_dxyErr + Electron_dzErr*Electron_dzErr)");
   auto df_pv = df_sip3d.Filter("All(Electron_sip3d<4) && All(abs(Electron_dxy)<0.5) && "
                                "All(abs(Electron_dz)<1.0)",
                                "Track close to primary vertex with small uncertainty");
   auto df_2p2n = df_pv.Filter("nElectron==4 && Sum(Electron_charge==1)==2 && Sum(Electron_charge==-1)==2",
                               "Two positive and two negative electrons");
   return df_2p2n;
}

Select interesting events with two electrons and two muons

In [4]:
RNode selection_2el2mu(RNode df)
{
   auto df_ge2el2mu = df.Filter("nElectron>=2 && nMuon>=2", "At least two electrons and two muons");
   auto df_eta = df_ge2el2mu.Filter("All(abs(Electron_eta)<2.5) && All(abs(Muon_eta)<2.4)", "Eta cuts");
   auto pt_cuts = [](rvec_f mu_pt, rvec_f el_pt) {
      auto mu_pt_sorted = Reverse(Sort(mu_pt));
      if (mu_pt_sorted[0] > 20 && mu_pt_sorted[1] > 10) {
         return true;
      }
      auto el_pt_sorted = Reverse(Sort(el_pt));
      if (el_pt_sorted[0] > 20 && el_pt_sorted[1] > 10) {
         return true;
      }
      return false;
   };
   auto df_pt = df_eta.Filter(pt_cuts, {"Muon_pt", "Electron_pt"}, "Pt cuts");
   auto dr_cuts = [](rvec_f mu_eta, rvec_f mu_phi, rvec_f el_eta, rvec_f el_phi) {
      auto mu_dr = DeltaR(mu_eta[0], mu_eta[1], mu_phi[0], mu_phi[1]);
      auto el_dr = DeltaR(el_eta[0], el_eta[1], el_phi[0], el_phi[1]);
      if (mu_dr < 0.02 || el_dr < 0.02) {
         return false;
      }
      return true;
   };
   auto df_dr = df_pt.Filter(dr_cuts, {"Muon_eta", "Muon_phi", "Electron_eta", "Electron_phi"}, "Dr cuts");
   auto df_iso = df_dr.Filter("All(abs(Electron_pfRelIso03_all)<0.40) && All(abs(Muon_pfRelIso04_all)<0.40)",
                              "Require good isolation");
   auto df_el_ip3d = df_iso.Define("Electron_ip3d_el", "sqrt(Electron_dxy*Electron_dxy + Electron_dz*Electron_dz)");
   auto df_el_sip3d = df_el_ip3d.Define("Electron_sip3d_el",
                                        "Electron_ip3d_el/sqrt(Electron_dxyErr*Electron_dxyErr + "
                                        "Electron_dzErr*Electron_dzErr)");
   auto df_el_track = df_el_sip3d.Filter("All(Electron_sip3d_el<4) && All(abs(Electron_dxy)<0.5) && All(abs(Electron_dz)<1.0)",
                                         "Electron track close to primary vertex with small uncertainty");
   auto df_mu_ip3d = df_el_track.Define("Muon_ip3d_mu", "sqrt(Muon_dxy*Muon_dxy + Muon_dz*Muon_dz)");
   auto df_mu_sip3d = df_mu_ip3d.Define("Muon_sip3d_mu",
                                        "Muon_ip3d_mu/sqrt(Muon_dxyErr*Muon_dxyErr + Muon_dzErr*Muon_dzErr)");
   auto df_mu_track = df_mu_sip3d.Filter("All(Muon_sip3d_mu<4) && All(abs(Muon_dxy)<0.5) && All(abs(Muon_dz)<1.0)",
                                         "Muon track close to primary vertex with small uncertainty");
   auto df_2p2n = df_mu_track.Filter("Sum(Electron_charge)==0 && Sum(Muon_charge)==0",
                                     "Two opposite charged electron and muon pairs");
   return df_2p2n;
}

Reconstruct two z candidates from four leptons of the same kind

In [5]:
RVec<RVec<size_t>> reco_zz_to_4l(rvec_f pt, rvec_f eta, rvec_f phi, rvec_f mass, rvec_i charge)
{
   RVec<RVec<size_t>> idx(2);
   idx[0].reserve(2); idx[1].reserve(2);

   // Find first lepton pair with invariant mass closest to Z mass
   auto idx_cmb = Combinations(pt, 2);
   auto best_mass = -1;
   size_t best_i1 = 0; size_t best_i2 = 0;
   for (size_t i = 0; i < idx_cmb[0].size(); i++) {
      const auto i1 = idx_cmb[0][i];
      const auto i2 = idx_cmb[1][i];
      if (charge[i1] != charge[i2]) {
         ROOT::Math::PtEtaPhiMVector p1(pt[i1], eta[i1], phi[i1], mass[i1]);
         ROOT::Math::PtEtaPhiMVector p2(pt[i2], eta[i2], phi[i2], mass[i2]);
         const auto this_mass = (p1 + p2).M();
         if (std::abs(z_mass - this_mass) < std::abs(z_mass - best_mass)) {
            best_mass = this_mass;
            best_i1 = i1;
            best_i2 = i2;
         }
      }
   }
   idx[0].emplace_back(best_i1);
   idx[0].emplace_back(best_i2);

   // Reconstruct second Z from remaining lepton pair
   for (size_t i = 0; i < 4; i++) {
      if (i != best_i1 && i != best_i2) {
         idx[1].emplace_back(i);
      }
   }

   // Return indices of the pairs building two Z bosons
   return idx;
}
input_line_135:3:1: error: function definition is not allowed here
{
^

Compute z masses from four leptons of the same kind and sort ascending in distance to z mass

In [6]:
RVec<float> compute_z_masses_4l(const RVec<RVec<size_t>> &idx, rvec_f pt, rvec_f eta, rvec_f phi, rvec_f mass)
{
   RVec<float> z_masses(2);
   for (size_t i = 0; i < 2; i++) {
      const auto i1 = idx[i][0]; const auto i2 = idx[i][1];
      ROOT::Math::PtEtaPhiMVector p1(pt[i1], eta[i1], phi[i1], mass[i1]);
      ROOT::Math::PtEtaPhiMVector p2(pt[i2], eta[i2], phi[i2], mass[i2]);
      z_masses[i] = (p1 + p2).M();
   }
   if (std::abs(z_masses[0] - z_mass) < std::abs(z_masses[1] - z_mass)) {
      return z_masses;
   } else {
      return Reverse(z_masses);
   }
}
input_line_136:3:1: error: function definition is not allowed here
{
^

Apply selection on reconstructed z candidates

In [7]:
RNode filter_z_candidates(RNode df)
{
   auto df_z1_cut = df.Filter("Z_mass[0] > 40 && Z_mass[0] < 120", "Mass of first Z candidate in [40, 120]");
   auto df_z2_cut = df_z1_cut.Filter("Z_mass[1] > 12 && Z_mass[1] < 120", "Mass of second Z candidate in [12, 120]");
   return df_z2_cut;
}

Reconstruct higgs from four muons

In [8]:
RNode reco_higgs_to_4mu(RNode df)
{
   // Filter interesting events
   auto df_base = selection_4mu(df);

   // Reconstruct Z systems
   auto df_z_idx =
      df_base.Define("Z_idx", reco_zz_to_4l, {"Muon_pt", "Muon_eta", "Muon_phi", "Muon_mass", "Muon_charge"});

   // Cut on distance between muons building Z systems
   auto filter_z_dr = [](const RVec<RVec<size_t>> &idx, rvec_f eta, rvec_f phi) {
      for (size_t i = 0; i < 2; i++) {
         const auto i1 = idx[i][0];
         const auto i2 = idx[i][1];
         const auto dr = DeltaR(eta[i1], eta[i2], phi[i1], phi[i2]);
         if (dr < 0.02) {
            return false;
         }
      }
      return true;
   };
   auto df_z_dr =
      df_z_idx.Filter(filter_z_dr, {"Z_idx", "Muon_eta", "Muon_phi"}, "Delta R separation of muons building Z system");

   // Compute masses of Z systems
   auto df_z_mass =
      df_z_dr.Define("Z_mass", compute_z_masses_4l, {"Z_idx", "Muon_pt", "Muon_eta", "Muon_phi", "Muon_mass"});

   // Cut on mass of Z candidates
   auto df_z_cut = filter_z_candidates(df_z_mass);

   // Reconstruct H mass
   auto df_h_mass =
      df_z_cut.Define("H_mass", compute_higgs_mass_4l, {"Z_idx", "Muon_pt", "Muon_eta", "Muon_phi", "Muon_mass"});

   return df_h_mass;
}
input_line_138:8:31: error: use of undeclared identifier 'reco_zz_to_4l'
      df_base.Define("Z_idx", reco_zz_to_4l, {"Muon_pt", "Muon_eta", "Muon_phi", "Muon_mass", "Muon_charge"});
                              ^
input_line_138:27:32: error: use of undeclared identifier 'compute_z_masses_4l'
      df_z_dr.Define("Z_mass", compute_z_masses_4l, {"Z_idx", "Muon_pt", "Muon_eta", "Muon_phi", "Muon_mass"});
                               ^
input_line_138:34:33: error: use of undeclared identifier 'compute_higgs_mass_4l'
      df_z_cut.Define("H_mass", compute_higgs_mass_4l, {"Z_idx", "Muon_pt", "Muon_eta", "Muon_phi", "Muon_mass"});
                                ^

Reconstruct higgs from four electrons

In [9]:
RNode reco_higgs_to_4el(RNode df)
{
   // Filter interesting events
   auto df_base = selection_4el(df);

   // Reconstruct Z systems
   auto df_z_idx = df_base.Define("Z_idx", reco_zz_to_4l,
                                  {"Electron_pt", "Electron_eta", "Electron_phi", "Electron_mass", "Electron_charge"});

   // Cut on distance between Electrons building Z systems
   auto filter_z_dr = [](const RVec<RVec<size_t>> &idx, rvec_f eta, rvec_f phi) {
      for (size_t i = 0; i < 2; i++) {
         const auto i1 = idx[i][0];
         const auto i2 = idx[i][1];
         const auto dr = DeltaR(eta[i1], eta[i2], phi[i1], phi[i2]);
         if (dr < 0.02) {
            return false;
         }
      }
      return true;
   };
   auto df_z_dr = df_z_idx.Filter(filter_z_dr, {"Z_idx", "Electron_eta", "Electron_phi"},
                                  "Delta R separation of Electrons building Z system");

   // Compute masses of Z systems
   auto df_z_mass = df_z_dr.Define("Z_mass", compute_z_masses_4l,
                                   {"Z_idx", "Electron_pt", "Electron_eta", "Electron_phi", "Electron_mass"});

   // Cut on mass of Z candidates
   auto df_z_cut = filter_z_candidates(df_z_mass);

   // Reconstruct H mass
   auto df_h_mass = df_z_cut.Define("H_mass", compute_higgs_mass_4l,
                                    {"Z_idx", "Electron_pt", "Electron_eta", "Electron_phi", "Electron_mass"});

   return df_h_mass;
}
input_line_139:7:44: error: use of undeclared identifier 'reco_zz_to_4l'
   auto df_z_idx = df_base.Define("Z_idx", reco_zz_to_4l,
                                           ^
input_line_139:26:46: error: use of undeclared identifier 'compute_z_masses_4l'
   auto df_z_mass = df_z_dr.Define("Z_mass", compute_z_masses_4l,
                                             ^
input_line_139:33:47: error: use of undeclared identifier 'compute_higgs_mass_4l'
   auto df_h_mass = df_z_cut.Define("H_mass", compute_higgs_mass_4l,
                                              ^

Compute mass of two z candidates from two electrons and two muons and sort ascending in distance to z mass

In [10]:
RVec<float> compute_z_masses_2el2mu(rvec_f el_pt, rvec_f el_eta, rvec_f el_phi, rvec_f el_mass, rvec_f mu_pt,
                                  rvec_f mu_eta, rvec_f mu_phi, rvec_f mu_mass)
{
   ROOT::Math::PtEtaPhiMVector p1(mu_pt[0], mu_eta[0], mu_phi[0], mu_mass[0]);
   ROOT::Math::PtEtaPhiMVector p2(mu_pt[1], mu_eta[1], mu_phi[1], mu_mass[1]);
   ROOT::Math::PtEtaPhiMVector p3(el_pt[0], el_eta[0], el_phi[0], el_mass[0]);
   ROOT::Math::PtEtaPhiMVector p4(el_pt[1], el_eta[1], el_phi[1], el_mass[1]);
   auto mu_z = (p1 + p2).M();
   auto el_z = (p3 + p4).M();
   RVec<float> z_masses(2);
   if (std::abs(mu_z - z_mass) < std::abs(el_z - z_mass)) {
      z_masses[0] = mu_z;
      z_masses[1] = el_z;
   } else {
      z_masses[0] = el_z;
      z_masses[1] = mu_z;
   }
   return z_masses;
}
input_line_140:4:1: error: function definition is not allowed here
{
^

Reconstruct higgs from two electrons and two muons

In [11]:
RNode reco_higgs_to_2el2mu(RNode df)
{
   // Filter interesting events
   auto df_base = selection_2el2mu(df);

   // Compute masses of Z systems
   auto df_z_mass =
      df_base.Define("Z_mass", compute_z_masses_2el2mu, {"Electron_pt", "Electron_eta", "Electron_phi", "Electron_mass",
                                                       "Muon_pt", "Muon_eta", "Muon_phi", "Muon_mass"});

   // Cut on mass of Z candidates
   auto df_z_cut = filter_z_candidates(df_z_mass);

   // Reconstruct H mass
   auto df_h_mass = df_z_cut.Define(
      "H_mass", compute_higgs_mass_2el2mu,
      {"Electron_pt", "Electron_eta", "Electron_phi", "Electron_mass", "Muon_pt", "Muon_eta", "Muon_phi", "Muon_mass"});

   return df_h_mass;
}
input_line_141:8:32: error: use of undeclared identifier 'compute_z_masses_2el2mu'
      df_base.Define("Z_mass", compute_z_masses_2el2mu, {"Electron_pt", "Electron_eta", "Electron_phi", "Electron_mass",
                               ^
input_line_141:16:17: error: use of undeclared identifier 'compute_higgs_mass_2el2mu'
      "H_mass", compute_higgs_mass_2el2mu,
                ^

Plot invariant mass for signal and background processes from simulated events overlay the measured data.

In [12]:
template <typename T>
Unbalanced braces. This cell was not processed.

Compute mass of Higgs from four leptons of the same kind

In [13]:
%%cpp -d
float compute_higgs_mass_4l(const RVec<RVec<size_t>> &idx, rvec_f pt, rvec_f eta, rvec_f phi, rvec_f mass)
{
   const auto i1 = idx[0][0]; const auto i2 = idx[0][1];
   const auto i3 = idx[1][0]; const auto i4 = idx[1][1];
   ROOT::Math::PtEtaPhiMVector p1(pt[i1], eta[i1], phi[i1], mass[i1]);
   ROOT::Math::PtEtaPhiMVector p2(pt[i2], eta[i2], phi[i2], mass[i2]);
   ROOT::Math::PtEtaPhiMVector p3(pt[i3], eta[i3], phi[i3], mass[i3]);
   ROOT::Math::PtEtaPhiMVector p4(pt[i4], eta[i4], phi[i4], mass[i4]);
   return (p1 + p2 + p3 + p4).M();
}

Compute Higgs mass from two electrons and two muons

In [14]:
%%cpp -d
float compute_higgs_mass_2el2mu(rvec_f el_pt, rvec_f el_eta, rvec_f el_phi, rvec_f el_mass, rvec_f mu_pt, rvec_f mu_eta,
                                rvec_f mu_phi, rvec_f mu_mass)
{
   ROOT::Math::PtEtaPhiMVector p1(mu_pt[0], mu_eta[0], mu_phi[0], mu_mass[0]);
   ROOT::Math::PtEtaPhiMVector p2(mu_pt[1], mu_eta[1], mu_phi[1], mu_mass[1]);
   ROOT::Math::PtEtaPhiMVector p3(el_pt[0], el_eta[0], el_phi[0], el_mass[0]);
   ROOT::Math::PtEtaPhiMVector p4(el_pt[1], el_eta[1], el_phi[1], el_mass[1]);
   return (p1 + p2 + p3 + p4).M();
}

A helper function is created:

In [15]:
%%cpp -d
void plot(T sig, T bkg, T data, const std::string &x_label, const std::string &filename)
{
   // Canvas and general style options
   gStyle->SetOptStat(0);
   gStyle->SetTextFont(42);
   auto c = new TCanvas("c", "", 800, 700);
   c->SetLeftMargin(0.15);

   // Get signal and background histograms and stack them to show Higgs signal
   // on top of the background process
   auto h_sig = *sig;
   auto h_bkg = *bkg;
   auto h_cmb = *(TH1D*)(sig->Clone());
   h_cmb.Add(&h_bkg);
   h_cmb.SetTitle("");
   h_cmb.GetXaxis()->SetTitle(x_label.c_str());
   h_cmb.GetXaxis()->SetTitleSize(0.04);
   h_cmb.GetYaxis()->SetTitle("N_{Events}");
   h_cmb.GetYaxis()->SetTitleSize(0.04);
   h_cmb.SetLineColor(kRed);
   h_cmb.SetLineWidth(2);
   h_cmb.SetMaximum(18);

   h_bkg.SetLineWidth(2);
   h_bkg.SetFillStyle(1001);
   h_bkg.SetLineColor(kBlack);
   h_bkg.SetFillColor(kAzure - 9);

   // Get histogram of data points
   auto h_data = *data;
   h_data.SetLineWidth(1);
   h_data.SetMarkerStyle(20);
   h_data.SetMarkerSize(1.0);
   h_data.SetMarkerColor(kBlack);
   h_data.SetLineColor(kBlack);

   // Draw histograms
   h_cmb.DrawClone("HIST");
   h_bkg.DrawClone("HIST SAME");
   h_data.DrawClone("PE1 SAME");

   // Add legend
   TLegend legend(0.62, 0.70, 0.82, 0.88);
   legend.SetFillColor(0);
   legend.SetBorderSize(0);
   legend.SetTextSize(0.03);
   legend.AddEntry(&h_data, "Data", "PE1");
   legend.AddEntry(&h_bkg, "ZZ", "f");
   legend.AddEntry(&h_cmb, "m_{H} = 125 GeV", "f");
   legend.Draw();

   // Add header
   TLatex cms_label;
   cms_label.SetTextSize(0.04);
   cms_label.DrawLatexNDC(0.16, 0.92, "#bf{CMS Open Data}");
   TLatex header;
   header.SetTextSize(0.03);
   header.DrawLatexNDC(0.63, 0.92, "#sqrt{s} = 8 TeV, L_{int} = 11.6 fb^{-1}");

   // Save plot
   c->SaveAs(filename.c_str());
}
input_line_145:1:11: error: unknown type name 'T'
void plot(T sig, T bkg, T data, const std::string &x_label, const std::string &filename)
          ^
input_line_145:1:18: error: unknown type name 'T'
void plot(T sig, T bkg, T data, const std::string &x_label, const std::string &filename)
                 ^
input_line_145:1:25: error: unknown type name 'T'
void plot(T sig, T bkg, T data, const std::string &x_label, const std::string &filename)
                        ^

Enable multi-threading

In [16]:
ROOT::EnableImplicitMT();

Create dataframes for signal, background and data samples

Signal: higgs -> 4 leptons

In [17]:
ROOT::RDataFrame df_sig_4l("Events",
                           "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/SMHiggsToZZTo4L.root");

Background: zz -> 4 leptons Note that additional background processes from the original paper with minor contribution were left out for this tutorial.

In [18]:
ROOT::RDataFrame df_bkg_4mu("Events",
                            "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/ZZTo4mu.root");
ROOT::RDataFrame df_bkg_4el("Events",
                            "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/ZZTo4e.root");
ROOT::RDataFrame df_bkg_2el2mu("Events",
                               "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/ZZTo2e2mu.root");

Cms data taken in 2012 (11.6 fb^-1 integrated luminosity)

In [19]:
ROOT::RDataFrame df_data_doublemu(
   "Events", {"root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_DoubleMuParked.root",
              "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012C_DoubleMuParked.root"});
ROOT::RDataFrame df_data_doubleel(
   "Events", {"root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_DoubleElectron.root",
              "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012C_DoubleElectron.root"});

Reconstruct higgs to 4 muons

In [20]:
auto df_sig_4mu_reco = reco_higgs_to_4mu(df_sig_4l);
const auto luminosity = 11580.0;            // Integrated luminosity of the data samples
const auto xsec_SMHiggsToZZTo4L = 0.0065;   // H->4l: Standard Model cross-section
const auto nevt_SMHiggsToZZTo4L = 299973.0; // H->4l: Number of simulated events
const auto nbins = 36;                      // Number of bins for the invariant mass spectrum
auto df_h_sig_4mu = df_sig_4mu_reco
      .Define("weight", [&]() { return luminosity * xsec_SMHiggsToZZTo4L / nevt_SMHiggsToZZTo4L; }, {})
      .Histo1D({"h_sig_4mu", "", nbins, 70, 180}, "H_mass", "weight");

const auto scale_ZZTo4l = 1.386;     // ZZ->4mu: Scale factor for ZZ to four leptons
const auto xsec_ZZTo4mu = 0.077;     // ZZ->4mu: Standard Model cross-section
const auto nevt_ZZTo4mu = 1499064.0; // ZZ->4mu: Number of simulated events
auto df_bkg_4mu_reco = reco_higgs_to_4mu(df_bkg_4mu);
auto df_h_bkg_4mu = df_bkg_4mu_reco
      .Define("weight", [&]() { return luminosity * xsec_ZZTo4mu * scale_ZZTo4l / nevt_ZZTo4mu; }, {})
      .Histo1D({"h_bkg_4mu", "", nbins, 70, 180}, "H_mass", "weight");

auto df_data_4mu_reco = reco_higgs_to_4mu(df_data_doublemu);
auto df_h_data_4mu = df_data_4mu_reco
      .Define("weight", []() { return 1.0; }, {})
      .Histo1D({"h_data_4mu", "", nbins, 70, 180}, "H_mass", "weight");
input_line_150:2:2: error: Syntax error
 auto df_sig_4mu_reco = reco_higgs_to_4mu(df_sig_4l);
 ^
FunctionDecl 0x7f66a64daea8 <input_line_150:1:1, line:24:1> line:1:6 __cling_Un1Qu310 'void (void *)'
|-ParmVarDecl 0x7f66a64dadf8 <col:23, col:29> col:29 vpClingValue 'void *'
|-CompoundStmt 0x7f66a64de2c8 <col:43, line:24:1>
| |-DeclStmt 0x7f66a64db1e8 <line:2:2, col:53>
| | `-VarDecl 0x7f66a64daf80 <col:2, col:52> col:7 used df_sig_4mu_reco 'auto' cinit
| |   `-CallExpr 0x7f66a64db1b8 <col:25, col:52> '<dependent type>'
| |     |-DeclRefExpr 0x7f66a64db148 <col:25> '<dependent type>' lvalue Var 0x7f66a64db0b8 'reco_higgs_to_4mu' '<dependent type>'
| |     `-DeclRefExpr 0x7f66a64db190 <col:43> 'ROOT::RDataFrame':'class ROOT::RDataFrame' lvalue Var 0x558eeb85e4b0 'df_sig_4l' 'ROOT::RDataFrame':'class ROOT::RDataFrame'
| |-DeclStmt 0x7f66a64db308 <line:3:1, col:32>
| | `-VarDecl 0x7f66a64db218 <col:1, col:25> col:12 used luminosity 'const double':'const double' cinit
| |   `-FloatingLiteral 0x7f66a64db278 <col:25> 'double' 1.158000e+04
| |-DeclStmt 0x7f66a64db428 <line:4:1, col:41>
| | `-VarDecl 0x7f66a64db338 <col:1, col:35> col:12 used xsec_SMHiggsToZZTo4L 'const double':'const double' cinit
| |   `-FloatingLiteral 0x7f66a64db398 <col:35> 'double' 6.500000e-03
| |-DeclStmt 0x7f66a64db548 <line:5:1, col:43>
| | `-VarDecl 0x7f66a64db458 <col:1, col:35> col:12 used nevt_SMHiggsToZZTo4L 'const double':'const double' cinit
| |   `-FloatingLiteral 0x7f66a64db4b8 <col:35> 'double' 2.999730e+05
| |-DeclStmt 0x7f66a64db6e8 <line:6:1, col:22>
| | `-VarDecl 0x7f66a64db578 <col:1, col:20> col:12 used nbins 'const int':'const int' cinit
| |   `-IntegerLiteral 0x7f66a64db5d8 <col:20> 'int' 36
| |-DeclStmt 0x7f66a64dc350 <line:7:1, line:9:70>
| | `-VarDecl 0x7f66a64db718 <line:7:1, line:9:69> line:7:6 df_h_sig_4mu 'auto' cinit
| |   `-CallExpr 0x7f66a64dc2f0 <col:21, line:9:69> '<dependent type>'
| |     |-CXXDependentScopeMemberExpr 0x7f66a64dc108 <line:7:21, line:9:8> '<dependent type>' lvalue .Histo1D
| |     | `-CallExpr 0x7f66a64dc0c8 <line:7:21, line:8:103> '<dependent type>'
| |     |   |-CXXDependentScopeMemberExpr 0x7f66a64db7c0 <line:7:21, line:8:8> '<dependent type>' lvalue .Define
| |     |   | `-DeclRefExpr 0x7f66a64db778 <line:7:21> 'auto' lvalue Var 0x7f66a64daf80 'df_sig_4mu_reco' 'auto'
| |     |   |-StringLiteral 0x7f66a64db818 <line:8:15> 'const char [7]' lvalue "weight"
| |     |   |-LambdaExpr 0x7f66a64dbf10 <col:25, col:98> 'class (lambda at input_line_150:8:25)'
| |     |   | |-CXXRecordDecl 0x7f66a64db870 <col:25> col:25 implicit class definition
| |     |   | | |-DefinitionData lambda pass_in_registers trivially_copyable can_const_default_init
| |     |   | | | |-DefaultConstructor
| |     |   | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
| |     |   | | | |-MoveConstructor exists simple trivial needs_implicit
| |     |   | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
| |     |   | | | |-MoveAssignment
| |     |   | | | `-Destructor simple irrelevant trivial defaulted_is_deleted
| |     |   | | |-FieldDecl 0x7f66a64dbae8 <col:40> col:40 implicit 'const double &'
| |     |   | | |-FieldDecl 0x7f66a64dbb90 <col:53> col:53 implicit 'const double &'
| |     |   | | |-FieldDecl 0x7f66a64dbd40 <col:76> col:76 implicit 'const double &'
| |     |   | | |-CXXMethodDecl 0x7f66a64db9d8 <col:29, col:98> col:25 operator() 'double (void) const' inline
| |     |   | | | `-CompoundStmt 0x7f66a64dbe58 <col:31, col:98>
| |     |   | | |   `-ReturnStmt 0x7f66a64dbe40 <col:33, col:76>
| |     |   | | |     `-BinaryOperator 0x7f66a64dbe18 <col:40, col:76> 'double' '/'
| |     |   | | |       |-BinaryOperator 0x7f66a64dbcd8 <col:40, col:53> 'double' '*'
| |     |   | | |       | |-ImplicitCastExpr 0x7f66a64dbc50 <col:40> 'double':'double' <LValueToRValue>
| |     |   | | |       | | `-DeclRefExpr 0x7f66a64dbaa8 <col:40> 'const double':'const double' lvalue Var 0x7f66a64db218 'luminosity' 'const double':'const double'
| |     |   | | |       | `-ImplicitCastExpr 0x7f66a64dbcc0 <col:53> 'double':'double' <LValueToRValue>
| |     |   | | |       |   `-DeclRefExpr 0x7f66a64dbb50 <col:53> 'const double':'const double' lvalue Var 0x7f66a64db338 'xsec_SMHiggsToZZTo4L' 'const double':'const double'
| |     |   | | |       `-ImplicitCastExpr 0x7f66a64dbe00 <col:76> 'double':'double' <LValueToRValue>
| |     |   | | |         `-DeclRefExpr 0x7f66a64dbd00 <col:76> 'const double':'const double' lvalue Var 0x7f66a64db458 'nevt_SMHiggsToZZTo4L' 'const double':'const double'
| |     |   | | `-CXXDestructorDecl 0x7f66a64dbf90 <col:25> col:25 implicit referenced ~ 'void (void) noexcept' inline default trivial
| |     |   | |-DeclRefExpr 0x7f66a64dbe78 <col:40> 'const double':'const double' lvalue Var 0x7f66a64db218 'luminosity' 'const double':'const double'
| |     |   | |-DeclRefExpr 0x7f66a64dbea0 <col:53> 'const double':'const double' lvalue Var 0x7f66a64db338 'xsec_SMHiggsToZZTo4L' 'const double':'const double'
| |     |   | |-DeclRefExpr 0x7f66a64dbec8 <col:76> 'const double':'const double' lvalue Var 0x7f66a64db458 'nevt_SMHiggsToZZTo4L' 'const double':'const double'
| |     |   | `-CompoundStmt 0x7f66a64dbe58 <col:31, col:98>
| |     |   |   `-ReturnStmt 0x7f66a64dbe40 <col:33, col:76>
| |     |   |     `-BinaryOperator 0x7f66a64dbe18 <col:40, col:76> 'double' '/'
| |     |   |       |-BinaryOperator 0x7f66a64dbcd8 <col:40, col:53> 'double' '*'
| |     |   |       | |-ImplicitCastExpr 0x7f66a64dbc50 <col:40> 'double':'double' <LValueToRValue>
| |     |   |       | | `-DeclRefExpr 0x7f66a64dbaa8 <col:40> 'const double':'const double' lvalue Var 0x7f66a64db218 'luminosity' 'const double':'const double'
| |     |   |       | `-ImplicitCastExpr 0x7f66a64dbcc0 <col:53> 'double':'double' <LValueToRValue>
| |     |   |       |   `-DeclRefExpr 0x7f66a64dbb50 <col:53> 'const double':'const double' lvalue Var 0x7f66a64db338 'xsec_SMHiggsToZZTo4L' 'const double':'const double'
| |     |   |       `-ImplicitCastExpr 0x7f66a64dbe00 <col:76> 'double':'double' <LValueToRValue>
| |     |   |         `-DeclRefExpr 0x7f66a64dbd00 <col:76> 'const double':'const double' lvalue Var 0x7f66a64db458 'nevt_SMHiggsToZZTo4L' 'const double':'const double'
| |     |   `-InitListExpr 0x7f66a64dc088 <col:101, col:102> 'void'
| |     |-InitListExpr 0x7f66a64dc228 <line:9:16, col:48> 'void'
| |     | |-StringLiteral 0x7f66a64dc160 <col:17> 'const char [10]' lvalue "h_sig_4mu"
| |     | |-StringLiteral 0x7f66a64dc198 <col:30> 'const char [1]' lvalue ""
| |     | |-DeclRefExpr 0x7f66a64dc1c0 <col:34> 'const int':'const int' lvalue Var 0x7f66a64db578 'nbins' 'const int':'const int'
| |     | |-IntegerLiteral 0x7f66a64dc1e8 <col:41> 'int' 70
| |     | `-IntegerLiteral 0x7f66a64dc208 <col:45> 'int' 180
| |     |-StringLiteral 0x7f66a64dc290 <col:51> 'const char [7]' lvalue "H_mass"
| |     `-StringLiteral 0x7f66a64dc2c0 <col:61> 'const char [7]' lvalue "weight"
| |-DeclStmt 0x7f66a64dc478 <line:11:1, col:32>
| | `-VarDecl 0x7f66a64dc380 <col:1, col:27> col:12 used scale_ZZTo4l 'const double':'const double' cinit
| |   `-FloatingLiteral 0x7f66a64dc3e0 <col:27> 'double' 1.386000e+00
| |-DeclStmt 0x7f66a64dc598 <line:12:1, col:32>
| | `-VarDecl 0x7f66a64dc4a8 <col:1, col:27> col:12 used xsec_ZZTo4mu 'const double':'const double' cinit
| |   `-FloatingLiteral 0x7f66a64dc508 <col:27> 'double' 7.700000e-02
| |-DeclStmt 0x7f66a64dc6b8 <line:13:1, col:36>
| | `-VarDecl 0x7f66a64dc5c8 <col:1, col:27> col:12 used nevt_ZZTo4mu 'const double':'const double' cinit
| |   `-FloatingLiteral 0x7f66a64dc628 <col:27> 'double' 1.499064e+06
| |-DeclStmt 0x7f66a64dc918 <line:14:1, col:53>
| | `-VarDecl 0x7f66a64dc6e8 <col:1, col:52> col:6 used df_bkg_4mu_reco 'auto' cinit
| |   `-CallExpr 0x7f66a64dc8e8 <col:24, col:52> '<dependent type>'
| |     |-DeclRefExpr 0x7f66a64dc878 <col:24> '<dependent type>' lvalue Var 0x7f66a64dc7e8 'reco_higgs_to_4mu' '<dependent type>'
| |     `-DeclRefExpr 0x7f66a64dc8c0 <col:42> 'ROOT::RDataFrame':'class ROOT::RDataFrame' lvalue Var 0x7f66a61f6890 'df_bkg_4mu' 'ROOT::RDataFrame':'class ROOT::RDataFrame'
| |-DeclStmt 0x7f66a64dd640 <line:15:1, line:17:70>
| | `-VarDecl 0x7f66a64dc948 <line:15:1, line:17:69> line:15:6 df_h_bkg_4mu 'auto' cinit
| |   `-CallExpr 0x7f66a64dd600 <col:21, line:17:69> '<dependent type>'
| |     |-CXXDependentScopeMemberExpr 0x7f66a64dd418 <line:15:21, line:17:8> '<dependent type>' lvalue .Histo1D
| |     | `-CallExpr 0x7f66a64dd3d8 <line:15:21, line:16:102> '<dependent type>'
| |     |   |-CXXDependentScopeMemberExpr 0x7f66a64dc9f0 <line:15:21, line:16:8> '<dependent type>' lvalue .Define
| |     |   | `-DeclRefExpr 0x7f66a64dc9a8 <line:15:21> 'auto' lvalue Var 0x7f66a64dc6e8 'df_bkg_4mu_reco' 'auto'
| |     |   |-StringLiteral 0x7f66a64dca48 <line:16:15> 'const char [7]' lvalue "weight"
| |     |   |-LambdaExpr 0x7f66a64dd208 <col:25, col:97> 'class (lambda at input_line_150:16:25)'
| |     |   | |-CXXRecordDecl 0x7f66a64dcaa0 <col:25> col:25 implicit class definition
| |     |   | | |-DefinitionData lambda pass_in_registers trivially_copyable can_const_default_init
| |     |   | | | |-DefaultConstructor
| |     |   | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
| |     |   | | | |-MoveConstructor exists simple trivial needs_implicit
| |     |   | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
| |     |   | | | |-MoveAssignment
| |     |   | | | `-Destructor simple irrelevant trivial defaulted_is_deleted
| |     |   | | |-FieldDecl 0x7f66a64dccf0 <col:40> col:40 implicit 'const double &'
| |     |   | | |-FieldDecl 0x7f66a64dcd78 <col:53> col:53 implicit 'const double &'
| |     |   | | |-FieldDecl 0x7f66a64dced0 <col:68> col:68 implicit 'const double &'
| |     |   | | |-FieldDecl 0x7f66a64dd010 <col:83> col:83 implicit 'const double &'
| |     |   | | |-CXXMethodDecl 0x7f66a64dcc08 <col:29, col:97> col:25 operator() 'double (void) const' inline
| |     |   | | | `-CompoundStmt 0x7f66a64dd128 <col:31, col:97>
| |     |   | | |   `-ReturnStmt 0x7f66a64dd110 <col:33, col:83>
| |     |   | | |     `-BinaryOperator 0x7f66a64dd0e8 <col:40, col:83> 'double' '/'
| |     |   | | |       |-BinaryOperator 0x7f66a64dcfa8 <col:40, col:68> 'double' '*'
| |     |   | | |       | |-BinaryOperator 0x7f66a64dce68 <col:40, col:53> 'double' '*'
| |     |   | | |       | | |-ImplicitCastExpr 0x7f66a64dcde0 <col:40> 'double':'double' <LValueToRValue>
| |     |   | | |       | | | `-DeclRefExpr 0x7f66a64dccb0 <col:40> 'const double':'const double' lvalue Var 0x7f66a64db218 'luminosity' 'const double':'const double'
| |     |   | | |       | | `-ImplicitCastExpr 0x7f66a64dce50 <col:53> 'double':'double' <LValueToRValue>
| |     |   | | |       | |   `-DeclRefExpr 0x7f66a64dcd38 <col:53> 'const double':'const double' lvalue Var 0x7f66a64dc4a8 'xsec_ZZTo4mu' 'const double':'const double'
| |     |   | | |       | `-ImplicitCastExpr 0x7f66a64dcf90 <col:68> 'double':'double' <LValueToRValue>
| |     |   | | |       |   `-DeclRefExpr 0x7f66a64dce90 <col:68> 'const double':'const double' lvalue Var 0x7f66a64dc380 'scale_ZZTo4l' 'const double':'const double'
| |     |   | | |       `-ImplicitCastExpr 0x7f66a64dd0d0 <col:83> 'double':'double' <LValueToRValue>
| |     |   | | |         `-DeclRefExpr 0x7f66a64dcfd0 <col:83> 'const double':'const double' lvalue Var 0x7f66a64dc5c8 'nevt_ZZTo4mu' 'const double':'const double'
| |     |   | | `-CXXDestructorDecl 0x7f66a64dd2a0 <col:25> col:25 implicit referenced ~ 'void (void) noexcept' inline default trivial
| |     |   | |-DeclRefExpr 0x7f66a64dd148 <col:40> 'const double':'const double' lvalue Var 0x7f66a64db218 'luminosity' 'const double':'const double'
| |     |   | |-DeclRefExpr 0x7f66a64dd170 <col:53> 'const double':'const double' lvalue Var 0x7f66a64dc4a8 'xsec_ZZTo4mu' 'const double':'const double'
| |     |   | |-DeclRefExpr 0x7f66a64dd198 <col:68> 'const double':'const double' lvalue Var 0x7f66a64dc380 'scale_ZZTo4l' 'const double':'const double'
| |     |   | |-DeclRefExpr 0x7f66a64dd1c0 <col:83> 'const double':'const double' lvalue Var 0x7f66a64dc5c8 'nevt_ZZTo4mu' 'const double':'const double'
| |     |   | `-CompoundStmt 0x7f66a64dd128 <col:31, col:97>
| |     |   |   `-ReturnStmt 0x7f66a64dd110 <col:33, col:83>
| |     |   |     `-BinaryOperator 0x7f66a64dd0e8 <col:40, col:83> 'double' '/'
| |     |   |       |-BinaryOperator 0x7f66a64dcfa8 <col:40, col:68> 'double' '*'
| |     |   |       | |-BinaryOperator 0x7f66a64dce68 <col:40, col:53> 'double' '*'
| |     |   |       | | |-ImplicitCastExpr 0x7f66a64dcde0 <col:40> 'double':'double' <LValueToRValue>
| |     |   |       | | | `-DeclRefExpr 0x7f66a64dccb0 <col:40> 'const double':'const double' lvalue Var 0x7f66a64db218 'luminosity' 'const double':'const double'
| |     |   |       | | `-ImplicitCastExpr 0x7f66a64dce50 <col:53> 'double':'double' <LValueToRValue>
| |     |   |       | |   `-DeclRefExpr 0x7f66a64dcd38 <col:53> 'const double':'const double' lvalue Var 0x7f66a64dc4a8 'xsec_ZZTo4mu' 'const double':'const double'
| |     |   |       | `-ImplicitCastExpr 0x7f66a64dcf90 <col:68> 'double':'double' <LValueToRValue>
| |     |   |       |   `-DeclRefExpr 0x7f66a64dce90 <col:68> 'const double':'const double' lvalue Var 0x7f66a64dc380 'scale_ZZTo4l' 'const double':'const double'
| |     |   |       `-ImplicitCastExpr 0x7f66a64dd0d0 <col:83> 'double':'double' <LValueToRValue>
| |     |   |         `-DeclRefExpr 0x7f66a64dcfd0 <col:83> 'const double':'const double' lvalue Var 0x7f66a64dc5c8 'nevt_ZZTo4mu' 'const double':'const double'
| |     |   `-InitListExpr 0x7f66a64dd398 <col:100, col:101> 'void'
| |     |-InitListExpr 0x7f66a64dd538 <line:17:16, col:48> 'void'
| |     | |-StringLiteral 0x7f66a64dd470 <col:17> 'const char [10]' lvalue "h_bkg_4mu"
| |     | |-StringLiteral 0x7f66a64dd4a8 <col:30> 'const char [1]' lvalue ""
| |     | |-DeclRefExpr 0x7f66a64dd4d0 <col:34> 'const int':'const int' lvalue Var 0x7f66a64db578 'nbins' 'const int':'const int'
| |     | |-IntegerLiteral 0x7f66a64dd4f8 <col:41> 'int' 70
| |     | `-IntegerLiteral 0x7f66a64dd518 <col:45> 'int' 180
| |     |-StringLiteral 0x7f66a64dd5a0 <col:51> 'const char [7]' lvalue "H_mass"
| |     `-StringLiteral 0x7f66a64dd5d0 <col:61> 'const char [7]' lvalue "weight"
| |-DeclStmt 0x7f66a64dd8a0 <line:19:1, col:60>
| | `-VarDecl 0x7f66a64dd670 <col:1, col:59> col:6 used df_data_4mu_reco 'auto' cinit
| |   `-CallExpr 0x7f66a64dd870 <col:25, col:59> '<dependent type>'
| |     |-DeclRefExpr 0x7f66a64dd800 <col:25> '<dependent type>' lvalue Var 0x7f66a64dd770 'reco_higgs_to_4mu' '<dependent type>'
| |     `-DeclRefExpr 0x7f66a64dd848 <col:43> 'ROOT::RDataFrame':'class ROOT::RDataFrame' lvalue Var 0x7f66a61f9688 'df_data_doublemu' 'ROOT::RDataFrame':'class ROOT::RDataFrame'
| |-DeclStmt 0x7f66a64de2a0 <line:20:1, line:22:71>
| | `-VarDecl 0x7f66a64dd8d0 <line:20:1, line:22:70> line:20:6 df_h_data_4mu 'auto' cinit
| |   `-CallExpr 0x7f66a64de260 <col:22, line:22:70> '<dependent type>'
| |     |-CXXDependentScopeMemberExpr 0x7f66a64de078 <line:20:22, line:22:8> '<dependent type>' lvalue .Histo1D
| |     | `-CallExpr 0x7f66a64de038 <line:20:22, line:21:49> '<dependent type>'
| |     |   |-CXXDependentScopeMemberExpr 0x7f66a64dd978 <line:20:22, line:21:8> '<dependent type>' lvalue .Define
| |     |   | `-DeclRefExpr 0x7f66a64dd930 <line:20:22> 'auto' lvalue Var 0x7f66a64dd670 'df_data_4mu_reco' 'auto'
| |     |   |-StringLiteral 0x7f66a64dd9d0 <line:21:15> 'const char [7]' lvalue "weight"
| |     |   |-LambdaExpr 0x7f66a64ddec8 <col:25, col:44> 'class (lambda at input_line_150:21:25)'
| |     |   | |-CXXRecordDecl 0x7f66a64dda28 <col:25> col:25 implicit class definition
| |     |   | | |-DefinitionData lambda pass_in_registers empty standard_layout trivially_copyable can_const_default_init
| |     |   | | | |-DefaultConstructor defaulted_is_constexpr
| |     |   | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
| |     |   | | | |-MoveConstructor exists simple trivial needs_implicit
| |     |   | | | |-CopyAssignment trivial has_const_param needs_implicit implicit_has_const_param
| |     |   | | | |-MoveAssignment
| |     |   | | | `-Destructor simple irrelevant trivial defaulted_is_deleted
| |     |   | | |-CXXMethodDecl 0x7f66a64ddb98 <col:28, col:44> col:25 operator() 'double (void) const' inline
| |     |   | | | `-CompoundStmt 0x7f66a64ddc78 <col:30, col:44>
| |     |   | | |   `-ReturnStmt 0x7f66a64ddc60 <col:32, col:39>
| |     |   | | |     `-FloatingLiteral 0x7f66a64ddc40 <col:39> 'double' 1.000000e+00
| |     |   | | |-CXXConversionDecl 0x7f66a64ddd68 <col:25, col:44> col:25 implicit operator double (*)() 'double (*(void) const)(void)' inline
| |     |   | | |-CXXMethodDecl 0x7f66a64dde10 <col:25, col:44> col:25 implicit __invoke 'double (void)' static inline
| |     |   | | `-CXXDestructorDecl 0x7f66a64ddf00 <col:25> col:25 implicit referenced ~ 'void (void) noexcept' inline default trivial
| |     |   | `-CompoundStmt 0x7f66a64ddc78 <col:30, col:44>
| |     |   |   `-ReturnStmt 0x7f66a64ddc60 <col:32, col:39>
| |     |   |     `-FloatingLiteral 0x7f66a64ddc40 <col:39> 'double' 1.000000e+00
| |     |   `-InitListExpr 0x7f66a64ddff8 <col:47, col:48> 'void'
| |     |-InitListExpr 0x7f66a64de198 <line:22:16, col:49> 'void'
| |     | |-StringLiteral 0x7f66a64de0d0 <col:17> 'const char [11]' lvalue "h_data_4mu"
| |     | |-StringLiteral 0x7f66a64de108 <col:31> 'const char [1]' lvalue ""
| |     | |-DeclRefExpr 0x7f66a64de130 <col:35> 'const int':'const int' lvalue Var 0x7f66a64db578 'nbins' 'const int':'const int'
| |     | |-IntegerLiteral 0x7f66a64de158 <col:42> 'int' 70
| |     | `-IntegerLiteral 0x7f66a64de178 <col:46> 'int' 180
| |     |-StringLiteral 0x7f66a64de200 <col:52> 'const char [7]' lvalue "H_mass"
| |     `-StringLiteral 0x7f66a64de230 <col:62> 'const char [7]' lvalue "weight"
| `-NullStmt 0x7f66a64de2b8 <line:23:1>
|-AnnotateAttr 0x7f66a64db048 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
|-AnnotateAttr 0x7f66a64db118 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
|-AnnotateAttr 0x7f66a64dc7b0 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
|-AnnotateAttr 0x7f66a64dc848 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
|-AnnotateAttr 0x7f66a64dd738 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
`-AnnotateAttr 0x7f66a64dd7d0 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
<<<NULL>>>

Reconstruct higgs to 4 electrons

In [21]:
auto df_sig_4el_reco = reco_higgs_to_4el(df_sig_4l);
auto df_h_sig_4el = df_sig_4el_reco
      .Define("weight", [&]() { return luminosity * xsec_SMHiggsToZZTo4L / nevt_SMHiggsToZZTo4L; }, {})
      .Histo1D({"h_sig_4el", "", nbins, 70, 180}, "H_mass", "weight");

const auto xsec_ZZTo4el = xsec_ZZTo4mu; // ZZ->4el: Standard Model cross-section
const auto nevt_ZZTo4el = 1499093.0;    // ZZ->4el: Number of simulated events
auto df_bkg_4el_reco = reco_higgs_to_4el(df_bkg_4el);
auto df_h_bkg_4el = df_bkg_4el_reco
      .Define("weight", [&]() { return luminosity * xsec_ZZTo4el * scale_ZZTo4l / nevt_ZZTo4el; }, {})
      .Histo1D({"h_bkg_4el", "", nbins, 70, 180}, "H_mass", "weight");

auto df_data_4el_reco = reco_higgs_to_4el(df_data_doubleel);
auto df_h_data_4el = df_data_4el_reco.Define("weight", []() { return 1.0; }, {})
                        .Histo1D({"h_data_4el", "", nbins, 70, 180}, "H_mass", "weight");
input_line_151:4:40: error: use of undeclared identifier 'luminosity'
      .Define("weight", [&]() { return luminosity * xsec_SMHiggsToZZTo4L / nevt_SMHiggsToZZTo4L; }, {})
                                       ^
input_line_151:4:53: error: use of undeclared identifier 'xsec_SMHiggsToZZTo4L'
      .Define("weight", [&]() { return luminosity * xsec_SMHiggsToZZTo4L / nevt_SMHiggsToZZTo4L; }, {})
                                                    ^
input_line_151:4:76: error: use of undeclared identifier 'nevt_SMHiggsToZZTo4L'
      .Define("weight", [&]() { return luminosity * xsec_SMHiggsToZZTo4L / nevt_SMHiggsToZZTo4L; }, {})
                                                                           ^
input_line_151:5:34: error: use of undeclared identifier 'nbins'
      .Histo1D({"h_sig_4el", "", nbins, 70, 180}, "H_mass", "weight");
                                 ^
input_line_151:7:27: error: use of undeclared identifier 'xsec_ZZTo4mu'
const auto xsec_ZZTo4el = xsec_ZZTo4mu; // ZZ->4el: Standard Model cross-section
                          ^
input_line_151:9:24: error: use of undeclared identifier 'reco_higgs_to_4el'
auto df_bkg_4el_reco = reco_higgs_to_4el(df_bkg_4el);
                       ^
input_line_151:11:40: error: use of undeclared identifier 'luminosity'
      .Define("weight", [&]() { return luminosity * xsec_ZZTo4el * scale_ZZTo4l / nevt_ZZTo4el; }, {})
                                       ^
input_line_151:11:68: error: use of undeclared identifier 'scale_ZZTo4l'
      .Define("weight", [&]() { return luminosity * xsec_ZZTo4el * scale_ZZTo4l / nevt_ZZTo4el; }, {})
                                                                   ^
input_line_151:12:34: error: use of undeclared identifier 'nbins'
      .Histo1D({"h_bkg_4el", "", nbins, 70, 180}, "H_mass", "weight");
                                 ^
input_line_151:14:25: error: use of undeclared identifier 'reco_higgs_to_4el'
auto df_data_4el_reco = reco_higgs_to_4el(df_data_doubleel);
                        ^
input_line_151:16:53: error: use of undeclared identifier 'nbins'
                        .Histo1D({"h_data_4el", "", nbins, 70, 180}, "H_mass", "weight");
                                                    ^
input_line_151:2:2: error: Syntax error
 auto df_sig_4el_reco = reco_higgs_to_4el(df_sig_4l);
 ^
FunctionDecl 0x7f66a6e631a0 <input_line_151:1:1, line:18:1> line:1:6 __cling_Un1Qu311 'void (void *)'
|-ParmVarDecl 0x7f66a6e630f0 <col:23, col:29> col:29 vpClingValue 'void *'
|-CompoundStmt 0x7f66a6e64df0 <col:43, line:18:1>
| |-DeclStmt 0x7f66a6e634e0 <line:2:2, col:53>
| | `-VarDecl 0x7f66a6e63278 <col:2, col:52> col:7 used df_sig_4el_reco 'auto' cinit
| |   `-CallExpr 0x7f66a6e634b0 <col:25, col:52> '<dependent type>'
| |     |-DeclRefExpr 0x7f66a6e63440 <col:25> '<dependent type>' lvalue Var 0x7f66a6e633b0 'reco_higgs_to_4el' '<dependent type>'
| |     `-DeclRefExpr 0x7f66a6e63488 <col:43> 'ROOT::RDataFrame':'class ROOT::RDataFrame' lvalue Var 0x558eeb85e4b0 'df_sig_4l' 'ROOT::RDataFrame':'class ROOT::RDataFrame'
| |-DeclStmt 0x7f66a6e63bc0 <line:3:1, line:5:70>
| | `-VarDecl 0x7f66a6e63510 <line:3:1, col:6> col:6 invalid df_h_sig_4el 'auto'
| |-DeclStmt 0x7f66a6e63c50 <line:7:1, col:39>
| | `-VarDecl 0x7f66a6e63bf0 <col:1, col:12> col:12 invalid xsec_ZZTo4el 'const auto'
| |-DeclStmt 0x7f66a6e63d78 <line:8:1, col:36>
| | `-VarDecl 0x7f66a6e63c80 <col:1, col:27> col:12 used nevt_ZZTo4el 'const double':'const double' cinit
| |   `-FloatingLiteral 0x7f66a6e63ce0 <col:27> 'double' 1.499093e+06
| |-DeclStmt 0x7f66a6e63e80 <line:9:1, col:53>
| | `-VarDecl 0x7f66a6e63da8 <col:1, col:6> col:6 invalid df_bkg_4el_reco 'auto'
| |-DeclStmt 0x7f66a6e64518 <line:10:1, line:12:70>
| | `-VarDecl 0x7f66a6e63eb0 <line:10:1, col:6> col:6 invalid df_h_bkg_4el 'auto'
| |-DeclStmt 0x7f66a6e64620 <line:14:1, col:60>
| | `-VarDecl 0x7f66a6e64548 <col:1, col:6> col:6 invalid df_data_4el_reco 'auto'
| |-DeclStmt 0x7f66a6e64dc8 <line:15:1, line:16:89>
| | `-VarDecl 0x7f66a6e64650 <line:15:1, col:6> col:6 invalid df_h_data_4el 'auto'
| `-NullStmt 0x7f66a6e64de0 <line:17:1>
|-AnnotateAttr 0x7f66a6e63340 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
`-AnnotateAttr 0x7f66a6e63410 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
<<<NULL>>>

Reconstruct higgs to 2 electrons and 2 muons

In [22]:
auto df_sig_2el2mu_reco = reco_higgs_to_2el2mu(df_sig_4l);
auto df_h_sig_2el2mu = df_sig_2el2mu_reco
      .Define("weight", [&]() { return luminosity * xsec_SMHiggsToZZTo4L / nevt_SMHiggsToZZTo4L; }, {})
      .Histo1D({"h_sig_2el2mu", "", nbins, 70, 180}, "H_mass", "weight");

const auto xsec_ZZTo2el2mu = 0.18;      // ZZ->2el2mu: Standard Model cross-section
const auto nevt_ZZTo2el2mu = 1497445.0; // ZZ->2el2mu: Number of simulated events
auto df_bkg_2el2mu_reco = reco_higgs_to_2el2mu(df_bkg_2el2mu);
auto df_h_bkg_2el2mu = df_bkg_2el2mu_reco
      .Define("weight", [&]() { return luminosity * xsec_ZZTo2el2mu * scale_ZZTo4l / nevt_ZZTo2el2mu; }, {})
      .Histo1D({"h_bkg_2el2mu", "", nbins, 70, 180}, "H_mass", "weight");

auto df_data_2el2mu_reco = reco_higgs_to_2el2mu(df_data_doublemu);
auto df_h_data_2el2mu = df_data_2el2mu_reco.Define("weight", []() { return 1.0; }, {})
                           .Histo1D({"h_data_2el2mu_doublemu", "", nbins, 70, 180}, "H_mass", "weight");
input_line_152:4:40: error: use of undeclared identifier 'luminosity'
      .Define("weight", [&]() { return luminosity * xsec_SMHiggsToZZTo4L / nevt_SMHiggsToZZTo4L; }, {})
                                       ^
input_line_152:4:53: error: use of undeclared identifier 'xsec_SMHiggsToZZTo4L'
      .Define("weight", [&]() { return luminosity * xsec_SMHiggsToZZTo4L / nevt_SMHiggsToZZTo4L; }, {})
                                                    ^
input_line_152:4:76: error: use of undeclared identifier 'nevt_SMHiggsToZZTo4L'
      .Define("weight", [&]() { return luminosity * xsec_SMHiggsToZZTo4L / nevt_SMHiggsToZZTo4L; }, {})
                                                                           ^
input_line_152:5:37: error: use of undeclared identifier 'nbins'
      .Histo1D({"h_sig_2el2mu", "", nbins, 70, 180}, "H_mass", "weight");
                                    ^
input_line_152:9:27: error: use of undeclared identifier 'reco_higgs_to_2el2mu'
auto df_bkg_2el2mu_reco = reco_higgs_to_2el2mu(df_bkg_2el2mu);
                          ^
input_line_152:11:40: error: use of undeclared identifier 'luminosity'
      .Define("weight", [&]() { return luminosity * xsec_ZZTo2el2mu * scale_ZZTo4l / nevt_ZZTo2el2mu; }, {})
                                       ^
input_line_152:11:71: error: use of undeclared identifier 'scale_ZZTo4l'
      .Define("weight", [&]() { return luminosity * xsec_ZZTo2el2mu * scale_ZZTo4l / nevt_ZZTo2el2mu; }, {})
                                                                      ^
input_line_152:12:37: error: use of undeclared identifier 'nbins'
      .Histo1D({"h_bkg_2el2mu", "", nbins, 70, 180}, "H_mass", "weight");
                                    ^
input_line_152:14:28: error: use of undeclared identifier 'reco_higgs_to_2el2mu'
auto df_data_2el2mu_reco = reco_higgs_to_2el2mu(df_data_doublemu);
                           ^
input_line_152:16:68: error: use of undeclared identifier 'nbins'
                           .Histo1D({"h_data_2el2mu_doublemu", "", nbins, 70, 180}, "H_mass", "weight");
                                                                   ^
input_line_152:2:2: error: Syntax error
 auto df_sig_2el2mu_reco = reco_higgs_to_2el2mu(df_sig_4l);
 ^
FunctionDecl 0x7f66a6e65038 <input_line_152:1:1, line:18:1> line:1:6 __cling_Un1Qu312 'void (void *)'
|-ParmVarDecl 0x7f66a6e64f88 <col:23, col:29> col:29 vpClingValue 'void *'
|-CompoundStmt 0x7f66a6e66df8 <col:43, line:18:1>
| |-DeclStmt 0x7f66a6e65378 <line:2:2, col:59>
| | `-VarDecl 0x7f66a6e65110 <col:2, col:58> col:7 used df_sig_2el2mu_reco 'auto' cinit
| |   `-CallExpr 0x7f66a6e65348 <col:28, col:58> '<dependent type>'
| |     |-DeclRefExpr 0x7f66a6e652d8 <col:28> '<dependent type>' lvalue Var 0x7f66a6e65248 'reco_higgs_to_2el2mu' '<dependent type>'
| |     `-DeclRefExpr 0x7f66a6e65320 <col:49> 'ROOT::RDataFrame':'class ROOT::RDataFrame' lvalue Var 0x558eeb85e4b0 'df_sig_4l' 'ROOT::RDataFrame':'class ROOT::RDataFrame'
| |-DeclStmt 0x7f66a6e65a50 <line:3:1, line:5:73>
| | `-VarDecl 0x7f66a6e653a8 <line:3:1, col:6> col:6 invalid df_h_sig_2el2mu 'auto'
| |-DeclStmt 0x7f66a6e65b78 <line:7:1, col:34>
| | `-VarDecl 0x7f66a6e65a80 <col:1, col:30> col:12 used xsec_ZZTo2el2mu 'const double':'const double' cinit
| |   `-FloatingLiteral 0x7f66a6e65ae0 <col:30> 'double' 1.800000e-01
| |-DeclStmt 0x7f66a6e65c98 <line:8:1, col:39>
| | `-VarDecl 0x7f66a6e65ba8 <col:1, col:30> col:12 used nevt_ZZTo2el2mu 'const double':'const double' cinit
| |   `-FloatingLiteral 0x7f66a6e65c08 <col:30> 'double' 1.497445e+06
| |-DeclStmt 0x7f66a6e65da0 <line:9:1, col:62>
| | `-VarDecl 0x7f66a6e65cc8 <col:1, col:6> col:6 invalid df_bkg_2el2mu_reco 'auto'
| |-DeclStmt 0x7f66a6e66518 <line:10:1, line:12:73>
| | `-VarDecl 0x7f66a6e65dd0 <line:10:1, col:6> col:6 invalid df_h_bkg_2el2mu 'auto'
| |-DeclStmt 0x7f66a6e66620 <line:14:1, col:66>
| | `-VarDecl 0x7f66a6e66548 <col:1, col:6> col:6 invalid df_data_2el2mu_reco 'auto'
| |-DeclStmt 0x7f66a6e66dd0 <line:15:1, line:16:104>
| | `-VarDecl 0x7f66a6e66650 <line:15:1, col:6> col:6 invalid df_h_data_2el2mu 'auto'
| `-NullStmt 0x7f66a6e66de8 <line:17:1>
|-AnnotateAttr 0x7f66a6e651d8 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
`-AnnotateAttr 0x7f66a6e652a8 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
<<<NULL>>>

Produce histograms for different channels and make plots

In [23]:
plot(df_h_sig_4mu, df_h_bkg_4mu, df_h_data_4mu, "m_{4#mu} (GeV)", "higgs_4mu.pdf");
plot(df_h_sig_4el, df_h_bkg_4el, df_h_data_4el, "m_{4e} (GeV)", "higgs_4el.pdf");
plot(df_h_sig_2el2mu, df_h_bkg_2el2mu, df_h_data_2el2mu, "m_{2e2#mu} (GeV)", "higgs_2el2mu.pdf");
input_line_154:2:8: error: use of undeclared identifier 'df_h_sig_4mu'
 (plot(df_h_sig_4mu, df_h_bkg_4mu, df_h_data_4mu, "m_{4#mu} (GeV)", "higgs_4mu.pdf"))
       ^
input_line_154:2:22: error: use of undeclared identifier 'df_h_bkg_4mu'
 (plot(df_h_sig_4mu, df_h_bkg_4mu, df_h_data_4mu, "m_{4#mu} (GeV)", "higgs_4mu.pdf"))
                     ^
input_line_154:2:36: error: use of undeclared identifier 'df_h_data_4mu'
 (plot(df_h_sig_4mu, df_h_bkg_4mu, df_h_data_4mu, "m_{4#mu} (GeV)", "higgs_4mu.pdf"))
                                   ^
Error in <HandleInterpreterException>: Error evaluating expression (plot(df_h_sig_4mu, df_h_bkg_4mu, df_h_data_4mu, "m_{4#mu} (GeV)", "higgs_4mu.pdf")).
Execution of your code was aborted.
Error in <TReentrantRWLock::WriteUnLock>: Write lock already released for 0x7f66a5627de8

Combine channels for final plot

In [24]:
auto h_data_4l = df_h_data_4mu.GetPtr();
h_data_4l->Add(df_h_data_4el.GetPtr());
h_data_4l->Add(df_h_data_2el2mu.GetPtr());
auto h_sig_4l = df_h_sig_4mu.GetPtr();
h_sig_4l->Add(df_h_sig_4el.GetPtr());
h_sig_4l->Add(df_h_sig_2el2mu.GetPtr());
auto h_bkg_4l = df_h_bkg_4mu.GetPtr();
h_bkg_4l->Add(df_h_bkg_4el.GetPtr());
h_bkg_4l->Add(df_h_bkg_2el2mu.GetPtr());
plot(h_sig_4l, h_bkg_4l, h_data_4l, "m_{4l} (GeV)", "higgs_4l.pdf");
input_line_155:2:2: error: Syntax error
 auto h_data_4l = df_h_data_4mu.GetPtr();
 ^
FunctionDecl 0x7f66a6e6b538 <input_line_155:1:1, line:13:1> line:1:6 __cling_Un1Qu315 'void (void *)'
|-ParmVarDecl 0x7f66a6e6b488 <col:23, col:29> col:29 vpClingValue 'void *'
|-CompoundStmt 0x7f66a6e6cae8 <col:43, line:13:1>
| |-DeclStmt 0x7f66a6e6b808 <line:2:2, col:41>
| | `-VarDecl 0x7f66a6e6b610 <col:2, col:40> col:7 used h_data_4l 'auto' cinit
| |   `-CallExpr 0x7f66a6e6b7e0 <col:19, col:40> '<dependent type>'
| |     `-CXXDependentScopeMemberExpr 0x7f66a6e6b788 <col:19, col:33> '<dependent type>' lvalue .GetPtr
| |       `-DeclRefExpr 0x7f66a6e6b740 <col:19> '<dependent type>' lvalue Var 0x7f66a6e6b678 'df_h_data_4mu' '<dependent type>'
| |-CallExpr 0x7f66a6e6ba20 <line:3:1, col:38> '<dependent type>'
| | |-CXXDependentScopeMemberExpr 0x7f66a6e6b868 <col:1, col:12> '<dependent type>' lvalue ->Add
| | | `-DeclRefExpr 0x7f66a6e6b820 <col:1> 'auto' lvalue Var 0x7f66a6e6b610 'h_data_4l' 'auto'
| | `-CallExpr 0x7f66a6e6b9f8 <col:16, col:37> '<dependent type>'
| |   `-CXXDependentScopeMemberExpr 0x7f66a6e6b9a0 <col:16, col:30> '<dependent type>' lvalue .GetPtr
| |     `-DeclRefExpr 0x7f66a6e6b958 <col:16> '<dependent type>' lvalue Var 0x7f66a6e6b8c8 'df_h_data_4el' '<dependent type>'
| |-CallExpr 0x7f66a6e6bc30 <line:4:1, col:41> '<dependent type>'
| | |-CXXDependentScopeMemberExpr 0x7f66a6e6ba78 <col:1, col:12> '<dependent type>' lvalue ->Add
| | | `-DeclRefExpr 0x7f66a6e6ba50 <col:1> 'auto' lvalue Var 0x7f66a6e6b610 'h_data_4l' 'auto'
| | `-CallExpr 0x7f66a6e6bc08 <col:16, col:40> '<dependent type>'
| |   `-CXXDependentScopeMemberExpr 0x7f66a6e6bbb0 <col:16, col:33> '<dependent type>' lvalue .GetPtr
| |     `-DeclRefExpr 0x7f66a6e6bb68 <col:16> '<dependent type>' lvalue Var 0x7f66a6e6bad8 'df_h_data_2el2mu' '<dependent type>'
| |-DeclStmt 0x7f66a6e6be38 <line:5:1, col:38>
| | `-VarDecl 0x7f66a6e6bc78 <col:1, col:37> col:6 used h_sig_4l 'auto' cinit
| |   `-CallExpr 0x7f66a6e6be10 <col:17, col:37> '<dependent type>'
| |     `-CXXDependentScopeMemberExpr 0x7f66a6e6bdb8 <col:17, col:30> '<dependent type>' lvalue .GetPtr
| |       `-DeclRefExpr 0x7f66a6e6bd70 <col:17> '<dependent type>' lvalue Var 0x7f66a6e6bce0 'df_h_sig_4mu' '<dependent type>'
| |-CallExpr 0x7f66a6e6c050 <line:6:1, col:36> '<dependent type>'
| | |-CXXDependentScopeMemberExpr 0x7f66a6e6be98 <col:1, col:11> '<dependent type>' lvalue ->Add
| | | `-DeclRefExpr 0x7f66a6e6be50 <col:1> 'auto' lvalue Var 0x7f66a6e6bc78 'h_sig_4l' 'auto'
| | `-CallExpr 0x7f66a6e6c028 <col:15, col:35> '<dependent type>'
| |   `-CXXDependentScopeMemberExpr 0x7f66a6e6bfd0 <col:15, col:28> '<dependent type>' lvalue .GetPtr
| |     `-DeclRefExpr 0x7f66a6e6bf88 <col:15> '<dependent type>' lvalue Var 0x7f66a6e6bef8 'df_h_sig_4el' '<dependent type>'
| |-CallExpr 0x7f66a6e6c260 <line:7:1, col:39> '<dependent type>'
| | |-CXXDependentScopeMemberExpr 0x7f66a6e6c0a8 <col:1, col:11> '<dependent type>' lvalue ->Add
| | | `-DeclRefExpr 0x7f66a6e6c080 <col:1> 'auto' lvalue Var 0x7f66a6e6bc78 'h_sig_4l' 'auto'
| | `-CallExpr 0x7f66a6e6c238 <col:15, col:38> '<dependent type>'
| |   `-CXXDependentScopeMemberExpr 0x7f66a6e6c1e0 <col:15, col:31> '<dependent type>' lvalue .GetPtr
| |     `-DeclRefExpr 0x7f66a6e6c198 <col:15> '<dependent type>' lvalue Var 0x7f66a6e6c108 'df_h_sig_2el2mu' '<dependent type>'
| |-DeclStmt 0x7f66a6e6c468 <line:8:1, col:38>
| | `-VarDecl 0x7f66a6e6c2a8 <col:1, col:37> col:6 used h_bkg_4l 'auto' cinit
| |   `-CallExpr 0x7f66a6e6c440 <col:17, col:37> '<dependent type>'
| |     `-CXXDependentScopeMemberExpr 0x7f66a6e6c3e8 <col:17, col:30> '<dependent type>' lvalue .GetPtr
| |       `-DeclRefExpr 0x7f66a6e6c3a0 <col:17> '<dependent type>' lvalue Var 0x7f66a6e6c310 'df_h_bkg_4mu' '<dependent type>'
| |-CallExpr 0x7f66a6e6c680 <line:9:1, col:36> '<dependent type>'
| | |-CXXDependentScopeMemberExpr 0x7f66a6e6c4c8 <col:1, col:11> '<dependent type>' lvalue ->Add
| | | `-DeclRefExpr 0x7f66a6e6c480 <col:1> 'auto' lvalue Var 0x7f66a6e6c2a8 'h_bkg_4l' 'auto'
| | `-CallExpr 0x7f66a6e6c658 <col:15, col:35> '<dependent type>'
| |   `-CXXDependentScopeMemberExpr 0x7f66a6e6c600 <col:15, col:28> '<dependent type>' lvalue .GetPtr
| |     `-DeclRefExpr 0x7f66a6e6c5b8 <col:15> '<dependent type>' lvalue Var 0x7f66a6e6c528 'df_h_bkg_4el' '<dependent type>'
| |-CallExpr 0x7f66a6e6c890 <line:10:1, col:39> '<dependent type>'
| | |-CXXDependentScopeMemberExpr 0x7f66a6e6c6d8 <col:1, col:11> '<dependent type>' lvalue ->Add
| | | `-DeclRefExpr 0x7f66a6e6c6b0 <col:1> 'auto' lvalue Var 0x7f66a6e6c2a8 'h_bkg_4l' 'auto'
| | `-CallExpr 0x7f66a6e6c868 <col:15, col:38> '<dependent type>'
| |   `-CXXDependentScopeMemberExpr 0x7f66a6e6c810 <col:15, col:31> '<dependent type>' lvalue .GetPtr
| |     `-DeclRefExpr 0x7f66a6e6c7c8 <col:15> '<dependent type>' lvalue Var 0x7f66a6e6c738 'df_h_bkg_2el2mu' '<dependent type>'
| |-CallExpr 0x7f66a6e6ca88 <line:11:1, col:67> '<dependent type>'
| | |-DeclRefExpr 0x7f66a6e6c958 <col:1> '<dependent type>' lvalue Var 0x7f66a6e6c8c8 'plot' '<dependent type>'
| | |-DeclRefExpr 0x7f66a6e6c9a0 <col:6> 'auto' lvalue Var 0x7f66a6e6bc78 'h_sig_4l' 'auto'
| | |-DeclRefExpr 0x7f66a6e6c9c8 <col:16> 'auto' lvalue Var 0x7f66a6e6c2a8 'h_bkg_4l' 'auto'
| | |-DeclRefExpr 0x7f66a6e6c9f0 <col:26> 'auto' lvalue Var 0x7f66a6e6b610 'h_data_4l' 'auto'
| | |-StringLiteral 0x7f66a6e6ca18 <col:37> 'const char [13]' lvalue "m_{4l} (GeV)"
| | `-StringLiteral 0x7f66a6e6ca50 <col:53> 'const char [13]' lvalue "higgs_4l.pdf"
| `-NullStmt 0x7f66a6e6cad8 <line:12:1>
|-AnnotateAttr 0x7f66a6e6b6d8 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
|-AnnotateAttr 0x7f66a6e6b928 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
|-AnnotateAttr 0x7f66a6e6bb38 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
|-AnnotateAttr 0x7f66a6e6bd40 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
|-AnnotateAttr 0x7f66a6e6bf58 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
|-AnnotateAttr 0x7f66a6e6c168 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
|-AnnotateAttr 0x7f66a6e6c370 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
|-AnnotateAttr 0x7f66a6e6c588 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
|-AnnotateAttr 0x7f66a6e6c798 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
`-AnnotateAttr 0x7f66a6e6c928 <<invalid sloc>> R"ATTRDUMP(__ResolveAtRuntime)ATTRDUMP"
<<<NULL>>>

Draw all canvases

In [25]:
gROOT->GetListOfCanvases()->Draw()