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