AliPhysics  5eaf189 (5eaf189)
DrawATLAS.C
Go to the documentation of this file.
1 //====================================================================
2 TCanvas* MakeCanvas(const char* name, const char* title,
3  const char* img=0, Double_t r=0)
4 {
5  TImage* dimg = 0;
6  if (img) {
7  const char* full = Form("$ALICE_PHYSICS/PWGLF/FORWARD/analysis2/dndeta/%s",
8  img);
9  TImage* dimg = TImage::Open(gSystem->ExpandPathName(full));
10  if (!dimg) {
11  Error("Failed to open image file: %s", img);
12  return 0;
13  }
14  }
15  UInt_t w = (dimg ? dimg->GetWidth() : 1000);
16  UInt_t h = (dimg ? dimg->GetHeight() : 900);
17  Printf("Canvas size: (%dx%d)", w, h);
18  TCanvas* c = new TCanvas(name, title, w, h);
19  c->SetTopMargin(0.01);
20  c->SetRightMargin(0.01);
21 
22  if (dimg) {
23  c->SetTopMargin(0);
24  c->SetRightMargin(0);
25  c->SetLeftMargin(0);
26  c->SetRightMargin(0);
27  c->cd();
28  // dimg->Scale(c->GetWw(), c->GetWh());
29  dimg->Draw("x");
30  // dimg->SetDrawOption("X");
31 
32  TPad* p = new TPad("overlay", "Overlay", 0, 0, 1, 1, 0, 0, 0);
33  p->SetFillStyle(0);
34  p->SetFillColor(0);
35  p->SetLineColor(0);
36  p->SetTopMargin(0.01);
37  p->SetRightMargin(0.01);
38  p->SetNumber(10);
39  c->cd();
40  p->Draw();
41 
42  c->Modified();
43  c->Update();
44  c->cd();
45  return c;
46  }
47 
48  if (r < 1e-3) return c;
49 
50  c->Divide(1,2,0,0);
51  TVirtualPad* p = c->cd(1);
52  p->SetPad(0, r , 1, 1);
53  p->SetBottomMargin(0.001);
54  p->SetTopMargin(0.01);
55  p->SetRightMargin(0.01);
56  p->Modified();
57  p->Update();
58  p->cd();
59 
60  p = c->cd(2);
61  p->SetPad(0, 0, 1, r);
62  Double_t yp = r / (1-r);
63  p->SetRightMargin(0.01);
64  p->SetBottomMargin(p->GetBottomMargin()/yp);
65  p->Modified();
66  p->Update();
67  p->cd();
68 
69  c->Modified();
70  c->Update();
71  c->cd();
72 
73  return c;
74 }
75 
76 //====================================================================
77 TPair* GetUs(TLegend*& dl, Bool_t sumLast=false)
78 {
79  if (!dl){
80  dl = new TLegend(.12, .65, .35, .93);
81  dl->SetTextAlign(32);
82  dl->SetNColumns(1);
83  dl->SetFillColor(0);
84  dl->SetFillStyle(0);
85  dl->SetBorderSize(0);
86  }
87  e = dl->AddEntry("dummy", "PWGLF/GEO", "p");
88  e->SetMarkerStyle(20);
89  e->SetMarkerSize(1.5);
90  e = dl->AddEntry("dummy", "PWGPP/GLOB", "p");
91  e->SetMarkerStyle(21);
92  e->SetMarkerSize(1.5);
93 
94  TObjArray unique;
95  const char* trigs[] = { "CENTV0A", 0 };
96  const char* exps[] = { "ALICE", "WIP", 0 };
97  TPair* pair = Drawer::GetDataOther(dl, unique, "pPb", 5023, trigs,
98  exps, "e2", true);
99  if (!pair || !pair->Key()) {
100  Error("", "Didn't get the results");
101  return;
102  }
103  THStack* data = static_cast<THStack*>(pair->Key());
104  TMultiGraph* other = static_cast<TMultiGraph*>(pair->Value());
105  TString tit = Form("pPb %s %s", data->GetTitle(), trigs[0]);
106  other->GetListOfGraphs()->Sort();
107  Drawer::AddSystematics(data, 0.076);
108  data->SetTitle(tit);
109 
110  if (!sumLast) return pair;
111 
112  TList* hl = data->GetHists();
113  TList* ol = other->GetListOfGraphs();
114  TH1* h6080 = static_cast<TH1*>(hl->At(hl->GetEntries()-1));
115  TH1* h8099 = static_cast<TH1*>(hl->At(hl->GetEntries()-2));
116  TGraphErrors* o6080 = static_cast<TGraphErrors*>(ol->At(ol->GetEntries()-1));
117  TGraphErrors* o8099 = static_cast<TGraphErrors*>(ol->At(ol->GetEntries()-2));
118 
119  hl->Remove(h6080);
120  hl->Remove(h8099);
121  ol->Remove(o6080);
122  ol->Remove(o8099);
123  TH1* h6099 = Average("h6099", "(*) 60%-90%", h6080, .25, h8099, .75);
124  TGraphErrors* o6099 = Average("o6099", "60%-90%", o6080, .25, o8099, .75);
125  hl->Add(h6099);
126  ol->Add(o6099);
127 
128  TList* el = dl->GetListOfPrimitives();
129  el->Remove(el->Last());
130  el->Remove(el->Last());
131  dl->AddEntry(h6099, h6099->GetTitle(), "pl");
132 
133  return pair;
134 }
135 
136 void DrawUs(TPair* pair, TLegend* dl, Double_t max=105)
137 {
138  THStack* data = static_cast<THStack*>(pair->Key());
139  TMultiGraph* other = static_cast<TMultiGraph*>(pair->Value());
140 
141  data->Draw("nostack");
142  data->GetHistogram()->SetXTitle("#it{#eta}");
143  data->GetHistogram()->GetYaxis()->SetTitleOffset(1.1);
144  data->GetHistogram()->SetYTitle("1/#it{N} d#it{N}_{ch}/d#it{#eta}");
145  if (other) other->Draw("p");
146  dl->Draw();
147 
148  data->SetMaximum(max);
149 
150  return pair;
151 }
152 
153 
154 //====================================================================
155 void
156 DrawOrigATLAS(Bool_t overlay=false)
157 {
158  TCanvas* c = MakeCanvas("orig", "ATLAS & ALICE",
159  (overlay ? "ATLAS_pPb_dndeta.png" : 0));
160 
161  TVirtualPad* p = (overlay ? c->GetPad(10) : c);
162  if (!overlay)
163  p->SetLeftMargin(0.15);
164  else {
165  c->SetTopMargin(0.2);
166  p->SetLeftMargin(0.117);
167  p->SetRightMargin(0.016);
168  p->SetTopMargin(0.01);
169  p->SetBottomMargin(0.115);
170 
171  }
172  p->cd();
173 
174  TLegend* dl = 0;
175  TPair* pair = GetUs(dl);
176  DrawUs(pair, dl, overlay ? 79.5 : 105);
177 
178  // al->AddEntry("dummy","(read-off arXiv/1403.5738v1)", "");
179  TLegend* al = new TLegend(.79, .65, .97, .93);
180  al->SetTextAlign(32);
181  al->SetNColumns(1);
182  al->SetFillColor(0);
183  al->SetFillStyle(0);
184  al->SetBorderSize(0);
185  e = al->AddEntry("dummy", "ATLAS", "p");
186  e->SetMarkerStyle(22);
187  e->SetMarkerSize(1.5);
188 
189  TLatex* ltx = new TLatex(.97, .64, "(read off arXiv/1403.5738v1)");
190  ltx->SetTextAlign(33);
191  ltx->SetTextColor(kGray+2);
192  ltx->SetNDC();
193  ltx->SetTextSize(0.015);
194  ltx->Draw();
195 
196  TMultiGraph* mg = ATLASpPb(false, al);
197  mg->Draw("p");
198  al->Draw();
199 
200  if (overlay) {
201  THStack* s = static_cast<THStack*>(pair->Key());
202  // mg->GetHistogram()->SetMaximum(79);
203  s->GetHistogram()->SetMinimum(0);
204  s->GetHistogram()->GetXaxis()->SetRangeUser(-3,3);
205  TFrame* f =
206  static_cast<TFrame*>(p->GetListOfPrimitives()->FindObject("TFrame"));
207  if (!f) {
208  Warning("", "No frame");
209  }
210  else {
211  f->SetFillStyle(0);
212  }
213  p->Modified();
214  p->Update();
215  p->cd();
216  }
217 
218  if (!overlay) c->Print("plots/alice_atlas_v0a.pdf");
219  c->Print("plots/alice_atlas_v0a.png");
220  c->Print("plots/alice_atlas_v0a.C");
221 }
222 
223 //====================================================================
224 TMultiGraph* Ratio2Peripheral(TMultiGraph* mg, const char* func=0)
225 {
226  TGraph* perip = static_cast<TGraph*>(mg->GetListOfGraphs()->Last());
227  if (!perip) {
228  Error("", "No periphiral bin found!");
229  return;
230  }
231  TMultiGraph* rmg = new TMultiGraph;
232  rmg->SetName(mg->GetName());
233  rmg->SetTitle(mg->GetTitle());
234 
235  TGraph* g = 0;
236  TIter next(mg->GetListOfGraphs());
237  // TList funcs;
238  while ((g = static_cast<TGraph*>(next()))) {
239  if (g == perip) continue;
240  TGraph* r = Drawer::GOverG(g, perip, 0, 0, 0);
241  r->SetFillStyle(3002);
242  r->SetLineColor(g->GetMarkerColor());
243  rmg->Add(r, "p 1 z");
244  if (!func) continue;
245  TFitResultPtr fit = r->Fit(func, "Q0S+");
246  TF1* f = r->GetListOfFunctions()->FindObject(func)->Clone();
247  Printf("%s | %f | %f +/- %f | %f +/- %f | %f +/- %f | %p",
248  r->GetName(),
249  fit->Chi2()/fit->Ndf(),
250  fit->Parameter(0), fit->ParError(0),
251  fit->Parameter(1), fit->ParError(1),
252  fit->Parameter(2), fit->ParError(2), f);
253  rmg->GetListOfFunctions()->Add(f);
254  }
255  return rmg;
256 }
257 //____________________________________________________________________
258 THStack* Ratio2Peripheral(THStack* mg, const char* func=0, TList* l=0)
259 {
260  TH1* perip = static_cast<TH1*>(mg->GetHists()->Last());
261  if (!perip) {
262  Error("", "No periphiral bin found!");
263  return;
264  }
265  THStack* rmg = new THStack(mg->GetName(), mg->GetTitle());
266 
267  TH1* g = 0;
268  TIter next(mg->GetHists());
269  // TList funcs;
270  while ((g = static_cast<TH1*>(next()))) {
271  if (g == perip) continue;
272  TH1* r = static_cast<TH1*>(g->Clone());
273  r->SetDirectory(0);
274  r->Divide(perip);
275  r->SetFillStyle(3002);
276  r->SetLineColor(g->GetMarkerColor());
277  rmg->Add(r);
278  if (!func) continue;
279 
280  TFitResultPtr fit = r->Fit(func, "Q0S+");
281  TF1* f = r->GetListOfFunctions()->FindObject(func); // ->Clone();
282  Printf("%s | %f | %f +/- %f | %f +/- %f | %f +/- %f | %p",
283  r->GetName(),
284  fit->Chi2()/fit->Ndf(),
285  fit->Parameter(0), fit->ParError(0),
286  fit->Parameter(1), fit->ParError(1),
287  fit->Parameter(2), fit->ParError(2), f);
288  if (l) l->Add(f->Clone());
289  // rmg->GetListOfFunctions()->Add(f);
290  }
291  return rmg;
292 }
293 
294 //====================================================================
295 void DrawOrigATLASRatio(Bool_t overlay=false)
296 {
297  TCanvas* c = MakeCanvas("ratio", "ATLAS dN/deta|cp",
298  (overlay ? "ATLAS_pPb_dndeta_cp.png" : 0));
299  TVirtualPad* p = (overlay ? c->GetPad(10) : c);
300  if (!overlay)
301  p->SetLeftMargin(0.15);
302  else {
303  p->SetLeftMargin(0.123);
304  p->SetRightMargin(0.0175);
305  p->SetTopMargin(0.005);
306  p->SetBottomMargin(0.11);
307 
308  }
309  p->cd();
310  TLegend* al = new TLegend(.18, .65, .4, .93);
311  al->SetTextAlign(32);
312  al->SetNColumns(1);
313  al->SetFillColor(0);
314  al->SetFillStyle(0);
315  al->SetBorderSize(0);
316  e = al->AddEntry("dummy", "ATLAS", "p");
317  e->SetMarkerStyle(22);
318  e->SetMarkerSize(1.5);
319  al->GetListOfPrimitives()->Remove(al->GetListOfPrimitives()->Last());
320 
321  TMultiGraph* mg = ATLASpPb(false, al);
322  TMultiGraph* rmg = Ratio2Peripheral(mg, "pol2");
323  rmg->SetTitle(Form("%s pPb ratio to peripheral", mg->GetTitle()));
324  rmg->Draw("ap");
325  rmg->GetListOfFunctions()->Draw("same");
326 
327  const char* dndeta = "1/#it{N} d#it{N}_{ch}/d#it{#eta}";
328  rmg->GetHistogram()->GetXaxis()->SetTitle("#it{#eta}");
329  rmg->GetHistogram()->SetYTitle(Form("#frac{%s|_{#it{c}}}{%s|_{60%%-90%%}}",
330  dndeta, dndeta));
331  rmg->GetHistogram()->GetYaxis()->SetTitleOffset(1.4);
332 
333  al->GetListOfPrimitives()->Remove(al->GetListOfPrimitives()->Last());
334  al->Draw();
335 
336  TLatex* ltx = new TLatex(.97, .14, "(read off arXiv/1403.5738v1)");
337  ltx->SetTextAlign(33);
338  ltx->SetTextColor(kGray+2);
339  ltx->SetNDC();
340  ltx->SetTextSize(0.015);
341  ltx->Draw();
342 
343  if (overlay) {
344  rmg->GetHistogram()->SetMaximum(9.9);
345  rmg->GetHistogram()->SetMinimum(0);
346  TFrame* f =
347  static_cast<TFrame*>(p->GetListOfPrimitives()->FindObject("TFrame"));
348  if (!f) {
349  Warning("", "No frame");
350  }
351  else {
352  f->SetFillStyle(0);
353  }
354  p->Modified();
355  p->Update();
356  p->cd();
357  }
358  c->Modified();
359  c->Update();
360  c->cd();
361 
362 
363  if (!overlay) c->Print("plots/alice_atlas_cp_v0a.pdf");
364  c->Print("plots/alice_atlas_cp_v0a.png");
365  c->Print("plots/alice_atlas_cp_v0a.C");
366 }
367 
368 //====================================================================
369 void
370 Add2Ratio(TMultiGraph* mg, TH1* num, TGraphErrors* den)
371 {
372  TGraph* low = 0;
373  TGraph* upp = 0;
374  Drawer::ErrorGraphs(den, low, upp);
375 
376  TGraph* gnu = Drawer::H2G(num, 0, 1);
377 
378  TGraph* rat = Drawer::GOverG(gnu, den, low, upp);
379  rat->SetMarkerStyle(num->GetMarkerStyle());
380  rat->SetMarkerSize(num->GetMarkerSize());
381  mg->Add(rat);
382 }
383 //____________________________________________________________________
384 void
385 Add2Ratio(TMultiGraph* mg, TGraphErrors* num, TGraphErrors* den)
386 {
387  TGraph* low = 0;
388  TGraph* upp = 0;
389  Drawer::ErrorGraphs(den, low, upp);
390 
391  TGraph* rat = Drawer::GOverG(num, den, low, upp);
392  rat->SetMarkerStyle(num->GetMarkerStyle());
393  rat->SetMarkerSize(num->GetMarkerSize());
394  mg->Add(rat);
395 }
396 //____________________________________________________________________
397 void
398 Add2Ratio(TMultiGraph* mg, TGraphErrors* g, TList* hl, Int_t idx)
399 {
400  Add2Ratio(mg, static_cast<TH1*>(hl->At(idx)), g);
401 
402 }
403 //____________________________________________________________________
404 void
405 Add2Ratio(TMultiGraph* mg, TGraphErrors* g, TList* gl, const char* name)
406 {
407  Add2Ratio(mg, static_cast<TGraphErrors*>(gl->FindObject(name)),g);
408 }
409 
410 //____________________________________________________________________
412 {
413  Double_t yp = .3;
414  TCanvas* c = MakeCanvas("averaged", "ATLAS & ALICE (averaged)", 0, yp);
415  c->cd(1);
416 
417  TLegend* dl = new TLegend(.12, .6, .35, .93);
418  dl->SetTextAlign(32);
419  dl->SetNColumns(1);
420  dl->SetFillColor(0);
421  dl->SetFillStyle(0);
422  dl->SetBorderSize(0);
423  TLegendEntry* e = dl->AddEntry("dummy", "ATLAS (resummed)", "p");
424  e->SetMarkerStyle(22);
425  e->SetMarkerSize(1.7);
426 
427  TPair* pair = GetUs(dl, true);
428  THStack* data = static_cast<THStack*>(pair->Key());
429  TMultiGraph* other = static_cast<TMultiGraph*>(pair->Value());
430  DrawUs(pair, dl, 81);
431 
432  TMultiGraph* mg = ATLASpPbResum(false);
433  mg->Draw("p");
434  TIter nextG(mg->GetListOfGraphs());
435  TIter nextO(other->GetListOfGraphs());
436  TIter nextH(data->GetHists());
437  TGraphErrors* g = 0;
438  TGraphErrors* o = 0;
439  TH1* h = 0;
440  TMultiGraph* ratios = new TMultiGraph();
441 
442  while ((g = static_cast<TGraphErrors*>(nextG())) &&
443  (o = static_cast<TGraphErrors*>(nextO())) &&
444  (h = static_cast<TH1*>(nextH()))) {
445  g->SetMarkerColor(h->GetMarkerColor());
446  g->SetLineColor(h->GetLineColor());
447  Add2Ratio(ratios, h, g);
448  Add2Ratio(ratios, o, g);
449  Printf("%s %s %s", g->GetName(), o->GetName(), h->GetName());
450  }
451 
452  TLatex* ltx = new TLatex(.15, .6,
453  "#splitline{(ATLAS read off arXiv/1403.5738v1}"
454  "{Averaged w/centrality bin width)}");
455  ltx->SetTextAlign(13);
456  ltx->SetTextColor(kGray+2);
457  ltx->SetNDC();
458  ltx->SetTextSize(0.015);
459  ltx->Draw();
460 
461  ltx->DrawLatex(.15, .56,
462  "#splitline{(*) For ALICE: Weighted sum}"
463  "{of 60-80% and 80-100%}");
464  // l->Draw();
465  c->cd(2);
466  yp /= (1-yp);
467 
468  TGraphErrors* band = new TGraphErrors(2);
469  band->SetPoint(0,-3.95,1);
470  band->SetPoint(1,5.95,1);
471  band->SetPointError(0,0,.05);
472  band->SetPointError(1,0,.05);
473  band->SetFillColor(kYellow-10);
474  band->SetFillStyle(1001);
475  band->SetLineStyle(2);
476  ratios->GetListOfGraphs()->AddFirst(band, "3l");
477 
478  ratios->Draw("ap");
479  TAxis* yaxis = ratios->GetHistogram()->GetYaxis();
480  TAxis* xaxis = ratios->GetHistogram()->GetXaxis();
481  yaxis->SetTitle("ALICE/ATLAS");
482  yaxis->SetLabelSize(yaxis->GetLabelSize()/yp);
483  yaxis->SetTitleSize(yaxis->GetTitleSize()/yp);
484  yaxis->SetTitleOffset(yaxis->GetTitleOffset()*yp);
485  xaxis->SetTitle("#eta");
486  xaxis->Set(200, -4, 6);
487  xaxis->SetLabelSize(xaxis->GetLabelSize()/yp);
488  xaxis->SetTitleSize(xaxis->GetTitleSize()/yp);
489  band->Draw("same l");
490 
491  c->Modified();
492  c->Update();
493  c->cd();
494 
495  c->Print("plots/alice_watlas_v0a.pdf");
496  c->Print("plots/alice_watlas_v0a.C");
497  c->Print("plots/alice_watlas_v0a.png");
498 }
499 
500 //====================================================================
502 {
503  Double_t yp = .3;
504  TCanvas* c = MakeCanvas("ratioboth", "ATLAS & ALICE dN/deta|cp", 0, yp);
505  c->SetLeftMargin(0.15);
506  c->cd(1);
507 
508  TLegend* dl = new TLegend(.12, .6, .35, .93);
509  dl->SetTextAlign(32);
510  dl->SetNColumns(1);
511  dl->SetFillColor(0);
512  dl->SetFillStyle(0);
513  dl->SetBorderSize(0);
514  TLegendEntry* e = dl->AddEntry("dummy", "ATLAS (resummed)", "p");
515  e->SetMarkerStyle(22);
516  e->SetMarkerSize(1.7);
517  TPair* pair = GetUs(dl, true);
518  THStack* data = static_cast<THStack*>(pair->Key());
519  TMultiGraph* other = static_cast<TMultiGraph*>(pair->Value());
520  TList fdata;
521  THStack* rdata = Ratio2Peripheral(data, 0); // "pol1", &fdata);
522  TMultiGraph* rother = Ratio2Peripheral(other, 0); // "pol1");
523 
524  TMultiGraph* mg = ATLASpPbResum(false);
525  TMultiGraph* rmg = Ratio2Peripheral(mg, 0); // "pol2");
526  rmg->SetTitle(Form("%s pPb ratio to peripheral", mg->GetTitle()));
527 
528  rdata->Draw("nostack");
529  fdata.Draw("same");
530  rother->Draw("p");
531  rother->GetListOfFunctions()->Draw("same");
532  rmg->Draw("p");
533  dl->GetListOfPrimitives()->Remove(dl->GetListOfPrimitives()->Last());
534  dl->Draw();
535  rdata->SetMaximum(9.1);
536 
537  const char* dndeta = "1/#it{N} d#it{N}_{ch}/d#it{#eta}";
538  rdata->GetHistogram()->GetXaxis()->SetTitle("#it{#eta}");
539  rdata->GetHistogram()->SetYTitle(Form("#frac{%s|_{#it{c}}}"
540  "{%s|_{60%%-90%% (*)}}",
541  dndeta, dndeta));
542  rdata->GetHistogram()->GetYaxis()->SetTitleOffset(1.4);
543 
544  TLatex* ltx = new TLatex(.15, .6,
545  "#splitline{(ATLAS read off arXiv/1403.5738v1}"
546  "{Averaged w/centrality bin width)}");
547  ltx->SetTextAlign(13);
548  ltx->SetTextColor(kGray+2);
549  ltx->SetNDC();
550  ltx->SetTextSize(0.015);
551  ltx->Draw();
552 
553  ltx->DrawLatex(.15, .56,
554  "#splitline{(*) For ALICE: Weighted sum}"
555  "{of 60-80% and 80-100%}");
556 
557  TIter nextG(rmg->GetListOfGraphs());
558  TIter nextO(rother->GetListOfGraphs());
559  TIter nextH(rdata->GetHists());
560  TGraphErrors* g = 0;
561  TGraphErrors* o = 0;
562  TH1* h = 0;
563  TMultiGraph* ratios = new TMultiGraph();
564 
565  while ((g = static_cast<TGraphErrors*>(nextG())) &&
566  (o = static_cast<TGraphErrors*>(nextO())) &&
567  (h = static_cast<TH1*>(nextH()))) {
568  g->SetMarkerColor(h->GetMarkerColor());
569  g->SetLineColor(h->GetLineColor());
570  Add2Ratio(ratios, h, g);
571  Add2Ratio(ratios, o, g);
572  Printf("%s %s %s", g->GetName(), o->GetName(), h->GetName());
573  }
574 
575  c->cd(2);
576  yp /= (1-yp);
577 
578  TGraphErrors* band = new TGraphErrors(2);
579  band->SetPoint(0,-3.95,1);
580  band->SetPoint(1,5.95,1);
581  band->SetPointError(0,0,.05);
582  band->SetPointError(1,0,.05);
583  band->SetFillColor(kYellow-10);
584  band->SetFillStyle(1001);
585  band->SetLineStyle(2);
586  ratios->GetListOfGraphs()->AddFirst(band, "3l");
587 
588  ratios->Draw("ap");
589  TAxis* yaxis = ratios->GetHistogram()->GetYaxis();
590  TAxis* xaxis = ratios->GetHistogram()->GetXaxis();
591  yaxis->SetTitle("ALICE/ATLAS");
592  yaxis->SetLabelSize(yaxis->GetLabelSize()/yp);
593  yaxis->SetTitleSize(yaxis->GetTitleSize()/yp);
594  yaxis->SetTitleOffset(yaxis->GetTitleOffset()*yp);
595  xaxis->SetTitle("#eta");
596  xaxis->Set(200, -4, 6);
597  xaxis->SetLabelSize(xaxis->GetLabelSize()/yp);
598  xaxis->SetTitleSize(xaxis->GetTitleSize()/yp);
599  band->Draw("same l");
600 
601  c->Modified();
602  c->Update();
603  c->cd();
604 
605  c->Print("plots/alice_watlas_cp_v0a.pdf");
606  c->Print("plots/alice_watlas_cp_v0a.C");
607  c->Print("plots/alice_watlas_cp_v0a.png");
608 }
609 
610 //====================================================================
611 void
612 DrawATLAS(Bool_t overlay=false)
613 {
614  gROOT->SetMacroPath(Form("%s:%s", gROOT->GetMacroPath(),
615  "$ALICE_PHYSICS/PWGLF/FORWARD/analysis2/dndeta"));
616  gROOT->LoadMacro("Drawer.C+g");
617  gROOT->LoadMacro("ATLASpPb.C");
618 
619  DrawOrigATLAS(overlay);
620  DrawAvgATLAS();
621 
622  DrawOrigATLASRatio(overlay);
624 }
625 //====================================================================
626 //
627 // EOF
628 //
TMultiGraph * ATLASpPb(Bool_t draw=false, TLegend *l=0)
Definition: ATLASpPb.C:581
double Double_t
Definition: External.C:58
static TPair * GetDataOther(TLegend *leg, TObjArray &unique, const TString &system, UShort_t sNN, const char **trigs, const char **exps, Option_t *errOpt="e5", Bool_t rebinned=false, Bool_t empirical=true, const Double_t *effs=0)
Definition: Drawer.C:1781
const char * title
Definition: MakeQAPdf.C:27
TSystem * gSystem
TCanvas * c
Definition: TestFitELoss.C:172
TMultiGraph * ATLASpPbResum(Bool_t draw=false, TLegend *l=0)
Definition: ATLASpPb.C:689
void DrawOrigATLAS(Bool_t overlay=false)
Definition: DrawATLAS.C:156
TCanvas * MakeCanvas(const char *name, const char *title, const char *img=0, Double_t r=0)
Definition: DrawATLAS.C:2
static TGraphErrors * H2G(TH1 *h, Double_t xOff, Int_t sign=1)
Definition: Drawer.C:263
TPair * GetUs(TLegend *&dl, Bool_t sumLast=false)
Definition: DrawATLAS.C:77
void DrawUs(TPair *pair, TLegend *dl, Double_t max=105)
Definition: DrawATLAS.C:136
void DrawAvgATLASRatio()
Definition: DrawATLAS.C:501
int Int_t
Definition: External.C:63
static TGraph * GOverG(const TGraph *num, const TGraph *den, const TGraph *dlow, const TGraph *dup, Double_t dx=0)
Definition: Drawer.C:467
unsigned int UInt_t
Definition: External.C:33
void DrawOrigATLASRatio(Bool_t overlay=false)
Definition: DrawATLAS.C:295
static void ErrorGraphs(const TGraph *g, TGraph *&low, TGraph *&up)
Definition: Drawer.C:337
void DrawAvgATLAS()
Definition: DrawATLAS.C:411
void DrawATLAS(Bool_t overlay=false)
Definition: DrawATLAS.C:612
void Add2Ratio(TMultiGraph *mg, TH1 *num, TGraphErrors *den)
Definition: DrawATLAS.C:370
TGraphErrors * Average(const char *name, const char *title, TGraphErrors *g1, Double_t w1, TGraphErrors *g2, Double_t w2)
Definition: ATLASpPb.C:627
static void AddSystematics(THStack *stack, Double_t sys)
Definition: Drawer.C:1019
bool Bool_t
Definition: External.C:53
TMultiGraph * Ratio2Peripheral(TMultiGraph *mg, const char *func=0)
Definition: DrawATLAS.C:224
Definition: External.C:196