68 gStyle->SetOptStat(0);
71 TFile *
f=
new TFile(fname);
73 TString plotnam[4]={
"Jee_A",
"Jee_B",
"Jmm_A",
"Jmm_B"};
74 TString lab[4] = {
"signal efficiency;EMC missing (polar #theta) [%];signal efficiency [%]",
"background efficiency;EMC missing (polar #theta) [%];background efficiency [%]",
"signal to noise;EMC missing (polar #theta) [%];S/B",
"significance;EMC missing (polar #theta) [%];significance [#sigma]"};
76 TGraphErrors *geffs[4];
77 TGraphErrors *geffb[4];
78 TGraphErrors *gston[4];
79 TGraphErrors *gsign[4];
81 TCanvas *
c1=
new TCanvas(
"c1",
"c1",10,10,1300,1000);
82 c1->Divide(2,2,0.0001,0.0001);
84 int colors[4] = {kBlue,kCyan-2,2,kRed-7};
87 double hmaxy[4] = {14., 3e-4, 2.5, 6.};
90 for (
int i=imin;
i<imax;++
i)
93 geffs[
i]=(TGraphErrors*)f->Get(Form(
"effs_%s",plotnam[
i].Data()));
96 if (i==imin) h[0]->Draw();
97 geffs[
i]->Draw(
"P same");
99 c1->cd(2); gPad->SetLogy();
100 geffb[
i]=(TGraphErrors*)f->Get(Form(
"effb_%s",plotnam[i].Data()));
101 confgraph(geffb[i],
"",colors[i],20+(i%2)*3,i);
103 h[1]->SetMinimum(0.5e-8);
104 h[1]->SetMaximum(0.0002);
105 if (i==imin) h[1]->Draw();
106 geffb[
i]->Draw(
"P same");
109 gston[
i]=(TGraphErrors*)f->Get(Form(
"sn_%s",plotnam[i].Data()));
110 confgraph(gston[i],
"",colors[i],20+(i%2)*3,i);
112 if (i==imin) h[2]->Draw();
113 gston[
i]->Draw(
"P same");
116 gsign[
i]=(TGraphErrors*)f->Get(Form(
"sign_%s",plotnam[i].Data()));
117 confgraph(gsign[i],
"",colors[i],20+(i%2)*3,i);
119 if (i==imin) h[3]->Draw();
120 gsign[
i]->Draw(
"P same");
124 TLegend *leg1=
new TLegend(0.16,0.18,0.6,0.38);
125 leg1->AddEntry(geffs[0],
"J/#psi(ee) - Setup A",
"lep");
126 leg1->AddEntry(geffs[1],
"J/#psi(ee) - Setup B",
"lep");
127 leg1->AddEntry(geffs[2],
"J/#psi(#mu#mu) - Setup A",
"lep");
128 leg1->AddEntry(geffs[3],
"J/#psi(#mu#mu) - Setup B",
"lep");
132 TLegend *leg2=
new TLegend(0.16,0.48,0.6,0.68);
133 leg2->AddEntry(geffb[0],
"J/#psi(ee) - Setup A",
"lep");
134 leg2->AddEntry(geffb[1],
"J/#psi(ee) - Setup B",
"lep");
135 leg2->AddEntry(geffb[2],
"J/#psi(#mu#mu) - Setup A",
"lep");
136 leg2->AddEntry(geffb[3],
"J/#psi(#mu#mu) - Setup B",
"lep");
140 TLegend *leg3=
new TLegend(0.5,0.72,0.94,0.92);
141 leg3->AddEntry(gston[0],
"J/#psi(ee) - Setup A",
"lep");
142 leg3->AddEntry(gston[1],
"J/#psi(ee) - Setup B",
"lep");
143 leg3->AddEntry(gston[2],
"J/#psi(#mu#mu) - Setup A",
"lep");
144 leg3->AddEntry(gston[3],
"J/#psi(#mu#mu) - Setup B",
"lep");
148 TLegend *leg4=
new TLegend(0.16,0.18,0.6,0.38);
149 leg4->AddEntry(gsign[0],
"J/#psi(ee) - Setup A",
"lep");
150 leg4->AddEntry(gsign[1],
"J/#psi(ee) - Setup B",
"lep");
151 leg4->AddEntry(gsign[2],
"J/#psi(#mu#mu) - Setup A",
"lep");
152 leg4->AddEntry(gsign[3],
"J/#psi(#mu#mu) - Setup B",
"lep");
156 c1->SaveAs(
"fig/comb_J.gif");
TH1F * createHistoGraph(TGraph *g, TString tit="", double xmin=0, double xmax=0)
void confgraph(TGraph *g, TString tit, int col=1, int marker=20)