%%cpp
{
// plot
TCanvas *c1 = new TCanvas(
TString("QA_Draw_Jet_Summary_") + TString(jet_family),
TString("QA_Draw_Jet_Summary_") + TString(jet_family), 950, 600);
c1->Divide(3, 2);
int idx = 1;
TPad *p;
// ------------------------------------
p = (TPad *) c1->cd(idx++);
c1->Update();
// p->SetLogz();
TH1 *h_frame =
p->DrawFrame(min_Et, -.1, max_Et, .1,
TString(jet_family) + " #phi Reconstruction;E_{T, Truth} (GeV);#phi_{Reco} - #phi_{Truth} (rad)");
// h_frame->GetYaxis()->SetTitleOffset(1.01);
TLine *l = new TLine(min_Et, 0, max_Et, 0);
l->Draw();
p->SetGridx(0);
p->SetGridy(0);
TLegend *legend = new TLegend(0.7, 0.2, .95, 0.5);
legend->SetFillColor(kWhite);
legend->SetFillStyle(1001);
legend->SetLineWidth(2);
legend->SetLineColor(kBlack);
legend->SetLineStyle(kSolid);
for (int i = 0; i < vec_radius.size(); ++i)
{
const float radius = vec_radius[i];
TGraphErrors *ge = vec_phi_res[i];
assert(ge);
ge = new TGraphErrors(*ge); // make a copy
ge->SetLineColor(i + 2); // automatic color scheme from ROOT
ge->SetMarkerColor(i + 2); // automatic color scheme from ROOT
for (int idata = 0; idata < ge->GetN(); ++idata)
{
(ge->GetX())[idata] += i * 0.5; // shift x a little bit
(ge->GetEX())[idata] = 0; // no x error bar
}
ge->Draw("p E l");
legend->AddEntry(ge, Form("r = %.1f", radius), "elp");
}
legend->Draw();
// ------------------------------------
p = (TPad *) c1->cd(idx++);
c1->Update();
// p->SetLogz();
h_frame =
p->DrawFrame(min_Et, -.1, max_Et, .1,
TString(jet_family) + " #eta Reconstruction;E_{T, Truth} (GeV);#eta_{Reco} - #eta_{Truth}");
// h_frame->GetYaxis()->SetTitleOffset(1.01);
l = new TLine(min_Et, 0, max_Et, 0);
l->Draw();
p->SetGridx(0);
p->SetGridy(0);
legend = new TLegend(0.7, 0.2, .95, 0.5);
legend->SetFillColor(kWhite);
legend->SetFillStyle(1001);
legend->SetLineWidth(2);
legend->SetLineColor(kBlack);
legend->SetLineStyle(kSolid);
for (int i = 0; i < vec_radius.size(); ++i)
{
const float radius = vec_radius[i];
TGraphErrors *ge = vec_eta_res[i];
assert(ge);
ge = new TGraphErrors(*ge); // make a copy
ge->SetLineColor(i + 2); // automatic color scheme from ROOT
ge->SetMarkerColor(i + 2); // automatic color scheme from ROOT
for (int idata = 0; idata < ge->GetN(); ++idata)
{
(ge->GetX())[idata] += i * 0.5; // shift x a little bit
(ge->GetEX())[idata] = 0; // no x error bar
}
ge->Draw("p E l");
legend->AddEntry(ge, Form("r = %.1f", radius), "elp");
}
legend->Draw();
// ------------------------------------
p = (TPad *) c1->cd(idx++);
c1->Update();
// p->SetLogz();
h_frame = p->DrawFrame(min_Et, 0, max_Et, 2,
TString(jet_family) + " Jet Energy Reconstruction;E_{Truth} (GeV);E_{Reco} / E_{Truth}");
// h_frame->GetYaxis()->SetTitleOffset(1.01);
l = new TLine(min_Et, 1, max_Et, 1);
l->Draw();
p->SetGridx(0);
p->SetGridy(0);
legend = new TLegend(0.7, 0.2, .95, 0.5);
legend->SetFillColor(kWhite);
legend->SetFillStyle(1001);
legend->SetLineWidth(2);
legend->SetLineColor(kBlack);
legend->SetLineStyle(kSolid);
for (int i = 0; i < vec_radius.size(); ++i)
{
const float radius = vec_radius[i];
TGraphErrors *ge = vec_e_res[i];
assert(ge);
ge = new TGraphErrors(*ge); // make a copy
ge->SetLineColor(i + 2); // automatic color scheme from ROOT
ge->SetMarkerColor(i + 2); // automatic color scheme from ROOT
for (int idata = 0; idata < ge->GetN(); ++idata)
{
(ge->GetX())[idata] += i * 0.5; // shift x a little bit
(ge->GetEX())[idata] = 0; // no x error bar
}
ge->Draw("p E l");
legend->AddEntry(ge, Form("r = %.1f", radius), "elp");
}
legend->Draw();
// ------------------------------------
p = (TPad *) c1->cd(idx++);
c1->Update();
// p->SetLogz();
h_frame =
p->DrawFrame(min_Et, 0, max_Et, 2,
TString(jet_family) + " Jet E_{T} Reconstruction;E_{T, Truth} (GeV);E_{T, Reco} / E_{T, Truth}");
// h_frame->GetYaxis()->SetTitleOffset(1.01);
l = new TLine(min_Et, 1, max_Et, 1);
l->Draw();
p->SetGridx(0);
p->SetGridy(0);
legend = new TLegend(0.7, 0.2, .95, 0.5);
legend->SetFillColor(kWhite);
legend->SetFillStyle(1001);
legend->SetLineWidth(2);
legend->SetLineColor(kBlack);
legend->SetLineStyle(kSolid);
for (int i = 0; i < vec_radius.size(); ++i)
{
const float radius = vec_radius[i];
TGraphErrors *ge = vec_et_res[i];
assert(ge);
ge = new TGraphErrors(*ge); // make a copy
ge->SetLineColor(i + 2); // automatic color scheme from ROOT
ge->SetMarkerColor(i + 2); // automatic color scheme from ROOT
for (int idata = 0; idata < ge->GetN(); ++idata)
{
(ge->GetX())[idata] += i * 0.5; // shift x a little bit
(ge->GetEX())[idata] = 0; // no x error bar
}
ge->Draw("p E l");
legend->AddEntry(ge, Form("r = %.1f", radius), "elp");
}
legend->Draw();
// ------------------------------------
p = (TPad *) c1->cd(idx++);
c1->Update();
// p->SetLogz();
h_frame = p->DrawFrame(min_Et, 0, max_Et, 1.2,
TString(jet_family) + " Reco Efficiency;E_{T, Truth} (GeV);Reco efficiency");
// h_frame->GetYaxis()->SetTitleOffset(1.01);
l = new TLine(min_Et, 1, max_Et, 1);
l->Draw();
p->SetGridx(0);
p->SetGridy(0);
legend = new TLegend(0.7, 0.2, .95, 0.5);
legend->SetFillColor(kWhite);
legend->SetFillStyle(1001);
legend->SetLineWidth(2);
legend->SetLineColor(kBlack);
legend->SetLineStyle(kSolid);
for (int i = 0; i < vec_radius.size(); ++i)
{
const float radius = vec_radius[i];
TGraphErrors *ge = vec_reco_eff[i];
assert(ge);
ge = new TGraphErrors(*ge); // make a copy
ge->SetLineColor(i + 2); // automatic color scheme from ROOT
ge->SetMarkerColor(i + 2); // automatic color scheme from ROOT
for (int idata = 0; idata < ge->GetN(); ++idata)
{
(ge->GetX())[idata] += i * 0.5; // shift x a little bit
(ge->GetEX())[idata] = 0; // no x error bar
}
ge->Draw("p E l");
legend->AddEntry(ge, Form("r = %.1f", radius), "elp");
}
legend->Draw();
// ------------------------------------
p = (TPad *) c1->cd(idx++);
c1->Update();
// p->SetLogz();
h_frame = p->DrawFrame(min_Et, 0, max_Et, 1.2,
TString(jet_family) + " Reconstruction Purity;E_{T, Reco} (GeV);Reconstruction Purity");
// h_frame->GetYaxis()->SetTitleOffset(1.01);
l = new TLine(min_Et, 1, max_Et, 1);
l->Draw();
p->SetGridx(0);
p->SetGridy(0);
legend = new TLegend(0.7, 0.2, .95, 0.5);
legend->SetFillColor(kWhite);
legend->SetFillStyle(1001);
legend->SetLineWidth(2);
legend->SetLineColor(kBlack);
legend->SetLineStyle(kSolid);
for (int i = 0; i < vec_radius.size(); ++i)
{
const float radius = vec_radius[i];
TGraphErrors *ge = vec_purity[i];
assert(ge);
ge = new TGraphErrors(*ge); // make a copy
ge->SetLineColor(i + 2); // automatic color scheme from ROOT
ge->SetMarkerColor(i + 2); // automatic color scheme from ROOT
for (int idata = 0; idata < ge->GetN(); ++idata)
{
(ge->GetX())[idata] += i * 0.5; // shift x a little bit
(ge->GetEX())[idata] = 0; // no x error bar
}
ge->Draw("p E l");
legend->AddEntry(ge, Form("r = %.1f", radius), "elp");
}
legend->Draw();
// PutInputFileName(c1, .03, qa_file_name_new, qa_file_name_ref);
c1->Draw();
//SaveCanvas(c1, TString(qa_file_name_new) + TString(c1->GetName()), true);
}