]>
Commit | Line | Data |
---|---|---|
08cff48a | 1 | { |
2 | gROOT->SetStyle("Plain"); | |
3 | gStyle->SetOptStat(0); | |
4 | gStyle->SetPalette(1); | |
5 | ||
6 | //open files and get lists | |
7 | TList *l; | |
8 | TFile f0("QAsym.proof.root"); | |
9 | l = (TList *)f0.Get("QAsymHists"); | |
10 | ||
11 | ||
12 | TH1F* fHpos; | |
13 | TH1F* fHpneg; | |
14 | ||
15 | fHpos= (TH1F*) l->FindObject("fRecQPtPosEta"); | |
16 | fHpos->SetLineWidth(2); | |
17 | ||
18 | fHneg= (TH1F*) l->FindObject("fRecQPtNegEta"); | |
19 | fHneg->SetLineColor(kRed); | |
20 | fHneg->SetLineWidth(2); | |
21 | ||
22 | TLegend *legp; | |
23 | legp= new TLegend(0.9,0.65,0.65,0.9); | |
24 | legp->SetFillColor(kWhite); | |
25 | ||
26 | TF1 *fun0, *fun1; | |
27 | fun0= new TF1("fun0","gaus",-5.0,5.0); | |
28 | fun1= new TF1("fun1","gaus",-5.0,5.0); | |
29 | fun0->SetLineColor(kBlack); | |
30 | fun1->SetLineColor(kRed); | |
31 | ||
32 | legp->AddEntry(fun0,"positive #eta","l"); | |
33 | legp->AddEntry(fun1,"negative #eta","l"); | |
34 | ||
35 | TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 480); | |
36 | dca->Divide(2,1); | |
37 | dca->cd(1); | |
38 | fHpos->DrawClone(""); | |
39 | fHpos->SetTitle(""); | |
40 | fHpos->SetYTitle(""); | |
41 | fHneg->DrawClone("same"); | |
42 | gPad->SetLogy(); | |
43 | legp->Draw(); | |
44 | dca->cd(2); | |
45 | fHpos->Divide(fHneg); | |
46 | fHpos->Draw(""); | |
47 | fHpos->SetLineColor(kBlue); | |
48 | fHpos->SetTitle("Yield_{positive #eta}/Yield_{negative #eta}"); | |
49 | fHpos->SetYTitle(""); | |
50 | ||
51 | ||
52 | } | |
53 | ||
54 | ||
55 | ||
56 | } |