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