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