13 #include "TEventList.h"
14 #include "TDirectory.h"
18 #include "TPaletteAxis.h"
26 typedef std::map<double, TH1F*>
Hmap;
27 typedef std::map<double, TH1F*>::iterator
Hmapit;
31 int cnt[]= {0,0,0,0,0,0,0,0};
36 int modes[] = { 100, 101, 102, 103, 104,
37 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
39 130, 131, 132, 133, 134, 135, 136, 137, 138,
41 200, 201, 220, 221, 222, 223, 224, 240, 241,
42 400, 410, 420, 421, 422,
44 600, 601, 602, 620, 621, 622, 640, 641, 642, 660};
46 double BR[] = { 3.9, 13.9, 8.1, 2.0, 3.7,
47 2.4, 8.6, 5.0, 1.2, 2.3, 1.5, 5.3, 3.1, 0.76, 1.4,
49 2.6, 9.4, 5.5, 1.4, 2.5, 6.4, 4.1, 3.2, 1.4,
51 5.9, 5.9, 1.2, 1.7, 6e-5, 3.5, 1.9, 1.8, 1.7,
52 63.9, 51.4, 5.0, 3.4, 1.7,
54 100., 100., 100., 100., 100., 100., 100., 100., 100., 100.};
57 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
59 3, 3, 3, 3, 3, 3, 3, 3, 3,
61 5, 5, 5, 5, 5, 5, 5, 5, 5,
64 7, 7, 7, 7, 7, 7, 7, 7, 7, 7};
66 TString datatype[] = {
"D^{0}",
"D^{*0}",
"D^{#pm}",
"D^{*#pm}",
"D_{s}^{(*)#pm}",
"c#bar{c}",
"bayrons/#phi",
"e/#mu/#gamma"};
67 double range[] = { 2.5, 3.5, 3.0, 3.5, 3.5, 2.0, 2.0, 2.0 };
69 int cols[10] = {1,2,4,6,kOrange+5,9,kGreen+2, kBlue+3,kCyan-2,kMagenta+2};
77 g->SetMarkerStyle(
m%15+20);
79 g->SetMarkerSize(1.2);
81 g->SetLineColor(color);
82 g->SetMarkerColor(color);
105 TFile *
f =
new TFile(fname,
"READ");
108 TIter
next(f->GetListOfKeys());
110 TRegexp rsig(
"hsig[0-9][0-9][0-9]");
111 TRegexp rsigi(
"hsigi[0-9][0-9][0-9]");
112 TRegexp rbg(
"hbg[0-9][0-9][0-9]");
114 while ( (key = (TKey*)
next()) )
116 TObject *obj = key->ReadObj();
117 if (!obj->InheritsFrom(
"TH1F"))
continue;
120 TH1F*
h = (TH1F*) obj;
122 double en =
TString(
name(name.Length()-3,3)).Atof()/100.;
132 TCanvas *
c1 =
new TCanvas(
"c1",
"histos",10,10,1800,500);
137 TH1F *hs = it->second;
138 TH1F *hsi =
sigimap[it->first];
139 TH1F *hb =
bgmap[it->first];
141 c1->cd(i); hs->Draw(); hsi->Draw(
"same");
142 c1->cd(i+Nen); hb->Draw();
145 for (
int j=1;j<hs->GetNbinsX()+1;++j)
147 TString modestr = hs->GetXaxis()->GetBinLabel(j);
151 g.SetPoint(g.GetN(),it->first, hs->GetBinContent(j));
156 double eff = hs->GetBinContent(j);
159 g.SetPoint(g.GetN(),it->first, eff);
164 TCanvas *
c2=
new TCanvas(
"c2",
"sig eff",100,30,1600,800);
167 TH1F *hdisp =
new TH1F(
"hdisp",
"Signal Efficiencies",100,2.0,6.0);
168 hdisp->SetMaximum(100.);
170 hdisp->SetXTitle(
"E_{cm} [GeV]");
171 hdisp->SetYTitle(
"total effciency [%]");
178 gPad->SetTopMargin(0.1);
181 hdisp->SetTitle(
"Signal efficiency: "+
datatype[i]+
" modes");
182 hdisp->GetXaxis()->SetRangeUser(
range[i],6.0);
186 leg[
i]=
new TLegend(0.14,0.9-
cnt[i]*0.07,0.4,0.9);
187 leg[
i]->SetMargin(0.4);
191 leg[
i]=
new TLegend(0.14,0.12,0.9,0.45);
192 leg[
i]->SetNColumns(3);
193 leg[
i]->SetMargin(0.5);
200 geff[
i].Draw(
"PL same");
201 leg[
panel[
i]]->AddEntry(
geff[i].GetName(),
geff[i].GetName(),
"EPL");
206 leg[
i]->Draw(
"same");
210 TCanvas *
c3=
new TCanvas(
"c3",
"bg eff",150,40,700,500);
214 hdisp->SetMaximum(0.5);
215 hdisp->SetMinimum(0.0);
216 hdisp->SetTitle(
"Background level");
217 hdisp->SetYTitle(
"acc. background [%]");
221 l.SetLineColor(2);l.SetLineStyle(2);l.SetLineWidth(2);
222 l.DrawLine(2,0.1,6,0.1);
226 c2->SaveAs(
"effsig_graphs.gif");
227 c2->SaveAs(
"effsig_graphs.pdf");
229 c3->SaveAs(
"effbg_graphs.gif");
230 c3->SaveAs(
"effbg_graphs.pdf");
void config_graph(TGraph *g, int m=0, TString name="")
int evaltrig(TString fname="crosstag_histos.root", bool makeplots=0)
std::map< double, TH1F * > Hmap
std::map< int, int > codeidx
std::map< double, TH1F * >::iterator Hmapit