2 //Analysis of the output of AliTPCtaskPID.
3 //3 6D histograms - THnSparse created in the task:
5 //TPC normalized dEdx (dEdx_rec/dNdx_mc)
6 //TPC PID probabilities
8 //The values are binned in following variables:
9 // Some of them are correlated - but THnSpase handle it
10 // ~ 14 MBy per object needed
16 .L $ALICE_ROOT/PWG1/Macros/tpcQA.C+
20 // 1 - number of clusters
21 // 2 - number of findable clusters
22 // 3 - number of clusters/ findable clusters
23 // 4 - pt - at the entrance of the TPC
24 // 5 - eta - at the entrance of the TPC
25 // 6 - phi - at the entrance of the TPC
26 GetProjection(fTPCqa,0,4, 0,10, -1,1, -3.14,3.14) ->ProfileX()->Draw();
33 #include "THnSparse.h"
44 Int_t kmicolors[10]={1,2,3,4,6,7,8,9,10,11};
45 Int_t kmimarkers[10]={21,22,23,24,25,26,27,28,29,30};
49 THnSparse * fTPCqa = 0;
54 TFile *f = new TFile("OutputQA.root");
55 TObjArray *array= (TObjArray*)f->Get("tpcTaskQA");
57 new TCanvas("dEdx study");
58 fTPCqa = (THnSparse*)array->At(0);
62 TH2F* GetProjection(THnSparse*his, Int_t i0, Int_t i1, Float_t p0, Float_t p1, Float_t eta0, Float_t eta1, Float_t phi0, Float_t phi1){
64 his->GetAxis(4)->SetRangeUser(p0,p1);
65 his->GetAxis(5)->SetRangeUser(eta0,eta1);
66 his->GetAxis(6)->SetRangeUser(phi0,phi1);
67 TH2F * res = (TH2F*) his->Projection(i0,i1);
68 res->SetXTitle(his->GetAxis(i1)->GetTitle());
69 res->SetYTitle(his->GetAxis(i0)->GetTitle());
73 TH1F* GetProjection(THnSparse*his, Int_t i0, Float_t p0, Float_t p1, Float_t eta0, Float_t eta1, Float_t phi0, Float_t phi1){
75 his->GetAxis(4)->SetRangeUser(p0,p1);
76 his->GetAxis(5)->SetRangeUser(eta0,eta1);
77 his->GetAxis(6)->SetRangeUser(phi0,phi1);
78 TH1F * res = (TH1F*) his->Projection(i0);
79 res->SetXTitle(his->GetAxis(i0)->GetTitle());
88 TCanvas *canvas= new TCanvas("Chi2","Chi2");
92 TH1 *hischi2 = GetProjection(fTPCqa,0, 0,10, -0.9,0.9, -3.14,3.14);
93 hischi2->SetXTitle("#chi^{2}/N_{cl}");
95 canvas->cd(2)->SetLogx(kTRUE);
96 TH1 *hischi2Pt = GetProjection(fTPCqa,0,4, 0,10, -0.9,0.9, -3.14,3.14)->ProfileX();
97 hischi2Pt->SetXTitle("p_{t} (GeV/c)");
98 hischi2Pt->SetYTitle("#chi^{2}/N_{cl}");
99 hischi2Pt->SetMinimum(0);
100 hischi2Pt->SetMaximum(4);
103 canvas->cd(3)->SetLogx(kFALSE);
104 TH1 *hischi2Eta = GetProjection(fTPCqa,0,5, 0,10, -0.9,0.9, -3.14,3.14)->ProfileX();
105 hischi2Eta->SetXTitle("#eta");
106 hischi2Eta->SetYTitle("#chi^{2}/N_{cl}");
107 hischi2Eta->SetMinimum(0);
108 hischi2Eta->SetMaximum(4);
111 canvas->cd(4)->SetLogx(kFALSE);
112 TH1 *hischi2Phi = GetProjection(fTPCqa,0,6, 0,10, -0.9,0.9, -3.14,3.14)->ProfileX();
113 hischi2Phi->SetXTitle("#phi");
114 hischi2Phi->SetYTitle("#chi^{2}/N_{cl}");
115 hischi2Phi->SetMinimum(0);
116 hischi2Phi->SetMaximum(4);
119 canvas->SaveAs("pic/chi2.eps");
120 canvas->SaveAs("pic/chi2.gif");
129 TCanvas *canvas= new TCanvas("Ncl_Nclf","Ncl_Nclf");
133 TH1 *hischi2 = GetProjection(fTPCqa,3, 0,10, -0.9,0.9, -3.14,3.14);
134 hischi2->SetXTitle("N_{cl}/N_{f}");
136 canvas->cd(2)->SetLogx(kTRUE);
137 TH1 *hischi2Pt = GetProjection(fTPCqa,3,4, 0,10, -0.9,0.9, -3.14,3.14)->ProfileX();
138 hischi2Pt->SetXTitle("p_{t} (GeV/c)");
139 hischi2Pt->SetYTitle("N_{cl}/N_{f}");
140 hischi2Pt->SetMinimum(0.6);
141 hischi2Pt->SetMaximum(1.1);
144 canvas->cd(3)->SetLogx(kFALSE);
145 TH1 *hischi2Eta = GetProjection(fTPCqa,3,5, 0,10, -0.9,0.9, -3.14,3.14)->ProfileX();
146 hischi2Eta->SetXTitle("#eta");
147 hischi2Eta->SetYTitle("N_{cl}/N_{f}");
148 hischi2Eta->SetMinimum(0.6);
149 hischi2Eta->SetMaximum(1.1);
152 canvas->cd(4)->SetLogx(kFALSE);
153 TH1 *hischi2Phi = GetProjection(fTPCqa,3,6, 0,10, -0.9,0.9, -3.14,3.14)->ProfileX();
154 hischi2Phi->SetXTitle("#phi");
155 hischi2Phi->SetYTitle("N_{cl}/N_{f}");
156 hischi2Phi->SetMinimum(0.6);
157 hischi2Phi->SetMaximum(1.1);
160 canvas->SaveAs("pic/nclratio.eps");
161 canvas->SaveAs("pic/nclratio.gif");
169 TCanvas *canvas= new TCanvas("Ncl","Ncl");
173 TH1 *hischi2 = GetProjection(fTPCqa,1, 0.5,10, -0.9,0.9, -3.14,3.14);
174 hischi2->SetXTitle("N_{cl}");
176 canvas->cd(2)->SetLogx(kTRUE);
177 TH1 *hischi2Pt = GetProjection(fTPCqa,1,4, 0.5,10, -0.9,0.9, -3.14,3.14)->ProfileX();
178 hischi2Pt->SetXTitle("p_{t} (GeV/c)");
179 hischi2Pt->SetYTitle("N_{cl}");
180 hischi2Pt->SetMinimum(50);
181 hischi2Pt->SetMaximum(160);
184 canvas->cd(3)->SetLogx(kFALSE);
185 TH1 *hischi2Eta = GetProjection(fTPCqa,1,5, 0.5,10, -0.9,0.9, -3.14,3.14)->ProfileX();
186 hischi2Eta->SetXTitle("#eta");
187 hischi2Eta->SetYTitle("N_{cl}");
188 hischi2Eta->SetMinimum(50);
189 hischi2Eta->SetMaximum(160);
192 canvas->cd(4)->SetLogx(kFALSE);
193 TH1 *hischi2Phi = GetProjection(fTPCqa,1,6, 0.5,10, -0.9,0.9, -3.14,3.14)->ProfileX();
194 hischi2Phi->SetXTitle("#phi");
195 hischi2Phi->SetYTitle("N_{cl}");
196 hischi2Phi->SetMinimum(50);
197 hischi2Phi->SetMaximum(160);
200 canvas->SaveAs("pic/ncl.eps");
201 canvas->SaveAs("pic/ncl.gif");