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