AliPhysics  cdeda5a (cdeda5a)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DrawEP.C
Go to the documentation of this file.
1 void
3 {
4  TFile *file = TFile::Open("AnalysisResults.root");
5  TList* l = static_cast<TList*>(gDirectory->Get("Forward"));
6  TList* ep = static_cast<TList*>(l->FindObject("fmdEventPlaneFinder"));
7  ep->ls();
8 
9  gStyle->SetOptTitle(0);
10  gStyle->SetOptStat(0);
11 
12  TCanvas* c = new TCanvas("epFMD", "From FMD", 1000,1000);
13  c->SetTopMargin(0.01);
14  c->SetRightMargin(0.01);
15  c->Divide(1,2);
16 
17  TVirtualPad* p = c->cd(1);
18  p->Divide(2,1);
19 
20  TVirtualPad* q = p->cd(1);
21  q->SetTopMargin(0.01);
22  q->SetRightMargin(0.01);
23 
24  THStack* epS = new THStack("psiR", "From FMD");
25  TH1* epAll = 0;
26  TH1* epA = 0;
27  TH1* epC = 0;
28  epS->Add(epAll = static_cast<TH1*>(ep->FindObject("epFMD")));
29  epS->Add(epA = static_cast<TH1*>(ep->FindObject("epFMDA")));
30  epS->Add(epC = static_cast<TH1*>(ep->FindObject("epFMDC")));
31  epAll->SetMarkerStyle(20);
32  epAll->SetMarkerColor(epAll->GetLineColor());
33  epA->SetMarkerStyle(21);
34  epA->SetMarkerColor(epA->GetLineColor());
35  epC->SetMarkerStyle(22);
36  epC->SetMarkerColor(epC->GetLineColor());
37  epS->Draw("nostack");
38  epS->GetHistogram()->SetXTitle("#Psi_{R} [radians]");
39 
40  TLegend* leg = new TLegend(0.11, 0.11, .98, .4);
41  leg->SetFillColor(0);
42  leg->SetFillStyle(0);
43  leg->SetBorderSize(0);
44  leg->SetNColumns(3);
45  leg->AddEntry(epAll, "Full FMD", "p");
46  leg->AddEntry(epA, "A-side (#eta>0)", "p");
47  leg->AddEntry(epC, "C-side (#eta<0)", "p");
48  leg->Draw();
49 
50  q = p->cd(2);
51  q->SetTopMargin(0.01);
52  q->SetRightMargin(0.01);
53  q->SetLogy();
54 
55  THStack* diff = new THStack("diff", "Different to others");
56  TH1* dSelf = 0;
57  TH1* dTPC = 0;
58  TH1* dVZERO = 0;
59  diff->Add(dSelf = static_cast<TH1*>(ep->FindObject("diffFMDAC")));
60  diff->Add(dVZERO = static_cast<TH1*>(ep->FindObject("diffFMDVZERO")));
61  diff->Add(dTPC = static_cast<TH1*>(ep->FindObject("diffFMDTPC")));
62  dSelf->SetMarkerStyle(20);
63  dSelf->SetMarkerColor(dSelf->GetLineColor());
64  dTPC->SetMarkerStyle(21);
65  dTPC->SetMarkerColor(dTPC->GetLineColor());
66  dVZERO->SetMarkerStyle(22);
67  dVZERO->SetMarkerColor(dVZERO->GetLineColor());
68  diff->Draw("nostack hist");
69  diff->GetHistogram()->SetXTitle("#delta#Psi_{R} [radians]");
70 
71  leg = new TLegend(0.6, 0.6, .98, .98);
72  leg->SetFillColor(0);
73  leg->SetFillStyle(0);
74  leg->SetBorderSize(0);
75  // leg->SetNColumns(3);
76  leg->AddEntry(epAll, "#Psi_{R,A}-#Psi_{R,C}", "p");
77  leg->AddEntry(epA, "#Psi_{R,FMD}-#Psi_{R,TPC}", "p");
78  leg->AddEntry(epC, "#Psi_{R,FMD}-#Psi_{R,VZERO}", "p");
79  leg->Draw();
80 
81  p = c->cd(2);
82  p->Divide(3,1);
83 
84  q = p->cd(1); q->SetTopMargin(0); q->SetRightMargin(0.13);
85  ep->FindObject("corrFMDAC")->Draw("colz");
86 
87  q = p->cd(2); q->SetTopMargin(0); q->SetRightMargin(0.13);
88  ep->FindObject("corrFMDTPC")->Draw("colz");
89 
90  q = p->cd(3); q->SetTopMargin(0); q->SetRightMargin(0.13);
91  ep->FindObject("corrFMDVZERO")->Draw("colz");
92 
93  c->Print("ep_from_fmd.png");
94 }
95 
void DrawEP()
Definition: DrawEP.C:2
TCanvas * c
Definition: TestFitELoss.C:172
TFile * file
Definition: External.C:196