]>
Commit | Line | Data |
---|---|---|
1 | void CompareFlowResults() | |
2 | { | |
3 | gSystem->AddIncludePath("-I$ALICE_ROOT/include"); | |
4 | gSystem->AddIncludePath("-I$ROOTSYS/include"); | |
5 | ||
6 | //load needed libraries: | |
7 | gSystem->Load("libTree.so"); | |
8 | gSystem->Load("libANALYSIS.so"); | |
9 | gSystem->Load("libPWG2flow.so"); | |
10 | cerr<<"libPWG2flow.so loaded ..."<<endl; | |
11 | cout<<endl; | |
12 | ||
13 | ||
14 | //================================================================================== | |
15 | // accessing output files | |
16 | //================================================================================== | |
17 | //type of analysis was: ESD, AOD, MC, ESDMC0, ESDMC1 | |
18 | const TString type = "ESD"; | |
19 | ||
20 | //open the output files: | |
21 | TString inputFileNameMCEP = "outputMCEPanalysis"; | |
22 | TFile* fileMCEP = NULL; | |
23 | fileMCEP = TFile::Open(((inputFileNameMCEP.Append(type)).Append(".root")).Data(), "READ"); | |
24 | ||
25 | TString inputFileNameLYZ1 = "outputLYZ1analysis"; | |
26 | TFile* fileLYZ1 = NULL; | |
27 | fileLYZ1 = TFile::Open(((inputFileNameLYZ1.Append(type)).Append("_firstrun.root")).Data(), "READ"); | |
28 | ||
29 | TString inputFileNameLYZ2 = "outputLYZ2analysis"; | |
30 | TFile* fileLYZ2 = NULL; | |
31 | fileLYZ2 = TFile::Open(((inputFileNameLYZ2.Append(type)).Append("_secondrun.root")).Data(), "READ"); | |
32 | ||
33 | TString inputFileNameLYZEP = "outputLYZEPanalysis"; | |
34 | TFile* fileLYZEP = NULL; | |
35 | fileLYZEP = TFile::Open(((inputFileNameLYZEP.Append(type)).Append(".root")).Data(), "READ"); | |
36 | ||
37 | TString inputFileNameFQD = "outputFQDanalysis"; | |
38 | TFile* fileFQD = NULL; | |
39 | fileFQD = TFile::Open(((inputFileNameFQD.Append(type)).Append(".root")).Data(), "READ"); | |
40 | ||
41 | TString inputFileNameGFC = "outputGFCanalysis"; | |
42 | TFile* fileGFC = NULL; | |
43 | fileGFC = TFile::Open(((inputFileNameGFC.Append(type)).Append(".root")).Data(), "READ"); | |
44 | ||
45 | TString inputFileNameQC = "outputQCanalysis"; | |
46 | TFile* fileQC = NULL; | |
47 | fileQC = TFile::Open(((inputFileNameQC.Append(type)).Append(".root")).Data(), "READ"); | |
48 | //================================================================================== | |
49 | ||
50 | //================================================================================== | |
51 | // cosmetics | |
52 | //================================================================================== | |
53 | //removing the title and stat. box from all histograms: | |
54 | gStyle->SetOptTitle(0); | |
55 | gStyle->SetOptStat(0); | |
56 | ||
57 | //choosing the style and color of mesh for MC error bands: | |
58 | Int_t meshStyle = 1001; | |
59 | Int_t meshColor = kRed-10; | |
60 | ||
61 | //marker style and color (int. flow) | |
62 | Int_t markerStyle = 21; | |
63 | Int_t markerColor = kRed-3; | |
64 | //================================================================================== | |
65 | ||
66 | ||
67 | ||
68 | ||
69 | ||
70 | //================================================================================== | |
71 | // INTEGRATED FLOW | |
72 | //================================================================================== | |
73 | //the number of different methods: | |
74 | const Int_t nMethods=12; | |
75 | ||
76 | //booking the histogram for the integrated flow results from all methods: | |
77 | TH1D* intFlowAll = new TH1D("intFlowAll","Integrated Flow",nMethods,0,nMethods); | |
78 | //intFlowAll->SetLabelSize(0.036,"X"); | |
79 | //intFlowAll->SetLabelSize(0.036,"Y"); | |
80 | intFlowAll->SetMarkerStyle(markerStyle); | |
81 | intFlowAll->SetMarkerColor(markerColor); | |
82 | (intFlowAll->GetXaxis())->SetBinLabel(1,"v_{2}{MC}"); | |
83 | (intFlowAll->GetXaxis())->SetBinLabel(2,"v_{2}{2,GFC}"); | |
84 | (intFlowAll->GetXaxis())->SetBinLabel(3,"v_{2}{2,QC}"); | |
85 | (intFlowAll->GetXaxis())->SetBinLabel(4,"v_{2}{4,GFC}"); | |
86 | (intFlowAll->GetXaxis())->SetBinLabel(5,"v_{2}{4,QC}"); | |
87 | (intFlowAll->GetXaxis())->SetBinLabel(6,"v_{2}{6,GFC}"); | |
88 | (intFlowAll->GetXaxis())->SetBinLabel(7,"v_{2}{6,QC}"); | |
89 | (intFlowAll->GetXaxis())->SetBinLabel(8,"v_{2}{8,GFC}"); | |
90 | (intFlowAll->GetXaxis())->SetBinLabel(9,"v_{2}{8,QC}"); | |
91 | (intFlowAll->GetXaxis())->SetBinLabel(10,"v_{2}{FQD}"); | |
92 | (intFlowAll->GetXaxis())->SetBinLabel(11,"v_{2}{LYZ}"); | |
93 | (intFlowAll->GetXaxis())->SetBinLabel(12,"v_{2}{LYZEP}"); | |
94 | ||
95 | //booking the graph to store flow values and errors from all methods: | |
96 | Double_t x[nMethods] = {0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5}; | |
97 | Double_t xError[nMethods] = {0.}; | |
98 | Double_t flowValue[nMethods] = {0.}; | |
99 | Double_t flowError[nMethods] = {0.}; | |
100 | ||
101 | //accessing the results for each method: | |
102 | //MCEP = Monte Carlo Event Plane | |
103 | TList *pListMCEP = NULL; | |
104 | AliFlowCommonHist *mcepCommonHist = NULL; | |
105 | AliFlowCommonHistResults *mcepCommonHistRes = NULL; | |
106 | if(fileMCEP) | |
107 | { | |
108 | fileMCEP->GetObject("cobjMCEP",pListMCEP); | |
109 | if(pListMCEP) | |
110 | { | |
111 | mcepCommonHist = dynamic_cast<AliFlowCommonHist*> (pListMCEP->FindObject("AliFlowCommonHistMCEP")); | |
112 | mcepCommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListMCEP->FindObject("AliFlowCommonHistResultsMCEP")); | |
113 | if(mcepCommonHistRes) | |
114 | { | |
115 | flowValue[0] = (mcepCommonHistRes->GetHistIntFlow())->GetBinContent(1); | |
116 | flowError[0] = (mcepCommonHistRes->GetHistIntFlow())->GetBinError(1); | |
117 | } | |
118 | } | |
119 | } | |
120 | ||
121 | //LYZ1 = Lee-Yang Zeros (1st run) | |
122 | TList *pListLYZ1 = NULL; | |
123 | AliFlowCommonHist *lyz1CommonHist = NULL; | |
124 | AliFlowCommonHistResults *lyz1CommonHistRes = NULL; | |
125 | if(fileLYZ1) | |
126 | { | |
127 | fileLYZ1->GetObject("cobjLYZ1",pListLYZ1); | |
128 | if(pListLYZ1) | |
129 | { | |
130 | lyz1CommonHist = dynamic_cast<AliFlowCommonHist*> (pListLYZ1->FindObject("AliFlowCommonHistLYZ1")); | |
131 | lyz1CommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListLYZ1->FindObject("AliFlowCommonHistResultsLYZ1")); | |
132 | if(lyz1CommonHistRes) | |
133 | { | |
134 | flowValue[10] = (lyz1CommonHistRes->GetHistIntFlow())->GetBinContent(1); | |
135 | flowError[10] = (lyz1CommonHistRes->GetHistIntFlow())->GetBinError(1); | |
136 | } | |
137 | } | |
138 | } | |
139 | ||
140 | //LYZ2 = Lee-Yang Zeros (2nd run) (needed only for differential flow) | |
141 | TList *pListLYZ2 = NULL; | |
142 | AliFlowCommonHist *lyz2CommonHist = NULL; | |
143 | AliFlowCommonHistResults *lyz2CommonHistRes = NULL; | |
144 | if(fileLYZ2) | |
145 | { | |
146 | fileLYZ2->GetObject("cobjLYZ2",pListLYZ2); | |
147 | if(pListLYZ2) | |
148 | { | |
149 | lyz2CommonHist = dynamic_cast<AliFlowCommonHist*> (pListLYZ2->FindObject("AliFlowCommonHistLYZ2")); | |
150 | lyz2CommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListLYZ2->FindObject("AliFlowCommonHistResultsLYZ2")); | |
151 | } | |
152 | } | |
153 | ||
154 | //LYZEP = Lee-Yang Zeros Event Plane | |
155 | TList *pListLYZEP = NULL; | |
156 | AliFlowCommonHist *lyzepCommonHist = NULL; | |
157 | AliFlowCommonHistResults *lyzepCommonHistRes = NULL; | |
158 | if(fileLYZEP) | |
159 | { | |
160 | fileLYZEP->GetObject("cobjLYZEP",pListLYZEP); | |
161 | if(pListLYZEP) | |
162 | { | |
163 | lyzepCommonHist = dynamic_cast<AliFlowCommonHist*> (pListLYZEP->FindObject("AliFlowCommonHistLYZEP")); | |
164 | lyzepCommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListLYZEP->FindObject("AliFlowCommonHistResultsLYZEP")); | |
165 | if(lyzepCommonHistRes) | |
166 | { | |
167 | flowValue[11] = (lyzepCommonHistRes->GetHistIntFlow())->GetBinContent(1); | |
168 | //flowError[11] = (lyzepCommonHistRes->GetHistIntFlow())->GetBinError(1); | |
169 | } | |
170 | } | |
171 | } | |
172 | ||
173 | //FQD = Fitting q-distribution | |
174 | TList *pListFQD = NULL; | |
175 | AliFlowCommonHist *fqdCommonHist = NULL; | |
176 | AliFlowCommonHistResults *fqdCommonHistRes = NULL; | |
177 | if(fileFQD) | |
178 | { | |
179 | fileFQD->GetObject("cobjFQD",pListFQD); | |
180 | if(pListFQD) | |
181 | { | |
182 | fqdCommonHist = dynamic_cast<AliFlowCommonHist*> (pListFQD->FindObject("AliFlowCommonHistFQD")); | |
183 | fqdCommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListFQD->FindObject("AliFlowCommonHistResultsFQD")); | |
184 | if(fqdCommonHistRes) | |
185 | { | |
186 | flowValue[9] = (fqdCommonHistRes->GetHistIntFlow())->GetBinContent(1); | |
187 | flowError[9] = (fqdCommonHistRes->GetHistIntFlow())->GetBinError(1); | |
188 | } | |
189 | } | |
190 | } | |
191 | ||
192 | //GFC = Generating Function Cumulants | |
193 | TList *pListGFC = NULL; | |
194 | AliFlowCommonHist *gfcCommonHist = NULL; | |
195 | AliFlowCommonHistResults *gfcCommonHistRes2 = NULL; | |
196 | AliFlowCommonHistResults *gfcCommonHistRes4 = NULL; | |
197 | AliFlowCommonHistResults *gfcCommonHistRes6 = NULL; | |
198 | AliFlowCommonHistResults *gfcCommonHistRes8 = NULL; | |
199 | if(fileGFC) | |
200 | { | |
201 | fileGFC->GetObject("cobjGFC",pListGFC); | |
202 | if(pListGFC) | |
203 | { | |
204 | gfcCommonHist = dynamic_cast<AliFlowCommonHist*> (pListGFC->FindObject("AliFlowCommonHistGFC")); | |
205 | gfcCommonHistRes2 = dynamic_cast<AliFlowCommonHistResults*> (pListGFC->FindObject("AliFlowCommonHistResults2ndOrderGFC")); | |
206 | if(gfcCommonHistRes2) | |
207 | { | |
208 | flowValue[1] = (gfcCommonHistRes2->GetHistIntFlow())->GetBinContent(1); | |
209 | flowError[1] = (gfcCommonHistRes2->GetHistIntFlow())->GetBinError(1); | |
210 | } | |
211 | gfcCommonHistRes4 = dynamic_cast<AliFlowCommonHistResults*> (pListGFC->FindObject("AliFlowCommonHistResults4thOrderGFC")); | |
212 | if(gfcCommonHistRes4) | |
213 | { | |
214 | flowValue[3] = (gfcCommonHistRes4->GetHistIntFlow())->GetBinContent(1); | |
215 | flowError[3] = (gfcCommonHistRes4->GetHistIntFlow())->GetBinError(1); | |
216 | } | |
217 | gfcCommonHistRes6 = dynamic_cast<AliFlowCommonHistResults*> (pListGFC->FindObject("AliFlowCommonHistResults6thOrderGFC")); | |
218 | if(gfcCommonHistRes6) | |
219 | { | |
220 | flowValue[5] = (gfcCommonHistRes6->GetHistIntFlow())->GetBinContent(1); | |
221 | flowError[5] = (gfcCommonHistRes6->GetHistIntFlow())->GetBinError(1); | |
222 | } | |
223 | gfcCommonHistRes8 = dynamic_cast<AliFlowCommonHistResults*> (pListGFC->FindObject("AliFlowCommonHistResults8thOrderGFC")); | |
224 | if(gfcCommonHistRes8) | |
225 | { | |
226 | flowValue[7] = (gfcCommonHistRes8->GetHistIntFlow())->GetBinContent(1); | |
227 | flowError[7] = (gfcCommonHistRes8->GetHistIntFlow())->GetBinError(1); | |
228 | } | |
229 | } | |
230 | } | |
231 | ||
232 | //QC = Q-cumulants | |
233 | TList *pListQC = NULL; | |
234 | AliFlowCommonHist *qcCommonHist2 = NULL; | |
235 | AliFlowCommonHist *qcCommonHist4 = NULL; | |
236 | AliFlowCommonHist *qcCommonHist6 = NULL; | |
237 | AliFlowCommonHist *qcCommonHist8 = NULL; | |
238 | AliFlowCommonHistResults *qcCommonHistRes2 = NULL; | |
239 | AliFlowCommonHistResults *qcCommonHistRes4 = NULL; | |
240 | AliFlowCommonHistResults *qcCommonHistRes6 = NULL; | |
241 | AliFlowCommonHistResults *qcCommonHistRes8 = NULL; | |
242 | ||
243 | if(fileQC) | |
244 | { | |
245 | fileQC->GetObject("cobjQC",pListQC); | |
246 | if(pListQC) | |
247 | { | |
248 | qcCommonHist2 = dynamic_cast<AliFlowCommonHist*> (pListQC->FindObject("AliFlowCommonHist2ndOrderQC")); | |
249 | qcCommonHistRes2 = dynamic_cast<AliFlowCommonHistResults*> (pListQC->FindObject("AliFlowCommonHistResults2ndOrderQC")); | |
250 | if(qcCommonHistRes2) | |
251 | { | |
252 | flowValue[2] = (qcCommonHistRes2->GetHistIntFlow())->GetBinContent(1); | |
253 | //flowError[2] = (qcCommonHistRes2->GetHistIntFlow())->GetBinError(1); | |
254 | } | |
255 | qcCommonHist4 = dynamic_cast<AliFlowCommonHist*> (pListQC->FindObject("AliFlowCommonHist4thOrderQC")); | |
256 | qcCommonHistRes4 = dynamic_cast<AliFlowCommonHistResults*> (pListQC->FindObject("AliFlowCommonHistResults4thOrderQC")); | |
257 | if(qcCommonHistRes4) | |
258 | { | |
259 | flowValue[4] = (qcCommonHistRes4->GetHistIntFlow())->GetBinContent(1); | |
260 | //flowError[4] = (qcCommonHistRes4->GetHistIntFlow())->GetBinError(1); | |
261 | } | |
262 | qcCommonHist6 = dynamic_cast<AliFlowCommonHist*> (pListQC->FindObject("AliFlowCommonHist6thOrderQC")); | |
263 | qcCommonHistRes6 = dynamic_cast<AliFlowCommonHistResults*> (pListQC->FindObject("AliFlowCommonHistResults6thOrderQC")); | |
264 | if(qcCommonHistRes6) | |
265 | { | |
266 | flowValue[6] = (qcCommonHistRes6->GetHistIntFlow())->GetBinContent(1); | |
267 | //flowError[6] = (qcCommonHistRes6->GetHistIntFlow())->GetBinError(1); | |
268 | } | |
269 | qcCommonHist8 = dynamic_cast<AliFlowCommonHist*> (pListQC->FindObject("AliFlowCommonHist8thOrderQC")); | |
270 | qcCommonHistRes8 = dynamic_cast<AliFlowCommonHistResults*> (pListQC->FindObject("AliFlowCommonHistResults8thOrderQC")); | |
271 | if(qcCommonHistRes8) | |
272 | { | |
273 | flowValue[8] = (qcCommonHistRes8->GetHistIntFlow())->GetBinContent(1); | |
274 | //flowError[8] = (qcCommonHistRes8->GetHistIntFlow())->GetBinError(1); | |
275 | } | |
276 | } | |
277 | } | |
278 | ||
279 | Double_t dMax=flowValue[0]+flowError[0]; | |
280 | Double_t dMin=flowValue[0]-flowError[0]; | |
281 | ||
282 | for(Int_t i=1;i<nMethods;i++) | |
283 | { | |
284 | if(!(flowValue[i]==0. && flowError[i]==0.)) | |
285 | { | |
286 | if(dMax<flowValue[i]+flowError[i]) dMax=flowValue[i]+flowError[i]; | |
287 | if(dMin>flowValue[i]-flowError[i]) dMin=flowValue[i]-flowError[i]; | |
288 | } | |
289 | } | |
290 | ||
291 | TGraph* flowResults = new TGraphErrors(nMethods, x, flowValue, xError, flowError); | |
292 | ||
293 | flowResults->SetMarkerStyle(markerStyle); | |
294 | flowResults->SetMarkerColor(markerColor); | |
295 | //----------------------------------------------------------------------------------- | |
296 | ||
297 | //---------------------------------------------------------------------------------- | |
298 | //cosmetics: mesh for MC error bands (integrated flow) | |
299 | TGraph* pMesh = NULL; | |
300 | if(intFlowAll && mcepCommonHistRes) | |
301 | { | |
302 | //Double_t valueMC = intFlowAll->GetBinContent(1); | |
303 | //Double_t errorMC = intFlowAll->GetBinError(1); | |
304 | //Int_t nPts = intFlowAll->GetNbinsX(); | |
305 | ||
306 | Double_t valueMC = flowValue[0]; | |
307 | Double_t errorMC = flowError[0]; | |
308 | Int_t nPts = nMethods; | |
309 | ||
310 | pMesh = new TGraph(nPts); | |
311 | ||
312 | pMesh->SetPoint(1,0,valueMC+errorMC); | |
313 | pMesh->SetPoint(2,nPts+1,valueMC+errorMC); | |
314 | pMesh->SetPoint(3,nPts+1,valueMC-errorMC); | |
315 | pMesh->SetPoint(4,0,valueMC-errorMC); | |
316 | pMesh->SetPoint(5,0,valueMC+errorMC); | |
317 | ||
318 | pMesh->SetFillStyle(meshStyle); | |
319 | pMesh->SetFillColor(meshColor); | |
320 | } | |
321 | //---------------------------------------------------------------------------------- | |
322 | ||
323 | ||
324 | //---------------------------------------------------------------------------------- | |
325 | //cosmetics: text (integrated flow) | |
326 | //default text: | |
327 | TPaveText *textDefault = new TPaveText(0.05,0.77,0.95,0.90,"NDC"); | |
328 | textDefault->SetTextFont(72); | |
329 | textDefault->SetTextSize(0.08); | |
330 | //textDefault->SetLineColor(kFALSE); | |
331 | //textDefault->SetShadowColor(kFALSE); | |
332 | ||
333 | TString *entryDefaultAvM = new TString("Average Multiplicity"); | |
334 | TString *entryDefaultAnd = new TString("and"); | |
335 | TString *entryDefaultNumOfEvts = new TString("Number of Events:"); | |
336 | ||
337 | textDefault->AddText(entryDefaultAvM->Data()); | |
338 | textDefault->AddText(entryDefaultAnd->Data()); | |
339 | textDefault->AddText(entryDefaultNumOfEvts->Data()); | |
340 | ||
341 | //results: | |
342 | TPaveText *textResults = new TPaveText(0.05,0.12,0.95,0.70,"NDC"); | |
343 | textResults->SetTextFont(72); | |
344 | textResults->SetTextSize(0.06); | |
345 | //textResults->SetLineColor(kFALSE); | |
346 | //textResults->SetShadowColor(kFALSE); | |
347 | ||
348 | TString *entryMC = new TString("MC ...... "); | |
349 | TString *entryGFC = new TString("GFC ..... "); | |
350 | TString *entryQC2 = new TString("QC{2} ... "); | |
351 | TString *entryQC4 = new TString("QC{4} ... "); | |
352 | TString *entryQC6 = new TString("QC{6} ... "); | |
353 | TString *entryQC8 = new TString("QC{8} ... "); | |
354 | TString *entryFQD = new TString("FQD ..... "); | |
355 | TString *entryLYZ1 = new TString("LYZ ..... "); | |
356 | TString *entryLYZEP = new TString("LYZEP ... "); | |
357 | ||
358 | Double_t avMultMC=0.; | |
359 | Long_t nEvtsMC=0; | |
360 | ||
361 | Double_t avMultGFC=0.; | |
362 | Long_t nEvtsGFC=0; | |
363 | ||
364 | Double_t avMultQC2=0., avMultQC4=0., avMultQC6=0., avMultQC8=0.; | |
365 | Long_t nEvtsQC2=0, nEvtsQC4=0, nEvtsQC6=0, nEvtsQC8=0; | |
366 | ||
367 | Double_t avMultFQD=0.; | |
368 | Long_t nEvtsFQD=0; | |
369 | ||
370 | Double_t avMultLYZ1=0.; | |
371 | Long_t nEvtsLYZ1=0; | |
372 | ||
373 | Double_t avMultLYZEP=0.; | |
374 | Long_t nEvtsLYZEP=0; | |
375 | ||
376 | //MC: | |
377 | if(mcepCommonHist) | |
378 | { | |
379 | avMultMC = (mcepCommonHist->GetHistMultInt())->GetMean(); | |
380 | nEvtsMC = (mcepCommonHist->GetHistMultInt())->GetEntries(); | |
381 | } | |
382 | if(entryMC) | |
383 | { | |
384 | entryMC->Append("M = "); | |
385 | (*entryMC)+=(Long_t)avMultMC; | |
386 | entryMC->Append(", N = "); | |
387 | (*entryMC)+=(Long_t)nEvtsMC; | |
388 | } | |
389 | ||
390 | //GFC: | |
391 | if(gfcCommonHist) | |
392 | { | |
393 | avMultGFC = (gfcCommonHist->GetHistMultInt())->GetMean(); | |
394 | nEvtsGFC = (gfcCommonHist->GetHistMultInt())->GetEntries(); | |
395 | } | |
396 | if(entryGFC) | |
397 | { | |
398 | entryGFC->Append("M = "); | |
399 | (*entryGFC)+=(Long_t)avMultGFC; | |
400 | entryGFC->Append(", N = "); | |
401 | (*entryGFC)+=(Long_t)nEvtsGFC; | |
402 | } | |
403 | ||
404 | //QC: | |
405 | if(qcCommonHist2) | |
406 | { | |
407 | avMultQC2 = (qcCommonHist2->GetHistMultInt())->GetMean(); | |
408 | nEvtsQC2 = (qcCommonHist2->GetHistMultInt())->GetEntries(); | |
409 | } | |
410 | if(entryQC2) | |
411 | { | |
412 | entryQC2->Append("M = "); | |
413 | (*entryQC2)+=(Long_t)avMultQC2; | |
414 | entryQC2->Append(", N = "); | |
415 | (*entryQC2)+=(Long_t)nEvtsQC2; | |
416 | } | |
417 | if(qcCommonHist4) | |
418 | { | |
419 | avMultQC4 = (qcCommonHist4->GetHistMultInt())->GetMean(); | |
420 | nEvtsQC4 = (qcCommonHist4->GetHistMultInt())->GetEntries(); | |
421 | } | |
422 | if(entryQC4) | |
423 | { | |
424 | entryQC4->Append("M = "); | |
425 | (*entryQC4)+=(Long_t)avMultQC4; | |
426 | entryQC4->Append(", N = "); | |
427 | (*entryQC4)+=(Long_t)nEvtsQC4; | |
428 | } | |
429 | if(qcCommonHist6) | |
430 | { | |
431 | avMultQC6 = (qcCommonHist6->GetHistMultInt())->GetMean(); | |
432 | nEvtsQC6 = (qcCommonHist6->GetHistMultInt())->GetEntries(); | |
433 | } | |
434 | if(entryQC6) | |
435 | { | |
436 | entryQC6->Append("M = "); | |
437 | (*entryQC6)+=(Long_t)avMultQC6; | |
438 | entryQC6->Append(", N = "); | |
439 | (*entryQC6)+=(Long_t)nEvtsQC6; | |
440 | } | |
441 | if(qcCommonHist8) | |
442 | { | |
443 | avMultQC8 = (qcCommonHist8->GetHistMultInt())->GetMean(); | |
444 | nEvtsQC8 = (qcCommonHist8->GetHistMultInt())->GetEntries(); | |
445 | } | |
446 | if(entryQC8) | |
447 | { | |
448 | entryQC8->Append("M = "); | |
449 | (*entryQC8)+=(Long_t)avMultQC8; | |
450 | entryQC8->Append(", N = "); | |
451 | (*entryQC8)+=(Long_t)nEvtsQC8; | |
452 | } | |
453 | ||
454 | //FQD: | |
455 | if(fqdCommonHist) | |
456 | { | |
457 | avMultFQD = (fqdCommonHist->GetHistMultInt())->GetMean(); | |
458 | nEvtsFQD = (fqdCommonHist->GetHistMultInt())->GetEntries(); | |
459 | } | |
460 | if(entryFQD) | |
461 | { | |
462 | entryFQD->Append("M = "); | |
463 | (*entryFQD)+=(Long_t)avMultFQD; | |
464 | entryFQD->Append(", N = "); | |
465 | (*entryFQD)+=(Long_t)nEvtsFQD; | |
466 | } | |
467 | ||
468 | //LYZ1: | |
469 | if(lyz1CommonHist) | |
470 | { | |
471 | avMultLYZ1 = (lyz1CommonHist->GetHistMultInt())->GetMean(); | |
472 | nEvtsLYZ1 = (lyz1CommonHist->GetHistMultInt())->GetEntries(); | |
473 | } | |
474 | if(entryLYZ1) | |
475 | { | |
476 | entryLYZ1->Append("M = "); | |
477 | (*entryLYZ1)+=(Long_t)avMultLYZ1; | |
478 | entryLYZ1->Append(", N = "); | |
479 | (*entryLYZ1)+=(Long_t)nEvtsLYZ1; | |
480 | } | |
481 | ||
482 | //LYZEP: | |
483 | if(lyzepCommonHist) | |
484 | { | |
485 | avMultcLYZEP = (lyzepCommonHist->GetHistMultInt())->GetMean(); | |
486 | nEvtsLYZEP = (lyzepCommonHist->GetHistMultInt())->GetEntries(); | |
487 | } | |
488 | if(entryLYZEP) | |
489 | { | |
490 | entryLYZEP->Append("M = "); | |
491 | (*entryLYZEP)+=(Long_t)avMultLYZEP; | |
492 | entryLYZEP->Append(", N = "); | |
493 | (*entryLYZEP)+=(Long_t)nEvtsLYZEP; | |
494 | } | |
495 | ||
496 | if(textResults) | |
497 | { | |
498 | textResults->AddText(entryMC->Data()); | |
499 | textResults->AddText(entryGFC->Data()); | |
500 | textResults->AddText(entryQC2->Data()); | |
501 | textResults->AddText(entryQC4->Data()); | |
502 | textResults->AddText(entryQC6->Data()); | |
503 | textResults->AddText(entryQC8->Data()); | |
504 | textResults->AddText(entryFQD->Data()); | |
505 | textResults->AddText(entryLYZ1->Data()); | |
506 | textResults->AddText(entryLYZEP->Data()); | |
507 | } | |
508 | //---------------------------------------------------------------------------------- | |
509 | ||
510 | //---------------------------------------------------------------------------------- | |
511 | //final drawing for integrated flow: | |
512 | TCanvas* intFlowAllCanvas = new TCanvas("Integrated Flow","Integrated Flow",1000,600); | |
513 | ||
514 | intFlowAllCanvas->Divide(2,1); | |
515 | ||
516 | //1st pad is for plot: | |
517 | (intFlowAllCanvas->cd(1))->SetPad(0.0,0.0,0.75,1.0); | |
518 | ||
519 | if(intFlowAll) | |
520 | { | |
521 | if(dMin>0. && dMax>0.) | |
522 | { | |
523 | (intFlowAll->GetYaxis())->SetRangeUser(0.9744*dMin,1.0144*dMax); | |
524 | } else if(dMin<0. && dMax>0.) | |
525 | { | |
526 | if(!(-1.*dMin<4.*dMax)) | |
527 | { | |
528 | (intFlowAll->GetYaxis())->SetRangeUser(1.0266*dMin,1.0144*dMax); | |
529 | } else {(intFlowAll->GetYaxis())->SetRangeUser(1.1266*dMin,1.0144*dMax);} | |
530 | } else if(dMin<0. && dMax<0.) | |
531 | { | |
532 | (intFlowAll->GetYaxis())->SetRangeUser(1.0266*dMin,0.9866*dMax); | |
533 | } | |
534 | intFlowAll->Draw("E1"); | |
535 | } | |
536 | ||
537 | if(pMesh) pMesh->Draw("LFSAME"); | |
538 | ||
539 | if(flowResults) flowResults->Draw("PSAME"); | |
540 | ||
541 | //2nd pad is for legend: | |
542 | (intFlowAllCanvas->cd(2))->SetPad(0.75,0.0,1.0,1.0); | |
543 | ||
544 | if(textDefault) | |
545 | { | |
546 | textDefault->Draw(); | |
547 | textResults->Draw(); | |
548 | } | |
549 | //---------------------------------------------------------------------------------- | |
550 | //================================================================================== | |
551 | ||
552 | ||
553 | ||
554 | ||
555 | //================================================================================== | |
556 | // DIFFERENTIAL FLOW | |
557 | //================================================================================== | |
558 | Int_t iNbinsPt = AliFlowCommonConstants::GetNbinsPt(); | |
559 | Double_t dPtMin = AliFlowCommonConstants::GetPtMin(); | |
560 | Double_t dPtMax = AliFlowCommonConstants::GetPtMax(); | |
561 | ||
562 | //---------------------------------------------------------------------------------- | |
563 | //cosmetics: the style histogram: | |
564 | TH1D *styleHist = new TH1D("styleHist","styleHist",iNbinsPt,dPtMin,dPtMax); | |
565 | styleHist->SetTitle("Differential Flow"); | |
566 | styleHist->SetXTitle("p_{t} [GeV]"); | |
567 | styleHist->SetYTitle("v_{n}"); | |
568 | //---------------------------------------------------------------------------------- | |
569 | ||
570 | //---------------------------------------------------------------------------------- | |
571 | //cosmetics: Monte Carlo error bands for differential flow | |
572 | TGraph* pMeshDiffFlow = NULL; | |
573 | if(mcepCommonHistRes) | |
574 | { | |
575 | Int_t nPtsDF = (mcepCommonHistRes->GetHistDiffFlow())->GetNbinsX(); | |
576 | Double_t binWidth = (mcepCommonHistRes->GetHistDiffFlow())->GetBinWidth(1);//assuming that all bins have the same width | |
577 | ||
578 | pMeshDiffFlow = new TGraph(2*nPts+1); | |
579 | ||
580 | Double_t valueMC=0., errorMC=0.; | |
581 | for(Int_t i=1;i<nPtsDF+1;i++) | |
582 | { | |
583 | valueMC = (mcepCommonHistRes->GetHistDiffFlow())->GetBinContent(i); | |
584 | errorMC = (mcepCommonHistRes->GetHistDiffFlow())->GetBinError(i); | |
585 | pMeshDiffFlow->SetPoint(i,(i-0.5)*binWidth,valueMC+errorMC); | |
586 | } | |
587 | for(Int_t i=nPtsDF+1;i<2*nPtsDF+1;i++) | |
588 | { | |
589 | valueMC = (mcepCommonHistRes->GetHistDiffFlow())->GetBinContent(2*nPtsDF+1-i); | |
590 | errorMC = (mcepCommonHistRes->GetHistDiffFlow())->GetBinError(2*nPtsDF+1-i); | |
591 | pMeshDiffFlow->SetPoint(i,(2*nPtsDF-i+0.5)*binWidth,valueMC-errorMC); | |
592 | } | |
593 | pMeshDiffFlow->SetPoint(2*nPtsDF+1,0.5*binWidth,valueMC+errorMC); | |
594 | pMeshDiffFlow->SetFillStyle(meshStyle); | |
595 | pMeshDiffFlow->SetFillColor(meshColor); | |
596 | } | |
597 | //---------------------------------------------------------------------------------- | |
598 | ||
599 | //MCEP = Monte Carlo Event Plane | |
600 | Double_t avMultDiffFlowMC=0.; | |
601 | Double_t nEvtsDiffFlowMC=0; | |
602 | if(fileMCEP) | |
603 | { | |
604 | if(mcepCommonHistRes) | |
605 | { | |
606 | (mcepCommonHistRes->GetHistDiffFlow())->SetMarkerColor(2); | |
607 | (mcepCommonHistRes->GetHistDiffFlow())->SetMarkerStyle(20); | |
608 | } | |
609 | if(mcepCommonHist) | |
610 | { | |
611 | avMultDiffFlowMC = (mcepCommonHist->GetHistMultDiff())->GetMean(); | |
612 | nEvtsDiffFlowMC = (mcepCommonHist->GetHistMultDiff())->GetEntries(); | |
613 | } | |
614 | } | |
615 | ||
616 | //GFC = Generating Function Cumulants | |
617 | Double_t avMultDiffFlowGFC=0.; | |
618 | Double_t nEvtsDiffFlowGFC=0.; | |
619 | if(fileGFC) | |
620 | { | |
621 | if(gfcCommonHistRes2) | |
622 | { | |
623 | (gfcCommonHistRes2->GetHistDiffFlow())->SetMarkerColor(kViolet+3); | |
624 | (gfcCommonHistRes2->GetHistDiffFlow())->SetMarkerStyle(20); | |
625 | } | |
626 | if(gfcCommonHistRes4) | |
627 | { | |
628 | (gfcCommonHistRes4->GetHistDiffFlow())->SetMarkerColor(kViolet-6); | |
629 | (gfcCommonHistRes4->GetHistDiffFlow())->SetMarkerStyle(21); | |
630 | } | |
631 | if(gfcCommonHist) | |
632 | { | |
633 | avMultDiffFlowGFC = (gfcCommonHist->GetHistMultDiff())->GetMean(); | |
634 | nEvtsDiffFlowGFC = (gfcCommonHist->GetHistMultDiff())->GetEntries(); | |
635 | } | |
636 | } | |
637 | ||
638 | //QC = Q-cumulants | |
639 | Double_t avMultDiffFlowQC2=0., avMultDiffFlowQC4=0.; | |
640 | Double_t nEvtsDiffFlowQC2=0., nEvtsDiffFlowQC4=0.; | |
641 | if(fileQC) | |
642 | { | |
643 | //QC{2} | |
644 | if(qcCommonHistRes2) | |
645 | { | |
646 | (qcCommonHistRes2->GetHistDiffFlow())->SetMarkerColor(kOrange+3); | |
647 | (qcCommonHistRes2->GetHistDiffFlow())->SetMarkerStyle(20); | |
648 | } | |
649 | if(qcCommonHist2) | |
650 | { | |
651 | avMultDiffFlowQC2 = (qcCommonHist2->GetHistMultDiff())->GetMean(); | |
652 | nEvtsDiffFlowQC2 = (qcCommonHist2->GetHistMultDiff())->GetEntries(); | |
653 | } | |
654 | //QC{4} | |
655 | if(qcCommonHistRes4) | |
656 | { | |
657 | (qcCommonHistRes4->GetHistDiffFlow())->SetMarkerColor(kOrange-6); | |
658 | (qcCommonHistRes4->GetHistDiffFlow())->SetMarkerStyle(21); | |
659 | } | |
660 | if(qcCommonHist4) | |
661 | { | |
662 | avMultDiffFlowQC4 = (qcCommonHist4->GetHistMultDiff())->GetMean(); | |
663 | nEvtsDiffFlowQC4 = (qcCommonHist4->GetHistMultDiff())->GetEntries(); | |
664 | } | |
665 | } | |
666 | ||
667 | //LYZ2 = Lee-Yang Zeros (2nd run) | |
668 | Double_t avMultDiffFlowLYZ2=0.; | |
669 | Double_t nEvtsDiffFlowLYZ2=0; | |
670 | if(fileLYZ2) | |
671 | { | |
672 | if(lyz2CommonHistRes) | |
673 | { | |
674 | (lyz2CommonHistRes->GetHistDiffFlow())->SetMarkerColor(kGreen+3); | |
675 | (lyz2CommonHistRes->GetHistDiffFlow())->SetMarkerStyle(22); | |
676 | } | |
677 | if(lyz2CommonHist) | |
678 | { | |
679 | avMultDiffFlowLYZ2 = (lyz2CommonHist->GetHistMultDiff())->GetMean(); | |
680 | nEvtsDiffFlowLYZ2 = (lyz2CommonHist->GetHistMultDiff())->GetEntries(); | |
681 | } | |
682 | } | |
683 | ||
684 | //---------------------------------------------------------------------------------- | |
685 | //final drawing for differential flow: | |
686 | TCanvas* diffFlowAllCanvas = new TCanvas("Differential Flow","Differential Flow",1000,600); | |
687 | ||
688 | diffFlowAllCanvas->Divide(2,1); | |
689 | ||
690 | //1st pad is for plot: | |
691 | (diffFlowAllCanvas->cd(1))->SetPad(0.0,0.0,0.75,1.0); | |
692 | ||
693 | if(styleHist) | |
694 | { | |
695 | styleHist->Draw(); | |
696 | } | |
697 | if(pMeshDiffFlow) | |
698 | { | |
699 | pMeshDiffFlow->Draw("LFSAME"); | |
700 | } | |
701 | //MC | |
702 | if(mcepCommonHistRes) | |
703 | { | |
704 | //(mcepCommonHistRes->GetHistDiffFlow())->Draw("E1PSAME"); | |
705 | } | |
706 | //GFC | |
707 | if(gfcCommonHistRes2) | |
708 | { | |
709 | (gfcCommonHistRes2->GetHistDiffFlow())->Draw("E1PSAME"); | |
710 | } | |
711 | if(gfcCommonHistRes4) | |
712 | { | |
713 | (gfcCommonHistRes4->GetHistDiffFlow())->Draw("E1PSAME"); | |
714 | } | |
715 | //QC | |
716 | if(qcCommonHistRes2) | |
717 | { | |
718 | (qcCommonHistRes2->GetHistDiffFlow())->Draw("E1PSAME"); | |
719 | } | |
720 | if(qcCommonHistRes4) | |
721 | { | |
722 | (qcCommonHistRes4->GetHistDiffFlow())->Draw("E1PSAME"); | |
723 | } | |
724 | //LYZ2 | |
725 | if(lyz2CommonHistRes) | |
726 | { | |
727 | (lyz2CommonHistRes->GetHistDiffFlow())->Draw("E1PSAME"); | |
728 | } | |
729 | ||
730 | //2nd pad is for legend: | |
731 | (diffFlowAllCanvas->cd(2))->SetPad(0.75,0.0,1.0,1.0); | |
732 | ||
733 | TLegend* legendDiffFlow = new TLegend(0.02,0.25,0.97,0.75); | |
734 | legendDiffFlow->SetTextFont(72); | |
735 | legendDiffFlow->SetTextSize(0.06); | |
736 | ||
737 | //legend's entries: | |
738 | TString *entryDiffMC = new TString("MC ....... "); | |
739 | TString *entryDiffGFC2 = new TString("GFC{2} ... "); | |
740 | TString *entryDiffGFC4 = new TString("GFC{4} ... "); | |
741 | TString *entryDiffQC2 = new TString("QC{2} .... "); | |
742 | TString *entryDiffQC4 = new TString("QC{4} .... "); | |
743 | TString *entryDiffLYZ2 = new TString("LYZ ...... "); | |
744 | ||
745 | //MC | |
746 | if(mcepCommonHistRes) | |
747 | { | |
748 | (mcepCommonHistRes->GetHistDiffFlow())->SetFillStyle(meshStyle); | |
749 | (mcepCommonHistRes->GetHistDiffFlow())->SetFillColor(meshColor); | |
750 | entryDiffMC->Append("M = "); | |
751 | (*entryDiffMC)+=(Long_t)avMultDiffFlowMC; | |
752 | entryDiffMC->Append(", N = "); | |
753 | (*entryDiffMC)+=(Long_t)nEvtsDiffFlowMC; | |
754 | legendDiffFlow->AddEntry(mcepCommonHistRes->GetHistDiffFlow(),entryDiffMC->Data(),"f"); | |
755 | } | |
756 | ||
757 | //GFC | |
758 | if(gfcCommonHistRes2) | |
759 | { | |
760 | entryDiffGFC2->Append("M = "); | |
761 | (*entryDiffGFC2)+=(Long_t)avMultDiffFlowGFC; | |
762 | entryDiffGFC2->Append(", N = "); | |
763 | (*entryDiffGFC2)+=(Long_t)nEvtsDiffFlowGFC; | |
764 | legendDiffFlow->AddEntry(gfcCommonHistRes2->GetHistDiffFlow(),entryDiffGFC2->Data(),"p"); | |
765 | } | |
766 | if(gfcCommonHistRes4) | |
767 | { | |
768 | entryDiffGFC4->Append("M = "); | |
769 | (*entryDiffGFC4)+=(Long_t)avMultDiffFlowGFC; | |
770 | entryDiffGFC4->Append(", N = "); | |
771 | (*entryDiffGFC4)+=(Long_t)nEvtsDiffFlowGFC; | |
772 | legendDiffFlow->AddEntry(gfcCommonHistRes4->GetHistDiffFlow(),entryDiffGFC4->Data(),"p"); | |
773 | } | |
774 | ||
775 | //QC | |
776 | if(qcCommonHistRes2) | |
777 | { | |
778 | entryDiffQC2->Append("M = "); | |
779 | (*entryDiffQC2)+=(Long_t)avMultDiffFlowQC2; | |
780 | entryDiffQC2->Append(", N = "); | |
781 | (*entryDiffQC2)+=(Long_t)nEvtsDiffFlowQC2; | |
782 | legendDiffFlow->AddEntry(qcCommonHistRes2->GetHistDiffFlow(),entryDiffQC2->Data(),"p"); | |
783 | } | |
784 | if(qcCommonHistRes4) | |
785 | { | |
786 | entryDiffQC4->Append("M = "); | |
787 | (*entryDiffQC4)+=(Long_t)avMultDiffFlowQC4; | |
788 | entryDiffQC4->Append(", N = "); | |
789 | (*entryDiffQC4)+=(Long_t)nEvtsDiffFlowQC4; | |
790 | legendDiffFlow->AddEntry(qcCommonHistRes4->GetHistDiffFlow(),entryDiffQC4->Data(),"p"); | |
791 | } | |
792 | ||
793 | //LYZ | |
794 | if(lyz2CommonHistRes) | |
795 | { | |
796 | entryDiffLYZ2->Append("M = "); | |
797 | (*entryDiffLYZ2)+=(Long_t)avMultDiffFlowLYZ2; | |
798 | entryDiffLYZ2->Append(", N = "); | |
799 | (*entryDiffLYZ2)+=(Long_t)nEvtsDiffFlowLYZ2; | |
800 | legendDiffFlow->AddEntry(lyz2CommonHistRes->GetHistDiffFlow(),entryDiffLYZ2->Data(),"p"); | |
801 | } | |
802 | ||
803 | //drawing finally the legend in the 2nd pad: | |
804 | if(legendDiffFlow) | |
805 | { | |
806 | legendDiffFlow->Draw(); | |
807 | } | |
808 | ||
809 | //===================================================================================== | |
810 | ||
811 | } |