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