]> git.uio.no Git - u/mrichter/AliRoot.git/blob - prod/acrcaf/qa_pp/plot_macros/plotLadderPt.C
9a44c3ca49a3a8d910624fd0815b8f8cb78d3d1f
[u/mrichter/AliRoot.git] / prod / acrcaf / qa_pp / plot_macros / plotLadderPt.C
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[7];
13 TH1F* fHneg[7];
14
15 for(Int_t sector=0;sector<7;sector++){
16  fHpos[sector]=  (TH1F*) l->FindObject(Form("fRecPtPosLadder%d", sector));
17  fHneg[sector]=  (TH1F*) l->FindObject(Form("fRecPtNegLadder%d", sector));
18
19
20 TLegend *legp;
21 legp= new TLegend(0.9,0.65,0.65,0.9);
22 legp->SetFillColor(kWhite);
23
24 TF1 *fun0, *fun1;
25 fun0= new TF1("fun0","gaus",-5.0,5.0);
26 fun1= new TF1("fun1","gaus",-5.0,5.0);
27 fun0->SetLineColor(kBlack);
28 fun1->SetLineColor(kRed);
29
30 legp->AddEntry(fun0,"positive","l");
31 legp->AddEntry(fun1,"negative","l");
32
33
34
35 for(Int_t i=0; i<7;i++){
36   fHpos[i]->SetLineColor(kBlack);
37   fHpos[i]->SetLineWidth(2);
38   fHneg[i]->SetLineColor(kRed);
39   fHneg[i]->SetLineWidth(2);
40 }
41       
42
43 TCanvas * dca = new TCanvas("pt", "pt", 100, 100, 920, 720);
44 dca->Divide(3,3);
45 for(Int_t i=0; i<7;i++){
46   //fHpos[i]->Divide(fHpos[0]);
47   dca->cd(i+1);
48
49   fHpos[i]->Draw();
50  //  if(i!=1){
51 //     fHpos[i]->SetMaximum(fHpos[0]->GetMaximum()*2.5);
52 //     fHpos[i]->SetMinimum(fHpos[0]->GetMinimum()-1);
53 //   }
54   fHpos[i]->SetMaximum(1000000);
55   fHpos[i]->SetMinimum(0.1);
56   fHpos[i]->SetTitle("");
57   fHpos[i]->SetXTitle(Form("p_{T} case %2d",i));
58
59 //   gPad->SetLeftMargin(0.15);
60 //   gPad->SetBottomMargin(0.15);
61   fHneg[i]->Draw("same");
62   legp->Draw();
63 //   fHpos[i]->SetTitleOffset(1., "X");
64 //   fHpos[i]->SetTitleOffset(1., "Y");
65 //   fHpos[i]->SetTitleSize(0.08, "X");
66 //   fHpos[i]->SetTitleSize(0.05, "Y");
67 //   fHpos[i]->SetLabelSize(0.1, "X");
68 //   fHpos[i]->SetLabelSize(0.1, "Y");
69 //   //fHpos[i]->GetXaxis()->SetNdivision(5);
70 //   fHpos[i]->GetXaxis()->SetNdivisions(5);
71
72
73   gPad->SetLogy();
74
75 }
76   
77
78
79 }