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