AliPhysics  2c8507d (2c8507d)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliFlowAnalysisCRC.cxx
Go to the documentation of this file.
1 /*************************************************************************
2  * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 /*************************************************
17  * Charge-rapidity correlations with Q-cumulants *
18  * *
19  * author: Jacopo Margutti *
20  * (margutti@nikhef.nl) *
21  *************************************************/
22 
23 #define AliFlowAnalysisCRC_cxx
24 
25 #include "Riostream.h"
26 #include "AliFlowCommonConstants.h"
27 #include "AliFlowCommonHist.h"
29 #include "TChain.h"
30 
31 #include "TFile.h"
32 #include "TList.h"
33 #include "TGraph.h"
34 #include "TParticle.h"
35 #include "TRandom3.h"
36 #include "TStyle.h"
37 #include "TProfile.h"
38 #include "TProfile2D.h"
39 #include "TProfile3D.h"
40 #include "TMath.h"
41 #include "TArrow.h"
42 #include "TPaveLabel.h"
43 #include "TCanvas.h"
44 #include "AliFlowEventSimple.h"
45 #include "AliFlowVector.h"
46 #include "AliFlowTrackSimple.h"
47 #include "AliFlowAnalysisCRC.h"
48 #include "TRandom.h"
49 #include "TF1.h"
50 #include "TNtuple.h"
51 #include "THnSparse.h"
52 #include <cmath>
53 
54 //using std::isfinite;
55 
56 class TH1;
57 class TH2;
58 class TGraph;
59 class TPave;
60 class TLatex;
61 class TMarker;
62 class TRandom3;
63 class TObjArray;
64 class TList;
65 class TCanvas;
66 class TSystem;
67 class TROOT;
68 class AliFlowVector;
69 class TVector;
70 
71 //==============================================================================================================
72 
73 using std::endl;
74 using std::cout;
75 using std::flush;
77 
78 AliFlowAnalysisCRC::AliFlowAnalysisCRC(const char* name,
79  Int_t nCen,
80  Double_t CenWidth):
81 TNamed(name,name),
82 // 0.) base:
83 fHistList(NULL),
84 // 1.) common:
85 fBookOnlyBasicCCH(kTRUE),
86 fCommonHists(NULL),
87 fCommonHists2nd(NULL),
88 fCommonHists4th(NULL),
89 fCommonHists6th(NULL),
90 fCommonHists8th(NULL),
91 fCommonHistsResults2nd(NULL),
92 fCommonHistsResults4th(NULL),
93 fCommonHistsResults6th(NULL),
94 fCommonHistsResults8th(NULL),
95 fnBinsPhi(0),
96 fPhiMin(0),
97 fPhiMax(0),
98 fPhiBinWidth(0),
99 fnBinsPt(0),
100 fPtMin(0),
101 fPtMax(0),
102 fPtBinWidth(0),
103 fnBinsEta(0),
104 fEtaMin(0),
105 fEtaMax(0),
106 fEtaBinWidth(0),
107 fCommonConstants(NULL),
108 fFillMultipleControlHistograms(kFALSE),
109 fHarmonic(1),
110 fAnalysisLabel(NULL),
111 // 2a.) particle weights:
112 fUsePhiWeights(kFALSE),
113 fUsePtWeights(kFALSE),
114 fUseEtaWeights(kFALSE),
115 fUseTrackWeights(kFALSE),
116 fUsePhiEtaWeights(kFALSE),
117 fUseZDCESEMulWeights(kFALSE),
118 fUseZDCESESpecWeights(kFALSE),
119 fUseParticleWeights(NULL),
120 // 2b.) event weights:
121 fMultiplicityWeight(NULL),
122 fMultiplicityIs(AliFlowCommonConstants::kRP),
123 // 3.) integrated flow:
124 fIntFlowList(NULL),
125 fIntFlowProfiles(NULL),
126 fIntFlowResults(NULL),
127 fIntFlowAllCorrelationsVsM(NULL),
128 fIntFlowFlags(NULL),
129 fApplyCorrectionForNUA(kFALSE),
130 fApplyCorrectionForNUAVsM(kFALSE),
131 fnBinsMult(10000),
132 fMinMult(0.),
133 fMaxMult(10000.),
134 fPropagateErrorAlsoFromNIT(kFALSE),
135 fCalculateCumulantsVsM(kFALSE),
136 fCalculateAllCorrelationsVsM(kFALSE),
137 fMinimumBiasReferenceFlow(kTRUE),
138 fForgetAboutCovariances(kFALSE),
139 fStoreVarious(kFALSE),
140 fExactNoRPs(0),
141 fUse2DHistograms(kFALSE),
142 fFillProfilesVsMUsingWeights(kTRUE),
143 fUseQvectorTerms(kFALSE),
144 fReQ(NULL),
145 fImQ(NULL),
146 fSpk(NULL),
147 fIntFlowCorrelationsEBE(NULL),
148 fIntFlowEventWeightsForCorrelationsEBE(NULL),
149 fIntFlowCorrelationsAllEBE(NULL),
150 fNumberOfRPsEBE(0.),
151 fNumberOfPOIsEBE(0.),
152 fReferenceMultiplicityEBE(0.),
153 fCentralityEBE(0.),
154 fNewCentralityEBE(0.),
155 fZDCESEclEbE(0),
156 fNewMetricLEBE(0.),
157 fNewMetricDEBE(0.),
158 fNewMetricL2EBE(0.),
159 fNewMetricD2EBE(0.),
160 fCentralityCL1EBE(0.),
161 fNITSCL1EBE(0.),
162 fCentralityTRKEBE(0.),
163 fZNCen(0.),
164 fZNAen(0.),
165 fEnNucl(1.),
166 fAvMultiplicity(NULL),
167 fIntFlowCorrelationsPro(NULL),
168 fIntFlowSquaredCorrelationsPro(NULL),
169 fIntFlowCorrelationsAllPro(NULL),
170 fIntFlowExtraCorrelationsPro(NULL),
171 fIntFlowProductOfCorrelationsPro(NULL),
172 fIntFlowProductOfCorrectionTermsForNUAPro(NULL),
173 fIntFlowCorrelationsHist(NULL),
174 fIntFlowCorrelationsAllHist(NULL),
175 fIntFlowCovariances(NULL),
176 fIntFlowSumOfProductOfEventWeights(NULL),
177 fIntFlowCovariancesNUA(NULL),
178 fIntFlowSumOfProductOfEventWeightsNUA(NULL),
179 fIntFlowQcumulants(NULL),
180 fIntFlowQcumulantsRebinnedInM(NULL),
181 fIntFlowQcumulantsErrorSquaredRatio(NULL),
182 fIntFlow(NULL),
183 fIntFlowRebinnedInM(NULL),
184 fIntFlowDetectorBias(NULL),
185 // 4.) differential flow:
186 fDiffFlowList(NULL),
187 fDiffFlowProfiles(NULL),
188 fDiffFlowResults(NULL),
189 fDiffFlow2D(NULL),
190 fDiffFlowFlags(NULL),
191 fCalculateDiffFlow(kTRUE),
192 fCalculate2DDiffFlow(kFALSE),
193 fCalculateDiffFlowVsEta(kTRUE),
194 // 5.) other differential correlators:
195 fOtherDiffCorrelatorsList(NULL),
196 // 6.) distributions:
197 fDistributionsList(NULL),
198 fDistributionsFlags(NULL),
199 fStoreDistributions(kFALSE),
200 fnBinsForCorrelations(10000),
201 // 8.) debugging and cross-checking:
202 fNestedLoopsList(NULL),
203 fEvaluateIntFlowNestedLoops(kFALSE),
204 fEvaluateDiffFlowNestedLoops(kFALSE),
205 fMaxAllowedMultiplicity(10),
206 fEvaluateNestedLoops(NULL),
207 fIntFlowDirectCorrelations(NULL),
208 fIntFlowExtraDirectCorrelations(NULL),
209 fCrossCheckInPtBinNo(10),
210 fCrossCheckInEtaBinNo(20),
211 fNoOfParticlesInBin(NULL),
212 fMixedHarmonicsNestedLoops(NULL),
213 // 9.) mixed harmonics:
214 fMixedHarmonicsList(NULL),
215 fMixedHarmonicsProfiles(NULL),
216 fMixedHarmonicsResults(NULL),
217 fMixedHarmonicsErrorPropagation(NULL),
218 fMixedHarmonicsFlags(NULL),
219 fCalculateMixedHarmonics(kFALSE),
220 fCalculateMixedHarmonicsVsM(kFALSE),
221 f2pCorrelations(NULL),
222 f3pCorrelations(NULL),
223 f4pCorrelations(NULL),
224 f5pCorrelations(NULL),
225 f6pCorrelations(NULL),
226 f7pCorrelations(NULL),
227 f8pCorrelations(NULL),
228 f2pCumulants(NULL),
229 f3pCumulants(NULL),
230 f4pCumulants(NULL),
231 f5pCumulants(NULL),
232 f6pCumulants(NULL),
233 f7pCumulants(NULL),
234 f8pCumulants(NULL),
235 fMixedHarmonicProductOfEventWeights(NULL),
236 fMixedHarmonicProductOfCorrelations(NULL),
237 // 10.) Control histograms:
238 fControlHistogramsList(NULL),
239 fControlHistogramsFlags(NULL),
240 fStoreControlHistograms(kFALSE),
241 fCorrelationNoRPsVsRefMult(NULL),
242 fCorrelationNoPOIsVsRefMult(NULL),
243 fCorrelationNoRPsVsNoPOIs(NULL),
244 // 11.) Bootstrap:
245 fBootstrapList(NULL),
246 fBootstrapProfilesList(NULL),
247 fBootstrapResultsList(NULL),
248 fBootstrapFlags(NULL),
249 fUseBootstrap(kFALSE),
250 fUseBootstrapVsM(kFALSE),
251 fnSubsamples(10),
252 fRandom(NULL),
253 fBootstrapCorrelations(NULL),
254 fBootstrapCumulants(NULL),
255 // 12.) Charge-Eta Asymmetry:
256 fCRCList(NULL),
257 fTempList(NULL),
258 fCRCFlags(NULL),
259 fCalculateCRC(kTRUE),
260 fCalculateCRCPt(kFALSE),
261 fCalculateCME(kFALSE),
262 fCalculateCRC2(kFALSE),
263 fCalculateCRCVZ(kFALSE),
264 fCalculateCRCZDC(kFALSE),
265 fCalculateFlowQC(kFALSE),
266 fCalculateFlowZDC(kFALSE),
267 fCalculateFlowVZ(kFALSE),
268 fCalculateEbEFlow(kFALSE),
269 fUseVZERO(kFALSE),
270 fUseZDC(kFALSE),
271 fRecenterZDC(kFALSE),
272 fNUAforCRC(kFALSE),
273 fUseCRCRecenter(kFALSE),
274 fDivSigma(kTRUE),
275 fInvertZDC(kFALSE),
276 fCRCTestSin(kFALSE),
277 fCRCEtaMin(0.),
278 fCRCEtaMax(0.),
279 fRunNum(0),
280 fCachedRunNum(0),
281 fRunBin(0),
282 fCenBin(0),
283 fCorrWeightTPC(kUnit),
284 fCorrWeightVZ(kUnit),
285 fCorrWeightZDC(kUnit),
286 fCRCIntList(NULL),
287 fCRCnCen(nCen),
288 fCRCCenBinWidth(CenWidth),
289 fCRCIntRbRList(NULL),
290 fCRCnRun(211),
291 fDataSet(kAny),
292 fMPolSelec(kMAll),
293 fCRCQVecList(NULL),
294 fCRCQVecWeightsList(NULL),
295 fCRCZDCCalibList(NULL),
296 fZDCESEList(NULL),
297 fCRCVZList(NULL),
298 fCRCVZRbRList(NULL),
299 fCRCZDCList(NULL),
300 fCRCZDCRbRList(NULL),
301 fCRCPtList(NULL),
302 fCMEList(NULL),
303 fCMETPCList(NULL),
304 fCMEZDCList(NULL),
305 fCRC2List(NULL),
306 fCRC2nEtaBins(6),
307 fCRC2RbRList(NULL),
308 fFlowSPZDCList(NULL),
309 fFlowSPZDCRbRList(NULL),
310 fFlowQCList(NULL),
311 fFlowQCCenBin(100),
312 fFlowQCDeltaEta(0.4),
313 fFlowSPVZList(NULL),
314 fVariousList(NULL),
315 fEbEFlowList(NULL),
316 fCenWeightEbE(0.),
317 fQAZDCCuts(kFALSE),
318 fQAZDCCutsFlag(kTRUE),
319 fMinMulZN(0),
320 fMaxDevZN(5.)
321 {
322  // constructor
323 
324  // base list to hold all output objects:
325  fHistList = new TList();
326  fHistList->SetName("cobjQC");
327  fHistList->SetOwner(kTRUE);
328 
329  // base list to hold all temp objects:
330  fTempList = new TList();
331  fTempList->SetName("temp");
332  fTempList->SetOwner(kTRUE);
333 
334  // multiplicity weight:
335  fMultiplicityWeight = new TString("combinations");
336 
337  // analysis label;
338  fAnalysisLabel = new TString();
339 
340  // initialize all arrays:
341  this->InitializeArraysForIntFlow();
342  this->InitializeArraysForDiffFlow();
343  this->InitializeArraysForDistributions();
344  this->InitializeArraysForVarious();
345  this->InitializeArraysForParticleWeights();
346  this->InitializeArraysForNestedLoops();
347  this->InitializeArraysForMixedHarmonics();
348  this->InitializeArraysForControlHistograms();
349  this->InitializeArraysForBootstrap();
350 
351  fRunList = TArrayI();
352 
353  // CRC
354  this->InitializeCostantsForCRC();
355  this->InitializeArraysForCRC();
356  this->InitializeArraysForCRCVZ();
357  this->InitializeArraysForCRCZDC();
358  this->InitializeArraysForCRC2();
359  this->InitializeArraysForQVec();
360  this->InitializeArraysForCRCPt();
361  this->InitializeArraysForCME();
362  this->InitializeArraysForFlowEbE();
363  this->InitializeArraysForFlowQC();
364  this->InitializeArraysForFlowSPZDC();
365  this->InitializeArraysForFlowSPVZ();
366  this->InitializeArraysForEbEFlow();
367 
368  // printf("Arrays initialized \n");
369 
370 } // end of constructor
371 
372 //================================================================================================================
373 
375 {
376  // destructor
377  delete fHistList;
378  delete fTempList;
379  delete[] fCRCPtvarPtBins;
380  delete[] fCRCPtBins;
381  delete[] fCorrMap;
382  delete[] fchisqVA;
383  delete[] fchisqVC;
384 } // end of AliFlowAnalysisCRC::~AliFlowAnalysisCRC()
385 
386 //================================================================================================================
387 
389 {
390  // a) Cross check if the settings make sense before starting the QC adventure;
391  // b) Access all common constants;
392  // c) Book all objects;
393  // d) Store flags for integrated and differential flow;
394  // e) Store flags for distributions of corelations;
395  // f) Store harmonic which will be estimated;
396  // g) Store flags for mixed harmonics;
397  // h) Store flags for control histograms;
398  // i) Store bootstrap flags.
399 
400  //save old value and prevent histograms from being added to directory
401  //to avoid name clashes in case multiple analaysis objects are used
402  //in an analysis
403  Bool_t oldHistAddStatus = TH1::AddDirectoryStatus();
404  TH1::AddDirectory(kFALSE);
405 
406  // a) Cross check if the settings make sense before starting the QC adventure;
407  this->CrossCheckSettings();
408  // b) Access all common constants and book a profile to hold them:
409  this->CommonConstants("Init");
410  // c) Book all objects:
412  this->BookAndNestAllLists();
413  this->BookCommonHistograms();
422  this->SetRunList();
423  this->BookEverythingForCRC();
424  this->BookEverythingForCRCVZ();
425  this->BookEverythingForCRCZDC();
426  this->BookEverythingForCRCPt();
427  this->BookEverythingForCRC2();
428  this->BookEverythingForQVec();
429  this->BookEverythingForCME();
430  this->BookEverythingForFlowEbE();
431  this->BookEverythingForFlowQC();
434  this->BookEverythingForEbEFlow();
435  this->BookEverythingForVarious();
436 
437  this->SetCentralityWeights();
438 
439  // d) Store flags for integrated and differential flow:
440  this->StoreIntFlowFlags();
441  this->StoreDiffFlowFlags();
442  // e) Store flags for distributions of corelations:
444  // f) Store harmonic which will be estimated:
445  this->StoreHarmonic();
446  // g) Store flags for mixed harmonics:
447  this->StoreMixedHarmonicsFlags();
448  // h) Store flags for control histograms:
450  // i) Store bootstrap flags:
451  this->StoreBootstrapFlags();
452  // j) Store CRC flags:
453  this->StoreCRCFlags();
454 
455  TH1::AddDirectory(oldHistAddStatus);
456 
457  // printf("Stuff booked \n");
458 
459 } // end of void AliFlowAnalysisCRC::Init()
460 
461 //================================================================================================================
462 
464 {
465  // Running over data only in this method.
466  // a) Check all pointers used in this method;
467  // b) Define local variables;
468  // c) Fill the common control histograms and call the method to fill fAvMultiplicity;
469  // d) Loop over data and calculate e-b-e quantities Q_{n,k}, S_{p,k} and s_{p,k};
470  // d.1) initialize particle weights
471  // e) Calculate the final expressions for S_{p,k} and s_{p,k} (important !!!!);
472  // f) Call the methods which calculate correlations for reference flow;
473  // g) Call the methods which calculate correlations for differential flow;
474  // h) Call the methods which calculate correlations for 2D differential flow;
475  // i) Call the methods which calculate other differential correlators;
476  // j) Distributions of correlations;
477  // k) Store various;
478  // l) Cross-check with nested loops correlators for reference flow;
479  // m) Cross-check with nested loops correlators for differential flow;
480  // n) Reset all event-by-event quantities (very important !!!!).
481 
482  // a) Check all pointers used in this method:
483  this->CheckPointersUsedInMake();
484 
485  // b) Define local variables:
486  Double_t dPhi = 0.; // azimuthal angle in the laboratory frame
487  Double_t dPt = 0.; // transverse momentum
488  Double_t dEta = 0.; // pseudorapidity
489  Double_t wPhi = 1.; // phi weight
490  Double_t wPt = 1.; // pt weight
491  Double_t wEta = 1.; // eta weight
492  Double_t wTrack = 1.; // track weight
493  Double_t wPhiEta = 1.;
494  Int_t nCounterNoRPs = 0; // needed only for shuffling
495  fNumberOfRPsEBE = anEvent->GetNumberOfRPs(); // number of RPs (i.e. number of reference particles)
496  fNumberOfPOIsEBE = anEvent->GetNumberOfPOIs(); // number of POIs (i.e. number of particles of interest)
497  fReferenceMultiplicityEBE = anEvent->GetReferenceMultiplicity(); // reference multiplicity for current event
498  fCentralityEBE = anEvent->GetCentrality(); // centrality percentile for current event
499  fCentralityCL1EBE = anEvent->GetCentralityCL1(); // centrality percentile for current event (alternative estimation)
500  fCentralityTRKEBE = anEvent->GetCentralityTRK(); // centrality percentile for current event (alternative estimation)
501  fNITSCL1EBE = anEvent->GetNITSCL1();
502 
503 // printf("debug: NoRPs %e, NoPOIs %e, RunNum %d, Cen %e \n",fNumberOfRPsEBE,fNumberOfPOIsEBE,fRunNum,fCentralityEBE);
504 
505  if(fExactNoRPs > 0 && fNumberOfRPsEBE<fExactNoRPs){return;}
506  if(!fCentralityEBE){return;}
507  if(!fNumberOfRPsEBE || !fNumberOfPOIsEBE){return;}
508 
509  // centrality flattening with weights
510  fCenWeightEbE = 1.;
512 
513  // primary vertex position (x,y,z)
514  anEvent->GetVertexPosition(fVtxPos);
515 
516  Double_t ptEta[2] = {0.,0.}; // 0 = dPt, 1 = dEta
517  Int_t dCharge = 0; // charge
518 
519  // d) Loop over data and calculate e-b-e quantities Q_{n,k}, S_{p,k} and s_{p,k}:
520  Int_t nPrim = anEvent->NumberOfTracks(); // nPrim = total number of primary tracks
521  AliFlowTrackSimple *aftsTrack = NULL;
522  Int_t n = fHarmonic; // shortcut for the harmonic
523 
524  // d.1) Initialize particle weights
525  Int_t cw = 0;
526 
527  if (fDataSet==kAny) {fRunBin = 0;}
528  else {fRunBin = GetCRCRunBin(fRunNum);}
529  if(fRunBin<0 || fRunBin>=fCRCnRun) {return;}
531  if(fCenBin<0 || fCenBin>=fCRCnCen) {return;}
532 
533  // determine phi,eta weight for POI && RP particle:
535 
536  if(fRunNum!=fCachedRunNum) {
537  for(Int_t h=0;h<fCRCnCen;h++) {
538  for(Int_t k=0; k<2; k++) {
539  fRunPhiEtaHist[h][k] = (TH2D*)(fWeightsList->FindObject(Form("Run %d",fRunNum))->FindObject(Form("fCRCPhiHist[%d][%d][%d]",fRunNum,h,k)));
540  }
541  }
542  }
543 
544  Int_t nBinsEta = fRunPhiEtaHist[0][0]->GetNbinsY();
545  Int_t nBinsPhi = fRunPhiEtaHist[0][0]->GetNbinsX();
546 
547  Double_t PhiEtaAv = 0.;
548  for(Int_t k=0; k<2; k++) {
549  PhiEtaAv = 0.;
550  if(fRunPhiEtaHist[fCenBin][k]) {
551  for(Int_t i=1; i<=nBinsEta; i++) {
552  for (Int_t j=1; j<=nBinsPhi; j++) {
553  PhiEtaAv += fRunPhiEtaHist[fCenBin][k]->GetBinContent(j,i);
554  }
555  }
556  PhiEtaAv /= 1.*nBinsPhi*nBinsEta;
557  for(Int_t i=1; i<=nBinsEta; i++) {
558  for (Int_t j=1; j<=nBinsPhi; j++) {
559  Double_t Val = fRunPhiEtaHist[fCenBin][k]->GetBinContent(j,i);
560  fPhiEtaWeights[k]->SetBinContent(j,i,PhiEtaAv/Val);
561  }
562  }
563  } else cout << " WARNING: fPhiEtaWeights not found !!! " << endl;
564  } // end of for(Int_t k=0; k<2; k++)
565 
566  } // end of if(fUsePhiEtaWeights && fWeightsList)
567 
568  // VZERO *********************************************************************************************************
569 
570  if(fUseVZERO) {
571  for(Int_t h=0; h<fCRCnHar; h++) {
572  // Get Q vectors for the subevents
573  AliFlowVector vQarray[2];
574  anEvent->Get2Qsub(vQarray,h+1);
575  fVZFlowVect[0][h] = vQarray[0];
576  fVZFlowVect[1][h] = vQarray[1];
577  } // end of for(Int_t h=0; h<fCRCnHar; h++)
578  } // end of if(fUseVZERO)
579 
580  // ZDC *********************************************************************************************************
581 
582  if(fUseZDC) {
583  // Get Q vectors for the subevents
584  AliFlowVector vQarray[2];
585  anEvent->GetZDC2Qsub(vQarray);
586  fZDCFlowVect[0] = vQarray[0];
587  fZDCFlowVect[1] = vQarray[1];
588  fZNCen = anEvent->GetZNCEnergy()/fEnNucl;
589  fZNAen = anEvent->GetZNAEnergy()/fEnNucl;
590  } // end of if(fUseZDC)
591 
592  this->CalculateCRCQVec();
593  if(fRecenterZDC) {
594  this->RecenterCRCQVecZDC();
595  }
596  // ZDC-C (eta < -8.8)
597  Double_t ZCRe = fZDCFlowVect[0].X();
598  Double_t ZCIm = fZDCFlowVect[0].Y();
599  Double_t ZCM = fZDCFlowVect[0].GetMult();
600  // ZDC-A (eta > 8.8)
601  Double_t ZARe = fZDCFlowVect[1].X();
602  Double_t ZAIm = fZDCFlowVect[1].Y();
603  Double_t ZAM = fZDCFlowVect[1].GetMult();
604  if( fInvertZDC ) ZARe = -ZARe;
605 
606  if(fCalculateCRC) {
608  }
609 
610  // EbE flow *********************************************************************************************************
611 
612  if(fCalculateEbEFlow) {
613  if(fNumberOfPOIsEBE>0 && fNumberOfPOIsEBE<=2500) {
615  } else {
616  fEBEFlowMulBin = -1;
617  }
618  }
619 
620  // loop over particles **********************************************************************************************
621 
622  for(Int_t i=0;i<nPrim;i++) {
623  if(fExactNoRPs > 0 && nCounterNoRPs>fExactNoRPs){continue;}
624  aftsTrack=anEvent->GetTrack(i);
625  if(aftsTrack) {
626  if(!(aftsTrack->InRPSelection() || aftsTrack->InPOISelection())){continue;} // safety measure: consider only tracks which are RPs or POIs
627 
628  // RPs *********************************************************************************************************
629 
630  if(aftsTrack->InRPSelection()) {
631  nCounterNoRPs++;
632  dPhi = aftsTrack->Phi();
633  dPt = aftsTrack->Pt();
634  dEta = aftsTrack->Eta();
635  wPhi = 1.;
636  wPt = 1.;
637  wEta = 1.;
638  wPhiEta = 1.;
639  wTrack = 1.;
640  // if(fUsePhiWeights && fPhiWeightsRPs && fnBinsPhi) // determine phi weight for POI:
641  // {
642  // wPhi = fPhiWeightsRPs->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*fnBinsPhi/TMath::TwoPi())));
643  // }
644  // if(fUsePtWeights) // determine pt weight for POI:
645  // {
646  // wPt = 1.;
647  // }
648  // if(fUseEtaWeights && fEtaWeightsRPs && fEtaBinWidth) // determine eta weight for POI:
649  // {
650  // wEta = fEtaWeightsRPs->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fEtaBinWidth)));
651  // }
652  // if(fUsePhiEtaWeights && fPhiEtaWeightsPOIs[cw] && fnBinsPhi && fEtaBinWidth) // determine eta weight for POI:
653  // {
654  // wPhiEta = fPhiEtaWeightsPOIs[cw]->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*fnBinsPhi/TMath::TwoPi())),1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fEtaBinWidth)));
655  // }
656  // if(aftsTrack->InPOISelection() && fUseTrackWeights) // Access track weight for POI && RP particle:
657  // {
658  // wTrack = aftsTrack->Weight();
659  // }
660  // Calculate Re[Q_{m*n,k}] and Im[Q_{m*n,k}] for this event (m = 1,2,...,12, k = 0,1,...,8):
661  for(Int_t m=0;m<12;m++) // to be improved - hardwired 6
662  {
663  for(Int_t k=0;k<9;k++) // to be improved - hardwired 9
664  {
665  (*fReQ)(m,k)+=pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1)*n*dPhi);
666  (*fImQ)(m,k)+=pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1)*n*dPhi);
667  }
668  }
669  // Calculate S_{p,k} for this event (Remark: final calculation of S_{p,k} follows after the loop over data bellow):
670  for(Int_t p=0;p<8;p++)
671  {
672  for(Int_t k=0;k<9;k++)
673  {
674  (*fSpk)(p,k)+=pow(wPhiEta*wPhi*wPt*wEta*wTrack,k);
675  }
676  }
677  // Differential flow:
679  {
680  ptEta[0] = dPt;
681  ptEta[1] = dEta;
682  // Calculate r_{m*n,k} and s_{p,k} (r_{m,k} is 'p-vector' for RPs):
683  for(Int_t k=0;k<9;k++) // to be improved - hardwired 9
684  {
685  for(Int_t m=0;m<4;m++) // to be improved - hardwired 4
686  {
688  {
689  for(Int_t pe=0;pe<1+(Int_t)fCalculateDiffFlowVsEta;pe++) // pt or eta
690  {
691  fReRPQ1dEBE[0][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
692  fImRPQ1dEBE[0][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
693  if(m==0) // s_{p,k} does not depend on index m
694  {
695  fs1dEBE[0][pe][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k),1.);
696  } // end of if(m==0) // s_{p,k} does not depend on index m
697  } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta
698  } // end of if(fCalculateDiffFlow)
700  {
701  fReRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
702  fImRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
703  if(m==0) // s_{p,k} does not depend on index m
704  {
705  fs2dEBE[0][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k),1.);
706  } // end of if(m==0) // s_{p,k} does not depend on index m
707  } // end of if(fCalculate2DDiffFlow)
708  } // end of for(Int_t m=0;m<4;m++) // to be improved - hardwired 4
709  } // end of for(Int_t k=0;k<9;k++) // to be improved - hardwired 9
710  // Checking if RP particle is also POI particle:
711  if(aftsTrack->InPOISelection())
712  {
713  // Calculate q_{m*n,k} and s_{p,k} ('q-vector' and 's' for RPs && POIs):
714  for(Int_t k=0;k<9;k++) // to be improved - hardwired 9
715  {
716  for(Int_t m=0;m<4;m++) // to be improved - hardwired 4
717  {
719  {
720  for(Int_t pe=0;pe<1+(Int_t)fCalculateDiffFlowVsEta;pe++) // pt or eta
721  {
722  fReRPQ1dEBE[2][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
723  fImRPQ1dEBE[2][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
724  if(m==0) // s_{p,k} does not depend on index m
725  {
726  fs1dEBE[2][pe][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k),1.);
727  } // end of if(m==0) // s_{p,k} does not depend on index m
728  } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta
729  } // end of if(fCalculateDiffFlow)
731  {
732  fReRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
733  fImRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
734  if(m==0) // s_{p,k} does not depend on index m
735  {
736  fs2dEBE[2][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k),1.);
737  } // end of if(m==0) // s_{p,k} does not depend on index m
738  } // end of if(fCalculate2DDiffFlow)
739  } // end of for(Int_t m=0;m<4;m++) // to be improved - hardwired 4
740  } // end of for(Int_t k=0;k<9;k++) // to be improved - hardwired 9
741  } // end of if(aftsTrack->InPOISelection())
742  } // end of if(fCalculateDiffFlow || fCalculate2DDiffFlow)
743 
744  } // end of if(pTrack->InRPSelection())
745 
746  // POIs ********************************************************************************************************
747 
748  if(aftsTrack->InPOISelection()) {
749  dPhi = aftsTrack->Phi();
750  dPt = aftsTrack->Pt();
751  dEta = aftsTrack->Eta();
752  dCharge = aftsTrack->Charge();
753  if (dCharge > 0.) cw = 0;
754  else if (dCharge < 0.) cw = 1;
755  wPhi = 1.;
756  wPt = 1.;
757  wEta = 1.;
758  wTrack = 1.;
759  wPhiEta = 1.;
760  // if(fUsePhiWeights && fPhiWeightsRPs && fnBinsPhi) // determine phi weight for POI:
761  // {
762  // wPhi = fPhiWeightsPOIs[cw]->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*fnBinsPhi/TMath::TwoPi())));
763  // }
764  // if(fUsePtWeights) // determine pt weight for POI:
765  // {
766  // wPt = 1.;
767  // }
768  // if(fUseEtaWeights && fEtaWeightsRPs && fEtaBinWidth) // determine eta weight for POI:
769  // {
770  // wEta = fEtaWeightsPOIs[cw]->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fEtaBinWidth)));
771  // }
772  if(fUsePhiEtaWeights && fPhiEtaWeights[cw]) // determine phieta weight for POI:
773  {
774  wPhiEta = fPhiEtaWeights[cw]->GetBinContent(fPhiEtaWeights[cw]->FindBin(dPhi,dEta));
775  }
777  if(dPt>0.2 && dPt<20.) wPhiEta = 1./fPtWeightsHist[fCenBin]->Interpolate(dPt);
778  else wPhiEta = 1.;
779  }
780  if(fUseEtaWeights && fEtaWeightsHist[fCenBin][0][0]) {
781  Int_t ptbin = GetCRCPtBin(dPt);
782  if(ptbin==-1) continue;
783  wPhiEta *= 1./fEtaWeightsHist[fCenBin][ptbin][cw]->GetBinContent(fEtaWeightsHist[fCenBin][ptbin][cw]->FindBin(dEta));
784  }
785 
786  ptEta[0] = dPt;
787  ptEta[1] = dEta;
788  // Calculate p_{m*n,k} ('p-vector' for POIs):
789  for(Int_t k=0;k<9;k++) // to be improved - hardwired 9
790  {
791  for(Int_t m=0;m<4;m++) // to be improved - hardwired 4
792  {
794  {
795  for(Int_t pe=0;pe<1+(Int_t)fCalculateDiffFlowVsEta;pe++) // pt or eta
796  {
797  fReRPQ1dEBE[1][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
798  fImRPQ1dEBE[1][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
799  } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta
800  } // end of if(fCalculateDiffFlow)
802  {
803  fReRPQ2dEBE[1][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
804  fImRPQ2dEBE[1][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
805  } // end of if(fCalculate2DDiffFlow)
806  } // end of for(Int_t m=0;m<4;m++) // to be improved - hardwired 4
807  } // end of for(Int_t k=0;k<9;k++) // to be improved - hardwired 9
808 
809  // Charge-Rapidity Correlations
810  for (Int_t h=0;h<fCRCnHar;h++) {
811 
812  fCRCQRe[cw][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
813  fCRCQIm[cw][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
814  fCRCMult[cw][h]->Fill(dEta,wPhiEta);
815 
816  fCRC2QRe[cw][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
817  fCRC2QIm[cw][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
818  fCRC2Mul[cw][h]->Fill(dEta,wPhiEta);
819 
820  fCRCZDCQRe[cw][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
821  fCRCZDCQIm[cw][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
822  fCRCZDCMult[cw][h]->Fill(dEta,wPhiEta);
823 
824  if(gRandom->Integer(2)>0.5) {
825  fCRC2QRe[2][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
826  fCRC2QIm[2][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
827  fCRC2Mul[2][h]->Fill(dEta,wPhiEta);
828  }
829 
830  if(gRandom->Integer(2)>0.5) {
831  fCRCZDCQRe[2][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
832  fCRCZDCQIm[2][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
833  fCRCZDCMult[2][h]->Fill(dEta,wPhiEta);
834  } else {
835  fCRCZDCQRe[3][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
836  fCRCZDCQIm[3][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
837  fCRCZDCMult[3][h]->Fill(dEta,wPhiEta);
838  }
839 
840  if(fCalculateCME) {
841  Double_t SpecWeig = 1.;
842  if(fUseZDCESESpecWeights && fZDCESESpecWeightsHist[fZDCESEclEbE] && dPt>0.2 && dPt<20.) {
844  if(std::isfinite(1./weraw)) SpecWeig = 1./weraw;
845  }
846  fCMEQRe[cw][h]->Fill(dEta,SpecWeig*wPhiEta*TMath::Cos((h+1.)*dPhi));
847  fCMEQIm[cw][h]->Fill(dEta,SpecWeig*wPhiEta*TMath::Sin((h+1.)*dPhi));
848  fCMEMult[cw][h]->Fill(dEta,SpecWeig*wPhiEta);
849  fCMEQRe[2+cw][h]->Fill(dEta,pow(SpecWeig*wPhiEta,2.)*TMath::Cos((h+1.)*dPhi));
850  fCMEQIm[2+cw][h]->Fill(dEta,pow(SpecWeig*wPhiEta,2.)*TMath::Sin((h+1.)*dPhi));
851  fCMEMult[2+cw][h]->Fill(dEta,pow(SpecWeig*wPhiEta,2.));
852 
853  // spectra
854  fhCenvsSpec[fZDCESEclEbE]->Fill(fCentralityEBE,dPt,SpecWeig*wPhiEta);
855  fhCenvsSpec[fZDCESEnCl]->Fill(fCentralityEBE,dPt,SpecWeig*wPhiEta);
856  }
857 
858  } // end of for (Int_t h=0;h<fCRCnHar;h++)
859 
860  // Flow SP ZDC
861  for (Int_t k=0; k<fQVecPower; k++) {
862  for (Int_t h=0;h<fFlowNHarmMax;h++) {
863  fPtDiffQRe[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
864  fPtDiffQIm[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
865  fPtDiffMul[k][h]->Fill(dPt,pow(wPhiEta,k));
866  if(fabs(dEta)>fFlowQCDeltaEta/2.) {
867  Int_t keta = (dEta<0.?0:1);
868  fPtDiffQReEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
869  fPtDiffQImEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
870  fPtDiffMulEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k));
871  }
872  }
873  }
874 
875  for (Int_t h=0;h<fFlowNHarmMax;h++) {
876  fEtaDiffQRe[h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
877  fEtaDiffQIm[h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
878  fEtaDiffMul[h]->Fill(dEta,wPhiEta);
879  }
880 
881  if(fUsePhiEtaWeights && fCRCPhiHist[fRunBin][fCenBin][cw]) {
882  fCRCPhiHist[fRunBin][fCenBin][cw]->Fill(dPt,dEta,wPhiEta);
883  }
884 
886 
887  fFlowSPZDCIntPro[fRunBin][0][4]->Fill(fCentralityEBE,TMath::Cos(2.*dPhi)*(ZARe*ZCRe-ZAIm*ZCIm)+TMath::Sin(2.*dPhi)*(ZARe*ZCIm+ZCRe*ZAIm),ZCM*ZAM);
888  fFlowSPZDCIntPro[fRunBin][0][5]->Fill(fCentralityEBE,TMath::Cos(2.*dPhi)*(ZARe*ZCRe-ZAIm*ZCIm)+TMath::Sin(2.*dPhi)*(ZARe*ZCIm+ZCRe*ZAIm));
889  fFlowSPZDCIntPro[fRunBin][0][6]->Fill(fCentralityEBE,TMath::Cos(2.*dPhi)*(ZARe*ZCRe-ZAIm*ZCIm)+TMath::Sin(2.*dPhi)*(ZARe*ZCIm+ZCRe*ZAIm),wPhiEta*ZCM*ZAM);
890  fFlowSPZDCIntPro[fRunBin][0][7]->Fill(fCentralityEBE,TMath::Cos(2.*dPhi)*(ZARe*ZCRe-ZAIm*ZCIm)+TMath::Sin(2.*dPhi)*(ZARe*ZCIm+ZCRe*ZAIm),wPhiEta);
891 
892  if(!fQAZDCCuts || (fQAZDCCuts && fQAZDCCutsFlag)) {
893  fFlowQCSpectra[fCenBin]->Fill(dPt,wPhiEta);
895  fFlowQCCenSpec[fZDCESEclEbE]->Fill(dPt,fCentralityEBE,wPhiEta);
897  }
898  }
899  }
900 
901  if(fCalculateEbEFlow) {
902  if(fEBEFlowMulBin>=0) fEbEFlowAzimDis[fEBEFlowMulBin]->Fill(dPhi,wPhiEta);
903  }
904 
905  } // end of if(pTrack->InPOISelection())
906  } else // to if(aftsTrack)
907  {
908  printf("\n WARNING (QC): No particle (i.e. aftsTrack is a NULL pointer in AFAWQC::Make())!!!!\n\n");
909  }
910  } // end of for(Int_t i=0;i<nPrim;i++)
911 
912  // ************************************************************************************************************
913 
914 
915  // e) Calculate the final expressions for S_{p,k} and s_{p,k} (important !!!!):
916  for(Int_t p=0;p<8;p++)
917  {
918  for(Int_t k=0;k<9;k++)
919  {
920  (*fSpk)(p,k)=pow((*fSpk)(p,k),p+1);
921  }
922  }
923 
924  // f) Call the methods which calculate correlations for reference flow:
926  {
928  {
929  if(fNumberOfRPsEBE>1){this->CalculateIntFlowCorrelations();} // without using particle weights
930  } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights||fUseTrackWeights))
931  {
932  if(fNumberOfRPsEBE>1){this->CalculateIntFlowCorrelationsUsingParticleWeights();} // with using particle weights
933  }
934  // Whether or not using particle weights the following is calculated in the same way:
938  // Non-isotropic terms:
940  {
943  } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights||fUseTrackWeights))
944  {
947  }
948  // Whether or not using particle weights the following is calculated in the same way:
952  // Mixed harmonics:
954  } // end of if(!fEvaluateIntFlowNestedLoops)
955 
956  // g) Call the methods which calculate correlations for differential flow:
958  {
960  {
961  // Without using particle weights:
962  this->CalculateDiffFlowCorrelations("RP","Pt");
964  this->CalculateDiffFlowCorrelations("POI","Pt");
966  // Non-isotropic terms:
975  } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights||fUseTrackWeights))
976  {
977  // With using particle weights:
982  // Non-isotropic terms:
991  }
992  // Whether or not using particle weights the following is calculated in the same way:
995  this->CalculateDiffFlowProductOfCorrelations("POI","Pt");
997  this->CalculateDiffFlowSumOfEventWeights("RP","Pt");
999  this->CalculateDiffFlowSumOfEventWeights("POI","Pt");
1005  } // end of if(!fEvaluateDiffFlowNestedLoops && fCalculateDiffFlow)
1006 
1007  // h) Call the methods which calculate correlations for 2D differential flow:
1009  {
1011  {
1012  // Without using particle weights:
1013  this->Calculate2DDiffFlowCorrelations("RP");
1014  this->Calculate2DDiffFlowCorrelations("POI");
1015  // Non-isotropic terms:
1016  // ... to be ctd ...
1017  } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights||fUseTrackWeights))
1018  {
1019  // With using particle weights:
1020  // ... to be ctd ...
1021  // Non-isotropic terms:
1022  // ... to be ctd ...
1023  }
1024  // Whether or not using particle weights the following is calculated in the same way:
1025  // ... to be ctd ...
1026  } // end of if(!fEvaluateDiffFlowNestedLoops && fCalculate2DDiffFlow)
1027 
1028  // i) Call the methods which calculate other differential correlators:
1030  {
1032  {
1033  // Without using particle weights:
1034  this->CalculateOtherDiffCorrelators("RP","Pt");
1036  this->CalculateOtherDiffCorrelators("POI","Pt");
1038  } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights||fUseTrackWeights))
1039  {
1040  // With using particle weights:
1041  // ... to be ctd ...
1042  }
1043  // Whether or not using particle weights the following is calculated in the same way:
1044  // ... to be ctd ...
1045  } // end of if(!fEvaluateDiffFlowNestedLoops)
1046 
1047  // i.2) Calculate CRC quantities:
1048  if(fCalculateCRC) {
1049  if(fUseCRCRecenter) this->RecenterCRCQVec();
1050  if(fCalculateCRC2) this->CalculateCRCCorr();
1051  if(fCalculateCRC2) this->CalculateCRC2Cor();
1053  if(fCalculateCRCZDC && fUseZDC) this->CalculateCRCZDC();
1054  if(fCalculateCRCPt) this->CalculateCRCPtCorr();
1055 // if(fUseVZERO && fUseZDC) this->CalculateVZvsZDC();
1056  if(fCalculateCME && fUseZDC) {
1057  this->CalculateCMETPC();
1058  this->CalculateCMEZDC();
1059  }
1060  }
1061  if(fCalculateFlowQC) this->CalculateFlowQC();
1064  if(fCalculateEbEFlow) this->FitEbEFlow();
1065 
1066  // j) Distributions of correlations:
1068 
1069  // l) Cross-check with nested loops correlators for reference flow:
1071 
1072  // m) Cross-check with nested loops correlators for differential flow:
1074 
1075  // n) Store multiplicity in various:
1076  if(fStoreVarious) this->FillVarious();
1077 
1078  // o) Reset all event-by-event quantities (very important !!!!):
1080 
1081  // p) cache run number
1083 
1084  fQAZDCCutsFlag = kTRUE;
1085  // printf("Make done \n");
1086 
1087 } // end of AliFlowAnalysisCRC::Make(AliFlowEventSimple* anEvent)
1088 
1089 //=======================================================================================================================
1090 
1092 {
1093  // Calculate the final results.
1094 
1095  // a) Check all pointers used in this method;
1096  // b) Access the constants;
1097  // c) Access the flags;
1098  // d) Calculate reference cumulants (not corrected for detector effects);
1099  // e) Correct reference cumulants for detector effects;
1100  // f) Calculate reference flow;
1101  // g) Store results for reference flow in AliFlowCommonHistResults and print them on the screen;
1102  // h) Calculate the final results for differential flow (without/with weights);
1103  // i) Correct the results for differential flow (without/with weights) for effects of non-uniform acceptance (NUA);
1104  // j) Calculate the final results for integrated flow (RP/POI) and store in AliFlowCommonHistResults;
1105  // k) Store results for differential flow in AliFlowCommonHistResults;
1106  // l) Print the final results for integrated flow (RP/POI) on the screen;
1107  // m) Cross-checking: Results from Q-vectors vs results from nested loops;
1108  // n) Calculate cumulants for mixed harmonics;
1109  // o) Calculate charge-rapidity correlations;
1110  // p) Calculate cumulants for bootstrap;
1111  // q) Finalize various;
1112 
1113  // a) Check all pointers used in this method:
1114  this->CheckPointersUsedInFinish();
1115 
1116  // b) Access the constants:
1117  this->CommonConstants("Finish");
1118 
1120  fHarmonic = (Int_t)(fCommonHists->GetHarmonic())->GetBinContent(1);
1121  }
1122 
1123  // c) Access the flags: // tbi (implement a method for this? should I store again the flags because they can get modified with redoFinish?)
1124  fUsePhiWeights = (Bool_t)fUseParticleWeights->GetBinContent(1);
1125  fUsePtWeights = (Bool_t)fUseParticleWeights->GetBinContent(2);
1126  fUseEtaWeights = (Bool_t)fUseParticleWeights->GetBinContent(3);
1127  fUseTrackWeights = (Bool_t)fUseParticleWeights->GetBinContent(4);
1128  fUsePhiEtaWeights = (Bool_t)fUseParticleWeights->GetBinContent(5);
1129  fApplyCorrectionForNUA = (Bool_t)fIntFlowFlags->GetBinContent(3);
1130  fPrintFinalResults[0] = (Bool_t)fIntFlowFlags->GetBinContent(4);
1131  fPrintFinalResults[1] = (Bool_t)fIntFlowFlags->GetBinContent(5);
1132  fPrintFinalResults[2] = (Bool_t)fIntFlowFlags->GetBinContent(6);
1133  fPrintFinalResults[3] = (Bool_t)fIntFlowFlags->GetBinContent(7);
1134  fApplyCorrectionForNUAVsM = (Bool_t)fIntFlowFlags->GetBinContent(8);
1135  fPropagateErrorAlsoFromNIT = (Bool_t)fIntFlowFlags->GetBinContent(9);
1136  fCalculateCumulantsVsM = (Bool_t)fIntFlowFlags->GetBinContent(10);
1137  fMinimumBiasReferenceFlow = (Bool_t)fIntFlowFlags->GetBinContent(11);
1138  fForgetAboutCovariances = (Bool_t)fIntFlowFlags->GetBinContent(12);
1139  fStoreVarious = (Bool_t)fIntFlowFlags->GetBinContent(13);
1140  fFillMultipleControlHistograms = (Bool_t)fIntFlowFlags->GetBinContent(14);
1141  fCalculateAllCorrelationsVsM = (Bool_t)fIntFlowFlags->GetBinContent(15);
1142  fUse2DHistograms = (Bool_t)fIntFlowFlags->GetBinContent(18);
1143  fFillProfilesVsMUsingWeights = (Bool_t)fIntFlowFlags->GetBinContent(19);
1144  fUseQvectorTerms = (Bool_t)fIntFlowFlags->GetBinContent(20);
1147  fCrossCheckInPtBinNo = (Int_t)fEvaluateNestedLoops->GetBinContent(3);
1148  fCrossCheckInEtaBinNo = (Int_t)fEvaluateNestedLoops->GetBinContent(4);
1150  //fHarmonic = (Int_t)fMixedHarmonicsFlags->GetBinContent(2); // TBI should I add inpdependent generic harmonic here?
1152  fUseBootstrap = (Bool_t)fBootstrapFlags->GetBinContent(1);
1153  fUseBootstrapVsM = (Bool_t)fBootstrapFlags->GetBinContent(2);
1154  fnSubsamples = (Int_t)fBootstrapFlags->GetBinContent(3);
1155 
1156  // d) Calculate reference cumulants (not corrected for detector effects):
1159  this->CalculateCumulantsIntFlow();
1160 
1161  // e) Correct reference cumulants for detector effects:
1165 
1166  // f) Calculate reference flow:
1167  this->CalculateReferenceFlow();
1168 
1169  // g) Store results for reference flow in AliFlowCommonHistResults and print them on the screen:
1173 
1174  // h) Calculate the final results for differential flow (without/with weights):
1175  if(fCalculateDiffFlow)
1176  {
1177  this->FinalizeReducedCorrelations("RP","Pt");
1179  this->FinalizeReducedCorrelations("POI","Pt");
1180  if(fCalculateDiffFlowVsEta){this->FinalizeReducedCorrelations("POI","Eta");}
1181  this->CalculateDiffFlowCovariances("RP","Pt");
1183  this->CalculateDiffFlowCovariances("POI","Pt");
1184  if(fCalculateDiffFlowVsEta){this->CalculateDiffFlowCovariances("POI","Eta");}
1185  this->CalculateDiffFlowCumulants("RP","Pt");
1186  if(fCalculateDiffFlowVsEta){this->CalculateDiffFlowCumulants("RP","Eta");}
1187  this->CalculateDiffFlowCumulants("POI","Pt");
1188  if(fCalculateDiffFlowVsEta){this->CalculateDiffFlowCumulants("POI","Eta");}
1189  this->CalculateDiffFlow("RP","Pt");
1190  if(fCalculateDiffFlowVsEta){this->CalculateDiffFlow("RP","Eta");}
1191  this->CalculateDiffFlow("POI","Pt");
1192  if(fCalculateDiffFlowVsEta){this->CalculateDiffFlow("POI","Eta");}
1193  } // if(fCalculateDiffFlow)
1194 
1195  // i) Correct the results for differential flow (without/with weights) for effects of non-uniform acceptance (NUA):
1196  if(fCalculateDiffFlow)
1197  {
1198  this->FinalizeCorrectionTermsForNUADiffFlow("RP","Pt");
1200  this->FinalizeCorrectionTermsForNUADiffFlow("POI","Pt");
1207  {
1208  this->CalculateDiffFlowCorrectedForNUA("RP","Pt");
1210  this->CalculateDiffFlowCorrectedForNUA("POI","Pt");
1212  }
1213  } // end of if(fCalculateDiffFlow && fApplyCorrectionForNUA)
1214 
1215  // i) Calcualate final results for 2D differential flow:
1217  {
1218  this->Calculate2DDiffFlowCumulants("RP");
1219  this->Calculate2DDiffFlowCumulants("POI");
1220  this->Calculate2DDiffFlow("RP");
1221  this->Calculate2DDiffFlow("POI");
1222  } // end of if(fCalculate2DDiffFlow)
1223 
1224  // j) Calculate the final results for integrated flow (RP/POI) and store in AliFlowCommonHistResults:
1225  if(fCalculateDiffFlow)
1226  {
1229  }
1230 
1231  // k) Store results for differential flow in AliFlowCommonHistResults:
1232  if(fCalculateDiffFlow)
1233  {
1234  this->FillCommonHistResultsDiffFlow("RP");
1235  this->FillCommonHistResultsDiffFlow("POI");
1236  }
1237 
1238  // l) Print the final results for integrated flow (RP/POI) on the screen:
1241 
1242  // m) Cross-checking: Results from Q-vectors vs results from nested loops:
1243  // m1) Reference flow:
1245  {
1250  } // end of if(fEvaluateIntFlowNestedLoops)
1251  // m2) Differential flow:
1253  {
1254  // Correlations:
1256  this->CrossCheckDiffFlowCorrelations("RP","Pt");
1258  this->CrossCheckDiffFlowCorrelations("POI","Pt");
1260  // Correction terms for non-uniform acceptance:
1261  this->CrossCheckDiffFlowCorrectionTermsForNUA("RP","Pt");
1263  this->CrossCheckDiffFlowCorrectionTermsForNUA("POI","Pt");
1265  // Other differential correlators:
1266  this->CrossCheckOtherDiffCorrelators("RP","Pt");
1268  this->CrossCheckOtherDiffCorrelators("POI","Pt");
1270  } // end of if(fEvaluateDiffFlowNestedLoops)
1271 
1272  // n) Calculate cumulants for mixed harmonics:
1274 
1275  // o) Calculate charge-rapidity correlations:
1276  if(fCalculateCRC) {
1277  if(fCalculateCRC2) this->FinalizeCRCCorr();
1278  if(fCalculateCRC2) this->FinalizeCRC2Cor();
1280  if(fCalculateCRCZDC && fUseZDC) this->FinalizeCRCZDC();
1281  if(fCalculateCRCPt) this->FinalizeCRCPtCorr();
1282  if(fCalculateCME && fUseZDC) {
1283  this->FinalizeCMETPC();
1284  this->FinalizeCMEZDC();
1285  }
1286  }
1287  if(fCalculateFlowQC) this->FinalizeFlowQC();
1290 
1291  // p) Calculate cumulants for bootstrap:
1293 
1294  // q) Finalize various:
1295  if(fStoreVarious) this->FinalizeVarious();
1296 
1297 } // end of AliFlowAnalysisCRC::Finish()
1298 
1299 //=======================================================================================================================
1300 
1302 {
1303  // Evaluate all correlators for reference flow with nested loops.
1304 
1305  Int_t nPrim = anEvent->NumberOfTracks(); // number of primaries
1306  if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10
1307  {
1308  // Without using particle weights:
1310  {
1311  // Correlations:
1312  this->CalculateIntFlowCorrelations(); // from Q-vectors
1313  this->EvaluateIntFlowCorrelationsWithNestedLoops(anEvent); // from nested loops (TBI: do I have to pass here anEvent or not?)
1314  // Correction for non-uniform acceptance:
1315  this->CalculateIntFlowCorrectionsForNUASinTerms(); // from Q-vectors (sin terms)
1316  this->CalculateIntFlowCorrectionsForNUACosTerms(); // from Q-vectors (cos terms)
1317  this->EvaluateIntFlowCorrectionsForNUAWithNestedLoops(anEvent); // from nested loops (both sin and cos terms)
1318  // Mixed harmonics:
1320  {
1321  this->CalculateMixedHarmonics(); // from Q-vectors
1322  this->EvaluateMixedHarmonicsWithNestedLoops(anEvent); // from nested loops (TBI: do I have to pass here anEvent or not?)
1323  } // end of if(fCalculateMixedHarmonics)
1324  }
1325  // Using particle weights:
1327  {
1328  // Correlations
1329  this->CalculateIntFlowCorrelationsUsingParticleWeights(); // from Q-vectors
1330  this->EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent); // from nested loops (to be improved: do I have to pass here anEvent or not?)
1331  // Correction for non-uniform acceptance:
1332  this->CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights(); // from Q-vectors (sin terms)
1333  this->CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights(); // from Q-vectors (cos terms)
1334  this->EvaluateIntFlowCorrectionsForNUAWithNestedLoopsUsingParticleWeights(anEvent); // from nested loops (both sin and cos terms)
1335  }
1336  } else if(nPrim>fMaxAllowedMultiplicity) // to if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity)
1337  {
1338  cout<<endl;
1339  cout<<"Skipping the event because multiplicity is "<<nPrim<<". Too high to evaluate nested loops!"<<endl;
1340  } else
1341  {
1342  cout<<endl;
1343  cout<<"Skipping the event because multiplicity is "<<nPrim<<"."<<endl;
1344  }
1345 
1346 } // end of void AliFlowAnalysisCRC::EvaluateIntFlowNestedLoops(AliFlowEventSimple* anEvent)
1347 
1348 //=======================================================================================================================
1349 
1351 {
1352  // Evalauted all correlators for differential flow with nested loops.
1353 
1354  if(!fCalculateDiffFlow){return;}
1355 
1356  Int_t nPrim = anEvent->NumberOfTracks(); // number of primaries
1357  if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10
1358  {
1359  // Without using particle weights:
1361  {
1362  // 1.) Reduced correlations:
1363  // Q-vectors:
1364  this->CalculateDiffFlowCorrelations("RP","Pt");
1365  this->CalculateDiffFlowCorrelations("RP","Eta");
1366  this->CalculateDiffFlowCorrelations("POI","Pt");
1367  this->CalculateDiffFlowCorrelations("POI","Eta");
1368  // Nested loops:
1369  this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"RP","Pt");
1370  this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"RP","Eta");
1371  this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"POI","Pt");
1372  this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"POI","Eta");
1373  // 2.) Reduced corrections for non-uniform acceptance:
1374  // Q-vectors:
1378  this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Eta");
1382  this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Eta");
1383  // Nested loops:
1385  this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"RP","Eta");
1386  this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"POI","Pt");
1387  this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"POI","Eta");
1388  // 3.) Other differential correlators:
1389  // Q-vectors:
1390  this->CalculateOtherDiffCorrelators("RP","Pt");
1391  this->CalculateOtherDiffCorrelators("RP","Eta");
1392  this->CalculateOtherDiffCorrelators("POI","Pt");
1393  this->CalculateOtherDiffCorrelators("POI","Eta");
1394  // Nested loops:
1395  this->EvaluateOtherDiffCorrelatorsWithNestedLoops(anEvent,"RP","Pt");
1396  this->EvaluateOtherDiffCorrelatorsWithNestedLoops(anEvent,"RP","Eta");
1397  this->EvaluateOtherDiffCorrelatorsWithNestedLoops(anEvent,"POI","Pt");
1398  this->EvaluateOtherDiffCorrelatorsWithNestedLoops(anEvent,"POI","Eta");
1399  } // end of if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights||fUseTrackWeights))
1400  // Using particle weights:
1402  {
1423  } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights||fUseTrackWeights)
1424  } // end of if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10
1425 
1426 } // end of void AliFlowAnalysisCRC::EvaluateDiffFlowNestedLoops(AliFlowEventSimple* anEvent)
1427 
1428 //=======================================================================================================================
1429 
1431 {
1432  // Calculate correction terms for non-uniform acceptance of the detector for reference flow (cos terms).
1433 
1434  // multiplicity:
1435  Double_t dMult = (*fSpk)(0,0);
1436 
1437  // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n:
1438  Double_t dReQ1n = (*fReQ)(0,0);
1439  Double_t dReQ2n = (*fReQ)(1,0);
1440  //Double_t dReQ3n = (*fReQ)(2,0);
1441  //Double_t dReQ4n = (*fReQ)(3,0);
1442  Double_t dImQ1n = (*fImQ)(0,0);
1443  Double_t dImQ2n = (*fImQ)(1,0);
1444  //Double_t dImQ3n = (*fImQ)(2,0);
1445  //Double_t dImQ4n = (*fImQ)(3,0);
1446 
1447  // Multiplicity bin of an event (relevant for all histos vs M):
1448  Double_t dMultiplicityBin = 0.;
1450  {
1451  dMultiplicityBin = fNumberOfRPsEBE+0.5;
1453  {
1454  dMultiplicityBin = fReferenceMultiplicityEBE+0.5;
1456  {
1457  dMultiplicityBin = fNumberOfPOIsEBE+0.5;
1458  }
1459 
1460  // *************************************************************
1461  // **** corrections for non-uniform acceptance (cos terms): ****
1462  // *************************************************************
1463  //
1464  // Remark 1: corrections for non-uniform acceptance (cos terms) calculated with non-weighted Q-vectors
1465  // are stored in 1D profile fQCorrectionsCos.
1466  // Remark 2: binning of fIntFlowCorrectionTermsForNUAPro[1] is organized as follows:
1467  // --------------------------------------------------------------------------------------------------------------------
1468  // 1st bin: <<cos(n*(phi1))>> = cosP1n
1469  // 2nd bin: <<cos(n*(phi1+phi2))>> = cosP1nP1n
1470  // 3rd bin: <<cos(n*(phi1-phi2-phi3))>> = cosP1nM1nM1n
1471  // 4th bin: <<cos(n*(2phi1-phi2))>> = cosP2nM1n
1472  // --------------------------------------------------------------------------------------------------------------------
1473 
1474  // 1-particle:
1475  Double_t cosP1n = 0.; // <<cos(n*(phi1))>>
1476 
1477  if(dMult>0)
1478  {
1479  cosP1n = dReQ1n/dMult;
1480 
1481  // average non-weighted 1-particle correction (cos terms) for non-uniform acceptance for single event:
1482  fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(1,cosP1n);
1483  // event weights for NUA terms:
1484  fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(1,dMult);
1485 
1486  // final average non-weighted 1-particle correction (cos terms) for non-uniform acceptance for all events:
1487  fIntFlowCorrectionTermsForNUAPro[1]->Fill(0.5,cosP1n,dMult);
1488  if(fCalculateCumulantsVsM){fIntFlowCorrectionTermsForNUAVsMPro[1][0]->Fill(dMultiplicityBin,cosP1n,dMult);}
1489  }
1490 
1491  // 2-particle:
1492  Double_t cosP1nP1n = 0.; // <<cos(n*(phi1+phi2))>>
1493  Double_t cosP2nM1n = 0.; // <<cos(n*(2phi1-phi2))>>
1494 
1495  if(dMult>1)
1496  {
1497  cosP1nP1n = (pow(dReQ1n,2)-pow(dImQ1n,2)-dReQ2n)/(dMult*(dMult-1));
1498  cosP2nM1n = (dReQ2n*dReQ1n+dImQ2n*dImQ1n-dReQ1n)/(dMult*(dMult-1));
1499 
1500  // average non-weighted 2-particle correction (cos terms) for non-uniform acceptance for single event:
1501  fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(2,cosP1nP1n);
1502  fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(4,cosP2nM1n);
1503  // event weights for NUA terms:
1504  fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(2,dMult*(dMult-1));
1505  fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(4,dMult*(dMult-1));
1506 
1507  // final average non-weighted 2-particle correction (cos terms) for non-uniform acceptance for all events:
1508  fIntFlowCorrectionTermsForNUAPro[1]->Fill(1.5,cosP1nP1n,dMult*(dMult-1));
1509  fIntFlowCorrectionTermsForNUAPro[1]->Fill(3.5,cosP2nM1n,dMult*(dMult-1));
1511  {
1512  fIntFlowCorrectionTermsForNUAVsMPro[1][1]->Fill(dMultiplicityBin,cosP1nP1n,dMult*(dMult-1));
1513  fIntFlowCorrectionTermsForNUAVsMPro[1][3]->Fill(dMultiplicityBin,cosP2nM1n,dMult*(dMult-1));
1514  }
1515  }
1516 
1517  // 3-particle:
1518  Double_t cosP1nM1nM1n = 0.; // <<cos(n*(phi1-phi2-phi3))>>
1519 
1520  if(dMult>2)
1521  {
1522  cosP1nM1nM1n = (dReQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))-dReQ1n*dReQ2n-dImQ1n*dImQ2n-2.*(dMult-1)*dReQ1n)
1523  / (dMult*(dMult-1)*(dMult-2));
1524 
1525  // average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for single event:
1526  fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(3,cosP1nM1nM1n);
1527  // event weights for NUA terms:
1528  fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(3,dMult*(dMult-1)*(dMult-2));
1529 
1530  // final average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for all events:
1531  fIntFlowCorrectionTermsForNUAPro[1]->Fill(2.5,cosP1nM1nM1n,dMult*(dMult-1)*(dMult-2));
1532  if(fCalculateCumulantsVsM){fIntFlowCorrectionTermsForNUAVsMPro[1][2]->Fill(dMultiplicityBin,cosP1nM1nM1n,dMult*(dMult-1)*(dMult-2));}
1533  }
1534 
1535 } // end of AliFlowAnalysisCRC::CalculateIntFlowCorrectionsForNUACosTerms()
1536 
1537 //=======================================================================================================================
1538 
1540 {
1541  // calculate corrections for non-uniform acceptance of the detector for no-name integrated flow (sin terms)
1542 
1543  // multiplicity:
1544  Double_t dMult = (*fSpk)(0,0);
1545 
1546  // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n:
1547  Double_t dReQ1n = (*fReQ)(0,0);
1548  Double_t dReQ2n = (*fReQ)(1,0);
1549  //Double_t dReQ3n = (*fReQ)(2,0);
1550  //Double_t dReQ4n = (*fReQ)(3,0);
1551  Double_t dImQ1n = (*fImQ)(0,0);
1552  Double_t dImQ2n = (*fImQ)(1,0);
1553  //Double_t dImQ3n = (*fImQ)(2,0);
1554  //Double_t dImQ4n = (*fImQ)(3,0);
1555 
1556  // Multiplicity bin of an event (relevant for all histos vs M):
1557  Double_t dMultiplicityBin = 0.;
1559  {
1560  dMultiplicityBin = fNumberOfRPsEBE+0.5;
1562  {
1563  dMultiplicityBin = fReferenceMultiplicityEBE+0.5;
1565  {
1566  dMultiplicityBin = fNumberOfPOIsEBE+0.5;
1567  }
1568 
1569  // *************************************************************
1570  // **** corrections for non-uniform acceptance (sin terms): ****
1571  // *************************************************************
1572  //
1573  // Remark 1: corrections for non-uniform acceptance (sin terms) calculated with non-weighted Q-vectors
1574  // are stored in 1D profile fQCorrectionsSin.
1575  // Remark 2: binning of fIntFlowCorrectionTermsForNUAPro[0] is organized as follows:
1576  // --------------------------------------------------------------------------------------------------------------------
1577  // 1st bin: <<sin(n*(phi1))>> = sinP1n
1578  // 2nd bin: <<sin(n*(phi1+phi2))>> = sinP1nP1n
1579  // 3rd bin: <<sin(n*(phi1-phi2-phi3))>> = sinP1nM1nM1n
1580  // 4th bin: <<sin(n*(2phi1-phi2))>> = sinP2nM1n
1581  // --------------------------------------------------------------------------------------------------------------------
1582 
1583  // 1-particle:
1584  Double_t sinP1n = 0.; // <sin(n*(phi1))>
1585 
1586  if(dMult>0)
1587  {
1588  sinP1n = dImQ1n/dMult;
1589 
1590  // average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for single event:
1591  fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(1,sinP1n);
1592  // event weights for NUA terms:
1593  fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(1,dMult);
1594 
1595  // final average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for all events:
1596  fIntFlowCorrectionTermsForNUAPro[0]->Fill(0.5,sinP1n,dMult);
1597  if(fCalculateCumulantsVsM){fIntFlowCorrectionTermsForNUAVsMPro[0][0]->Fill(dMultiplicityBin,sinP1n,dMult);}
1598  }
1599 
1600  // 2-particle:
1601  Double_t sinP1nP1n = 0.; // <<sin(n*(phi1+phi2))>>
1602  Double_t sinP2nM1n = 0.; // <<sin(n*(2phi1-phi2))>>
1603  if(dMult>1)
1604  {
1605  sinP1nP1n = (2.*dReQ1n*dImQ1n-dImQ2n)/(dMult*(dMult-1));
1606  sinP2nM1n = (dImQ2n*dReQ1n-dReQ2n*dImQ1n-dImQ1n)/(dMult*(dMult-1));
1607 
1608  // average non-weighted 2-particle correction (sin terms) for non-uniform acceptance for single event:
1609  fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(2,sinP1nP1n);
1610  fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(4,sinP2nM1n);
1611  // event weights for NUA terms:
1612  fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(2,dMult*(dMult-1));
1613  fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(4,dMult*(dMult-1));
1614 
1615  // final average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for all events:
1616  fIntFlowCorrectionTermsForNUAPro[0]->Fill(1.5,sinP1nP1n,dMult*(dMult-1));
1617  fIntFlowCorrectionTermsForNUAPro[0]->Fill(3.5,sinP2nM1n,dMult*(dMult-1));
1619  {
1620  fIntFlowCorrectionTermsForNUAVsMPro[0][1]->Fill(dMultiplicityBin,sinP1nP1n,dMult*(dMult-1));
1621  fIntFlowCorrectionTermsForNUAVsMPro[0][3]->Fill(dMultiplicityBin,sinP2nM1n,dMult*(dMult-1));
1622  }
1623  }
1624 
1625  // 3-particle:
1626  Double_t sinP1nM1nM1n = 0.; // <<sin(n*(phi1-phi2-phi3))>>
1627 
1628  if(dMult>2)
1629  {
1630  sinP1nM1nM1n = (-dImQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))+dReQ1n*dImQ2n-dImQ1n*dReQ2n+2.*(dMult-1)*dImQ1n)
1631  / (dMult*(dMult-1)*(dMult-2));
1632 
1633  // average non-weighted 3-particle correction (sin terms) for non-uniform acceptance for single event:
1634  fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(3,sinP1nM1nM1n);
1635  // event weights for NUA terms:
1636  fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(3,dMult*(dMult-1)*(dMult-2));
1637 
1638  // final average non-weighted 3-particle correction (sin terms) for non-uniform acceptance for all events:
1639  fIntFlowCorrectionTermsForNUAPro[0]->Fill(2.5,sinP1nM1nM1n,dMult*(dMult-1)*(dMult-2));
1640  if(fCalculateCumulantsVsM){fIntFlowCorrectionTermsForNUAVsMPro[0][2]->Fill(dMultiplicityBin,sinP1nM1nM1n,dMult*(dMult-1)*(dMult-2));}
1641  }
1642 
1643 } // end of AliFlowAnalysisCRC::CalculateIntFlowCorrectionsForNUASinTerms()
1644 
1645 //=======================================================================================================================
1646 
1648 {
1649  // a) Get pointers for common control and common result histograms;
1650  // b) Get pointers for histograms holding particle weights;
1651  // c) Get pointers for reference flow histograms;
1652  // d) Get pointers for differential flow histograms;
1653  // e) Get pointers for 2D differential flow histograms;
1654  // f) Get pointers for other differential correlators;
1655  // g) Get pointers for mixed harmonics histograms;
1656  // h) Get pointers for nested loops' histograms;
1657  // i) Get pointers for control histograms;
1658  // j) Get pointers for bootstrap.
1659  // k) Get pointers for CRC histograms;
1660 
1661  if(outputListHistos)
1662  {
1663  this->SetHistList(outputListHistos);
1664  if(!fHistList)
1665  {
1666  printf("\n WARNING (QC): fHistList is NULL in AFAWQC::GOH() !!!!\n\n");
1667  exit(0);
1668  }
1678  this->GetPointersForBootstrap();
1679  this->GetPointersForCRC();
1680  this->GetPointersForCRCVZ();
1681  this->GetPointersForCRCZDC();
1682  this->GetPointersForCRCPt();
1683  this->GetPointersForCRC2();
1684  this->GetPointersForQVec();
1685  this->GetPointersForCME();
1686  this->GetPointersForFlowQC();
1687  this->GetPointersForFlowSPZDC();
1688  this->GetPointersForFlowSPVZ();
1689  this->GetPointersForEbEFlow();
1690  this->GetPointersForVarious();
1691  } else
1692  {
1693  printf("\n WARNING (QC): outputListHistos is NULL in AFAWQC::GOH() !!!!\n\n");
1694  exit(0);
1695  }
1696 
1697 } // end of void AliFlowAnalysisCRC::GetOutputHistograms(TList *outputListHistos)
1698 
1699 //=======================================================================================================================
1700 
1701 TProfile* AliFlowAnalysisCRC::MakePtProjection(TProfile2D *profilePtEta) const
1702 {
1703  // project 2D profile onto pt axis to get 1D profile
1704 
1705  Int_t nBinsPt = profilePtEta->GetNbinsX();
1706  Double_t dPtMin = (profilePtEta->GetXaxis())->GetXmin();
1707  Double_t dPtMax = (profilePtEta->GetXaxis())->GetXmax();
1708 
1709  Int_t nBinsEta = profilePtEta->GetNbinsY();
1710 
1711  TProfile *profilePt = new TProfile("","",nBinsPt,dPtMin,dPtMax);
1712 
1713  for(Int_t p=1;p<=nBinsPt;p++)
1714  {
1715  Double_t contentPt = 0.;
1716  Double_t entryPt = 0.;
1717  Double_t spreadPt = 0.;
1718  Double_t sum1 = 0.;
1719  Double_t sum2 = 0.;
1720  Double_t sum3 = 0.;
1721  for(Int_t e=1;e<=nBinsEta;e++)
1722  {
1723  contentPt += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)))
1724  * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
1725  entryPt += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
1726 
1727  sum1 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)))
1728  * (pow(profilePtEta->GetBinError(profilePtEta->GetBin(p,e)),2.)
1729  + pow(profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)),2.));
1730  sum2 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
1731  sum3 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)))
1732  * (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)));
1733  }
1734  if(sum2>0. && sum1/sum2-pow(sum3/sum2,2.) > 0.)
1735  {
1736  spreadPt = pow(sum1/sum2-pow(sum3/sum2,2.),0.5);
1737  }
1738  profilePt->SetBinContent(p,contentPt);
1739  profilePt->SetBinEntries(p,entryPt);
1740  {
1741  profilePt->SetBinError(p,spreadPt);
1742  }
1743 
1744  }
1745 
1746  return profilePt;
1747 
1748 } // end of TProfile* AliFlowAnalysisCRC::MakePtProjection(TProfile2D *profilePtEta)
1749 
1750 
1751 //=======================================================================================================================
1752 
1753 
1754 TProfile* AliFlowAnalysisCRC::MakeEtaProjection(TProfile2D *profilePtEta) const
1755 {
1756  // project 2D profile onto eta axis to get 1D profile
1757 
1758  Int_t nBinsEta = profilePtEta->GetNbinsY();
1759  Double_t dEtaMin = (profilePtEta->GetYaxis())->GetXmin();
1760  Double_t dEtaMax = (profilePtEta->GetYaxis())->GetXmax();
1761 
1762  Int_t nBinsPt = profilePtEta->GetNbinsX();
1763 
1764  TProfile *profileEta = new TProfile("","",nBinsEta,dEtaMin,dEtaMax);
1765 
1766  for(Int_t e=1;e<=nBinsEta;e++)
1767  {
1768  Double_t contentEta = 0.;
1769  Double_t entryEta = 0.;
1770  for(Int_t p=1;p<=nBinsPt;p++)
1771  {
1772  contentEta += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)))
1773  * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
1774  entryEta += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
1775  }
1776  profileEta->SetBinContent(e,contentEta);
1777  profileEta->SetBinEntries(e,entryEta);
1778  }
1779 
1780  return profileEta;
1781 
1782 } // end of TProfile* AliFlowAnalysisCRC::MakeEtaProjection(TProfile2D *profilePtEta)
1783 
1784 //=======================================================================================================================
1785 
1787 {
1788  // Printing on the screen the final results for integrated flow (RF, POI and RP).
1789 
1790  Int_t n = fHarmonic;
1791 
1792  Double_t dVn[4] = {0.}; // array to hold Vn{2}, Vn{4}, Vn{6} and Vn{8}
1793  Double_t dVnErr[4] = {0.}; // array to hold errors of Vn{2}, Vn{4}, Vn{6} and Vn{8}
1794 
1795  if(type == "RF")
1796  {
1797  for(Int_t b=0;b<4;b++)
1798  {
1799  dVn[0] = (fCommonHistsResults2nd->GetHistIntFlow())->GetBinContent(1);
1800  dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlow())->GetBinError(1);
1801  dVn[1] = (fCommonHistsResults4th->GetHistIntFlow())->GetBinContent(1);
1802  dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlow())->GetBinError(1);
1803  dVn[2] = (fCommonHistsResults6th->GetHistIntFlow())->GetBinContent(1);
1804  dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlow())->GetBinError(1);
1805  dVn[3] = (fCommonHistsResults8th->GetHistIntFlow())->GetBinContent(1);
1806  dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlow())->GetBinError(1);
1807  }
1808  } else if(type == "RP")
1809  {
1810  dVn[0] = (fCommonHistsResults2nd->GetHistIntFlowRP())->GetBinContent(1);
1811  dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlowRP())->GetBinError(1);
1812  dVn[1] = (fCommonHistsResults4th->GetHistIntFlowRP())->GetBinContent(1);
1813  dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlowRP())->GetBinError(1);
1814  dVn[2] = (fCommonHistsResults6th->GetHistIntFlowRP())->GetBinContent(1);
1815  dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlowRP())->GetBinError(1);
1816  dVn[3] = (fCommonHistsResults8th->GetHistIntFlowRP())->GetBinContent(1);
1817  dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlowRP())->GetBinError(1);
1818  } else if(type == "POI")
1819  {
1820  dVn[0] = (fCommonHistsResults2nd->GetHistIntFlowPOI())->GetBinContent(1);
1821  dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlowPOI())->GetBinError(1);
1822  dVn[1] = (fCommonHistsResults4th->GetHistIntFlowPOI())->GetBinContent(1);
1823  dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlowPOI())->GetBinError(1);
1824  dVn[2] = (fCommonHistsResults6th->GetHistIntFlowPOI())->GetBinContent(1);
1825  dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlowPOI())->GetBinError(1);
1826  dVn[3] = (fCommonHistsResults8th->GetHistIntFlowPOI())->GetBinContent(1);
1827  dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlowPOI())->GetBinError(1);
1828  } else if(type == "RF, rebinned in M" && fCalculateCumulantsVsM)
1829  {
1830  for(Int_t b=0;b<4;b++)
1831  {
1832  dVn[b] = fIntFlowRebinnedInM->GetBinContent(b+1);
1833  dVnErr[b] = fIntFlowRebinnedInM->GetBinError(b+1);
1834  }
1835  }
1836 
1837  TString title = " flow estimates from Q-cumulants";
1838  TString subtitle = " (";
1839  TString subtitle2 = " (rebinned in M)";
1840 
1841  if(type != "RF, rebinned in M")
1842  {
1844  {
1845  subtitle.Append(type);
1846  subtitle.Append(", without weights)");
1847  } else
1848  {
1849  subtitle.Append(type);
1850  subtitle.Append(", with weights)");
1851  }
1852  } else
1853  {
1855  {
1856  subtitle.Append("RF");
1857  subtitle.Append(", without weights)");
1858  } else
1859  {
1860  subtitle.Append("RF");
1861  subtitle.Append(", with weights)");
1862  }
1863  }
1864 
1865  cout<<endl;
1866  cout<<"*************************************"<<endl;
1867  cout<<"*************************************"<<endl;
1868  cout<<title.Data()<<endl;
1869  cout<<subtitle.Data()<<endl;
1870  if(type == "RF, rebinned in M"){cout<<subtitle2.Data()<<endl;}
1871  cout<<endl;
1872 
1873  for(Int_t i=0;i<4;i++)
1874  {
1875  cout<<" v_"<<n<<"{"<<2*(i+1)<<"} = "<<dVn[i]<<" +/- "<<dVnErr[i]<<endl;
1876  }
1877 
1878  cout<<endl;
1879  if(type == "RF")
1880  {
1882  {
1883  cout<<" detector bias (corrected for): "<<endl;
1884  } else
1885  {
1886  cout<<" detector bias (not corrected for):"<<endl;
1887  }
1888  cout<<" to QC{2}: "<<fIntFlowDetectorBias->GetBinContent(1)<<" +/- "<<fIntFlowDetectorBias->GetBinError(1)<<endl;
1889  cout<<" to QC{4}: "<<fIntFlowDetectorBias->GetBinContent(2)<<" +/- "<<fIntFlowDetectorBias->GetBinError(2)<<endl;
1890  cout<<endl;
1891  }
1892  if(type == "RF" || type == "RF, rebinned in M")
1893  {
1894  cout<<" nEvts = "<<(Int_t)fCommonHists->GetHistMultRP()->GetEntries()<<", <M> = "<<(Double_t)fCommonHists->GetHistMultRP()->GetMean()<<endl;
1895  }
1896  else if (type == "RP")
1897  {
1898  cout<<" nEvts = "<<(Int_t)fCommonHists->GetHistMultRP()->GetEntries()<<", <M> = "<<(Double_t)fCommonHists->GetHistMultRP()->GetMean()<<endl;
1899  }
1900  else if (type == "POI")
1901  {
1902  cout<<" nEvts = "<<(Int_t)fCommonHists->GetHistMultPOI()->GetEntries()<<", <M> = "<<(Double_t)fCommonHists->GetHistMultPOI()->GetMean()<<endl;
1903  }
1904 
1905  cout<<"*************************************"<<endl;
1906  cout<<"*************************************"<<endl;
1907  cout<<endl;
1908 
1909 }// end of AliFlowAnalysisCRC::PrintFinalResultsForIntegratedFlow(TString type="RF");
1910 
1911 //=======================================================================================================================
1912 
1914 {
1915  //store the final results in output .root file
1916  TFile *output = new TFile(outputFileName.Data(),"RECREATE");
1917  //output->WriteObject(fHistList, "cobjQC","SingleKey");
1918  fHistList->Write(fHistList->GetName(), TObject::kSingleKey);
1919  delete output;
1920 }
1921 
1922 
1923 //=======================================================================================================================
1924 
1925 
1926 void AliFlowAnalysisCRC::WriteHistograms(TDirectoryFile *outputFileName)
1927 {
1928  //store the final results in output .root file
1929  fHistList->SetName("cobjQC");
1930  fHistList->SetOwner(kTRUE);
1931  outputFileName->Add(fHistList);
1932  outputFileName->Write(outputFileName->GetName(), TObject::kSingleKey);
1933 }
1934 
1935 //=======================================================================================================================
1936 
1938 {
1939  // Book common control histograms and common histograms for final results.
1940  // a) Book common control histograms;
1941  // b) Book common result histograms.
1942 
1943  // a) Book common control histograms:
1944  // Common control histograms (all events):
1945  TString commonHistsName = "AliFlowCommonHistQC";
1946  commonHistsName += fAnalysisLabel->Data();
1947  fCommonHists = new AliFlowCommonHist(commonHistsName.Data(),commonHistsName.Data(),fBookOnlyBasicCCH);
1948  fHistList->Add(fCommonHists);
1949  // Common control histograms (selected events):
1951  {
1952  // Common control histogram filled for events with 2 and more reference particles:
1953  TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC";
1954  commonHists2ndOrderName += fAnalysisLabel->Data();
1955  fCommonHists2nd = new AliFlowCommonHist(commonHists2ndOrderName.Data(),commonHists2ndOrderName.Data(),fBookOnlyBasicCCH);
1956  fHistList->Add(fCommonHists2nd);
1957  // Common control histogram filled for events with 2 and more reference particles:
1958  TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC";
1959  commonHists4thOrderName += fAnalysisLabel->Data();
1960  fCommonHists4th = new AliFlowCommonHist(commonHists4thOrderName.Data(),commonHists4thOrderName.Data(),fBookOnlyBasicCCH);
1961  fHistList->Add(fCommonHists4th);
1962  // Common control histogram filled for events with 6 and more reference particles:
1963  TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC";
1964  commonHists6thOrderName += fAnalysisLabel->Data();
1965  fCommonHists6th = new AliFlowCommonHist(commonHists6thOrderName.Data(),commonHists6thOrderName.Data(),fBookOnlyBasicCCH);
1966  fHistList->Add(fCommonHists6th);
1967  // Common control histogram filled for events with 8 and more reference particles:
1968  TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC";
1969  commonHists8thOrderName += fAnalysisLabel->Data();
1970  fCommonHists8th = new AliFlowCommonHist(commonHists8thOrderName.Data(),commonHists8thOrderName.Data(),fBookOnlyBasicCCH);
1971  fHistList->Add(fCommonHists8th);
1972  } // end of if(fFillMultipleControlHistograms)
1973 
1974  // b) Book common result histograms:
1975  // Common result histograms for QC{2}:
1976  TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC";
1977  commonHistResults2ndOrderName += fAnalysisLabel->Data();
1978  fCommonHistsResults2nd = new AliFlowCommonHistResults(commonHistResults2ndOrderName.Data(),"",fHarmonic);
1980  // Common result histograms for QC{4}:
1981  TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC";
1982  commonHistResults4thOrderName += fAnalysisLabel->Data();
1983  fCommonHistsResults4th = new AliFlowCommonHistResults(commonHistResults4thOrderName.Data(),"",fHarmonic);
1985  // Common result histograms for QC{6}:
1986  TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC";
1987  commonHistResults6thOrderName += fAnalysisLabel->Data();
1988  fCommonHistsResults6th = new AliFlowCommonHistResults(commonHistResults6thOrderName.Data(),"",fHarmonic);
1990  // Common result histograms for QC{8}:
1991  TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC";
1992  commonHistResults8thOrderName += fAnalysisLabel->Data();
1993  fCommonHistsResults8th = new AliFlowCommonHistResults(commonHistResults8thOrderName.Data(),"",fHarmonic);
1995 
1996 } // end of void AliFlowAnalysisCRC::BookCommonHistograms()
1997 
1998 //=======================================================================================================================
1999 
2001 {
2002  // Book and fill histograms which hold phi, pt and eta weights.
2003 
2004  if(!fWeightsList)
2005  {
2006  printf("\n WARNING (QC): fWeightsList is NULL in AFAWQC::BAFWH() !!!! \n\n");
2007  exit(0);
2008  }
2009 
2010  TString fUseParticleWeightsName = "fUseParticleWeightsQC";
2011  fUseParticleWeightsName += fAnalysisLabel->Data();
2012  fUseParticleWeights = new TProfile(fUseParticleWeightsName.Data(),"0 = particle weight not used, 1 = particle weight used ",5,0,5);
2013  fUseParticleWeights->SetLabelSize(0.06);
2014  fUseParticleWeights->SetStats(kFALSE);
2015  (fUseParticleWeights->GetXaxis())->SetBinLabel(1,"w_{#phi}");
2016  (fUseParticleWeights->GetXaxis())->SetBinLabel(2,"w_{p_{T}}");
2017  (fUseParticleWeights->GetXaxis())->SetBinLabel(3,"w_{#eta}");
2018  (fUseParticleWeights->GetXaxis())->SetBinLabel(4,"w_{track}");
2025 
2026  for(Int_t c=0; c<2; c++) {
2027  fPhiEtaWeights[c] = new TH2D(Form("fPhiEtaWeights[%d]",c),
2028  Form("fPhiEtaWeights[%d]",c),32,0.,TMath::TwoPi(),32,-0.8,0.8);
2029  }
2030 
2031  // // POIs
2032  // for(Int_t c=0; c<2; c++)
2033  // {
2034  // fPhiWeightsPOIs[c] = new TH1F(Form("fPhiWeightsPOIs[%d][%d]",c,h),Form("fPhiWeightsPOIs[%d][%d]",c,h),fnBinsPhi,fPhiMin,fPhiMax);
2035  // fPhiWeightsPOIs[c]->Sumw2();
2036  // fEtaWeightsPOIs[c] = new TH1D(Form("fEtaWeightsPOIs[%d][%d]",c,h),Form("fEtaWeightsPOIs[%d][%d]",c,h),fnBinsEta,fEtaMin,fEtaMax);
2037  // fEtaWeightsPOIs[c]->Sumw2();
2038  // fPhiEtaWeightsPOIs[c] = new TH2D(Form("fPhiEtaWeightsPOIs[%d][%d]",c,h),Form("fPhiEtaWeightsPOIs[%d][%d]",c,h),fnBinsPhi,fPhiMin,fPhiMax,fnBinsEta,fEtaMin,fEtaMax);
2039  // fPhiEtaWeightsPOIs[c]->Sumw2();
2040  //
2041  // if(fUsePhiWeights)
2042  // {
2043  // if(fWeightsList->FindObject(Form("fPhiHist[%d][%d]",c,h)))
2044  // {
2045  // fPhiDistrRefPOIs[c] = dynamic_cast<TH1F*>(fWeightsList->FindObject(Form("fPhiHist[%d][%d]",c,h)));
2046  // if(!fPhiDistrRefPOIs[c])
2047  // {
2048  // printf("\n WARNING (QC): fPhiDistrRefPOIs is NULL in AFAWQC::BAFWH() !!!!\n\n");
2049  // exit(0);
2050  // }
2051  // if(TMath::Abs(fPhiDistrRefPOIs[c]->GetBinWidth(1)-fPhiBinWidth)>pow(10.,-6.))
2052  // {
2053  // cout<<endl;
2054  // cout<<"WARNING (QC): Inconsistent binning in histograms for phi-weights throughout the code."<<endl;
2055  // cout<<endl;
2056  // //exit(0);
2057  // }
2058  // } else
2059  // {
2060  // cout<<"WARNING: fWeightsList->FindObject(\"fPhiHist\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;
2061  // exit(0);
2062  // }
2063  // } // end of if(fUsePhiWeights)
2064  //
2065  // if(fUsePtWeights)
2066  // {
2067  // if(fWeightsList->FindObject(Form("fPtHist[%d][%d]",c,h)))
2068  // {
2069  // fPtDistrRefPOIs[c] = dynamic_cast<TH1D*>(fWeightsList->FindObject(Form("fPtHist[%d][%d]",c,h)));
2070  // if(!fPtDistrRefPOIs[c])
2071  // {
2072  // printf("\n WARNING (QC): fPtDistrRefPOIs is NULL in AFAWQC::BAFWH() !!!!\n\n");
2073  // exit(0);
2074  // }
2075  // if(TMath::Abs(fPtDistrRefPOIs[c]->GetBinWidth(1)-fPtBinWidth)>pow(10.,-6.))
2076  // {
2077  // cout<<endl;
2078  // cout<<"WARNING (QC): Inconsistent binning in histograms for pt-weights throughout the code."<<endl;
2079  // cout<<endl;
2080  // //exit(0);
2081  // }
2082  // } else
2083  // {
2084  // cout<<"WARNING: fWeightsList->FindObject(\"fPtHist\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;
2085  // exit(0);
2086  // }
2087  // } // end of if(fUsePtWeights)
2088  //
2089  // if(fUseEtaWeights)
2090  // {
2091  // if(fWeightsList->FindObject(Form("fEtaHist[%d][%d]",c,h)))
2092  // {
2093  // fEtaDistrRefPOIs[c] = dynamic_cast<TH1D*>(fWeightsList->FindObject(Form("fEtaHist[%d][%d]",c,h)));
2094  // if(!fEtaDistrRefPOIs[c])
2095  // {
2096  // printf("\n WARNING (QC): fEtaDistrRefPOIs is NULL in AFAWQC::BAFWH() !!!!\n\n");
2097  // exit(0);
2098  // }
2099  // if(TMath::Abs(fEtaDistrRefPOIs[c]->GetBinWidth(1)-fEtaBinWidth)>pow(10.,-6.))
2100  // {
2101  // cout<<endl;
2102  // cout<<"WARNING (QC): Inconsistent binning in histograms for eta-weights throughout the code."<<endl;
2103  // cout<<endl;
2104  // //exit(0);
2105  // }
2106  // } else
2107  // {
2108  // cout<<"WARNING: fWeightsList->FindObject(\"fEtaHist\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;
2109  // exit(0);
2110  // }
2111  // } // end of if(fUseEtaWeights)
2112  //
2113  // if(fUsePhiEtaWeights)
2114  // {
2115  // if(fWeightsList->FindObject(Form("fPhiEtaHist[%d][%d]",c,h)))
2116  // {
2117  // fPhiEtaDistrRefPOIs[c] = dynamic_cast<TH2D*>(fWeightsList->FindObject(Form("fPhiEtaHist[%d][%d]",c,h)));
2118  // if(!fPhiEtaDistrRefPOIs[c])
2119  // {
2120  // printf("\n WARNING (QC): fPhiEtaDistrRefPOIs is NULL in AFAWQC::BAFWH() !!!!\n\n");
2121  // exit(0);
2122  // }
2123  // } else
2124  // {
2125  // cout<<"WARNING: fWeightsList->FindObject(\"fPhiEtaHist\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;
2126  // exit(0);
2127  // }
2128  // } // end of if(fUsePhiEtaWeights)
2129  //
2130  // } // end of for(Int_t c=0; c<2; c++)
2131 
2132  //**********************************************************************************************************
2133 
2134  // RPs
2135 
2136  // fPhiWeightsRPs = new TH1F("fPhiWeightsRPs","fPhiWeightsRPs",fnBinsPhi,fPhiMin,fPhiMax);
2137  // fEtaWeightsRPs = new TH1D("fEtaWeightsRPs","fEtaWeightsRPs",fnBinsEta,fEtaMin,fEtaMax);
2138  //
2139  // if(fUsePhiWeights)
2140  // {
2141  // if(fWeightsList->FindObject("fPhiDistrRPs"))
2142  // {
2143  // fPhiDistrRefRPs = dynamic_cast<TH1F*>(fWeightsList->FindObject("fPhiDistrRPs"));
2144  // if(!fPhiDistrRefRPs)
2145  // {
2146  // printf("\n WARNING (QC): fPhiDistrRefRPs is NULL in AFAWQC::BAFWH() !!!!\n\n");
2147  // exit(0);
2148  // }
2149  // if(TMath::Abs(fPhiDistrRefRPs->GetBinWidth(1)-fPhiBinWidth)>pow(10.,-6.))
2150  // {
2151  // cout<<endl;
2152  // cout<<"WARNING (QC): Inconsistent binning in histograms for phi-weights throughout the code."<<endl;
2153  // cout<<endl;
2154  // //exit(0);
2155  // }
2156  // } else
2157  // {
2158  // cout<<"WARNING: fWeightsList->FindObject(\"fPhiDistrRPs\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;
2159  // exit(0);
2160  // }
2161  // } // end of if(fUsePhiWeights)
2162  //
2163  // if(fUsePtWeights)
2164  // {
2165  // if(fWeightsList->FindObject("fPtDistrRPs"))
2166  // {
2167  // fPtDistrRefRPs = dynamic_cast<TH1D*>(fWeightsList->FindObject("fPtDistrRPs"));
2168  // if(!fPtDistrRefRPs)
2169  // {
2170  // printf("\n WARNING (QC): fPtDistrRefRPs is NULL in AFAWQC::BAFWH() !!!!\n\n");
2171  // exit(0);
2172  // }
2173  // if(TMath::Abs(fPtDistrRefRPs->GetBinWidth(1)-fPtBinWidth)>pow(10.,-6.))
2174  // {
2175  // cout<<endl;
2176  // cout<<"WARNING (QC): Inconsistent binning in histograms for phi-weights throughout the code."<<endl;
2177  // cout<<endl;
2178  // //exit(0);
2179  // }
2180  // } else
2181  // {
2182  // cout<<"WARNING: fWeightsList->FindObject(\"fPtDistrRPs\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;
2183  // exit(0);
2184  // }
2185  // } // end of if(fUsePtWeights)
2186  //
2187  // if(fUseEtaWeights)
2188  // {
2189  // if(fWeightsList->FindObject("fEtaDistrRPs"))
2190  // {
2191  // fEtaDistrRefRPs = dynamic_cast<TH1D*>(fWeightsList->FindObject("fEtaDistrRPs"));
2192  // if(!fEtaDistrRefRPs)
2193  // {
2194  // printf("\n WARNING (QC): fEtaDistrRefRPs is NULL in AFAWQC::BAFWH() !!!!\n\n");
2195  // exit(0);
2196  // }
2197  // if(TMath::Abs(fEtaDistrRefRPs->GetBinWidth(1)-fEtaBinWidth)>pow(10.,-6.))
2198  // {
2199  // cout<<endl;
2200  // cout<<"WARNING (QC): Inconsistent binning in histograms for eta-weights throughout the code."<<endl;
2201  // cout<<endl;
2202  // //exit(0);
2203  // }
2204  // } else
2205  // {
2206  // cout<<"WARNING: fWeightsList->FindObject(\"fEtaDistrRPs\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;
2207  // exit(0);
2208  // }
2209  // } // end of if(fUseEtaWeights)
2210  //
2211  // if(fUsePhiEtaWeights)
2212  // {
2213  // if(fWeightsList->FindObject("fPhiEtaDistrRPs"))
2214  // {
2215  // fPhiEtaDistrRefRPs = dynamic_cast<TH2D*>(fWeightsList->FindObject("fPhiEtaDistrRPs"));
2216  // if(!fPhiEtaDistrRefRPs)
2217  // {
2218  // printf("\n WARNING (QC): fPhiEtaDistrRefRPs is NULL in AFAWQC::BAFWH() !!!!\n\n");
2219  // exit(0);
2220  // }
2221  // } else
2222  // {
2223  // cout<<"WARNING: fWeightsList->FindObject(\"fPhiEtaDistrRPs\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;
2224  // exit(0);
2225  // }
2226  // } // end of if(fUsePhiEtaWeights)
2227 
2228 } // end of AliFlowAnalysisCRC::BookAndFillWeightsHistograms()
2229 
2230 //=======================================================================================================================
2231 
2233 {
2234  if(!fCenWeightsHist) return;
2235  fCenWeigCalHist = (TH1D*)(fCenWeightsHist->Clone("fCenWeigCalHist"));
2236  TF1 *CenFit = new TF1("CenFit","pol0", 0., 100.);
2238  fCenWeigCalHist->Fit("CenFit","QNR","",0.,50.);
2239  Double_t CenAv = CenFit->GetParameter(0);
2240  for(Int_t b=1; b<=fCenWeigCalHist->GetNbinsX(); b++) {
2241  Double_t newbin = fCenWeigCalHist->GetBinContent(b);
2242  if(newbin) {
2243  fCenWeigCalHist->SetBinContent(b,CenAv/newbin);
2244  } else {
2245  fCenWeigCalHist->SetBinContent(b,1.);
2246  }
2247  }
2248  }
2250  fCenWeigCalHist->Fit("CenFit","QNR","",0.,8.);
2251  Double_t CenAv = CenFit->GetParameter(0);
2252  fCenWeigCalHist->Fit("CenFit","QNR","",12.,50.);
2253  Double_t SemiCenAv = CenFit->GetParameter(0);
2254  for(Int_t b=1; b<=fCenWeigCalHist->GetNbinsX(); b++) {
2255  Double_t newbin = fCenWeigCalHist->GetBinContent(b);
2256  if(newbin) {
2257  if(b<=10) fCenWeigCalHist->SetBinContent(b,CenAv/newbin);
2258  if(b>10 && b<=50) fCenWeigCalHist->SetBinContent(b,SemiCenAv/newbin);
2259  if(b>50) fCenWeigCalHist->SetBinContent(b,1.);
2260  } else {
2261  fCenWeigCalHist->SetBinContent(b,1.);
2262  }
2263  }
2264  }
2265  fCenWeigCalHist->SetName("CenWeights");
2267 } // end of AliFlowAnalysisCRC::SetCentralityWeights()
2268 
2269 //=======================================================================================================================
2270 
2272 {
2273  // Book all objects for integrated flow:
2274  // a) Book profile to hold all flags for integrated flow;
2275  // b) Book event-by-event quantities;
2276  // c) Book profiles; // to be improved (comment)
2277  // d) Book histograms holding the final results.
2278 
2279  TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?)
2280  TString powerFlag[2] = {"linear","quadratic"}; // to be improved (should I promote this to data members?)
2281 
2282  // a) Book profile to hold all flags for integrated flow:
2283  TString intFlowFlagsName = "fIntFlowFlags";
2284  intFlowFlagsName += fAnalysisLabel->Data();
2285  fIntFlowFlags = new TProfile(intFlowFlagsName.Data(),"Flags for Integrated Flow",20,0.,20.);
2286  fIntFlowFlags->SetTickLength(-0.01,"Y");
2287  fIntFlowFlags->SetMarkerStyle(25);
2288  fIntFlowFlags->SetLabelSize(0.04);
2289  fIntFlowFlags->SetLabelOffset(0.02,"Y");
2290  fIntFlowFlags->SetStats(kFALSE);
2291  fIntFlowFlags->GetXaxis()->SetBinLabel(1,"Particle Weights");
2292  fIntFlowFlags->GetXaxis()->SetBinLabel(2,"Event Weights");
2293  fIntFlowFlags->GetXaxis()->SetBinLabel(3,"Corrected for NUA?");
2294  fIntFlowFlags->GetXaxis()->SetBinLabel(4,"Print RF results");
2295  fIntFlowFlags->GetXaxis()->SetBinLabel(5,"Print RP results");
2296  fIntFlowFlags->GetXaxis()->SetBinLabel(6,"Print POI results");
2297  fIntFlowFlags->GetXaxis()->SetBinLabel(7,"Print RF (rebinned in M) results");
2298  fIntFlowFlags->GetXaxis()->SetBinLabel(8,"Corrected for NUA vs M?");
2299  fIntFlowFlags->GetXaxis()->SetBinLabel(9,"Propagate errors to v_{n} from correlations?");
2300  fIntFlowFlags->GetXaxis()->SetBinLabel(10,"Calculate cumulants vs M");
2301  fIntFlowFlags->GetXaxis()->SetBinLabel(11,"fMinimumBiasReferenceFlow");
2302  fIntFlowFlags->GetXaxis()->SetBinLabel(12,"fForgetAboutCovariances");
2303  fIntFlowFlags->GetXaxis()->SetBinLabel(13,"fStoreVarious");
2304  fIntFlowFlags->GetXaxis()->SetBinLabel(14,"fFillMultipleControlHistograms");
2305  fIntFlowFlags->GetXaxis()->SetBinLabel(15,"Calculate all correlations vs M");
2306  fIntFlowFlags->GetXaxis()->SetBinLabel(16,"fMultiplicityIs");
2307  fIntFlowFlags->GetXaxis()->SetBinLabel(17,"fExactNoRPs");
2308  fIntFlowFlags->GetXaxis()->SetBinLabel(18,"fUse2DHistograms");
2309  fIntFlowFlags->GetXaxis()->SetBinLabel(19,"fFillProfilesVsMUsingWeights");
2310  fIntFlowFlags->GetXaxis()->SetBinLabel(20,"fUseQvectorTerms");
2312 
2313  // b) Book event-by-event quantities:
2314  // Re[Q_{m*n,k}], Im[Q_{m*n,k}] and S_{p,k}^M:
2315  fReQ = new TMatrixD(12,9);
2316  fImQ = new TMatrixD(12,9);
2317  fSpk = new TMatrixD(8,9);
2318  // average correlations <2>, <4>, <6> and <8> for single event (bining is the same as in fIntFlowCorrelationsPro and fIntFlowCorrelationsHist):
2319  TString intFlowCorrelationsEBEName = "fIntFlowCorrelationsEBE";
2320  intFlowCorrelationsEBEName += fAnalysisLabel->Data();
2321  fIntFlowCorrelationsEBE = new TH1D(intFlowCorrelationsEBEName.Data(),intFlowCorrelationsEBEName.Data(),4,0,4);
2322  // weights for average correlations <2>, <4>, <6> and <8> for single event:
2323  TString intFlowEventWeightsForCorrelationsEBEName = "fIntFlowEventWeightsForCorrelationsEBE";
2324  intFlowEventWeightsForCorrelationsEBEName += fAnalysisLabel->Data();
2325  fIntFlowEventWeightsForCorrelationsEBE = new TH1D(intFlowEventWeightsForCorrelationsEBEName.Data(),intFlowEventWeightsForCorrelationsEBEName.Data(),4,0,4);
2326  // average all correlations for single event (bining is the same as in fIntFlowCorrelationsAllPro and fIntFlowCorrelationsAllHist):
2327  TString intFlowCorrelationsAllEBEName = "fIntFlowCorrelationsAllEBE";
2328  intFlowCorrelationsAllEBEName += fAnalysisLabel->Data();
2329  fIntFlowCorrelationsAllEBE = new TH1D(intFlowCorrelationsAllEBEName.Data(),intFlowCorrelationsAllEBEName.Data(),64,0,64);
2330  // average correction terms for non-uniform acceptance for single event
2331  // (binning is the same as in fIntFlowCorrectionTermsForNUAPro[2] and fIntFlowCorrectionTermsForNUAHist[2]):
2332  TString fIntFlowCorrectionTermsForNUAEBEName = "fIntFlowCorrectionTermsForNUAEBE";
2333  fIntFlowCorrectionTermsForNUAEBEName += fAnalysisLabel->Data();
2334  for(Int_t sc=0;sc<2;sc++) // sin or cos terms
2335  {
2336  fIntFlowCorrectionTermsForNUAEBE[sc] = new TH1D(Form("%s: %s terms",fIntFlowCorrectionTermsForNUAEBEName.Data(),sinCosFlag[sc].Data()),Form("Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),4,0,4);
2337  }
2338  // event weights for terms for non-uniform acceptance:
2339  TString fIntFlowEventWeightForCorrectionTermsForNUAEBEName = "fIntFlowEventWeightForCorrectionTermsForNUAEBE";
2340  fIntFlowEventWeightForCorrectionTermsForNUAEBEName += fAnalysisLabel->Data();
2341  for(Int_t sc=0;sc<2;sc++) // sin or cos terms
2342  {
2343  fIntFlowEventWeightForCorrectionTermsForNUAEBE[sc] = new TH1D(Form("%s: %s terms",fIntFlowEventWeightForCorrectionTermsForNUAEBEName.Data(),sinCosFlag[sc].Data()),Form("Event weights for terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),4,0,4); // to be improved - 4
2344  }
2345  // c) Book profiles: // to be improved (comment)
2346  // profile to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8:
2347  TString avMultiplicityName = "fAvMultiplicity";
2348  avMultiplicityName += fAnalysisLabel->Data();
2349  fAvMultiplicity = new TProfile(avMultiplicityName.Data(),"Average multiplicities of reference particles (RPs)",9,0,9);
2350  fAvMultiplicity->SetTickLength(-0.01,"Y");
2351  fAvMultiplicity->SetMarkerStyle(25);
2352  fAvMultiplicity->SetLabelSize(0.05);
2353  fAvMultiplicity->SetLabelOffset(0.02,"Y");
2354  fAvMultiplicity->SetYTitle("Average multiplicity");
2355  (fAvMultiplicity->GetXaxis())->SetBinLabel(1,"all evts");
2356  (fAvMultiplicity->GetXaxis())->SetBinLabel(2,"n_{RP} #geq 1");
2357  (fAvMultiplicity->GetXaxis())->SetBinLabel(3,"n_{RP} #geq 2");
2358  (fAvMultiplicity->GetXaxis())->SetBinLabel(4,"n_{RP} #geq 3");
2359  (fAvMultiplicity->GetXaxis())->SetBinLabel(5,"n_{RP} #geq 4");
2360  (fAvMultiplicity->GetXaxis())->SetBinLabel(6,"n_{RP} #geq 5");
2361  (fAvMultiplicity->GetXaxis())->SetBinLabel(7,"n_{RP} #geq 6");
2362  (fAvMultiplicity->GetXaxis())->SetBinLabel(8,"n_{RP} #geq 7");
2363  (fAvMultiplicity->GetXaxis())->SetBinLabel(9,"n_{RP} #geq 8");
2365  // Average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with wrong errors!):
2366  TString correlationFlag[4] = {"#LT#LT2#GT#GT","#LT#LT4#GT#GT","#LT#LT6#GT#GT","#LT#LT8#GT#GT"};
2367  TString intFlowCorrelationsProName = "fIntFlowCorrelationsPro";
2368  intFlowCorrelationsProName += fAnalysisLabel->Data();
2369  fIntFlowCorrelationsPro = new TProfile(intFlowCorrelationsProName.Data(),"Average correlations for all events",4,0,4,"s");
2370  fIntFlowCorrelationsPro->Sumw2();
2371  fIntFlowCorrelationsPro->SetTickLength(-0.01,"Y");
2372  fIntFlowCorrelationsPro->SetMarkerStyle(25);
2373  fIntFlowCorrelationsPro->SetLabelSize(0.06);
2374  fIntFlowCorrelationsPro->SetLabelOffset(0.01,"Y");
2375  for(Int_t b=0;b<4;b++)
2376  {
2377  (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(b+1,correlationFlag[b].Data());
2378  }
2380  // Average correlations squared <<2>^2>, <<4>^2>, <<6>^2> and <<8>^2> for all events:
2381  TString squaredCorrelationFlag[4] = {"#LT#LT2#GT^{2}#GT","#LT#LT4#GT^{2}#GT","#LT#LT6#GT^{2}#GT","#LT#LT8#GT^{2}#GT"};
2382  TString intFlowSquaredCorrelationsProName = "fIntFlowSquaredCorrelationsPro";
2383  intFlowSquaredCorrelationsProName += fAnalysisLabel->Data();
2384  fIntFlowSquaredCorrelationsPro = new TProfile(intFlowSquaredCorrelationsProName.Data(),"Average squared correlations for all events",4,0,4,"s");
2386  fIntFlowSquaredCorrelationsPro->SetTickLength(-0.01,"Y");
2387  fIntFlowSquaredCorrelationsPro->SetMarkerStyle(25);
2388  fIntFlowSquaredCorrelationsPro->SetLabelSize(0.06);
2389  fIntFlowSquaredCorrelationsPro->SetLabelOffset(0.01,"Y");
2390  for(Int_t b=0;b<4;b++)
2391  {
2392  (fIntFlowSquaredCorrelationsPro->GetXaxis())->SetBinLabel(b+1,squaredCorrelationFlag[b].Data());
2393  }
2396  {
2397  for(Int_t ci=0;ci<4;ci++) // correlation index
2398  {
2399  // average correlations <<2>>, <<4>>, <<6>> and <<8>> versus multiplicity for all events (with wrong errors):
2400  TString intFlowCorrelationsVsMProName = "fIntFlowCorrelationsVsMPro";
2401  intFlowCorrelationsVsMProName += fAnalysisLabel->Data();
2402  fIntFlowCorrelationsVsMPro[ci] = new TProfile(Form("%s, %s",intFlowCorrelationsVsMProName.Data(),correlationFlag[ci].Data()),
2403  Form("%s vs multiplicity",correlationFlag[ci].Data()),
2405  fIntFlowCorrelationsVsMPro[ci]->Sumw2();
2406  fIntFlowCorrelationsVsMPro[ci]->GetYaxis()->SetTitle(correlationFlag[ci].Data());
2408  {
2409  fIntFlowCorrelationsVsMPro[ci]->GetXaxis()->SetTitle("# RPs");
2411  {
2412  fIntFlowCorrelationsVsMPro[ci]->GetXaxis()->SetTitle("Reference multiplicity (from ESD)");
2414  {
2415  fIntFlowCorrelationsVsMPro[ci]->GetXaxis()->SetTitle("# POIs");
2416  }
2418  // average squared correlations <<2>^2>, <<4>^2>, <<6>^2> and <<8>^2> versus multiplicity for all events:
2419  TString intFlowSquaredCorrelationsVsMProName = "fIntFlowSquaredCorrelationsVsMPro";
2420  intFlowSquaredCorrelationsVsMProName += fAnalysisLabel->Data();
2421  fIntFlowSquaredCorrelationsVsMPro[ci] = new TProfile(Form("%s, %s",intFlowSquaredCorrelationsVsMProName.Data(),squaredCorrelationFlag[ci].Data()),
2422  Form("%s vs multiplicity",squaredCorrelationFlag[ci].Data()),
2424  fIntFlowSquaredCorrelationsVsMPro[ci]->Sumw2();
2425  fIntFlowSquaredCorrelationsVsMPro[ci]->GetYaxis()->SetTitle(squaredCorrelationFlag[ci].Data());
2427  {
2428  fIntFlowSquaredCorrelationsVsMPro[ci]->GetXaxis()->SetTitle("# RPs");
2430  {
2431  fIntFlowSquaredCorrelationsVsMPro[ci]->GetXaxis()->SetTitle("Reference multiplicity (from ESD)");
2433  {
2434  fIntFlowSquaredCorrelationsVsMPro[ci]->GetXaxis()->SetTitle("# POIs");
2435  }
2437  } // end of for(Int_t ci=0;ci<4;ci++) // correlation index
2438  } // end of if(fCalculateCumulantsVsM)
2439  // averaged all correlations for all events (with wrong errors!):
2440  TString intFlowCorrelationsAllProName = "fIntFlowCorrelationsAllPro";
2441  intFlowCorrelationsAllProName += fAnalysisLabel->Data();
2442  fIntFlowCorrelationsAllPro = new TProfile(intFlowCorrelationsAllProName.Data(),"Average all correlations for all events",64,0,64);
2443  fIntFlowCorrelationsAllPro->Sumw2();
2444  fIntFlowCorrelationsAllPro->SetTickLength(-0.01,"Y");
2445  fIntFlowCorrelationsAllPro->SetMarkerStyle(25);
2446  fIntFlowCorrelationsAllPro->SetLabelSize(0.03);
2447  fIntFlowCorrelationsAllPro->SetLabelOffset(0.01,"Y");
2448  // 2-p correlations:
2449  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(1,"#LT#LT2#GT#GT_{n|n}");
2450  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(2,"#LT#LT2#GT#GT_{2n|2n}");
2451  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(3,"#LT#LT2#GT#GT_{3n|3n}");
2452  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(4,"#LT#LT2#GT#GT_{4n|4n}");
2453  // 3-p correlations:
2454  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(6,"#LT#LT3#GT#GT_{2n|n,n}");
2455  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(7,"#LT#LT3#GT#GT_{3n|2n,n}");
2456  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(8,"#LT#LT3#GT#GT_{4n|2n,2n}");
2457  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(9,"#LT#LT3#GT#GT_{4n|3n,n}");
2458  // 4-p correlations:
2459  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(11,"#LT#LT4#GT#GT_{n,n|n,n}");
2460  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(12,"#LT#LT4#GT#GT_{2n,n|2n,n}");
2461  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(13,"#LT#LT4#GT#GT_{2n,2n|2n,2n}");
2462  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(14,"#LT#LT4#GT#GT_{3n|n,n,n}");
2463  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(15,"#LT#LT4#GT#GT_{3n,n|3n,n}");
2464  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(16,"#LT#LT4#GT#GT_{3n,n|2n,2n}");
2465  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(17,"#LT#LT4#GT#GT_{4n|2n,n,n}");
2466  // 5-p correlations:
2467  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(19,"#LT#LT5#GT#GT_{2n,n|n,n,n}");
2468  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(20,"#LT#LT5#GT#GT_{2n,2n|2n,n,n}");
2469  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(21,"#LT#LT5#GT#GT_{3n,n|2n,n,n}");
2470  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(22,"#LT#LT5#GT#GT_{4n|n,n,n,n}");
2471  // 6-p correlations:
2472  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(24,"#LT#LT6#GT#GT_{n,n,n|n,n,n}");
2473  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(25,"#LT#LT6#GT#GT_{2n,n,n|2n,n,n}");
2474  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(26,"#LT#LT6#GT#GT_{2n,2n|n,n,n,n}");
2475  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(27,"#LT#LT6#GT#GT_{3n,n|n,n,n,n}");
2476  // 7-p correlations:
2477  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(29,"#LT#LT7#GT#GT_{2n,n,n|n,n,n,n}");
2478  // 8-p correlations:
2479  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(31,"#LT#LT8#GT#GT_{n,n,n,n|n,n,n,n}");
2480  // EXTRA correlations for v3{5} study:
2481  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(33,"#LT#LT4#GT#GT_{4n,2n|3n,3n}");
2482  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(34,"#LT#LT5#GT#GT_{3n,3n|2n,2n,2n}");
2483  // EXTRA correlations for Teaney-Yan study:
2484  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(35,"#LT#LT2#GT#GT_{5n|5n}");
2485  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(36,"#LT#LT2#GT#GT_{6n|6n}");
2486  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(37,"#LT#LT3#GT#GT_{5n|3n,2n}");
2487  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(38,"#LT#LT3#GT#GT_{5n|4n,1n}");
2488  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(39,"#LT#LT3#GT#GT_{6n|3n,3n}");
2489  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(40,"#LT#LT3#GT#GT_{6n|4n,2n}");
2490  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(41,"#LT#LT3#GT#GT_{6n|5n,1n}");
2491  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(42,"#LT#LT4#GT#GT_{6n|3n,2n,1n}");
2492  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(43,"#LT#LT4#GT#GT_{3n,2n|3n,2n}");
2493  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(44,"#LT#LT4#GT#GT_{4n,1n|3n,2n}");
2494  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(45,"#LT#LT4#GT#GT_{3n,3n|3n,3n}");
2495  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(46,"#LT#LT4#GT#GT_{4n,2n|3n,3n}");
2496  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(47,"#LT#LT4#GT#GT_{5n,1n|3n,3n}");
2497  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(48,"#LT#LT4#GT#GT_{4n,2n|4n,2n}");
2498  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(49,"#LT#LT4#GT#GT_{5n,1n|4n,2n}");
2499  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(50,"#LT#LT4#GT#GT_{5n|3n,1n,1n}");
2500  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(51,"#LT#LT4#GT#GT_{5n|2n,2n,1n}");
2501  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(52,"#LT#LT4#GT#GT_{5n,1n|5n,1n}");
2502  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(53,"#LT#LT5#GT#GT_{3n,3n|3n,2n,1n}");
2503  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(54,"#LT#LT5#GT#GT_{4n,2n|3n,2n,1n}");
2504  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(55,"#LT#LT5#GT#GT_{3n,2n|3n,1n,1n}");
2505  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(56,"#LT#LT5#GT#GT_{3n,2n|2n,2n,1n}");
2506  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(57,"#LT#LT5#GT#GT_{5n,1n|3n,2n,1n}");
2507  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(58,"#LT#LT6#GT#GT_{3n,2n,1n|3n,2n,1n}");
2508  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(59,"#LT#LT4#GT#GT_{6n|4n,1n,1n}");
2509  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(60,"#LT#LT4#GT#GT_{6n|2n,2n,2n}");
2510  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(61,"#LT#LT5#GT#GT_{6n|2n,2n,1n,1n}");
2511  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(62,"#LT#LT5#GT#GT_{4n,1n,1n|3n,3n}");
2512  (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(63,"#LT#LT6#GT#GT_{3n,3n|2n,2n,1n,1n}");
2514  // average all correlations versus multiplicity (errors via Sumw2 - to be improved):
2516  {
2517  // 2-p correlations vs M:
2518  fIntFlowCorrelationsAllVsMPro[0] = new TProfile("two1n1n","#LT#LT2#GT#GT_{n|n}",fnBinsMult,fMinMult,fMaxMult);
2519  fIntFlowCorrelationsAllVsMPro[1] = new TProfile("two2n2n","#LT#LT2#GT#GT_{2n|2n}",fnBinsMult,fMinMult,fMaxMult);
2520  fIntFlowCorrelationsAllVsMPro[2] = new TProfile("two3n3n","#LT#LT2#GT#GT_{3n|3n}",fnBinsMult,fMinMult,fMaxMult);
2521  fIntFlowCorrelationsAllVsMPro[3] = new TProfile("two4n4n","#LT#LT2#GT#GT_{4n|4n}",fnBinsMult,fMinMult,fMaxMult);
2522  // 3-p correlations vs M:
2523  fIntFlowCorrelationsAllVsMPro[5] = new TProfile("three2n1n1n","#LT#LT3#GT#GT_{2n|n,n}",fnBinsMult,fMinMult,fMaxMult);
2524  fIntFlowCorrelationsAllVsMPro[6] = new TProfile("three3n2n1n","#LT#LT3#GT#GT_{3n|2n,n}",fnBinsMult,fMinMult,fMaxMult);
2525  fIntFlowCorrelationsAllVsMPro[7] = new TProfile("three4n2n2n","#LT#LT3#GT#GT_{4n|2n,2n}",fnBinsMult,fMinMult,fMaxMult);
2526  fIntFlowCorrelationsAllVsMPro[8] = new TProfile("three4n3n1n","#LT#LT3#GT#GT_{4n|3n,n}",fnBinsMult,fMinMult,fMaxMult);
2527  // 4-p correlations vs M:
2528  fIntFlowCorrelationsAllVsMPro[10] = new TProfile("four1n1n1n1n","#LT#LT4#GT#GT_{n,n|n,n}",fnBinsMult,fMinMult,fMaxMult);
2529  fIntFlowCorrelationsAllVsMPro[11] = new TProfile("four2n1n2n1n","#LT#LT4#GT#GT_{2n,n|2n,n}",fnBinsMult,fMinMult,fMaxMult);
2530  fIntFlowCorrelationsAllVsMPro[12] = new TProfile("four2n2n2n2n","#LT#LT4#GT#GT_{2n,2n|2n,2n}",fnBinsMult,fMinMult,fMaxMult);
2531  fIntFlowCorrelationsAllVsMPro[13] = new TProfile("four3n1n1n1n","#LT#LT4#GT#GT_{3n|n,n,n}",fnBinsMult,fMinMult,fMaxMult);
2532  fIntFlowCorrelationsAllVsMPro[14] = new TProfile("four3n1n3n1n","#LT#LT4#GT#GT_{3n,n|3n,n}",fnBinsMult,fMinMult,fMaxMult);
2533  fIntFlowCorrelationsAllVsMPro[15] = new TProfile("four3n1n2n2n","#LT#LT4#GT#GT_{3n,n|2n,2n}",fnBinsMult,fMinMult,fMaxMult);
2534  fIntFlowCorrelationsAllVsMPro[16] = new TProfile("four4n2n1n1n","#LT#LT4#GT#GT_{4n|2n,n,n}",fnBinsMult,fMinMult,fMaxMult);
2535  // 5-p correlations vs M:
2536  fIntFlowCorrelationsAllVsMPro[18] = new TProfile("five2n1n1n1n1n","#LT#LT5#GT#GT_{2n,n|n,n,n}",fnBinsMult,fMinMult,fMaxMult);
2537  fIntFlowCorrelationsAllVsMPro[19] = new TProfile("five2n2n2n1n1n","#LT#LT5#GT#GT_{2n,2n|2n,n,n}",fnBinsMult,fMinMult,fMaxMult);
2538  fIntFlowCorrelationsAllVsMPro[20] = new TProfile("five3n1n2n1n1n","#LT#LT5#GT#GT_{3n,n|2n,n,n}",fnBinsMult,fMinMult,fMaxMult);
2539  fIntFlowCorrelationsAllVsMPro[21] = new TProfile("five4n1n1n1n1n","#LT#LT5#GT#GT_{4n|n,n,n,n}",fnBinsMult,fMinMult,fMaxMult);
2540  // 6-p correlations vs M:
2541  fIntFlowCorrelationsAllVsMPro[23] = new TProfile("six1n1n1n1n1n1n","#LT#LT6#GT#GT_{n,n,n|n,n,n}",fnBinsMult,fMinMult,fMaxMult);
2542  fIntFlowCorrelationsAllVsMPro[24] = new TProfile("six2n1n1n2n1n1n","#LT#LT6#GT#GT_{2n,n,n|2n,n,n}",fnBinsMult,fMinMult,fMaxMult);
2543  fIntFlowCorrelationsAllVsMPro[25] = new TProfile("six2n2n1n1n1n1n","#LT#LT6#GT#GT_{2n,2n|n,n,n,n}",fnBinsMult,fMinMult,fMaxMult);
2544  fIntFlowCorrelationsAllVsMPro[26] = new TProfile("six3n1n1n1n1n1n","#LT#LT6#GT#GT_{3n,n|n,n,n,n}",fnBinsMult,fMinMult,fMaxMult);
2545  // 7-p correlations vs M:
2546  fIntFlowCorrelationsAllVsMPro[28] = new TProfile("seven2n1n1n1n1n1n1n","#LT#LT7#GT#GT_{2n,n,n|n,n,n,n}",fnBinsMult,fMinMult,fMaxMult);
2547  // 8-p correlations vs M:
2548  fIntFlowCorrelationsAllVsMPro[30] = new TProfile("eight1n1n1n1n1n1n1n1n","#LT#LT8#GT#GT_{n,n,n,n|n,n,n,n}",fnBinsMult,fMinMult,fMaxMult);
2549  // EXTRA correlations vs M for v3{5} study (to be improved - put them in a right order somewhere):
2550  fIntFlowCorrelationsAllVsMPro[32] = new TProfile("four4n2n3n3n","#LT#LT4#GT#GT_{4n,2n|3n,3n}",fnBinsMult,fMinMult,fMaxMult);
2551  fIntFlowCorrelationsAllVsMPro[33] = new TProfile("five3n3n2n2n2n","#LT#LT5#GT#GT_{3n,3n|2n,2n,2n}",fnBinsMult,fMinMult,fMaxMult);
2552  // EXTRA correlations vs M for Teaney-Yan study (to be improved - put them in a right order somewhere):
2553  fIntFlowCorrelationsAllVsMPro[34] = new TProfile("two5n5n","#LT#LT2#GT#GT_{5n|5n}",fnBinsMult,fMinMult,fMaxMult);
2554  fIntFlowCorrelationsAllVsMPro[35] = new TProfile("two6n6n","#LT#LT2#GT#GT_{6n|6n}",fnBinsMult,fMinMult,fMaxMult);
2555  fIntFlowCorrelationsAllVsMPro[36] = new TProfile("three5n3n2n","#LT#LT3#GT#GT_{5n|3n,2n}",fnBinsMult,fMinMult,fMaxMult);
2556  fIntFlowCorrelationsAllVsMPro[37] = new TProfile("three5n4n1n","#LT#LT3#GT#GT_{5n|4n,1n}",fnBinsMult,fMinMult,fMaxMult);
2557  fIntFlowCorrelationsAllVsMPro[38] = new TProfile("three6n3n3n","#LT#LT3#GT#GT_{6n|3n,3n}",fnBinsMult,fMinMult,fMaxMult);
2558  fIntFlowCorrelationsAllVsMPro[39] = new TProfile("three6n4n2n","#LT#LT3#GT#GT_{6n|4n,2n}",fnBinsMult,fMinMult,fMaxMult);
2559  fIntFlowCorrelationsAllVsMPro[40] = new TProfile("three6n5n1n","#LT#LT3#GT#GT_{6n|5n,1n}",fnBinsMult,fMinMult,fMaxMult);
2560  fIntFlowCorrelationsAllVsMPro[41] = new TProfile("four6n3n2n1n","#LT#LT4#GT#GT_{6n|3n,2n,1n}",fnBinsMult,fMinMult,fMaxMult);
2561  fIntFlowCorrelationsAllVsMPro[42] = new TProfile("four3n2n3n2n","#LT#LT4#GT#GT_{3n,2n|3n,2n}",fnBinsMult,fMinMult,fMaxMult);
2562  fIntFlowCorrelationsAllVsMPro[43] = new TProfile("four4n1n3n2n","#LT#LT4#GT#GT_{4n,1n|3n,2n}",fnBinsMult,fMinMult,fMaxMult);
2563  fIntFlowCorrelationsAllVsMPro[44] = new TProfile("four3n3n3n3n","#LT#LT4#GT#GT_{3n,3n|3n,3n}",fnBinsMult,fMinMult,fMaxMult);
2564  fIntFlowCorrelationsAllVsMPro[45] = new TProfile("four4n2n3n3n","#LT#LT4#GT#GT_{4n,2n|3n,3n}",fnBinsMult,fMinMult,fMaxMult);
2565  fIntFlowCorrelationsAllVsMPro[46] = new TProfile("four5n1n3n3n","#LT#LT4#GT#GT_{5n,1n|3n,3n}",fnBinsMult,fMinMult,fMaxMult);
2566  fIntFlowCorrelationsAllVsMPro[47] = new TProfile("four4n2n4n2n","#LT#LT4#GT#GT_{4n,2n|4n,2n}",fnBinsMult,fMinMult,fMaxMult);
2567  fIntFlowCorrelationsAllVsMPro[48] = new TProfile("four5n1n4n2n","#LT#LT4#GT#GT_{5n,1n|4n,2n}",fnBinsMult,fMinMult,fMaxMult);
2568  fIntFlowCorrelationsAllVsMPro[49] = new TProfile("four5n3n1n1n","#LT#LT4#GT#GT_{5n|3n,1n,1n}",fnBinsMult,fMinMult,fMaxMult);
2569  fIntFlowCorrelationsAllVsMPro[50] = new TProfile("four5n2n2n1n","#LT#LT4#GT#GT_{5n|2n,2n,1n}",fnBinsMult,fMinMult,fMaxMult);
2570  fIntFlowCorrelationsAllVsMPro[51] = new TProfile("four5n1n5n1n","#LT#LT4#GT#GT_{5n,1n|5n,1n}",fnBinsMult,fMinMult,fMaxMult);
2571  fIntFlowCorrelationsAllVsMPro[52] = new TProfile("five3n3n3n2n1n","#LT#LT5#GT#GT_{3n,3n|3n,2n,1n}",fnBinsMult,fMinMult,fMaxMult);
2572  fIntFlowCorrelationsAllVsMPro[53] = new TProfile("five4n2n3n2n1n","#LT#LT5#GT#GT_{4n,2n|3n,2n,1n}",fnBinsMult,fMinMult,fMaxMult);
2573  fIntFlowCorrelationsAllVsMPro[54] = new TProfile("five3n2n3n1n1n","#LT#LT5#GT#GT_{3n,2n|3n,1n,1n}",fnBinsMult,fMinMult,fMaxMult);
2574  fIntFlowCorrelationsAllVsMPro[55] = new TProfile("five3n2n2n2n1n","#LT#LT5#GT#GT_{3n,2n|2n,2n,1n}",fnBinsMult,fMinMult,fMaxMult);
2575  fIntFlowCorrelationsAllVsMPro[56] = new TProfile("five5n1n3n2n1n","#LT#LT5#GT#GT_{5n,1n|3n,2n,1n}",fnBinsMult,fMinMult,fMaxMult);
2576  fIntFlowCorrelationsAllVsMPro[57] = new TProfile("six3n2n1n3n2n1n","#LT#LT6#GT#GT_{3n,2n,1n|3n,2n,1n}",fnBinsMult,fMinMult,fMaxMult);
2577  fIntFlowCorrelationsAllVsMPro[58] = new TProfile("four6n4n1n1n","#LT#LT4#GT#GT_{6n|4n,1n,1n}",fnBinsMult,fMinMult,fMaxMult);
2578  fIntFlowCorrelationsAllVsMPro[59] = new TProfile("four6n2n2n2n","#LT#LT4#GT#GT_{6n|2n,2n,2n}",fnBinsMult,fMinMult,fMaxMult);
2579  fIntFlowCorrelationsAllVsMPro[60] = new TProfile("five6n2n2n1n1n","#LT#LT5#GT#GT_{6n|2n,2n,1n,1n}",fnBinsMult,fMinMult,fMaxMult);
2580  fIntFlowCorrelationsAllVsMPro[61] = new TProfile("five4n1n1n3n3n","#LT#LT5#GT#GT_{4n,1n,1n|3n,3n}",fnBinsMult,fMinMult,fMaxMult);
2581  fIntFlowCorrelationsAllVsMPro[62] = new TProfile("six3n3n2n2n1n1n","#LT#LT6#GT#GT_{3n,3n|2n,2n,1n,1n}",fnBinsMult,fMinMult,fMaxMult);
2582  for(Int_t n=0;n<63;n++)
2583  {
2585  {
2586  fIntFlowCorrelationsAllVsMPro[n]->Sumw2();
2588  {
2589  fIntFlowCorrelationsAllVsMPro[n]->GetXaxis()->SetTitle("# RPs");
2591  {
2592  fIntFlowCorrelationsAllVsMPro[n]->GetXaxis()->SetTitle("Reference multiplicity (from ESD)");
2594  {
2595  fIntFlowCorrelationsAllVsMPro[n]->GetXaxis()->SetTitle("# POIs");
2596  }
2598  } // end of if(fIntFlowCorrelationsAllVsMPro[n])
2599  } // end of for(Int_t n=0;n<63;n++)
2600  } // end of if(fCalculateAllCorrelationsVsM)
2601  // when particle weights are used some extra correlations appear:
2603  {
2604  TString intFlowExtraCorrelationsProName = "fIntFlowExtraCorrelationsPro";
2605  intFlowExtraCorrelationsProName += fAnalysisLabel->Data();
2606  fIntFlowExtraCorrelationsPro = new TProfile(intFlowExtraCorrelationsProName.Data(),"Average extra correlations for all events",100,0,100,"s");
2607  fIntFlowExtraCorrelationsPro->SetTickLength(-0.01,"Y");
2608  fIntFlowExtraCorrelationsPro->SetMarkerStyle(25);
2609  fIntFlowExtraCorrelationsPro->SetLabelSize(0.03);
2610  fIntFlowExtraCorrelationsPro->SetLabelOffset(0.01,"Y");
2611  // extra 2-p correlations:
2612  (fIntFlowExtraCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<w1^3 w2 cos(n*(phi1-phi2))>>");
2613  (fIntFlowExtraCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<w1 w2 w3^2 cos(n*(phi1-phi2))>>");
2615  } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights||fUseTrackWeights)
2616  // average product of correlations <2>, <4>, <6> and <8>:
2617  TString productFlag[6] = {"#LT#LT2#GT#LT4#GT#GT","#LT#LT2#GT#LT6#GT#GT","#LT#LT2#GT#LT8#GT#GT",
2618  "#LT#LT4#GT#LT6#GT#GT","#LT#LT4#GT#LT8#GT#GT","#LT#LT6#GT#LT8#GT#GT"};
2619  TString intFlowProductOfCorrelationsProName = "fIntFlowProductOfCorrelationsPro";
2620  intFlowProductOfCorrelationsProName += fAnalysisLabel->Data();
2621  fIntFlowProductOfCorrelationsPro = new TProfile(intFlowProductOfCorrelationsProName.Data(),"Average products of correlations",6,0,6);
2622  fIntFlowProductOfCorrelationsPro->SetTickLength(-0.01,"Y");
2623  fIntFlowProductOfCorrelationsPro->SetMarkerStyle(25);
2624  fIntFlowProductOfCorrelationsPro->SetLabelSize(0.05);
2625  fIntFlowProductOfCorrelationsPro->SetLabelOffset(0.01,"Y");
2626  for(Int_t b=0;b<6;b++)
2627  {
2628  (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(b+1,productFlag[b].Data());
2629  }
2631  // average product of correlations <2>, <4>, <6> and <8> versus multiplicity
2632  // [0=<<2><4>>,1=<<2><6>>,2=<<2><8>>,3=<<4><6>>,4=<<4><8>>,5=<<6><8>>]
2634  {
2635  TString intFlowProductOfCorrelationsVsMProName = "fIntFlowProductOfCorrelationsVsMPro";
2636  intFlowProductOfCorrelationsVsMProName += fAnalysisLabel->Data();
2637  for(Int_t pi=0;pi<6;pi++)
2638  {
2639  fIntFlowProductOfCorrelationsVsMPro[pi] = new TProfile(Form("%s, %s",intFlowProductOfCorrelationsVsMProName.Data(),productFlag[pi].Data()),
2640  Form("%s versus multiplicity",productFlag[pi].Data()),
2643  {
2644  fIntFlowProductOfCorrelationsVsMPro[pi]->GetXaxis()->SetTitle("# RPs");
2646  {
2647  fIntFlowProductOfCorrelationsVsMPro[pi]->GetXaxis()->SetTitle("Reference multiplicity (from ESD)");
2649  {
2650  fIntFlowProductOfCorrelationsVsMPro[pi]->GetXaxis()->SetTitle("# POIs");
2651  }
2653  } // end of for(Int_t pi=0;pi<6;pi++)
2654  } // end of if(fCalculateCumulantsVsM)
2655  // average product of correction terms for NUA:
2656  TString intFlowProductOfCorrectionTermsForNUAProName = "fIntFlowProductOfCorrectionTermsForNUAPro";
2657  intFlowProductOfCorrectionTermsForNUAProName += fAnalysisLabel->Data();
2658  fIntFlowProductOfCorrectionTermsForNUAPro = new TProfile(intFlowProductOfCorrectionTermsForNUAProName.Data(),"Average products of correction terms for NUA",27,0,27);
2659  fIntFlowProductOfCorrectionTermsForNUAPro->SetTickLength(-0.01,"Y");
2660  fIntFlowProductOfCorrectionTermsForNUAPro->SetMarkerStyle(25);
2661  fIntFlowProductOfCorrectionTermsForNUAPro->SetLabelSize(0.03);
2662  fIntFlowProductOfCorrectionTermsForNUAPro->SetLabelOffset(0.01,"Y");
2663  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(1,"<<2><cos(#phi)>>");
2664  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(2,"<<2><sin(#phi)>>");
2665  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(3,"<<cos(#phi)><sin(#phi)>>");
2666  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(4,"Cov(<2>,<cos(#phi_{1}+#phi_{2})>)");
2667  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(5,"Cov(<2>,<sin(#phi_{1}+#phi_{2})>)");
2668  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(6,"Cov(<2>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2669  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(7,"Cov(<2>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2670  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(8,"Cov(<4>,<cos(#phi)>)");
2671  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(9,"Cov(<4>,<sin(#phi)>)");
2672  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(10,"Cov(<4>,<cos(#phi_{1}+#phi_{2})>)");
2673  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(11,"Cov(<4>,<sin(#phi_{1}+#phi_{2})>)");
2674  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(12,"Cov(<4>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>>)");
2675  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(13,"Cov(<4>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>>)");
2676  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(14,"Cov(<cos(#phi)>,<cos(#phi_{1}+#phi_{2})>)");
2677  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(15,"Cov(<cos(#phi)>,<sin(#phi_{1}+#phi_{2})>)");
2678  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(16,"Cov(<cos(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2679  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(17,"Cov(<cos(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2680  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(18,"Cov(<sin(#phi)>,<cos(#phi_{1}+#phi_{2})>)");
2681  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(19,"Cov(<sin(#phi)>,<sin(#phi_{1}+#phi_{2})>)");
2682  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(20,"Cov(<sin(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2683  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(21,"Cov(<sin(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2684  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(22,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}+#phi_{2})>)");
2685  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(23,"Cov(<cos(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2686  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(24,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2687  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(25,"Cov(<sin(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2688  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(26,"Cov(<sin(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2689  (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(27,"Cov(<cos(#phi_{1}-#phi_{2}-#phi_{3}>,<sin(#phi_{1}-#phi_{2}-#phi_{3}>)");
2691  // average correction terms for non-uniform acceptance (with wrong errors!):
2692  for(Int_t sc=0;sc<2;sc++) // sin or cos terms
2693  {
2694  TString intFlowCorrectionTermsForNUAProName = "fIntFlowCorrectionTermsForNUAPro";
2695  intFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data();
2696  fIntFlowCorrectionTermsForNUAPro[sc] = new TProfile(Form("%s: %s terms",intFlowCorrectionTermsForNUAProName.Data(),sinCosFlag[sc].Data()),Form("Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),4,0,4,"s");
2697  fIntFlowCorrectionTermsForNUAPro[sc]->SetTickLength(-0.01,"Y");
2698  fIntFlowCorrectionTermsForNUAPro[sc]->SetMarkerStyle(25);
2699  fIntFlowCorrectionTermsForNUAPro[sc]->SetLabelSize(0.05);
2700  fIntFlowCorrectionTermsForNUAPro[sc]->SetLabelOffset(0.01,"Y");
2701  (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(1,Form("#LT#LT%s(n(#phi_{1}))#GT#GT",sinCosFlag[sc].Data()));
2702  (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(2,Form("#LT#LT%s(n(#phi_{1}+#phi_{2}))#GT#GT",sinCosFlag[sc].Data()));
2703  (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(3,Form("#LT#LT%s(n(#phi_{1}-#phi_{2}-#phi_{3}))#GT#GT",sinCosFlag[sc].Data()));
2704  (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(4,Form("#LT#LT%s(n(2#phi_{1}-#phi_{2}))#GT#GT",sinCosFlag[sc].Data()));
2706  // versus multiplicity:
2708  {
2709  TString correctionTermFlag[4] = {"(n(phi1))","(n(phi1+phi2))","(n(phi1-phi2-phi3))","(n(2phi1-phi2))"}; // to be improved - hardwired 4
2710  for(Int_t ci=0;ci<4;ci++) // correction term index (to be improved - hardwired 4)
2711  {
2712  TString intFlowCorrectionTermsForNUAVsMProName = "fIntFlowCorrectionTermsForNUAVsMPro";
2713  intFlowCorrectionTermsForNUAVsMProName += fAnalysisLabel->Data();
2714  fIntFlowCorrectionTermsForNUAVsMPro[sc][ci] = new TProfile(Form("%s: #LT#LT%s%s#GT#GT",intFlowCorrectionTermsForNUAVsMProName.Data(),sinCosFlag[sc].Data(),correctionTermFlag[ci].Data()),Form("#LT#LT%s%s#GT#GT vs M",sinCosFlag[sc].Data(),correctionTermFlag[ci].Data()),fnBinsMult,fMinMult,fMaxMult,"s");
2716  }
2717  } // end of if(fCalculateCumulantsVsM)
2718  } // end of for(Int_t sc=0;sc<2;sc++)
2719 
2720  // d) Book histograms holding the final results:
2721  // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with correct errors!):
2722  TString intFlowCorrelationsHistName = "fIntFlowCorrelationsHist";
2723  intFlowCorrelationsHistName += fAnalysisLabel->Data();
2724  fIntFlowCorrelationsHist = new TH1D(intFlowCorrelationsHistName.Data(),"Average correlations for all events",4,0,4);
2725  fIntFlowCorrelationsHist->SetTickLength(-0.01,"Y");
2726  fIntFlowCorrelationsHist->SetMarkerStyle(25);
2727  fIntFlowCorrelationsHist->SetLabelSize(0.06);
2728  fIntFlowCorrelationsHist->SetLabelOffset(0.01,"Y");
2729  (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(1,"#LT#LT2#GT#GT");
2730  (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(2,"#LT#LT4#GT#GT");
2731  (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(3,"#LT#LT6#GT#GT");
2732  (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(4,"#LT#LT8#GT#GT");
2734  // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with correct errors!) vs M:
2736  {
2737  for(Int_t ci=0;ci<4;ci++) // correlation index
2738  {
2739  TString intFlowCorrelationsVsMHistName = "fIntFlowCorrelationsVsMHist";
2740  intFlowCorrelationsVsMHistName += fAnalysisLabel->Data();
2741  fIntFlowCorrelationsVsMHist[ci] = new TH1D(Form("%s, %s",intFlowCorrelationsVsMHistName.Data(),correlationFlag[ci].Data()),
2742  Form("%s vs multiplicity",correlationFlag[ci].Data()),
2744  fIntFlowCorrelationsVsMHist[ci]->GetYaxis()->SetTitle(correlationFlag[ci].Data());
2746  {
2747  fIntFlowCorrelationsVsMHist[ci]->GetXaxis()->SetTitle("# RPs");
2749  {
2750  fIntFlowCorrelationsVsMHist[ci]->GetXaxis()->SetTitle("Reference multiplicity (from ESD)");
2752  {
2753  fIntFlowCorrelationsVsMHist[ci]->GetXaxis()->SetTitle("# POIs");
2754  }
2756  } // end of for(Int_t ci=0;ci<4;ci++) // correlation index
2757  } // end of if(fCalculateCumulantsVsM)
2758  // average all correlations for all events (with correct errors!):
2759  TString intFlowCorrelationsAllHistName = "fIntFlowCorrelationsAllHist";
2760  intFlowCorrelationsAllHistName += fAnalysisLabel->Data();
2761  fIntFlowCorrelationsAllHist = new TH1D(intFlowCorrelationsAllHistName.Data(),"Average correlations for all events",34,0,34);
2762  fIntFlowCorrelationsAllHist->SetTickLength(-0.01,"Y");
2763  fIntFlowCorrelationsAllHist->SetMarkerStyle(25);
2764  fIntFlowCorrelationsAllHist->SetLabelSize(0.03);
2765  fIntFlowCorrelationsAllHist->SetLabelOffset(0.01,"Y");
2766  // 2-p correlations:
2767  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}");
2768  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}");
2769  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}");
2770  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}");
2771  // 3-p correlations:
2772  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}");
2773  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}");
2774  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}");
2775  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}");
2776  // 4-p correlations:
2777  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}");
2778  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}");
2779  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}");
2780  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}");
2781  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}");
2782  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}");
2783  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}");
2784  // 5-p correlations:
2785  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}");
2786  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}");
2787  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}");
2788  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}");
2789  // 6-p correlations:
2790  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}");
2791  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}");
2792  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}");
2793  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}");
2794  // 7-p correlations:
2795  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}");
2796  // 8-p correlations:
2797  (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}");
2799  // average correction terms for non-uniform acceptance (with correct errors!):
2800  for(Int_t sc=0;sc<2;sc++) // sin or cos terms
2801  {
2802  TString intFlowCorrectionTermsForNUAHistName = "fIntFlowCorrectionTermsForNUAHist";
2803  intFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data();
2804  fIntFlowCorrectionTermsForNUAHist[sc] = new TH1D(Form("%s: %s terms",intFlowCorrectionTermsForNUAHistName.Data(),sinCosFlag[sc].Data()),Form("Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),4,0,4);
2805  fIntFlowCorrectionTermsForNUAHist[sc]->SetTickLength(-0.01,"Y");
2806  fIntFlowCorrectionTermsForNUAHist[sc]->SetMarkerStyle(25);
2807  fIntFlowCorrectionTermsForNUAHist[sc]->SetLabelSize(0.05);
2808  fIntFlowCorrectionTermsForNUAHist[sc]->SetLabelOffset(0.01,"Y");
2809  (fIntFlowCorrectionTermsForNUAHist[sc]->GetXaxis())->SetBinLabel(1,Form("#LT#LT%s(n(#phi_{1}))#GT#GT",sinCosFlag[sc].Data()));
2810  (fIntFlowCorrectionTermsForNUAHist[sc]->GetXaxis())->SetBinLabel(2,Form("#LT#LT%s(n(#phi_{1}+#phi_{2}))#GT#GT",sinCosFlag[sc].Data()));
2811  (fIntFlowCorrectionTermsForNUAHist[sc]->GetXaxis())->SetBinLabel(3,Form("#LT#LT%s(n(#phi_{1}-#phi_{2}-#phi_{3}))#GT#GT",sinCosFlag[sc].Data()));
2812  (fIntFlowCorrectionTermsForNUAHist[sc]->GetXaxis())->SetBinLabel(4,Form("#LT#LT%s(n(2#phi_{1}-#phi_{2}))#GT#GT",sinCosFlag[sc].Data()));
2814  } // end of for(Int_t sc=0;sc<2;sc++)
2815  // covariances (multiplied with weight dependent prefactor):
2816  TString intFlowCovariancesName = "fIntFlowCovariances";
2817  intFlowCovariancesName += fAnalysisLabel->Data();
2818  fIntFlowCovariances = new TH1D(intFlowCovariancesName.Data(),"Covariances (multiplied with weight dependent prefactor)",6,0,6);
2819  fIntFlowCovariances->SetLabelSize(0.04);
2820  fIntFlowCovariances->SetMarkerStyle(25);
2821  (fIntFlowCovariances->GetXaxis())->SetBinLabel(1,"Cov(#LT2#GT,#LT4#GT)");
2822  (fIntFlowCovariances->GetXaxis())->SetBinLabel(2,"Cov(#LT2#GT,#LT6#GT)");
2823  (fIntFlowCovariances->GetXaxis())->SetBinLabel(3,"Cov(#LT2#GT,#LT8#GT)");
2824  (fIntFlowCovariances->GetXaxis())->SetBinLabel(4,"Cov(#LT4#GT,#LT6#GT)");
2825  (fIntFlowCovariances->GetXaxis())->SetBinLabel(5,"Cov(#LT4#GT,#LT8#GT)");
2826  (fIntFlowCovariances->GetXaxis())->SetBinLabel(6,"Cov(#LT6#GT,#LT8#GT)");
2828  // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>:
2829  TString intFlowSumOfEventWeightsName = "fIntFlowSumOfEventWeights";
2830  intFlowSumOfEventWeightsName += fAnalysisLabel->Data();
2831  for(Int_t power=0;power<2;power++)
2832  {
2833  fIntFlowSumOfEventWeights[power] = new TH1D(Form("%s: %s",intFlowSumOfEventWeightsName.Data(),powerFlag[power].Data()),Form("Sum of %s event weights for correlations",powerFlag[power].Data()),4,0,4);
2834  fIntFlowSumOfEventWeights[power]->SetLabelSize(0.04);
2835  fIntFlowSumOfEventWeights[power]->SetMarkerStyle(25);
2836  if(power == 0)
2837  {
2838  (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{#LT2#GT}");
2839  (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{#LT4#GT}");
2840  (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{#LT6#GT}");
2841  (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{#LT8#GT}");
2842  } else if (power == 1)
2843  {
2844  (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{#LT2#GT}^{2}");
2845  (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{#LT4#GT}^{2}");
2846  (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{#LT6#GT}^{2}");
2847  (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{#LT8#GT}^{2}");
2848  }
2850  }
2851  // sum of products of event weights for correlations <2>, <4>, <6> and <8>:
2852  TString intFlowSumOfProductOfEventWeightsName = "fIntFlowSumOfProductOfEventWeights";
2853  intFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data();
2854  fIntFlowSumOfProductOfEventWeights = new TH1D(intFlowSumOfProductOfEventWeightsName.Data(),"Sum of product of event weights for correlations",6,0,6);
2855  fIntFlowSumOfProductOfEventWeights->SetLabelSize(0.04);
2856  fIntFlowSumOfProductOfEventWeights->SetMarkerStyle(25);
2857  (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{#LT2#GT} w_{#LT4#GT}");
2858  (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{#LT2#GT} w_{#LT6#GT}");
2859  (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{#LT2#GT} w_{#LT8#GT}");
2860  (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{#LT4#GT} w_{#LT6#GT}");
2861  (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(5,"#sum_{i=1}^{N} w_{#LT4#GT} w_{#LT8#GT}");
2862  (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(6,"#sum_{i=1}^{N} w_{#LT6#GT} w_{#LT8#GT}");
2864  // final result for covariances of correlations (multiplied with weight dependent prefactor) versus M
2865  // [0=Cov(2,4),1=Cov(2,6),2=Cov(2,8),3=Cov(4,6),4=Cov(4,8),5=Cov(6,8)]:
2867  {
2868  TString intFlowCovariancesVsMName = "fIntFlowCovariancesVsM";
2869  intFlowCovariancesVsMName += fAnalysisLabel->Data();
2870  TString covarianceFlag[6] = {"Cov(<2>,<4>)","Cov(<2>,<6>)","Cov(<2>,<8>)","Cov(<4>,<6>)","Cov(<4>,<8>)","Cov(<6>,<8>)"};
2871  for(Int_t ci=0;ci<6;ci++)
2872  {
2873  fIntFlowCovariancesVsM[ci] = new TH1D(Form("%s, %s",intFlowCovariancesVsMName.Data(),covarianceFlag[ci].Data()),
2874  Form("%s vs multiplicity",covarianceFlag[ci].Data()),
2876  fIntFlowCovariancesVsM[ci]->GetYaxis()->SetTitle(covarianceFlag[ci].Data());
2878  {
2879  fIntFlowCovariancesVsM[ci]->GetXaxis()->SetTitle("# RPs");
2881  {
2882  fIntFlowCovariancesVsM[ci]->GetXaxis()->SetTitle("Reference multiplicity (from ESD)");
2884  {
2885  fIntFlowCovariancesVsM[ci]->GetXaxis()->SetTitle("# POIs");
2886  }
2888  }
2889  } // end of if(fCalculateCumulantsVsM)
2890  // sum of linear and quadratic event weights for <2>, <4>, <6> and <8> versus multiplicity
2891  // [0=sum{w_{<2>}},1=sum{w_{<4>}},2=sum{w_{<6>}},3=sum{w_{<8>}}][0=linear 1,1=quadratic]:
2893  {
2894  TString intFlowSumOfEventWeightsVsMName = "fIntFlowSumOfEventWeightsVsM";
2895  intFlowSumOfEventWeightsVsMName += fAnalysisLabel->Data();
2896  TString sumFlag[2][4] = {{"#sum_{i=1}^{N} w_{<2>}","#sum_{i=1}^{N} w_{<4>}","#sum_{i=1}^{N} w_{<6>}","#sum_{i=1}^{N} w_{<8>}"},
2897  {"#sum_{i=1}^{N} w_{<2>}^{2}","#sum_{i=1}^{N} w_{<4>}^{2}","#sum_{i=1}^{N} w_{<6>}^{2}","#sum_{i=1}^{N} w_{<8>}^{2}"}};
2898  for(Int_t si=0;si<4;si++)
2899  {
2900  for(Int_t power=0;power<2;power++)
2901  {
2902  fIntFlowSumOfEventWeightsVsM[si][power] = new TH1D(Form("%s, %s",intFlowSumOfEventWeightsVsMName.Data(),sumFlag[power][si].Data()),
2903  Form("%s vs multiplicity",sumFlag[power][si].Data()),
2905  fIntFlowSumOfEventWeightsVsM[si][power]->GetYaxis()->SetTitle(sumFlag[power][si].Data());
2907  {
2908  fIntFlowSumOfEventWeightsVsM[si][power]->GetXaxis()->SetTitle("# RPs");
2910  {
2911  fIntFlowSumOfEventWeightsVsM[si][power]->GetXaxis()->SetTitle("Reference multiplicity (from ESD)");
2913  {
2914  fIntFlowSumOfEventWeightsVsM[si][power]->GetXaxis()->SetTitle("# POIs");
2915  }
2917  } // end of for(Int_t power=0;power<2;power++)
2918  } // end of for(Int_t si=0;si<4;si++)
2919  } // end of if(fCalculateCumulantsVsM)
2920  // sum of products of event weights for correlations <2>, <4>, <6> and <8> vs M
2921  // [0=sum{w_{<2>}w_{<4>}},1=sum{w_{<2>}w_{<6>}},2=sum{w_{<2>}w_{<8>}},
2922  // 3=sum{w_{<4>}w_{<6>}},4=sum{w_{<4>}w_{<8>}},5=sum{w_{<6>}w_{<8>}}]:
2924  {
2925  TString intFlowSumOfProductOfEventWeightsVsMName = "fIntFlowSumOfProductOfEventWeightsVsM";
2926  intFlowSumOfProductOfEventWeightsVsMName += fAnalysisLabel->Data();
2927  TString sopowFlag[6] = {"#sum_{i=1}^{N} w_{<2>} w_{<4>}","#sum_{i=1}^{N} w_{<2>} w_{<6>}","#sum_{i=1}^{N} w_{<2>} w_{<8>}",
2928  "#sum_{i=1}^{N} w_{<4>} w_{<6>}","#sum_{i=1}^{N} w_{<4>} w_{<8>}","#sum_{i=1}^{N} w_{<6>} w_{<8>}"};
2929  for(Int_t pi=0;pi<6;pi++)
2930  {
2931  fIntFlowSumOfProductOfEventWeightsVsM[pi] = new TH1D(Form("%s, %s",intFlowSumOfProductOfEventWeightsVsMName.Data(),sopowFlag[pi].Data()),
2932  Form("%s versus multiplicity",sopowFlag[pi].Data()),
2935  {
2936  fIntFlowSumOfProductOfEventWeightsVsM[pi]->GetXaxis()->SetTitle("# RPs");
2938  {
2939  fIntFlowSumOfProductOfEventWeightsVsM[pi]->GetXaxis()->SetTitle("Reference multiplicity (from ESD)");
2941  {
2942  fIntFlowSumOfProductOfEventWeightsVsM[pi]->GetXaxis()->SetTitle("# POIs");
2943  }
2944  fIntFlowSumOfProductOfEventWeightsVsM[pi]->GetYaxis()->SetTitle(sopowFlag[pi].Data());
2946  } // end of for(Int_t pi=0;pi<6;pi++)
2947  } // end of if(fCalculateCumulantsVsM)
2948  // covariances of NUA terms (multiplied with weight dependent prefactor):
2949  TString intFlowCovariancesNUAName = "fIntFlowCovariancesNUA";
2950  intFlowCovariancesNUAName += fAnalysisLabel->Data();
2951  fIntFlowCovariancesNUA = new TH1D(intFlowCovariancesNUAName.Data(),"Covariances for NUA (multiplied with weight dependent prefactor)",27,0,27);
2952  fIntFlowCovariancesNUA->SetLabelSize(0.04);
2953  fIntFlowCovariancesNUA->SetMarkerStyle(25);
2954  fIntFlowCovariancesNUA->GetXaxis()->SetLabelSize(0.02);
2955  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(1,"Cov(<2>,<cos(#phi)>");
2956  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(2,"Cov(<2>,<sin(#phi)>)");
2957  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(3,"Cov(<cos(#phi)>,<sin(#phi)>)");
2958  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(4,"Cov(<2>,<cos(#phi_{1}+#phi_{2})>)");
2959  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(5,"Cov(<2>,<sin(#phi_{1}+#phi_{2})>)");
2960  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(6,"Cov(<2>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2961  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(7,"Cov(<2>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2962  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(8,"Cov(<4>,<cos(#phi)>)");
2963  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(9,"Cov(<4>,<sin(#phi)>)");
2964  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(10,"Cov(<4>,<cos(#phi_{1}+#phi_{2})>)");
2965  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(11,"Cov(<4>,<sin(#phi_{1}+#phi_{2})>)");
2966  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(12,"Cov(<4>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>>)");
2967  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(13,"Cov(<4>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>>)");
2968  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(14,"Cov(<cos(#phi)>,<cos(#phi_{1}+#phi_{2})>)");
2969  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(15,"Cov(<cos(#phi)>,<sin(#phi_{1}+#phi_{2})>)");
2970  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(16,"Cov(<cos(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2971  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(17,"Cov(<cos(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2972  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(18,"Cov(<sin(#phi)>,<cos(#phi_{1}+#phi_{2})>)");
2973  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(19,"Cov(<sin(#phi)>,<sin(#phi_{1}+#phi_{2})>)");
2974  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(20,"Cov(<sin(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2975  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(21,"Cov(<sin(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2976  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(22,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}+#phi_{2})>)");
2977  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(23,"Cov(<cos(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2978  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(24,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2979  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(25,"Cov(<sin(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2980  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(26,"Cov(<sin(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2981  (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(27,"Cov(<cos(#phi_{1}-#phi_{2}-#phi_{3}>,<sin(#phi_{1}-#phi_{2}-#phi_{3}>)");
2983  // sum of linear and quadratic event weights for NUA terms:
2984  TString intFlowSumOfEventWeightsNUAName = "fIntFlowSumOfEventWeightsNUA";
2985  intFlowSumOfEventWeightsNUAName += fAnalysisLabel->Data();
2986  for(Int_t sc=0;sc<2;sc++)
2987  {
2988  for(Int_t power=0;power<2;power++)
2989  {
2990  fIntFlowSumOfEventWeightsNUA[sc][power] = new TH1D(Form("%s: %s, %s",intFlowSumOfEventWeightsNUAName.Data(),powerFlag[power].Data(),sinCosFlag[sc].Data()),Form("Sum of %s event weights for NUA %s terms",powerFlag[power].Data(),sinCosFlag[sc].Data()),4,0,4); // to be improved - 4
2991  fIntFlowSumOfEventWeightsNUA[sc][power]->SetLabelSize(0.05);
2992  fIntFlowSumOfEventWeightsNUA[sc][power]->SetMarkerStyle(25);
2993  if(power == 0)
2994  {
2995  (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(1,Form("#sum_{i=1}^{N} w_{<%s(#phi)>}",sinCosFlag[sc].Data()));
2996  (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(2,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}+#phi_{2})>}",sinCosFlag[sc].Data()));
2997  (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(3,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}-#phi_{2}-#phi_{3})>}",sinCosFlag[sc].Data()));
2998  (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(4,Form("#sum_{i=1}^{N} w_{<%s(2#phi_{1}-#phi_{2})>}",sinCosFlag[sc].Data()));
2999  } else if(power == 1)
3000  {
3001  (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(1,Form("#sum_{i=1}^{N} w_{<%s(#phi)>}^{2}",sinCosFlag[sc].Data()));
3002  (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(2,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}+#phi_{2})>}^{2}",sinCosFlag[sc].Data()));
3003  (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(3,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}-#phi_{2}-#phi_{3})>}^{2}",sinCosFlag[sc].Data()));
3004  (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(4,Form("#sum_{i=1}^{N} w_{<%s(2#phi_{1}-#phi_{2})>}^{2}",sinCosFlag[sc].Data()));
3005  }
3007  }
3008  }
3009  // sum of products of event weights for NUA terms:
3010  TString intFlowSumOfProductOfEventWeightsNUAName = "fIntFlowSumOfProductOfEventWeightsNUA";
3011  intFlowSumOfProductOfEventWeightsNUAName += fAnalysisLabel->Data();
3012  fIntFlowSumOfProductOfEventWeightsNUA = new TH1D(intFlowSumOfProductOfEventWeightsNUAName.Data(),"Sum of product of event weights for NUA terms",27,0,27);
3013  fIntFlowSumOfProductOfEventWeightsNUA->SetLabelSize(0.02);
3014  fIntFlowSumOfProductOfEventWeightsNUA->SetMarkerStyle(25);
3015  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{#LT2#GT} w_{#LTcos(#phi)#GT}");
3016  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{#LT2#GT} w_{#LTsin(#phi)#GT}");
3017  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{#LTcos(#phi)#GT} w_{#LTsin(#phi)#GT}");
3018  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{#LT2#GT} w_{#LTcos(#phi_{1}+#phi_{2})#GT}");
3019  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(5,"#sum_{i=1}^{N} w_{#LT2#GT} w_{#LTsin(#phi_{1}+#phi_{2})#GT}");
3020  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(6,"#sum_{i=1}^{N} w_{#LT2#GT} w_{#LTcos(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3021  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(7,"#sum_{i=1}^{N} w_{#LT2#GT} w_{#LTsin(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3022  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(8,"#sum_{i=1}^{N} w_{#LT4#GT} w_{#LTcos(#phi)#GT}");
3023  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(9,"#sum_{i=1}^{N} w_{#LT4#GT} w_{#LTsin(#phi)#GT}");
3024  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(10,"#sum_{i=1}^{N} w_{#LT4#GT} w_{#LTcos(#phi_{1}+#phi_{2})#GT}");
3025  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(11,"#sum_{i=1}^{N} w_{#LT4#GT} w_{#LTsin(#phi_{1}+#phi_{2})#GT}");
3026  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(12,"#sum_{i=1}^{N} w_{#LT4#GT} w_{#LTcos(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3027  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(13,"#sum_{i=1}^{N} w_{#LT4#GT} w_{#LTsin(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3028  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(14,"#sum_{i=1}^{N} w_{#LTcos(#phi)#GT} w_{#LTcos(#phi_{1}+#phi_{2})#GT}");
3029  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(15,"#sum_{i=1}^{N} w_{#LTcos(#phi)#GT} w_{#LTsin(#phi_{1}+#phi_{2})#GT}");
3030  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(16,"#sum_{i=1}^{N} w_{#LTcos(#phi)#GT} w_{#LTcos(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3031  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(17,"#sum_{i=1}^{N} w_{#LTcos(#phi)#GT} w_{#LTsin(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3032  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(18,"#sum_{i=1}^{N} w_{#LTsin(#phi)#GT} w_{#LTcos(#phi_{1}+#phi_{2})#GT}");
3033  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(19,"#sum_{i=1}^{N} w_{#LTsin(#phi)#GT} w_{#LTsin(#phi_{1}+#phi_{2})#GT}");
3034  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(20,"#sum_{i=1}^{N} w_{#LTsin(#phi)#GT} w_{#LTcos(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3035  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(21,"#sum_{i=1}^{N} w_{#LTsin(#phi)#GT} w_{#LTsin(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3036  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(22,"#sum_{i=1}^{N} w_{#LTcos(#phi_{1}+#phi_{2})#GT} w_{#LTsin(#phi_{1}+#phi_{2})#GT}");
3037  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(23,"#sum_{i=1}^{N} w_{#LTcos(#phi_{1}+#phi_{2})#GT} w_{#LTcos(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3038  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(24,"#sum_{i=1}^{N} w_{#LTcos(#phi_{1}+#phi_{2})#GT} w_{#LTsin(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3039  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(25,"#sum_{i=1}^{N} w_{#LTsin(#phi_{1}+#phi_{2})#GT} w_{#LTcos(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3040  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(26,"#sum_{i=1}^{N} w_{#LTsin(#phi_{1}+#phi_{2})#GT} w_{#LTsin(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3041  (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(27,"#sum_{i=1}^{N} w_{#LTcos(#phi_{1}-#phi_{2}-#phi_{3})#GT} w_{#LTsin(#phi_{1}-#phi_{2}-#phi_{3})#GT}");
3043  // Final results for reference Q-cumulants:
3044  TString cumulantFlag[4] = {"QC{2}","QC{4}","QC{6}","QC{8}"};
3045  TString intFlowQcumulantsName = "fIntFlowQcumulants";
3046  intFlowQcumulantsName += fAnalysisLabel->Data();
3047  fIntFlowQcumulants = new TH1D(intFlowQcumulantsName.Data(),"Reference Q-cumulants",4,0,4);
3049  {
3050  fIntFlowQcumulants->SetTitle("Reference Q-cumulants (error from non-isotropic terms also propagated)");
3051  }
3052  fIntFlowQcumulants->SetLabelSize(0.05);
3053  fIntFlowQcumulants->SetMarkerStyle(25);
3054  for(Int_t b=0;b<4;b++)
3055  {
3056  (fIntFlowQcumulants->GetXaxis())->SetBinLabel(b+1,cumulantFlag[b].Data());
3057  }
3059  // Final results for reference Q-cumulants rebinned in M:
3061  {
3062  TString intFlowQcumulantsRebinnedInMName = "fIntFlowQcumulantsRebinnedInM";
3063  intFlowQcumulantsRebinnedInMName += fAnalysisLabel->Data();
3064  fIntFlowQcumulantsRebinnedInM = new TH1D(intFlowQcumulantsRebinnedInMName.Data(),"Reference Q-cumulants rebinned in M",4,0,4);
3065  fIntFlowQcumulantsRebinnedInM->SetLabelSize(0.05);
3066  fIntFlowQcumulantsRebinnedInM->SetMarkerStyle(25);
3067  for(Int_t b=0;b<4;b++)
3068  {
3069  (fIntFlowQcumulantsRebinnedInM->GetXaxis())->SetBinLabel(b+1,cumulantFlag[b].Data());
3070  }
3072  } // end of if(fCalculateCumulantsVsM)
3073  // Ratio between error squared: with/without non-isotropic terms:
3074  TString intFlowQcumulantsErrorSquaredRatioName = "fIntFlowQcumulantsErrorSquaredRatio";
3075  intFlowQcumulantsErrorSquaredRatioName += fAnalysisLabel->Data();
3076  fIntFlowQcumulantsErrorSquaredRatio = new TH1D(intFlowQcumulantsErrorSquaredRatioName.Data(),"Error squared of reference Q-cumulants: #frac{with NUA terms}{without NUA terms}",4,0,4);
3077  fIntFlowQcumulantsErrorSquaredRatio->SetLabelSize(0.05);
3078  fIntFlowQcumulantsErrorSquaredRatio->SetMarkerStyle(25);
3079  for(Int_t b=0;b<4;b++)
3080  {
3081  (fIntFlowQcumulantsErrorSquaredRatio->GetXaxis())->SetBinLabel(b+1,cumulantFlag[b].Data());
3082  }
3084  // final results for integrated Q-cumulants versus multiplicity:
3086  {
3087  TString intFlowQcumulantsVsMName = "fIntFlowQcumulantsVsM";
3088  intFlowQcumulantsVsMName += fAnalysisLabel->Data();
3089  for(Int_t co=0;co<4;co++) // cumulant order
3090  {
3091  fIntFlowQcumulantsVsM[co] = new TH1D(Form("%s, %s",intFlowQcumulantsVsMName.Data(),cumulantFlag[co].Data()),
3092  Form("%s vs multiplicity",cumulantFlag[co].Data()),
3095  {
3096  fIntFlowQcumulantsVsM[co]->GetXaxis()->SetTitle("# RPs");
3098  {
3099  fIntFlowQcumulantsVsM[co]->GetXaxis()->SetTitle("Reference multiplicity (from ESD)");
3101  {
3102  fIntFlowQcumulantsVsM[co]->GetXaxis()->SetTitle("# POIs");
3103  }
3104  fIntFlowQcumulantsVsM[co]->GetYaxis()->SetTitle(cumulantFlag[co].Data());
3106  } // end of for(Int_t co=0;co<4;co++) // cumulant order
3107  } // end of if(fCalculateCumulantsVsM)
3108  // final integrated flow estimates from Q-cumulants:
3109  TString flowFlag[4] = {Form("v_{%d}{2,QC}",fHarmonic),Form("v_{%d}{4,QC}",fHarmonic),Form("v_{%d}{6,QC}",fHarmonic),Form("v_{%d}{8,QC}",fHarmonic)};
3110  TString intFlowName = "fIntFlow";
3111  intFlowName += fAnalysisLabel->Data();
3112  // integrated flow from Q-cumulants:
3113  fIntFlow = new TH1D(intFlowName.Data(),"Reference flow estimates from Q-cumulants",4,0,4);
3114  fIntFlow->SetLabelSize(0.05);
3115  fIntFlow->SetMarkerStyle(25);
3116  for(Int_t b=0;b<4;b++)
3117  {
3118  (fIntFlow->GetXaxis())->SetBinLabel(b+1,flowFlag[b].Data());
3119  }
3120  fIntFlowResults->Add(fIntFlow);
3121  // Reference flow vs M rebinned in one huge bin:
3123  {
3124  TString intFlowRebinnedInMName = "fIntFlowRebinnedInM";
3125  intFlowRebinnedInMName += fAnalysisLabel->Data();
3126  fIntFlowRebinnedInM = new TH1D(intFlowRebinnedInMName.Data(),"Reference flow estimates from Q-cumulants (rebinned in M)",4,0,4);
3127  fIntFlowRebinnedInM->SetLabelSize(0.05);
3128  fIntFlowRebinnedInM->SetMarkerStyle(25);
3129  for(Int_t b=0;b<4;b++)
3130  {
3131  (fIntFlowRebinnedInM->GetXaxis())->SetBinLabel(b+1,flowFlag[b].Data());
3132  }
3134  }
3135  // integrated flow from Q-cumulants: versus multiplicity:
3137  {
3138  TString intFlowVsMName = "fIntFlowVsM";
3139  intFlowVsMName += fAnalysisLabel->Data();
3140  for(Int_t co=0;co<4;co++) // cumulant order
3141  {
3142  fIntFlowVsM[co] = new TH1D(Form("%s, %s",intFlowVsMName.Data(),flowFlag[co].Data()),
3143  Form("%s vs multiplicity",flowFlag[co].Data()),
3146  {
3147  fIntFlowVsM[co]->GetXaxis()->SetTitle("# RPs");
3149  {
3150  fIntFlowVsM[co]->GetXaxis()->SetTitle("Reference multiplicity (from ESD)");
3152  {
3153  fIntFlowVsM[co]->GetXaxis()->SetTitle("# POIs");
3154  }
3155  fIntFlowVsM[co]->GetYaxis()->SetTitle(flowFlag[co].Data());
3156  fIntFlowResults->Add(fIntFlowVsM[co]);
3157  } // end of for(Int_t co=0;co<4;co++) // cumulant order
3158  } // end of if(fCalculateCumulantsVsM)
3159  // quantifying detector effects effects to correlations:
3160  TString intFlowDetectorBiasName = "fIntFlowDetectorBias";
3161  intFlowDetectorBiasName += fAnalysisLabel->Data();
3162  fIntFlowDetectorBias = new TH1D(intFlowDetectorBiasName.Data(),"Quantifying detector bias",4,0,4);
3163  fIntFlowDetectorBias->SetLabelSize(0.05);
3164  fIntFlowDetectorBias->SetMarkerStyle(25);
3165  for(Int_t ci=0;ci<4;ci++)
3166  {
3167  (fIntFlowDetectorBias->GetXaxis())->SetBinLabel(ci+1,Form("#frac{corrected}{measured} %s",cumulantFlag[ci].Data()));
3168  }
3170  // quantifying detector effects to correlations versus multiplicity:
3172  {
3173  TString intFlowDetectorBiasVsMName = "fIntFlowDetectorBiasVsM";
3174  intFlowDetectorBiasVsMName += fAnalysisLabel->Data();
3175  for(Int_t ci=0;ci<4;ci++) // correlation index
3176  {
3177  fIntFlowDetectorBiasVsM[ci] = new TH1D(Form("%s for %s",intFlowDetectorBiasVsMName.Data(),cumulantFlag[ci].Data()),
3178  Form("Quantifying detector bias for %s vs multiplicity",cumulantFlag[ci].Data()),
3181  {
3182  fIntFlowDetectorBiasVsM[ci]->GetXaxis()->SetTitle("# RPs");
3184  {
3185  fIntFlowDetectorBiasVsM[ci]->GetXaxis()->SetTitle("Reference multiplicity (from ESD)");
3187  {
3188  fIntFlowDetectorBiasVsM[ci]->GetXaxis()->SetTitle("# POIs");
3189  }
3190  fIntFlowDetectorBiasVsM[ci]->GetYaxis()->SetTitle("#frac{corrected}{measured}");
3192  } // end of for(Int_t co=0;co<4;co++) // cumulant order
3193  } // end of if(fCalculateCumulantsVsM)
3194 
3195 } // end of AliFlowAnalysisCRC::BookEverythingForIntegratedFlow()
3196 
3197 //=======================================================================================================================
3198 
3200 {
3201  // Book all objects for control histograms.
3202 
3203  // a) Book profile to hold all flags for control histograms;
3204  // b) Book all control histograms.
3205 
3206  // a) Book profile to hold all flags for control histograms:
3207  TString controlHistogramsFlagsName = "fControlHistogramsFlags";
3208  controlHistogramsFlagsName += fAnalysisLabel->Data();
3209  fControlHistogramsFlags = new TProfile(controlHistogramsFlagsName.Data(),"Flags for Control Histograms",2,0,2);
3210  fControlHistogramsFlags->SetTickLength(-0.01,"Y");
3211  fControlHistogramsFlags->SetMarkerStyle(25);
3212  fControlHistogramsFlags->SetLabelSize(0.04);
3213  fControlHistogramsFlags->SetLabelOffset(0.02,"Y");
3214  fControlHistogramsFlags->SetStats(kFALSE);
3215  fControlHistogramsFlags->GetXaxis()->SetBinLabel(1,"fStoreControlHistograms");
3216  fControlHistogramsFlags->GetXaxis()->SetBinLabel(2,"fUseQvectorTerms");
3218 
3219  if(!fStoreControlHistograms){return;}
3220 
3221  // b) Book all control histograms:
3222  // b1) Correlation between # RPs and ref. mult. determined centrally:
3223  TString sCorrelationNoRPsVsRefMultName = "fCorrelationNoRPsVsRefMult";
3224  sCorrelationNoRPsVsRefMultName += fAnalysisLabel->Data();
3225  fCorrelationNoRPsVsRefMult = new TH2D(sCorrelationNoRPsVsRefMultName.Data(),"# RPs vs. Reference Multiplicity",fnBinsMult,fMinMult,fMaxMult,fnBinsMult,fMinMult,fMaxMult);
3226  fCorrelationNoRPsVsRefMult->SetTickLength(-0.01,"Y");
3227  fCorrelationNoRPsVsRefMult->SetLabelSize(0.04);
3228  fCorrelationNoRPsVsRefMult->SetLabelOffset(0.02,"Y");
3229  fCorrelationNoRPsVsRefMult->SetStats(kTRUE);
3230  fCorrelationNoRPsVsRefMult->GetXaxis()->SetTitle("# RPs");
3231  fCorrelationNoRPsVsRefMult->GetYaxis()->SetTitle("Reference Multiplicity");
3233  // b2) Correlation between # POIs and ref. mult. determined centrally:
3234  TString sCorrelationNoPOIsVsRefMultName = "fCorrelationNoPOIsVsRefMult";
3235  sCorrelationNoPOIsVsRefMultName += fAnalysisLabel->Data();
3236  fCorrelationNoPOIsVsRefMult = new TH2D(sCorrelationNoPOIsVsRefMultName.Data(),"# POIs vs. Reference Multiplicity",fnBinsMult,fMinMult,fMaxMult,fnBinsMult,fMinMult,fMaxMult);
3237  fCorrelationNoPOIsVsRefMult->SetTickLength(-0.01,"Y");
3238  fCorrelationNoPOIsVsRefMult->SetLabelSize(0.04);
3239  fCorrelationNoPOIsVsRefMult->SetLabelOffset(0.02,"Y");
3240  fCorrelationNoPOIsVsRefMult->SetStats(kTRUE);
3241  fCorrelationNoPOIsVsRefMult->GetXaxis()->SetTitle("# POIs");
3242  fCorrelationNoPOIsVsRefMult->GetYaxis()->SetTitle("Reference Multiplicity");
3244  // b3) Correlation between # RPs and # POIs:
3245  TString sCorrelationNoRPsVsNoPOIsName = "fCorrelationNoRPsVsNoPOIs";
3246  sCorrelationNoRPsVsNoPOIsName += fAnalysisLabel->Data();
3247  fCorrelationNoRPsVsNoPOIs = new TH2D(sCorrelationNoRPsVsNoPOIsName.Data(),"# RPs vs. # POIs",fnBinsMult,fMinMult,fMaxMult,fnBinsMult,fMinMult,fMaxMult);
3248  fCorrelationNoRPsVsNoPOIs->SetTickLength(-0.01,"Y");
3249  fCorrelationNoRPsVsNoPOIs->SetLabelSize(0.04);
3250  fCorrelationNoRPsVsNoPOIs->SetLabelOffset(0.02,"Y");
3251  fCorrelationNoRPsVsNoPOIs->SetStats(kTRUE);
3252  fCorrelationNoRPsVsNoPOIs->GetXaxis()->SetTitle("# RPs");
3253  fCorrelationNoRPsVsNoPOIs->GetYaxis()->SetTitle("# POIs");
3255  // b4) <2>, <4>, <6> and <8> vs multiplicity (#RPs, #POIs or external):
3256  TString sCorrelation[4] = {"#LT2#GT","#LT4#GT","#LT6#GT","#LT8#GT"};
3257  TString sMultiplicity = "";
3259  {
3260  sMultiplicity = "# RPs";
3262  {
3263  sMultiplicity = "Reference multiplicity (from ESD)";
3265  {
3266  sMultiplicity = "# POIs";
3267  }
3268  for(Int_t ci=0;ci<4;ci++)
3269  {
3270  fCorrelation2468VsMult[ci] = new TH2D(Form("%s vs M",sCorrelation[ci].Data()),Form("%s vs M",sCorrelation[ci].Data()),fnBinsMult,fMinMult,fMaxMult,fnBinsForCorrelations,fMinValueOfCorrelation[ci],fMaxValueOfCorrelation[ci]);
3271  fCorrelation2468VsMult[ci]->SetTickLength(-0.01,"Y");
3272  fCorrelation2468VsMult[ci]->SetLabelSize(0.04);
3273  fCorrelation2468VsMult[ci]->SetLabelOffset(0.02,"Y");
3274  fCorrelation2468VsMult[ci]->SetStats(kTRUE);
3275  fCorrelation2468VsMult[ci]->GetXaxis()->SetTitle(sMultiplicity.Data());
3276  fCorrelation2468VsMult[ci]->GetYaxis()->SetTitle(sCorrelation[ci].Data());
3278  } // end of for(Int_t ci=0;ci<4;ci++)
3279  // b5) <2><4>, <2><6>, <2><8>, <4><6> etc. vs multiplicity (#RPs, #POIs or external):
3280  TString sCorrelationProduct[1] = {"#LT2#GT#LT4#GT"}; // TBI: add the other ones when needed first time
3281  for(Int_t cpi=0;cpi<1;cpi++) // TBI: hardwired 1
3282  {
3283  fCorrelationProduct2468VsMult[cpi] = new TH2D(Form("%s vs M",sCorrelationProduct[cpi].Data()),Form("%s vs M",sCorrelationProduct[cpi].Data()),fnBinsMult,fMinMult,fMaxMult,fnBinsForCorrelations,fMinValueOfCorrelationProduct[cpi],fMaxValueOfCorrelationProduct[cpi]);
3284  fCorrelationProduct2468VsMult[cpi]->SetTickLength(-0.01,"Y");
3285  fCorrelationProduct2468VsMult[cpi]->SetLabelSize(0.04);
3286  fCorrelationProduct2468VsMult[cpi]->SetLabelOffset(0.02,"Y");
3287  fCorrelationProduct2468VsMult[cpi]->SetStats(kTRUE);
3288  fCorrelationProduct2468VsMult[cpi]->GetXaxis()->SetTitle(sMultiplicity.Data());
3289  fCorrelationProduct2468VsMult[cpi]->GetYaxis()->SetTitle(sCorrelationProduct[cpi].Data());
3291  } // end of for(Int_t cpi=0;cpi<4;cpi++)
3292  // b6) |Qn|^2/M, |Q2n|^2/M, |Qn|^4/(M(2M-1)), Re[Q2nQn^*Qn^*]/M, ... vs multiplicity (#RPs, #POIs or external)
3293  if(fUseQvectorTerms)
3294  {
3295  TString sQvectorTerms[4] = {"#frac{|Q_{n}|^{2}}{M}","#frac{|Q_{2n}|^{2}}{M}","#frac{|Q_{n}|^{4}}{M(2M-1)}","#frac{Re[Q_{2n}Q_{n}^{*}Q_{n}^{*}]}{M^{3/2}}"}; // TBI: add the other ones when needed first time
3296  for(Int_t qvti=0;qvti<4;qvti++) // TBI: hardwired 4
3297  {
3298  fQvectorTermsVsMult[qvti] = new TH2D(Form("%s vs M",sQvectorTerms[qvti].Data()),Form("%s vs M",sQvectorTerms[qvti].Data()),fnBinsMult,fMinMult,fMaxMult,fnBinsForCorrelations,fMinValueOfQvectorTerms[qvti],fMaxValueOfQvectorTerms[qvti]);
3299  fQvectorTermsVsMult[qvti]->SetTickLength(-0.01,"Y");
3300  fQvectorTermsVsMult[qvti]->SetLabelSize(0.04);
3301  fQvectorTermsVsMult[qvti]->SetLabelOffset(0.02,"Y");
3302  fQvectorTermsVsMult[qvti]->SetStats(kTRUE);
3303  fQvectorTermsVsMult[qvti]->GetXaxis()->SetTitle(sMultiplicity.Data());
3304  fQvectorTermsVsMult[qvti]->GetYaxis()->SetTitle(sQvectorTerms[qvti].Data());
3306  } // end of for(Int_t qvti=0;qvti<4;qvti++)
3307  } // end of if(fUseQvectorTerms)
3308 
3309 } // end of void AliFlowAnalysisCRC::BookEverythingForControlHistograms()
3310 
3311 //=======================================================================================================================
3312 
3314 {
3315  // Book all objects needed for bootstrap.
3316 
3317  // a) Book profile to hold all flags for bootstrap;
3318  // b) Book local random generator;
3319  // c) Book all bootstrap objects;
3320  // d) Book all bootstrap objects 'vs M'.
3321 
3322  // a) Book profile to hold all flags for bootstrap;
3323  TString bootstrapFlagsName = "fBootstrapFlags";
3324  bootstrapFlagsName += fAnalysisLabel->Data();
3325  fBootstrapFlags = new TProfile(bootstrapFlagsName.Data(),"Flags for bootstrap",3,0,3);
3326  fBootstrapFlags->SetTickLength(-0.01,"Y");
3327  fBootstrapFlags->SetMarkerStyle(25);
3328  fBootstrapFlags->SetLabelSize(0.04);
3329  fBootstrapFlags->SetLabelOffset(0.02,"Y");
3330  fBootstrapFlags->SetStats(kFALSE);
3331  fBootstrapFlags->GetXaxis()->SetBinLabel(1,"fUseBootstrap");
3332  fBootstrapFlags->GetXaxis()->SetBinLabel(2,"fUseBootstrapVsM");
3333  fBootstrapFlags->GetXaxis()->SetBinLabel(3,"fnSubsamples");
3335 
3336  // b) Book local random generator:
3338  {
3339  fRandom = new TRandom3(0); // if uiSeed is 0, the seed is determined uniquely in space and time via TUUID
3340  }
3341 
3342  // c) Book all bootstrap objects:
3343  TString correlationFlag[4] = {"#LT#LT2#GT#GT","#LT#LT4#GT#GT","#LT#LT6#GT#GT","#LT#LT8#GT#GT"};
3344  TString cumulantFlag[4] = {"QC{2}","QC{4}","QC{6}","QC{8}"};
3345  if(fUseBootstrap)
3346  {
3347  // ....
3348  TString bootstrapCorrelationsName = "fBootstrapCorrelations";
3349  bootstrapCorrelationsName += fAnalysisLabel->Data();
3350  fBootstrapCorrelations = new TProfile2D(bootstrapCorrelationsName.Data(),"Bootstrap Correlations",4,0.,4.,fnSubsamples,0,fnSubsamples); // x-axis => <2>, <4>, <6>, <8>; y-axis => subsample #
3351  fBootstrapCorrelations->SetStats(kFALSE);
3352  for(Int_t ci=0;ci<4;ci++) // correlation index
3353  {
3354  fBootstrapCorrelations->GetXaxis()->SetBinLabel(ci+1,correlationFlag[ci].Data());
3355  } // end of for(Int_t ci=0;ci<4;ci++) // correlation index
3356  for(Int_t ss=0;ss<fnSubsamples;ss++)
3357  {
3358  fBootstrapCorrelations->GetYaxis()->SetBinLabel(ss+1,Form("#%d",ss));
3359  } // end of for(Int_t ss=0;ss<fnSubsamples;ss++)
3361  // ....
3362  TString bootstrapCumulantsName = "fBootstrapCumulants";
3363  bootstrapCumulantsName += fAnalysisLabel->Data();
3364  fBootstrapCumulants = new TH2D(bootstrapCumulantsName.Data(),"Bootstrap Cumulants",4,0.,4.,fnSubsamples,0,fnSubsamples); // x-axis => QC{2}, QC{4}, QC{6}, QC{8}; y-axis => subsample #
3365  fBootstrapCumulants->SetStats(kFALSE);
3366  for(Int_t co=0;co<4;co++) // cumulant order
3367  {
3368  fBootstrapCumulants->GetXaxis()->SetBinLabel(co+1,cumulantFlag[co].Data());
3369  } // end of for(Int_t co=0;co<4;co++) // cumulant order
3370  for(Int_t ss=0;ss<fnSubsamples;ss++)
3371  {
3372  fBootstrapCumulants->GetYaxis()->SetBinLabel(ss+1,Form("#%d",ss));
3373  } // end of for(Int_t ss=0;ss<fnSubsamples;ss++)
3375  } // end of if(fUseBootstrap)
3376 
3377  // d) Book all bootstrap objects 'vs M':
3378  TString sMultiplicity = "";
3380  {
3381  sMultiplicity = "# RPs";
3383  {
3384  sMultiplicity = "Reference multiplicity (from ESD)";
3386  {
3387  sMultiplicity = "# POIs";
3388  }
3389  if(fUseBootstrapVsM)
3390  {
3391  // ....
3392  TString bootstrapCorrelationsVsMName = "fBootstrapCorrelationsVsM";
3393  bootstrapCorrelationsVsMName += fAnalysisLabel->Data();
3394  for(Int_t ci=0;ci<4;ci++) // correlation index
3395  {
3396  fBootstrapCorrelationsVsM[ci] = new TProfile2D(Form("%s, %s",bootstrapCorrelationsVsMName.Data(),correlationFlag[ci].Data()),
3397  Form("Bootstrap Correlations Vs. M, %s",correlationFlag[ci].Data()),
3398  fnBinsMult,fMinMult,fMaxMult,fnSubsamples,0,fnSubsamples); // index => <2>, <4>, <6>, <8>; x-axis => multiplicity; y-axis => subsample #
3399  fBootstrapCorrelationsVsM[ci]->SetStats(kFALSE);
3400  fBootstrapCorrelationsVsM[ci]->GetXaxis()->SetTitle(sMultiplicity.Data());
3401  for(Int_t ss=0;ss<fnSubsamples;ss++)
3402  {
3403  fBootstrapCorrelationsVsM[ci]->GetYaxis()->SetBinLabel(ss+1,Form("#%d",ss));
3404  } // end of for(Int_t ss=0;ss<fnSubsamples;ss++)
3406  } // end of for(Int_t ci=0;ci<4;ci++) // correlation index
3407  // ....
3408  TString bootstrapCumulantsVsMName = "fBootstrapCumulantsVsM";
3409  bootstrapCumulantsVsMName += fAnalysisLabel->Data();
3410  for(Int_t co=0;co<4;co++) // cumulant order
3411  {
3412  fBootstrapCumulantsVsM[co] = new TH2D(Form("%s, %s",bootstrapCumulantsVsMName.Data(),cumulantFlag[co].Data()),
3413  Form("Bootstrap Cumulants Vs. M, %s",cumulantFlag[co].Data()),
3414  fnBinsMult,fMinMult,fMaxMult,fnSubsamples,0,fnSubsamples); // index => <2>, <4>, <6>, <8>; x-axis => multiplicity; y-axis => subsample #
3415  fBootstrapCumulantsVsM[co]->SetStats(kFALSE);
3416  fBootstrapCumulantsVsM[co]->GetXaxis()->SetTitle(sMultiplicity.Data());
3417  for(Int_t ss=0;ss<fnSubsamples;ss++)
3418  {
3419  fBootstrapCumulantsVsM[co]->GetYaxis()->SetBinLabel(ss+1,Form("#%d",ss));
3420  } // end of for(Int_t ss=0;ss<fnSubsamples;ss++)
3422  } // end of for(Int_t co=0;co<4;co++) // correlation index
3423  } // end of if(fUseBootstrapVsM)
3424 
3425 } // end of void AliFlowAnalysisCRC::BookEverythingForBootstrap()
3426 
3427 //=======================================================================================================================
3428 
3430 {
3431  // Book all objects for mixed harmonics.
3432 
3433  // a) Book profile to hold all flags for mixed harmonics;
3434  // b) Book all objects in TList fMixedHarmonicsProfiles;
3435  // c) Book all objects in TList fMixedHarmonicsResults;
3436  // d) Book all objects in TList fMixedHarmonicsErrorPropagation.
3437 
3438  // a) Book profile to hold all flags for mixed harmonics:
3439  TString mixedHarmonicsFlagsName = "fMixedHarmonicsFlags";
3440  mixedHarmonicsFlagsName += fAnalysisLabel->Data();
3441  fMixedHarmonicsFlags = new TProfile(mixedHarmonicsFlagsName.Data(),"Flags for Mixed Harmonics",4,0,4);
3442  fMixedHarmonicsFlags->SetTickLength(-0.01,"Y");
3443  fMixedHarmonicsFlags->SetMarkerStyle(25);
3444  fMixedHarmonicsFlags->SetLabelSize(0.04);
3445  fMixedHarmonicsFlags->SetLabelOffset(0.02,"Y");
3446  fMixedHarmonicsFlags->SetStats(kFALSE);
3447  fMixedHarmonicsFlags->GetXaxis()->SetBinLabel(1,"Calculate Mixed Harmonics");
3448  fMixedHarmonicsFlags->GetXaxis()->SetBinLabel(2,"Generic Harmonic");
3449  fMixedHarmonicsFlags->GetXaxis()->SetBinLabel(3,"Calculate vs Multiplicity");
3450  fMixedHarmonicsFlags->GetXaxis()->SetBinLabel(4,"Multiplicity Weight");
3452 
3453  if(!fCalculateMixedHarmonics){return;}
3454 
3455  // b) Book all objects in TList fMixedHarmonicsProfiles:
3456  // b1) 2-p correlations:
3457  TString s2pCorrelationsName = "f2pCorrelations";
3458  s2pCorrelationsName += fAnalysisLabel->Data();
3459  f2pCorrelations = new TProfile(s2pCorrelationsName.Data(),Form("2-particle correlations (n = %d)",fHarmonic),6,0,6,"s");
3460  f2pCorrelations->SetTickLength(-0.01,"Y");
3461  f2pCorrelations->SetMarkerStyle(25);
3462  f2pCorrelations->SetLabelSize(0.04);
3463  f2pCorrelations->SetLabelOffset(0.02,"Y");
3464  f2pCorrelations->SetStats(kFALSE);
3465  f2pCorrelations->Sumw2();
3466  f2pCorrelations->GetXaxis()->SetBinLabel(1,Form("#LT#LT2#GT#GT_{%dn|%dn}",1*fHarmonic,1*fHarmonic));
3467  f2pCorrelations->GetXaxis()->SetBinLabel(2,Form("#LT#LT2#GT#GT_{%dn|%dn}",2*fHarmonic,2*fHarmonic));
3468  f2pCorrelations->GetXaxis()->SetBinLabel(3,Form("#LT#LT2#GT#GT_{%dn|%dn}",3*fHarmonic,3*fHarmonic));
3469  f2pCorrelations->GetXaxis()->SetBinLabel(4,Form("#LT#LT2#GT#GT_{%dn|%dn}",4*fHarmonic,4*fHarmonic));
3470  f2pCorrelations->GetXaxis()->SetBinLabel(5,Form("#LT#LT2#GT#GT_{%dn|%dn}",5*fHarmonic,5*fHarmonic));
3471  f2pCorrelations->GetXaxis()->SetBinLabel(6,Form("#LT#LT2#GT#GT_{%dn|%dn}",6*fHarmonic,6*fHarmonic));
3473  // b2) 3-p correlations (3+6):
3474  TString s3pCorrelationsName = "f3pCorrelations";
3475  s3pCorrelationsName += fAnalysisLabel->Data();
3476  f3pCorrelations = new TProfile(s3pCorrelationsName.Data(),Form("3-particle correlations (n = %d)",fHarmonic),10,0,10,"s");
3477  f3pCorrelations->SetTickLength(-0.01,"Y");
3478  f3pCorrelations->SetMarkerStyle(25);
3479  f3pCorrelations->SetLabelSize(0.04);
3480  f3pCorrelations->SetLabelOffset(0.02,"Y");
3481  f3pCorrelations->SetStats(kFALSE);
3482  f3pCorrelations->Sumw2();
3483  // 3-p correlations sensitive to two distinct harmonics (3):
3484  f3pCorrelations->GetXaxis()->SetBinLabel(1,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",2*fHarmonic,1*fHarmonic,1*fHarmonic));
3485  f3pCorrelations->GetXaxis()->SetBinLabel(2,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",4*fHarmonic,2*fHarmonic,2*fHarmonic));
3486  f3pCorrelations->GetXaxis()->SetBinLabel(3,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",6*fHarmonic,3*fHarmonic,3*fHarmonic));
3487  f3pCorrelations->GetXaxis()->SetBinLabel(4,""); // empty
3488  // 3-p correlations sensitive to three distinct harmonics (6):
3489  f3pCorrelations->GetXaxis()->SetBinLabel(5,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",3*fHarmonic,2*fHarmonic,1*fHarmonic));
3490  f3pCorrelations->GetXaxis()->SetBinLabel(6,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",4*fHarmonic,3*fHarmonic,1*fHarmonic));
3491  f3pCorrelations->GetXaxis()->SetBinLabel(7,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",5*fHarmonic,3*fHarmonic,2*fHarmonic));
3492  f3pCorrelations->GetXaxis()->SetBinLabel(8,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",5*fHarmonic,4*fHarmonic,1*fHarmonic));
3493  f3pCorrelations->GetXaxis()->SetBinLabel(9,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",6*fHarmonic,4*fHarmonic,2*fHarmonic));
3494  f3pCorrelations->GetXaxis()->SetBinLabel(10,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",6*fHarmonic,5*fHarmonic,1*fHarmonic));
3496  // b3) 4-p correlations (6+15+2+10+8):
3497  TString s4pCorrelationsName = "f4pCorrelations";
3498  s4pCorrelationsName += fAnalysisLabel->Data();
3499  f4pCorrelations = new TProfile(s4pCorrelationsName.Data(),Form("4-particle correlations (n = %d)",fHarmonic),45,0,45,"s");
3500  f4pCorrelations->SetTickLength(-0.01,"Y");
3501  f4pCorrelations->SetMarkerStyle(25);
3502  f4pCorrelations->SetLabelSize(0.03);
3503  f4pCorrelations->SetLabelOffset(0.02,"Y");
3504  f4pCorrelations->SetStats(kFALSE);
3505  f4pCorrelations->Sumw2();
3506  // "same harmonic" (6):
3507  f4pCorrelations->GetXaxis()->SetBinLabel(1,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",1*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic));
3508  f4pCorrelations->GetXaxis()->SetBinLabel(2,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",2*fHarmonic,2*fHarmonic,2*fHarmonic,2*fHarmonic));
3509  f4pCorrelations->GetXaxis()->SetBinLabel(3,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",3*fHarmonic,3*fHarmonic,3*fHarmonic,3*fHarmonic));
3510  f4pCorrelations->GetXaxis()->SetBinLabel(4,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",4*fHarmonic,4*fHarmonic,4*fHarmonic,4*fHarmonic));
3511  f4pCorrelations->GetXaxis()->SetBinLabel(5,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,5*fHarmonic,5*fHarmonic,5*fHarmonic));
3512  f4pCorrelations->GetXaxis()->SetBinLabel(6,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,6*fHarmonic,6*fHarmonic,6*fHarmonic));
3513  f4pCorrelations->GetXaxis()->SetBinLabel(7,""); // empty
3514  // "standard candles" (15):
3515  f4pCorrelations->GetXaxis()->SetBinLabel(8,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",2*fHarmonic,1*fHarmonic,2*fHarmonic,1*fHarmonic));
3516  f4pCorrelations->GetXaxis()->SetBinLabel(9,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",3*fHarmonic,1*fHarmonic,3*fHarmonic,1*fHarmonic));
3517  f4pCorrelations->GetXaxis()->SetBinLabel(10,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",3*fHarmonic,2*fHarmonic,3*fHarmonic,2*fHarmonic));
3518  f4pCorrelations->GetXaxis()->SetBinLabel(11,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",4*fHarmonic,1*fHarmonic,4*fHarmonic,1*fHarmonic));
3519  f4pCorrelations->GetXaxis()->SetBinLabel(12,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",4*fHarmonic,2*fHarmonic,4*fHarmonic,2*fHarmonic));
3520  f4pCorrelations->GetXaxis()->SetBinLabel(13,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",4*fHarmonic,3*fHarmonic,4*fHarmonic,3*fHarmonic));
3521  f4pCorrelations->GetXaxis()->SetBinLabel(14,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,1*fHarmonic,5*fHarmonic,1*fHarmonic));
3522  f4pCorrelations->GetXaxis()->SetBinLabel(15,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,2*fHarmonic,5*fHarmonic,2*fHarmonic));
3523  f4pCorrelations->GetXaxis()->SetBinLabel(16,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,3*fHarmonic,5*fHarmonic,3*fHarmonic));
3524  f4pCorrelations->GetXaxis()->SetBinLabel(17,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,4*fHarmonic,5*fHarmonic,4*fHarmonic));
3525  f4pCorrelations->GetXaxis()->SetBinLabel(18,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,1*fHarmonic,6*fHarmonic,1*fHarmonic));
3526  f4pCorrelations->GetXaxis()->SetBinLabel(19,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,2*fHarmonic,6*fHarmonic,2*fHarmonic));
3527  f4pCorrelations->GetXaxis()->SetBinLabel(20,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,3*fHarmonic,6*fHarmonic,3*fHarmonic));
3528  f4pCorrelations->GetXaxis()->SetBinLabel(21,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,4*fHarmonic,6*fHarmonic,4*fHarmonic));
3529  f4pCorrelations->GetXaxis()->SetBinLabel(22,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,5*fHarmonic,6*fHarmonic,5*fHarmonic));
3530  f4pCorrelations->GetXaxis()->SetBinLabel(23,""); // empty
3531  // 4-p correlations sensitive to two distinct harmonics (2):
3532  f4pCorrelations->GetXaxis()->SetBinLabel(24,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",3*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic));
3533  f4pCorrelations->GetXaxis()->SetBinLabel(25,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",6*fHarmonic,2*fHarmonic,2*fHarmonic,2*fHarmonic));
3534  f4pCorrelations->GetXaxis()->SetBinLabel(26,""); // empty
3535  // 4-p correlations sensitive to three distinct harmonics (10):
3536  f4pCorrelations->GetXaxis()->SetBinLabel(27,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",3*fHarmonic,1*fHarmonic,2*fHarmonic,2*fHarmonic));
3537  f4pCorrelations->GetXaxis()->SetBinLabel(28,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",4*fHarmonic,2*fHarmonic,1*fHarmonic,1*fHarmonic));
3538  f4pCorrelations->GetXaxis()->SetBinLabel(29,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",4*fHarmonic,2*fHarmonic,3*fHarmonic,3*fHarmonic));
3539  f4pCorrelations->GetXaxis()->SetBinLabel(30,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",5*fHarmonic,2*fHarmonic,2*fHarmonic,1*fHarmonic));
3540  f4pCorrelations->GetXaxis()->SetBinLabel(31,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",5*fHarmonic,3*fHarmonic,1*fHarmonic,1*fHarmonic));
3541  f4pCorrelations->GetXaxis()->SetBinLabel(32,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,1*fHarmonic,3*fHarmonic,3*fHarmonic));
3542  f4pCorrelations->GetXaxis()->SetBinLabel(33,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,3*fHarmonic,4*fHarmonic,4*fHarmonic));
3543  f4pCorrelations->GetXaxis()->SetBinLabel(34,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",6*fHarmonic,4*fHarmonic,1*fHarmonic,1*fHarmonic));
3544  f4pCorrelations->GetXaxis()->SetBinLabel(35,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,2*fHarmonic,4*fHarmonic,4*fHarmonic));
3545  f4pCorrelations->GetXaxis()->SetBinLabel(36,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,4*fHarmonic,5*fHarmonic,5*fHarmonic));
3546  f4pCorrelations->GetXaxis()->SetBinLabel(37,""); // empty
3547  // 4-p correlations sensitive to four distinct harmonics (8):
3548  f4pCorrelations->GetXaxis()->SetBinLabel(38,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",4*fHarmonic,1*fHarmonic,3*fHarmonic,2*fHarmonic));
3549  f4pCorrelations->GetXaxis()->SetBinLabel(39,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,1*fHarmonic,4*fHarmonic,2*fHarmonic));
3550  f4pCorrelations->GetXaxis()->SetBinLabel(40,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,2*fHarmonic,4*fHarmonic,3*fHarmonic));
3551  f4pCorrelations->GetXaxis()->SetBinLabel(41,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,1*fHarmonic,4*fHarmonic,3*fHarmonic));
3552  f4pCorrelations->GetXaxis()->SetBinLabel(42,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,1*fHarmonic,5*fHarmonic,2*fHarmonic));
3553  f4pCorrelations->GetXaxis()->SetBinLabel(43,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,2*fHarmonic,1*fHarmonic));
3554  f4pCorrelations->GetXaxis()->SetBinLabel(44,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,2*fHarmonic,5*fHarmonic,3*fHarmonic));
3555  f4pCorrelations->GetXaxis()->SetBinLabel(45,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,3*fHarmonic,5*fHarmonic,4*fHarmonic));
3557  // b3) 5-p correlations (30+9+30+11+3):
3558  TString s5pCorrelationsName = "f5pCorrelations";
3559  s5pCorrelationsName += fAnalysisLabel->Data();
3560  f5pCorrelations = new TProfile(s5pCorrelationsName.Data(),Form("5-particle correlations (n = %d)",fHarmonic),87,0,87,"s");
3561  f5pCorrelations->SetTickLength(-0.01,"Y");
3562  f5pCorrelations->SetMarkerStyle(25);
3563  f5pCorrelations->SetLabelSize(0.02);
3564  f5pCorrelations->SetLabelOffset(0.02,"Y");
3565  f5pCorrelations->SetStats(kFALSE);
3566  f5pCorrelations->Sumw2();
3567  // "standard candles" (30):
3568  f5pCorrelations->GetXaxis()->SetBinLabel(1,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",3*fHarmonic,2*fHarmonic,3*fHarmonic,1*fHarmonic,1*fHarmonic));
3569  f5pCorrelations->GetXaxis()->SetBinLabel(2,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,1*fHarmonic,2*fHarmonic,2*fHarmonic,1*fHarmonic));
3570  f5pCorrelations->GetXaxis()->SetBinLabel(3,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,2*fHarmonic,3*fHarmonic,2*fHarmonic,1*fHarmonic));
3571  f5pCorrelations->GetXaxis()->SetBinLabel(4,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,3*fHarmonic,3*fHarmonic,2*fHarmonic,2*fHarmonic));
3572  f5pCorrelations->GetXaxis()->SetBinLabel(5,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,2*fHarmonic,4*fHarmonic,1*fHarmonic,1*fHarmonic));
3573  f5pCorrelations->GetXaxis()->SetBinLabel(6,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,3*fHarmonic,4*fHarmonic,2*fHarmonic,1*fHarmonic));
3574  f5pCorrelations->GetXaxis()->SetBinLabel(7,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,1*fHarmonic,3*fHarmonic,2*fHarmonic,1*fHarmonic));
3575  f5pCorrelations->GetXaxis()->SetBinLabel(8,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,2*fHarmonic,5*fHarmonic,1*fHarmonic,1*fHarmonic));
3576  f5pCorrelations->GetXaxis()->SetBinLabel(9,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,2*fHarmonic,4*fHarmonic,2*fHarmonic,1*fHarmonic));
3577  f5pCorrelations->GetXaxis()->SetBinLabel(10,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,3*fHarmonic,4*fHarmonic,3*fHarmonic,1*fHarmonic));
3578  f5pCorrelations->GetXaxis()->SetBinLabel(11,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,4*fHarmonic,4*fHarmonic,3*fHarmonic,2*fHarmonic));
3579  f5pCorrelations->GetXaxis()->SetBinLabel(12,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,3*fHarmonic,5*fHarmonic,2*fHarmonic,1*fHarmonic));
3580  f5pCorrelations->GetXaxis()->SetBinLabel(13,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,4*fHarmonic,5*fHarmonic,2*fHarmonic,2*fHarmonic));
3581  f5pCorrelations->GetXaxis()->SetBinLabel(14,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,4*fHarmonic,5*fHarmonic,3*fHarmonic,1*fHarmonic));
3582  f5pCorrelations->GetXaxis()->SetBinLabel(15,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,1*fHarmonic,3*fHarmonic,3*fHarmonic,1*fHarmonic));
3583  f5pCorrelations->GetXaxis()->SetBinLabel(16,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,2*fHarmonic,3*fHarmonic,3*fHarmonic,2*fHarmonic));
3584  f5pCorrelations->GetXaxis()->SetBinLabel(17,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,1*fHarmonic,4*fHarmonic,2*fHarmonic,1*fHarmonic));
3585  f5pCorrelations->GetXaxis()->SetBinLabel(18,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,4*fHarmonic,3*fHarmonic,2*fHarmonic));
3586  f5pCorrelations->GetXaxis()->SetBinLabel(19,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,4*fHarmonic,4*fHarmonic,3*fHarmonic,3*fHarmonic));
3587  f5pCorrelations->GetXaxis()->SetBinLabel(20,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,2*fHarmonic,5*fHarmonic,2*fHarmonic,1*fHarmonic));
3588  f5pCorrelations->GetXaxis()->SetBinLabel(21,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,5*fHarmonic,3*fHarmonic,1*fHarmonic));
3589  f5pCorrelations->GetXaxis()->SetBinLabel(22,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,4*fHarmonic,5*fHarmonic,4*fHarmonic,1*fHarmonic));
3590  f5pCorrelations->GetXaxis()->SetBinLabel(23,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,5*fHarmonic,5*fHarmonic,3*fHarmonic,3*fHarmonic));
3591  f5pCorrelations->GetXaxis()->SetBinLabel(24,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,2*fHarmonic,6*fHarmonic,1*fHarmonic,1*fHarmonic));
3592  f5pCorrelations->GetXaxis()->SetBinLabel(25,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,6*fHarmonic,2*fHarmonic,1*fHarmonic));
3593  f5pCorrelations->GetXaxis()->SetBinLabel(26,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,4*fHarmonic,6*fHarmonic,2*fHarmonic,2*fHarmonic));
3594  f5pCorrelations->GetXaxis()->SetBinLabel(27,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,4*fHarmonic,6*fHarmonic,3*fHarmonic,1*fHarmonic));
3595  f5pCorrelations->GetXaxis()->SetBinLabel(28,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,5*fHarmonic,5*fHarmonic,4*fHarmonic,2*fHarmonic));
3596  f5pCorrelations->GetXaxis()->SetBinLabel(29,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,5*fHarmonic,6*fHarmonic,3*fHarmonic,2*fHarmonic));
3597  f5pCorrelations->GetXaxis()->SetBinLabel(30,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,5*fHarmonic,6*fHarmonic,4*fHarmonic,1*fHarmonic));
3598  f5pCorrelations->GetXaxis()->SetBinLabel(31,""); // empty
3599  // 5-p correlations sensitive to two distinct harmonics (9):
3600  f5pCorrelations->GetXaxis()->SetBinLabel(32,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",2*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic));
3601  f5pCorrelations->GetXaxis()->SetBinLabel(33,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",2*fHarmonic,2*fHarmonic,2*fHarmonic,1*fHarmonic,1*fHarmonic));
3602  f5pCorrelations->GetXaxis()->SetBinLabel(34,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",3*fHarmonic,3*fHarmonic,2*fHarmonic,2*fHarmonic,2*fHarmonic));
3603  f5pCorrelations->GetXaxis()->SetBinLabel(35,Form("#LT#LT5#GT#GT_{%dn|%dn,%dn,%dn,%dn}",4*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic));
3604  f5pCorrelations->GetXaxis()->SetBinLabel(36,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,2*fHarmonic,2*fHarmonic,2*fHarmonic,2*fHarmonic));
3605  f5pCorrelations->GetXaxis()->SetBinLabel(37,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,4*fHarmonic,4*fHarmonic,2*fHarmonic,2*fHarmonic));
3606  f5pCorrelations->GetXaxis()->SetBinLabel(38,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,3*fHarmonic,3*fHarmonic,3*fHarmonic));
3607  f5pCorrelations->GetXaxis()->SetBinLabel(39,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,6*fHarmonic,4*fHarmonic,4*fHarmonic,4*fHarmonic));
3608  f5pCorrelations->GetXaxis()->SetBinLabel(40,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,6*fHarmonic,6*fHarmonic,3*fHarmonic,3*fHarmonic));
3609  f5pCorrelations->GetXaxis()->SetBinLabel(41,""); // empty
3610  // 5-p correlations sensitive to three distinct harmonics (30):
3611  f5pCorrelations->GetXaxis()->SetBinLabel(42,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",3*fHarmonic,1*fHarmonic,2*fHarmonic,1*fHarmonic,1*fHarmonic));
3612  f5pCorrelations->GetXaxis()->SetBinLabel(43,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",3*fHarmonic,2*fHarmonic,2*fHarmonic,2*fHarmonic,1*fHarmonic));
3613  f5pCorrelations->GetXaxis()->SetBinLabel(44,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",3*fHarmonic,3*fHarmonic,3*fHarmonic,2*fHarmonic,1*fHarmonic));
3614  f5pCorrelations->GetXaxis()->SetBinLabel(45,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,1*fHarmonic,3*fHarmonic,1*fHarmonic,1*fHarmonic));
3615  f5pCorrelations->GetXaxis()->SetBinLabel(46,Form("#LT#LT5#GT#GT_{%dn,%dn,%dn|%dn,%dn}",4*fHarmonic,1*fHarmonic,1*fHarmonic,3*fHarmonic,3*fHarmonic));
3616  f5pCorrelations->GetXaxis()->SetBinLabel(47,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,3*fHarmonic,3*fHarmonic,3*fHarmonic,1*fHarmonic));
3617  f5pCorrelations->GetXaxis()->SetBinLabel(48,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,4*fHarmonic,3*fHarmonic,3*fHarmonic,2*fHarmonic));
3618  f5pCorrelations->GetXaxis()->SetBinLabel(49,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,4*fHarmonic,4*fHarmonic,3*fHarmonic,1*fHarmonic));
3619  f5pCorrelations->GetXaxis()->SetBinLabel(50,Form("#LT#LT5#GT#GT_{%dn|%dn,%dn,%dn,%dn}",5*fHarmonic,2*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic));
3620  f5pCorrelations->GetXaxis()->SetBinLabel(51,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,1*fHarmonic,2*fHarmonic,2*fHarmonic,2*fHarmonic));
3621  f5pCorrelations->GetXaxis()->SetBinLabel(52,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,2*fHarmonic,3*fHarmonic,2*fHarmonic,2*fHarmonic));
3622  f5pCorrelations->GetXaxis()->SetBinLabel(53,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,3*fHarmonic,3*fHarmonic,3*fHarmonic,2*fHarmonic));
3623  f5pCorrelations->GetXaxis()->SetBinLabel(54,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,1*fHarmonic,4*fHarmonic,1*fHarmonic,1*fHarmonic));
3624  f5pCorrelations->GetXaxis()->SetBinLabel(55,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,4*fHarmonic,3*fHarmonic,3*fHarmonic,3*fHarmonic));
3625  f5pCorrelations->GetXaxis()->SetBinLabel(56,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,4*fHarmonic,4*fHarmonic,4*fHarmonic,1*fHarmonic));
3626  f5pCorrelations->GetXaxis()->SetBinLabel(57,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,5*fHarmonic,4*fHarmonic,3*fHarmonic,3*fHarmonic));
3627  f5pCorrelations->GetXaxis()->SetBinLabel(58,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,5*fHarmonic,4*fHarmonic,4*fHarmonic,2*fHarmonic));
3628  f5pCorrelations->GetXaxis()->SetBinLabel(59,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,5*fHarmonic,5*fHarmonic,3*fHarmonic,2*fHarmonic));
3629  f5pCorrelations->GetXaxis()->SetBinLabel(60,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,5*fHarmonic,5*fHarmonic,4*fHarmonic,1*fHarmonic));
3630  f5pCorrelations->GetXaxis()->SetBinLabel(61,Form("#LT#LT5#GT#GT_{%dn|%dn,%dn,%dn,%dn}",6*fHarmonic,2*fHarmonic,2*fHarmonic,1*fHarmonic,1*fHarmonic));
3631  f5pCorrelations->GetXaxis()->SetBinLabel(62,Form("#LT#LT5#GT#GT_{%dn|%dn,%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic));
3632  f5pCorrelations->GetXaxis()->SetBinLabel(63,Form("#LT#LT5#GT#GT_{%dn,%dn,%dn|%dn,%dn}",6*fHarmonic,1*fHarmonic,1*fHarmonic,4*fHarmonic,4*fHarmonic));
3633  f5pCorrelations->GetXaxis()->SetBinLabel(64,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,1*fHarmonic,5*fHarmonic,1*fHarmonic,1*fHarmonic));
3634  f5pCorrelations->GetXaxis()->SetBinLabel(65,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,2*fHarmonic,4*fHarmonic,2*fHarmonic,2*fHarmonic));
3635  f5pCorrelations->GetXaxis()->SetBinLabel(66,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,4*fHarmonic,4*fHarmonic,4*fHarmonic,2*fHarmonic));
3636  f5pCorrelations->GetXaxis()->SetBinLabel(67,Form("#LT#LT5#GT#GT_{%dn,%dn,%dn|%dn,%dn}",6*fHarmonic,2*fHarmonic,2*fHarmonic,5*fHarmonic,5*fHarmonic));
3637  f5pCorrelations->GetXaxis()->SetBinLabel(68,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,5*fHarmonic,5*fHarmonic,5*fHarmonic,1*fHarmonic));
3638  f5pCorrelations->GetXaxis()->SetBinLabel(69,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,6*fHarmonic,5*fHarmonic,5*fHarmonic,2*fHarmonic));
3639  f5pCorrelations->GetXaxis()->SetBinLabel(70,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,6*fHarmonic,6*fHarmonic,4*fHarmonic,2*fHarmonic));
3640  f5pCorrelations->GetXaxis()->SetBinLabel(71,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,6*fHarmonic,6*fHarmonic,5*fHarmonic,1*fHarmonic));
3641  f5pCorrelations->GetXaxis()->SetBinLabel(72,""); // empty
3642  // 5-p correlations sensitive to four distinct harmonics (11):
3643  f5pCorrelations->GetXaxis()->SetBinLabel(73,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,2*fHarmonic,3*fHarmonic,3*fHarmonic,1*fHarmonic));
3644  f5pCorrelations->GetXaxis()->SetBinLabel(74,Form("#LT#LT5#GT#GT_{%dn,%dn,%dn|%dn,%dn}",5*fHarmonic,1*fHarmonic,1*fHarmonic,4*fHarmonic,3*fHarmonic));
3645  f5pCorrelations->GetXaxis()->SetBinLabel(75,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,3*fHarmonic,4*fHarmonic,2*fHarmonic,2*fHarmonic));
3646  f5pCorrelations->GetXaxis()->SetBinLabel(76,Form("#LT#LT5#GT#GT_{%dn,%dn,%dn|%dn,%dn}",5*fHarmonic,2*fHarmonic,1*fHarmonic,4*fHarmonic,4*fHarmonic));
3647  f5pCorrelations->GetXaxis()->SetBinLabel(77,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,1*fHarmonic,3*fHarmonic,2*fHarmonic,2*fHarmonic));
3648  f5pCorrelations->GetXaxis()->SetBinLabel(78,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,4*fHarmonic,4*fHarmonic,1*fHarmonic));
3649  f5pCorrelations->GetXaxis()->SetBinLabel(79,Form("#LT#LT5#GT#GT_{%dn,%dn,%dn|%dn,%dn}",6*fHarmonic,1*fHarmonic,1*fHarmonic,5*fHarmonic,3*fHarmonic));
3650  f5pCorrelations->GetXaxis()->SetBinLabel(80,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,5*fHarmonic,2*fHarmonic,2*fHarmonic));
3651  f5pCorrelations->GetXaxis()->SetBinLabel(81,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,5*fHarmonic,4*fHarmonic,4*fHarmonic,3*fHarmonic));
3652  f5pCorrelations->GetXaxis()->SetBinLabel(82,Form("#LT#LT5#GT#GT_{%dn,%dn,%dn|%dn,%dn}",6*fHarmonic,3*fHarmonic,1*fHarmonic,5*fHarmonic,5*fHarmonic));
3653  f5pCorrelations->GetXaxis()->SetBinLabel(83,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,6*fHarmonic,5*fHarmonic,4*fHarmonic,3*fHarmonic));
3654  f5pCorrelations->GetXaxis()->SetBinLabel(84,""); // empty
3655  // 5-p correlations sensitive to five distinct harmonics (3):
3656  f5pCorrelations->GetXaxis()->SetBinLabel(85,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,2*fHarmonic,4*fHarmonic,3*fHarmonic,1*fHarmonic));
3657  f5pCorrelations->GetXaxis()->SetBinLabel(86,Form("#LT#LT5#GT#GT_{%dn,%dn,%dn|%dn,%dn}",6*fHarmonic,2*fHarmonic,1*fHarmonic,5*fHarmonic,4*fHarmonic));
3658  f5pCorrelations->GetXaxis()->SetBinLabel(87,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,4*fHarmonic,5*fHarmonic,3*fHarmonic,2*fHarmonic));
3660  // b4) 6-p correlations (??+??+??+??+??):
3661  TString s6pCorrelationsName = "f6pCorrelations";
3662  s6pCorrelationsName += fAnalysisLabel->Data();
3663  f6pCorrelations = new TProfile(s6pCorrelationsName.Data(),Form("6-particle correlations (n = %d)",fHarmonic),1,0.,1.);
3664  f6pCorrelations->SetTickLength(-0.01,"Y");
3665  f6pCorrelations->SetMarkerStyle(25);
3666  f6pCorrelations->SetLabelSize(0.02);
3667  f6pCorrelations->SetLabelOffset(0.02,"Y");
3668  f6pCorrelations->SetStats(kFALSE);
3669  f6pCorrelations->Sumw2();
3670  //fMixedHarmonicsProfiles->Add(f6pCorrelations); // TBI
3671  // b5) 7-p correlations (??+??+??+??+??):
3672  TString s7pCorrelationsName = "f7pCorrelations";
3673  s7pCorrelationsName += fAnalysisLabel->Data();
3674  f7pCorrelations = new TProfile(s7pCorrelationsName.Data(),Form("7-particle correlations (n = %d)",fHarmonic),1,0.,1.);
3675  f7pCorrelations->SetTickLength(-0.01,"Y");
3676  f7pCorrelations->SetMarkerStyle(25);
3677  f7pCorrelations->SetLabelSize(0.02);
3678  f7pCorrelations->SetLabelOffset(0.02,"Y");
3679  f7pCorrelations->SetStats(kFALSE);
3680  f7pCorrelations->Sumw2();
3681  //fMixedHarmonicsProfiles->Add(f7pCorrelations); // TBI
3682  // b6) 8-p correlations (??+??+??+??+??):
3683  TString s8pCorrelationsName = "f8pCorrelations";
3684  s8pCorrelationsName += fAnalysisLabel->Data();
3685  f8pCorrelations = new TProfile(s8pCorrelationsName.Data(),Form("8-particle correlations (n = %d)",fHarmonic),1,0.,1.);
3686  f8pCorrelations->SetTickLength(-0.01,"Y");
3687  f8pCorrelations->SetMarkerStyle(25);
3688  f8pCorrelations->SetLabelSize(0.02);
3689  f8pCorrelations->SetLabelOffset(0.02,"Y");
3690  f8pCorrelations->SetStats(kFALSE);
3691  f8pCorrelations->Sumw2();
3692  //fMixedHarmonicsProfiles->Add(f8pCorrelations); // TBI
3693 
3694  // c) Book all objects in TList fMixedHarmonicsResults:
3695  // QC{2}:
3696  f2pCumulants = f2pCorrelations->ProjectionX("f2pCumulants");
3697  f2pCumulants->SetTitle(Form("2-particle cumulants (n = %d)",fHarmonic));
3698  f2pCumulants->SetStats(kFALSE);
3699  f2pCumulants->SetMarkerStyle(kFullSquare);
3700  f2pCumulants->SetMarkerColor(kBlack);
3701  f2pCumulants->SetLineColor(kBlack);
3703  // QC{3}:
3704  f3pCumulants = f3pCorrelations->ProjectionX("f3pCumulants");
3705  f3pCumulants->SetTitle(Form("3-particle cumulants (n = %d)",fHarmonic));
3706  f3pCumulants->SetStats(kFALSE);
3707  f3pCumulants->SetMarkerStyle(kFullSquare);
3708  f3pCumulants->SetMarkerColor(kGreen+2);
3709  f3pCumulants->SetLineColor(kGreen+2);
3711  // QC{4}:
3712  f4pCumulants = f4pCorrelations->ProjectionX("f4pCumulants");
3713  f4pCumulants->SetTitle(Form("4-particle cumulants (n = %d)",fHarmonic));
3714  f4pCumulants->SetStats(kFALSE);
3715  f4pCumulants->SetMarkerStyle(kFullSquare);
3716  f4pCumulants->SetMarkerColor(kRed);
3717  f4pCumulants->SetLineColor(kRed);
3719  // QC{5}:
3720  f5pCumulants = f5pCorrelations->ProjectionX("f5pCumulants");
3721  f5pCumulants->SetTitle(Form("5-particle cumulants (n = %d)",fHarmonic));
3722  f5pCumulants->SetStats(kFALSE);
3723  f5pCumulants->SetMarkerStyle(kFullSquare);
3724  f5pCumulants->SetMarkerColor(kBlue);
3725  f5pCumulants->SetLineColor(kBlue);
3727 
3728  // d) Book all objects in TList fMixedHarmonicsErrorPropagation:
3729  // Sum of linear and quadratic event weights for mixed harmonics => [0=linear 1,1=quadratic]:
3730  TString mixedHarmonicEventWeightsName = "fMixedHarmonicEventWeights";
3731  mixedHarmonicEventWeightsName += fAnalysisLabel->Data();
3732  TString powerFlag[2] = {"linear","quadratic"};
3733  for(Int_t power=0;power<2;power++)
3734  {
3735  fMixedHarmonicEventWeights[power] = new TH1D(Form("%s: %s",mixedHarmonicEventWeightsName.Data(),powerFlag[power].Data()),Form("Sum of %s event weights for correlations",powerFlag[power].Data()),8,0.,8.);
3736  fMixedHarmonicEventWeights[power]->SetLabelSize(0.04);
3737  fMixedHarmonicEventWeights[power]->SetMarkerStyle(25);
3738  fMixedHarmonicEventWeights[power]->SetStats(kFALSE);
3739  if(power == 0)
3740  {
3741  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum w_{#LT1#GT}");
3742  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum w_{#LT2#GT}");
3743  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum w_{#LT3#GT}");
3744  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum w_{#LT4#GT}");
3745  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(5,"#sum w_{#LT5#GT}");
3746  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(6,"#sum w_{#LT6#GT}");
3747  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(7,"#sum w_{#LT7#GT}");
3748  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(8,"#sum w_{#LT8#GT}");
3749  } else if (power == 1)
3750  {
3751  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum w_{#LT1#GT}^{2}");
3752  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum w_{#LT2#GT}^{2}");
3753  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum w_{#LT3#GT}^{2}");
3754  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum w_{#LT4#GT}^{2}");
3755  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(5,"#sum w_{#LT5#GT}^{2}");
3756  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(6,"#sum w_{#LT6#GT}^{2}");
3757  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(7,"#sum w_{#LT7#GT}^{2}");
3758  (fMixedHarmonicEventWeights[power]->GetXaxis())->SetBinLabel(8,"#sum w_{#LT8#GT}^{2}");
3759  }
3761  } // end of for(Int_t power=0;power<2;power++)
3762 
3763  // Sums of products of event weights for mixed harmonics:
3764  TString mixedHarmonicProductOfEventWeightsName = "fMixedHarmonicProductOfEventWeights";
3765  mixedHarmonicProductOfEventWeightsName += fAnalysisLabel->Data();
3766  fMixedHarmonicProductOfEventWeights = new TH2D(mixedHarmonicProductOfEventWeightsName.Data(),"Sums of products of event weights",8,0.,8.,8,0.,8.);
3767  fMixedHarmonicProductOfEventWeights->SetStats(kFALSE);
3768  fMixedHarmonicProductOfEventWeights->GetXaxis()->SetLabelSize(0.05);
3769  fMixedHarmonicProductOfEventWeights->GetYaxis()->SetLabelSize(0.05);
3770  for(Int_t b=1;b<=8;b++)
3771  {
3772  fMixedHarmonicProductOfEventWeights->GetXaxis()->SetBinLabel(b,Form("w_{#LT%i#GT}",b));
3773  fMixedHarmonicProductOfEventWeights->GetYaxis()->SetBinLabel(b,Form("w_{#LT%i#GT}",b));
3774  }
3776 
3777  // Averages of products of mixed harmonics correlations:
3778  TString mixedHarmonicProductOfCorrelationsName = "fMixedHarmonicProductOfCorrelations";
3779  mixedHarmonicProductOfCorrelationsName += fAnalysisLabel->Data();
3780  fMixedHarmonicProductOfCorrelations = new TProfile2D(mixedHarmonicProductOfCorrelationsName.Data(),"Averages of products of mixed correlators",139,0.,139.,139,0.,139.);
3782  fMixedHarmonicProductOfCorrelations->SetStats(kFALSE);
3783  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetLabelSize(0.015);
3784  fMixedHarmonicProductOfCorrelations->GetYaxis()->SetLabelSize(0.015);
3785  // x-axis:
3786  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(1,Form("#LT#LT2#GT#GT_{%dn|%dn}",1*fHarmonic,1*fHarmonic));
3787  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(2,Form("#LT#LT2#GT#GT_{%dn|%dn}",2*fHarmonic,2*fHarmonic));
3788  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(3,Form("#LT#LT2#GT#GT_{%dn|%dn}",3*fHarmonic,3*fHarmonic));
3789  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(4,Form("#LT#LT2#GT#GT_{%dn|%dn}",4*fHarmonic,4*fHarmonic));
3790  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(5,Form("#LT#LT2#GT#GT_{%dn|%dn}",5*fHarmonic,5*fHarmonic));
3791  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(6,Form("#LT#LT2#GT#GT_{%dn|%dn}",6*fHarmonic,6*fHarmonic));
3792  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(7,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",2*fHarmonic,1*fHarmonic,1*fHarmonic));
3793  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(8,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",4*fHarmonic,2*fHarmonic,2*fHarmonic));
3794  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(9,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",6*fHarmonic,3*fHarmonic,3*fHarmonic));
3795  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(10,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",3*fHarmonic,2*fHarmonic,1*fHarmonic));
3796  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(11,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",4*fHarmonic,3*fHarmonic,1*fHarmonic));
3797  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(12,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",5*fHarmonic,3*fHarmonic,2*fHarmonic));
3798  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(13,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",5*fHarmonic,4*fHarmonic,1*fHarmonic));
3799  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(14,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",6*fHarmonic,4*fHarmonic,2*fHarmonic));
3800  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(15,Form("#LT#LT3#GT#GT_{%dn|%dn,%dn}",6*fHarmonic,5*fHarmonic,1*fHarmonic));
3801  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(16,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",1*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic));
3802  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(17,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",2*fHarmonic,2*fHarmonic,2*fHarmonic,2*fHarmonic));
3803  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(18,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",3*fHarmonic,3*fHarmonic,3*fHarmonic,3*fHarmonic));
3804  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(19,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",4*fHarmonic,4*fHarmonic,4*fHarmonic,4*fHarmonic));
3805  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(20,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,5*fHarmonic,5*fHarmonic,5*fHarmonic));
3806  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(21,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,6*fHarmonic,6*fHarmonic,6*fHarmonic));
3807  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(22,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",2*fHarmonic,1*fHarmonic,2*fHarmonic,1*fHarmonic));
3808  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(23,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",3*fHarmonic,1*fHarmonic,3*fHarmonic,1*fHarmonic));
3809  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(24,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",3*fHarmonic,2*fHarmonic,3*fHarmonic,2*fHarmonic));
3810  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(25,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",4*fHarmonic,1*fHarmonic,4*fHarmonic,1*fHarmonic));
3811  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(26,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",4*fHarmonic,2*fHarmonic,4*fHarmonic,2*fHarmonic));
3812  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(27,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",4*fHarmonic,3*fHarmonic,4*fHarmonic,3*fHarmonic));
3813  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(28,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,1*fHarmonic,5*fHarmonic,1*fHarmonic));
3814  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(29,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,2*fHarmonic,5*fHarmonic,2*fHarmonic));
3815  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(30,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,3*fHarmonic,5*fHarmonic,3*fHarmonic));
3816  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(31,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,4*fHarmonic,5*fHarmonic,4*fHarmonic));
3817  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(32,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,1*fHarmonic,6*fHarmonic,1*fHarmonic));
3818  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(33,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,2*fHarmonic,6*fHarmonic,2*fHarmonic));
3819  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(34,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,3*fHarmonic,6*fHarmonic,3*fHarmonic));
3820  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(35,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,4*fHarmonic,6*fHarmonic,4*fHarmonic));
3821  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(36,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,5*fHarmonic,6*fHarmonic,5*fHarmonic));
3822  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(37,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",3*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic));
3823  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(38,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",6*fHarmonic,2*fHarmonic,2*fHarmonic,2*fHarmonic));
3824  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(39,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",3*fHarmonic,1*fHarmonic,2*fHarmonic,2*fHarmonic));
3825  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(40,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",4*fHarmonic,2*fHarmonic,1*fHarmonic,1*fHarmonic));
3826  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(41,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",4*fHarmonic,2*fHarmonic,3*fHarmonic,3*fHarmonic));
3827  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(42,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",5*fHarmonic,2*fHarmonic,2*fHarmonic,1*fHarmonic));
3828  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(43,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",5*fHarmonic,3*fHarmonic,1*fHarmonic,1*fHarmonic));
3829  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(44,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,1*fHarmonic,3*fHarmonic,3*fHarmonic));
3830  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(45,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,3*fHarmonic,4*fHarmonic,4*fHarmonic));
3831  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(46,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",6*fHarmonic,4*fHarmonic,1*fHarmonic,1*fHarmonic));
3832  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(47,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,2*fHarmonic,4*fHarmonic,4*fHarmonic));
3833  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(48,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,4*fHarmonic,5*fHarmonic,5*fHarmonic));
3834  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(49,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",4*fHarmonic,1*fHarmonic,3*fHarmonic,2*fHarmonic));
3835  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(50,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,1*fHarmonic,4*fHarmonic,2*fHarmonic));
3836  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(51,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",5*fHarmonic,2*fHarmonic,4*fHarmonic,3*fHarmonic));
3837  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(52,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,1*fHarmonic,4*fHarmonic,3*fHarmonic));
3838  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(53,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,1*fHarmonic,5*fHarmonic,2*fHarmonic));
3839  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(54,Form("#LT#LT4#GT#GT_{%dn|%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,2*fHarmonic,1*fHarmonic));
3840  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(55,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,2*fHarmonic,5*fHarmonic,3*fHarmonic));
3841  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(56,Form("#LT#LT4#GT#GT_{%dn,%dn|%dn,%dn}",6*fHarmonic,3*fHarmonic,5*fHarmonic,4*fHarmonic));
3842  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(57,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",3*fHarmonic,2*fHarmonic,3*fHarmonic,1*fHarmonic,1*fHarmonic));
3843  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(58,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,1*fHarmonic,2*fHarmonic,2*fHarmonic,1*fHarmonic));
3844  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(59,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,2*fHarmonic,3*fHarmonic,2*fHarmonic,1*fHarmonic));
3845  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(60,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,3*fHarmonic,3*fHarmonic,2*fHarmonic,2*fHarmonic));
3846  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(61,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,2*fHarmonic,4*fHarmonic,1*fHarmonic,1*fHarmonic));
3847  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(62,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,3*fHarmonic,4*fHarmonic,2*fHarmonic,1*fHarmonic));
3848  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(63,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,1*fHarmonic,3*fHarmonic,2*fHarmonic,1*fHarmonic));
3849  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(64,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,2*fHarmonic,5*fHarmonic,1*fHarmonic,1*fHarmonic));
3850  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(65,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,2*fHarmonic,4*fHarmonic,2*fHarmonic,1*fHarmonic));
3851  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(66,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,3*fHarmonic,4*fHarmonic,3*fHarmonic,1*fHarmonic));
3852  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(67,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,4*fHarmonic,4*fHarmonic,3*fHarmonic,2*fHarmonic));
3853  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(68,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,3*fHarmonic,5*fHarmonic,2*fHarmonic,1*fHarmonic));
3854  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(69,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,4*fHarmonic,5*fHarmonic,2*fHarmonic,2*fHarmonic));
3855  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(70,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",5*fHarmonic,4*fHarmonic,5*fHarmonic,3*fHarmonic,1*fHarmonic));
3856  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(71,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,1*fHarmonic,3*fHarmonic,3*fHarmonic,1*fHarmonic));
3857  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(72,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,2*fHarmonic,3*fHarmonic,3*fHarmonic,2*fHarmonic));
3858  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(73,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,1*fHarmonic,4*fHarmonic,2*fHarmonic,1*fHarmonic));
3859  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(74,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,4*fHarmonic,3*fHarmonic,2*fHarmonic));
3860  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(75,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,4*fHarmonic,4*fHarmonic,3*fHarmonic,3*fHarmonic));
3861  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(76,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,2*fHarmonic,5*fHarmonic,2*fHarmonic,1*fHarmonic));
3862  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(77,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,5*fHarmonic,3*fHarmonic,1*fHarmonic));
3863  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(78,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,4*fHarmonic,5*fHarmonic,4*fHarmonic,1*fHarmonic));
3864  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(79,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,5*fHarmonic,5*fHarmonic,3*fHarmonic,3*fHarmonic));
3865  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(80,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,2*fHarmonic,6*fHarmonic,1*fHarmonic,1*fHarmonic));
3866  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(81,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,6*fHarmonic,2*fHarmonic,1*fHarmonic));
3867  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(82,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,4*fHarmonic,6*fHarmonic,2*fHarmonic,2*fHarmonic));
3868  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(83,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,4*fHarmonic,6*fHarmonic,3*fHarmonic,1*fHarmonic));
3869  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(84,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,5*fHarmonic,5*fHarmonic,4*fHarmonic,2*fHarmonic));
3870  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(85,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,5*fHarmonic,6*fHarmonic,3*fHarmonic,2*fHarmonic));
3871  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(86,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,5*fHarmonic,6*fHarmonic,4*fHarmonic,1*fHarmonic));
3872  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(87,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",2*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic));
3873  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(88,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",2*fHarmonic,2*fHarmonic,2*fHarmonic,1*fHarmonic,1*fHarmonic));
3874  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(89,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",3*fHarmonic,3*fHarmonic,2*fHarmonic,2*fHarmonic,2*fHarmonic));
3875  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(90,Form("#LT#LT5#GT#GT_{%dn|%dn,%dn,%dn,%dn}",4*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic,1*fHarmonic));
3876  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(91,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,2*fHarmonic,2*fHarmonic,2*fHarmonic,2*fHarmonic));
3877  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(92,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",4*fHarmonic,4*fHarmonic,4*fHarmonic,2*fHarmonic,2*fHarmonic));
3878  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(93,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,3*fHarmonic,3*fHarmonic,3*fHarmonic,3*fHarmonic));
3879  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(94,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,6*fHarmonic,4*fHarmonic,4*fHarmonic,4*fHarmonic));
3880  fMixedHarmonicProductOfCorrelations->GetXaxis()->SetBinLabel(95,Form("#LT#LT5#GT#GT_{%dn,%dn|%dn,%dn,%dn}",6*fHarmonic,6*