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