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