6 if (tit!=
"") g->GetHistogram()->SetTitle(tit);
7 g->GetHistogram()->SetMinimum(0);
9 g->SetMarkerColor(
col);
10 g->SetMarkerStyle(marker);
11 g->SetMarkerSize(1.5);
14 TF1 *
f1 = (TF1*)g->GetListOfFunctions()->At(0);
18 f1->SetLineColor(
col);
22 for (
int i=0;
i<g->GetN();++
i)
26 g->SetPoint(
i,x+shift,y);
38 if (tit==
"") tit=g->GetTitle();
40 double ymax = TMath::MaxElement(g->GetN(), g->GetY());
41 double dymax = g->GetErrorY(TMath::LocMax(g->GetN(), g->GetEY()));
45 xmin = TMath::MinElement(g->GetN(), g->GetX());
46 xmax = TMath::MaxElement(g->GetN(), g->GetX());
50 h->GetXaxis()->SetLabelSize(0.05);
51 h->GetXaxis()->SetTitleSize(0.05);
52 h->GetYaxis()->SetLabelSize(0.05);
53 h->GetYaxis()->SetTitleSize(0.05);
54 h->GetYaxis()->SetTitleOffset(1.4);
56 if (yymax==0) h->SetMaximum((ymax+dymax)*1.05);
57 else h->SetMaximum(yymax);
69 gStyle->SetOptStat(0);
72 TFile *
f=
new TFile(fname);
74 TString plotnam[4]={
"Jee_A",
"Jee_B",
"Jmm_A",
"Jmm_B"};
75 TString lab[4] = {
"signal efficiency;EMC missing (#phi) [%];signal efficiency [%]",
"background efficiency;EMC missing (#phi) [%];background efficiency [%]",
"signal to noise;EMC missing (#phi) [%];S/B",
"significance;EMC missing (#phi) [%];significance [#sigma]"};
77 TGraphErrors *geffs[4];
78 TGraphErrors *geffb[4];
79 TGraphErrors *gston[4];
80 TGraphErrors *gsign[4];
82 TCanvas *
c1=
new TCanvas(
"c1",
"c1",10,10,1300,1000);
83 c1->Divide(2,2,0.0001,0.0001);
85 int colors[4] = {kBlue,kCyan-2,2,kRed-7};
88 double hmaxy[4] = {14., 3e-4, 2.5, 6.};
91 for (
int i=imin;
i<imax;++
i)
94 geffs[
i]=(TGraphErrors*)f->Get(Form(
"effs_%s",plotnam[
i].Data()));
97 if (i==imin) h[0]->Draw();
98 geffs[
i]->Draw(
"P same");
100 c1->cd(2); gPad->SetLogy();
101 geffb[
i]=(TGraphErrors*)f->Get(Form(
"effb_%s",plotnam[i].Data()));
102 confgraph(geffb[i],
"",colors[i],20+(i%2)*3,i);
104 h[1]->SetMinimum(0.5e-8);
105 h[1]->SetMaximum(0.0002);
106 if (i==imin) h[1]->Draw();
107 geffb[
i]->Draw(
"P same");
110 gston[
i]=(TGraphErrors*)f->Get(Form(
"sn_%s",plotnam[i].Data()));
111 confgraph(gston[i],
"",colors[i],20+(i%2)*3,i);
113 if (i==imin) h[2]->Draw();
114 gston[
i]->Draw(
"P same");
117 gsign[
i]=(TGraphErrors*)f->Get(Form(
"sign_%s",plotnam[i].Data()));
118 confgraph(gsign[i],
"",colors[i],20+(i%2)*3,i);
120 if (i==imin) h[3]->Draw();
121 gsign[
i]->Draw(
"P same");
125 TLegend *leg1=
new TLegend(0.16,0.18,0.6,0.38);
126 leg1->AddEntry(geffs[0],
"J/#psi(ee) - Setup A",
"lep");
127 leg1->AddEntry(geffs[1],
"J/#psi(ee) - Setup B",
"lep");
128 leg1->AddEntry(geffs[2],
"J/#psi(#mu#mu) - Setup A",
"lep");
129 leg1->AddEntry(geffs[3],
"J/#psi(#mu#mu) - Setup B",
"lep");
133 TLegend *leg2=
new TLegend(0.16,0.48,0.6,0.68);
134 leg2->AddEntry(geffb[0],
"J/#psi(ee) - Setup A",
"lep");
135 leg2->AddEntry(geffb[1],
"J/#psi(ee) - Setup B",
"lep");
136 leg2->AddEntry(geffb[2],
"J/#psi(#mu#mu) - Setup A",
"lep");
137 leg2->AddEntry(geffb[3],
"J/#psi(#mu#mu) - Setup B",
"lep");
141 TLegend *leg3=
new TLegend(0.5,0.72,0.94,0.92);
142 leg3->AddEntry(gston[0],
"J/#psi(ee) - Setup A",
"lep");
143 leg3->AddEntry(gston[1],
"J/#psi(ee) - Setup B",
"lep");
144 leg3->AddEntry(gston[2],
"J/#psi(#mu#mu) - Setup A",
"lep");
145 leg3->AddEntry(gston[3],
"J/#psi(#mu#mu) - Setup B",
"lep");
149 TLegend *leg4=
new TLegend(0.16,0.18,0.6,0.38);
150 leg4->AddEntry(gsign[0],
"J/#psi(ee) - Setup A",
"lep");
151 leg4->AddEntry(gsign[1],
"J/#psi(ee) - Setup B",
"lep");
152 leg4->AddEntry(gsign[2],
"J/#psi(#mu#mu) - Setup A",
"lep");
153 leg4->AddEntry(gsign[3],
"J/#psi(#mu#mu) - Setup B",
"lep");
157 c1->SaveAs(
"fig/comb_J_slc.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)
void combinePlotsJ_slc(TString fname="anaJ_slc.root")