2 // This macro reads comparison files and makes plots.
5 void DrawComparison(const char *fileName = "match-comparison.root")
8 gROOT->SetStyle("Plain");
13 TFile *file = TFile::Open(fileName);
16 TH1D *hgood = (TH1D*)file->Get("hgood");
17 TH1D *hfake = (TH1D*)file->Get("hfake");
18 TH1D *htrue = (TH1D*)file->Get("htrue");
19 TH1D *hfound = (TH1D*)file->Get("hfound");
21 TH1D *hg = (TH1D*)hgood->Clone("hg");
22 TH1D *hf = (TH1D*)hfake->Clone("hf");
28 hg->SetMarkerStyle(21);
29 hf->SetMarkerStyle(25);
31 TCanvas *c = new TCanvas("c", "", 0, 0, 800, 600);
33 TLegend* leg = new TLegend(0.6,0.8,0.88,0.88);
34 leg->SetFillColor(10);
35 leg->AddEntry(hg,"Good/True","p");
36 leg->AddEntry(hf,"Fake/Found","p");
38 hg->SetXTitle("p_{T} (GeV/c)");
39 hg->SetYTitle("efficiency (%)");
40 hg->SetTitle("Track-EMCAL Cluster Matching");
41 hg->SetMaximum(120.0);