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