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