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