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