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