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