11 p->SetRightMargin(0.01);
12 p->SetLeftMargin(0.12);
14 if (top) p->SetBottomMargin(0.001);
15 else p->SetBottomMargin(0.2);
16 if (top) p->SetTopMargin(0.02);
17 else p->SetTopMargin(0.0001);
20 THStack* s =
static_cast<THStack*
>(dir->Get(name));
23 TAxis* ya = s->GetHistogram()->GetYaxis();
24 ya->SetLabelSize(1/sc*ya->GetLabelSize());
25 ya->SetTitleSize(1/sc*ya->GetTitleSize());
26 ya->SetTitleOffset(sc*(ya->GetTitleOffset()+.5));
29 TAxis* xa = s->GetHistogram()->GetXaxis();
30 xa->SetLabelSize(!top ? 1/yr*xa->GetLabelSize() : 0);
31 xa->SetTitleSize(!top ? 1/yr*xa->GetTitleSize() : 0);
32 xa->SetTitleOffset(yr*(xa->GetTitleOffset()+2));
46 gStyle->SetOptTitle(0);
52 TCanvas*
c =
new TCanvas(
"c",
"c", 1000,1000);
53 TPad* p1 =
new TPad(
"p1",
"p1",0,0,1,yr);
54 TPad* p2 =
new TPad(
"p2",
"p2",0,yr,1,1);
58 gDirectory->cd(
"Forward");
59 THStack* r =
DrawOne(p1, yr,
false, gDirectory,
"ratios");
60 THStack* e =
DrawOne(p2, yr,
true, gDirectory,
"empirical");
64 r->GetXaxis()->SetTitle(
"#it{#eta}");
65 r->GetYaxis()->SetTitle(
"Ratio to mean");
67 e->GetYaxis()->SetTitle(
"#it{E_{c}}(#it{#eta})");
68 TIter nextE(e->GetHists());
69 TIter nextR(r->GetHists());
71 Color_t cols[] = { kRed+2, kGreen+2, kBlue+2, kMagenta+2, 0 };
73 Style_t stys[] = { 20, 21, 22, 23 };
76 hist =
static_cast<TH1*
>(nextE());
77 hist->SetMarkerColor(*ptr);
78 hist->SetMarkerSize(2);
79 hist->SetMarkerStyle(*sty);
80 hist =
static_cast<TH1*
>(nextR());
81 hist->SetMarkerColor(*ptr);
82 hist->SetMarkerSize(2);
83 hist->SetMarkerStyle(*sty);
89 TLegend* l = p2->BuildLegend(0.35, .2, .65, .8);
97 c->Print(
"empirical.png");
void DrawEmpirical(const char *filename="Empirical.root", Bool_t fmd=true)
THStack * DrawOne(TVirtualPad *p, Double_t yr, Bool_t top, TDirectory *dir, const char *name)
TFile * file
TList with histograms for a given trigger.