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