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