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