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