// ----------------------------------------------------------------------------- // ----- pl_over_MCReco.C ----- // ----- ----- // ----- created by C. Simon on 2018-10-10 ----- // ----- ----- // ----------------------------------------------------------------------------- void pl_over_MCReco() { gStyle->SetPalette(1); gStyle->SetOptStat(kTRUE); gStyle->SetOptFit(kTRUE); gROOT->cd(); gROOT->SetDirLevel(1); TH1* h1(NULL); TH2* h2(NULL); TEfficiency* heff(NULL); TF1* f1(NULL); TString hname; TCanvas* can = new TCanvas("can", "MC track reconstruction overview", 0, 0, 1000, 533); can->Divide(4, 2); can->cd(1); hname = "hAccRefTrackShare"; heff = dynamic_cast(gROOT->FindObjectAny(hname)); if(heff) { heff->Draw("AP"); gPad->Update(); heff->GetPaintedGraph()->GetXaxis()->SetLimits(heff->GetTotalHistogram()->GetXaxis()->GetXmin(), heff->GetTotalHistogram()->GetXaxis()->GetXmax()); heff->GetPaintedGraph()->GetYaxis()->SetRangeUser(0., 1.1); gPad->Modified(); } else { cout << hname << " not found" << endl; } can->cd(2); hname = "hRecRefTrackEfficiency"; heff = dynamic_cast(gROOT->FindObjectAny(hname)); if(heff) { heff->Draw("AP"); gPad->Update(); heff->GetPaintedGraph()->GetXaxis()->SetLimits(heff->GetTotalHistogram()->GetXaxis()->GetXmin(), heff->GetTotalHistogram()->GetXaxis()->GetXmax()); heff->GetPaintedGraph()->GetYaxis()->SetRangeUser(0., 1.1); gPad->Modified(); } else { cout << hname << " not found" << endl; } can->cd(3); hname = "hRecRefTrackGhostShare"; heff = dynamic_cast(gROOT->FindObjectAny(hname)); if(heff) { heff->Draw("AP"); gPad->Update(); heff->GetPaintedGraph()->GetXaxis()->SetLimits(heff->GetTotalHistogram()->GetXaxis()->GetXmin(), heff->GetTotalHistogram()->GetXaxis()->GetXmax()); heff->GetPaintedGraph()->GetYaxis()->SetRangeUser(0., 1.1); gPad->Modified(); } else { cout << hname << " not found" << endl; } can->cd(4); hname = "hRecRefTrackCloneShare"; heff = dynamic_cast(gROOT->FindObjectAny(hname)); if(heff) { heff->Draw("AP"); gPad->Update(); heff->GetPaintedGraph()->GetXaxis()->SetLimits(heff->GetTotalHistogram()->GetXaxis()->GetXmin(), heff->GetTotalHistogram()->GetXaxis()->GetXmax()); heff->GetPaintedGraph()->GetYaxis()->SetRangeUser(0., 1.1); gPad->Modified(); } else { cout << hname << " not found" << endl; } can->cd(6); hname = "hRecRndmTrackEfficiency"; heff = dynamic_cast(gROOT->FindObjectAny(hname)); if(heff) { heff->Draw("AP"); gPad->Update(); heff->GetPaintedGraph()->GetXaxis()->SetLimits(heff->GetTotalHistogram()->GetXaxis()->GetXmin(), heff->GetTotalHistogram()->GetXaxis()->GetXmax()); heff->GetPaintedGraph()->GetYaxis()->SetRangeUser(0., 1.1); gPad->Modified(); } else { cout << hname << " not found" << endl; } can->cd(7); hname = "hRecRndmTrackGhostShare"; heff = dynamic_cast(gROOT->FindObjectAny(hname)); if(heff) { heff->Draw("AP"); gPad->Update(); heff->GetPaintedGraph()->GetXaxis()->SetLimits(heff->GetTotalHistogram()->GetXaxis()->GetXmin(), heff->GetTotalHistogram()->GetXaxis()->GetXmax()); heff->GetPaintedGraph()->GetYaxis()->SetRangeUser(0., 1.1); gPad->Modified(); } else { cout << hname << " not found" << endl; } can->cd(8); hname = "hRecRndmTrackCloneShare"; heff = dynamic_cast(gROOT->FindObjectAny(hname)); if(heff) { heff->Draw("AP"); gPad->Update(); heff->GetPaintedGraph()->GetXaxis()->SetLimits(heff->GetTotalHistogram()->GetXaxis()->GetXmin(), heff->GetTotalHistogram()->GetXaxis()->GetXmax()); heff->GetPaintedGraph()->GetYaxis()->SetRangeUser(0., 1.1); gPad->Modified(); } else { cout << hname << " not found" << endl; } can->SaveAs("pl_over_MCReco.pdf"); }