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