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