I have three root files which are attached with this message: One is from Sherpa, Other is from Madgraph and third one is from data.
I’m using this code to superimpose the three plots for a particular variable e.g eta in this case.
{
TFile f1(“madgraph_zeejets.root”,“read”);
TGraphAsymmErrors ae = (TGraphAsymmErrors)f1->Get(“jet_ee_eta1jetcase”);
TFile f2(“sherpa_zeejets.root”,“read”);
TGraphAsymmErrors aa = (TGraphAsymmErrors)f2->Get(“jet_ee_eta1jetcase”);
TFile f3(“jet1eta_data.root”,“read”);
TCanvas c3 = (TCanvas)f3.Get(“c1”);
TH1D *h1;
TList* l = c3->GetListOfPrimitives();
TIter next(l);
TObject *found, obj;
while ((obj=next())) {
if (obj->InheritsFrom(TH1D::Class())) {
h1 = (TH1D)obj;
}
}
TCanvas c4;
h1->Draw(“E”);
h1->SetLineColor(kBlack);
h1->SetLineWidth(2);
ae->Draw(“E”);
ae->SetLineColor(kRed);
ae->SetLineWidth(2);
aa->Draw(“E”);
aa->SetLineColor(kBlue);
aa->SetLineWidth(2);
}
But I also want to draw ratio plots also. (data/madgraph & data/sherpa)
Can you please extend this code & tell me how to draw ratio.
Thanks in advance…
sherpa_zeejets.root (10.9 KB)
madgraph_zeejets.root (10.9 KB)
jet1eta_data.root (14.9 KB)