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