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