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