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