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