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