first step for error estimation QC{2}
[u/mrichter/AliRoot.git] / PWG2 / FLOW / macros / compareFlowResults.C
CommitLineData
8c5ec46a 1//type of analysis can be: ESD, AOD, MC, ESDMC0, ESDMC1
2//const TString type = "ESD";
b25cc698 3
4enum libModes {mLocal,mLocalSource};
5//mLocal: Analyze data on your computer using aliroot
6//mLocalSource: Analyze data on your computer using root + source files
7
8//void compareFlowResults(TString type="",Int_t mode=mLocalSource)
9void compareFlowResults(TString type="ESD",Int_t mode=mLocal)
da24213b 10{
b25cc698 11
12 // load needed libraries:
8d5cd720 13 LoadPlotLibraries(mode);
b25cc698 14
15
da24213b 16 //==================================================================================
17 // set here which plots will be shown by default
18 //==================================================================================
688877b8 19 Bool_t plotIntFlow = kTRUE; // integrated flow (no-name) // to be improved
077816b6 20 Bool_t plotIntFlowRelativeToMC = kTRUE; // plot |v{MC}-v{method}/v{MC}| for integrated flow (no-name) // to be improved
da24213b 21 // RP = particles used to determine the reaction plane
077816b6 22 Bool_t plotIntFlowRP = kTRUE; // integrated flow RP
23 Bool_t plotIntFlowRelativeToMCRP = kTRUE; // plot |v{MC}-v{method}/v{MC}| for integrated flow (RP) // to be improved
688877b8 24 Bool_t plotDiffFlowPtRP = kTRUE; // differential flow (Pt,RP)
947cc449 25 Bool_t plotDiffFlowEtaRP = kTRUE; // differential flow (Eta,RP)
26 Bool_t plotDiffFlowPtRelativeToMCRP = kTRUE; // plot |v{MC}-v{method}/v{MC}| as a function of pt for RPs
da24213b 27 // POI = particle of interest
077816b6 28 Bool_t plotIntFlowPOI = kTRUE; // integrated flow POI
29 Bool_t plotIntFlowRelativeToMCPOI = kTRUE; // plot |v{MC}-v{method}/v{MC}| for integrated flow (POI) // to be improved
30 Bool_t plotDiffFlowPtPOI = kTRUE; // differential flow (Pt,POI)
31 Bool_t plotDiffFlowEtaPOI = kTRUE; // differential flow (Eta,POI)
da24213b 32 //==================================================================================
33
b25cc698 34
da24213b 35 //==================================================================================
36 // set here which methods will be plotted by default for differential flow (Pt,RP):
947cc449 37 Bool_t plotMCPtRP = kFALSE;
38 Bool_t plotSPPtRP = kTRUE;
39 Bool_t plotGFC2PtRP = kTRUE;
40 Bool_t plotGFC4PtRP = kTRUE;
41 Bool_t plotGFC6PtRP = kTRUE;
42 Bool_t plotGFC8PtRP = kTRUE;
43 Bool_t plotQC2PtRP = kTRUE;
44 Bool_t plotQC4PtRP = kTRUE;
45 Bool_t plotQC6PtRP = kFALSE; // not calculated yet
46 Bool_t plotQC8PtRP = kFALSE; // not calculated yet
47 Bool_t plotLYZ2SUMPtRP = kTRUE;
48 Bool_t plotLYZ2PRODPtRP = kTRUE;
49 Bool_t plotLYZEPPtRP = kTRUE;
da24213b 50
51 // set here which methods will be plotted by default for differential flow (Eta,RP):
947cc449 52 Bool_t plotMCEtaRP = kFALSE;
53 Bool_t plotSPEtaRP = kTRUE;
54 Bool_t plotGFC2EtaRP = kTRUE;
55 Bool_t plotGFC4EtaRP = kTRUE;
56 Bool_t plotGFC6EtaRP = kTRUE;
57 Bool_t plotGFC8EtaRP = kTRUE;
58 Bool_t plotQC2EtaRP = kTRUE;
59 Bool_t plotQC4EtaRP = kTRUE;
60 Bool_t plotQC6EtaRP = kFALSE; // not calculated yet
61 Bool_t plotQC8EtaRP = kFALSE; // not calculated yet
62 Bool_t plotLYZ2SUMEtaRP = kTRUE;
63 Bool_t plotLYZ2PRODEtaRP = kTRUE;
64 Bool_t plotLYZEPEtaRP = kTRUE;
da24213b 65
688877b8 66 // set here which methods will be plotted by default for |v{MC}-v{method}/v{MC}| as a function of pt for RPs
947cc449 67 Bool_t plotSPRelativeToMCRP = kTRUE;
68 Bool_t plotGFC2RelativeToMCRP = kTRUE;
69 Bool_t plotGFC4RelativeToMCRP = kTRUE;
70 Bool_t plotGFC6RelativeToMCRP = kTRUE;
71 Bool_t plotGFC8RelativeToMCRP = kTRUE;
72 Bool_t plotQC2RelativeToMCRP = kTRUE;
73 Bool_t plotQC4RelativeToMCRP = kTRUE;
74 Bool_t plotQC6RelativeToMCRP = kFALSE; // not calculated yet
75 Bool_t plotQC8RelativeToMCRP = kFALSE; // not calculated yet
76 Bool_t plotLYZ2SUMRelativeToMCRP = kTRUE;
77 Bool_t plotLYZ2PRODRelativeToMCRP = kTRUE;
78 Bool_t plotLYZEPRelativeToMCRP = kTRUE;
688877b8 79
da24213b 80 // set here which methods will be plotted by default for differential flow (Pt,POI):
947cc449 81 Bool_t plotMCPtPOI = kFALSE;
82 Bool_t plotSPPtPOI = kTRUE;
83 Bool_t plotGFC2PtPOI = kTRUE;
84 Bool_t plotGFC4PtPOI = kTRUE;
85 Bool_t plotGFC6PtPOI = kTRUE;
86 Bool_t plotGFC8PtPOI = kTRUE;
87 Bool_t plotQC2PtPOI = kTRUE;
88 Bool_t plotQC4PtPOI = kTRUE;
89 Bool_t plotQC6PtPOI = kFALSE; // not calculated yet
90 Bool_t plotQC8PtPOI = kFALSE; // not calculated yet
91 Bool_t plotLYZ2SUMPtPOI = kTRUE;
92 Bool_t plotLYZ2PRODPtPOI = kTRUE;
93 Bool_t plotLYZEPPtPOI = kTRUE;
da24213b 94
95 // set here which methods will be plotted by default for differential flow (Eta,POI):
947cc449 96 Bool_t plotMCEtaPOI = kFALSE;
97 Bool_t plotSPEtaPOI = kTRUE;
98 Bool_t plotGFC2EtaPOI = kTRUE;
99 Bool_t plotGFC4EtaPOI = kTRUE;
100 Bool_t plotGFC6EtaPOI = kTRUE;
101 Bool_t plotGFC8EtaPOI = kTRUE;
102 Bool_t plotQC2EtaPOI = kTRUE;
103 Bool_t plotQC4EtaPOI = kTRUE;
104 Bool_t plotQC6EtaPOI = kFALSE; // not calculated yet
105 Bool_t plotQC8EtaPOI = kFALSE; // not calculated yet
106 Bool_t plotLYZ2SUMEtaPOI = kTRUE;
107 Bool_t plotLYZ2PRODEtaPOI = kTRUE;
108 Bool_t plotLYZEPEtaPOI = kTRUE;
da24213b 109 //==================================================================================
110
111
112 //==================================================================================
905bed86 113 // cosmetics: marker style (see TMarker) and color (see TAttFill) for each method:
da24213b 114 // MC:
905bed86 115 Int_t markerStyleMC = 20; // full circle
da24213b 116 Int_t markerColorMC = kRed;
905bed86 117 // SP:
118 Int_t markerStyleSP = 3; // star
119 Int_t markerColorSP = kViolet-6;
da24213b 120 // GFC{2}
905bed86 121 Int_t markerStyleGFC2 = 21; // full square
da24213b 122 Int_t markerColorGFC2 = kAzure-7;
123 // GFC{4}
905bed86 124 Int_t markerStyleGFC4 = 20; // full circle
da24213b 125 Int_t markerColorGFC4 = kAzure+3;
126 // GFC{6}
688877b8 127 Int_t markerStyleGFC6 = 25; // open square
da24213b 128 Int_t markerColorGFC6 = kAzure-7;
129 // GFC{8}
688877b8 130 Int_t markerStyleGFC8 = 24; // open circle
da24213b 131 Int_t markerColorGFC8 = kAzure+3;
132 // QC{2}
905bed86 133 Int_t markerStyleQC2 = 21; // full square
da24213b 134 Int_t markerColorQC2 = kOrange-7;
135 // QC{4}
905bed86 136 Int_t markerStyleQC4 = 20; // full circle
da24213b 137 Int_t markerColorQC4 = kOrange+3;
138 // QC{6}
688877b8 139 Int_t markerStyleQC6 = 25; // open square
da24213b 140 Int_t markerColorQC6 = kOrange-7;
141 // QC{8}
688877b8 142 Int_t markerStyleQC8 = 24; // open circle
da24213b 143 Int_t markerColorQC8 = kOrange+3;
947cc449 144 // LYZ2SUM
145 Int_t markerStyleLYZ2SUM = 22; // full triangle
146 Int_t markerColorLYZ2SUM = kYellow+3;
147 // LYZ2PROD
148 Int_t markerStyleLYZ2PROD = 22; // full triangle
149 Int_t markerColorLYZ2PROD = kGreen+3;
da24213b 150 // LYZEP
905bed86 151 Int_t markerStyleLYZEP = 26; // open triangle
da24213b 152 Int_t markerColorLYZEP = kYellow+3;
153 //==================================================================================
154
dec3fab6 155
156 //==================================================================================
157 // set here which result goes in which bin in the plot for integrated flow (no-name)
158 // MC:
159 Int_t binMC = 1;
160 // SP:
161 Int_t binSP = 2;
162 // GFC{2}
163 Int_t binGFC2 = 3;
164 // GFC{4}
165 Int_t binGFC4 = 5;
166 // GFC{6}
167 Int_t binGFC6 = 7;
168 // GFC{8}
169 Int_t binGFC8 = 9;
170 // QC{2}
171 Int_t binQC2 = 4;
172 // QC{4}
173 Int_t binQC4 = 6;
174 // QC{6}
175 Int_t binQC6 = 8;
176 // QC{8}
177 Int_t binQC8 = 10;
178 // FQD
179 Int_t binFQD = 11;
947cc449 180 // LYZ1SUM
181 Int_t binLYZ1SUM = 12;
182 // LYZ1PROD
183 Int_t binLYZ1PROD = 13;
dec3fab6 184 // LYZEP
947cc449 185 Int_t binLYZEP = 14;
dec3fab6 186 //==================================================================================
187
188
189 //==================================================================================
190 // set here which result goes in which bin in the plot for integrated flow (RP)
191 // MC:
192 Int_t binMCRP = 1;
193 // SP:
194 Int_t binSPRP = 2;
195 // GFC{2}
196 Int_t binGFC2RP = 3;
197 // GFC{4}
198 Int_t binGFC4RP = 5;
199 // GFC{6}
200 Int_t binGFC6RP = 7;
201 // GFC{8}
202 Int_t binGFC8RP = 9;
203 // QC{2}
204 Int_t binQC2RP = 4;
205 // QC{4}
206 Int_t binQC4RP = 6;
207 // QC{6}
208 Int_t binQC6RP = 8;
209 // QC{8}
210 Int_t binQC8RP = 10;
211 // FQD
212 Int_t binFQDRP = 11;
947cc449 213 // LYZ2SUM
214 Int_t binLYZ2SUMRP = 12;
215 // LYZ2PROD
216 Int_t binLYZ2PRODRP = 13;
dec3fab6 217 // LYZEP
947cc449 218 Int_t binLYZEPRP = 14;
dec3fab6 219 //==================================================================================
220
221
222 //==================================================================================
223 // set here which result goes in which bin in the plot for integrated flow (POI)
224 // MC:
225 Int_t binMCPOI = 1;
226 // SP:
227 Int_t binSPPOI = 2;
228 // GFC{2}
229 Int_t binGFC2POI = 3;
230 // GFC{4}
231 Int_t binGFC4POI = 5;
232 // GFC{6}
233 Int_t binGFC6POI = 7;
234 // GFC{8}
235 Int_t binGFC8POI = 9;
236 // QC{2}
237 Int_t binQC2POI = 4;
238 // QC{4}
239 Int_t binQC4POI = 6;
240 // QC{6}
241 Int_t binQC6POI = 8;
242 // QC{8}
243 Int_t binQC8POI = 10;
244 // FQD
245 Int_t binFQDPOI = 11;
947cc449 246 // LYZ2SUM
247 Int_t binLYZ2SUMPOI = 12;
248 // LYZ2PROD
249 Int_t binLYZ2PRODPOI = 13;
dec3fab6 250 // LYZEP
947cc449 251 Int_t binLYZEPPOI = 14;
dec3fab6 252 //==================================================================================
b25cc698 253
254
8c5ec46a 255 //==================================================================================
256 // accessing output files
257 //==================================================================================
8c5ec46a 258 //open the output files:
259 TString inputFileNameMCEP = "outputMCEPanalysis";
260 TFile* fileMCEP = NULL;
261 fileMCEP = TFile::Open(((inputFileNameMCEP.Append(type)).Append(".root")).Data(), "READ");
262
905bed86 263 TString inputFileNameSP = "outputSPanalysis";
264 TFile* fileSP = NULL;
265 fileSP = TFile::Open(((inputFileNameSP.Append(type)).Append(".root")).Data(), "READ");
266
947cc449 267 TString inputFileNameLYZ1SUM = "outputLYZ1SUManalysis";
268 TFile* fileLYZ1SUM = NULL;
269 fileLYZ1SUM = TFile::Open(((inputFileNameLYZ1SUM.Append(type)).Append(".root")).Data(), "READ");
8c5ec46a 270
947cc449 271 TString inputFileNameLYZ2SUM = "outputLYZ2SUManalysis";
272 TFile* fileLYZ2SUM = NULL;
273 fileLYZ2SUM = TFile::Open(((inputFileNameLYZ2SUM.Append(type)).Append(".root")).Data(), "READ");
274
275 TString inputFileNameLYZ1PROD = "outputLYZ1PRODanalysis";
276 TFile* fileLYZ1PROD = NULL;
277 fileLYZ1PROD = TFile::Open(((inputFileNameLYZ1PROD.Append(type)).Append(".root")).Data(), "READ");
278
279 TString inputFileNameLYZ2PROD = "outputLYZ2PRODanalysis";
280 TFile* fileLYZ2PROD = NULL;
281 fileLYZ2PROD = TFile::Open(((inputFileNameLYZ2PROD.Append(type)).Append(".root")).Data(), "READ");
8c5ec46a 282
283 TString inputFileNameLYZEP = "outputLYZEPanalysis";
284 TFile* fileLYZEP = NULL;
285 fileLYZEP = TFile::Open(((inputFileNameLYZEP.Append(type)).Append(".root")).Data(), "READ");
286
287 TString inputFileNameFQD = "outputFQDanalysis";
288 TFile* fileFQD = NULL;
289 fileFQD = TFile::Open(((inputFileNameFQD.Append(type)).Append(".root")).Data(), "READ");
290
291 TString inputFileNameGFC = "outputGFCanalysis";
292 TFile* fileGFC = NULL;
293 fileGFC = TFile::Open(((inputFileNameGFC.Append(type)).Append(".root")).Data(), "READ");
294
295 TString inputFileNameQC = "outputQCanalysis";
296 TFile* fileQC = NULL;
297 fileQC = TFile::Open(((inputFileNameQC.Append(type)).Append(".root")).Data(), "READ");
298 //==================================================================================
1fca9c90 299
a88e5ac2 300
a88e5ac2 301
9d3cbee7 302
8c5ec46a 303 //==================================================================================
304 // cosmetics
305 //==================================================================================
306 //removing the title and stat. box from all histograms:
307 gStyle->SetOptTitle(0);
308 gStyle->SetOptStat(0);
309
dec3fab6 310 // plot for 'no-name' integrated flow:
311 // choosing the style and color of mesh for MC error bands
8c5ec46a 312 Int_t meshStyle = 1001;
dec3fab6 313 Int_t meshColor = kGray;
8c5ec46a 314
dec3fab6 315 // marker style and color
8c5ec46a 316 Int_t markerStyle = 21;
dec3fab6 317 Int_t markerColor = kBlack;
318
319 // plot for RP's integrated flow:
320 // choosing the style and color of mesh for MC error bands
321 Int_t meshStyleRP = 1001;
322 Int_t meshColorRP = kRed-10;
323
324 // marker style and color
325 Int_t markerStyleRP = 21;
326 Int_t markerColorRP = kRed-3;
327
328 // plot for POI's integrated flow:
329 // choosing the style and color of mesh for MC error bands
330 Int_t meshStylePOI = 1001;
331 Int_t meshColorPOI = kBlue-10;
332
333 // marker style and color
334 Int_t markerStylePOI = 21;
335 Int_t markerColorPOI = kBlue-3;
336
337 // choosing the style and color of mesh for MC error bands in the plots for diff. flow
338 // plot for differential flow (Pt,RP):
339 Int_t meshStyleDiffFlowPtRP = 1001;
340 Int_t meshColorDiffFlowPtRP = kRed-10;
341
342 // plot for differential flow (Eta,RP):
343 Int_t meshStyleDiffFlowEtaRP = 1001;
344 Int_t meshColorDiffFlowEtaRP = kRed-10;
345
346 // plot for differential flow (Pt,POI):
347 Int_t meshStyleDiffFlowPtPOI = 1001;
348 Int_t meshColorDiffFlowPtPOI = kRed-10;
349
350 // plot for differential flow (Eta,POI):
351 Int_t meshStyleDiffFlowEtaPOI = 1001;
352 Int_t meshColorDiffFlowEtaPOI = kRed-10;
8c5ec46a 353 //==================================================================================
354
355
356
357
358 //==================================================================================
dec3fab6 359 // INTEGRATED FLOW (no-name, RP and POI)
8c5ec46a 360 //==================================================================================
dec3fab6 361 // the number of different methods:
947cc449 362 const Int_t nMethods=14;
8c5ec46a 363
dec3fab6 364 // booking the histogram for the integrated flow results from all methods:
8c5ec46a 365 TH1D* intFlowAll = new TH1D("intFlowAll","Integrated Flow",nMethods,0,nMethods);
dec3fab6 366 // intFlowAll->SetLabelSize(0.036,"X");
367 // intFlowAll->SetLabelSize(0.036,"Y");
8c5ec46a 368 intFlowAll->SetMarkerStyle(markerStyle);
369 intFlowAll->SetMarkerColor(markerColor);
dec3fab6 370 (intFlowAll->GetXaxis())->SetBinLabel(binMC,"v_{2}{MC}");
371 (intFlowAll->GetXaxis())->SetBinLabel(binSP,"v_{2}{SP}");
372 (intFlowAll->GetXaxis())->SetBinLabel(binGFC2,"v_{2}{2,GFC}");
373 (intFlowAll->GetXaxis())->SetBinLabel(binQC2,"v_{2}{2,QC}");
374 (intFlowAll->GetXaxis())->SetBinLabel(binGFC4,"v_{2}{4,GFC}");
375 (intFlowAll->GetXaxis())->SetBinLabel(binQC4,"v_{2}{4,QC}");
376 (intFlowAll->GetXaxis())->SetBinLabel(binGFC6,"v_{2}{6,GFC}");
377 (intFlowAll->GetXaxis())->SetBinLabel(binQC6,"v_{2}{6,QC}");
378 (intFlowAll->GetXaxis())->SetBinLabel(binGFC8,"v_{2}{8,GFC}");
379 (intFlowAll->GetXaxis())->SetBinLabel(binQC8,"v_{2}{8,QC}");
380 (intFlowAll->GetXaxis())->SetBinLabel(binFQD,"v_{2}{FQD}");
947cc449 381 (intFlowAll->GetXaxis())->SetBinLabel(binLYZ1SUM,"v_{2}{LYZ,sum}");
382 (intFlowAll->GetXaxis())->SetBinLabel(binLYZ1PROD,"v_{2}{LYZ,prod}");
dec3fab6 383 (intFlowAll->GetXaxis())->SetBinLabel(binLYZEP,"v_{2}{LYZEP}");
384
385 // booking the graph to store flow values and errors from all methods:
386 Double_t x[nMethods] = {0.};
387 for(Int_t i=0;i<nMethods;i++)
388 {
389 x[i]=i+0.5;
390 }
8c5ec46a 391 Double_t xError[nMethods] = {0.};
3963f25c 392 Double_t flowValue[nMethods] = {0.};
393 Double_t flowError[nMethods] = {0.};
8c5ec46a 394 Double_t flowValueRP[nMethods] = {0.};
395 Double_t flowErrorRP[nMethods] = {0.};
396 Double_t flowValuePOI[nMethods] = {0.};
397 Double_t flowErrorPOI[nMethods] = {0.};
398
dec3fab6 399 // accessing the results for integrated flow for each method:
400 // MCEP = Monte Carlo Event Plane
8c5ec46a 401 TList *pListMCEP = NULL;
402 AliFlowCommonHist *mcepCommonHist = NULL;
403 AliFlowCommonHistResults *mcepCommonHistRes = NULL;
404 if(fileMCEP) {
405 fileMCEP->GetObject("cobjMCEP",pListMCEP);
406 if(pListMCEP) {
dec3fab6 407 mcepCommonHist = dynamic_cast<AliFlowCommonHist*> (pListMCEP->FindObject("AliFlowCommonHistMCEP"));
8c5ec46a 408 mcepCommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListMCEP->FindObject("AliFlowCommonHistResultsMCEP"));
409 if(mcepCommonHistRes) {
dec3fab6 410 flowValue[binMC-1] = (mcepCommonHistRes->GetHistIntFlow())->GetBinContent(1);
411 flowError[binMC-1] = (mcepCommonHistRes->GetHistIntFlow())->GetBinError(1);
412 flowValueRP[binMCRP-1] = (mcepCommonHistRes->GetHistIntFlowRP())->GetBinContent(1);
413 flowErrorRP[binMCRP-1] = (mcepCommonHistRes->GetHistIntFlowRP())->GetBinError(1);
414 flowValuePOI[binMCPOI-1] = (mcepCommonHistRes->GetHistIntFlowPOI())->GetBinContent(1);
415 flowErrorPOI[binMCPOI-1] = (mcepCommonHistRes->GetHistIntFlowPOI())->GetBinError(1);
8c5ec46a 416 }
417 }
a88e5ac2 418 }
8c5ec46a 419
dec3fab6 420 // SP = Scalar Product
905bed86 421 TList *pListSP = NULL;
422 AliFlowCommonHist *spCommonHist = NULL;
423 AliFlowCommonHistResults *spCommonHistRes = NULL;
424 if(fileSP) {
425 fileSP->GetObject("cobjSP",pListSP);
426 if(pListSP) {
dec3fab6 427 spCommonHist = dynamic_cast<AliFlowCommonHist*> (pListSP->FindObject("AliFlowCommonHistSP"));
905bed86 428 spCommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListSP->FindObject("AliFlowCommonHistResultsSP"));
429 if(spCommonHistRes) {
dec3fab6 430 flowValue[binSP-1] = (spCommonHistRes->GetHistIntFlow())->GetBinContent(1);
431 flowError[binSP-1] = (spCommonHistRes->GetHistIntFlow())->GetBinError(1);
432 flowValueRP[binSPRP-1] = (spCommonHistRes->GetHistIntFlowRP())->GetBinContent(1);
433 flowErrorRP[binSPRP-1] = (spCommonHistRes->GetHistIntFlowRP())->GetBinError(1);
434 flowValuePOI[binSPPOI-1] = (spCommonHistRes->GetHistIntFlowPOI())->GetBinContent(1);
435 flowErrorPOI[binSPPOI-1] = (spCommonHistRes->GetHistIntFlowPOI())->GetBinError(1);
905bed86 436 }
437 }
438 }
439
947cc449 440 // LYZ1SUM = Lee-Yang Zeros (1st run, sum) is used to get only 'no-name' integrated flow
441 TList *pListLYZ1SUM = NULL;
442 AliFlowCommonHist *lyz1sumCommonHist = NULL;
443 AliFlowCommonHistResults *lyz1sumCommonHistRes = NULL;
444 if(fileLYZ1SUM) {
445 fileLYZ1SUM->GetObject("cobjLYZ1SUM",pListLYZ1SUM);
446 if(pListLYZ1SUM) {
c49a8c1c 447 lyz1sumCommonHist = dynamic_cast<AliFlowCommonHist*> (pListLYZ1SUM->FindObject("AliFlowCommonHistLYZ1SUM"));
448 lyz1sumCommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListLYZ1SUM->FindObject("AliFlowCommonHistResultsLYZ1SUM"));
947cc449 449 if(lyz1sumCommonHistRes) {
450 flowValue[binLYZ1SUM-1] = (lyz1sumCommonHistRes->GetHistIntFlow())->GetBinContent(1);
451 flowError[binLYZ1SUM-1] = (lyz1sumCommonHistRes->GetHistIntFlow())->GetBinError(1);
8c5ec46a 452 }
453 }
a88e5ac2 454 }
8c5ec46a 455
947cc449 456 // LYZ2SUM = Lee-Yang Zeros (2nd run, sum) is used to get RP's and POI's integrated flow
457 TList *pListLYZ2SUM = NULL;
458 AliFlowCommonHist *lyz2sumCommonHist = NULL;
459 AliFlowCommonHistResults *lyz2sumCommonHistRes = NULL;
460 if(fileLYZ2SUM) {
461 fileLYZ2SUM->GetObject("cobjLYZ2SUM",pListLYZ2SUM);
462 if(pListLYZ2SUM) {
c49a8c1c 463 lyz2sumCommonHist = dynamic_cast<AliFlowCommonHist*> (pListLYZ2SUM->FindObject("AliFlowCommonHistLYZ2SUM"));
464 lyz2sumCommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListLYZ2SUM->FindObject("AliFlowCommonHistResultsLYZ2SUM"));
947cc449 465 if(lyz2sumCommonHistRes) {
466 flowValueRP[binLYZ2SUMRP-1] = (lyz2sumCommonHistRes->GetHistIntFlowRP())->GetBinContent(1);
467 flowErrorRP[binLYZ2SUMRP-1] = (lyz2sumCommonHistRes->GetHistIntFlowRP())->GetBinError(1);
468 flowValuePOI[binLYZ2SUMPOI-1] = (lyz2sumCommonHistRes->GetHistIntFlowPOI())->GetBinContent(1);
469 flowErrorPOI[binLYZ2SUMPOI-1] = (lyz2sumCommonHistRes->GetHistIntFlowPOI())->GetBinError(1);
470 }
471 }
472 }
473
474 // LYZ1PROD = Lee-Yang Zeros (1st run, product) is used to get only 'no-name' integrated flow
475 TList *pListLYZ1PROD = NULL;
476 AliFlowCommonHist *lyz1prodCommonHist = NULL;
477 AliFlowCommonHistResults *lyz1prodCommonHistRes = NULL;
478 if(fileLYZ1PROD) {
479 fileLYZ1PROD->GetObject("cobjLYZ1PROD",pListLYZ1PROD);
480 if(pListLYZ1PROD) {
c49a8c1c 481 lyz1prodCommonHist = dynamic_cast<AliFlowCommonHist*> (pListLYZ1PROD->FindObject("AliFlowCommonHistLYZ1PROD"));
482 lyz1prodCommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListLYZ1PROD->FindObject("AliFlowCommonHistResultsLYZ1PROD"));
947cc449 483 if(lyz1prodCommonHistRes) {
484 flowValue[binLYZ1PROD-1] = (lyz1prodCommonHistRes->GetHistIntFlow())->GetBinContent(1);
485 flowError[binLYZ1PROD-1] = (lyz1prodCommonHistRes->GetHistIntFlow())->GetBinError(1);
486 }
487 }
488 }
489
490 // LYZ2PROD = Lee-Yang Zeros (2nd run, product) is used to get RP's and POI's integrated flow
491 TList *pListLYZ2PROD = NULL;
492 AliFlowCommonHist *lyz2prodCommonHist = NULL;
493 AliFlowCommonHistResults *lyz2prodCommonHistRes = NULL;
494 if(fileLYZ2PROD) {
495 fileLYZ2PROD->GetObject("cobjLYZ2PROD",pListLYZ2PROD);
496 if(pListLYZ2PROD) {
c49a8c1c 497 lyz2prodCommonHist = dynamic_cast<AliFlowCommonHist*> (pListLYZ2PROD->FindObject("AliFlowCommonHistLYZ2PROD"));
498 lyz2prodCommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListLYZ2PROD->FindObject("AliFlowCommonHistResultsLYZ2PROD"));
947cc449 499 if(lyz2prodCommonHistRes) {
500 flowValueRP[binLYZ2PRODRP-1] = (lyz2prodCommonHistRes->GetHistIntFlowRP())->GetBinContent(1);
501 flowErrorRP[binLYZ2PRODRP-1] = (lyz2prodCommonHistRes->GetHistIntFlowRP())->GetBinError(1);
502 flowValuePOI[binLYZ2PRODPOI-1] = (lyz2prodCommonHistRes->GetHistIntFlowPOI())->GetBinContent(1);
503 flowErrorPOI[binLYZ2PRODPOI-1] = (lyz2prodCommonHistRes->GetHistIntFlowPOI())->GetBinError(1);
80e93fef 504 }
8c5ec46a 505 }
9d3cbee7 506 }
8c5ec46a 507
dec3fab6 508 // LYZEP = Lee-Yang Zeros Event Plane
8c5ec46a 509 TList *pListLYZEP = NULL;
510 AliFlowCommonHist *lyzepCommonHist = NULL;
511 AliFlowCommonHistResults *lyzepCommonHistRes = NULL;
512 if(fileLYZEP) {
513 fileLYZEP->GetObject("cobjLYZEP",pListLYZEP);
514 if(pListLYZEP) {
515 lyzepCommonHist = dynamic_cast<AliFlowCommonHist*> (pListLYZEP->FindObject("AliFlowCommonHistLYZEP"));
516 lyzepCommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListLYZEP->FindObject("AliFlowCommonHistResultsLYZEP"));
517 if(lyzepCommonHistRes) {
dec3fab6 518 flowValue[binLYZEP-1] = (lyzepCommonHistRes->GetHistIntFlow())->GetBinContent(1);
519 flowError[binLYZEP-1] = (lyzepCommonHistRes->GetHistIntFlow())->GetBinError(1);
520 flowValueRP[binLYZEPRP-1] = (lyzepCommonHistRes->GetHistIntFlowRP())->GetBinContent(1);
521 flowErrorRP[binLYZEPRP-1] = (lyzepCommonHistRes->GetHistIntFlowRP())->GetBinError(1);
522 flowValuePOI[binLYZEPPOI-1] = (lyzepCommonHistRes->GetHistIntFlowPOI())->GetBinContent(1);
523 flowErrorPOI[binLYZEPPOI-1] = (lyzepCommonHistRes->GetHistIntFlowPOI())->GetBinError(1);
8c5ec46a 524 }
525 }
9d3cbee7 526 }
9d3cbee7 527
dec3fab6 528 // FQD = Fitting q-distribution
8c5ec46a 529 TList *pListFQD = NULL;
530 AliFlowCommonHist *fqdCommonHist = NULL;
531 AliFlowCommonHistResults *fqdCommonHistRes = NULL;
532 if(fileFQD) {
533 fileFQD->GetObject("cobjFQD",pListFQD);
534 if(pListFQD) {
535 fqdCommonHist = dynamic_cast<AliFlowCommonHist*> (pListFQD->FindObject("AliFlowCommonHistFQD"));
536 fqdCommonHistRes = dynamic_cast<AliFlowCommonHistResults*> (pListFQD->FindObject("AliFlowCommonHistResultsFQD"));
537 if(fqdCommonHistRes) {
dec3fab6 538 flowValue[binFQD-1] = (fqdCommonHistRes->GetHistIntFlow())->GetBinContent(1);
539 flowError[binFQD-1] = (fqdCommonHistRes->GetHistIntFlow())->GetBinError(1);
947cc449 540 //flowValueRP[binFQDRP-1] = (fqdCommonHistRes->GetHistIntFlowRP())->GetBinContent(1);
541 //flowErrorRP[binFQDRP-1] = (fqdCommonHistRes->GetHistIntFlowRP())->GetBinError(1);
542 //flowValuePOI[binFQDPOI-1] = (fqdCommonHistRes->GetHistIntFlowPOI())->GetBinContent(1);
543 //flowErrorPOI[binFQDPOI-1] = (fqdCommonHistRes->GetHistIntFlowPOI())->GetBinError(1);
8c5ec46a 544 }
545 }
9d3cbee7 546 }
a88e5ac2 547
dec3fab6 548 // GFC = Generating Function Cumulants
8c5ec46a 549 TList *pListGFC = NULL;
550 AliFlowCommonHist *gfcCommonHist = NULL;
551 AliFlowCommonHistResults *gfcCommonHistRes2 = NULL;
552 AliFlowCommonHistResults *gfcCommonHistRes4 = NULL;
553 AliFlowCommonHistResults *gfcCommonHistRes6 = NULL;
554 AliFlowCommonHistResults *gfcCommonHistRes8 = NULL;
555 if(fileGFC) {
556 fileGFC->GetObject("cobjGFC",pListGFC);
557 if(pListGFC) {
558 gfcCommonHist = dynamic_cast<AliFlowCommonHist*> (pListGFC->FindObject("AliFlowCommonHistGFC"));
559 gfcCommonHistRes2 = dynamic_cast<AliFlowCommonHistResults*> (pListGFC->FindObject("AliFlowCommonHistResults2ndOrderGFC"));
560 if(gfcCommonHistRes2) {
dec3fab6 561 flowValue[binGFC2-1] = (gfcCommonHistRes2->GetHistIntFlow())->GetBinContent(1);
562 flowError[binGFC2-1] = (gfcCommonHistRes2->GetHistIntFlow())->GetBinError(1);
563 flowValueRP[binGFC2RP-1] = (gfcCommonHistRes2->GetHistIntFlowRP())->GetBinContent(1);
564 flowErrorRP[binGFC2RP-1] = (gfcCommonHistRes2->GetHistIntFlowRP())->GetBinError(1);
565 flowValuePOI[binGFC2POI-1] = (gfcCommonHistRes2->GetHistIntFlowPOI())->GetBinContent(1);
566 flowErrorPOI[binGFC2POI-1] = (gfcCommonHistRes2->GetHistIntFlowPOI())->GetBinError(1);
8c5ec46a 567 }
568 gfcCommonHistRes4 = dynamic_cast<AliFlowCommonHistResults*> (pListGFC->FindObject("AliFlowCommonHistResults4thOrderGFC"));
569 if(gfcCommonHistRes4) {
dec3fab6 570 flowValue[binGFC4-1] = (gfcCommonHistRes4->GetHistIntFlow())->GetBinContent(1);
571 flowError[binGFC4-1] = (gfcCommonHistRes4->GetHistIntFlow())->GetBinError(1);
572 flowValueRP[binGFC4RP-1] = (gfcCommonHistRes4->GetHistIntFlowRP())->GetBinContent(1);
573 flowErrorRP[binGFC4RP-1] = (gfcCommonHistRes4->GetHistIntFlowRP())->GetBinError(1);
574 flowValuePOI[binGFC4POI-1] = (gfcCommonHistRes4->GetHistIntFlowPOI())->GetBinContent(1);
575 flowErrorPOI[binGFC4POI-1] = (gfcCommonHistRes4->GetHistIntFlowPOI())->GetBinError(1);
8c5ec46a 576 }
577 gfcCommonHistRes6 = dynamic_cast<AliFlowCommonHistResults*> (pListGFC->FindObject("AliFlowCommonHistResults6thOrderGFC"));
578 if(gfcCommonHistRes6) {
dec3fab6 579 flowValue[binGFC6-1] = (gfcCommonHistRes6->GetHistIntFlow())->GetBinContent(1);
580 flowError[binGFC6-1] = (gfcCommonHistRes6->GetHistIntFlow())->GetBinError(1);
581 flowValueRP[binGFC6RP-1] = (gfcCommonHistRes6->GetHistIntFlowRP())->GetBinContent(1);
582 flowErrorRP[binGFC6RP-1] = (gfcCommonHistRes6->GetHistIntFlowRP())->GetBinError(1);
583 flowValuePOI[binGFC6POI-1] = (gfcCommonHistRes6->GetHistIntFlowPOI())->GetBinContent(1);
584 flowErrorPOI[binGFC6POI-1] = (gfcCommonHistRes6->GetHistIntFlowPOI())->GetBinError(1);
8c5ec46a 585 }
586 gfcCommonHistRes8 = dynamic_cast<AliFlowCommonHistResults*> (pListGFC->FindObject("AliFlowCommonHistResults8thOrderGFC"));
587 if(gfcCommonHistRes8) {
dec3fab6 588 flowValue[binGFC8-1] = (gfcCommonHistRes8->GetHistIntFlow())->GetBinContent(1);
589 flowError[binGFC8-1] = (gfcCommonHistRes8->GetHistIntFlow())->GetBinError(1);
590 flowValueRP[binGFC8RP-1] = (gfcCommonHistRes8->GetHistIntFlowRP())->GetBinContent(1);
591 flowErrorRP[binGFC8RP-1] = (gfcCommonHistRes8->GetHistIntFlowRP())->GetBinError(1);
592 flowValuePOI[binGFC8POI-1] = (gfcCommonHistRes8->GetHistIntFlowPOI())->GetBinContent(1);
593 flowErrorPOI[binGFC8POI-1] = (gfcCommonHistRes8->GetHistIntFlowPOI())->GetBinError(1);
8c5ec46a 594 }
595 }
9d3cbee7 596 }
1fca9c90 597
8c5ec46a 598 //QC = Q-cumulants
599 TList *pListQC = NULL;
600 AliFlowCommonHist *qcCommonHist2 = NULL;
601 AliFlowCommonHist *qcCommonHist4 = NULL;
602 AliFlowCommonHist *qcCommonHist6 = NULL;
603 AliFlowCommonHist *qcCommonHist8 = NULL;
604 AliFlowCommonHistResults *qcCommonHistRes2 = NULL;
605 AliFlowCommonHistResults *qcCommonHistRes4 = NULL;
606 AliFlowCommonHistResults *qcCommonHistRes6 = NULL;
607 AliFlowCommonHistResults *qcCommonHistRes8 = NULL;
608
609 if(fileQC) {
610 fileQC->GetObject("cobjQC",pListQC);
611 if(pListQC) {
612 qcCommonHist2 = dynamic_cast<AliFlowCommonHist*> (pListQC->FindObject("AliFlowCommonHist2ndOrderQC"));
613 qcCommonHistRes2 = dynamic_cast<AliFlowCommonHistResults*> (pListQC->FindObject("AliFlowCommonHistResults2ndOrderQC"));
614 if(qcCommonHistRes2) {
dec3fab6 615 flowValue[binQC2-1] = (qcCommonHistRes2->GetHistIntFlow())->GetBinContent(1);
cad7c05a 616 flowError[binQC2-1] = (qcCommonHistRes2->GetHistIntFlow())->GetBinError(1);
dec3fab6 617 flowValueRP[binQC2RP-1] = (qcCommonHistRes2->GetHistIntFlowRP())->GetBinContent(1);
618 //flowErrorRP[binQC2RP-1] = (qcCommonHistRes2->GetHistIntFlowRP())->GetBinError(1);
619 flowValuePOI[binQC2POI-1] = (qcCommonHistRes2->GetHistIntFlowPOI())->GetBinContent(1);
620 //flowErrorPOI[binQC2POI-1] = (qcCommonHistRes2->GetHistIntFlowPOI())->GetBinError(1);
8c5ec46a 621 }
622 qcCommonHist4 = dynamic_cast<AliFlowCommonHist*> (pListQC->FindObject("AliFlowCommonHist4thOrderQC"));
623 qcCommonHistRes4 = dynamic_cast<AliFlowCommonHistResults*> (pListQC->FindObject("AliFlowCommonHistResults4thOrderQC"));
624 if(qcCommonHistRes4) {
dec3fab6 625 flowValue[binQC4-1] = (qcCommonHistRes4->GetHistIntFlow())->GetBinContent(1);
626 //flowError[binQC4-1] = (qcCommonHistRes4->GetHistIntFlow())->GetBinError(1);
627 flowValueRP[binQC4RP-1] = (qcCommonHistRes4->GetHistIntFlowRP())->GetBinContent(1);
628 //flowErrorRP[binQC4RP-1] = (qcCommonHistRes4->GetHistIntFlowRP())->GetBinError(1);
629 flowValuePOI[binQC4POI-1] = (qcCommonHistRes4->GetHistIntFlowPOI())->GetBinContent(1);
630 //flowErrorPOI[binQC4POI-1] = (qcCommonHistRes4->GetHistIntFlowPOI())->GetBinError(1);
8c5ec46a 631 }
632 qcCommonHist6 = dynamic_cast<AliFlowCommonHist*> (pListQC->FindObject("AliFlowCommonHist6thOrderQC"));
633 qcCommonHistRes6 = dynamic_cast<AliFlowCommonHistResults*> (pListQC->FindObject("AliFlowCommonHistResults6thOrderQC"));
634 if(qcCommonHistRes6) {
dec3fab6 635 flowValue[binQC6-1] = (qcCommonHistRes6->GetHistIntFlow())->GetBinContent(1);
636 //flowError[binQC6-1] = (qcCommonHistRes6->GetHistIntFlow())->GetBinError(1);
637 flowValueRP[binQC6RP-1] = (qcCommonHistRes6->GetHistIntFlowRP())->GetBinContent(1);
638 //flowErrorRP[binQC6RP-1] = (qcCommonHistRes6->GetHistIntFlowRP())->GetBinError(1);
639 flowValuePOI[binQC6POI-1] = (qcCommonHistRes6->GetHistIntFlowPOI())->GetBinContent(1);
640 //flowErrorPOI[binQC6POI-1] = (qcCommonHistRes6->GetHistIntFlowPOI())->GetBinError(1);
8c5ec46a 641 }
642 qcCommonHist8 = dynamic_cast<AliFlowCommonHist*> (pListQC->FindObject("AliFlowCommonHist8thOrderQC"));
643 qcCommonHistRes8 = dynamic_cast<AliFlowCommonHistResults*> (pListQC->FindObject("AliFlowCommonHistResults8thOrderQC"));
644 if(qcCommonHistRes8) {
dec3fab6 645 flowValue[binQC8-1] = (qcCommonHistRes8->GetHistIntFlow())->GetBinContent(1);
646 //flowError[binQC8-1] = (qcCommonHistRes8->GetHistIntFlow())->GetBinError(1);
647 flowValueRP[binQC8RP-1] = (qcCommonHistRes8->GetHistIntFlowRP())->GetBinContent(1);
648 //flowErrorRP[binQC8RP-1] = (qcCommonHistRes8->GetHistIntFlowRP())->GetBinError(1);
649 flowValuePOI[binQC8POI-1] = (qcCommonHistRes8->GetHistIntFlowPOI())->GetBinContent(1);
650 //flowErrorPOI[binQC8POI-1] = (qcCommonHistRes8->GetHistIntFlowPOI())->GetBinError(1);
8c5ec46a 651 }
652 }
653 }
654
dec3fab6 655 // ranges on y-axis for 'no-name' plot:
656 Double_t dMax=flowValue[binMC-1]+flowError[binMC-1];
657 Double_t dMin=flowValue[binMC-1]-flowError[binMC-1];
8c5ec46a 658
659 for(Int_t i=1;i<nMethods;i++) {
660 if(!(flowValue[i]==0. && flowError[i]==0.)) {
661 if(dMax<flowValue[i]+flowError[i]) dMax=flowValue[i]+flowError[i];
662 if(dMin>flowValue[i]-flowError[i]) dMin=flowValue[i]-flowError[i];
663 }
664 }
a88e5ac2 665
dec3fab6 666 // ranges on y-axis for RP plot:
667 Double_t dMaxRP=flowValueRP[binMCRP-1]+flowErrorRP[binMCRP-1];
668 Double_t dMinRP=flowValueRP[binMCRP-1]-flowErrorRP[binMCRP-1];
8c5ec46a 669
670 for(Int_t i=1;i<nMethods;i++) {
671 if(!(flowValueRP[i]==0. && flowErrorRP[i]==0.)) {
672 if(dMaxRP<flowValueRP[i]+flowErrorRP[i]) dMaxRP=flowValueRP[i]+flowErrorRP[i];
673 if(dMinRP>flowValueRP[i]-flowErrorRP[i]) dMinRP=flowValueRP[i]-flowErrorRP[i];
674 }
675 }
1fca9c90 676
dec3fab6 677 // ranges on y-axis for POI plot:
678 Double_t dMaxPOI=flowValuePOI[binMCPOI-1]+flowErrorPOI[binMCPOI-1];
679 Double_t dMinPOI=flowValuePOI[binMCPOI-1]-flowErrorPOI[binMCPOI-1];
a88e5ac2 680
8c5ec46a 681 for(Int_t i=1;i<nMethods;i++) {
682 if(!(flowValuePOI[i]==0. && flowErrorPOI[i]==0.)) {
683 if(dMaxPOI<flowValuePOI[i]+flowErrorPOI[i]) dMaxPOI=flowValuePOI[i]+flowErrorPOI[i];
684 if(dMinPOI>flowValuePOI[i]-flowErrorPOI[i]) dMinPOI=flowValuePOI[i]-flowErrorPOI[i];
685 }
686 }
687
dec3fab6 688 // no-name:
8c5ec46a 689 TGraph* flowResults = new TGraphErrors(nMethods, x, flowValue, xError, flowError);
8c5ec46a 690 flowResults->SetMarkerStyle(markerStyle);
691 flowResults->SetMarkerColor(markerColor);
1fca9c90 692
dec3fab6 693 // RP:
3963f25c 694 TGraph* flowResultsRP = new TGraphErrors(nMethods, x, flowValueRP, xError, flowErrorRP);
dec3fab6 695 flowResultsRP->SetMarkerStyle(markerStyleRP);
696 flowResultsRP->SetMarkerColor(markerColorRP);
8c5ec46a 697
dec3fab6 698 // POI:
8c5ec46a 699 TGraph* flowResultsPOI = new TGraphErrors(nMethods, x, flowValuePOI, xError, flowErrorPOI);
dec3fab6 700 flowResultsPOI->SetMarkerStyle(markerStylePOI);
701 flowResultsPOI->SetMarkerColor(markerColorPOI);
077816b6 702
703 // for plot |v{MC}-v{method}/v{MC}|
704 // no-name, RP and POI
705 Double_t flowRelativeToMC[nMethods] = {0.};
706 Double_t flowRelativeToMCError[nMethods] = {0.};
707 Double_t flowRelativeToMCRP[nMethods] = {0.};
708 Double_t flowRelativeToMCErrorRP[nMethods] = {0.};
709 Double_t flowRelativeToMCPOI[nMethods] = {0.};
710 Double_t flowRelativeToMCErrorPOI[nMethods] = {0.};
711 flowRelativeToMC[0] = 0.; // MC relative to itself (to be improved)
712 flowRelativeToMCRP[0] = 0.; // MC relative to itself (to be improved)
713 flowRelativeToMCPOI[0] = 0.; // MC relative to itself (to be improved)
714 for(Int_t i=1;i<nMethods;i++)
715 {
716 if(flowValue[0] != 0)
717 {
718 if(flowValue[i] != 0) flowRelativeToMC[i] = (flowValue[i]-flowValue[0])/(flowValue[0]);
719 if(flowError[i] != 0) flowRelativeToMCError[i] = flowError[i]/flowValue[0];
720 }
721 if(flowValueRP[0] != 0)
722 {
723 if(flowValueRP[i] != 0) flowRelativeToMCRP[i] = (flowValueRP[i]-flowValueRP[0])/(flowValueRP[0]);
724 if(flowErrorRP[i] != 0) flowRelativeToMCErrorRP[i] = flowErrorRP[i]/flowValueRP[0];
725 }
726 if(flowValuePOI[0] != 0)
727 {
728 if(flowValuePOI[i] != 0) flowRelativeToMCPOI[i] = (flowValuePOI[i]-flowValuePOI[0])/(flowValuePOI[0]);
729 if(flowErrorPOI[i] != 0) flowRelativeToMCErrorPOI[i] = flowErrorPOI[i]/flowValuePOI[0];
730 }
731 } // for(Int_t i=1;i<nMethods;i++)
732
733 // integrated flow (no-name) relative to MC:
734 TGraph* flowResultsRelativeToMC = new TGraphErrors(nMethods, x, flowRelativeToMC, xError, flowRelativeToMCError);
735 flowResultsRelativeToMC->SetMarkerStyle(markerStyle);
736 flowResultsRelativeToMC->SetMarkerColor(markerColor);
737
738 // integrated flow (RP) relative to MC:
739 TGraph* flowResultsRelativeToMCRP = new TGraphErrors(nMethods, x, flowRelativeToMCRP, xError, flowRelativeToMCErrorRP);
740 flowResultsRelativeToMCRP->SetMarkerStyle(markerStyleRP);
741 flowResultsRelativeToMCRP->SetMarkerColor(markerColorRP);
742
743 // integrated flow (POI) relative to MC:
744 TGraph* flowResultsRelativeToMCPOI = new TGraphErrors(nMethods, x, flowRelativeToMCPOI, xError, flowRelativeToMCErrorPOI);
745 flowResultsRelativeToMCPOI->SetMarkerStyle(markerStylePOI);
746 flowResultsRelativeToMCPOI->SetMarkerColor(markerColorPOI);
8c5ec46a 747 //-----------------------------------------------------------------------------------
748
749 //----------------------------------------------------------------------------------
dec3fab6 750 // cosmetics: mesh for MC error bands (integrated flow)
3963f25c 751 TGraph* pMesh = NULL;
8c5ec46a 752 TGraph* pMeshRP = NULL;
753 TGraph* pMeshPOI = NULL;
754
755 if(intFlowAll && mcepCommonHistRes) {
8c5ec46a 756 Int_t nPts = nMethods;
dec3fab6 757 Double_t valueMC = flowValue[binMC-1];
758 Double_t errorMC = flowError[binMC-1];
759 Double_t valueMCRP = flowValueRP[binMCRP-1];
760 Double_t errorMCRP = flowErrorRP[binMCRP-1];
761 Double_t valueMCPOI = flowValuePOI[binMCPOI-1];
762 Double_t errorMCPOI = flowErrorPOI[binMCPOI-1];
8c5ec46a 763
3963f25c 764 pMesh = new TGraph(nPts);
8c5ec46a 765 pMeshRP = new TGraph(nPts);
766 pMeshPOI = new TGraph(nPts);
767
dec3fab6 768 // no-name:
8c5ec46a 769 pMesh->SetPoint(1,0,valueMC+errorMC);
770 pMesh->SetPoint(2,nPts+1,valueMC+errorMC);
771 pMesh->SetPoint(3,nPts+1,valueMC-errorMC);
772 pMesh->SetPoint(4,0,valueMC-errorMC);
3963f25c 773 pMesh->SetPoint(5,0,valueMC+errorMC);
8c5ec46a 774 pMesh->SetFillStyle(meshStyle);
775 pMesh->SetFillColor(meshColor);
3963f25c 776
dec3fab6 777 // RP:
8c5ec46a 778 pMeshRP->SetPoint(1,0,valueMCRP+errorMCRP);
779 pMeshRP->SetPoint(2,nPts+1,valueMCRP+errorMCRP);
780 pMeshRP->SetPoint(3,nPts+1,valueMCRP-errorMCRP);
781 pMeshRP->SetPoint(4,0,valueMCRP-errorMCRP);
3963f25c 782 pMeshRP->SetPoint(5,0,valueMCRP+errorMCRP);
dec3fab6 783 pMeshRP->SetFillStyle(meshStyleRP);
784 pMeshRP->SetFillColor(meshColorRP);
8c5ec46a 785
dec3fab6 786 // POI:
8c5ec46a 787 pMeshPOI->SetPoint(1,0,valueMCPOI+errorMCPOI);
788 pMeshPOI->SetPoint(2,nPts+1,valueMCPOI+errorMCPOI);
789 pMeshPOI->SetPoint(3,nPts+1,valueMCPOI-errorMCPOI);
790 pMeshPOI->SetPoint(4,0,valueMCPOI-errorMCPOI);
3963f25c 791 pMeshPOI->SetPoint(5,0,valueMCPOI+errorMCPOI);
dec3fab6 792 pMeshPOI->SetFillStyle(meshStylePOI);
793 pMeshPOI->SetFillColor(meshColorPOI);
8c5ec46a 794 }
795 //----------------------------------------------------------------------------------
1fca9c90 796
1fca9c90 797
8c5ec46a 798 //----------------------------------------------------------------------------------
799 //cosmetics: text (integrated flow)
800 //default text:
801 TPaveText *textDefault = new TPaveText(0.05,0.77,0.95,0.90,"NDC");
802 textDefault->SetTextFont(72);
803 textDefault->SetTextSize(0.08);
8c5ec46a 804
805 TString *entryDefaultAvM = new TString("Average Multiplicity");
806 TString *entryDefaultAnd = new TString("and");
807 TString *entryDefaultNumOfEvts = new TString("Number of Events:");
808
809 textDefault->AddText(entryDefaultAvM->Data());
810 textDefault->AddText(entryDefaultAnd->Data());
811 textDefault->AddText(entryDefaultNumOfEvts->Data());
812
dec3fab6 813 // results (no-name):
3963f25c 814 TPaveText *textResults = new TPaveText(0.05,0.12,0.95,0.70,"NDC");
815 textResults->SetTextFont(72);
816 textResults->SetTextSize(0.06);
8c5ec46a 817
dec3fab6 818 // results (RP):
8c5ec46a 819 TPaveText *textResultsRP = new TPaveText(0.05,0.12,0.95,0.70,"NDC");
820 textResultsRP->SetTextFont(72);
821 textResultsRP->SetTextSize(0.06);
822
dec3fab6 823 // results (POI):
8c5ec46a 824 TPaveText *textResultsPOI = new TPaveText(0.05,0.12,0.95,0.70,"NDC");
825 textResultsPOI->SetTextFont(72);
826 textResultsPOI->SetTextSize(0.06);
827
dec3fab6 828 // no-name:
947cc449 829 TString *entryMC = new TString("MC ........ ");
830 TString *entrySP = new TString("SP ........ ");
831 TString *entryGFC = new TString("GFC ....... ");
832 TString *entryQC2 = new TString("QC{2} ..... ");
833 TString *entryQC4 = new TString("QC{4} ..... ");
834 TString *entryQC6 = new TString("QC{6} ..... ");
835 TString *entryQC8 = new TString("QC{8} ..... ");
836 TString *entryFQD = new TString("FQD ....... ");
837 TString *entryLYZ1SUM = new TString("LYZ{sum} .. ");
838 TString *entryLYZ1PROD = new TString("LYZ{prod} . ");
839 TString *entryLYZEP = new TString("LYZEP ..... ");
8c5ec46a 840
dec3fab6 841 // RP:
947cc449 842 TString *entryMCRP = new TString("MC ........ ");
843 TString *entrySPRP = new TString("SP ........ ");
844 TString *entryGFCRP = new TString("GFC ....... ");
845 TString *entryQC2RP = new TString("QC{2} ..... ");
846 TString *entryQC4RP = new TString("QC{4} ..... ");
847 TString *entryQC6RP = new TString("QC{6} ..... ");
848 TString *entryQC8RP = new TString("QC{8} ..... ");
849 TString *entryFQDRP = new TString("FQD ....... ");
850 TString *entryLYZ1SUMRP = new TString("LYZ{sum} .. ");
851 TString *entryLYZ1PRODRP = new TString("LYZ{prod} . ");
852 TString *entryLYZEPRP = new TString("LYZEP ..... ");
853
dec3fab6 854 // POI:
947cc449 855 TString *entryMCPOI = new TString("MC ........ ");
856 TString *entrySPPOI = new TString("SP ........ ");
857 TString *entryGFCPOI = new TString("GFC ....... ");
858 TString *entryQC2POI = new TString("QC{2} ..... ");
859 TString *entryQC4POI = new TString("QC{4} ..... ");
860 TString *entryQC6POI = new TString("QC{6} ..... ");
861 TString *entryQC8POI = new TString("QC{8} ..... ");
862 TString *entryFQDPOI = new TString("FQD ....... ");
863 TString *entryLYZ1SUMPOI = new TString("LYZ{sum} .. ");
864 TString *entryLYZ1PRODPOI = new TString("LYZ{prod} . ");
865 TString *entryLYZEPPOI = new TString("LYZEP ..... ");
8c5ec46a 866
dec3fab6 867 // no-name:
8c5ec46a 868 Double_t avMultMC=0.;
869 Long_t nEvtsMC=0;
905bed86 870 Double_t avMultSP=0.;
871 Long_t nEvtsSP=0;
8c5ec46a 872 Double_t avMultGFC=0.;
873 Long_t nEvtsGFC=0;
8c5ec46a 874 Double_t avMultQC2=0., avMultQC4=0., avMultQC6=0., avMultQC8=0.;
875 Long_t nEvtsQC2=0, nEvtsQC4=0, nEvtsQC6=0, nEvtsQC8=0;
8c5ec46a 876 Double_t avMultFQD=0.;
877 Long_t nEvtsFQD=0;
947cc449 878 Double_t avMultLYZ1SUM=0.;
879 Long_t nEvtsLYZ1SUM=0;
880 Double_t avMultLYZ1PROD=0.;
881 Long_t nEvtsLYZ1PROD=0;
8c5ec46a 882 Double_t avMultLYZEP=0.;
883 Long_t nEvtsLYZEP=0;
8c5ec46a 884
dec3fab6 885 // RP:
8c5ec46a 886 Double_t avMultMCRP=0.;
887 Long_t nEvtsMCRP=0;
905bed86 888 Double_t avMultSPRP=0.;
889 Long_t nEvtsSPRP=0;
8c5ec46a 890 Double_t avMultGFCRP=0.;
891 Long_t nEvtsGFCRP=0;
8c5ec46a 892 Double_t avMultQC2RP=0., avMultQC4RP=0., avMultQC6RP=0., avMultQC8RP=0.;
893 Long_t nEvtsQC2RP=0, nEvtsQC4RP=0, nEvtsQC6RP=0, nEvtsQC8RP=0;
8c5ec46a 894 Double_t avMultFQDRP=0.;
895 Long_t nEvtsFQDRP=0;
947cc449 896 Double_t avMultLYZ1SUMRP=0.;
897 Long_t nEvtsLYZ1SUMRP=0;
898 Double_t avMultLYZ1PRODRP=0.;
899 Long_t nEvtsLYZ1PRODRP=0;
8c5ec46a 900 Double_t avMultLYZEPRP=0.;
901 Long_t nEvtsLYZEPRP=0;
902
dec3fab6 903 // POI:
8c5ec46a 904 Double_t avMultMCPOI=0.;
905 Long_t nEvtsMCPOI=0;
905bed86 906 Double_t avMultSPPOI=0.;
907 Long_t nEvtsSPPOI=0;
8c5ec46a 908 Double_t avMultGFCPOI=0.;
909 Long_t nEvtsGFCPOI=0;
8c5ec46a 910 Double_t avMultQC2POI=0., avMultQC4POI=0., avMultQC6POI=0., avMultQC8POI=0.;
911 Long_t nEvtsQC2POI=0, nEvtsQC4POI=0, nEvtsQC6POI=0, nEvtsQC8POI=0;
8c5ec46a 912 Double_t avMultFQDPOI=0.;
913 Long_t nEvtsFQDPOI=0;
947cc449 914 Double_t avMultLYZ1SUMPOI=0.;
915 Long_t nEvtsLYZ1SUMPOI=0;
916 Double_t avMultLYZ1PRODPOI=0.;
917 Long_t nEvtsLYZ1PRODPOI=0;
8c5ec46a 918 Double_t avMultLYZEPPOI=0.;
919 Long_t nEvtsLYZEPPOI=0;
920
dec3fab6 921 // MC:
8c5ec46a 922 if(mcepCommonHist) {
6a1a854d 923 avMultMC = (mcepCommonHist->GetHistMultRP())->GetMean();
924 nEvtsMC = (mcepCommonHist->GetHistMultRP())->GetEntries();
925 avMultMCRP = (mcepCommonHist->GetHistMultRP())->GetMean();
926 nEvtsMCRP = (mcepCommonHist->GetHistMultRP())->GetEntries();
927 avMultMCPOI = (mcepCommonHist->GetHistMultPOI())->GetMean();
928 nEvtsMCPOI = (mcepCommonHist->GetHistMultPOI())->GetEntries();
8c5ec46a 929 }
3963f25c 930
8c5ec46a 931 if(entryMC) {
932 entryMC->Append("M = ");
933 (*entryMC)+=(Long_t)avMultMC;
934 entryMC->Append(", N = ");
935 (*entryMC)+=(Long_t)nEvtsMC;
936 }
3963f25c 937
8c5ec46a 938 if(entryMCRP) {
939 entryMCRP->Append("M = ");
940 (*entryMCRP)+=(Long_t)avMultMCRP;
941 entryMCRP->Append(", N = ");
942 (*entryMCRP)+=(Long_t)nEvtsMCRP;
943 }
3963f25c 944
945 if(entryMCPOI) {
8c5ec46a 946 entryMCPOI->Append("M = ");
947 (*entryMCPOI)+=(Long_t)avMultMCPOI;
948 entryMCPOI->Append(", N = ");
949 (*entryMCPOI)+=(Long_t)nEvtsMCPOI;
3963f25c 950 }
1fca9c90 951
dec3fab6 952 // SP:
905bed86 953 if(spCommonHist) {
6a1a854d 954 avMultSP = (spCommonHist->GetHistMultRP())->GetMean();
955 nEvtsSP = (spCommonHist->GetHistMultRP())->GetEntries();
956 avMultSPRP = (spCommonHist->GetHistMultRP())->GetMean();
957 nEvtsSPRP = (spCommonHist->GetHistMultRP())->GetEntries();
958 avMultSPPOI = (spCommonHist->GetHistMultPOI())->GetMean();
959 nEvtsSPPOI = (spCommonHist->GetHistMultPOI())->GetEntries();
905bed86 960 }
961
962 if(entrySP) {
963 entrySP->Append("M = ");
964 (*entrySP)+=(Long_t)avMultSP;
965 entrySP->Append(", N = ");
966 (*entrySP)+=(Long_t)nEvtsSP;
967 }
968
969 if(entrySPRP) {
970 entrySPRP->Append("M = ");
971 (*entrySPRP)+=(Long_t)avMultSPRP;
972 entrySPRP->Append(", N = ");
973 (*entrySPRP)+=(Long_t)nEvtsSPRP;
974 }
975
976 if(entrySPPOI) {
977 entrySPPOI->Append("M = ");
978 (*entrySPPOI)+=(Long_t)avMultSPPOI;
979 entrySPPOI->Append(", N = ");
980 (*entrySPPOI)+=(Long_t)nEvtsSPPOI;
981 }
982
dec3fab6 983 // GFC:
8c5ec46a 984 if(gfcCommonHist) {
6a1a854d 985 avMultGFC = (gfcCommonHist->GetHistMultRP())->GetMean();
986 nEvtsGFC = (gfcCommonHist->GetHistMultRP())->GetEntries();
987 avMultGFCRP = (gfcCommonHist->GetHistMultRP())->GetMean();
988 nEvtsGFCRP = (gfcCommonHist->GetHistMultRP())->GetEntries();
989 avMultGFCPOI = (gfcCommonHist->GetHistMultPOI())->GetMean();
990 nEvtsGFCPOI = (gfcCommonHist->GetHistMultPOI())->GetEntries();
a88e5ac2 991 }
3963f25c 992
8c5ec46a 993 if(entryGFC) {
994 entryGFC->Append("M = ");
995 (*entryGFC)+=(Long_t)avMultGFC;
996 entryGFC->Append(", N = ");
997 (*entryGFC)+=(Long_t)nEvtsGFC;
a88e5ac2 998 }
3963f25c 999
8c5ec46a 1000 if(entryGFCRP) {
1001 entryGFCRP->Append("M = ");
1002 (*entryGFCRP)+=(Long_t)avMultGFCRP;
1003 entryGFCRP->Append(", N = ");
1004 (*entryGFCRP)+=(Long_t)nEvtsGFCRP;
1fca9c90 1005 }
8c5ec46a 1006 if(entryGFCPOI) {
1007 entryGFCPOI->Append("M = ");
1008 (*entryGFCPOI)+=(Long_t)avMultGFCPOI;
1009 entryGFCPOI->Append(", N = ");
1010 (*entryGFCPOI)+=(Long_t)nEvtsGFCPOI;
1fca9c90 1011 }
a88e5ac2 1012
dec3fab6 1013 // QC:
8c5ec46a 1014 if(qcCommonHist2) {
6a1a854d 1015 avMultQC2 = (qcCommonHist2->GetHistMultRP())->GetMean();
1016 nEvtsQC2 = (qcCommonHist2->GetHistMultRP())->GetEntries();
1017 avMultQC2RP = (qcCommonHist2->GetHistMultRP())->GetMean();
1018 nEvtsQC2RP = (qcCommonHist2->GetHistMultRP())->GetEntries();
1019 avMultQC2POI = (qcCommonHist2->GetHistMultPOI())->GetMean();
1020 nEvtsQC2POI = (qcCommonHist2->GetHistMultPOI())->GetEntries();
1fca9c90 1021 }
3963f25c 1022
a88e5ac2 1023 if(entryQC2)
1024 {
70288839 1025 entryQC2->Append("M = ");
1026 (*entryQC2)+=(Long_t)avMultQC2;
1027 entryQC2->Append(", N = ");
1028 (*entryQC2)+=(Long_t)nEvtsQC2;
70288839 1029 }
3963f25c 1030
1fca9c90 1031 if(entryQC2RP)
1032 {
1033 entryQC2RP->Append("M = ");
1034 (*entryQC2RP)+=(Long_t)avMultQC2RP;
1035 entryQC2RP->Append(", N = ");
1036 (*entryQC2RP)+=(Long_t)nEvtsQC2RP;
1037 }
3963f25c 1038
1fca9c90 1039 if(entryQC2POI)
1040 {
1041 entryQC2POI->Append("M = ");
1042 (*entryQC2POI)+=(Long_t)avMultQC2POI;
1043 entryQC2POI->Append(", N = ");
1044 (*entryQC2POI)+=(Long_t)nEvtsQC2POI;
1045 }
1046
70288839 1047 if(qcCommonHist4)
1048 {
6a1a854d 1049 avMultQC4 = (qcCommonHist4->GetHistMultRP())->GetMean();
1050 nEvtsQC4 = (qcCommonHist4->GetHistMultRP())->GetEntries();
1051 avMultQC4RP = (qcCommonHist4->GetHistMultRP())->GetMean();
1052 nEvtsQC4RP = (qcCommonHist4->GetHistMultRP())->GetEntries();
1053 avMultQC4POI = (qcCommonHist4->GetHistMultPOI())->GetMean();
1054 nEvtsQC4POI = (qcCommonHist4->GetHistMultPOI())->GetEntries();
a88e5ac2 1055 }
3963f25c 1056
a88e5ac2 1057 if(entryQC4)
1058 {
70288839 1059 entryQC4->Append("M = ");
1060 (*entryQC4)+=(Long_t)avMultQC4;
1061 entryQC4->Append(", N = ");
1062 (*entryQC4)+=(Long_t)nEvtsQC4;
70288839 1063 }
3963f25c 1064
1fca9c90 1065 if(entryQC4RP)
1066 {
1067 entryQC4RP->Append("M = ");
1068 (*entryQC4RP)+=(Long_t)avMultQC4RP;
1069 entryQC4RP->Append(", N = ");
1070 (*entryQC4RP)+=(Long_t)nEvtsQC4RP;
1071 }
3963f25c 1072
1fca9c90 1073 if(entryQC4POI)
1074 {
1075 entryQC4POI->Append("M = ");
1076 (*entryQC4POI)+=(Long_t)avMultQC4POI;
1077 entryQC4POI->Append(", N = ");
1078 (*entryQC4POI)+=(Long_t)nEvtsQC4POI;
1079 }
1080
a88e5ac2 1081 if(qcCommonHist6)
1082 {
6a1a854d 1083 avMultQC6 = (qcCommonHist6->GetHistMultRP())->GetMean();
1084 nEvtsQC6 = (qcCommonHist6->GetHistMultRP())->GetEntries();
1085 avMultQC6RP = (qcCommonHist6->GetHistMultRP())->GetMean();
1086 nEvtsQC6RP = (qcCommonHist6->GetHistMultRP())->GetEntries();
1087 avMultQC6POI = (qcCommonHist6->GetHistMultPOI())->GetMean();
1088 nEvtsQC6POI = (qcCommonHist6->GetHistMultPOI())->GetEntries();
a88e5ac2 1089 }
3963f25c 1090
a88e5ac2 1091 if(entryQC6)
1092 {
1093 entryQC6->Append("M = ");
1094 (*entryQC6)+=(Long_t)avMultQC6;
1095 entryQC6->Append(", N = ");
1096 (*entryQC6)+=(Long_t)nEvtsQC6;
1097 }
3963f25c 1098
1fca9c90 1099 if(entryQC6RP)
1100 {
1101 entryQC6RP->Append("M = ");
1102 (*entryQC6RP)+=(Long_t)avMultQC6RP;
1103 entryQC6RP->Append(", N = ");
1104 (*entryQC6RP)+=(Long_t)nEvtsQC6RP;
1105 }
3963f25c 1106
1fca9c90 1107 if(entryQC6POI)
1108 {
1109 entryQC6POI->Append("M = ");
1110 (*entryQC6POI)+=(Long_t)avMultQC6POI;
1111 entryQC6POI->Append(", N = ");
1112 (*entryQC6POI)+=(Long_t)nEvtsQC6POI;
1113 }
1114
a88e5ac2 1115 if(qcCommonHist8)
1116 {
6a1a854d 1117 avMultQC8 = (qcCommonHist8->GetHistMultRP())->GetMean();
1118 nEvtsQC8 = (qcCommonHist8->GetHistMultRP())->GetEntries();
1119 avMultQC8RP = (qcCommonHist8->GetHistMultRP())->GetMean();
1120 nEvtsQC8RP = (qcCommonHist8->GetHistMultRP())->GetEntries();
1121 avMultQC8POI = (qcCommonHist8->GetHistMultPOI())->GetMean();
1122 nEvtsQC8POI = (qcCommonHist8->GetHistMultPOI())->GetEntries();
a88e5ac2 1123 }
3963f25c 1124
a88e5ac2 1125 if(entryQC8)
1126 {
1127 entryQC8->Append("M = ");
1128 (*entryQC8)+=(Long_t)avMultQC8;
1129 entryQC8->Append(", N = ");
1130 (*entryQC8)+=(Long_t)nEvtsQC8;
1131 }
3963f25c 1132
1fca9c90 1133 if(entryQC8RP)
1134 {
1135 entryQC8RP->Append("M = ");
1136 (*entryQC8RP)+=(Long_t)avMultQC8RP;
1137 entryQC8RP->Append(", N = ");
1138 (*entryQC8RP)+=(Long_t)nEvtsQC8RP;
1139 }
3963f25c 1140
1fca9c90 1141 if(entryQC8POI)
1142 {
1143 entryQC8POI->Append("M = ");
1144 (*entryQC8POI)+=(Long_t)avMultQC8POI;
1145 entryQC8POI->Append(", N = ");
1146 (*entryQC8POI)+=(Long_t)nEvtsQC8POI;
1147 }
1148
dec3fab6 1149 // FQD:
a88e5ac2 1150 if(fqdCommonHist)
1151 {
6a1a854d 1152 avMultFQD = (fqdCommonHist->GetHistMultRP())->GetMean();
1153 nEvtsFQD = (fqdCommonHist->GetHistMultRP())->GetEntries();
1154 avMultFQDRP = (fqdCommonHist->GetHistMultRP())->GetMean();
1155 nEvtsFQDRP = (fqdCommonHist->GetHistMultRP())->GetEntries();
1156 avMultFQDPOI = (fqdCommonHist->GetHistMultPOI())->GetMean();
1157 nEvtsFQDPOI = (fqdCommonHist->GetHistMultPOI())->GetEntries();
a88e5ac2 1158 }
3963f25c 1159
a88e5ac2 1160 if(entryFQD)
1161 {
1162 entryFQD->Append("M = ");
1163 (*entryFQD)+=(Long_t)avMultFQD;
1164 entryFQD->Append(", N = ");
1165 (*entryFQD)+=(Long_t)nEvtsFQD;
1166 }
3963f25c 1167
1fca9c90 1168 if(entryFQDRP)
1169 {
1170 entryFQDRP->Append("M = ");
1171 (*entryFQDRP)+=(Long_t)avMultFQDRP;
1172 entryFQDRP->Append(", N = ");
1173 (*entryFQDRP)+=(Long_t)nEvtsFQDRP;
1174 }
3963f25c 1175
1fca9c90 1176 if(entryFQDPOI)
1177 {
1178 entryFQDPOI->Append("M = ");
1179 (*entryFQDPOI)+=(Long_t)avMultFQDPOI;
1180 entryFQDPOI->Append(", N = ");
1181 (*entryFQDPOI)+=(Long_t)nEvtsFQDPOI;
1182 }
1183
947cc449 1184 // LYZ1SUM:
1185 if(lyz1sumCommonHist)
1186 {
1187 avMultLYZ1SUM = (lyz1sumCommonHist->GetHistMultRP())->GetMean();
1188 nEvtsLYZ1SUM = (lyz1sumCommonHist->GetHistMultRP())->GetEntries();
1189 avMultLYZ1SUMRP = (lyz1sumCommonHist->GetHistMultRP())->GetMean();
1190 nEvtsLYZ1SUMRP = (lyz1sumCommonHist->GetHistMultRP())->GetEntries();
1191 avMultLYZ1SUMPOI = (lyz1sumCommonHist->GetHistMultPOI())->GetMean();
1192 nEvtsLYZ1SUMPOI = (lyz1sumCommonHist->GetHistMultPOI())->GetEntries();
1193 }
1194
1195 if(entryLYZ1SUM)
a88e5ac2 1196 {
947cc449 1197 entryLYZ1SUM->Append("M = ");
1198 (*entryLYZ1SUM)+=(Long_t)avMultLYZ1SUM;
1199 entryLYZ1SUM->Append(", N = ");
1200 (*entryLYZ1SUM)+=(Long_t)nEvtsLYZ1SUM;
a88e5ac2 1201 }
3963f25c 1202
947cc449 1203 if(entryLYZ1SUMRP)
a88e5ac2 1204 {
947cc449 1205 entryLYZ1SUMRP->Append("M = ");
1206 (*entryLYZ1SUMRP)+=(Long_t)avMultLYZ1SUMRP;
1207 entryLYZ1SUMRP->Append(", N = ");
1208 (*entryLYZ1SUMRP)+=(Long_t)nEvtsLYZ1SUMRP;
a88e5ac2 1209 }
3963f25c 1210
947cc449 1211 if(entryLYZ1SUMPOI)
1212 {
1213 entryLYZ1SUMPOI->Append("M = ");
1214 (*entryLYZ1SUMPOI)+=(Long_t)avMultLYZ1SUMPOI;
1215 entryLYZ1SUMPOI->Append(", N = ");
1216 (*entryLYZ1SUMPOI)+=(Long_t)nEvtsLYZ1SUMPOI;
1217 }
1218
1219 // LYZ1PROD:
1220 if(lyz1prodCommonHist)
1221 {
1222 avMultLYZ1PROD = (lyz1prodCommonHist->GetHistMultRP())->GetMean();
1223 nEvtsLYZ1PROD = (lyz1prodCommonHist->GetHistMultRP())->GetEntries();
1224 avMultLYZ1PRODRP = (lyz1prodCommonHist->GetHistMultRP())->GetMean();
1225 nEvtsLYZ1PRODRP = (lyz1prodCommonHist->GetHistMultRP())->GetEntries();
1226 avMultLYZ1PRODPOI = (lyz1prodCommonHist->GetHistMultPOI())->GetMean();
1227 nEvtsLYZ1PRODPOI = (lyz1prodCommonHist->GetHistMultPOI())->GetEntries();
1228 }
1229
1230 if(entryLYZ1PROD)
1fca9c90 1231 {
947cc449 1232 entryLYZ1PROD->Append("M = ");
1233 (*entryLYZ1PROD)+=(Long_t)avMultLYZ1PROD;
1234 entryLYZ1PROD->Append(", N = ");
1235 (*entryLYZ1PROD)+=(Long_t)nEvtsLYZ1PROD;
1fca9c90 1236 }
3963f25c 1237
947cc449 1238 if(entryLYZ1PRODRP)
1fca9c90 1239 {
947cc449 1240 entryLYZ1PRODRP->Append("M = ");
1241 (*entryLYZ1PRODRP)+=(Long_t)avMultLYZ1PRODRP;
1242 entryLYZ1PRODRP->Append(", N = ");
1243 (*entryLYZ1PRODRP)+=(Long_t)nEvtsLYZ1PRODRP;
1fca9c90 1244 }
70288839 1245
947cc449 1246 if(entryLYZ1PRODPOI)
1247 {
1248 entryLYZ1PRODPOI->Append("M = ");
1249 (*entryLYZ1PRODPOI)+=(Long_t)avMultLYZ1PRODPOI;
1250 entryLYZ1PRODPOI->Append(", N = ");
1251 (*entryLYZ1PRODPOI)+=(Long_t)nEvtsLYZ1PRODPOI;
1252 }
1253
dec3fab6 1254 // LYZEP:
a88e5ac2 1255 if(lyzepCommonHist)
70288839 1256 {
6a1a854d 1257 avMultLYZEP = (lyzepCommonHist->GetHistMultRP())->GetMean();
1258 nEvtsLYZEP = (lyzepCommonHist->GetHistMultRP())->GetEntries();
1259 avMultLYZEPRP = (lyzepCommonHist->GetHistMultRP())->GetMean();
1260 nEvtsLYZEPRP = (lyzepCommonHist->GetHistMultRP())->GetEntries();
1261 avMultLYZEPPOI = (lyzepCommonHist->GetHistMultPOI())->GetMean();
1262 nEvtsLYZEPPOI = (lyzepCommonHist->GetHistMultPOI())->GetEntries();
70288839 1263 }
3963f25c 1264
947cc449 1265
a88e5ac2 1266 if(entryLYZEP)
70288839 1267 {
a88e5ac2 1268 entryLYZEP->Append("M = ");
1269 (*entryLYZEP)+=(Long_t)avMultLYZEP;
1270 entryLYZEP->Append(", N = ");
1271 (*entryLYZEP)+=(Long_t)nEvtsLYZEP;
70288839 1272 }
3963f25c 1273
1fca9c90 1274 if(entryLYZEPRP)
1275 {
1276 entryLYZEPRP->Append("M = ");
1277 (*entryLYZEPRP)+=(Long_t)avMultLYZEPRP;
1278 entryLYZEPRP->Append(", N = ");
1279 (*entryLYZEPRP)+=(Long_t)nEvtsLYZEPRP;
1280 }
3963f25c 1281
1fca9c90 1282 if(entryLYZEPPOI)
1283 {
1284 entryLYZEPPOI->Append("M = ");
1285 (*entryLYZEPPOI)+=(Long_t)avMultLYZEPPOI;
1286 entryLYZEPPOI->Append(", N = ");
1287 (*entryLYZEPPOI)+=(Long_t)nEvtsLYZEPPOI;
1288 }
1289
dec3fab6 1290 // no-name:
a88e5ac2 1291 if(textResults)
70288839 1292 {
a88e5ac2 1293 textResults->AddText(entryMC->Data());
905bed86 1294 textResults->AddText(entrySP->Data());
a88e5ac2 1295 textResults->AddText(entryGFC->Data());
1296 textResults->AddText(entryQC2->Data());
1297 textResults->AddText(entryQC4->Data());
1298 textResults->AddText(entryQC6->Data());
1299 textResults->AddText(entryQC8->Data());
1300 textResults->AddText(entryFQD->Data());
947cc449 1301 textResults->AddText(entryLYZ1SUM->Data());
1302 textResults->AddText(entryLYZ1PROD->Data());
a88e5ac2 1303 textResults->AddText(entryLYZEP->Data());
70288839 1304 }
3963f25c 1305
dec3fab6 1306 // RP:
1fca9c90 1307 if(textResultsRP)
1308 {
1309 textResultsRP->AddText(entryMCRP->Data());
905bed86 1310 textResultsRP->AddText(entrySPRP->Data());
1fca9c90 1311 textResultsRP->AddText(entryGFCRP->Data());
1312 textResultsRP->AddText(entryQC2RP->Data());
1313 textResultsRP->AddText(entryQC4RP->Data());
1314 textResultsRP->AddText(entryQC6RP->Data());
1315 textResultsRP->AddText(entryQC8RP->Data());
1316 textResultsRP->AddText(entryFQDRP->Data());
947cc449 1317 textResultsRP->AddText(entryLYZ1SUMRP->Data());
1318 textResultsRP->AddText(entryLYZ1PRODRP->Data());
1fca9c90 1319 textResultsRP->AddText(entryLYZEPRP->Data());
1320 }
dec3fab6 1321
1322 // POI:
1fca9c90 1323 if(textResultsPOI)
1324 {
1325 textResultsPOI->AddText(entryMCPOI->Data());
905bed86 1326 textResultsPOI->AddText(entrySPPOI->Data());
1fca9c90 1327 textResultsPOI->AddText(entryGFCPOI->Data());
1328 textResultsPOI->AddText(entryQC2POI->Data());
1329 textResultsPOI->AddText(entryQC4POI->Data());
1330 textResultsPOI->AddText(entryQC6POI->Data());
1331 textResultsPOI->AddText(entryQC8POI->Data());
1332 textResultsPOI->AddText(entryFQDPOI->Data());
947cc449 1333 textResultsPOI->AddText(entryLYZ1SUMPOI->Data());
1334 textResultsPOI->AddText(entryLYZ1PRODPOI->Data());
1fca9c90 1335 textResultsPOI->AddText(entryLYZEPPOI->Data());
1336 }
a88e5ac2 1337 //----------------------------------------------------------------------------------
70288839 1338
3963f25c 1339
70288839 1340 //----------------------------------------------------------------------------------
da24213b 1341 // final drawing for integrated flow (no-name):
1342 if(plotIntFlow)
1343 {
1344 TCanvas* intFlowAllCanvas = new TCanvas("Integrated Flow","Integrated Flow",1000,600);
6f62c2a7 1345
da24213b 1346 intFlowAllCanvas->Divide(2,1);
9d3cbee7 1347
da24213b 1348 // 1st pad is for plot:
1349 (intFlowAllCanvas->cd(1))->SetPad(0.0,0.0,0.75,1.0);
1350
1351 if(intFlowAll)
a88e5ac2 1352 {
da24213b 1353 if(dMin>0. && dMax>0.)
1354 {
1355 (intFlowAll->GetYaxis())->SetRangeUser(0.9744*dMin,1.0144*dMax);
1356 } else if(dMin<0. && dMax>0.)
1357 {
1358 if(!(-1.*dMin<4.*dMax))
1359 {
1360 (intFlowAll->GetYaxis())->SetRangeUser(1.0266*dMin,1.0144*dMax);
1361 } else {(intFlowAll->GetYaxis())->SetRangeUser(1.1266*dMin,1.0144*dMax);}
1362 } else if(dMin<0. && dMax<0.)
1363 {
1364 (intFlowAll->GetYaxis())->SetRangeUser(1.0266*dMin,0.9866*dMax);
1365 }
1366 intFlowAll->Draw("E1");
1367 }
e83922f2 1368
da24213b 1369 if(pMesh) pMesh->Draw("LFSAME");
1370
1371 if(flowResults) flowResults->Draw("PSAME");
a88e5ac2 1372
da24213b 1373 // 2nd pad is for legend:
1374 (intFlowAllCanvas->cd(2))->SetPad(0.75,0.0,1.0,1.0);
a88e5ac2 1375
dec3fab6 1376 if(textDefault) textDefault->Draw();
1377
1378 if(textResults) textResults->Draw();
1379
da24213b 1380 }// end of if(plotIntFlow)
a88e5ac2 1381 //----------------------------------------------------------------------------------
e83922f2 1382
077816b6 1383
1384 //----------------------------------------------------------------------------------
1385 // final drawing for integrated flow relative to MC (no-name):
1386 if(plotIntFlowRelativeToMC)
1387 {
1388 TCanvas* intFlowAllRelativeToMCCanvas = new TCanvas("Integrated Flow Relative To MC","Integrated Flow Relative To MC",1000,600);
1389
1390 intFlowAllRelativeToMCCanvas->Divide(2,1);
1391
1392 // 1st pad is for plot:
1393 (intFlowAllRelativeToMCCanvas->cd(1))->SetPad(0.0,0.0,0.75,1.0);
1394
1395 TH1D *intFlowAllRelativeToMC = new TH1D(*intFlowAll);
c365fe76 1396 (intFlowAllRelativeToMC->GetYaxis())->SetRangeUser(-1,1);
1397 (intFlowAllRelativeToMC->GetYaxis())->SetTitle("(v_{n}\{method\} - v_{n}\{MC\})/v_{n}\{MC\}");
077816b6 1398 intFlowAllRelativeToMC->Draw("E1");
1399
1400 if(flowResultsRelativeToMC) flowResultsRelativeToMC->Draw("PSAME");
1401
1402 // 2nd pad is for legend:
1403 (intFlowAllRelativeToMCCanvas->cd(2))->SetPad(0.75,0.0,1.0,1.0);
1404
1405 if(textDefault) textDefault->Draw();
1406
1407 if(textResults) textResults->Draw();
1408
1409 }// end of if(plotIntFlowRelativeToMC)
1410 //----------------------------------------------------------------------------------
1411
1412
1fca9c90 1413 //----------------------------------------------------------------------------------
1414 //final drawing for integrated flow of RP (i.e. of particles used to determine the reaction plane):
e83922f2 1415 if(plotIntFlowRP)
1416 {
1417 TCanvas* intFlowAllCanvasRP = new TCanvas("Integrated Flow RP","Integrated Flow RP",1000,600);
1fca9c90 1418
e83922f2 1419 intFlowAllCanvasRP->Divide(2,1);
1fca9c90 1420
e83922f2 1421 //1st pad is for plot:
1422 (intFlowAllCanvasRP->cd(1))->SetPad(0.0,0.0,0.75,1.0);
1fca9c90 1423
dec3fab6 1424 TH1D *intFlowAllRP = new TH1D(*intFlowAll);
1425 intFlowAllRP->SetMarkerStyle(markerStyleRP);
1426 intFlowAllRP->SetMarkerColor(markerColorRP);
1427 (intFlowAllRP->GetXaxis())->SetBinLabel(binMCRP,"v_{2}{MC}");
1428 (intFlowAllRP->GetXaxis())->SetBinLabel(binSPRP,"v_{2}{SP}");
1429 (intFlowAllRP->GetXaxis())->SetBinLabel(binGFC2RP,"v_{2}{2,GFC}");
1430 (intFlowAllRP->GetXaxis())->SetBinLabel(binQC2RP,"v_{2}{2,QC}");
1431 (intFlowAllRP->GetXaxis())->SetBinLabel(binGFC4RP,"v_{2}{4,GFC}");
1432 (intFlowAllRP->GetXaxis())->SetBinLabel(binQC4RP,"v_{2}{4,QC}");
1433 (intFlowAllRP->GetXaxis())->SetBinLabel(binGFC6RP,"v_{2}{6,GFC}");
1434 (intFlowAllRP->GetXaxis())->SetBinLabel(binQC6RP,"v_{2}{6,QC}");
1435 (intFlowAllRP->GetXaxis())->SetBinLabel(binGFC8RP,"v_{2}{8,GFC}");
1436 (intFlowAllRP->GetXaxis())->SetBinLabel(binQC8RP,"v_{2}{8,QC}");
1437 (intFlowAllRP->GetXaxis())->SetBinLabel(binFQDRP,"v_{2}{FQD}");
947cc449 1438 (intFlowAllRP->GetXaxis())->SetBinLabel(binLYZ2SUMRP,"v_{2}{LYZ,sum}");
1439 (intFlowAllRP->GetXaxis())->SetBinLabel(binLYZ2PRODRP,"v_{2}{LYZ,prod}");
dec3fab6 1440 (intFlowAllRP->GetXaxis())->SetBinLabel(binLYZEPRP,"v_{2}{LYZEP}");
694e0378 1441
e83922f2 1442 if(intFlowAllRP)
1443 {
1444 if(dMinRP>0. && dMaxRP>0.)
1445 {
1446 (intFlowAllRP->GetYaxis())->SetRangeUser(0.9744*dMinRP,1.0144*dMaxRP);
1447 } else if(dMinRP<0. && dMaxRP>0.)
1448 {
1449 if(!(-1.*dMinRP<4.*dMaxRP))
1450 {
1451 (intFlowAllRP->GetYaxis())->SetRangeUser(1.0266*dMinRP,1.0144*dMaxRP);
1452 } else {(intFlowAllRP->GetYaxis())->SetRangeUser(1.1266*dMinRP,1.0144*dMaxRP);}
1453 } else if(dMinRP<0. && dMaxRP<0.)
1454 {
1455 (intFlowAllRP->GetYaxis())->SetRangeUser(1.0266*dMinRP,0.9866*dMaxRP);
1456 }
1457 intFlowAllRP->Draw("E1");
1458 }
694e0378 1459
e83922f2 1460 if(pMeshRP) pMeshRP->Draw("LFSAME");
1461
1462 if(flowResultsRP) flowResultsRP->Draw("PSAME");
1fca9c90 1463
e83922f2 1464 //2nd pad is for legend:
1465 (intFlowAllCanvasRP->cd(2))->SetPad(0.75,0.0,1.0,1.0);
1466
1467 if(textDefault) textDefault->Draw();
1fca9c90 1468
e83922f2 1469 if(textResultsRP) textResultsRP->Draw();
1470 }//end of if(plotIntFlowRP}
1fca9c90 1471 //----------------------------------------------------------------------------------
1472
077816b6 1473
1474 //----------------------------------------------------------------------------------
1475 // final drawing for integrated flow relative to MC (RP):
1476 if(plotIntFlowRelativeToMCRP)
1477 {
1478 TCanvas* intFlowAllRelativeToMCRPCanvas = new TCanvas("Integrated Flow (RP) Relative To MC","Integrated Flow (RP) Relative To MC",1000,600);
1479
1480 intFlowAllRelativeToMCRPCanvas->Divide(2,1);
1481
1482 // 1st pad is for plot:
1483 (intFlowAllRelativeToMCRPCanvas->cd(1))->SetPad(0.0,0.0,0.75,1.0);
1484
1485 TH1D *intFlowAllRelativeToMCRP = new TH1D(*intFlowAll);
077816b6 1486 (intFlowAllRelativeToMCRP->GetYaxis())->SetRangeUser(-1,1);
c365fe76 1487 (intFlowAllRelativeToMCRP->GetYaxis())->SetTitle("(v_{n}\{method\} - v_{n}\{MC\})/v_{n}\{MC\}");
077816b6 1488 intFlowAllRelativeToMCRP->Draw("E1");
1489
1490 if(flowResultsRelativeToMCRP) flowResultsRelativeToMCRP->Draw("PSAME");
1491
1492 // 2nd pad is for legend:
1493 (intFlowAllRelativeToMCRPCanvas->cd(2))->SetPad(0.75,0.0,1.0,1.0);
1494
1495 if(textDefault) textDefault->Draw();
1496
1497 if(textResultsRP) textResultsRP->Draw();
1498
c365fe76 1499 }// end of if(plotIntFlowRelativeToMCRP)
077816b6 1500 //----------------------------------------------------------------------------------
1501
1502
1fca9c90 1503 //----------------------------------------------------------------------------------
1504 //final drawing for integrated flow of POI (i.e. of particles of interest):
e83922f2 1505 if(plotIntFlowPOI)
1506 {
1507 TCanvas* intFlowAllCanvasPOI = new TCanvas("Integrated Flow POI","Integrated Flow POI",1000,600);
dec3fab6 1508
e83922f2 1509 intFlowAllCanvasPOI->Divide(2,1);
1fca9c90 1510
e83922f2 1511 //1st pad is for plot:
1512 (intFlowAllCanvasPOI->cd(1))->SetPad(0.0,0.0,0.75,1.0);
1513
694e0378 1514 TH1D *intFlowAllPOI = new TH1D(*intFlowAll);
dec3fab6 1515 intFlowAllPOI->SetMarkerStyle(markerStylePOI);
1516 intFlowAllPOI->SetMarkerColor(markerColorPOI);
1517 (intFlowAllPOI->GetXaxis())->SetBinLabel(binMCPOI,"v_{2}{MC}");
1518 (intFlowAllPOI->GetXaxis())->SetBinLabel(binSPPOI,"v_{2}{SP}");
1519 (intFlowAllPOI->GetXaxis())->SetBinLabel(binGFC2POI,"v_{2}{2,GFC}");
1520 (intFlowAllPOI->GetXaxis())->SetBinLabel(binQC2POI,"v_{2}{2,QC}");
1521 (intFlowAllPOI->GetXaxis())->SetBinLabel(binGFC4POI,"v_{2}{4,GFC}");
1522 (intFlowAllPOI->GetXaxis())->SetBinLabel(binQC4POI,"v_{2}{4,QC}");
1523 (intFlowAllPOI->GetXaxis())->SetBinLabel(binGFC6POI,"v_{2}{6,GFC}");
1524 (intFlowAllPOI->GetXaxis())->SetBinLabel(binQC6POI,"v_{2}{6,QC}");
1525 (intFlowAllPOI->GetXaxis())->SetBinLabel(binGFC8POI,"v_{2}{8,GFC}");
1526 (intFlowAllPOI->GetXaxis())->SetBinLabel(binQC8POI,"v_{2}{8,QC}");
1527 (intFlowAllPOI->GetXaxis())->SetBinLabel(binFQDPOI,"v_{2}{FQD}");
947cc449 1528 (intFlowAllPOI->GetXaxis())->SetBinLabel(binLYZ2SUMPOI,"v_{2}{LYZ,sum}");
1529 (intFlowAllPOI->GetXaxis())->SetBinLabel(binLYZ2PRODPOI,"v_{2}{LYZ,prod}");
dec3fab6 1530 (intFlowAllPOI->GetXaxis())->SetBinLabel(binLYZEPPOI,"v_{2}{LYZEP}");
694e0378 1531
e83922f2 1532 if(intFlowAllPOI)
1fca9c90 1533 {
e83922f2 1534 if(dMinPOI>0. && dMaxPOI>0.)
1535 {
1536 (intFlowAllPOI->GetYaxis())->SetRangeUser(0.9744*dMinPOI,1.0144*dMaxPOI);
1537 } else if(dMinPOI<0. && dMaxPOI>0.)
1538 {
1539 if(!(-1.*dMinPOI<4.*dMaxPOI))
1540 {
1541 (intFlowAllPOI->GetYaxis())->SetRangeUser(1.0266*dMinPOI,1.0144*dMaxPOI);
1542 } else {(intFlowAllPOI->GetYaxis())->SetRangeUser(1.1266*dMinPOI,1.0144*dMaxPOI);}
1543 } else if(dMinPOI<0. && dMaxPOI<0.)
1544 {
1545 (intFlowAllPOI->GetYaxis())->SetRangeUser(1.0266*dMinPOI,0.9866*dMaxPOI);
1546 }
1547 intFlowAllPOI->Draw("E1");
1548 }
1fca9c90 1549
e83922f2 1550 if(pMeshPOI) pMeshPOI->Draw("LFSAME");
1551
1552 if(flowResultsPOI) flowResultsPOI->Draw("PSAME");
1fca9c90 1553
e83922f2 1554 //2nd pad is for legend:
1555 (intFlowAllCanvasPOI->cd(2))->SetPad(0.75,0.0,1.0,1.0);
1556
1557 if(textDefault) textDefault->Draw();
1fca9c90 1558
e83922f2 1559 if(textResultsPOI) textResultsPOI->Draw();
1560 }// end of if(plotIntFlowPOI)
077816b6 1561 //----------------------------------------------------------------------------------
1562
1563
1564 //----------------------------------------------------------------------------------
1565 // final drawing for integrated flow relative to MC (POI):
1566 if(plotIntFlowRelativeToMCPOI)
1567 {
1568 TCanvas* intFlowAllRelativeToMCPOICanvas = new TCanvas("Integrated Flow (POI) Relative To MC","Integrated Flow (POI) Relative To MC",1000,600);
1569
1570 intFlowAllRelativeToMCPOICanvas->Divide(2,1);
1571
1572 // 1st pad is for plot:
1573 (intFlowAllRelativeToMCPOICanvas->cd(1))->SetPad(0.0,0.0,0.75,1.0);
1574
1575 TH1D *intFlowAllRelativeToMCPOI = new TH1D(*intFlowAll);
077816b6 1576 (intFlowAllRelativeToMCPOI->GetYaxis())->SetRangeUser(-1,1);
c365fe76 1577 (intFlowAllRelativeToMCPOI->GetYaxis())->SetTitle("(v_{n}\{method\} - v_{n}\{MC\})/v_{n}\{MC\}");
077816b6 1578 intFlowAllRelativeToMCPOI->Draw("E1");
1579
1580 if(flowResultsRelativeToMCPOI) flowResultsRelativeToMCPOI->Draw("PSAME");
1581
1582 // 2nd pad is for legend:
1583 (intFlowAllRelativeToMCPOICanvas->cd(2))->SetPad(0.75,0.0,1.0,1.0);
1584
1585 if(textDefault) textDefault->Draw();
1586
1587 if(textResultsPOI) textResultsPOI->Draw();
1588
c365fe76 1589 }// end of if(plotIntFlowRelativeToMCPOI)
077816b6 1590 //----------------------------------------------------------------------------------
1591
9d3cbee7 1592 //==================================================================================
e83922f2 1593
1594
1595
9d3cbee7 1596
1597 //==================================================================================
1598 // DIFFERENTIAL FLOW
1599 //==================================================================================
70288839 1600 Int_t iNbinsPt = AliFlowCommonConstants::GetNbinsPt();
1601 Double_t dPtMin = AliFlowCommonConstants::GetPtMin();
1602 Double_t dPtMax = AliFlowCommonConstants::GetPtMax();
1603
1fca9c90 1604 Int_t iNbinsEta = AliFlowCommonConstants::GetNbinsEta();
1605 Double_t dEtaMin = AliFlowCommonConstants::GetEtaMin();
1606 Double_t dEtaMax = AliFlowCommonConstants::GetEtaMax();
1607
a88e5ac2 1608 //----------------------------------------------------------------------------------
1fca9c90 1609 //cosmetics: the style histogram for differential flow (pt):
1610 TH1D *styleHistPt = new TH1D("styleHistPt","styleHistPt",iNbinsPt,dPtMin,dPtMax);
1611 styleHistPt->SetTitle("Differential Flow");
1612 styleHistPt->SetXTitle("p_{t} [GeV]");
1613 styleHistPt->SetYTitle("v_{n}");
1614
1615 //cosmetics: the style histogram for differential flow (eta):
1616 TH1D *styleHistEta = new TH1D("styleHistEta","styleHistEta",iNbinsEta,dEtaMin,dEtaMax);
1617 styleHistEta->SetTitle("Differential Flow");
1618 styleHistEta->SetXTitle("#eta");
1619 styleHistEta->SetYTitle("v_{n}");
a88e5ac2 1620 //----------------------------------------------------------------------------------
9d3cbee7 1621
1fca9c90 1622
1fca9c90 1623
1fca9c90 1624 //----------------------------------------------------------------------------------
1625 //RP:
1626 //cosmetics: Monte Carlo error bands for differential flow (Pt)
1627 TGraph* pMeshDiffFlowPtRP = NULL;
1628 if(mcepCommonHistRes)
1629 {
7d02d77f 1630 Int_t nBinsDiffFlowPtRP = (mcepCommonHistRes->GetHistDiffFlowPtRP())->GetNbinsX();
1fca9c90 1631 Double_t binWidthPtRP = (mcepCommonHistRes->GetHistDiffFlowPtRP())->GetBinWidth(1);//assuming that all bins have the same width
7d02d77f 1632
1633 //counting the non-empty bins:
1634 Int_t nNonEmptyBinsDiffFlowPtRP=0;
1635 for(Int_t i=1;i<nBinsDiffFlowPtRP+1;i++)
1636 {
1637 if(!(mcepCommonHistRes->GetHistDiffFlowPtRP())->GetBinError(i)==0.0))
1638 {
1639 nNonEmptyBinsDiffFlowPtRP++;
1640 }
1641 }
1fca9c90 1642
7d02d77f 1643 pMeshDiffFlowPtRP = new TGraph(2*nNonEmptyBinsDiffFlowPtRP+1);
1fca9c90 1644
7d02d77f 1645 Double_t valueMCPtRP=0.,errorMCPtRP=0.;
1646 Int_t countDiffFlowPtRP=1;
1647 Double_t xFirstDiffFlowPtRP=0.,yUpFirstDiffFlowPtRP=0.;//needed to close up the mesh
1648 for(Int_t i=1;i<nBinsDiffFlowPtRP+1;i++)
1fca9c90 1649 {
7d02d77f 1650 //setting up the upper limit of the mesh:
1fca9c90 1651 valueMCPtRP = (mcepCommonHistRes->GetHistDiffFlowPtRP())->GetBinContent(i);
7d02d77f 1652 errorMCPtRP = (mcepCommonHistRes->GetHistDiffFlowPtRP())->GetBinError(i);
1653 if(!(errorMCPtRP==0.0))
1654 {
1655 pMeshDiffFlowPtRP->SetPoint(countDiffFlowPtRP++,(i-0.5)*binWidthPtRP+dPtMin,valueMCPtRP+errorMCPtRP);
1656 if(xFirstDiffFlowPtRP==0.)
1657 {
1658 xFirstDiffFlowPtRP=(i-0.5)*binWidthPtRP+dPtMin;
1659 yUpFirstDiffFlowPtRP=valueMCPtRP+errorMCPtRP;
1660 }
1661 }
1662 }
1663 for(Int_t i=nBinsDiffFlowPtRP+1;i<2*nBinsDiffFlowPtRP+1;i++)
1664 {
1665 //setting up the lower limit of the mesh:
1666 valueMCPtRP = (mcepCommonHistRes->GetHistDiffFlowPtRP())->GetBinContent(2*nBinsDiffFlowPtRP+1-i);
1667 errorMCPtRP = (mcepCommonHistRes->GetHistDiffFlowPtRP())->GetBinError(2*nBinsDiffFlowPtRP+1-i);
1668 if(!(errorMCPtRP==0.0))
1669 {
1670 pMeshDiffFlowPtRP->SetPoint(countDiffFlowPtRP++,(2*nBinsDiffFlowPtRP-i+0.5)*binWidthPtRP+dPtMin,valueMCPtRP-errorMCPtRP);
1671 }
1672 }
1673 //closing the mesh area:
1674 pMeshDiffFlowPtRP->SetPoint(2*nNonEmptyBinsDiffFlowPtRP+1,xFirstDiffFlowPtRP,yUpFirstDiffFlowPtRP);
1675
1676 //setting the mesh style and color:
dec3fab6 1677 pMeshDiffFlowPtRP->SetFillStyle(meshStyleDiffFlowPtRP);
1678 pMeshDiffFlowPtRP->SetFillColor(meshColorDiffFlowPtRP);
1fca9c90 1679 }
7d02d77f 1680
1fca9c90 1681 //cosmetics: Monte Carlo error bands for differential flow (Eta)
1682 TGraph* pMeshDiffFlowEtaRP = NULL;
1683 if(mcepCommonHistRes)
1684 {
7d02d77f 1685 Int_t nBinsDiffFlowEtaRP = (mcepCommonHistRes->GetHistDiffFlowEtaRP())->GetNbinsX();
1fca9c90 1686 Double_t binWidthEtaRP = (mcepCommonHistRes->GetHistDiffFlowEtaRP())->GetBinWidth(1);//assuming that all bins have the same width
e83922f2 1687
7d02d77f 1688 //counting the non-empty bins:
1689 Int_t nNonEmptyBinsDiffFlowEtaRP=0;
1690 for(Int_t i=1;i<nBinsDiffFlowEtaRP+1;i++)
1fca9c90 1691 {
7d02d77f 1692 if(!(mcepCommonHistRes->GetHistDiffFlowEtaRP())->GetBinError(i)==0.0))
1693 {
1694 nNonEmptyBinsDiffFlowEtaRP++;
1695 }
1fca9c90 1696 }
7d02d77f 1697
1698 pMeshDiffFlowEtaRP = new TGraph(2*nNonEmptyBinsDiffFlowEtaRP+1);
1699
1700 Double_t valueMCEtaRP=0.,errorMCEtaRP=0.;
1701 Int_t countDiffFlowEtaRP=1;
1702 Double_t xFirstDiffFlowEtaRP=0.,yUpFirstDiffFlowEtaRP=0.;//needed to close up the mesh
1703 for(Int_t i=1;i<nBinsDiffFlowEtaRP+1;i++)
1fca9c90 1704 {
7d02d77f 1705 //setting up the upper limit of the mesh:
1706 valueMCEtaRP = (mcepCommonHistRes->GetHistDiffFlowEtaRP())->GetBinContent(i);
1707 errorMCEtaRP = (mcepCommonHistRes->GetHistDiffFlowEtaRP())->GetBinError(i);
1708 if(!(errorMCEtaRP==0.0))
1709 {
1710 pMeshDiffFlowEtaRP->SetPoint(countDiffFlowEtaRP++,(i-0.5)*binWidthEtaRP+dEtaMin,valueMCEtaRP+errorMCEtaRP);
1711 if(xFirstDiffFlowEtaRP==0.)
1712 {
1713 xFirstDiffFlowEtaRP=(i-0.5)*binWidthEtaRP+dEtaMin;
1714 yUpFirstDiffFlowEtaRP=valueMCEtaRP+errorMCEtaRP;
1715 }
1716 }
1717 }
1718 for(Int_t i=nBinsDiffFlowEtaRP+1;i<2*nBinsDiffFlowEtaRP+1;i++)
1719 {
1720 //setting up the lower limit of the mesh:
1721 valueMCEtaRP = (mcepCommonHistRes->GetHistDiffFlowEtaRP())->GetBinContent(2*nBinsDiffFlowEtaRP+1-i);
1722 errorMCEtaRP = (mcepCommonHistRes->GetHistDiffFlowEtaRP())->GetBinError(2*nBinsDiffFlowEtaRP+1-i);
1723 if(!(errorMCEtaRP==0.0))
1724 {
1725 pMeshDiffFlowEtaRP->SetPoint(countDiffFlowEtaRP++,(2*nBinsDiffFlowEtaRP-i+0.5)*binWidthEtaRP+dEtaMin,valueMCEtaRP-errorMCEtaRP);
1726 }
1727 }
1728 //closing the mesh area:
1729 pMeshDiffFlowEtaRP->SetPoint(2*nNonEmptyBinsDiffFlowEtaRP+1,xFirstDiffFlowEtaRP,yUpFirstDiffFlowEtaRP);
1730
1731 //setting the mesh style and color:
dec3fab6 1732 pMeshDiffFlowEtaRP->SetFillStyle(meshStyleDiffFlowEtaRP);
1733 pMeshDiffFlowEtaRP->SetFillColor(meshColorDiffFlowEtaRP);
1fca9c90 1734 }
1735 //----------------------------------------------------------------------------------
1736
1737
7d02d77f 1738
1739
1fca9c90 1740 //----------------------------------------------------------------------------------
1741 //POI:
1742 //cosmetics: Monte Carlo error bands for differential flow (Pt)
1743 TGraph* pMeshDiffFlowPtPOI = NULL;
1744 if(mcepCommonHistRes)
1745 {
7d02d77f 1746 Int_t nBinsDiffFlowPtPOI = (mcepCommonHistRes->GetHistDiffFlowPtPOI())->GetNbinsX();
1fca9c90 1747 Double_t binWidthPtPOI = (mcepCommonHistRes->GetHistDiffFlowPtPOI())->GetBinWidth(1);//assuming that all bins have the same width
7d02d77f 1748
1749 //counting the non-empty bins:
1750 Int_t nNonEmptyBinsDiffFlowPtPOI=0;
1751 for(Int_t i=1;i<nBinsDiffFlowPtPOI+1;i++)
1752 {
1753 if(!(mcepCommonHistRes->GetHistDiffFlowPtPOI())->GetBinError(i)==0.0))
1754 {
1755 nNonEmptyBinsDiffFlowPtPOI++;
1756 }
1757 }
1fca9c90 1758
7d02d77f 1759 pMeshDiffFlowPtPOI = new TGraph(2*nNonEmptyBinsDiffFlowPtPOI+1);
1fca9c90 1760
7d02d77f 1761 Double_t valueMCPtPOI=0.,errorMCPtPOI=0.;
1762 Int_t countDiffFlowPtPOI=1;
1763 Double_t xFirstDiffFlowPtPOI=0.,yUpFirstDiffFlowPtPOI=0.;//needed to close up the mesh
1764 for(Int_t i=1;i<nBinsDiffFlowPtPOI+1;i++)
1fca9c90 1765 {
7d02d77f 1766 //setting up the upper limit of the mesh:
1fca9c90 1767 valueMCPtPOI = (mcepCommonHistRes->GetHistDiffFlowPtPOI())->GetBinContent(i);
7d02d77f 1768 errorMCPtPOI = (mcepCommonHistRes->GetHistDiffFlowPtPOI())->GetBinError(i);
1769 if(!(errorMCPtPOI==0.0))
1770 {
1771 pMeshDiffFlowPtPOI->SetPoint(countDiffFlowPtPOI++,(i-0.5)*binWidthPtPOI+dPtMin,valueMCPtPOI+errorMCPtPOI);
1772 if(xFirstDiffFlowPtPOI==0.)
1773 {
1774 xFirstDiffFlowPtPOI=(i-0.5)*binWidthPtPOI+dPtMin;
1775 yUpFirstDiffFlowPtPOI=valueMCPtPOI+errorMCPtPOI;
1776 }
1777 }
1778 }
1779 for(Int_t i=nBinsDiffFlowPtPOI+1;i<2*nBinsDiffFlowPtPOI+1;i++)
1780 {
1781 //setting up the lower limit of the mesh:
1782 valueMCPtPOI = (mcepCommonHistRes->GetHistDiffFlowPtPOI())->GetBinContent(2*nBinsDiffFlowPtPOI+1-i);
1783 errorMCPtPOI = (mcepCommonHistRes->GetHistDiffFlowPtPOI())->GetBinError(2*nBinsDiffFlowPtPOI+1-i);
1784 if(!(errorMCPtPOI==0.0))
1785 {
1786 pMeshDiffFlowPtPOI->SetPoint(countDiffFlowPtPOI++,(2*nBinsDiffFlowPtPOI-i+0.5)*binWidthPtPOI+dPtMin,valueMCPtPOI-errorMCPtPOI);
1787 }
1788 }
1789 //closing the mesh area:
1790 pMeshDiffFlowPtPOI->SetPoint(2*nNonEmptyBinsDiffFlowPtPOI+1,xFirstDiffFlowPtPOI,yUpFirstDiffFlowPtPOI);
1791
1792 //setting the mesh style and color:
dec3fab6 1793 pMeshDiffFlowPtPOI->SetFillStyle(meshStyleDiffFlowPtPOI);
1794 pMeshDiffFlowPtPOI->SetFillColor(meshColorDiffFlowPtPOI);
1fca9c90 1795 }
7d02d77f 1796
1fca9c90 1797 //cosmetics: Monte Carlo error bands for differential flow (Eta)
1798 TGraph* pMeshDiffFlowEtaPOI = NULL;
1799 if(mcepCommonHistRes)
1800 {
7d02d77f 1801 Int_t nBinsDiffFlowEtaPOI = (mcepCommonHistRes->GetHistDiffFlowEtaPOI())->GetNbinsX();
1fca9c90 1802 Double_t binWidthEtaPOI = (mcepCommonHistRes->GetHistDiffFlowEtaPOI())->GetBinWidth(1);//assuming that all bins have the same width
7d02d77f 1803
1804 //counting the non-empty bins:
1805 Int_t nNonEmptyBinsDiffFlowEtaPOI=0;
1806 for(Int_t i=1;i<nBinsDiffFlowEtaPOI+1;i++)
1807 {
1808 if(!(mcepCommonHistRes->GetHistDiffFlowEtaPOI())->GetBinError(i)==0.0))
1809 {
1810 nNonEmptyBinsDiffFlowEtaPOI++;
1811 }
1812 }
1fca9c90 1813
7d02d77f 1814 pMeshDiffFlowEtaPOI = new TGraph(2*nNonEmptyBinsDiffFlowEtaPOI+1);
a88e5ac2 1815
7d02d77f 1816 Double_t valueMCEtaPOI=0.,errorMCEtaPOI=0.;
1817 Int_t countDiffFlowEtaPOI=1;
1818 Double_t xFirstDiffFlowEtaPOI=0.,yUpFirstDiffFlowEtaPOI=0.;//needed to close up the mesh
1819 for(Int_t i=1;i<nBinsDiffFlowEtaPOI+1;i++)
1fca9c90 1820 {
7d02d77f 1821 //setting up the upper limit of the mesh:
1fca9c90 1822 valueMCEtaPOI = (mcepCommonHistRes->GetHistDiffFlowEtaPOI())->GetBinContent(i);
7d02d77f 1823 errorMCEtaPOI = (mcepCommonHistRes->GetHistDiffFlowEtaPOI())->GetBinError(i);
1824 if(!(errorMCEtaPOI==0.0))
1825 {
1826 pMeshDiffFlowEtaPOI->SetPoint(countDiffFlowEtaPOI++,(i-0.5)*binWidthEtaPOI+dEtaMin,valueMCEtaPOI+errorMCEtaPOI);
1827 if(xFirstDiffFlowEtaPOI==0.)
1828 {
1829 xFirstDiffFlowEtaPOI=(i-0.5)*binWidthEtaPOI+dEtaMin;
1830 yUpFirstDiffFlowEtaPOI=valueMCEtaPOI+errorMCEtaPOI;
1831 }
1832 }
1833 }
1834 for(Int_t i=nBinsDiffFlowEtaPOI+1;i<2*nBinsDiffFlowEtaPOI+1;i++)
1835 {
1836 //setting up the lower limit of the mesh:
1837 valueMCEtaPOI = (mcepCommonHistRes->GetHistDiffFlowEtaPOI())->GetBinContent(2*nBinsDiffFlowEtaPOI+1-i);
1838 errorMCEtaPOI = (mcepCommonHistRes->GetHistDiffFlowEtaPOI())->GetBinError(2*nBinsDiffFlowEtaPOI+1-i);
1839 if(!(errorMCEtaPOI==0.0))
1840 {
1841 pMeshDiffFlowEtaPOI->SetPoint(countDiffFlowEtaPOI++,(2*nBinsDiffFlowEtaPOI-i+0.5)*binWidthEtaPOI+dEtaMin,valueMCEtaPOI-errorMCEtaPOI);
1842 }
1843 }
1844 //closing the mesh area:
1845 pMeshDiffFlowEtaPOI->SetPoint(2*nNonEmptyBinsDiffFlowEtaPOI+1,xFirstDiffFlowEtaPOI,yUpFirstDiffFlowEtaPOI);
1846
1847 //setting the mesh style and color:
dec3fab6 1848 pMeshDiffFlowEtaPOI->SetFillStyle(meshStyleDiffFlowEtaPOI);
1849 pMeshDiffFlowEtaPOI->SetFillColor(meshColorDiffFlowEtaPOI);
7d02d77f 1850 }
1fca9c90 1851 //----------------------------------------------------------------------------------
1852
70288839 1853 //MCEP = Monte Carlo Event Plane
1fca9c90 1854 Double_t avMultDiffFlowMCRP=0.;
1855 Double_t nEvtsDiffFlowMCRP=0;
1856 Double_t avMultDiffFlowMCPOI=0.;
1857 Double_t nEvtsDiffFlowMCPOI=0;
a88e5ac2 1858 if(fileMCEP)
9d3cbee7 1859 {
70288839 1860 if(mcepCommonHistRes)
1861 {
7d02d77f 1862 (mcepCommonHistRes->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorMC);
1863 (mcepCommonHistRes->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleMC);
1864 (mcepCommonHistRes->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorMC);
1865 (mcepCommonHistRes->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleMC);
1866 (mcepCommonHistRes->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorMC);
1867 (mcepCommonHistRes->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleMC);
1868 (mcepCommonHistRes->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorMC);
1869 (mcepCommonHistRes->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleMC);
a88e5ac2 1870 }
1871 if(mcepCommonHist)
1872 {
6a1a854d 1873 avMultDiffFlowMCRP = (mcepCommonHist->GetHistMultRP())->GetMean();
1874 nEvtsDiffFlowMCRP = (mcepCommonHist->GetHistMultRP())->GetEntries();
1875 avMultDiffFlowMCPOI = (mcepCommonHist->GetHistMultPOI())->GetMean();
1876 nEvtsDiffFlowMCPOI = (mcepCommonHist->GetHistMultPOI())->GetEntries();
70288839 1877 }
1878 }
905bed86 1879
1880 //SP = Scalar Product
1881 Double_t avMultDiffFlowSPRP=0.;
1882 Double_t nEvtsDiffFlowSPRP=0;
1883 Double_t avMultDiffFlowSPPOI=0.;
1884 Double_t nEvtsDiffFlowSPPOI=0;
1885 if(fileSP)
1886 {
1887 if(spCommonHistRes)
1888 {
1889 (spCommonHistRes->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorSP);
1890 (spCommonHistRes->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleSP);
1891 (spCommonHistRes->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorSP);
1892 (spCommonHistRes->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleSP);
1893 (spCommonHistRes->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorSP);
1894 (spCommonHistRes->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleSP);
1895 (spCommonHistRes->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorSP);
1896 (spCommonHistRes->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleSP);
1897 }
1898 if(spCommonHist)
1899 {
6a1a854d 1900 avMultDiffFlowSPRP = (spCommonHist->GetHistMultRP())->GetMean();
dec3fab6 1901 nEvtsDiffFlowSPRP = (spCommonHist->GetHistMultRP())->GetEntries();
6a1a854d 1902 avMultDiffFlowSPPOI = (spCommonHist->GetHistMultPOI())->GetMean();
dec3fab6 1903 nEvtsDiffFlowSPPOI = (spCommonHist->GetHistMultPOI())->GetEntries();
905bed86 1904 }
1905 }
a88e5ac2 1906
9d3cbee7 1907 //GFC = Generating Function Cumulants
1fca9c90 1908 Double_t avMultDiffFlowGFC=0.;//to be removed
1909 Double_t nEvtsDiffFlowGFC=0.;//to be removed
1910 Double_t avMultDiffFlowGFCRP=0.;
1911 Double_t nEvtsDiffFlowGFCRP=0.;
1912 Double_t avMultDiffFlowGFCPOI=0.;
1913 Double_t nEvtsDiffFlowGFCPOI=0.;
a88e5ac2 1914 if(fileGFC)
9d3cbee7 1915 {
a88e5ac2 1916 if(gfcCommonHistRes2)
9d3cbee7 1917 {
7d02d77f 1918 (gfcCommonHistRes2->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorGFC2);
1919 (gfcCommonHistRes2->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleGFC2);
1920 (gfcCommonHistRes2->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorGFC2);
1921 (gfcCommonHistRes2->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleGFC2);
1922 (gfcCommonHistRes2->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorGFC2);
1923 (gfcCommonHistRes2->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleGFC2);
1924 (gfcCommonHistRes2->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorGFC2);
1925 (gfcCommonHistRes2->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleGFC2);
9d3cbee7 1926 }
a88e5ac2 1927 if(gfcCommonHistRes4)
9d3cbee7 1928 {
7d02d77f 1929 (gfcCommonHistRes4->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorGFC4);
1930 (gfcCommonHistRes4->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleGFC4);
1931 (gfcCommonHistRes4->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorGFC4);
1932 (gfcCommonHistRes4->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleGFC4);
1933 (gfcCommonHistRes4->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorGFC4);
1934 (gfcCommonHistRes4->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleGFC4);
1935 (gfcCommonHistRes4->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorGFC4);
1936 (gfcCommonHistRes4->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleGFC4);
1fca9c90 1937 }
1938 if(gfcCommonHistRes6)
1939 {
7d02d77f 1940 (gfcCommonHistRes6->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorGFC6);
1941 (gfcCommonHistRes6->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleGFC6);
1942 (gfcCommonHistRes6->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorGFC6);
1943 (gfcCommonHistRes6->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleGFC6);
1944 (gfcCommonHistRes6->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorGFC6);
1945 (gfcCommonHistRes6->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleGFC6);
1946 (gfcCommonHistRes6->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorGFC6);
1947 (gfcCommonHistRes6->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleGFC6);
1fca9c90 1948 }
1949 if(gfcCommonHistRes8)
1950 {
7d02d77f 1951 (gfcCommonHistRes8->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorGFC8);
1952 (gfcCommonHistRes8->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleGFC8);
1953 (gfcCommonHistRes8->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorGFC8);
1954 (gfcCommonHistRes8->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleGFC8);
1955 (gfcCommonHistRes8->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorGFC8);
1956 (gfcCommonHistRes8->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleGFC8);
1957 (gfcCommonHistRes8->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorGFC8);
1958 (gfcCommonHistRes8->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleGFC8);
9d3cbee7 1959 }
a88e5ac2 1960 if(gfcCommonHist)
1961 {
6a1a854d 1962 avMultDiffFlowGFCRP = (gfcCommonHist->GetHistMultRP())->GetMean();
1963 nEvtsDiffFlowGFCRP = (gfcCommonHist->GetHistMultRP())->GetEntries();
1964 avMultDiffFlowGFCPOI = (gfcCommonHist->GetHistMultPOI())->GetMean();
1965 nEvtsDiffFlowGFCPOI = (gfcCommonHist->GetHistMultPOI())->GetEntries();
a88e5ac2 1966 }
9d3cbee7 1967 }
a88e5ac2 1968
9d3cbee7 1969 //QC = Q-cumulants
1fca9c90 1970 Double_t avMultDiffFlowQC2RP=0.;
1971 Double_t nEvtsDiffFlowQC2RP=0.;
1972 Double_t avMultDiffFlowQC2POI=0.;
1973 Double_t nEvtsDiffFlowQC2POI=0.;
1974 Double_t avMultDiffFlowQC4RP=0.;
1975 Double_t nEvtsDiffFlowQC4RP=0.;
1976 Double_t avMultDiffFlowQC4POI=0.;
1977 Double_t nEvtsDiffFlowQC4POI=0.;
e83922f2 1978 Double_t avMultDiffFlowQC6RP=0.;
1979 Double_t nEvtsDiffFlowQC6RP=0.;
1980 Double_t avMultDiffFlowQC6POI=0.;
1981 Double_t nEvtsDiffFlowQC6POI=0.;
1982 Double_t avMultDiffFlowQC8RP=0.;
1983 Double_t nEvtsDiffFlowQC8RP=0.;
1984 Double_t avMultDiffFlowQC8POI=0.;
1985 Double_t nEvtsDiffFlowQC8POI=0.;
1fca9c90 1986
a88e5ac2 1987 if(fileQC)
9d3cbee7 1988 {
a88e5ac2 1989 //QC{2}
70288839 1990 if(qcCommonHistRes2)
9d3cbee7 1991 {
7d02d77f 1992 (qcCommonHistRes2->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorQC2);
1993 (qcCommonHistRes2->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleQC2);
1994 (qcCommonHistRes2->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorQC2);
1995 (qcCommonHistRes2->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleQC2);
1996 (qcCommonHistRes2->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorQC2);
1997 (qcCommonHistRes2->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleQC2);
1998 (qcCommonHistRes2->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorQC2);
1999 (qcCommonHistRes2->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleQC2);
9d3cbee7 2000 }
a88e5ac2 2001 if(qcCommonHist2)
2002 {
6a1a854d 2003 avMultDiffFlowQC2RP = (qcCommonHist2->GetHistMultRP())->GetMean();
2004 nEvtsDiffFlowQC2RP = (qcCommonHist2->GetHistMultRP())->GetEntries();
2005 avMultDiffFlowQC2POI = (qcCommonHist2->GetHistMultPOI())->GetMean();
2006 nEvtsDiffFlowQC2POI = (qcCommonHist2->GetHistMultPOI())->GetEntries();
a88e5ac2 2007 }
2008 //QC{4}
70288839 2009 if(qcCommonHistRes4)
9d3cbee7 2010 {
7d02d77f 2011 (qcCommonHistRes4->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorQC4);
2012 (qcCommonHistRes4->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleQC4);
2013 (qcCommonHistRes4->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorQC4);
2014 (qcCommonHistRes4->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleQC4);
2015 (qcCommonHistRes4->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorQC4);
2016 (qcCommonHistRes4->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleQC4);
2017 (qcCommonHistRes4->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorQC4);
2018 (qcCommonHistRes4->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleQC4);
a88e5ac2 2019 }
2020 if(qcCommonHist4)
2021 {
6a1a854d 2022 avMultDiffFlowQC4RP = (qcCommonHist4->GetHistMultRP())->GetMean();
2023 nEvtsDiffFlowQC4RP = (qcCommonHist4->GetHistMultRP())->GetEntries();
2024 avMultDiffFlowQC4POI = (qcCommonHist4->GetHistMultPOI())->GetMean();
2025 nEvtsDiffFlowQC4POI = (qcCommonHist4->GetHistMultPOI())->GetEntries();
9d3cbee7 2026 }
e83922f2 2027 //QC{6}
2028 if(qcCommonHistRes6)
2029 {
7d02d77f 2030 (qcCommonHistRes6->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorQC6);
2031 (qcCommonHistRes6->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleQC6);
2032 (qcCommonHistRes6->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorQC6);
2033 (qcCommonHistRes6->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleQC6);
2034 (qcCommonHistRes6->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorQC6);
2035 (qcCommonHistRes6->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleQC6);
2036 (qcCommonHistRes6->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorQC6);
2037 (qcCommonHistRes6->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleQC6);
e83922f2 2038 }
2039 if(qcCommonHist6)
2040 {
6a1a854d 2041 avMultDiffFlowQC6RP = (qcCommonHist6->GetHistMultRP())->GetMean();
2042 nEvtsDiffFlowQC6RP = (qcCommonHist6->GetHistMultRP())->GetEntries();
2043 avMultDiffFlowQC6POI = (qcCommonHist6->GetHistMultPOI())->GetMean();
2044 nEvtsDiffFlowQC6POI = (qcCommonHist6->GetHistMultPOI())->GetEntries();
e83922f2 2045 }
2046 //QC{8}
2047 if(qcCommonHistRes8)
2048 {
7d02d77f 2049 (qcCommonHistRes8->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorQC8);
2050 (qcCommonHistRes8->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleQC8);
2051 (qcCommonHistRes8->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorQC8);
2052 (qcCommonHistRes8->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleQC8);
2053 (qcCommonHistRes8->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorQC8);
2054 (qcCommonHistRes8->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleQC8);
2055 (qcCommonHistRes8->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorQC8);
2056 (qcCommonHistRes8->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleQC8);
e83922f2 2057 }
2058 if(qcCommonHist8)
2059 {
6a1a854d 2060 avMultDiffFlowQC8RP = (qcCommonHist8->GetHistMultRP())->GetMean();
2061 nEvtsDiffFlowQC8RP = (qcCommonHist8->GetHistMultRP())->GetEntries();
2062 avMultDiffFlowQC8POI = (qcCommonHist8->GetHistMultPOI())->GetMean();
2063 nEvtsDiffFlowQC8POI = (qcCommonHist8->GetHistMultPOI())->GetEntries();
e83922f2 2064 }
9d3cbee7 2065 }
70288839 2066
947cc449 2067 //LYZ2SUM = Lee-Yang Zeros (2nd run, sum)
2068 Double_t avMultDiffFlowLYZ2SUMRP=0.;
2069 Double_t nEvtsDiffFlowLYZ2SUMRP=0;
2070 Double_t avMultDiffFlowLYZ2SUMPOI=0.;
2071 Double_t nEvtsDiffFlowLYZ2SUMPOI=0;
2072 if(fileLYZ2SUM)
2073 {
2074 if(lyz2sumCommonHistRes)
2075 {
2076 (lyz2sumCommonHistRes->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorLYZ2SUM);
2077 (lyz2sumCommonHistRes->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleLYZ2SUM);
2078 (lyz2sumCommonHistRes->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorLYZ2SUM);
2079 (lyz2sumCommonHistRes->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleLYZ2SUM);
2080 (lyz2sumCommonHistRes->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorLYZ2SUM);
2081 (lyz2sumCommonHistRes->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleLYZ2SUM);
2082 (lyz2sumCommonHistRes->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorLYZ2SUM);
2083 (lyz2sumCommonHistRes->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleLYZ2SUM);
2084 }
2085 if(lyz2sumCommonHist)
2086 {
2087 avMultDiffFlowLYZ2SUMRP = (lyz2sumCommonHist->GetHistMultRP())->GetMean();
2088 nEvtsDiffFlowLYZ2SUMRP = (lyz2sumCommonHist->GetHistMultRP())->GetEntries();
2089 avMultDiffFlowLYZ2SUMPOI = (lyz2sumCommonHist->GetHistMultPOI())->GetMean();
2090 nEvtsDiffFlowLYZ2SUMPOI = (lyz2sumCommonHist->GetHistMultPOI())->GetEntries();
2091 }
2092 }
2093
2094 //LYZ2PROD = Lee-Yang Zeros (2nd run, product)
2095 Double_t avMultDiffFlowLYZ2PRODRP=0.;
2096 Double_t nEvtsDiffFlowLYZ2PRODRP=0;
2097 Double_t avMultDiffFlowLYZ2PRODPOI=0.;
2098 Double_t nEvtsDiffFlowLYZ2PRODPOI=0;
2099 if(fileLYZ2PROD)
9d3cbee7 2100 {
947cc449 2101 if(lyz2prodCommonHistRes)
2102 {
2103 (lyz2prodCommonHistRes->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorLYZ2PROD);
2104 (lyz2prodCommonHistRes->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleLYZ2PROD);
2105 (lyz2prodCommonHistRes->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorLYZ2PROD);
2106 (lyz2prodCommonHistRes->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleLYZ2PROD);
2107 (lyz2prodCommonHistRes->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorLYZ2PROD);
2108 (lyz2prodCommonHistRes->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleLYZ2PROD);
2109 (lyz2prodCommonHistRes->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorLYZ2PROD);
2110 (lyz2prodCommonHistRes->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleLYZ2PROD);
a88e5ac2 2111 }
947cc449 2112 if(lyz2prodCommonHist)
9d3cbee7 2113 {
947cc449 2114 avMultDiffFlowLYZ2PRODRP = (lyz2prodCommonHist->GetHistMultRP())->GetMean();
2115 nEvtsDiffFlowLYZ2PRODRP = (lyz2prodCommonHist->GetHistMultRP())->GetEntries();
2116 avMultDiffFlowLYZ2PRODPOI = (lyz2prodCommonHist->GetHistMultPOI())->GetMean();
2117 nEvtsDiffFlowLYZ2PRODPOI = (lyz2prodCommonHist->GetHistMultPOI())->GetEntries();
9d3cbee7 2118 }
2119 }
70288839 2120
e83922f2 2121 //LYZEP = Lee-Yang Zeros Event Plane
e83922f2 2122 Double_t avMultDiffFlowLYZEPRP=0.;
2123 Double_t nEvtsDiffFlowLYZEPRP=0;
2124 Double_t avMultDiffFlowLYZEPPOI=0.;
2125 Double_t nEvtsDiffFlowLYZEPPOI=0;
2126 if(fileLYZEP)
2127 {
2128 if(lyzepCommonHistRes)
2129 {
7d02d77f 2130 (lyzepCommonHistRes->GetHistDiffFlowPtRP())->SetMarkerColor(markerColorLYZEP);
2131 (lyzepCommonHistRes->GetHistDiffFlowPtRP())->SetMarkerStyle(markerStyleLYZEP);
2132 (lyzepCommonHistRes->GetHistDiffFlowEtaRP())->SetMarkerColor(markerColorLYZEP);
2133 (lyzepCommonHistRes->GetHistDiffFlowEtaRP())->SetMarkerStyle(markerStyleLYZEP);
2134 (lyzepCommonHistRes->GetHistDiffFlowPtPOI())->SetMarkerColor(markerColorLYZEP);
2135 (lyzepCommonHistRes->GetHistDiffFlowPtPOI())->SetMarkerStyle(markerStyleLYZEP);
2136 (lyzepCommonHistRes->GetHistDiffFlowEtaPOI())->SetMarkerColor(markerColorLYZEP);
2137 (lyzepCommonHistRes->GetHistDiffFlowEtaPOI())->SetMarkerStyle(markerStyleLYZEP);
e83922f2 2138 }
2139 if(lyzepCommonHist)
2140 {
6a1a854d 2141 avMultDiffFlowLYZEPRP = (lyzepCommonHist->GetHistMultRP())->GetMean();
2142 nEvtsDiffFlowLYZEPRP = (lyzepCommonHist->GetHistMultRP())->GetEntries();
2143 avMultDiffFlowLYZEPPOI = (lyzepCommonHist->GetHistMultPOI())->GetMean();
2144 nEvtsDiffFlowLYZEPPOI = (lyzepCommonHist->GetHistMultPOI())->GetEntries();
e83922f2 2145 }
2146 }
2147
1fca9c90 2148
1fca9c90 2149 //----------------------------------------------------------------------------------
2150 //final drawing for differential flow (Pt, RP):
e83922f2 2151 if(plotDiffFlowPtRP)
2152 {
2153 TCanvas* diffFlowPtAllCanvasRP = new TCanvas("Differential Flow (Pt) of RP","Differential Flow (Pt) of RP ",1000,600);
2154
2155 diffFlowPtAllCanvasRP->Divide(2,1);
1fca9c90 2156
e83922f2 2157 //1st pad is for plot:
2158 (diffFlowPtAllCanvasRP->cd(1))->SetPad(0.0,0.0,0.75,1.0);
6f62c2a7 2159
e83922f2 2160 if(styleHistPt)
2161 {
2162 (styleHistPt->GetYaxis())->SetRangeUser(-0.3,1.0);
2163 styleHistPt->Draw();
2164 }
2165 if(pMeshDiffFlowPtRP)
2166 {
2167 pMeshDiffFlowPtRP->Draw("LFSAME");
2168 }
1fca9c90 2169
e83922f2 2170 //MC
2171 if(plotMCPtRP && mcepCommonHistRes)
2172 {
2173 (mcepCommonHistRes->GetHistDiffFlowPtRP())->Draw("E1PSAME");
2174 }
905bed86 2175 //SP
2176 if(plotSPPtRP && spCommonHistRes)
2177 {
2178 (spCommonHistRes->GetHistDiffFlowPtRP())->Draw("E1PSAME");
2179 }
e83922f2 2180 //GFC
7d02d77f 2181 if(plotGFC2PtRP && gfcCommonHistRes2)Pt
e83922f2 2182 {
2183 (gfcCommonHistRes2->GetHistDiffFlowPtRP())->Draw("E1PSAME");
2184 }
2185 if(plotGFC4PtRP && gfcCommonHistRes4)
2186 {
2187 (gfcCommonHistRes4->GetHistDiffFlowPtRP())->Draw("E1PSAME");
2188 }
2189 if(plotGFC6PtRP && gfcCommonHistRes6)
2190 {
2191 (gfcCommonHistRes6->GetHistDiffFlowPtRP())->Draw("E1PSAME");
2192 }
2193 if(plotGFC8PtRP && gfcCommonHistRes8)
2194 {
2195 (gfcCommonHistRes8->GetHistDiffFlowPtRP())->Draw("E1PSAME");
2196 }
2197 //QC
2198 if(plotQC2PtRP && qcCommonHistRes2)
2199 {
2200 (qcCommonHistRes2->GetHistDiffFlowPtRP())->Draw("E1PSAME");
2201 }
2202 if(plotQC4PtRP && qcCommonHistRes4)
2203 {
2204 (qcCommonHistRes4->GetHistDiffFlowPtRP())->Draw("E1PSAME");
2205 }
2206 if(plotQC6PtRP && qcCommonHistRes6)
2207 {
7d02d77f 2208 //(qcCommonHistRes6->GetHistDiffFlowPtRP())->Draw("E1PSAME");
e83922f2 2209 }
2210 if(plotQC8PtRP && qcCommonHistRes8)
2211 {
7d02d77f 2212 //(qcCommonHistRes8->GetHistDiffFlowPtRP())->Draw("E1PSAME");
e83922f2 2213 }
947cc449 2214 //LYZ2SUM
2215 if(plotLYZ2SUMPtRP && lyz2sumCommonHistRes)
2216 {
2217 (lyz2sumCommonHistRes->GetHistDiffFlowPtRP())->Draw("E1PSAME");
2218 }
2219 //LYZ2PROD
2220 if(plotLYZ2PRODPtRP && lyz2prodCommonHistRes)
e83922f2 2221 {
947cc449 2222 (lyz2prodCommonHistRes->GetHistDiffFlowPtRP())->Draw("E1PSAME");
e83922f2 2223 }
2224 //LYZEP
2225 if(plotLYZEPPtRP && lyzepCommonHistRes)
2226 {
2227 (lyzepCommonHistRes->GetHistDiffFlowPtRP())->Draw("E1PSAME");
2228 }
1fca9c90 2229
e83922f2 2230 //2nd pad is for legend:
dec3fab6 2231 (diffFlowPtAllCanvasRP->cd(2))->SetPad(0.75,0.0,1.0,1.0);
2232
2233 TLegend* legendDiffFlowPtRP = new TLegend(0.02,0.12,0.97,0.70);
e83922f2 2234 legendDiffFlowPtRP->SetTextFont(72);
2235 legendDiffFlowPtRP->SetTextSize(0.06);
2236
7d02d77f 2237 //legend's entries:Pt
947cc449 2238 TString *entryDiffMCPtRP = new TString("MC ........ ");
2239 TString *entryDiffSPPtRP = new TString("SP ........ ");
2240 TString *entryDiffGFC2PtRP = new TString("GFC{2} .... ");
2241 TString *entryDiffGFC4PtRP = new TString("GFC{4} .... ");
2242 TString *entryDiffGFC6PtRP = new TString("GFC{6} .... ");
2243 TString *entryDiffGFC8PtRP = new TString("GFC{8} .... ");
2244 TString *entryDiffQC2PtRP = new TString("QC{2} ..... ");
2245 TString *entryDiffQC4PtRP = new TString("QC{4} ..... ");
2246 TString *entryDiffQC6PtRP = new TString("QC{6} ..... ");
2247 TString *entryDiffQC8PtRP = new TString("QC{8} ..... ");
2248 TString *entryDiffLYZ2SUMPtRP = new TString("LYZ{sum} .. ");
2249 TString *entryDiffLYZ2PRODPtRP = new TString("LYZ{prod} . ");
2250 TString *entryDiffLYZEPPtRP = new TString("LYZEP ..... ");
e83922f2 2251
2252 //MC
2253 if(mcepCommonHistRes)
2254 {
dec3fab6 2255 (mcepCommonHistRes->GetHistDiffFlowPtRP())->SetFillStyle(meshStyleDiffFlowPtRP);
2256 (mcepCommonHistRes->GetHistDiffFlowPtRP())->SetFillColor(meshColorDiffFlowPtRP);
e83922f2 2257 entryDiffMCPtRP->Append("M = ");
2258 (*entryDiffMCPtRP)+=(Long_t)avMultDiffFlowMCRP;
2259 entryDiffMCPtRP->Append(", N = ");
2260 (*entryDiffMCPtRP)+=(Long_t)nEvtsDiffFlowMCRP;
2261 legendDiffFlowPtRP->AddEntry(mcepCommonHistRes->GetHistDiffFlowPtRP(),entryDiffMCPtRP->Data(),"f");
2262 }
905bed86 2263
2264 //SP
947cc449 2265 if(plotSPPtRP && spCommonHistRes)
905bed86 2266 {
905bed86 2267 entryDiffSPPtRP->Append("M = ");
2268 (*entryDiffSPPtRP)+=(Long_t)avMultDiffFlowSPRP;
2269 entryDiffSPPtRP->Append(", N = ");
2270 (*entryDiffSPPtRP)+=(Long_t)nEvtsDiffFlowSPRP;
2271 legendDiffFlowPtRP->AddEntry(spCommonHistRes->GetHistDiffFlowPtRP(),entryDiffSPPtRP->Data(),"p");
2272 }
1fca9c90 2273
e83922f2 2274 //GFC
2275 if(plotGFC2PtRP && gfcCommonHistRes2)
2276 {
2277 entryDiffGFC2PtRP->Append("M = ");
2278 (*entryDiffGFC2PtRP)+=(Long_t)avMultDiffFlowGFCRP;
2279 entryDiffGFC2PtRP->Append(", N = ");
2280 (*entryDiffGFC2PtRP)+=(Long_t)nEvtsDiffFlowGFCRP;
2281 legendDiffFlowPtRP->AddEntry(gfcCommonHistRes2->GetHistDiffFlowPtRP(),entryDiffGFC2PtRP->Data(),"p");
2282 }
2283 if(plotGFC4PtRP && gfcCommonHistRes4)
2284 {
2285 entryDiffGFC4PtRP->Append("M = ");
2286 (*entryDiffGFC4PtRP)+=(Long_t)avMultDiffFlowGFCRP;
2287 entryDiffGFC4PtRP->Append(", N = ");
2288 (*entryDiffGFC4PtRP)+=(Long_t)nEvtsDiffFlowGFCRP;
2289 legendDiffFlowPtRP->AddEntry(gfcCommonHistRes4->GetHistDiffFlowPtRP(),entryDiffGFC4PtRP->Data(),"p");
2290 }
2291 if(plotGFC6PtRP && gfcCommonHistRes6)
2292 {
2293 entryDiffGFC6PtRP->Append("M = ");
2294 (*entryDiffGFC6PtRP)+=(Long_t)avMultDiffFlowGFCRP;
2295 entryDiffGFC6PtRP->Append(", N = ");
2296 (*entryDiffGFC6PtRP)+=(Long_t)nEvtsDiffFlowGFCRP;
2297 legendDiffFlowPtRP->AddEntry(gfcCommonHistRes6->GetHistDiffFlowPtRP(),entryDiffGFC6PtRP->Data(),"p");
2298 }
2299 if(plotGFC8PtRP && gfcCommonHistRes8)
2300 {
2301 entryDiffGFC8PtRP->Append("M = ");
2302 (*entryDiffGFC8PtRP)+=(Long_t)avMultDiffFlowGFCRP;
2303 entryDiffGFC8PtRP->Append(", N = ");
2304 (*entryDiffGFC8PtRP)+=(Long_t)nEvtsDiffFlowGFCRP;
2305 legendDiffFlowPtRP->AddEntry(gfcCommonHistRes8->GetHistDiffFlowPtRP(),entryDiffGFC8PtRP->Data(),"p");
2306 }
2307
2308 //QC
2309 if(plotQC2PtRP && qcCommonHistRes2)
2310 {
2311 entryDiffQC2PtRP->Append("M = ");
2312 (*entryDiffQC2PtRP)+=(Long_t)avMultDiffFlowQC2RP;
2313 entryDiffQC2PtRP->Append(", N = ");
2314 (*entryDiffQC2PtRP)+=(Long_t)nEvtsDiffFlowQC2RP;
2315 legendDiffFlowPtRP->AddEntry(qcCommonHistRes2->GetHistDiffFlowPtRP(),entryDiffQC2PtRP->Data(),"p");
2316 }
2317 if(plotQC4PtRP && qcCommonHistRes4)
2318 {
2319 entryDiffQC4PtRP->Append("M = ");
2320 (*entryDiffQC4PtRP)+=(Long_t)avMultDiffFlowQC4RP;
2321 entryDiffQC4PtRP->Append(", N = ");
2322 (*entryDiffQC4PtRP)+=(Long_t)nEvtsDiffFlowQC4RP;
2323 legendDiffFlowPtRP->AddEntry(qcCommonHistRes4->GetHistDiffFlowPtRP(),entryDiffQC4PtRP->Data(),"p");
2324 }
2325 if(plotQC6PtRP && qcCommonHistRes6)
2326 {
2327 entryDiffQC6PtRP->Append("M = ");
2328 (*entryDiffQC6PtRP)+=(Long_t)avMultDiffFlowQC6RP;
2329 entryDiffQC6PtRP->Append(", N = ");
2330 (*entryDiffQC6PtRP)+=(Long_t)nEvtsDiffFlowQC6RP;
2331 legendDiffFlowPtRP->AddEntry(qcCommonHistRes6->GetHistDiffFlowPtRP(),entryDiffQC6PtRP->Data(),"p");
2332 }
2333 if(plotQC8PtRP && qcCommonHistRes8)
2334 {
2335 entryDiffQC8PtRP->Append("M = ");
2336 (*entryDiffQC8PtRP)+=(Long_t)avMultDiffFlowQC8RP;
2337 entryDiffQC8PtRP->Append(", N = ");
2338 (*entryDiffQC8PtRP)+=(Long_t)nEvtsDiffFlowQC8RP;
2339 legendDiffFlowPtRP->AddEntry(qcCommonHistRes8->GetHistDiffFlowPtRP(),entryDiffQC8PtRP->Data(),"p");
2340 }
2341
947cc449 2342 //LYZ2SUM
2343 if(plotLYZ2SUMPtRP && lyz2sumCommonHistRes)
2344 {
2345 entryDiffLYZ2SUMPtRP->Append("M = ");
2346 (*entryDiffLYZ2SUMPtRP)+=(Long_t)avMultDiffFlowLYZ2SUMRP;
2347 entryDiffLYZ2SUMPtRP->Append(", N = ");
2348 (*entryDiffLYZ2SUMPtRP)+=(Long_t)nEvtsDiffFlowLYZ2SUMRP;
2349 legendDiffFlowPtRP->AddEntry(lyz2sumCommonHistRes->GetHistDiffFlowPtRP(),entryDiffLYZ2SUMPtRP->Data(),"p");
2350 }
2351
2352 //LYZ2PROD
2353 if(plotLYZ2PRODPtRP && lyz2prodCommonHistRes)
e83922f2 2354 {
947cc449 2355 entryDiffLYZ2PRODPtRP->Append("M = ");
2356 (*entryDiffLYZ2PRODPtRP)+=(Long_t)avMultDiffFlowLYZ2PRODRP;
2357 entryDiffLYZ2PRODPtRP->Append(", N = ");
2358 (*entryDiffLYZ2PRODPtRP)+=(Long_t)nEvtsDiffFlowLYZ2PRODRP;
2359 legendDiffFlowPtRP->AddEntry(lyz2prodCommonHistRes->GetHistDiffFlowPtRP(),entryDiffLYZ2PRODPtRP->Data(),"p");
e83922f2 2360 }
2361
2362 //LYZEP
2363 if(plotLYZEPPtRP && lyzepCommonHistRes)
2364 {
2365 entryDiffLYZEPPtRP->Append("M = ");
2366 (*entryDiffLYZEPPtRP)+=(Long_t)avMultDiffFlowLYZEPRP;
2367 entryDiffLYZEPPtRP->Append(", N = ");
2368 (*entryDiffLYZEPPtRP)+=(Long_t)nEvtsDiffFlowLYZEPRP;
2369 legendDiffFlowPtRP->AddEntry(lyzepCommonHistRes->GetHistDiffFlowPtRP(),entryDiffLYZEPPtRP->Data(),"p");
2370 }
1fca9c90 2371
dec3fab6 2372 //drawing finally the legend in the 2nd pad:
2373 if(textDefault) textDefault->Draw();
2374
e83922f2 2375 if(legendDiffFlowPtRP)
2376 {
2377 legendDiffFlowPtRP->SetMargin(0.15);
2378 legendDiffFlowPtRP->Draw();
2379 }
2380 }// end of if(plotDiffFlowPtRP)
1fca9c90 2381 //----------------------------------------------------------------------------------
2382
1fca9c90 2383 //----------------------------------------------------------------------------------
2384 //final drawing for differential flow (Eta, RP):
e83922f2 2385 if(plotDiffFlowEtaRP)
2386 {
2387 TCanvas* diffFlowEtaAllCanvasRP = new TCanvas("Differential Flow (Eta) of RP","Differential Flow (Eta) of RP ",1000,600);
2388
2389 diffFlowEtaAllCanvasRP->Divide(2,1);
2390
2391 //1st pad is for plot:
2392 (diffFlowEtaAllCanvasRP->cd(1))->SetPad(0.0,0.0,0.75,1.0);
2393
2394 if(styleHistEta)
2395 {
2396 (styleHistEta->GetYaxis())->SetRangeUser(-0.3,1.0);
2397 styleHistEta->Draw();
2398 }
2399 if(pMeshDiffFlowEtaRP)
2400 {
2401 pMeshDiffFlowEtaRP->Draw("LFSAME");
2402 }
1fca9c90 2403
e83922f2 2404 //MC
2405 if(plotMCEtaRP && mcepCommonHistRes)
2406 {
2407 (mcepCommonHistRes->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
2408 }
905bed86 2409 //SP
2410 if(plotSPEtaRP && spCommonHistRes)
2411 {
2412 (spCommonHistRes->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
2413 }
e83922f2 2414 //GFC
2415 if(plotGFC2EtaRP && gfcCommonHistRes2)
2416 {
2417 (gfcCommonHistRes2->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
2418 }
2419 if(plotGFC4EtaRP && gfcCommonHistRes4)
2420 {
2421 (gfcCommonHistRes4->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
2422 }
2423 if(plotGFC6EtaRP && gfcCommonHistRes6)
2424 {
2425 (gfcCommonHistRes6->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
2426 }
2427 if(plotGFC8EtaRP && gfcCommonHistRes8)
2428 {
2429 (gfcCommonHistRes8->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
2430 }
2431 //QC
2432 if(plotQC2EtaRP && qcCommonHistRes2)
2433 {
2434 (qcCommonHistRes2->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
2435 }
2436 if(plotQC4EtaRP && qcCommonHistRes4)
2437 {
2438 (qcCommonHistRes4->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
2439 }
2440 if(plotQC6EtaRP && qcCommonHistRes6)
2441 {
7d02d77f 2442 //(qcCommonHistRes6->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
e83922f2 2443 }
2444 if(plotQC8EtaRP && qcCommonHistRes8)
2445 {
7d02d77f 2446 //(qcCommonHistRes8->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
e83922f2 2447 }
947cc449 2448 //LYZ2SUM
2449 if(plotLYZ2SUMEtaRP && lyz2sumCommonHistRes)
e83922f2 2450 {
947cc449 2451 (lyz2sumCommonHistRes->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
2452 }
2453 //LYZ2PROD
2454 if(plotLYZ2PRODEtaRP && lyz2prodCommonHistRes)
2455 {
2456 (lyz2prodCommonHistRes->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
e83922f2 2457 }
2458 //LYZEP
2459 if(plotLYZEPEtaRP && lyzepCommonHistRes)
2460 {
2461 (lyzepCommonHistRes->GetHistDiffFlowEtaRP())->Draw("E1PSAME");
2462 }
1fca9c90 2463
e83922f2 2464 //2nd pad is for legend:
2465 (diffFlowEtaAllCanvasRP->cd(2))->SetPad(0.75,0.0,1.0,1.0);
2466
dec3fab6 2467 TLegend* legendDiffFlowEtaRP = new TLegend(0.02,0.12,0.97,0.70);
e83922f2 2468 legendDiffFlowEtaRP->SetTextFont(72);
2469 legendDiffFlowEtaRP->SetTextSize(0.06);
2470
2471 //legend's entries:
947cc449 2472 TString *entryDiffMCEtaRP = new TString("MC ........ ");
2473 TString *entryDiffSPEtaRP = new TString("SP ........ ");
2474 TString *entryDiffGFC2EtaRP = new TString("GFC{2} .... ");
2475 TString *entryDiffGFC4EtaRP = new TString("GFC{4} .... ");
2476 TString *entryDiffGFC6EtaRP = new TString("GFC{6} .... ");
2477 TString *entryDiffGFC8EtaRP = new TString("GFC{8} .... ");
2478 TString *entryDiffQC2EtaRP = new TString("QC{2} ..... ");
2479 TString *entryDiffQC4EtaRP = new TString("QC{4} ..... ");
2480 TString *entryDiffQC6EtaRP = new TString("QC{6} ..... ");
2481 TString *entryDiffQC8EtaRP = new TString("QC{8} ..... ");
2482 TString *entryDiffLYZ2SUMEtaRP = new TString("LYZ{sum} .. ");
2483 TString *entryDiffLYZ2PRODEtaRP = new TString("LYZ{prod} . ");
2484 TString *entryDiffLYZEPEtaRP = new TString("LYZEP ..... ");
e83922f2 2485
2486 //MC
2487 if(mcepCommonHistRes)
2488 {
dec3fab6 2489 (mcepCommonHistRes->GetHistDiffFlowEtaRP())->SetFillStyle(meshStyleDiffFlowEtaRP);
2490 (mcepCommonHistRes->GetHistDiffFlowEtaRP())->SetFillColor(meshColorDiffFlowEtaRP);
e83922f2 2491 entryDiffMCEtaRP->Append("M = ");
2492 (*entryDiffMCEtaRP)+=(Long_t)avMultDiffFlowMCRP;
2493 entryDiffMCEtaRP->Append(", N = ");
2494 (*entryDiffMCEtaRP)+=(Long_t)nEvtsDiffFlowMCRP;
2495 legendDiffFlowEtaRP->AddEntry(mcepCommonHistRes->GetHistDiffFlowEtaRP(),entryDiffMCEtaRP->Data(),"f");
2496 }
905bed86 2497
2498 //SP
947cc449 2499 if(plotSPEtaRP && spCommonHistRes)
905bed86 2500 {
905bed86 2501 entryDiffSPEtaRP->Append("M = ");
2502 (*entryDiffSPEtaRP)+=(Long_t)avMultDiffFlowSPRP;
2503 entryDiffSPEtaRP->Append(", N = ");
2504 (*entryDiffSPEtaRP)+=(Long_t)nEvtsDiffFlowSPRP;
2505 legendDiffFlowEtaRP->AddEntry(spCommonHistRes->GetHistDiffFlowEtaRP(),entryDiffSPEtaRP->Data(),"p");
2506 }
1fca9c90 2507
e83922f2 2508 //GFC
2509 if(plotGFC2EtaRP && gfcCommonHistRes2)
2510 {
2511 entryDiffGFC2EtaRP->Append("M = ");
2512 (*entryDiffGFC2EtaRP)+=(Long_t)avMultDiffFlowGFCRP;
2513 entryDiffGFC2EtaRP->Append(", N = ");
2514 (*entryDiffGFC2EtaRP)+=(Long_t)nEvtsDiffFlowGFCRP;
2515 legendDiffFlowEtaRP->AddEntry(gfcCommonHistRes2->GetHistDiffFlowEtaRP(),entryDiffGFC2EtaRP->Data(),"p");
2516 }
2517 if(plotGFC4EtaRP && gfcCommonHistRes4)
2518 {
2519 entryDiffGFC4EtaRP->Append("M = ");
2520 (*entryDiffGFC4EtaRP)+=(Long_t)avMultDiffFlowGFCRP;
2521 entryDiffGFC4EtaRP->Append(", N = ");
2522 (*entryDiffGFC4EtaRP)+=(Long_t)nEvtsDiffFlowGFCRP;
2523 legendDiffFlowEtaRP->AddEntry(gfcCommonHistRes4->GetHistDiffFlowEtaRP(),entryDiffGFC4EtaRP->Data(),"p");
2524 }
2525 if(plotGFC6EtaRP && gfcCommonHistRes6)
2526 {
2527 entryDiffGFC6EtaRP->Append("M = ");
2528 (*entryDiffGFC6EtaRP)+=(Long_t)avMultDiffFlowGFCRP;
2529 entryDiffGFC6EtaRP->Append(", N = ");
2530 (*entryDiffGFC6EtaRP)+=(Long_t)nEvtsDiffFlowGFCRP;
2531 legendDiffFlowEtaRP->AddEntry(gfcCommonHistRes6->GetHistDiffFlowEtaRP(),entryDiffGFC6EtaRP->Data(),"p");
2532 }
2533 if(plotGFC8EtaRP && gfcCommonHistRes8)
2534 {
2535 entryDiffGFC8EtaRP->Append("M = ");
2536 (*entryDiffGFC8EtaRP)+=(Long_t)avMultDiffFlowGFCRP;
2537 entryDiffGFC8EtaRP->Append(", N = ");
2538 (*entryDiffGFC8EtaRP)+=(Long_t)nEvtsDiffFlowGFCRP;
2539 legendDiffFlowEtaRP->AddEntry(gfcCommonHistRes8->GetHistDiffFlowEtaRP(),entryDiffGFC8EtaRP->Data(),"p");
2540 }
2541
2542 //QC
2543 if(plotQC2EtaRP && qcCommonHistRes2)
2544 {
2545 entryDiffQC2EtaRP->Append("M = ");
2546 (*entryDiffQC2EtaRP)+=(Long_t)avMultDiffFlowQC2RP;
2547 entryDiffQC2EtaRP->Append(", N = ");
2548 (*entryDiffQC2EtaRP)+=(Long_t)nEvtsDiffFlowQC2RP;
2549 legendDiffFlowEtaRP->AddEntry(qcCommonHistRes2->GetHistDiffFlowEtaRP(),entryDiffQC2EtaRP->Data(),"p");
2550 }
2551 if(plotQC4EtaRP && qcCommonHistRes4)
2552 {
2553 entryDiffQC4EtaRP->Append("M = ");
2554 (*entryDiffQC4EtaRP)+=(Long_t)avMultDiffFlowQC4RP;
2555 entryDiffQC4EtaRP->Append(", N = ");
2556 (*entryDiffQC4EtaRP)+=(Long_t)nEvtsDiffFlowQC4RP;
2557 legendDiffFlowEtaRP->AddEntry(qcCommonHistRes4->GetHistDiffFlowEtaRP(),entryDiffQC4EtaRP->Data(),"p");
2558 }
2559 if(plotQC6EtaRP && qcCommonHistRes6)
2560 {
2561 entryDiffQC6EtaRP->Append("M = ");
2562 (*entryDiffQC6EtaRP)+=(Long_t)avMultDiffFlowQC6RP;
2563 entryDiffQC6EtaRP->Append(", N = ");
2564 (*entryDiffQC6EtaRP)+=(Long_t)nEvtsDiffFlowQC6RP;
2565 legendDiffFlowEtaRP->AddEntry(qcCommonHistRes6->GetHistDiffFlowEtaRP(),entryDiffQC6EtaRP->Data(),"p");
2566 }
2567 if(plotQC8EtaRP && qcCommonHistRes8)
2568 {
2569 entryDiffQC8EtaRP->Append("M = ");
2570 (*entryDiffQC8EtaRP)+=(Long_t)avMultDiffFlowQC8RP;
2571 entryDiffQC8EtaRP->Append(", N = ");
2572 (*entryDiffQC8EtaRP)+=(Long_t)nEvtsDiffFlowQC8RP;
2573 legendDiffFlowEtaRP->AddEntry(qcCommonHistRes8->GetHistDiffFlowEtaRP(),entryDiffQC8EtaRP->Data(),"p");
2574 }
1fca9c90 2575
947cc449 2576 //LYZ2SUM
2577 if(plotLYZ2SUMEtaRP && lyz2sumCommonHistRes)
2578 {
2579 entryDiffLYZ2SUMEtaRP->Append("M = ");
2580 (*entryDiffLYZ2SUMEtaRP)+=(Long_t)avMultDiffFlowLYZ2SUMRP;
2581 entryDiffLYZ2SUMEtaRP->Append(", N = ");
2582 (*entryDiffLYZ2SUMEtaRP)+=(Long_t)nEvtsDiffFlowLYZ2SUMRP;
2583 legendDiffFlowEtaRP->AddEntry(lyz2sumCommonHistRes->GetHistDiffFlowEtaRP(),entryDiffLYZ2SUMEtaRP->Data(),"p");
2584 }
2585
2586 //LYZ2PROD
2587 if(plotLYZ2PRODEtaRP && lyz2prodCommonHistRes)
e83922f2 2588 {
947cc449 2589 entryDiffLYZ2PRODEtaRP->Append("M = ");
2590 (*entryDiffLYZ2PRODEtaRP)+=(Long_t)avMultDiffFlowLYZ2PRODRP;
2591 entryDiffLYZ2PRODEtaRP->Append(", N = ");
2592 (*entryDiffLYZ2PRODEtaRP)+=(Long_t)nEvtsDiffFlowLYZ2PRODRP;
2593 legendDiffFlowEtaRP->AddEntry(lyz2prodCommonHistRes->GetHistDiffFlowEtaRP(),entryDiffLYZ2PRODEtaRP->Data(),"p");
e83922f2 2594 }
2595
2596 //LYZEP
2597 if(plotLYZEPEtaRP && lyzepCommonHistRes)
2598 {
2599 entryDiffLYZEPEtaRP->Append("M = ");
2600 (*entryDiffLYZEPEtaRP)+=(Long_t)avMultDiffFlowLYZEPRP;
2601 entryDiffLYZEPEtaRP->Append(", N = ");
2602 (*entryDiffLYZEPEtaRP)+=(Long_t)nEvtsDiffFlowLYZEPRP;
2603 legendDiffFlowEtaRP->AddEntry(lyzepCommonHistRes->GetHistDiffFlowEtaRP(),entryDiffLYZEPEtaRP->Data(),"p");
2604 }
1fca9c90 2605
dec3fab6 2606 //drawing finally the legend in the 2nd pad:
2607 if(textDefault) textDefault->Draw();
2608
e83922f2 2609 if(legendDiffFlowEtaRP)
2610 {
2611 legendDiffFlowEtaRP->SetMargin(0.15);
2612 legendDiffFlowEtaRP->Draw();
2613 }
2614 }// end of if(plotDiffFlowEtaRP)
1fca9c90 2615 //----------------------------------------------------------------------------------
c365fe76 2616
2617 */
688877b8 2618
2619 //----------------------------------------------------------------------------------
2620 // final drawing for plot |(v{method}-v{MC})/v{MC}| as a function of pt for RPs
2621 if(plotDiffFlowPtRelativeToMCRP)
2622 {
c365fe76 2623 TCanvas* diffFlowPtRelativeToMCRP = new TCanvas("Differential Flow (Pt) of RPs relative to MC","Differ1ential Flow (Pt) of RPs relative to MC",1000,600);
688877b8 2624
2625 diffFlowPtRelativeToMCRP->Divide(2,1);
2626
2627 //1st pad is for plot:
2628 (diffFlowPtRelativeToMCRP->cd(1))->SetPad(0.0,0.0,0.75,1.0);
2629
2630 if(styleHistPt)
2631 {
7fb984f6 2632 TH1D *styleHistPtReleativeToMC = new TH1D(*styleHistPt);
2633 (styleHistPtReleativeToMC->GetYaxis())->SetRangeUser(-4.0,4.0);
2634 (styleHistPtReleativeToMC->GetYaxis())->SetTitle("(v_{n}\{method\} - v_{n}\{MC\})/v_{n}\{MC\}");
2635 styleHistPtReleativeToMC->Draw();
688877b8 2636 }
7fb984f6 2637
688877b8 2638 TH1D *spDiffFlowPtRelativeToMCRP = new TH1D("","",iNbinsPt,dPtMin,dPtMax);
2639 TH1D *gfc2DiffFlowPtRelativeToMCRP = new TH1D("","",iNbinsPt,dPtMin,dPtMax);
2640 TH1D *gfc4DiffFlowPtRelativeToMCRP = new TH1D("","",iNbinsPt,dPtMin,dPtMax);
2641 TH1D *gfc6DiffFlowPtRelativeToMCRP = new TH1D("","",iNbinsPt,dPtMin,dPtMax);
2642 TH1D *gfc8DiffFlowPtRelativeToMCRP = new TH1D("","",iNbinsPt,dPtMin,dPtMax);
2643 TH1D *qc2DiffFlowPtRelativeToMCRP = new TH1D("","",iNbinsPt,dPtMin,dPtMax);
2644 TH1D *qc4DiffFlowPtRelativeToMCRP = new TH1D("","",iNbinsPt,dPtMin,dPtMax);
2645 TH1D *qc6DiffFlowPtRelativeToMCRP = new TH1D("","",iNbinsPt,dPtMin,dPtMax);
2646 TH1D *qc8DiffFlowPtRelativeToMCRP = new TH1D("","",iNbinsPt,dPtMin,dPtMax);
947cc449 2647 TH1D *lyz2sumDiffFlowPtRelativeToMCRP = new TH1D("","",iNbinsPt,dPtMin,dPtMax);
2648 TH1D *lyz2prodDiffFlowPtRelativeToMCRP = new TH1D("","",iNbinsPt,dPtMin,dPtMax);
688877b8 2649 TH1D *lyzepDiffFlowPtRelativeToMCRP = new TH1D("","",iNbinsPt,dPtMin,dPtMax);
2650
c49a8c1c 2651 if(mcepCommonHistRes && mcepCommonHistRes->GetHistDiffFlowPtRP())
688877b8 2652 {
2653 for(Int_t p=1;p<iNbinsPt+1;p++)
2654 {
2655 Double_t dvnMC = (mcepCommonHistRes->GetHistDiffFlowPtRP())->GetBinContent(p);
2656
2657 // SP:
2658 Double_t dvnSP = 0.;
7fb984f6 2659 Double_t dvnErrorSP = 0.;
688877b8 2660 if(spCommonHistRes && spCommonHistRes->GetHistDiffFlowPtRP())
2661 {
2662 dvnSP = (spCommonHistRes->GetHistDiffFlowPtRP())->GetBinContent(p);
7fb984f6 2663 dvnErrorSP = (spCommonHistRes->GetHistDiffFlowPtRP())->GetBinError(p);
688877b8 2664 }
2665 if(dvnMC!=0. && dvnSP!=0.)
2666 {
cf90787f 2667 spDiffFlowPtRelativeToMCRP->SetBinContent(p,(dvnSP-dvnMC)/dvnMC);
b27d2a65 2668 spDiffFlowPtRelativeToMCRP->SetBinError(p,dvnErrorSP/dvnMC);
688877b8 2669 }
2670
2671 // GFC{2}:
2672 Double_t dvnGFC2 = 0.;
7fb984f6 2673 Double_t dvnErrorGFC2 = 0.;
688877b8 2674 if(gfcCommonHistRes2 && gfcCommonHistRes2->GetHistDiffFlowPtRP())
2675 {
2676 dvnGFC2 = (gfcCommonHistRes2->GetHistDiffFlowPtRP())->GetBinContent(p);
7fb984f6 2677 dvnErrorGFC2 = (gfcCommonHistRes2->GetHistDiffFlowPtRP())->GetBinError(p);
688877b8 2678 }
2679 if(dvnMC!=0. && dvnGFC2!=0.)
2680 {
cf90787f 2681 gfc2DiffFlowPtRelativeToMCRP->SetBinContent(p,(dvnGFC2-dvnMC)/dvnMC);
b27d2a65 2682 gfc2DiffFlowPtRelativeToMCRP->SetBinError(p,dvnErrorGFC2/dvnMC);
688877b8 2683 }
2684
2685 // GFC{4}:
2686 Double_t dvnGFC4 = 0.;
7fb984f6 2687 Double_t dvnErrorGFC4 = 0.;
688877b8 2688 if(gfcCommonHistRes4 && gfcCommonHistRes4->GetHistDiffFlowPtRP())
2689 {
2690 dvnGFC4 = (gfcCommonHistRes4->GetHistDiffFlowPtRP())->GetBinContent(p);
7fb984f6 2691 dvnErrorGFC4 = (gfcCommonHistRes4->GetHistDiffFlowPtRP())->GetBinError(p);
688877b8 2692 }
2693 if(dvnMC!=0. && dvnGFC4!=0.)
2694 {
cf90787f 2695 gfc4DiffFlowPtRelativeToMCRP->SetBinContent(p,(dvnGFC4-dvnMC)/dvnMC);
b27d2a65 2696 gfc4DiffFlowPtRelativeToMCRP->SetBinError(p,dvnErrorGFC4/dvnMC);
688877b8 2697 }
2698
2699 // GFC{6}:
2700 Double_t dvnGFC6 = 0.;
7fb984f6 2701 Double_t dvnErrorGFC6 = 0.;
688877b8 2702 if(gfcCommonHistRes6 && gfcCommonHistRes6->GetHistDiffFlowPtRP())
2703 {
2704 dvnGFC6 = (gfcCommonHistRes6->GetHistDiffFlowPtRP())->GetBinContent(p);
7fb984f6 2705 dvnErrorGFC6 = (gfcCommonHistRes6->GetHistDiffFlowPtRP())->GetBinError(p);
688877b8 2706 }
2707 if(dvnMC!=0. && dvnGFC6!=0.)
2708 {
cf90787f 2709 gfc6DiffFlowPtRelativeToMCRP->SetBinContent(p,(dvnGFC6-dvnMC)/dvnMC);
b27d2a65 2710 gfc6DiffFlowPtRelativeToMCRP->SetBinError(p,dvnErrorGFC6/dvnMC);
688877b8 2711 }
2712
2713 // GFC{8}:
2714 Double_t dvnGFC8 = 0.;
7fb984f6 2715 Double_t dvnErrorGFC8 = 0.;
688877b8 2716 if(gfcCommonHistRes8 && gfcCommonHistRes8->GetHistDiffFlowPtRP())
2717 {
2718 dvnGFC8 = (gfcCommonHistRes8->GetHistDiffFlowPtRP())->GetBinContent(p);
7fb984f6 2719 dvnErrorGFC8 = (gfcCommonHistRes8->GetHistDiffFlowPtRP())->GetBinError(p);
688877b8 2720 }
2721 if(dvnMC!=0. && dvnGFC8!=0.)
2722 {
cf90787f 2723 gfc8DiffFlowPtRelativeToMCRP->SetBinContent(p,(dvnGFC8-dvnMC)/dvnMC);
b27d2a65 2724 gfc8DiffFlowPtRelativeToMCRP->SetBinError(p,dvnErrorGFC8/dvnMC);
688877b8 2725 }
2726
2727 // QC{2}:
2728 Double_t dvnQC2 = 0.;
7fb984f6 2729 Double_t dvnErrorQC2 = 0.;
688877b8 2730 if(qcCommonHistRes2 && qcCommonHistRes2->GetHistDiffFlowPtRP())
2731 {
2732 dvnQC2 = (qcCommonHistRes2->GetHistDiffFlowPtRP())->GetBinContent(p);
7fb984f6 2733 dvnErrorQC2 = (qcCommonHistRes2->GetHistDiffFlowPtRP())->GetBinError(p);
688877b8 2734 }
2735 if(dvnMC!=0. && dvnQC2!=0.)
2736 {
cf90787f 2737 qc2DiffFlowPtRelativeToMCRP->SetBinContent(p,(dvnQC2-dvnMC)/dvnMC);
b27d2a65 2738 qc2DiffFlowPtRelativeToMCRP->SetBinError(p,dvnErrorQC2/dvnMC);
688877b8 2739 }
2740
2741 // QC{4}:
2742 Double_t dvnQC4 = 0.;
7fb984f6 2743 Double_t dvnErrorQC4 = 0.;
688877b8 2744 if(qcCommonHistRes4 && qcCommonHistRes4->GetHistDiffFlowPtRP())
2745 {
2746 dvnQC4 = (qcCommonHistRes4->GetHistDiffFlowPtRP())->GetBinContent(p);
7fb984f6 2747 dvnErrorQC4 = (qcCommonHistRes4->GetHistDiffFlowPtRP())->GetBinError(p);
688877b8 2748 }
2749 if(dvnMC!=0. && dvnQC4!=0.)
2750 {
cf90787f 2751 qc4DiffFlowPtRelativeToMCRP->SetBinContent(p,(dvnQC4-dvnMC)/dvnMC);
b27d2a65 2752 qc4DiffFlowPtRelativeToMCRP->SetBinError(p,dvnErrorQC4/dvnMC);
688877b8 2753 }
2754
2755 // QC{6}:
2756 Double_t dvnQC6 = 0.;
7fb984f6 2757 Double_t dvnErrorQC6 = 0.;
688877b8 2758 if(qcCommonHistRes6 && qcCommonHistRes6->GetHistDiffFlowPtRP())
2759 {
2760 dvnQC6 = (qcCommonHistRes6->GetHistDiffFlowPtRP())->GetBinContent(p);
7fb984f6 2761 dvnErrorQC6 = (qcCommonHistRes6->GetHistDiffFlowPtRP())->GetBinError(p);
688877b8 2762 }
2763 if(dvnMC!=0. && dvnQC6!=0.)
2764 {
cf90787f 2765 qc6DiffFlowPtRelativeToMCRP->SetBinContent(p,(dvnQC6-dvnMC)/dvnMC);
b27d2a65 2766 qc6DiffFlowPtRelativeToMCRP->SetBinError(p,dvnErrorQC6/dvnMC);
688877b8 2767 }
2768
2769 // QC{8}:
2770 Double_t dvnQC8 = 0.;
7fb984f6 2771 Double_t dvnErrorQC8 = 0.;
688877b8 2772 if(qcCommonHistRes8 && qcCommonHistRes8->GetHistDiffFlowPtRP())
2773 {
2774 dvnQC8 = (qcCommonHistRes8->GetHistDiffFlowPtRP())->GetBinContent(p);
7fb984f6 2775 dvnErrorQC8 = (qcCommonHistRes8->GetHistDiffFlowPtRP())->GetBinError(p);
688877b8 2776 }
2777 if(dvnMC!=0. && dvnQC8!=0.)
2778 {
cf90787f 2779 qc8DiffFlowPtRelativeToMCRP->SetBinContent(p,(dvnQC8-dvnMC)/dvnMC);
b27d2a65 2780 qc8DiffFlowPtRelativeToMCRP->SetBinError(p,dvnErrorQC8/dvnMC);
688877b8 2781 }
2782
947cc449 2783 // LYZ2SUM:
2784 Double_t dvnLYZ2SUM = 0.;
2785 Double_t dvnErrorLYZ2SUM = 0.;
2786 if(lyz2sumCommonHistRes && lyz2sumCommonHistRes->GetHistDiffFlowPtRP())
2787 {
2788 dvnLYZ2SUM = (lyz2sumCommonHistRes->GetHistDiffFlowPtRP())->GetBinContent(p);
2789 dvnErrorLYZ2SUM = (lyz2sumCommonHistRes->GetHistDiffFlowPtRP())->GetBinError(p);
2790 }
2791 if(dvnMC!=0. && dvnLYZ2SUM!=0.)
688877b8 2792 {
947cc449 2793 lyz2sumDiffFlowPtRelativeToMCRP->SetBinContent(p,(dvnLYZ2SUM-dvnMC)/dvnMC);
2794 lyz2sumDiffFlowPtRelativeToMCRP->SetBinError(p,dvnErrorLYZ2SUM/dvnMC);
688877b8 2795 }
947cc449 2796
2797 // LYZ2PROD:
2798 Double_t dvnLYZ2PROD = 0.;
2799 Double_t dvnErrorLYZ2PROD = 0.;
2800 if(lyz2prodCommonHistRes && lyz2prodCommonHistRes->GetHistDiffFlowPtRP())
688877b8 2801 {
947cc449 2802 dvnLYZ2PROD = (lyz2prodCommonHistRes->GetHistDiffFlowPtRP())->GetBinContent(p);
2803 dvnErrorLYZ2PROD = (lyz2prodCommonHistRes->GetHistDiffFlowPtRP())->GetBinError(p);
2804 }
2805 if(dvnMC!=0. && dvnLYZ2PROD!=0.)
2806 {
2807 lyz2prodDiffFlowPtRelativeToMCRP->SetBinContent(p,(dvnLYZ2PROD-dvnMC)/dvnMC);
2808 lyz2prodDiffFlowPtRelativeToMCRP->SetBinError(p,dvnErrorLYZ2PROD/dvnMC);
688877b8 2809 }
2810
2811 // LYZEP:
2812 Double_t dvnLYZEP = 0.;
7fb984f6 2813 Double_t dvnErrorLYZEP = 0.;
688877b8 2814 if(lyzepCommonHistRes && lyzepCommonHistRes->GetHistDiffFlowPtRP())
2815 {
2816 dvnLYZEP = (lyzepCommonHistRes->GetHistDiffFlowPtRP())->GetBinContent(p);
7fb984f6 2817 dvnErrorLYZEP = (lyzepCommonHistRes->GetHistDiffFlowPtRP())->GetBinError(p);
688877b8 2818 }
2819 if(dvnMC!=0. && dvnLYZEP!=0.)
2820 {
cf90787f 2821 lyzepDiffFlowPtRelativeToMCRP->SetBinContent(p,(dvnLYZEP-dvnMC)/dvnMC);
b27d2a65 2822 lyzepDiffFlowPtRelativeToMCRP->SetBinError(p,dvnErrorLYZEP/dvnMC);
688877b8 2823 }
2824
2825 } // end of for(Int_t p=1;p<iNbinsPt+1;p++)
2826 } // end of if(mcepCommonHistRes->GetHistDiffFlowPtRP())
2827
2828
2829 // final drawings:
2830 spDiffFlowPtRelativeToMCRP->SetMarkerColor(markerColorSP);
2831 spDiffFlowPtRelativeToMCRP->SetMarkerStyle(markerStyleSP);
7fb984f6 2832 if(plotSPRelativeToMCRP && spCommonHistRes) spDiffFlowPtRelativeToMCRP->Draw("E1PSAME");
688877b8 2833
2834 gfc2DiffFlowPtRelativeToMCRP->SetMarkerColor(markerColorGFC2);
2835 gfc2DiffFlowPtRelativeToMCRP->SetMarkerStyle(markerStyleGFC2);
7fb984f6 2836 if(plotGFC2RelativeToMCRP && gfcCommonHistRes2) gfc2DiffFlowPtRelativeToMCRP->Draw("E1PSAME");
688877b8 2837
2838 gfc4DiffFlowPtRelativeToMCRP->SetMarkerColor(markerColorGFC4);
2839 gfc4DiffFlowPtRelativeToMCRP->SetMarkerStyle(markerStyleGFC4);
7fb984f6 2840 if(plotGFC4RelativeToMCRP && gfcCommonHistRes4) gfc4DiffFlowPtRelativeToMCRP->Draw("E1PSAME");
688877b8 2841
2842 gfc6DiffFlowPtRelativeToMCRP->SetMarkerColor(markerColorGFC6);
2843 gfc6DiffFlowPtRelativeToMCRP->SetMarkerStyle(markerStyleGFC6);
7fb984f6 2844 if(plotGFC6RelativeToMCRP && gfcCommonHistRes6) gfc6DiffFlowPtRelativeToMCRP->Draw("E1PSAME");
688877b8 2845
2846 gfc8DiffFlowPtRelativeToMCRP->SetMarkerColor(markerColorGFC8);
2847 gfc8DiffFlowPtRelativeToMCRP->SetMarkerStyle(markerStyleGFC8);
7fb984f6 2848 if(plotGFC8RelativeToMCRP && gfcCommonHistRes8) gfc8DiffFlowPtRelativeToMCRP->Draw("E1PSAME");
688877b8 2849
2850 qc2DiffFlowPtRelativeToMCRP->SetMarkerColor(markerColorQC2);
2851 qc2DiffFlowPtRelativeToMCRP->SetMarkerStyle(markerStyleQC2);
2852 if(plotQC2RelativeToMCRP && qcCommonHistRes2) qc2DiffFlowPtRelativeToMCRP->Draw("PSAME");
2853
2854 qc4DiffFlowPtRelativeToMCRP->SetMarkerColor(markerColorQC4);
2855 qc4DiffFlowPtRelativeToMCRP->SetMarkerStyle(markerStyleQC4);
2856 if(plotQC4RelativeToMCRP && qcCommonHistRes4) qc4DiffFlowPtRelativeToMCRP->Draw("PSAME");
2857
2858 qc6DiffFlowPtRelativeToMCRP->SetMarkerColor(markerColorQC6);
2859 qc6DiffFlowPtRelativeToMCRP->SetMarkerStyle(markerStyleQC6);
2860 if(plotQC6RelativeToMCRP && qcCommonHistRes6) qc6DiffFlowPtRelativeToMCRP->Draw("PSAME");
2861
2862 qc8DiffFlowPtRelativeToMCRP->SetMarkerColor(markerColorQC8);
2863 qc8DiffFlowPtRelativeToMCRP->SetMarkerStyle(markerStyleQC8);
2864 if(plotQC8RelativeToMCRP && qcCommonHistRes8) qc8DiffFlowPtRelativeToMCRP->Draw("PSAME");
2865
947cc449 2866 lyz2sumDiffFlowPtRelativeToMCRP->SetMarkerColor(markerColorLYZ2SUM);
2867 lyz2sumDiffFlowPtRelativeToMCRP->SetMarkerStyle(markerStyleLYZ2SUM);
2868 if(plotLYZ2SUMRelativeToMCRP && lyz2sumCommonHistRes) lyz2sumDiffFlowPtRelativeToMCRP->Draw("E1PSAME");
2869
2870 lyz2prodDiffFlowPtRelativeToMCRP->SetMarkerColor(markerColorLYZ2SUM);
2871 lyz2prodDiffFlowPtRelativeToMCRP->SetMarkerStyle(markerStyleLYZ2SUM);
2872 if(plotLYZ2SUMRelativeToMCRP && lyz2prodCommonHistRes) lyz2prodDiffFlowPtRelativeToMCRP->Draw("E1PSAME");
688877b8 2873
2874 lyzepDiffFlowPtRelativeToMCRP->SetMarkerColor(markerColorLYZEP);
2875 lyzepDiffFlowPtRelativeToMCRP->SetMarkerStyle(markerStyleLYZEP);
7fb984f6 2876 if(plotLYZEPRelativeToMCRP && lyzepCommonHistRes) lyzepDiffFlowPtRelativeToMCRP->Draw("E1PSAME");
688877b8 2877
2878 //2nd pad is for legend:
2879 (diffFlowPtRelativeToMCRP->cd(2))->SetPad(0.75,0.0,1.0,1.0);
2880
2881 TLegend* legendDiffFlowPtRP = new TLegend(0.02,0.12,0.97,0.70);
2882 legendDiffFlowPtRP->SetTextFont(72);
2883 legendDiffFlowPtRP->SetTextSize(0.06);
2884
947cc449 2885 //legend's entries:Pt
2886 TString *entryDiffMCPtRP = new TString("MC ........ ");
2887 TString *entryDiffSPPtRP = new TString("SP ........ ");
2888 TString *entryDiffGFC2PtRP = new TString("GFC{2} .... ");
2889 TString *entryDiffGFC4PtRP = new TString("GFC{4} .... ");
2890 TString *entryDiffGFC6PtRP = new TString("GFC{6} .... ");
2891 TString *entryDiffGFC8PtRP = new TString("GFC{8} .... ");
2892 TString *entryDiffQC2PtRP = new TString("QC{2} ..... ");
2893 TString *entryDiffQC4PtRP = new TString("QC{4} ..... ");
2894 TString *entryDiffQC6PtRP = new TString("QC{6} ..... ");
2895 TString *entryDiffQC8PtRP = new TString("QC{8} ..... ");
2896 TString *entryDiffLYZ2SUMPtRP = new TString("LYZ{sum} .. ");
2897 TString *entryDiffLYZ2PRODPtRP = new TString("LYZ{prod} . ");
2898 TString *entryDiffLYZEPPtRP = new TString("LYZEP ..... ");
688877b8 2899
2900 //MC
2901 if(mcepCommonHistRes)
2902 {
2903 (mcepCommonHistRes->GetHistDiffFlowPtRP())->SetFillStyle(meshStyleDiffFlowPtRP);
2904 (mcepCommonHistRes->GetHistDiffFlowPtRP())->SetFillColor(meshColorDiffFlowPtRP);
2905 entryDiffMCPtRP->Append("M = ");
2906 (*entryDiffMCPtRP)+=(Long_t)avMultDiffFlowMCRP;
2907 entryDiffMCPtRP->Append(", N = ");
2908 (*entryDiffMCPtRP)+=(Long_t)nEvtsDiffFlowMCRP;
2909 //legendDiffFlowPtRP->AddEntry(mcepCommonHistRes->GetHistDiffFlowPtRP(),entryDiffMCPtRP->Data(),"f");
2910 }
2911
2912 //SP
947cc449 2913 if(plotSPPtRP && spCommonHistRes)
688877b8 2914 {
2915 entryDiffSPPtRP->Append("M = ");
2916 (*entryDiffSPPtRP)+=(Long_t)avMultDiffFlowSPRP;
2917 entryDiffSPPtRP->Append(", N = ");
2918 (*entryDiffSPPtRP)+=(Long_t)nEvtsDiffFlowSPRP;
2919 if(plotSPRelativeToMCRP) legendDiffFlowPtRP->AddEntry(spCommonHistRes->GetHistDiffFlowPtRP(),entryDiffSPPtRP->Data(),"p");
2920 }
2921
2922 //GFC
2923 if(plotGFC2PtRP && gfcCommonHistRes2)
2924 {
2925 entryDiffGFC2PtRP->Append("M = ");
2926 (*entryDiffGFC2PtRP)+=(Long_t)avMultDiffFlowGFCRP;
2927 entryDiffGFC2PtRP->Append(", N = ");
2928 (*entryDiffGFC2PtRP)+=(Long_t)nEvtsDiffFlowGFCRP;
2929 if(plotGFC2RelativeToMCRP) legendDiffFlowPtRP->AddEntry(gfcCommonHistRes2->GetHistDiffFlowPtRP(),entryDiffGFC2PtRP->Data(),"p");
2930 }
2931 if(plotGFC4PtRP && gfcCommonHistRes4)
2932 {
2933 entryDiffGFC4PtRP->Append("M = ");
2934 (*entryDiffGFC4PtRP)+=(Long_t)avMultDiffFlowGFCRP;
2935 entryDiffGFC4PtRP->Append(", N = ");
2936 (*entryDiffGFC4PtRP)+=(Long_t)nEvtsDiffFlowGFCRP;
2937 if(plotGFC4RelativeToMCRP) legendDiffFlowPtRP->AddEntry(gfcCommonHistRes4->GetHistDiffFlowPtRP(),entryDiffGFC4PtRP->Data(),"p");
2938 }
2939 if(plotGFC6PtRP && gfcCommonHistRes6)
2940 {
2941 entryDiffGFC6PtRP->Append("M = ");
2942 (*entryDiffGFC6PtRP)+=(Long_t)avMultDiffFlowGFCRP;
2943 entryDiffGFC6PtRP->Append(", N = ");
2944 (*entryDiffGFC6PtRP)+=(Long_t)nEvtsDiffFlowGFCRP;
2945 if(plotGFC6RelativeToMCRP) legendDiffFlowPtRP->AddEntry(gfcCommonHistRes6->GetHistDiffFlowPtRP(),entryDiffGFC6PtRP->Data(),"p");
2946 }
2947 if(plotGFC8PtRP && gfcCommonHistRes8)
2948 {
2949 entryDiffGFC8PtRP->Append("M = ");
2950 (*entryDiffGFC8PtRP)+=(Long_t)avMultDiffFlowGFCRP;
2951 entryDiffGFC8PtRP->Append(", N = ");
2952 (*entryDiffGFC8PtRP)+=(Long_t)nEvtsDiffFlowGFCRP;
2953 if(plotGFC8RelativeToMCRP) legendDiffFlowPtRP->AddEntry(gfcCommonHistRes8->GetHistDiffFlowPtRP(),entryDiffGFC8PtRP->Data(),"p");
2954 }
2955
2956 //QC
2957 if(plotQC2PtRP && qcCommonHistRes2)
2958 {
2959 entryDiffQC2PtRP->Append("M = ");
2960 (*entryDiffQC2PtRP)+=(Long_t)avMultDiffFlowQC2RP;
2961 entryDiffQC2PtRP->Append(", N = ");
2962 (*entryDiffQC2PtRP)+=(Long_t)nEvtsDiffFlowQC2RP;
2963 if(plotQC2RelativeToMCRP) legendDiffFlowPtRP->AddEntry(qcCommonHistRes2->GetHistDiffFlowPtRP(),entryDiffQC2PtRP->Data(),"p");
2964 }
2965 if(plotQC4PtRP && qcCommonHistRes4)
2966 {
2967 entryDiffQC4PtRP->Append("M = ");
2968 (*entryDiffQC4PtRP)+=(Long_t)avMultDiffFlowQC4RP;
2969 entryDiffQC4PtRP->Append(", N = ");
2970 (*entryDiffQC4PtRP)+=(Long_t)nEvtsDiffFlowQC4RP;
2971 if(plotQC4RelativeToMCRP) legendDiffFlowPtRP->AddEntry(qcCommonHistRes4->GetHistDiffFlowPtRP(),entryDiffQC4PtRP->Data(),"p");
2972 }
2973 if(plotQC6PtRP && qcCommonHistRes6)
2974 {
2975 entryDiffQC6PtRP->Append("M = ");
2976 (*entryDiffQC6PtRP)+=(Long_t)avMultDiffFlowQC6RP;
2977 entryDiffQC6PtRP->Append(", N = ");
2978 (*entryDiffQC6PtRP)+=(Long_t)nEvtsDiffFlowQC6RP;
2979 if(plotQC6RelativeToMCRP) legendDiffFlowPtRP->AddEntry(qcCommonHistRes6->GetHistDiffFlowPtRP(),entryDiffQC6PtRP->Data(),"p");
2980 }
2981 if(plotQC8PtRP && qcCommonHistRes8)
2982 {
2983 entryDiffQC8PtRP->Append("M = ");
2984 (*entryDiffQC8PtRP)+=(Long_t)avMultDiffFlowQC8RP;
2985 entryDiffQC8PtRP->Append(", N = ");
2986 (*entryDiffQC8PtRP)+=(Long_t)nEvtsDiffFlowQC8RP;
2987 if(plotQC8RelativeToMCRP) legendDiffFlowPtRP->AddEntry(qcCommonHistRes8->GetHistDiffFlowPtRP(),entryDiffQC8PtRP->Data(),"p");
2988 }
2989
947cc449 2990 //LYZ2SUM
2991 if(plotLYZ2SUMPtRP && lyz2sumCommonHistRes)
688877b8 2992 {
947cc449 2993 entryDiffLYZ2SUMPtRP->Append("M = ");
2994 (*entryDiffLYZ2SUMPtRP)+=(Long_t)avMultDiffFlowLYZ2SUMRP;
2995 entryDiffLYZ2SUMPtRP->Append(", N = ");
2996 (*entryDiffLYZ2SUMPtRP)+=(Long_t)nEvtsDiffFlowLYZ2SUMRP;
2997 if(plotLYZ2SUMRelativeToMCRP) legendDiffFlowPtRP->AddEntry(lyz2sumCommonHistRes->GetHistDiffFlowPtRP(),entryDiffLYZ2SUMPtRP->Data(),"p");
2998 }
2999
3000 //LYZ2PROD
3001 if(plotLYZ2PRODPtRP && lyz2prodCommonHistRes)
3002 {
3003 entryDiffLYZ2PRODPtRP->Append("M = ");
3004 (*entryDiffLYZ2PRODPtRP)+=(Long_t)avMultDiffFlowLYZ2PRODRP;
3005 entryDiffLYZ2PRODPtRP->Append(", N = ");
3006 (*entryDiffLYZ2PRODPtRP)+=(Long_t)nEvtsDiffFlowLYZ2PRODRP;
3007 if(plotLYZ2PRODRelativeToMCRP) legendDiffFlowPtRP->AddEntry(lyz2prodCommonHistRes->GetHistDiffFlowPtRP(),entryDiffLYZ2PRODPtRP->Data(),"p");
688877b8 3008 }
3009
3010 //LYZEP
3011 if(plotLYZEPPtRP && lyzepCommonHistRes)
3012 {
3013 entryDiffLYZEPPtRP->Append("M = ");
3014 (*entryDiffLYZEPPtRP)+=(Long_t)avMultDiffFlowLYZEPRP;
3015 entryDiffLYZEPPtRP->Append(", N = ");
3016 (*entryDiffLYZEPPtRP)+=(Long_t)nEvtsDiffFlowLYZEPRP;
3017 if(plotLYZEPRelativeToMCRP) legendDiffFlowPtRP->AddEntry(lyzepCommonHistRes->GetHistDiffFlowPtRP(),entryDiffLYZEPPtRP->Data(),"p");
3018 }
3019
3020 //drawing finally the legend in the 2nd pad:
3021 if(textDefault) textDefault->Draw();
3022
3023 if(legendDiffFlowPtRP)
3024 {
3025 legendDiffFlowPtRP->SetMargin(0.15);
3026 legendDiffFlowPtRP->Draw();
3027 }
3028 }
3029 //----------------------------------------------------------------------------------
c365fe76 3030
1fca9c90 3031 //----------------------------------------------------------------------------------
3032 //final drawing for differential flow (Pt, POI):
e83922f2 3033 if(plotDiffFlowPtPOI)