]>
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[18]; | |
13 | ||
14 | for(Int_t sector=0;sector<18;sector++){ | |
15 | fHpos[sector]= (TH1F*) l->FindObject(Form("fRecEtaPtTpcSector%02d", sector)); | |
16 | } | |
17 | ||
18 | TH1F* fHposref =(TH1F*) l->FindObject("fEtaPt"); | |
19 | ||
20 | ||
21 | TLegend *legp; | |
22 | legp= new TLegend(0.9,0.65,0.65,0.9); | |
23 | legp->SetFillColor(kWhite); | |
24 | ||
25 | TF1 *fun0, *fun1; | |
26 | fun0= new TF1("fun0","gaus",-5.0,5.0); | |
27 | fun1= new TF1("fun1","gaus",-5.0,5.0); | |
28 | fun0->SetLineColor(kBlack); | |
29 | fun1->SetLineColor(kRed); | |
30 | ||
31 | legp->AddEntry(fun0,"positive","l"); | |
32 | legp->AddEntry(fun1,"negative","l"); | |
33 | ||
34 | ||
35 | ||
36 | for(Int_t i=0; i<18;i++){ | |
37 | fHpos[i]->SetLineColor(kRed); | |
38 | // fHpos[i]->SetLineWidth(2); | |
39 | } | |
40 | ||
41 | ||
42 | TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 1020, 820); | |
43 | dca->Divide(6,3); | |
44 | for(Int_t i=0; i<18;i++){ | |
45 | fHpos[i]->Divide(fHposref); | |
46 | dca->cd(i+1); | |
47 | ||
48 | fHpos[i]->Draw(); | |
49 | // fHpos[i]->GetXaxis()->SetRangeUser(-2,2); | |
50 | // fHpos[i]->SetMaximum(2000); | |
51 | // fHpos[i]->SetMinimum(1); | |
52 | fHpos[i]->SetMaximum(0.2); | |
53 | fHpos[i]->SetMinimum(-0.05); | |
54 | ||
55 | fHpos[i]->SetTitle(""); | |
56 | fHpos[i]->SetXTitle(Form("(#eta/p_{T})_{%d} / (#eta/p_{T})_{all} ",i)); | |
57 | //fHpos[i]->SetXTitle(Form("(#eta/p_{T})_{%d} ",i)); | |
58 | gPad->SetLeftMargin(0.20); | |
59 | gPad->SetBottomMargin(0.17); | |
60 | ||
61 | fHpos[i]->SetTitleOffset(1., "X"); | |
62 | fHpos[i]->SetTitleOffset(.8, "Y"); | |
63 | fHpos[i]->SetTitleSize(0.08, "X"); | |
64 | fHpos[i]->SetTitleSize(0.05, "Y"); | |
65 | fHpos[i]->SetLabelSize(0.1, "X"); | |
66 | fHpos[i]->SetLabelSize(0.1, "Y"); | |
67 | //fHpos[i]->GetXaxis()->SetNdivision(5); | |
68 | fHpos[i]->GetXaxis()->SetNdivisions(5); | |
69 | ||
70 | ||
71 | // gPad->SetLogy(); | |
72 | ||
73 | } | |
74 | ||
75 | ||
76 | ||
77 | } |