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