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