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