.so cleanup: removed from gSystem->Load()
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / AntiprotonToProton / drawProtonResults.C
CommitLineData
f203beb9 1void drawProtonResults(const char* analysisOutput = 0x0,
2 Bool_t kShowResults = kTRUE,
7ec0d93f 3 Bool_t kShowQAPlots = kFALSE,
4 Bool_t kMC = kFALSE) {
735cc63d 5 //Macro to visualize the proton ratio results
6 //It also visualizes the QA plots
790140ac 7 gStyle->SetPalette(1,0);
f203beb9 8 if(!analysisOutput)
9 Error("drawProtonResults::The analysis output was not defined!!!");
10 if(kShowResults) drawResults(analysisOutput);
7ec0d93f 11 if(kShowQAPlots) drawQAPlots(analysisOutput, kMC);
735cc63d 12}
13
14//___________________________________________________//
f203beb9 15void drawResults(const char* analysisOutput) {
790140ac 16 //Draws the main results from the ratio analysis
4070f709 17 gSystem->Load("libANALYSIS");
18 gSystem->Load("libANALYSISalice");
19 gSystem->Load("libCORRFW");
20 gSystem->Load("libPWG2spectra");
3c669e09 21
52b04cf9 22 //Create the AliProtonAnalysis object
23 AliProtonAnalysis *analysis = new AliProtonAnalysis();
f203beb9 24 analysis->ReadFromFile(analysisOutput);
52b04cf9 25 TH1F *gHistEventStats = dynamic_cast<TH1F *>(analysis->GetEventStatistics());
71a67ee1 26
52b04cf9 27 TH2D *gHistYPtProtons = dynamic_cast<TH2D *>(analysis->GetProtonYPtHistogram());
28 TH2D *gHistYPtAntiProtons = dynamic_cast<TH2D *>(analysis->GetAntiProtonYPtHistogram());
71a67ee1 29
52b04cf9 30 TH1D *gHistYProtons = dynamic_cast<TH1D *>(analysis->GetProtonYHistogram());
31 TH1D *gHistYAntiProtons = dynamic_cast<TH1D *>(analysis->GetAntiProtonYHistogram());
32 TH1D *gHistPtProtons = dynamic_cast<TH1D *>(analysis->GetProtonPtHistogram());
33 TH1D *gHistPtAntiProtons = dynamic_cast<TH1D *>(analysis->GetAntiProtonPtHistogram());
71a67ee1 34
52b04cf9 35 TH1D *gHistYRatio = dynamic_cast<TH1D *>(analysis->GetYRatioHistogram());
36 TH1D *gHistPtRatio = dynamic_cast<TH1D *>(analysis->GetPtRatioHistogram());
71a67ee1 37
ce9d2201 38 TList *gYRatioInPtBinsList = dynamic_cast<TList *>(analysis->GetYRatioHistogramsInPtBins());
39 drawRatioInPtBins(gYRatioInPtBinsList);
790140ac 40
3c669e09 41 //==================================================================//
e56f08ed 42 TH2F *hEmptyRatio = new TH2F("hEmptyRatio",";;#bar{p}/p",100,-1.1,1.1,100,0.1,1.1);
52b04cf9 43 hEmptyRatio->SetStats(kFALSE);
44 hEmptyRatio->GetXaxis()->SetNdivisions(10);
45 hEmptyRatio->GetYaxis()->SetNdivisions(10);
46
47 TLatex *latex = new TLatex();
48 latex->SetTextSize(0.04);
49 latex->SetTextColor(2);
50
51 TF1 *fFitFunction = new TF1("fFitFunction","[0]",-0.5,0.5);
52 fFitFunction->SetParameter(0,0.7);
53
6ad38cc1 54 TCanvas *c2D = new TCanvas("c2D","eta-pT (anti)protons",0,0,900,400);
55 c2D->SetFillColor(10); c2D->SetHighLightColor(10); c2D->Divide(3,1);
790140ac 56 c2D->cd(1); gHistYPtProtons->Draw("col");
6ad38cc1 57 c2D->cd(2); gHistYPtAntiProtons->DrawCopy("col");
58 c2D->cd(3); gHistYPtAntiProtons->Divide(gHistYPtProtons);
59 gHistYPtAntiProtons->SetStats(kFALSE); gHistYPtAntiProtons->DrawCopy("colz");
60 TFile *fout = TFile::Open("test.root","recreate");
61 gHistYPtAntiProtons->SetName("gHistYPtAntiProtons");
62 gHistYPtAntiProtons->Write();
63 fout->Close();
3c669e09 64 TCanvas *cEventStats = new TCanvas("cEventStats","Event statistics",
65 0,0,500,500);
66 cEventStats->SetFillColor(10); cEventStats->SetHighLightColor(10);
e0919e87 67 cEventStats->SetLeftMargin(0.15);
68 gHistEventStats->GetYaxis()->SetTitleOffset(1.4);
69 gHistEventStats->SetStats(kFALSE); gHistEventStats->Draw();
52b04cf9 70
71 TCanvas *cEta = new TCanvas("cEta","Eta",100,0,600,400);
72 cEta->SetFillColor(10); cEta->SetHighLightColor(10); cEta->Divide(2,1);
629e3967 73 cEta->cd(1); gHistYProtons->Draw("E"); PrintYields(gHistYProtons);
74 cEta->cd(2); gHistYAntiProtons->Draw("E"); PrintYields(gHistYAntiProtons);
52b04cf9 75
76 TCanvas *cPt = new TCanvas("cPt","Pt",100,200,600,400);
6ad38cc1 77
52b04cf9 78 cPt->SetFillColor(10); cPt->SetHighLightColor(10); cPt->Divide(2,1);
79 cPt->cd(1)->SetLogy(); gHistPtProtons->Draw("E");
80 cPt->cd(2)->SetLogy(); gHistPtAntiProtons->Draw("E");
81
82 TCanvas *cRatio = new TCanvas("cRatio","Ratio",300,0,600,400);
83 cRatio->SetFillColor(10); cRatio->SetHighLightColor(10); cRatio->Divide(2,1);
ce9d2201 84 cRatio->cd(1); hEmptyRatio->GetXaxis()->SetTitle("#eta");
e56f08ed 85 hEmptyRatio->GetXaxis()->SetRangeUser(-1.0,1.0);
52b04cf9 86 hEmptyRatio->DrawCopy(); gHistYRatio->Draw("ESAME");
87 gHistYRatio->Fit("fFitFunction","N");
88 latex->DrawLatex(-0.1,0.45,"ALICE PRELIMINARY");
89 latex->DrawLatex(-0.1,0.4,"p-p: #sqrt{s} = 900 GeV");
90 cRatio->cd(2); hEmptyRatio->GetXaxis()->SetTitle("P_{T} [GeV/c]");
91 hEmptyRatio->GetXaxis()->SetRangeUser(0.3,1.1);
92 hEmptyRatio->DrawCopy(); gHistPtRatio->Draw("ESAME");
93 latex->DrawLatex(0.6,0.45,"ALICE PRELIMINARY");
94 latex->DrawLatex(0.6,0.4,"p-p: #sqrt{s} = 900 GeV");
95
e0919e87 96 TFile *fout = TFile::Open("RawRatioPlots.root","recreate");
97 gHistYRatio->Write();
98 gHistPtRatio->Write();
99 fout->Close();
52b04cf9 100
101 Printf("==========================================");
e56f08ed 102 for(Int_t iBin = 1; iBin <= gHistYRatio->GetNbinsX(); iBin++)
103 Printf("Eta: %lf - Ratio: %lf - Error: %lf",
104 gHistYRatio->GetBinCenter(iBin),
105 gHistYRatio->GetBinContent(iBin),
106 gHistYRatio->GetBinError(iBin));
107 Printf("==========================================");
108
52b04cf9 109 Printf("Fit result: %lf - %lf",fFitFunction->GetParameter(0),fFitFunction->GetParError(0));
110 analysis->PrintMean(gHistYRatio,0.5);
111 Printf("==========================================");
790140ac 112}
113
114//___________________________________________________//
ce9d2201 115void drawRatioInPtBins(TList *gYRatioInPtBinsList) {
116 Printf("drawRatioInPtBins:: %d entries",gYRatioInPtBinsList->GetEntries());
117 static const Int_t nEntries = gYRatioInPtBinsList->GetEntries();
118 TCanvas *cRatioInPtBins[100];
119 TH1D *gHistRatioInPtBins[100];
120 TString title;
121 for(Int_t iEntry = 0; iEntry < gYRatioInPtBinsList->GetEntries(); iEntry++) {
122 title = "ratioPtBin"; title += iEntry+1;
123 cRatioInPtBins[iEntry] = new TCanvas(title.Data(),
124 title.Data(),
125 0,0,400,400);
126 cRatioInPtBins[iEntry]->SetFillColor(10);
127 cRatioInPtBins[iEntry]->SetHighLightColor(10);
128 gHistRatioInPtBins[iEntry] = dynamic_cast<TH1D *>(gYRatioInPtBinsList->At(iEntry));
129 gHistRatioInPtBins[iEntry]->SetStats(kFALSE);
130 gHistRatioInPtBins[iEntry]->SetMarkerStyle(20);
131 gHistRatioInPtBins[iEntry]->SetMarkerColor(4);
132 gHistRatioInPtBins[iEntry]->GetYaxis()->SetRangeUser(0.0,1.4);
133 gHistRatioInPtBins[iEntry]->DrawCopy("E");
134 }
135}
136
137//___________________________________________________//
7ec0d93f 138void drawQAPlots(const char* analysisOutput,
139 Bool_t kMC) {
735cc63d 140 //Draws the QA plots from the output of the analysis
141 //=========================================================//
735cc63d 142 //QA plots
f203beb9 143 TFile *f = TFile::Open(analysisOutput);
71a67ee1 144 //List of cuts
145 TCanvas *cListOfCuts = dynamic_cast<TCanvas *>(f->Get("cListOfCuts"));
146 if(cListOfCuts)
147 cListOfCuts->Draw();
148
735cc63d 149 TList *listQA = dynamic_cast<TList *>(f->Get("outputQAList"));
150 TList *gListGlobalQA = dynamic_cast<TList *>(listQA->At(0));
151
152 //================QA plots================//
153 TList *fQA2DList = dynamic_cast<TList *>(gListGlobalQA->At(0));
37cb8683 154 //2D de/dx vs P
790140ac 155 TH2F *gHistdEdxP = dynamic_cast<TH2F *>(fQA2DList->At(0));
156 gHistdEdxP->SetStats(kFALSE);
f81f1b19 157 drawdEdx(gHistdEdxP,0);
790140ac 158 TH2F *gHistProtonsdEdxP = dynamic_cast<TH2F *>(fQA2DList->At(1));
159 gHistProtonsdEdxP->SetStats(kFALSE);
37cb8683 160
7ec0d93f 161 //Theoretical Bethe-Bloch
162 Double_t fAlephParameters[5];
163 if(kMC) {
164 fAlephParameters[0] = 2.15898e+00/50.;
165 fAlephParameters[1] = 1.75295e+01;
166 fAlephParameters[2] = 3.40030e-09;
167 fAlephParameters[3] = 1.96178e+00;
168 fAlephParameters[4] = 3.91720e+00;
169 }
170 else {
171 fAlephParameters[0] = 0.0283086;
172 fAlephParameters[1] = 2.63394e+01;
173 fAlephParameters[2] = 5.04114e-11;
174 fAlephParameters[3] = 2.12543e+00;
175 fAlephParameters[4] = 4.88663e+00;
176 }
177
178 AliTPCPIDResponse *tpcResponse = new AliTPCPIDResponse();
179 tpcResponse->SetBetheBlochParameters(fAlephParameters[0],
180 fAlephParameters[1],
181 fAlephParameters[2],
182 fAlephParameters[3],
183 fAlephParameters[4]);
184 const Int_t nEntries = 10000;
185 Double_t mom[nEntries];
186 Double_t dEdxElectrons[nEntries];
187 Double_t dEdxMuons[nEntries];
188 Double_t dEdxPions[nEntries];
189 Double_t dEdxKaons[nEntries];
190 Double_t dEdxProtons[nEntries];
191 for(Int_t i = 0; i < nEntries; i++) {
192 mom[i] = 0.01 + 0.01*i;
193 dEdxElectrons[i] = tpcResponse->GetExpectedSignal(mom[i],0);
194 dEdxMuons[i] = tpcResponse->GetExpectedSignal(mom[i],1);
195 dEdxPions[i] = tpcResponse->GetExpectedSignal(mom[i],2);
196 dEdxKaons[i] = tpcResponse->GetExpectedSignal(mom[i],3);
197 dEdxProtons[i] = tpcResponse->GetExpectedSignal(mom[i],4);
198 }
199
200 TGraph *grElectrons = new TGraph(nEntries,mom,dEdxElectrons);
201 grElectrons->SetName("grElectrons");
202 grElectrons->SetLineColor(6); grElectrons->SetLineWidth(2);
203 TGraph *grMuons = new TGraph(nEntries,mom,dEdxMuons);
204 grMuons->SetLineColor(3); grMuons->SetLineWidth(2);
205 grMuons->SetName("grMuons");
206 TGraph *grPions = new TGraph(nEntries,mom,dEdxPions);
207 grPions->SetLineColor(1); grPions->SetLineWidth(2);
208 grPions->SetName("grPions");
209 TGraph *grKaons = new TGraph(nEntries,mom,dEdxKaons);
210 grKaons->SetLineColor(2); grKaons->SetLineWidth(2);
211 grKaons->SetName("grKaons");
212 TGraph *grProtons = new TGraph(nEntries,mom,dEdxProtons);
213 grProtons->SetLineColor(4); grProtons->SetLineWidth(2);
214 grProtons->SetName("grProtons");
215
ff672838 216 //2D de/dx vs P
217 TH2F *gHistZP = dynamic_cast<TH2F *>(fQA2DList->At(2));
218 gHistZP->SetStats(kFALSE);
f81f1b19 219 drawdEdx(gHistZP,1);
ff672838 220 TH2F *gHistProtonsZP = dynamic_cast<TH2F *>(fQA2DList->At(3));
221 gHistProtonsZP->SetStats(kFALSE);
222
37cb8683 223 //3D eta-phi-NPoints(dEdx)
ff672838 224 TH3F *gHistEtaPhiTPCdEdxNPoints = dynamic_cast<TH3F *>(fQA2DList->At(4));
37cb8683 225 TH2D *gHistEtaPhi = dynamic_cast<TH2D *>gHistEtaPhiTPCdEdxNPoints->Project3D("yx");
226 gHistEtaPhi->SetStats(kFALSE);
227 TH2D *gHistEtaTPCdEdxNPoints = dynamic_cast<TH2D *>gHistEtaPhiTPCdEdxNPoints->Project3D("zx");
228 gHistEtaTPCdEdxNPoints->SetStats(kFALSE);
229 TH2D *gHistPhiTPCdEdxNPoints = dynamic_cast<TH2D *>gHistEtaPhiTPCdEdxNPoints->Project3D("zy");
230 gHistPhiTPCdEdxNPoints->SetStats(kFALSE);
231
232 //3D eta-phi-NPoints(dEdx): protons
ff672838 233 TH3F *gHistProtonsEtaPhiTPCdEdxNPoints = dynamic_cast<TH3F *>(fQA2DList->At(5));
37cb8683 234 TH2D *gHistProtonsEtaPhi = dynamic_cast<TH2D *>gHistProtonsEtaPhiTPCdEdxNPoints->Project3D("yx");
235 gHistProtonsEtaPhi->SetStats(kFALSE);
236 TH2D *gHistProtonsEtaTPCdEdxNPoints = dynamic_cast<TH2D *>gHistProtonsEtaPhiTPCdEdxNPoints->Project3D("zx");
237 gHistProtonsEtaTPCdEdxNPoints->SetStats(kFALSE);
238 TH2D *gHistProtonsPhiTPCdEdxNPoints = dynamic_cast<TH2D *>gHistProtonsEtaPhiTPCdEdxNPoints->Project3D("zy");
239 gHistProtonsPhiTPCdEdxNPoints->SetStats(kFALSE);
240
241 //3D eta-phi-NPoints
ff672838 242 TH3F *gHistEtaPhiTPCNPoints = dynamic_cast<TH3F *>(fQA2DList->At(6));
37cb8683 243 TH2D *gHistEtaPhi = dynamic_cast<TH2D *>gHistEtaPhiTPCNPoints->Project3D("yx");
244 gHistEtaPhi->SetStats(kFALSE);
245 TH2D *gHistEtaTPCNPoints = dynamic_cast<TH2D *>gHistEtaPhiTPCNPoints->Project3D("zx");
246 gHistEtaTPCNPoints->SetStats(kFALSE);
247 TH2D *gHistPhiTPCNPoints = dynamic_cast<TH2D *>gHistEtaPhiTPCNPoints->Project3D("zy");
248 gHistPhiTPCNPoints->SetStats(kFALSE);
249
250 //3D eta-phi-NPoints: protons
ff672838 251 TH3F *gHistProtonsEtaPhiTPCNPoints = dynamic_cast<TH3F *>(fQA2DList->At(7));
37cb8683 252 TH2D *gHistProtonsEtaPhi = dynamic_cast<TH2D *>gHistProtonsEtaPhiTPCNPoints->Project3D("yx");
253 gHistProtonsEtaPhi->SetStats(kFALSE);
254 TH2D *gHistProtonsEtaTPCNPoints = dynamic_cast<TH2D *>gHistProtonsEtaPhiTPCNPoints->Project3D("zx");
255 gHistProtonsEtaTPCNPoints->SetStats(kFALSE);
256 TH2D *gHistProtonsPhiTPCNPoints = dynamic_cast<TH2D *>gHistProtonsEtaPhiTPCNPoints->Project3D("zy");
257 gHistProtonsPhiTPCNPoints->SetStats(kFALSE);
258
259 //3D pt-phi-NPoints(dEdx)
ff672838 260 TH3F *gHistPtPhiTPCdEdxNPoints = dynamic_cast<TH3F *>(fQA2DList->At(8));
37cb8683 261 TH2D *gHistPtPhi = dynamic_cast<TH2D *>gHistPtPhiTPCdEdxNPoints->Project3D("yx");
262 gHistPtPhi->SetStats(kFALSE);
263 TH2D *gHistPtTPCdEdxNPoints = dynamic_cast<TH2D *>gHistPtPhiTPCdEdxNPoints->Project3D("zx");
264 gHistPtTPCdEdxNPoints->SetStats(kFALSE);
265 TH2D *gHistPhiTPCdEdxNPoints = dynamic_cast<TH2D *>gHistPtPhiTPCdEdxNPoints->Project3D("zy");
266 gHistPhiTPCdEdxNPoints->SetStats(kFALSE);
267
268 //3D pt-phi-NPoints(dEdx): protons
ff672838 269 TH3F *gHistProtonsPtPhiTPCdEdxNPoints = dynamic_cast<TH3F *>(fQA2DList->At(9));
37cb8683 270 TH2D *gHistProtonsPtPhi = dynamic_cast<TH2D *>gHistProtonsPtPhiTPCdEdxNPoints->Project3D("yx");
271 gHistProtonsPtPhi->SetStats(kFALSE);
272 TH2D *gHistProtonsPtTPCdEdxNPoints = dynamic_cast<TH2D *>gHistProtonsPtPhiTPCdEdxNPoints->Project3D("zx");
273 gHistProtonsPtTPCdEdxNPoints->SetStats(kFALSE);
274 TH2D *gHistProtonsPhiTPCdEdxNPoints = dynamic_cast<TH2D *>gHistProtonsPtPhiTPCdEdxNPoints->Project3D("zy");
275 gHistProtonsPhiTPCdEdxNPoints->SetStats(kFALSE);
276
277 //3D pt-phi-NPoints
ff672838 278 TH3F *gHistPtPhiTPCNPoints = dynamic_cast<TH3F *>(fQA2DList->At(10));
37cb8683 279 TH2D *gHistPtPhi = dynamic_cast<TH2D *>gHistPtPhiTPCNPoints->Project3D("yx");
280 gHistPtPhi->SetStats(kFALSE);
281 TH2D *gHistPtTPCNPoints = dynamic_cast<TH2D *>gHistPtPhiTPCNPoints->Project3D("zx");
282 gHistPtTPCNPoints->SetStats(kFALSE);
283 TH2D *gHistPhiTPCNPoints = dynamic_cast<TH2D *>gHistPtPhiTPCNPoints->Project3D("zy");
284 gHistPhiTPCNPoints->SetStats(kFALSE);
285
286 //3D pt-phi-NPoints: protons
ff672838 287 TH3F *gHistProtonsPtPhiTPCNPoints = dynamic_cast<TH3F *>(fQA2DList->At(11));
37cb8683 288 TH2D *gHistProtonsPtPhi = dynamic_cast<TH2D *>gHistProtonsPtPhiTPCNPoints->Project3D("yx");
289 gHistProtonsPtPhi->SetStats(kFALSE);
290 TH2D *gHistProtonsPtTPCNPoints = dynamic_cast<TH2D *>gHistProtonsPtPhiTPCNPoints->Project3D("zx");
291 gHistProtonsPtTPCNPoints->SetStats(kFALSE);
292 TH2D *gHistProtonsPhiTPCNPoints = dynamic_cast<TH2D *>gHistProtonsPtPhiTPCNPoints->Project3D("zy");
293 gHistProtonsPhiTPCNPoints->SetStats(kFALSE);
294
e56f08ed 295 //2D eta-phi- accepted protons & antiprotons
ff672838 296 TH2F *gHistEtaPhiProtons = dynamic_cast<TH2F *>(fQA2DList->At(12));
e56f08ed 297 gHistEtaPhiProtons->SetStats(kFALSE);
ff672838 298 TH2F *gHistEtaPhiAntiProtons = dynamic_cast<TH2F *>(fQA2DList->At(13));
e56f08ed 299 gHistEtaPhiAntiProtons->SetStats(kFALSE);
300
629e3967 301 //2D dca vs pT - accepted protons & antiprotons
6ad38cc1 302 TH3F *gHistDCAxyEtaPtProtons = dynamic_cast<TH3F *>(fQA2DList->At(14));
303 gHistDCAxyEtaPtProtons->SetStats(kFALSE);
304 TH2D *gHistDCAxyPtProtons = gHistDCAxyEtaPtProtons->Project3D("zy");
629e3967 305 gHistDCAxyPtProtons->SetStats(kFALSE);
6ad38cc1 306 TH3F *gHistDCAzEtaPtProtons = dynamic_cast<TH3F *>(fQA2DList->At(15));
307 gHistDCAzEtaPtProtons->SetStats(kFALSE);
308 TH2D *gHistDCAzPtProtons = gHistDCAzEtaPtProtons->Project3D("zy");
629e3967 309 gHistDCAzPtProtons->SetStats(kFALSE);
6ad38cc1 310 TH3F *gHistDCAxyEtaPtAntiProtons = dynamic_cast<TH3F *>(fQA2DList->At(16));
311 gHistDCAxyEtaPtAntiProtons->SetStats(kFALSE);
312 TH2D *gHistDCAxyPtAntiProtons = gHistDCAxyEtaPtAntiProtons->Project3D("zy");
629e3967 313 gHistDCAxyPtAntiProtons->SetStats(kFALSE);
6ad38cc1 314 TH3F *gHistDCAzEtaPtAntiProtons = dynamic_cast<TH3F *>(fQA2DList->At(17));
315 gHistDCAzEtaPtAntiProtons->SetStats(kFALSE);
316 TH2D *gHistDCAzPtAntiProtons = gHistDCAzEtaPtAntiProtons->Project3D("zy");
629e3967 317 gHistDCAzPtAntiProtons->SetStats(kFALSE);
318
37cb8683 319 //__________________________________________________//
7ec0d93f 320 TH2F *hEmptydEdx = new TH2F("hEmptydEdx",
e0919e87 321 ";p [GeV/c];dE/dx [arb. units]",
322 100,0.08,20.,100,30,1000);
7ec0d93f 323 hEmptydEdx->SetStats(kFALSE);
324
325 TLatex *latex = new TLatex();
326 latex->SetTextSize(0.035);
327
790140ac 328 TCanvas *cdEdx = new TCanvas("cdEdx","dE/dx (TPC)",0,0,700,400);
e0919e87 329 cdEdx->SetFillColor(10); cdEdx->SetHighLightColor(10); //cdEdx->Divide(2,1);
762a6c16 330 cdEdx->cd(1)->SetLogx(); cdEdx->cd(1)->SetLogy(); hEmptydEdx->DrawCopy();
7ec0d93f 331 gHistdEdxP->Draw("colsame");
e0919e87 332 latex->DrawLatex(7.,400,"ALICE");
333 latex->DrawLatex(6.,400,"p+p @ #sqrt{s} = 900 GeV");
334 grElectrons->Draw("LSAME"); latex->SetTextColor(6); latex->DrawLatex(0.09,55,"e");
335 grMuons->Draw("LSAME"); latex->SetTextColor(3); latex->DrawLatex(0.09,400,"#mu");
336 grPions->Draw("LSAME"); latex->SetTextColor(1); latex->DrawLatex(0.1,200,"#pi");
7ec0d93f 337 grKaons->Draw("LSAME"); latex->SetTextColor(2); latex->DrawLatex(0.17,400,"K");
338 grProtons->Draw("LSAME"); latex->SetTextColor(4); latex->DrawLatex(0.35,400,"p");
339
e0919e87 340 //cdEdx->cd(2)->SetLogx(); gHistProtonsdEdxP->Draw("col");
735cc63d 341
f81f1b19 342 TCanvas *cZdEdx = new TCanvas("cZdEdx","Normalized dE/dx (TPC)",500,0,700,400);
343 cZdEdx->SetFillColor(10); cZdEdx->SetHighLightColor(10); cZdEdx->Divide(2,1);
344 cZdEdx->cd(1); gHistZP->Draw("col");
345 cZdEdx->cd(2); gHistProtonsZP->Draw("col");
346
e56f08ed 347 TCanvas *cEtaPhi = new TCanvas("cEtaPhi",
348 "eta-phi",
349 0,0,700,400);
350 cEtaPhi->SetFillColor(10);
351 cEtaPhi->SetHighLightColor(10); cEtaPhi->Divide(2,1);
7ec0d93f 352 cEtaPhi->cd(1);
353 gHistEtaPhiProtons->SetTitle("Accepted protons - eta vs phi");
354 gHistEtaPhiProtons->Draw("colz");
355 cEtaPhi->cd(2);
356 gHistEtaPhiAntiProtons->SetTitle("Accepted antiprotons - eta vs phi");
357 gHistEtaPhiAntiProtons->Draw("colz");
e56f08ed 358
629e3967 359 TCanvas *cDCAPt = new TCanvas("cDCAPt","pT-dca",0,0,700,700);
360 cDCAPt->SetFillColor(10);
361 cDCAPt->SetHighLightColor(10); cDCAPt->Divide(2,2);
7ec0d93f 362 cDCAPt->cd(1);
363 gHistDCAxyPtProtons->SetTitle("Accepted protons - dca(xy) vs Pt");
364 gHistDCAxyPtProtons->Draw("colz");
365 cDCAPt->cd(2);
366 gHistDCAzPtProtons->SetTitle("Accepted protons - dca(z) vs Pt");
367 gHistDCAzPtProtons->Draw("colz");
368 cDCAPt->cd(3);
369 gHistDCAxyPtAntiProtons->SetTitle("Accepted antiprotons - dca(xy) vs Pt");
370 gHistDCAxyPtAntiProtons->Draw("colz");
371 cDCAPt->cd(4);
372 gHistDCAzPtAntiProtons->SetTitle("Accepted antiprotons - dca(z) vs Pt");
373 gHistDCAzPtAntiProtons->Draw("colz");
629e3967 374
e56f08ed 375 /*TCanvas *cEtaPhiNPointsdEdx = new TCanvas("cEtaPhiNPointsdEdx",
37cb8683 376 "eta-phi-NPoints(dE/dx)",
377 0,0,900,600);
378 cEtaPhiNPointsdEdx->SetFillColor(10);
379 cEtaPhiNPointsdEdx->SetHighLightColor(10); cEtaPhiNPointsdEdx->Divide(3,2);
380 cEtaPhiNPointsdEdx->cd(1); gHistEtaPhi->Draw("col");
381 cEtaPhiNPointsdEdx->cd(2); gHistEtaTPCdEdxNPoints->Draw("col");
382 cEtaPhiNPointsdEdx->cd(3); gHistPhiTPCdEdxNPoints->Draw("col");
383 cEtaPhiNPointsdEdx->cd(4); gHistProtonsEtaPhi->Draw("col");
384 cEtaPhiNPointsdEdx->cd(5); gHistProtonsEtaTPCdEdxNPoints->Draw("col");
385 cEtaPhiNPointsdEdx->cd(6); gHistProtonsPhiTPCdEdxNPoints->Draw("col");
386
387 TCanvas *cEtaPhiNPoints = new TCanvas("cEtaPhiNPoints",
388 "eta-phi-NPoints",
389 0,0,900,600);
390 cEtaPhiNPoints->SetFillColor(10);
391 cEtaPhiNPoints->SetHighLightColor(10); cEtaPhiNPoints->Divide(3,2);
392 cEtaPhiNPoints->cd(1); gHistEtaPhi->Draw("col");
393 cEtaPhiNPoints->cd(2); gHistEtaTPCNPoints->Draw("col");
394 cEtaPhiNPoints->cd(3); gHistPhiTPCNPoints->Draw("col");
395 cEtaPhiNPoints->cd(4); gHistProtonsEtaPhi->Draw("col");
396 cEtaPhiNPoints->cd(5); gHistProtonsEtaTPCNPoints->Draw("col");
397 cEtaPhiNPoints->cd(6); gHistProtonsPhiTPCNPoints->Draw("col");
398
399 TCanvas *cPtPhiNPointsdEdx = new TCanvas("cPtPhiNPointsdEdx",
400 "pt-phi-NPoints(dE/dx)",
401 0,0,900,600);
402 cPtPhiNPointsdEdx->SetFillColor(10);
403 cPtPhiNPointsdEdx->SetHighLightColor(10); cPtPhiNPointsdEdx->Divide(3,2);
404 cPtPhiNPointsdEdx->cd(1); gHistPtPhi->Draw("col");
405 cPtPhiNPointsdEdx->cd(2); gHistPtTPCdEdxNPoints->Draw("col");
406 cPtPhiNPointsdEdx->cd(3); gHistPhiTPCdEdxNPoints->Draw("col");
407 cPtPhiNPointsdEdx->cd(4); gHistProtonsPtPhi->Draw("col");
408 cPtPhiNPointsdEdx->cd(5); gHistProtonsPtTPCdEdxNPoints->Draw("col");
409 cPtPhiNPointsdEdx->cd(6); gHistProtonsPhiTPCdEdxNPoints->Draw("col");
410
411 TCanvas *cPtPhiNPoints = new TCanvas("cPtPhiNPoints",
412 "pt-phi-NPoints",
413 0,0,900,600);
414 cPtPhiNPoints->SetFillColor(10);
415 cPtPhiNPoints->SetHighLightColor(10); cPtPhiNPoints->Divide(3,2);
416 cPtPhiNPoints->cd(1); gHistPtPhi->Draw("col");
417 cPtPhiNPoints->cd(2); gHistPtTPCNPoints->Draw("col");
418 cPtPhiNPoints->cd(3); gHistPhiTPCNPoints->Draw("col");
419 cPtPhiNPoints->cd(4); gHistProtonsPtPhi->Draw("col");
420 cPtPhiNPoints->cd(5); gHistProtonsPtTPCNPoints->Draw("col");
e56f08ed 421 cPtPhiNPoints->cd(6); gHistProtonsPhiTPCNPoints->Draw("col");*/
37cb8683 422
735cc63d 423 //Accepted protons
424 TList *fQAProtonsAcceptedList = dynamic_cast<TList *>(gListGlobalQA->At(1));
425 TH1F *gProtonsITSClustersPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(0));
426 TH1F *gProtonsChi2PerClusterITSPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(1));
427 TH1F *gProtonsTPCClustersPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(2));
428 TH1F *gProtonsChi2PerClusterTPCPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(3));
429 TH1F *gProtonsExtCov11Pass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(4));
430 TH1F *gProtonsExtCov22Pass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(5));
431 TH1F *gProtonsExtCov33Pass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(6));
432 TH1F *gProtonsExtCov44Pass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(7));
433 TH1F *gProtonsExtCov55Pass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(8));
434 TH1F *gProtonsSigmaToVertexPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(9));
435 TH1F *gProtonsSigmaToVertexTPCPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(10));
436 TH1F *gProtonsDCAXYPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(11));
437 TH1F *gProtonsDCAXYTPCPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(12));
438 TH1F *gProtonsDCAZPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(13));
439 TH1F *gProtonsDCAZTPCPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(14));
440 TH1F *gProtonsConstrainChi2Pass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(15));
441 TH1F *gProtonsITSRefitPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(16));
442 TH1F *gProtonsTPCRefitPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(17));
443 TH1F *gProtonsESDpidPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(18));
444 TH1F *gProtonsTPCpidPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(19));
445 TH1F *gProtonsPointOnITSLayer1Pass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(20));
446 TH1F *gProtonsPointOnITSLayer2Pass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(21));
447 TH1F *gProtonsPointOnITSLayer3Pass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(22));
448 TH1F *gProtonsPointOnITSLayer4Pass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(23));
449 TH1F *gProtonsPointOnITSLayer5Pass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(24));
450 TH1F *gProtonsPointOnITSLayer6Pass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(25));
451 TH1F *gProtonsNumberOfTPCdEdxPointsPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(26));
71a67ee1 452 TH1F *gProtonsITSClusterMapPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(27));
453 TH1F *gProtonsDCA3DPass = dynamic_cast<TH1F *>(fQAProtonsAcceptedList->At(28));
735cc63d 454
455 //Rejected protons
456 TList *fQAProtonsRejectedList = dynamic_cast<TList *>(gListGlobalQA->At(2));
457 TH1F *gProtonsITSClustersReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(0));
458 TH1F *gProtonsChi2PerClusterITSReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(1));
459 TH1F *gProtonsTPCClustersReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(2));
460 TH1F *gProtonsChi2PerClusterTPCReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(3));
461 TH1F *gProtonsExtCov11Reject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(4));
462 TH1F *gProtonsExtCov22Reject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(5));
463 TH1F *gProtonsExtCov33Reject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(6));
464 TH1F *gProtonsExtCov44Reject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(7));
465 TH1F *gProtonsExtCov55Reject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(8));
466 TH1F *gProtonsSigmaToVertexReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(9));
467 TH1F *gProtonsSigmaToVertexTPCReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(10));
468 TH1F *gProtonsDCAXYReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(11));
469 TH1F *gProtonsDCAXYTPCReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(12));
470 TH1F *gProtonsDCAZReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(13));
471 TH1F *gProtonsDCAZTPCReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(14));
472 TH1F *gProtonsConstrainChi2Reject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(15));
473 TH1F *gProtonsITSRefitReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(16));
474 TH1F *gProtonsTPCRefitReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(17));
475 TH1F *gProtonsESDpidReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(18));
476 TH1F *gProtonsTPCpidReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(19));
477 TH1F *gProtonsPointOnITSLayer1Reject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(20));
478 TH1F *gProtonsPointOnITSLayer2Reject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(21));
479 TH1F *gProtonsPointOnITSLayer3Reject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(22));
480 TH1F *gProtonsPointOnITSLayer4Reject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(23));
481 TH1F *gProtonsPointOnITSLayer5Reject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(24));
482 TH1F *gProtonsPointOnITSLayer6Reject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(25));
483 TH1F *gProtonsNumberOfTPCdEdxPointsReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(26));
71a67ee1 484 TH1F *gProtonsITSClusterMapReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(27));
485 TH1F *gProtonsDCA3DReject = dynamic_cast<TH1F *>(fQAProtonsRejectedList->At(28));
735cc63d 486
487 //Accepted antiprotons
488 TList *fQAAntiProtonsAcceptedList = dynamic_cast<TList *>(gListGlobalQA->At(3));
489 TH1F *gAntiProtonsITSClustersPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(0));
490 TH1F *gAntiProtonsChi2PerClusterITSPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(1));
491 TH1F *gAntiProtonsTPCClustersPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(2));
492 TH1F *gAntiProtonsChi2PerClusterTPCPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(3));
493 TH1F *gAntiProtonsExtCov11Pass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(4));
494 TH1F *gAntiProtonsExtCov22Pass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(5));
495 TH1F *gAntiProtonsExtCov33Pass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(6));
496 TH1F *gAntiProtonsExtCov44Pass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(7));
497 TH1F *gAntiProtonsExtCov55Pass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(8));
498 TH1F *gAntiProtonsSigmaToVertexPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(9));
499 TH1F *gAntiProtonsSigmaToVertexTPCPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(10));
500 TH1F *gAntiProtonsDCAXYPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(11));
501 TH1F *gAntiProtonsDCAXYTPCPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(12));
502 TH1F *gAntiProtonsDCAZPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(13));
503 TH1F *gAntiProtonsDCAZTPCPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(14));
504 TH1F *gAntiProtonsConstrainChi2Pass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(15));
505 TH1F *gAntiProtonsITSRefitPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(16));
506 TH1F *gAntiProtonsTPCRefitPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(17));
507 TH1F *gAntiProtonsESDpidPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(18));
508 TH1F *gAntiProtonsTPCpidPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(19));
509 TH1F *gAntiProtonsPointOnITSLayer1Pass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(20));
510 TH1F *gAntiProtonsPointOnITSLayer2Pass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(21));
511 TH1F *gAntiProtonsPointOnITSLayer3Pass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(22));
512 TH1F *gAntiProtonsPointOnITSLayer4Pass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(23));
513 TH1F *gAntiProtonsPointOnITSLayer5Pass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(24));
514 TH1F *gAntiProtonsPointOnITSLayer6Pass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(25));
515 TH1F *gAntiProtonsNumberOfTPCdEdxPointsPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(26));
71a67ee1 516 TH1F *gAntiProtonsITSClusterMapPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(27));
517 TH1F *gAntiProtonsDCA3DPass = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(28));
735cc63d 518
519 //Rejected antiprotons
520 TList *fQAAntiProtonsRejectedList = dynamic_cast<TList *>(gListGlobalQA->At(4));
521 TH1F *gAntiProtonsITSClustersReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(0));
522 TH1F *gAntiProtonsChi2PerClusterITSReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(1));
523 TH1F *gAntiProtonsTPCClustersReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(2));
524 TH1F *gAntiProtonsChi2PerClusterTPCReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(3));
525 TH1F *gAntiProtonsExtCov11Reject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(4));
526 TH1F *gAntiProtonsExtCov22Reject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(5));
527 TH1F *gAntiProtonsExtCov33Reject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(6));
528 TH1F *gAntiProtonsExtCov44Reject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(7));
529 TH1F *gAntiProtonsExtCov55Reject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(8));
530 TH1F *gAntiProtonsSigmaToVertexReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(9));
531 TH1F *gAntiProtonsSigmaToVertexTPCReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(10));
532 TH1F *gAntiProtonsDCAXYReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(11));
533 TH1F *gAntiProtonsDCAXYTPCReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(12));
534 TH1F *gAntiProtonsDCAZReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(13));
535 TH1F *gAntiProtonsDCAZTPCReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(14));
536 TH1F *gAntiProtonsConstrainChi2Reject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(15));
537 TH1F *gAntiProtonsITSRefitReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(16));
538 TH1F *gAntiProtonsTPCRefitReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(17));
539 TH1F *gAntiProtonsESDpidReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(18));
540 TH1F *gAntiProtonsTPCpidReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(19));
541 TH1F *gAntiProtonsPointOnITSLayer1Reject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(20));
542 TH1F *gAntiProtonsPointOnITSLayer2Reject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(21));
543 TH1F *gAntiProtonsPointOnITSLayer3Reject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(22));
544 TH1F *gAntiProtonsPointOnITSLayer4Reject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(23));
545 TH1F *gAntiProtonsPointOnITSLayer5Reject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(24));
546 TH1F *gAntiProtonsPointOnITSLayer6Reject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(25));
547 TH1F *gAntiProtonsNumberOfTPCdEdxPointsReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(26));
71a67ee1 548 TH1F *gAntiProtonsITSClusterMapReject = dynamic_cast<TH1F *>(fQAAntiProtonsRejectedList->At(27));
549 TH1F *gAntiProtonsDCA3DReject = dynamic_cast<TH1F *>(fQAAntiProtonsAcceptedList->At(28));
735cc63d 550
551 //__________________________________________________//
790140ac 552 TCanvas *c1 = new TCanvas("c1","ITS clusters",0,0,600,400);
735cc63d 553 c1->SetFillColor(10); c1->SetHighLightColor(10);
554 c1->Divide(2,1);
555 c1->cd(1); gProtonsITSClustersPass->Draw();
556 gProtonsITSClustersReject->Draw("same");
557 c1->cd(2); gAntiProtonsITSClustersPass->Draw();
558 gAntiProtonsITSClustersReject->Draw("same");
559
790140ac 560 TCanvas *c2 = new TCanvas("c2","chi^2 per ITS cluster",0,100,600,400);
735cc63d 561 c2->SetFillColor(10); c2->SetHighLightColor(10);
562 c2->Divide(2,1);
563 c2->cd(1); gProtonsChi2PerClusterITSPass->Draw();
564 gProtonsChi2PerClusterITSReject->Draw("same");
565 c2->cd(2); gAntiProtonsChi2PerClusterITSPass->Draw();
566 gAntiProtonsChi2PerClusterITSReject->Draw("same");
567
790140ac 568 TCanvas *c3 = new TCanvas("c3","TPC clusters",0,200,600,400);
735cc63d 569 c3->SetFillColor(10); c3->SetHighLightColor(10);
570 c3->Divide(2,1);
571 c3->cd(1); gProtonsTPCClustersPass->Draw();
572 gProtonsTPCClustersReject->Draw("same");
573 c3->cd(2); gAntiProtonsTPCClustersPass->Draw();
574 gAntiProtonsTPCClustersReject->Draw("same");
575
790140ac 576 TCanvas *c4 = new TCanvas("c4","chi^2 per TPC cluster",0,300,600,400);
735cc63d 577 c4->SetFillColor(10); c4->SetHighLightColor(10);
578 c4->Divide(2,1);
579 c4->cd(1); gProtonsChi2PerClusterTPCPass->Draw();
580 gProtonsChi2PerClusterTPCReject->Draw("same");
581 c4->cd(2); gAntiProtonsChi2PerClusterTPCPass->Draw();
582 gAntiProtonsChi2PerClusterTPCReject->Draw("same");
583
37cb8683 584 if(gProtonsExtCov11Pass->GetEntries() != 0) {
585 TCanvas *c5 = new TCanvas("c5","Cov11",0,400,600,400);
586 c5->SetFillColor(10); c5->SetHighLightColor(10);
587 c5->Divide(2,1);
588 c5->cd(1)->SetLogy(); gProtonsExtCov11Pass->Draw();
589 gProtonsExtCov11Reject->Draw("same");
590 c5->cd(2)->SetLogy(); gAntiProtonsExtCov11Pass->Draw();
591 gAntiProtonsExtCov11Reject->Draw("same");
592 }
593
594 if(gProtonsExtCov11Pass->GetEntries() != 0) {
595 TCanvas *c6 = new TCanvas("c6","Cov22",0,500,600,400);
596 c6->SetFillColor(10); c6->SetHighLightColor(10);
597 c6->Divide(2,1);
598 c6->cd(1)->SetLogy(); gProtonsExtCov22Pass->Draw();
599 gProtonsExtCov22Reject->Draw("same");
600 c6->cd(2)->SetLogy(); gAntiProtonsExtCov22Pass->Draw();
601 gAntiProtonsExtCov22Reject->Draw("same");
602 }
603
604 if(gProtonsExtCov11Pass->GetEntries() != 0) {
605 TCanvas *c7 = new TCanvas("c7","Cov33",600,0,600,400);
606 c7->SetFillColor(10); c7->SetHighLightColor(10);
607 c7->Divide(2,1);
608 c7->cd(1)->SetLogy(); gProtonsExtCov33Pass->Draw();
609 gProtonsExtCov33Reject->Draw("same");
610 c7->cd(2)->SetLogy(); gAntiProtonsExtCov33Pass->Draw();
611 gAntiProtonsExtCov33Reject->Draw("same");
612 }
613
614 if(gProtonsExtCov11Pass->GetEntries() != 0) {
615 TCanvas *c8 = new TCanvas("c8","Cov44",600,100,600,400);
616 c8->SetFillColor(10); c8->SetHighLightColor(10);
617 c8->Divide(2,1);
618 c8->cd(1)->SetLogy(); gProtonsExtCov44Pass->Draw();
619 gProtonsExtCov44Reject->Draw("same");
620 c8->cd(2)->SetLogy(); gAntiProtonsExtCov44Pass->Draw();
621 gAntiProtonsExtCov44Reject->Draw("same");
622 }
623
624 if(gProtonsExtCov11Pass->GetEntries() != 0) {
625 TCanvas *c9 = new TCanvas("c9","Cov55",600,200,600,400);
626 c9->SetFillColor(10); c9->SetHighLightColor(10);
627 c9->Divide(2,1);
628 c9->cd(1)->SetLogy(); gProtonsExtCov55Pass->Draw();
629 gProtonsExtCov55Reject->Draw("same");
630 c9->cd(2)->SetLogy(); gAntiProtonsExtCov55Pass->Draw();
631 gAntiProtonsExtCov55Reject->Draw("same");
632 }
633
634 if(gProtonsSigmaToVertexPass->GetEntries() != 0) {
635 TCanvas *c10 = new TCanvas("c10","N-sigma to Vertex",600,300,600,400);
636 c10->SetFillColor(10); c10->SetHighLightColor(10);
637 c10->Divide(2,1);
638 c10->cd(1)->SetLogy(); gProtonsSigmaToVertexPass->Draw();
639 gProtonsSigmaToVertexReject->Draw("same");
640 c10->cd(2)->SetLogy(); gAntiProtonsSigmaToVertexPass->Draw();
641 gAntiProtonsSigmaToVertexReject->Draw("same");
642 }
643
644 if(gProtonsSigmaToVertexTPCPass->GetEntries() != 0) {
645 TCanvas *c11 = new TCanvas("c11","N-sigma to Vertex (TPC)",600,400,600,400);
646 c11->SetFillColor(10); c11->SetHighLightColor(10);
647 c11->Divide(2,1);
648 c11->cd(1)->SetLogy(); gProtonsSigmaToVertexTPCPass->Draw();
649 gProtonsSigmaToVertexTPCReject->Draw("same");
650 c11->cd(2)->SetLogy(); gAntiProtonsSigmaToVertexTPCPass->Draw();
651 gAntiProtonsSigmaToVertexTPCReject->Draw("same");
652 }
653
654 if(gProtonsDCAXYPass->GetEntries() != 0) {
655 TCanvas *c12 = new TCanvas("c12","dca(xy)",600,500,600,400);
656 c12->SetFillColor(10); c12->SetHighLightColor(10);
657 c12->Divide(2,1);
658 c12->cd(1)->SetLogy(); gProtonsDCAXYPass->Draw();
659 gProtonsDCAXYReject->Draw("same");
660 c12->cd(2)->SetLogy(); gAntiProtonsDCAXYPass->Draw();
661 gAntiProtonsDCAXYReject->Draw("same");
662 }
663
664 if(gProtonsDCAXYTPCPass->GetEntries() != 0) {
665 TCanvas *c13 = new TCanvas("c13","dca(xy - TPC)",1200,0,600,400);
666 c13->SetFillColor(10); c13->SetHighLightColor(10);
667 c13->Divide(2,1);
668 c13->cd(1)->SetLogy(); gProtonsDCAXYTPCPass->Draw();
669 gProtonsDCAXYTPCReject->Draw("same");
670 c13->cd(2)->SetLogy(); gAntiProtonsDCAXYTPCPass->Draw();
671 gAntiProtonsDCAXYTPCReject->Draw("same");
672 }
673
674 if(gProtonsDCAZPass->GetEntries() != 0) {
675 TCanvas *c14 = new TCanvas("c14","dca(z)",1200,100,600,400);
676 c14->SetFillColor(10); c14->SetHighLightColor(10);
677 c14->Divide(2,1);
678 c14->cd(1)->SetLogy(); gProtonsDCAZPass->Draw();
679 gProtonsDCAZReject->Draw("same");
680 c14->cd(2)->SetLogy(); gAntiProtonsDCAZPass->Draw();
681 gAntiProtonsDCAZReject->Draw("same");
682 }
683
684 if(gProtonsDCAZTPCPass->GetEntries() != 0) {
685 TCanvas *c15 = new TCanvas("c15","dca(z - TPC)",1200,200,600,400);
686 c15->SetFillColor(10); c15->SetHighLightColor(10);
687 c15->Divide(2,1);
688 c15->cd(1)->SetLogy(); gProtonsDCAZTPCPass->Draw();
689 gProtonsDCAZTPCReject->Draw("same");
690 c15->cd(2)->SetLogy(); gAntiProtonsDCAZTPCPass->Draw();
691 gAntiProtonsDCAZTPCReject->Draw("same");
692 }
735cc63d 693
790140ac 694 TCanvas *c16 = new TCanvas("c16","TPC clusters (dE/dx)",1200,300,600,400);
735cc63d 695 c16->SetFillColor(10); c16->SetHighLightColor(10);
696 c16->Divide(2,1);
697 c16->cd(1); gProtonsNumberOfTPCdEdxPointsPass->Draw();
698 gProtonsNumberOfTPCdEdxPointsReject->Draw("same");
699 c16->cd(2); gAntiProtonsNumberOfTPCdEdxPointsPass->Draw();
700 gAntiProtonsNumberOfTPCdEdxPointsReject->Draw("same");
701
71a67ee1 702 TCanvas *c17 = new TCanvas("c17","ITS cluster map",1200,400,600,400);
703 c17->SetFillColor(10); c17->SetHighLightColor(10);
704 c17->Divide(2,1);
705 c17->cd(1); gProtonsITSClusterMapPass->GetYaxis()->SetRangeUser(0,18000);
706 gProtonsITSClusterMapPass->Draw();
707 gProtonsITSClusterMapReject->Draw("same");
708 c17->cd(2); gAntiProtonsITSClusterMapPass->GetYaxis()->SetRangeUser(0,18000);
709 gAntiProtonsITSClusterMapPass->Draw();
710 gAntiProtonsITSClusterMapReject->Draw("same");
711
712 if(gProtonsDCA3DPass->GetEntries() != 0) {
713 TCanvas *c18 = new TCanvas("c18","DCA 3D",1200,500,600,400);
714 c18->SetFillColor(10); c18->SetHighLightColor(10);
715 c18->Divide(2,1);
716 c18->cd(1)->SetLogy(); gProtonsDCA3DPass->Draw();
717 gProtonsDCA3DReject->Draw("SAME");
718 c18->cd(2)->SetLogy(); gAntiProtonsDCA3DPass->Draw();
719 gAntiProtonsDCA3DReject->Draw("SAME");
720 }
721
735cc63d 722 //================Vertex QA================//
723 TList *gListVertexQA = dynamic_cast<TList *>(listQA->At(1));
724 TH1F *gHistVx = dynamic_cast<TH1F *>(gListVertexQA->At(0));
725 TH1F *gHistVxAccepted = dynamic_cast<TH1F *>(gListVertexQA->At(1));
726 gHistVxAccepted->SetFillColor(10);
727 TH1F *gHistVy = dynamic_cast<TH1F *>(gListVertexQA->At(2));
728 TH1F *gHistVyAccepted = dynamic_cast<TH1F *>(gListVertexQA->At(3));
729 gHistVyAccepted->SetFillColor(10);
730 TH1F *gHistVz = dynamic_cast<TH1F *>(gListVertexQA->At(4));
731 TH1F *gHistVzAccepted = dynamic_cast<TH1F *>(gListVertexQA->At(5));
732 gHistVzAccepted->SetFillColor(10);
e56f08ed 733 TH1F *gHistNumberOfContributors = dynamic_cast<TH1F *>(gListVertexQA->At(6));
734 gHistNumberOfContributors->SetFillColor(10);
735cc63d 735
790140ac 736 TCanvas *cVertex = new TCanvas("cVertex","Vertex QA",0,0,900,400);
735cc63d 737 cVertex->SetFillColor(10); cVertex->SetHighLightColor(10);
738 cVertex->Divide(3,1);
790140ac 739 cVertex->cd(1)->SetLogy(); gHistVx->Draw(); gHistVxAccepted->Draw("same");
740 cVertex->cd(2)->SetLogy(); gHistVy->Draw(); gHistVyAccepted->Draw("same");
741 cVertex->cd(3)->SetLogy(); gHistVz->Draw(); gHistVzAccepted->Draw("same");
e56f08ed 742
743 TCanvas *cVertexNContributors = new TCanvas("cVertexNContributors",
744 "Vertex QA",0,0,400,400);
745 gHistNumberOfContributors->Draw();
735cc63d 746}
629e3967 747
748//________________________________________________________//
749void PrintYields(TH1 *h) {
750 Double_t sum = 0.0, error = 0.0;
751 for(Int_t iBin = 1; iBin <= h->GetNbinsX(); iBin++) {
752 sum += h->GetBinContent(iBin);
753 error += TMath::Power(h->GetBinError(iBin),2);
754 }
755 error = TMath::Sqrt(error);
756
757 Printf("==================================");
758 Printf("Histogram: %s",h->GetName());
759 Printf("Yields: %lf - %lf",sum,error);
760 Printf("==================================");
761}
7ec0d93f 762
763//___________________________________________________//
f81f1b19 764void drawdEdx(TH2F *gHistdEdxP, Int_t iMode) {
7ec0d93f 765 //Draws the dE/dx distributions for the different momentum bins
f81f1b19 766 //iMode == 0: dEdx vs P
767 //iMode == 1: normalized(dEdx) vs P
7ec0d93f 768 TString title;
769 TH1D *gHist[100];
770 Int_t iCounter = 0;
771 Double_t binMin = gHistdEdxP->GetXaxis()->GetXmin();
772 Double_t binMax = gHistdEdxP->GetXaxis()->GetXmin() +
773 (gHistdEdxP->GetXaxis()->GetXmax() - gHistdEdxP->GetXaxis()->GetXmin())/gHistdEdxP->GetNbinsX();
774
775 TCanvas *c[100];
762a6c16 776 TString canvasTitle;
7ec0d93f 777
778 for(Int_t iBin = 1; iBin <= gHistdEdxP->GetNbinsX(); iBin++) {
6ad38cc1 779 if((binMax > 0.45)&&(binMin < 1.05)) {
f81f1b19 780 if(iMode == 0) {
781 title = "(dEdx)P: "; title += binMin; title += " - ";
782 title += binMax; title += "GeV/c";
783 canvasTitle = "dedxMomentumSlice."; canvasTitle += iCounter;
784 canvasTitle += ".gif";
785 c[iCounter] = new TCanvas(title.Data(),title.Data(),0,0,500,500);
786 }
787 if(iMode == 1) {
788 title = "(normdEdx)P: "; title += binMin; title += " - ";
789 title += binMax; title += "GeV/c";
790 canvasTitle = "normdedxMomentumSlice."; canvasTitle += iCounter;
791 canvasTitle += ".gif";
792 c[iCounter] = new TCanvas(title.Data(),title.Data(),500,0,500,500);
793 }
7ec0d93f 794 c[iCounter]->SetFillColor(10); c[iCounter]->SetHighLightColor(10);
762a6c16 795 gHist[iCounter] = gHistdEdxP->ProjectionY(title.Data(),iBin,iBin+1);
7ec0d93f 796 gHist[iCounter]->SetTitle(title.Data());
797 gHist[iCounter]->SetStats(kFALSE);
f81f1b19 798 if(iMode == 0)
799 gHist[iCounter]->GetXaxis()->SetRangeUser(0.0,300.);
800 if(iMode == 1)
801 gHist[iCounter]->GetXaxis()->SetRangeUser(-2.0,2.0);
7ec0d93f 802 if(gHist[iCounter]->GetEntries() != 0)
803 c[iCounter]->SetLogy();
6ad38cc1 804 gHist[iCounter]->Draw("E");
762a6c16 805 c[iCounter]->SaveAs(canvasTitle.Data());
806 //Printf("Bin: %d - Pmin: %lf - Pmax: %lf : %s",iBin,binMin,binMax,title.Data());
7ec0d93f 807 iCounter += 1;
808 }
809 binMin += (gHistdEdxP->GetXaxis()->GetXmax() - gHistdEdxP->GetXaxis()->GetXmin())/gHistdEdxP->GetNbinsX();
810 binMax += (gHistdEdxP->GetXaxis()->GetXmax() - gHistdEdxP->GetXaxis()->GetXmin())/gHistdEdxP->GetNbinsX();
811 }
812
813}
762a6c16 814
815//___________________________________________________//
816void drawMCvsData(const char* analysisOutputMC,
817 const char* analysisOutputData) {
818 //Draws the QA plots from the output of the analysis
819 //=========================================================//
820 gStyle->SetPalette(1,0);
821
822 //=========================================================//
823 //QA MC plots
824 TFile *fMC = TFile::Open(analysisOutputMC);
825 TList *listQAMC = dynamic_cast<TList *>(fMC->Get("outputQAList"));
826 TList *gListGlobalQAMC = dynamic_cast<TList *>(listQAMC->At(0));
827
828 //================QA plots================//
829 TList *fQAMC2DList = dynamic_cast<TList *>(gListGlobalQAMC->At(0));
830
831 //Rejected protons
832 TList *fQAMCProtonsRejectedList = dynamic_cast<TList *>(gListGlobalQAMC->At(2));
833 TH1F *gMCProtonsITSClustersReject = dynamic_cast<TH1F *>(fQAMCProtonsRejectedList->At(0));
834 TH1F *gMCProtonsTPCClustersReject = dynamic_cast<TH1F *>(fQAMCProtonsRejectedList->At(2));
835 TH1F *gMCProtonsChi2PerClusterTPCReject = dynamic_cast<TH1F *>(fQAMCProtonsRejectedList->At(3));
836 TH1F *gMCProtonsExtCov11Reject = dynamic_cast<TH1F *>(fQAMCProtonsRejectedList->At(4));
837 TH1F *gMCProtonsExtCov22Reject = dynamic_cast<TH1F *>(fQAMCProtonsRejectedList->At(5));
838 TH1F *gMCProtonsExtCov33Reject = dynamic_cast<TH1F *>(fQAMCProtonsRejectedList->At(6));
839 TH1F *gMCProtonsExtCov44Reject = dynamic_cast<TH1F *>(fQAMCProtonsRejectedList->At(7));
840 TH1F *gMCProtonsExtCov55Reject = dynamic_cast<TH1F *>(fQAMCProtonsRejectedList->At(8));
841 TH1F *gMCProtonsDCAXYReject = dynamic_cast<TH1F *>(fQAMCProtonsRejectedList->At(11));
842 TH1F *gMCProtonsDCAZReject = dynamic_cast<TH1F *>(fQAMCProtonsRejectedList->At(13));
843 TH1F *gMCProtonsNumberOfTPCdEdxPointsReject = dynamic_cast<TH1F *>(fQAMCProtonsRejectedList->At(26));
844
845 //Accepted protons
846 TList *fQAMCProtonsAcceptedList = dynamic_cast<TList *>(gListGlobalQAMC->At(1));
847 TH1F *gMCProtonsITSClustersPass = dynamic_cast<TH1F *>(fQAMCProtonsAcceptedList->At(0));
848 gMCProtonsITSClustersPass->SetStats(kFALSE);
849 gMCProtonsITSClustersPass->Add(gMCProtonsITSClustersReject);
850 gMCProtonsITSClustersPass->Sumw2();
851 gMCProtonsITSClustersPass->Scale(1./gMCProtonsITSClustersPass->Integral(1,gMCProtonsITSClustersPass->GetNbinsX()));
852 gMCProtonsITSClustersPass->SetMarkerStyle(20);
853 TH1F *gMCProtonsTPCClustersPass = dynamic_cast<TH1F *>(fQAMCProtonsAcceptedList->At(2));
854 gMCProtonsTPCClustersPass->SetStats(kFALSE);
855 gMCProtonsTPCClustersPass->Add(gMCProtonsTPCClustersReject);
856 gMCProtonsTPCClustersPass->Sumw2();
857 gMCProtonsTPCClustersPass->Scale(1./gMCProtonsTPCClustersPass->Integral(1,gMCProtonsTPCClustersPass->GetNbinsX()));
858 gMCProtonsTPCClustersPass->SetMarkerStyle(20);
859 TH1F *gMCProtonsChi2PerClusterTPCPass = dynamic_cast<TH1F *>(fQAMCProtonsAcceptedList->At(3));
860 gMCProtonsChi2PerClusterTPCPass->SetStats(kFALSE);
861 gMCProtonsChi2PerClusterTPCPass->Add(gMCProtonsChi2PerClusterTPCReject);
862 gMCProtonsChi2PerClusterTPCPass->Sumw2();
863 gMCProtonsChi2PerClusterTPCPass->Scale(1./gMCProtonsChi2PerClusterTPCPass->Integral(1,gMCProtonsChi2PerClusterTPCPass->GetNbinsX()));
864 gMCProtonsChi2PerClusterTPCPass->SetMarkerStyle(20);
865 TH1F *gMCProtonsExtCov11Pass = dynamic_cast<TH1F *>(fQAMCProtonsAcceptedList->At(4));
866 gMCProtonsExtCov11Pass->SetStats(kFALSE);
867 gMCProtonsExtCov11Pass->Add(gMCProtonsExtCov11Reject);
868 gMCProtonsExtCov11Pass->Sumw2();
869 gMCProtonsExtCov11Pass->Scale(1./gMCProtonsExtCov11Pass->Integral(1,gMCProtonsExtCov11Pass->GetNbinsX()));
870 gMCProtonsExtCov11Pass->SetMarkerStyle(20);
871 TH1F *gMCProtonsExtCov22Pass = dynamic_cast<TH1F *>(fQAMCProtonsAcceptedList->At(5));
872 gMCProtonsExtCov22Pass->SetStats(kFALSE);
873 gMCProtonsExtCov22Pass->Add(gMCProtonsExtCov22Reject);
874 gMCProtonsExtCov22Pass->Sumw2();
875 gMCProtonsExtCov22Pass->Scale(1./gMCProtonsExtCov22Pass->Integral(1,gMCProtonsExtCov22Pass->GetNbinsX()));
876 gMCProtonsExtCov22Pass->SetMarkerStyle(20);
877 TH1F *gMCProtonsExtCov33Pass = dynamic_cast<TH1F *>(fQAMCProtonsAcceptedList->At(6));
878 gMCProtonsExtCov33Pass->SetStats(kFALSE);
879 gMCProtonsExtCov33Pass->Add(gMCProtonsExtCov33Reject);
880 gMCProtonsExtCov33Pass->Sumw2();
881 gMCProtonsExtCov33Pass->Scale(1./gMCProtonsExtCov33Pass->Integral(1,gMCProtonsExtCov33Pass->GetNbinsX()));
882 gMCProtonsExtCov33Pass->SetMarkerStyle(20);
883 TH1F *gMCProtonsExtCov44Pass = dynamic_cast<TH1F *>(fQAMCProtonsAcceptedList->At(7));
884 gMCProtonsExtCov44Pass->SetStats(kFALSE);
885 gMCProtonsExtCov44Pass->Add(gMCProtonsExtCov44Reject);
886 gMCProtonsExtCov44Pass->Sumw2();
887 gMCProtonsExtCov44Pass->Scale(1./gMCProtonsExtCov44Pass->Integral(1,gMCProtonsExtCov44Pass->GetNbinsX()));
888 gMCProtonsExtCov44Pass->SetMarkerStyle(20);
889 TH1F *gMCProtonsExtCov55Pass = dynamic_cast<TH1F *>(fQAMCProtonsAcceptedList->At(8));
890 gMCProtonsExtCov55Pass->SetStats(kFALSE);
891 gMCProtonsExtCov55Pass->Add(gMCProtonsExtCov55Reject);
892 gMCProtonsExtCov55Pass->Sumw2();
893 gMCProtonsExtCov55Pass->Scale(1./gMCProtonsExtCov55Pass->Integral(1,gMCProtonsExtCov55Pass->GetNbinsX()));
894 gMCProtonsExtCov55Pass->SetMarkerStyle(20);
895 TH1F *gMCProtonsDCAXYPass = dynamic_cast<TH1F *>(fQAMCProtonsAcceptedList->At(11));
896 gMCProtonsDCAXYPass->SetStats(kFALSE);
897 gMCProtonsDCAXYPass->Add(gMCProtonsDCAXYReject);
898 gMCProtonsDCAXYPass->Sumw2();
899 gMCProtonsDCAXYPass->Scale(1./gMCProtonsDCAXYPass->Integral(1,gMCProtonsDCAXYPass->GetNbinsX()));
900 gMCProtonsDCAXYPass->SetMarkerStyle(20);
901 TH1F *gMCProtonsDCAZPass = dynamic_cast<TH1F *>(fQAMCProtonsAcceptedList->At(13));
902 gMCProtonsDCAZPass->SetStats(kFALSE);
903 gMCProtonsDCAZPass->Add(gMCProtonsDCAZReject);
904 gMCProtonsDCAZPass->Sumw2();
905 gMCProtonsDCAZPass->Scale(1./gMCProtonsDCAZPass->Integral(1,gMCProtonsDCAZPass->GetNbinsX()));
906 gMCProtonsDCAZPass->SetMarkerStyle(20);
907 TH1F *gMCProtonsNumberOfTPCdEdxPointsPass = dynamic_cast<TH1F *>(fQAMCProtonsAcceptedList->At(26));
908 gMCProtonsNumberOfTPCdEdxPointsPass->SetStats(kFALSE);
909 gMCProtonsNumberOfTPCdEdxPointsPass->Add(gMCProtonsNumberOfTPCdEdxPointsReject);
910 gMCProtonsNumberOfTPCdEdxPointsPass->Sumw2();
911 gMCProtonsNumberOfTPCdEdxPointsPass->Scale(1./gMCProtonsNumberOfTPCdEdxPointsPass->Integral(1,gMCProtonsNumberOfTPCdEdxPointsPass->GetNbinsX()));
912 gMCProtonsNumberOfTPCdEdxPointsPass->SetMarkerStyle(20);
913
914 //Rejected antiprotons
915 TList *fQAMCAntiProtonsRejectedList = dynamic_cast<TList *>(gListGlobalQAMC->At(4));
916 TH1F *gMCAntiProtonsITSClustersReject = dynamic_cast<TH1F *>(fQAMCAntiProtonsRejectedList->At(0));
917 TH1F *gMCAntiProtonsTPCClustersReject = dynamic_cast<TH1F *>(fQAMCAntiProtonsRejectedList->At(2));
918 TH1F *gMCAntiProtonsChi2PerClusterTPCReject = dynamic_cast<TH1F *>(fQAMCAntiProtonsRejectedList->At(3));
919 TH1F *gMCAntiProtonsExtCov11Reject = dynamic_cast<TH1F *>(fQAMCAntiProtonsRejectedList->At(4));
920 TH1F *gMCAntiProtonsExtCov22Reject = dynamic_cast<TH1F *>(fQAMCAntiProtonsRejectedList->At(5));
921 TH1F *gMCAntiProtonsExtCov33Reject = dynamic_cast<TH1F *>(fQAMCAntiProtonsRejectedList->At(6));
922 TH1F *gMCAntiProtonsExtCov44Reject = dynamic_cast<TH1F *>(fQAMCAntiProtonsRejectedList->At(7));
923 TH1F *gMCAntiProtonsExtCov55Reject = dynamic_cast<TH1F *>(fQAMCAntiProtonsRejectedList->At(8));
924 TH1F *gMCAntiProtonsDCAXYReject = dynamic_cast<TH1F *>(fQAMCAntiProtonsRejectedList->At(11));
925 TH1F *gMCAntiProtonsDCAZReject = dynamic_cast<TH1F *>(fQAMCAntiProtonsRejectedList->At(13));
926 TH1F *gMCAntiProtonsNumberOfTPCdEdxPointsReject = dynamic_cast<TH1F *>(fQAMCAntiProtonsRejectedList->At(26));
927
928 //Accepted protons
929 TList *fQAMCAntiProtonsAcceptedList = dynamic_cast<TList *>(gListGlobalQAMC->At(3));
930 TH1F *gMCAntiProtonsITSClustersPass = dynamic_cast<TH1F *>(fQAMCAntiProtonsAcceptedList->At(0));
931 gMCAntiProtonsITSClustersPass->SetStats(kFALSE);
932 gMCAntiProtonsITSClustersPass->Add(gMCAntiProtonsITSClustersReject);
933 gMCAntiProtonsITSClustersPass->Sumw2();
934 gMCAntiProtonsITSClustersPass->Scale(1./gMCAntiProtonsITSClustersPass->Integral(1,gMCAntiProtonsITSClustersPass->GetNbinsX()));
935 gMCAntiProtonsITSClustersPass->SetMarkerStyle(20);
936 TH1F *gMCAntiProtonsTPCClustersPass = dynamic_cast<TH1F *>(fQAMCAntiProtonsAcceptedList->At(2));
937 gMCAntiProtonsTPCClustersPass->SetStats(kFALSE);
938 gMCAntiProtonsTPCClustersPass->Add(gMCAntiProtonsTPCClustersReject);
939 gMCAntiProtonsTPCClustersPass->Sumw2();
940 gMCAntiProtonsTPCClustersPass->Scale(1./gMCAntiProtonsTPCClustersPass->Integral(1,gMCAntiProtonsTPCClustersPass->GetNbinsX()));
941 gMCAntiProtonsTPCClustersPass->SetMarkerStyle(20);
942 TH1F *gMCAntiProtonsChi2PerClusterTPCPass = dynamic_cast<TH1F *>(fQAMCAntiProtonsAcceptedList->At(3));
943 gMCAntiProtonsChi2PerClusterTPCPass->SetStats(kFALSE);
944 gMCAntiProtonsChi2PerClusterTPCPass->Add(gMCAntiProtonsChi2PerClusterTPCReject);
945 gMCAntiProtonsChi2PerClusterTPCPass->Sumw2();
946 gMCAntiProtonsChi2PerClusterTPCPass->Scale(1./gMCAntiProtonsChi2PerClusterTPCPass->Integral(1,gMCAntiProtonsChi2PerClusterTPCPass->GetNbinsX()));
947 gMCAntiProtonsChi2PerClusterTPCPass->SetMarkerStyle(20);
948 TH1F *gMCAntiProtonsExtCov11Pass = dynamic_cast<TH1F *>(fQAMCAntiProtonsAcceptedList->At(4));
949 gMCAntiProtonsExtCov11Pass->SetStats(kFALSE);
950 gMCAntiProtonsExtCov11Pass->Add(gMCAntiProtonsExtCov11Reject);
951 gMCAntiProtonsExtCov11Pass->Sumw2();
952 gMCAntiProtonsExtCov11Pass->Scale(1./gMCAntiProtonsExtCov11Pass->Integral(1,gMCAntiProtonsExtCov11Pass->GetNbinsX()));
953 gMCAntiProtonsExtCov11Pass->SetMarkerStyle(20);
954 TH1F *gMCAntiProtonsExtCov22Pass = dynamic_cast<TH1F *>(fQAMCAntiProtonsAcceptedList->At(5));
955 gMCAntiProtonsExtCov22Pass->SetStats(kFALSE);
956 gMCAntiProtonsExtCov22Pass->Add(gMCAntiProtonsExtCov22Reject);
957 gMCAntiProtonsExtCov22Pass->Sumw2();
958 gMCAntiProtonsExtCov22Pass->Scale(1./gMCAntiProtonsExtCov22Pass->Integral(1,gMCAntiProtonsExtCov22Pass->GetNbinsX()));
959 gMCAntiProtonsExtCov22Pass->SetMarkerStyle(20);
960 TH1F *gMCAntiProtonsExtCov33Pass = dynamic_cast<TH1F *>(fQAMCAntiProtonsAcceptedList->At(6));
961 gMCAntiProtonsExtCov33Pass->SetStats(kFALSE);
962 gMCAntiProtonsExtCov33Pass->Add(gMCAntiProtonsExtCov33Reject);
963 gMCAntiProtonsExtCov33Pass->Sumw2();
964 gMCAntiProtonsExtCov33Pass->Scale(1./gMCAntiProtonsExtCov33Pass->Integral(1,gMCAntiProtonsExtCov33Pass->GetNbinsX()));
965 gMCAntiProtonsExtCov33Pass->SetMarkerStyle(20);
966 TH1F *gMCAntiProtonsExtCov44Pass = dynamic_cast<TH1F *>(fQAMCAntiProtonsAcceptedList->At(7));
967 gMCAntiProtonsExtCov44Pass->SetStats(kFALSE);
968 gMCAntiProtonsExtCov44Pass->Add(gMCAntiProtonsExtCov44Reject);
969 gMCAntiProtonsExtCov44Pass->Sumw2();
970 gMCAntiProtonsExtCov44Pass->Scale(1./gMCAntiProtonsExtCov44Pass->Integral(1,gMCAntiProtonsExtCov44Pass->GetNbinsX()));
971 gMCAntiProtonsExtCov44Pass->SetMarkerStyle(20);
972 TH1F *gMCAntiProtonsExtCov55Pass = dynamic_cast<TH1F *>(fQAMCAntiProtonsAcceptedList->At(8));
973 gMCAntiProtonsExtCov55Pass->SetStats(kFALSE);
974 gMCAntiProtonsExtCov55Pass->Add(gMCAntiProtonsExtCov55Reject);
975 gMCAntiProtonsExtCov55Pass->Sumw2();
976 gMCAntiProtonsExtCov55Pass->Scale(1./gMCAntiProtonsExtCov55Pass->Integral(1,gMCAntiProtonsExtCov55Pass->GetNbinsX()));
977 gMCAntiProtonsExtCov55Pass->SetMarkerStyle(20);
978 TH1F *gMCAntiProtonsDCAXYPass = dynamic_cast<TH1F *>(fQAMCAntiProtonsAcceptedList->At(11));
979 gMCAntiProtonsDCAXYPass->SetStats(kFALSE);
980 gMCAntiProtonsDCAXYPass->Add(gMCAntiProtonsDCAXYReject);
981 gMCAntiProtonsDCAXYPass->Sumw2();
982 gMCAntiProtonsDCAXYPass->Scale(1./gMCAntiProtonsDCAXYPass->Integral(1,gMCAntiProtonsDCAXYPass->GetNbinsX()));
983 gMCAntiProtonsDCAXYPass->SetMarkerStyle(20);
984 TH1F *gMCAntiProtonsDCAZPass = dynamic_cast<TH1F *>(fQAMCAntiProtonsAcceptedList->At(13));
985 gMCAntiProtonsDCAZPass->SetStats(kFALSE);
986 gMCAntiProtonsDCAZPass->Add(gMCAntiProtonsDCAZReject);
987 gMCAntiProtonsDCAZPass->Sumw2();
988 gMCAntiProtonsDCAZPass->Scale(1./gMCAntiProtonsDCAZPass->Integral(1,gMCAntiProtonsDCAZPass->GetNbinsX()));
989 gMCAntiProtonsDCAZPass->SetMarkerStyle(20);
990 TH1F *gMCAntiProtonsNumberOfTPCdEdxPointsPass = dynamic_cast<TH1F *>(fQAMCAntiProtonsAcceptedList->At(26));
991 gMCAntiProtonsNumberOfTPCdEdxPointsPass->SetStats(kFALSE);
992 gMCAntiProtonsNumberOfTPCdEdxPointsPass->Add(gMCAntiProtonsNumberOfTPCdEdxPointsReject);
993 gMCAntiProtonsNumberOfTPCdEdxPointsPass->Sumw2();
994 gMCAntiProtonsNumberOfTPCdEdxPointsPass->Scale(1./gMCAntiProtonsNumberOfTPCdEdxPointsPass->Integral(1,gMCAntiProtonsNumberOfTPCdEdxPointsPass->GetNbinsX()));
995 gMCAntiProtonsNumberOfTPCdEdxPointsPass->SetMarkerStyle(20);
996
997 //=========================================================//
998 //QA data plots
999 TFile *fData = TFile::Open(analysisOutputData);
1000 TList *listQAData = dynamic_cast<TList *>(fData->Get("outputQAList"));
1001 TList *gListGlobalQAData = dynamic_cast<TList *>(listQAData->At(0));
1002
1003 //================QA plots================//
1004 TList *fQAData2DList = dynamic_cast<TList *>(gListGlobalQAData->At(0));
1005
1006 //Rejected protons
1007 TList *fQADataProtonsRejectedList = dynamic_cast<TList *>(gListGlobalQAData->At(2));
1008 TH1F *gDataProtonsITSClustersReject = dynamic_cast<TH1F *>(fQADataProtonsRejectedList->At(0));
1009 TH1F *gDataProtonsTPCClustersReject = dynamic_cast<TH1F *>(fQADataProtonsRejectedList->At(2));
1010 TH1F *gDataProtonsChi2PerClusterTPCReject = dynamic_cast<TH1F *>(fQADataProtonsRejectedList->At(3));
1011 TH1F *gDataProtonsExtCov11Reject = dynamic_cast<TH1F *>(fQADataProtonsRejectedList->At(4));
1012 TH1F *gDataProtonsExtCov22Reject = dynamic_cast<TH1F *>(fQADataProtonsRejectedList->At(5));
1013 TH1F *gDataProtonsExtCov33Reject = dynamic_cast<TH1F *>(fQADataProtonsRejectedList->At(6));
1014 TH1F *gDataProtonsExtCov44Reject = dynamic_cast<TH1F *>(fQADataProtonsRejectedList->At(7));
1015 TH1F *gDataProtonsExtCov55Reject = dynamic_cast<TH1F *>(fQADataProtonsRejectedList->At(8));
1016 TH1F *gDataProtonsDCAXYReject = dynamic_cast<TH1F *>(fQADataProtonsRejectedList->At(11));
1017 TH1F *gDataProtonsDCAZReject = dynamic_cast<TH1F *>(fQADataProtonsRejectedList->At(13));
1018 TH1F *gDataProtonsNumberOfTPCdEdxPointsReject = dynamic_cast<TH1F *>(fQADataProtonsRejectedList->At(26));
1019
1020 //Accepted protons
1021 TList *fQADataProtonsAcceptedList = dynamic_cast<TList *>(gListGlobalQAData->At(1));
1022 TH1F *gDataProtonsITSClustersPass = dynamic_cast<TH1F *>(fQADataProtonsAcceptedList->At(0));
1023 gDataProtonsITSClustersPass->SetStats(kFALSE);
1024 gDataProtonsITSClustersPass->Add(gDataProtonsITSClustersReject);
1025 gDataProtonsITSClustersPass->Sumw2();
1026 gDataProtonsITSClustersPass->Scale(1./gDataProtonsITSClustersPass->Integral(1,gDataProtonsITSClustersPass->GetNbinsX()));
ce9d2201 1027 gDataProtonsITSClustersPass->SetMarkerStyle(1);
762a6c16 1028 TH1F *gDataProtonsTPCClustersPass = dynamic_cast<TH1F *>(fQADataProtonsAcceptedList->At(2));
1029 gDataProtonsTPCClustersPass->SetStats(kFALSE);
1030 gDataProtonsTPCClustersPass->Add(gDataProtonsTPCClustersReject);
1031 gDataProtonsTPCClustersPass->Sumw2();
1032 gDataProtonsTPCClustersPass->Scale(1./gDataProtonsTPCClustersPass->Integral(1,gDataProtonsTPCClustersPass->GetNbinsX()));
ce9d2201 1033 gDataProtonsTPCClustersPass->SetMarkerStyle(1);
762a6c16 1034 TH1F *gDataProtonsChi2PerClusterTPCPass = dynamic_cast<TH1F *>(fQADataProtonsAcceptedList->At(3));
1035 gDataProtonsChi2PerClusterTPCPass->SetStats(kFALSE);
1036 gDataProtonsChi2PerClusterTPCPass->Add(gDataProtonsChi2PerClusterTPCReject);
1037 gDataProtonsChi2PerClusterTPCPass->Sumw2();
1038 gDataProtonsChi2PerClusterTPCPass->Scale(1./gDataProtonsChi2PerClusterTPCPass->Integral(1,gDataProtonsChi2PerClusterTPCPass->GetNbinsX()));
ce9d2201 1039 gDataProtonsChi2PerClusterTPCPass->SetMarkerStyle(1);
762a6c16 1040 TH1F *gDataProtonsExtCov11Pass = dynamic_cast<TH1F *>(fQADataProtonsAcceptedList->At(4));
1041 gDataProtonsExtCov11Pass->SetStats(kFALSE);
1042 gDataProtonsExtCov11Pass->Add(gDataProtonsExtCov11Reject);
1043 gDataProtonsExtCov11Pass->Sumw2();
1044 gDataProtonsExtCov11Pass->Scale(1./gDataProtonsExtCov11Pass->Integral(1,gDataProtonsExtCov11Pass->GetNbinsX()));
ce9d2201 1045 gDataProtonsExtCov11Pass->SetMarkerStyle(1);
762a6c16 1046 TH1F *gDataProtonsExtCov22Pass = dynamic_cast<TH1F *>(fQADataProtonsAcceptedList->At(5));
1047 gDataProtonsExtCov22Pass->SetStats(kFALSE);
1048 gDataProtonsExtCov22Pass->Add(gDataProtonsExtCov22Reject);
1049 gDataProtonsExtCov22Pass->Sumw2();
1050 gDataProtonsExtCov22Pass->Scale(1./gDataProtonsExtCov22Pass->Integral(1,gDataProtonsExtCov22Pass->GetNbinsX()));
ce9d2201 1051 gDataProtonsExtCov22Pass->SetMarkerStyle(1);
762a6c16 1052 TH1F *gDataProtonsExtCov33Pass = dynamic_cast<TH1F *>(fQADataProtonsAcceptedList->At(6));
1053 gDataProtonsExtCov33Pass->SetStats(kFALSE);
1054 gDataProtonsExtCov33Pass->Add(gDataProtonsExtCov33Reject);
1055 gDataProtonsExtCov33Pass->Sumw2();
1056 gDataProtonsExtCov33Pass->Scale(1./gDataProtonsExtCov33Pass->Integral(1,gDataProtonsExtCov33Pass->GetNbinsX()));
ce9d2201 1057 gDataProtonsExtCov33Pass->SetMarkerStyle(1);
762a6c16 1058 TH1F *gDataProtonsExtCov44Pass = dynamic_cast<TH1F *>(fQADataProtonsAcceptedList->At(7));
1059 gDataProtonsExtCov44Pass->SetStats(kFALSE);
1060 gDataProtonsExtCov44Pass->Add(gDataProtonsExtCov44Reject);
1061 gDataProtonsExtCov44Pass->Sumw2();
1062 gDataProtonsExtCov44Pass->Scale(1./gDataProtonsExtCov44Pass->Integral(1,gDataProtonsExtCov44Pass->GetNbinsX()));
ce9d2201 1063 gDataProtonsExtCov44Pass->SetMarkerStyle(1);
762a6c16 1064 TH1F *gDataProtonsExtCov55Pass = dynamic_cast<TH1F *>(fQADataProtonsAcceptedList->At(8));
1065 gDataProtonsExtCov55Pass->SetStats(kFALSE);
1066 gDataProtonsExtCov55Pass->Add(gDataProtonsExtCov55Reject);
1067 gDataProtonsExtCov55Pass->Sumw2();
1068 gDataProtonsExtCov55Pass->Scale(1./gDataProtonsExtCov55Pass->Integral(1,gDataProtonsExtCov55Pass->GetNbinsX()));
ce9d2201 1069 gDataProtonsExtCov55Pass->SetMarkerStyle(1);
762a6c16 1070 TH1F *gDataProtonsDCAXYPass = dynamic_cast<TH1F *>(fQADataProtonsAcceptedList->At(11));
1071 gDataProtonsDCAXYPass->SetStats(kFALSE);
1072 gDataProtonsDCAXYPass->Add(gDataProtonsDCAXYReject);
1073 gDataProtonsDCAXYPass->Sumw2();
1074 gDataProtonsDCAXYPass->Scale(1./gDataProtonsDCAXYPass->Integral(1,gDataProtonsDCAXYPass->GetNbinsX()));
ce9d2201 1075 gDataProtonsDCAXYPass->SetMarkerStyle(1);
762a6c16 1076 TH1F *gDataProtonsDCAZPass = dynamic_cast<TH1F *>(fQADataProtonsAcceptedList->At(13));
1077 gDataProtonsDCAZPass->SetStats(kFALSE);
1078 gDataProtonsDCAZPass->Add(gDataProtonsDCAZReject);
1079 gDataProtonsDCAZPass->Sumw2();
1080 gDataProtonsDCAZPass->Scale(1./gDataProtonsDCAZPass->Integral(1,gDataProtonsDCAZPass->GetNbinsX()));
ce9d2201 1081 gDataProtonsDCAZPass->SetMarkerStyle(1);
762a6c16 1082 TH1F *gDataProtonsNumberOfTPCdEdxPointsPass = dynamic_cast<TH1F *>(fQADataProtonsAcceptedList->At(26));
1083 gDataProtonsNumberOfTPCdEdxPointsPass->SetStats(kFALSE);
1084 gDataProtonsNumberOfTPCdEdxPointsPass->Add(gDataProtonsNumberOfTPCdEdxPointsReject);
1085 gDataProtonsNumberOfTPCdEdxPointsPass->Sumw2();
1086 gDataProtonsNumberOfTPCdEdxPointsPass->Scale(1./gDataProtonsNumberOfTPCdEdxPointsPass->Integral(1,gDataProtonsNumberOfTPCdEdxPointsPass->GetNbinsX()));
ce9d2201 1087 gDataProtonsNumberOfTPCdEdxPointsPass->SetMarkerStyle(1);
762a6c16 1088
1089 //Rejected antiprotons
1090 TList *fQADataAntiProtonsRejectedList = dynamic_cast<TList *>(gListGlobalQAData->At(4));
1091 TH1F *gDataAntiProtonsITSClustersReject = dynamic_cast<TH1F *>(fQADataAntiProtonsRejectedList->At(0));
1092 TH1F *gDataAntiProtonsTPCClustersReject = dynamic_cast<TH1F *>(fQADataAntiProtonsRejectedList->At(2));
1093 TH1F *gDataAntiProtonsChi2PerClusterTPCReject = dynamic_cast<TH1F *>(fQADataAntiProtonsRejectedList->At(3));
1094 TH1F *gDataAntiProtonsExtCov11Reject = dynamic_cast<TH1F *>(fQADataAntiProtonsRejectedList->At(4));
1095 TH1F *gDataAntiProtonsExtCov22Reject = dynamic_cast<TH1F *>(fQADataAntiProtonsRejectedList->At(5));
1096 TH1F *gDataAntiProtonsExtCov33Reject = dynamic_cast<TH1F *>(fQADataAntiProtonsRejectedList->At(6));
1097 TH1F *gDataAntiProtonsExtCov44Reject = dynamic_cast<TH1F *>(fQADataAntiProtonsRejectedList->At(7));
1098 TH1F *gDataAntiProtonsExtCov55Reject = dynamic_cast<TH1F *>(fQADataAntiProtonsRejectedList->At(8));
1099 TH1F *gDataAntiProtonsDCAXYReject = dynamic_cast<TH1F *>(fQADataAntiProtonsRejectedList->At(11));
1100 TH1F *gDataAntiProtonsDCAZReject = dynamic_cast<TH1F *>(fQADataAntiProtonsRejectedList->At(13));
1101 TH1F *gDataAntiProtonsNumberOfTPCdEdxPointsReject = dynamic_cast<TH1F *>(fQADataAntiProtonsRejectedList->At(26));
1102
1103 //Accepted protons
1104 TList *fQADataAntiProtonsAcceptedList = dynamic_cast<TList *>(gListGlobalQAData->At(3));
1105 TH1F *gDataAntiProtonsITSClustersPass = dynamic_cast<TH1F *>(fQADataAntiProtonsAcceptedList->At(0));
1106 gDataAntiProtonsITSClustersPass->SetStats(kFALSE);
1107 gDataAntiProtonsITSClustersPass->Add(gDataAntiProtonsITSClustersReject);
1108 gDataAntiProtonsITSClustersPass->Sumw2();
1109 gDataAntiProtonsITSClustersPass->Scale(1./gDataAntiProtonsITSClustersPass->Integral(1,gDataAntiProtonsITSClustersPass->GetNbinsX()));
ff672838 1110 gDataAntiProtonsITSClustersPass->SetMarkerStyle(1);
762a6c16 1111 TH1F *gDataAntiProtonsTPCClustersPass = dynamic_cast<TH1F *>(fQADataAntiProtonsAcceptedList->At(2));
1112 gDataAntiProtonsTPCClustersPass->SetStats(kFALSE);
1113 gDataAntiProtonsTPCClustersPass->Add(gDataAntiProtonsTPCClustersReject);
1114 gDataAntiProtonsTPCClustersPass->Sumw2();
1115 gDataAntiProtonsTPCClustersPass->Scale(1./gDataAntiProtonsTPCClustersPass->Integral(1,gDataAntiProtonsTPCClustersPass->GetNbinsX()));
ff672838 1116 gDataAntiProtonsTPCClustersPass->SetMarkerStyle(1);
762a6c16 1117 TH1F *gDataAntiProtonsChi2PerClusterTPCPass = dynamic_cast<TH1F *>(fQADataAntiProtonsAcceptedList->At(3));
1118 gDataAntiProtonsChi2PerClusterTPCPass->SetStats(kFALSE);
1119 gDataAntiProtonsChi2PerClusterTPCPass->Add(gDataAntiProtonsChi2PerClusterTPCReject);
1120 gDataAntiProtonsChi2PerClusterTPCPass->Sumw2();
1121 gDataAntiProtonsChi2PerClusterTPCPass->Scale(1./gDataAntiProtonsChi2PerClusterTPCPass->Integral(1,gDataAntiProtonsChi2PerClusterTPCPass->GetNbinsX()));
ff672838 1122 gDataAntiProtonsChi2PerClusterTPCPass->SetMarkerStyle(1);
762a6c16 1123 TH1F *gDataAntiProtonsExtCov11Pass = dynamic_cast<TH1F *>(fQADataAntiProtonsAcceptedList->At(4));
1124 gDataAntiProtonsExtCov11Pass->SetStats(kFALSE);
1125 gDataAntiProtonsExtCov11Pass->Add(gDataAntiProtonsExtCov11Reject);
1126 gDataAntiProtonsExtCov11Pass->Sumw2();
1127 gDataAntiProtonsExtCov11Pass->Scale(1./gDataAntiProtonsExtCov11Pass->Integral(1,gDataAntiProtonsExtCov11Pass->GetNbinsX()));
ff672838 1128 gDataAntiProtonsExtCov11Pass->SetMarkerStyle(1);
762a6c16 1129 TH1F *gDataAntiProtonsExtCov22Pass = dynamic_cast<TH1F *>(fQADataAntiProtonsAcceptedList->At(5));
1130 gDataAntiProtonsExtCov22Pass->SetStats(kFALSE);
1131 gDataAntiProtonsExtCov22Pass->Add(gDataAntiProtonsExtCov22Reject);
1132 gDataAntiProtonsExtCov22Pass->Sumw2();
1133 gDataAntiProtonsExtCov22Pass->Scale(1./gDataAntiProtonsExtCov22Pass->Integral(1,gDataAntiProtonsExtCov22Pass->GetNbinsX()));
ff672838 1134 gDataAntiProtonsExtCov22Pass->SetMarkerStyle(1);
762a6c16 1135 TH1F *gDataAntiProtonsExtCov33Pass = dynamic_cast<TH1F *>(fQADataAntiProtonsAcceptedList->At(6));
1136 gDataAntiProtonsExtCov33Pass->SetStats(kFALSE);
1137 gDataAntiProtonsExtCov33Pass->Add(gDataAntiProtonsExtCov33Reject);
1138 gDataAntiProtonsExtCov33Pass->Sumw2();
1139 gDataAntiProtonsExtCov33Pass->Scale(1./gDataAntiProtonsExtCov33Pass->Integral(1,gDataAntiProtonsExtCov33Pass->GetNbinsX()));
ff672838 1140 gDataAntiProtonsExtCov33Pass->SetMarkerStyle(1);
762a6c16 1141 TH1F *gDataAntiProtonsExtCov44Pass = dynamic_cast<TH1F *>(fQADataAntiProtonsAcceptedList->At(7));
1142 gDataAntiProtonsExtCov44Pass->SetStats(kFALSE);
1143 gDataAntiProtonsExtCov44Pass->Add(gDataAntiProtonsExtCov44Reject);
1144 gDataAntiProtonsExtCov44Pass->Sumw2();
1145 gDataAntiProtonsExtCov44Pass->Scale(1./gDataAntiProtonsExtCov44Pass->Integral(1,gDataAntiProtonsExtCov44Pass->GetNbinsX()));
ff672838 1146 gDataAntiProtonsExtCov44Pass->SetMarkerStyle(1);
762a6c16 1147 TH1F *gDataAntiProtonsExtCov55Pass = dynamic_cast<TH1F *>(fQADataAntiProtonsAcceptedList->At(8));
1148 gDataAntiProtonsExtCov55Pass->SetStats(kFALSE);
1149 gDataAntiProtonsExtCov55Pass->Add(gDataAntiProtonsExtCov55Reject);
1150 gDataAntiProtonsExtCov55Pass->Sumw2();
1151 gDataAntiProtonsExtCov55Pass->Scale(1./gDataAntiProtonsExtCov55Pass->Integral(1,gDataAntiProtonsExtCov55Pass->GetNbinsX()));
ff672838 1152 gDataAntiProtonsExtCov55Pass->SetMarkerStyle(1);
762a6c16 1153 TH1F *gDataAntiProtonsDCAXYPass = dynamic_cast<TH1F *>(fQADataAntiProtonsAcceptedList->At(11));
1154 gDataAntiProtonsDCAXYPass->SetStats(kFALSE);
1155 gDataAntiProtonsDCAXYPass->Add(gDataAntiProtonsDCAXYReject);
1156 gDataAntiProtonsDCAXYPass->Sumw2();
1157 gDataAntiProtonsDCAXYPass->Scale(1./gDataAntiProtonsDCAXYPass->Integral(1,gDataAntiProtonsDCAXYPass->GetNbinsX()));
ff672838 1158 gDataAntiProtonsDCAXYPass->SetMarkerStyle(1);
762a6c16 1159 TH1F *gDataAntiProtonsDCAZPass = dynamic_cast<TH1F *>(fQADataAntiProtonsAcceptedList->At(13));
1160 gDataAntiProtonsDCAZPass->SetStats(kFALSE);
1161 gDataAntiProtonsDCAZPass->Add(gDataAntiProtonsDCAZReject);
1162 gDataAntiProtonsDCAZPass->Sumw2();
1163 gDataAntiProtonsDCAZPass->Scale(1./gDataAntiProtonsDCAZPass->Integral(1,gDataAntiProtonsDCAZPass->GetNbinsX()));
ff672838 1164 gDataAntiProtonsDCAZPass->SetMarkerStyle(1);
762a6c16 1165 TH1F *gDataAntiProtonsNumberOfTPCdEdxPointsPass = dynamic_cast<TH1F *>(fQADataAntiProtonsAcceptedList->At(26));
1166 gDataAntiProtonsNumberOfTPCdEdxPointsPass->SetStats(kFALSE);
1167 gDataAntiProtonsNumberOfTPCdEdxPointsPass->Add(gDataAntiProtonsNumberOfTPCdEdxPointsReject);
1168 gDataAntiProtonsNumberOfTPCdEdxPointsPass->Sumw2();
1169 gDataAntiProtonsNumberOfTPCdEdxPointsPass->Scale(1./gDataAntiProtonsNumberOfTPCdEdxPointsPass->Integral(1,gDataAntiProtonsNumberOfTPCdEdxPointsPass->GetNbinsX()));
ff672838 1170 gDataAntiProtonsNumberOfTPCdEdxPointsPass->SetMarkerStyle(1);
762a6c16 1171
1172
1173 //__________________________________________________//
1174 TCanvas *c1 = new TCanvas("c1","ITS clusters",0,0,600,400);
1175 c1->SetFillColor(10); c1->SetHighLightColor(10);
1176 c1->Divide(2,1);
1177 c1->cd(1); gDataProtonsITSClustersPass->Divide(gMCProtonsITSClustersPass);
1178 gDataProtonsITSClustersPass->SetTitle("Protons");
1179 gDataProtonsITSClustersPass->GetYaxis()->SetTitle("Data/MC");
1180 gDataProtonsITSClustersPass->Draw("E");
762a6c16 1181 c1->cd(2);
1182 gDataAntiProtonsITSClustersPass->Divide(gMCAntiProtonsITSClustersPass);
1183 gDataAntiProtonsITSClustersPass->SetTitle("Antiprotons");
1184 gDataAntiProtonsITSClustersPass->GetYaxis()->SetTitle("Data/MC");
1185 gDataAntiProtonsITSClustersPass->Draw("E");
1fd2c71b 1186 c1->SaveAs("NClustersITS.gif");
762a6c16 1187
1188 TCanvas *c3 = new TCanvas("c3","TPC clusters",0,200,600,400);
1189 c3->SetFillColor(10); c3->SetHighLightColor(10);
1190 c3->Divide(2,1);
1191 c3->cd(1); gDataProtonsTPCClustersPass->Divide(gMCProtonsTPCClustersPass);
1192 gDataProtonsTPCClustersPass->SetTitle("Protons");
1193 gDataProtonsTPCClustersPass->GetYaxis()->SetTitle("Data/MC");
1194 gDataProtonsTPCClustersPass->Draw("E");
762a6c16 1195 c3->cd(2);
1196 gDataAntiProtonsTPCClustersPass->Divide(gMCAntiProtonsTPCClustersPass);
1197 gDataAntiProtonsTPCClustersPass->SetTitle("Antirotons");
1198 gDataAntiProtonsTPCClustersPass->GetYaxis()->SetTitle("Data/MC");
1199 gDataAntiProtonsTPCClustersPass->Draw("E");
1fd2c71b 1200 c3->SaveAs("NClustersTPC.gif");
762a6c16 1201
1202 TCanvas *c4 = new TCanvas("c4","chi^2 per TPC cluster",0,300,600,400);
1203 c4->SetFillColor(10); c4->SetHighLightColor(10);
1204 c4->Divide(2,1);
1205 c4->cd(1);
1206 gDataProtonsChi2PerClusterTPCPass->Divide(gMCProtonsChi2PerClusterTPCPass);
1207 gDataProtonsChi2PerClusterTPCPass->SetTitle("Protons");
1208 gDataProtonsChi2PerClusterTPCPass->GetYaxis()->SetTitle("Data/MC");
1209 gDataProtonsChi2PerClusterTPCPass->Draw("E");
762a6c16 1210 c4->cd(2);
1211 gDataAntiProtonsChi2PerClusterTPCPass->Divide(gMCAntiProtonsChi2PerClusterTPCPass);
1212 gDataAntiProtonsChi2PerClusterTPCPass->SetTitle("Antirotons");
1213 gDataAntiProtonsChi2PerClusterTPCPass->GetYaxis()->SetTitle("Data/MC");
1214 gDataAntiProtonsChi2PerClusterTPCPass->Draw("E");
1fd2c71b 1215 c4->SaveAs("Chi2PerTPCCluster.gif");
762a6c16 1216
1217 if(gMCProtonsExtCov11Pass->GetEntries() != 0) {
1218 TCanvas *c5 = new TCanvas("c5","Cov11",0,400,600,400);
1219 c5->SetFillColor(10); c5->SetHighLightColor(10);
1220 c5->Divide(2,1);
1221 c5->cd(1);
1222 gDataProtonsExtCov11Pass->Divide(gMCProtonsExtCov11Pass);
1223 gDataProtonsExtCov11Pass->SetTitle("Protons");
1224 gDataProtonsExtCov11Pass->GetYaxis()->SetTitle("Data/MC");
1225 gDataProtonsExtCov11Pass->Draw("E");
762a6c16 1226 c5->cd(2);
1227 gDataAntiProtonsExtCov11Pass->Divide(gMCAntiProtonsExtCov11Pass);
1228 gDataAntiProtonsExtCov11Pass->SetTitle("Antiprotons");
1229 gDataAntiProtonsExtCov11Pass->GetYaxis()->SetTitle("Data/MC");
1230 gDataAntiProtonsExtCov11Pass->Draw("E");
1fd2c71b 1231 c5->SaveAs("cov11.gif");
762a6c16 1232 }
1233
1234 if(gMCProtonsExtCov22Pass->GetEntries() != 0) {
1235 TCanvas *c6 = new TCanvas("c6","Cov22",0,500,600,400);
1236 c6->SetFillColor(10); c6->SetHighLightColor(10);
1237 c6->Divide(2,1);
1238 c6->cd(1);
1239 gDataProtonsExtCov22Pass->Divide(gMCProtonsExtCov11Pass);
1240 gDataProtonsExtCov22Pass->SetTitle("Protons");
1241 gDataProtonsExtCov22Pass->GetYaxis()->SetTitle("Data/MC");
1242 gDataProtonsExtCov22Pass->Draw("E");
762a6c16 1243 c6->cd(2);
1244 gDataAntiProtonsExtCov22Pass->Divide(gMCAntiProtonsExtCov22Pass);
1245 gDataAntiProtonsExtCov22Pass->SetTitle("Antiprotons");
1246 gDataAntiProtonsExtCov22Pass->GetYaxis()->SetTitle("Data/MC");
1247 gDataAntiProtonsExtCov22Pass->Draw("E");
1fd2c71b 1248 c6->SaveAs("cov22.gif");
762a6c16 1249 }
1250
1251 if(gMCProtonsExtCov33Pass->GetEntries() != 0) {
1252 TCanvas *c7 = new TCanvas("c7","Cov33",600,0,600,400);
1253 c7->SetFillColor(10); c7->SetHighLightColor(10);
1254 c7->Divide(2,1);
1255 c7->cd(1);
1256 gDataProtonsExtCov33Pass->Divide(gMCProtonsExtCov33Pass);
1257 gDataProtonsExtCov33Pass->SetTitle("Protons");
1258 gDataProtonsExtCov33Pass->GetYaxis()->SetTitle("Data/MC");
1259 gDataProtonsExtCov33Pass->Draw("E");
762a6c16 1260 c7->cd(2);
1261 gDataAntiProtonsExtCov33Pass->Divide(gMCAntiProtonsExtCov33Pass);
1262 gDataAntiProtonsExtCov33Pass->SetTitle("Antiprotons");
1263 gDataAntiProtonsExtCov33Pass->GetYaxis()->SetTitle("Data/MC");
1264 gDataAntiProtonsExtCov33Pass->Draw("E");
1fd2c71b 1265 c7->SaveAs("cov33.gif");
762a6c16 1266 }
1267
1268 if(gMCProtonsExtCov44Pass->GetEntries() != 0) {
1269 TCanvas *c8 = new TCanvas("c8","Cov44",600,100,600,400);
1270 c8->SetFillColor(10); c8->SetHighLightColor(10);
1271 c8->Divide(2,1);
1272 c8->cd(1);
1273 gDataProtonsExtCov44Pass->Divide(gMCProtonsExtCov44Pass);
1274 gDataProtonsExtCov44Pass->SetTitle("Protons");
1275 gDataProtonsExtCov44Pass->GetYaxis()->SetTitle("Data/MC");
1276 gDataProtonsExtCov44Pass->Draw("E");
762a6c16 1277 c8->cd(2);
1278 gDataAntiProtonsExtCov44Pass->Divide(gMCAntiProtonsExtCov44Pass);
1279 gDataAntiProtonsExtCov44Pass->SetTitle("Antiprotons");
1280 gDataAntiProtonsExtCov44Pass->GetYaxis()->SetTitle("Data/MC");
1281 gDataAntiProtonsExtCov44Pass->Draw("E");
1fd2c71b 1282 c8->SaveAs("cov44.gif");
762a6c16 1283 }
1284
1285 if(gMCProtonsExtCov55Pass->GetEntries() != 0) {
1286 TCanvas *c9 = new TCanvas("c9","Cov55",600,200,600,400);
1287 c9->SetFillColor(10); c9->SetHighLightColor(10);
1288 c9->Divide(2,1);
1289 c9->cd(1);
1290 gDataProtonsExtCov55Pass->Divide(gMCProtonsExtCov55Pass);
1291 gDataProtonsExtCov55Pass->SetTitle("Protons");
1292 gDataProtonsExtCov55Pass->GetYaxis()->SetTitle("Data/MC");
1293 gDataProtonsExtCov55Pass->Draw("E");
762a6c16 1294 c9->cd(2);
1295 gDataAntiProtonsExtCov55Pass->Divide(gMCAntiProtonsExtCov55Pass);
1296 gDataAntiProtonsExtCov55Pass->SetTitle("Antiprotons");
1297 gDataAntiProtonsExtCov55Pass->GetYaxis()->SetTitle("Data/MC");
1298 gDataAntiProtonsExtCov55Pass->Draw("E");
1fd2c71b 1299 c9->SaveAs("cov55.gif");
762a6c16 1300 }
1301
1302 if(gMCProtonsDCAXYPass->GetEntries() != 0) {
1303 TCanvas *c12 = new TCanvas("c12","dca(xy)",600,500,600,400);
1304 c12->SetFillColor(10); c12->SetHighLightColor(10);
1305 c12->Divide(2,1);
1306 c12->cd(1);
1307 gDataProtonsDCAXYPass->Divide(gMCProtonsDCAXYPass);
1308 gDataProtonsDCAXYPass->SetTitle("Protons");
1309 gDataProtonsDCAXYPass->GetYaxis()->SetTitle("Data/MC");
1310 gDataProtonsDCAXYPass->Draw("E");
762a6c16 1311 c12->cd(2);
1312 gDataAntiProtonsDCAXYPass->Divide(gMCAntiProtonsDCAXYPass);
1313 gDataAntiProtonsDCAXYPass->SetTitle("Antiprotons");
1314 gDataAntiProtonsDCAXYPass->GetYaxis()->SetTitle("Data/MC");
1315 gDataAntiProtonsDCAXYPass->Draw("E");
1fd2c71b 1316 c12->SaveAs("dcaXY.gif");
762a6c16 1317 }
1318
1319 if(gMCProtonsDCAZPass->GetEntries() != 0) {
1320 TCanvas *c14 = new TCanvas("c14","dca(z)",1200,100,600,400);
1321 c14->SetFillColor(10); c14->SetHighLightColor(10);
1322 c14->Divide(2,1);
1323 c14->cd(1);
1324 gDataProtonsDCAZPass->Divide(gMCProtonsDCAZPass);
1325 gDataProtonsDCAZPass->SetTitle("Protons");
1326 gDataProtonsDCAZPass->GetYaxis()->SetTitle("Data/MC");
1327 gDataProtonsDCAZPass->Draw("E");
762a6c16 1328 c14->cd(2);
1329 gDataAntiProtonsDCAZPass->Divide(gMCAntiProtonsDCAZPass);
1330 gDataAntiProtonsDCAZPass->SetTitle("Antiprotons");
1331 gDataAntiProtonsDCAZPass->GetYaxis()->SetTitle("Data/MC");
1332 gDataAntiProtonsDCAZPass->Draw("E");
1fd2c71b 1333 c14->SaveAs("dcaZ.gif");
762a6c16 1334 }
1335
1336 TCanvas *c16 = new TCanvas("c16","TPC clusters (dE/dx)",1200,300,600,400);
1337 c16->SetFillColor(10); c16->SetHighLightColor(10);
1338 c16->Divide(2,1);
1339 c16->cd(1);
1340 gDataProtonsNumberOfTPCdEdxPointsPass->Divide(gMCProtonsNumberOfTPCdEdxPointsPass);
1341 gDataProtonsNumberOfTPCdEdxPointsPass->SetTitle("Protons");
1342 gDataProtonsNumberOfTPCdEdxPointsPass->GetYaxis()->SetTitle("Data/MC");
1343 gDataProtonsNumberOfTPCdEdxPointsPass->Draw("E");
762a6c16 1344 c16->cd(2);
1345 gDataAntiProtonsNumberOfTPCdEdxPointsPass->Divide(gMCAntiProtonsNumberOfTPCdEdxPointsPass);
1346 gDataAntiProtonsNumberOfTPCdEdxPointsPass->SetTitle("Antiprotons");
1347 gDataAntiProtonsNumberOfTPCdEdxPointsPass->GetYaxis()->SetTitle("Data/MC");
1348 gDataAntiProtonsNumberOfTPCdEdxPointsPass->Draw("E");
1fd2c71b 1349 c16->SaveAs("NClustersTPCdEdx.gif");
762a6c16 1350}
1351
6ad38cc1 1352void drawDCAPlots(const char* fileName) {
1353 //Function to draw the DCA plots for protons and antiprotons
1354 TString histoTitle, newTitle;
1355 Int_t iCounter = 0;
1356 Double_t etaMin = 0.0, etaMax = 0.0, etaStep = 0.0;
1357 Double_t ptMin = 0.45, ptMax = 0.0, ptStep = 0.1;
1358
1359 TFile *f = TFile::Open(fileName);
1360 TList *listQA = dynamic_cast<TList *>(f->Get("outputQAList"));
1361 TList *gListGlobalQA = dynamic_cast<TList *>(listQA->At(0));
1362 TList *fQA2DList = dynamic_cast<TList *>(gListGlobalQA->At(0));
1363
1364 //2D dca vs pT - accepted protons & antiprotons
1365 TH3F *gHistDCAxyEtaPtProtons = dynamic_cast<TH3F *>(fQA2DList->At(14));
1366 gHistDCAxyEtaPtProtons->SetStats(kFALSE);
1367 TH3F *gHistDCAzEtaPtProtons = dynamic_cast<TH3F *>(fQA2DList->At(15));
1368 gHistDCAzEtaPtProtons->SetStats(kFALSE);
1369 TH3F *gHistDCAxyEtaPtAntiProtons = dynamic_cast<TH3F *>(fQA2DList->At(16));
1370 gHistDCAxyEtaPtAntiProtons->SetStats(kFALSE);
1371 TH3F *gHistDCAzEtaPtAntiProtons = dynamic_cast<TH3F *>(fQA2DList->At(17));
1372 gHistDCAzEtaPtAntiProtons->SetStats(kFALSE);
1373
1374 //Protons dcaXY
1375 ptMin = 0.45, ptMax = 0.0, ptStep = 0.1;
1376 TH1D *gHistProtonsDCAxy[200];
1377 //ptStep = (gHistDCAxyEtaPtProtons->GetYaxis()->GetXmax() -
1378 //gHistDCAxyEtaPtProtons->GetYaxis()->GetXmin())/gHistDCAxyEtaPtProtons->GetNbinsY();
1379 for(Int_t iBinY = 1; iBinY <= gHistDCAxyEtaPtProtons->GetNbinsY(); iBinY++) {
1380 //ptMin = gHistDCAxyEtaPtProtons->GetYaxis()->GetBinCenter(iBinY) - ptStep/2.;
1381 ptMax = ptMin + ptStep;
1382 //Printf("Pt: %lf - %lf",ptMin,ptMax);
1383 histoTitle = "gHistProtonsDCAxy_etaBin"; //histoTitle += iBinX;
1384 histoTitle += "_ptBin"; histoTitle += iBinY;
1385 newTitle = "(Protons) "; newTitle += ptMin; newTitle += " < Pt < ";
1386 newTitle += ptMax; newTitle += "GeV/c";
1387 ptMin += ptStep;
1388
1389 //gHistPrimaryProtonsDCAxy[iCounter] = gDCAListHistograms3D[0]->ProjectionZ(histoTitle.Data(),iBinX,iBinX,iBinY,iBinY,"e");
1390 gHistProtonsDCAxy[iCounter] = gHistDCAxyEtaPtProtons->ProjectionZ(histoTitle.Data(),1,gHistDCAxyEtaPtProtons->GetNbinsX(),iBinY,iBinY,"e");
1391 gHistProtonsDCAxy[iCounter]->SetStats(kFALSE);
1392 gHistProtonsDCAxy[iCounter]->SetMarkerStyle(24);
1393 gHistProtonsDCAxy[iCounter]->SetTitle(newTitle.Data());
1394 gHistProtonsDCAxy[iCounter]->GetXaxis()->SetTitle("dca_{(xy)} [cm]");
1395 gHistProtonsDCAxy[iCounter]->GetYaxis()->SetTitle("Entries");
1396 iCounter += 1;
1397 }//loop over y axis
1398
1399 //Antiprotons dcaXY
1400 ptMin = 0.45, ptMax = 0.0, ptStep = 0.1;
1401 iCounter = 0;
1402 TH1D *gHistAntiProtonsDCAxy[200];
1403 //ptStep = (gHistDCAxyEtaPtAntiProtons->GetYaxis()->GetXmax() -
1404 //gHistDCAxyEtaPtAntiProtons->GetYaxis()->GetXmin())/gHistDCAxyEtaPtAntiProtons->GetNbinsY();
1405 for(Int_t iBinY = 1; iBinY <= gHistDCAxyEtaPtAntiProtons->GetNbinsY(); iBinY++) {
1406 //ptMin = gHistDCAxyEtaPtAntiProtons->GetYaxis()->GetBinCenter(iBinY) - ptStep/2.;
1407 ptMax = ptMin + ptStep;
1408 //Printf("Pt: %lf - %lf",ptMin,ptMax);
1409 histoTitle = "gHistAntiProtonsDCAxy_etaBin"; //histoTitle += iBinX;
1410 histoTitle += "_ptBin"; histoTitle += iBinY;
1411 newTitle = "(AntiProtons) "; newTitle += ptMin; newTitle += " < Pt < ";
1412 newTitle += ptMax; newTitle += "GeV/c";
1413 ptMin += ptStep;
1414
1415 //gHistPrimaryAntiProtonsDCAxy[iCounter] = gDCAListHistograms3D[0]->ProjectionZ(histoTitle.Data(),iBinX,iBinX,iBinY,iBinY,"e");
1416 gHistAntiProtonsDCAxy[iCounter] = gHistDCAxyEtaPtAntiProtons->ProjectionZ(histoTitle.Data(),1,gHistDCAxyEtaPtAntiProtons->GetNbinsX(),iBinY,iBinY,"e");
1417 gHistAntiProtonsDCAxy[iCounter]->SetStats(kFALSE);
1418 gHistAntiProtonsDCAxy[iCounter]->SetMarkerStyle(20);
1419 gHistAntiProtonsDCAxy[iCounter]->SetTitle(newTitle.Data());
1420 gHistAntiProtonsDCAxy[iCounter]->GetXaxis()->SetTitle("dca_{(xy)} [cm]");
1421 gHistAntiProtonsDCAxy[iCounter]->GetYaxis()->SetTitle("Entries");
1422 iCounter += 1;
1423 }//loop over y axis
1424
1425
1426 //Protons dcaZ
1427 ptMin = 0.45, ptMax = 0.0, ptStep = 0.1;
1428 iCounter = 0;
1429 TH1D *gHistProtonsDCAz[200];
1430 //ptStep = (gHistDCAzEtaPtProtons->GetYaxis()->GetXmax() -
1431 //gHistDCAzEtaPtProtons->GetYaxis()->GetXmin())/gHistDCAzEtaPtProtons->GetNbinsY();
1432 for(Int_t iBinY = 1; iBinY <= gHistDCAzEtaPtProtons->GetNbinsY(); iBinY++) {
1433 //ptMin = gHistDCAzEtaPtProtons->GetYaxis()->GetBinCenter(iBinY) - ptStep/2.;
1434 ptMax = ptMin + ptStep;
1435 //Printf("Pt: %lf - %lf",ptMin,ptMax);
1436 histoTitle = "gHistProtonsDCAz_etaBin"; //histoTitle += iBinX;
1437 histoTitle += "_ptBin"; histoTitle += iBinY;
1438 newTitle = "(Protons) "; newTitle += ptMin; newTitle += " < Pt < ";
1439 newTitle += ptMax; newTitle += "GeV/c";
1440 ptMin += ptStep;
1441
1442 //gHistPrimaryProtonsDCAz[iCounter] = gDCAListHistograms3D[0]->ProjectionZ(histoTitle.Data(),iBinX,iBinX,iBinY,iBinY,"e");
1443 gHistProtonsDCAz[iCounter] = gHistDCAzEtaPtProtons->ProjectionZ(histoTitle.Data(),1,gHistDCAzEtaPtProtons->GetNbinsX(),iBinY,iBinY,"e");
1444 gHistProtonsDCAz[iCounter]->SetStats(kFALSE);
1445 gHistProtonsDCAz[iCounter]->SetMarkerStyle(24);
1446 gHistProtonsDCAz[iCounter]->SetTitle(newTitle.Data());
1447 gHistProtonsDCAz[iCounter]->GetXaxis()->SetTitle("dca_{(z)} [cm]");
1448 gHistProtonsDCAz[iCounter]->GetYaxis()->SetTitle("Entries");
1449 iCounter += 1;
1450 }//loop over y axis
1451
1452 //Antiprotons dcaZ
1453 ptMin = 0.45, ptMax = 0.0, ptStep = 0.1;
1454 iCounter = 0;
1455 TH1D *gHistAntiProtonsDCAz[200];
1456 //ptStep = (gHistDCAzEtaPtAntiProtons->GetYaxis()->GetXmax() -
1457 //gHistDCAzEtaPtAntiProtons->GetYaxis()->GetXmin())/gHistDCAzEtaPtAntiProtons->GetNbinsY();
1458 for(Int_t iBinY = 1; iBinY <= gHistDCAzEtaPtAntiProtons->GetNbinsY(); iBinY++) {
1459 //ptMin = gHistDCAzEtaPtAntiProtons->GetYaxis()->GetBinCenter(iBinY) - ptStep/2.;
1460 ptMax = ptMin + ptStep;
1461 //Printf("Pt: %lf - %lf",ptMin,ptMax);
1462 histoTitle = "gHistAntiProtonsDCAz_etaBin"; //histoTitle += iBinX;
1463 histoTitle += "_ptBin"; histoTitle += iBinY;
1464 newTitle = "(AntiProtons) "; newTitle += ptMin; newTitle += " < Pt < ";
1465 newTitle += ptMax; newTitle += "GeV/c";
1466 ptMin += ptStep;
1467
1468 //gHistPrimaryAntiProtonsDCAz[iCounter] = gDCAListHistograms3D[0]->ProjectionZ(histoTitle.Data(),iBinX,iBinX,iBinY,iBinY,"e");
1469 gHistAntiProtonsDCAz[iCounter] = gHistDCAzEtaPtAntiProtons->ProjectionZ(histoTitle.Data(),1,gHistDCAzEtaPtAntiProtons->GetNbinsX(),iBinY,iBinY,"e");
1470 gHistAntiProtonsDCAz[iCounter]->SetStats(kFALSE);
1471 gHistAntiProtonsDCAz[iCounter]->SetMarkerStyle(20);
1472 gHistAntiProtonsDCAz[iCounter]->SetTitle(newTitle.Data());
1473 gHistAntiProtonsDCAz[iCounter]->GetXaxis()->SetTitle("dca_{(z)} [cm]");
1474 gHistAntiProtonsDCAz[iCounter]->GetYaxis()->SetTitle("Entries");
1475 iCounter += 1;
1476 }//loop over y axis
1477
1478
1479
1480 //==========================================================//
1481 TCanvas *c1 = new TCanvas("c1","DCA(3D)",0,0,600,600);
1482 c1->SetFillColor(10); c1->SetHighLightColor(10); c1->Divide(2,2);
1483 c1->cd(1); gHistDCAxyEtaPtProtons->Draw("box");
1484 c1->cd(2); gHistDCAzEtaPtProtons->Draw("box");
1485 c1->cd(3); gHistDCAxyEtaPtAntiProtons->Draw("box");
1486 c1->cd(4); gHistDCAzEtaPtAntiProtons->Draw("box");
1487
1488 //==========================================================//
1489 TCanvas *c2 = new TCanvas("c2","DCA(xy)",100,100,900,600);
1490 c2->SetFillColor(10); c2->SetHighLightColor(10); c2->Divide(3,2);
1491 c2->cd(1)->SetLogy(); gHistProtonsDCAxy[0]->Draw("E");
1492 gHistAntiProtonsDCAxy[0]->Draw("ESAME");
1493 c2->cd(2)->SetLogy(); gHistProtonsDCAxy[1]->Draw("E");
1494 gHistAntiProtonsDCAxy[1]->Draw("ESAME");
1495 c2->cd(3)->SetLogy(); gHistProtonsDCAxy[2]->Draw("E");
1496 gHistAntiProtonsDCAxy[2]->Draw("ESAME");
1497 c2->cd(4)->SetLogy(); gHistProtonsDCAxy[3]->Draw("E");
1498 gHistAntiProtonsDCAxy[3]->Draw("ESAME");
1499 c2->cd(5)->SetLogy(); gHistProtonsDCAxy[4]->Draw("E");
1500 gHistAntiProtonsDCAxy[4]->Draw("ESAME");
1501 c2->cd(6)->SetLogy(); gHistProtonsDCAxy[5]->Draw("E");
1502 gHistAntiProtonsDCAxy[5]->Draw("ESAME");
1503
e0919e87 1504 TFile *fout = TFile::Open("test.root","recreate");
1505 gHistProtonsDCAxy[0]->Write();
1506 gHistProtonsDCAxy[1]->Write();
1507 gHistProtonsDCAxy[2]->Write();
1508 gHistProtonsDCAxy[3]->Write();
1509 gHistProtonsDCAxy[4]->Write();
1510 gHistProtonsDCAxy[5]->Write();
1511 gHistAntiProtonsDCAxy[0]->Write();
1512 gHistAntiProtonsDCAxy[1]->Write();
1513 gHistAntiProtonsDCAxy[2]->Write();
1514 gHistAntiProtonsDCAxy[3]->Write();
1515 gHistAntiProtonsDCAxy[4]->Write();
1516 gHistAntiProtonsDCAxy[5]->Write();
1517 gHistProtonsDCAz[0]->Write();
1518 gHistProtonsDCAz[1]->Write();
1519 gHistProtonsDCAz[2]->Write();
1520 gHistProtonsDCAz[3]->Write();
1521 gHistProtonsDCAz[4]->Write();
1522 gHistProtonsDCAz[5]->Write();
1523 gHistAntiProtonsDCAz[0]->Write();
1524 gHistAntiProtonsDCAz[1]->Write();
1525 gHistAntiProtonsDCAz[2]->Write();
1526 gHistAntiProtonsDCAz[3]->Write();
1527 gHistAntiProtonsDCAz[4]->Write();
1528 gHistAntiProtonsDCAz[5]->Write();
1529 fout->Close();
6ad38cc1 1530 //==========================================================//
1531 TCanvas *c3 = new TCanvas("c3","DCA(z)",200,200,900,600);
1532 c3->SetFillColor(10); c3->SetHighLightColor(10); c3->Divide(3,2);
1533 c3->cd(1)->SetLogy(); gHistProtonsDCAz[0]->Draw("E");
1534 gHistAntiProtonsDCAz[0]->Draw("ESAME");
1535 c3->cd(2)->SetLogy(); gHistProtonsDCAz[1]->Draw("E");
1536 gHistAntiProtonsDCAz[1]->Draw("ESAME");
1537 c3->cd(3)->SetLogy(); gHistProtonsDCAz[2]->Draw("E");
1538 gHistAntiProtonsDCAz[2]->Draw("ESAME");
1539 c3->cd(4)->SetLogy(); gHistProtonsDCAz[3]->Draw("E");
1540 gHistAntiProtonsDCAz[3]->Draw("ESAME");
1541 c3->cd(5)->SetLogy(); gHistProtonsDCAz[4]->Draw("E");
1542 gHistAntiProtonsDCAz[4]->Draw("ESAME");
1543 c3->cd(6)->SetLogy(); gHistProtonsDCAz[5]->Draw("E");
1544 gHistAntiProtonsDCAz[5]->Draw("ESAME");
1545
1546}
1547