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