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