]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithQCumulants.h
added plotting versus refmult and modified some classes to not stream
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / AliFlowAnalysisWithQCumulants.h
1 /* 
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. 
3  * See cxx source for full Copyright notice 
4  * $Id$ 
5  */
6
7 /********************************** 
8  * flow analysis with Q-cumulants * 
9  *                                * 
10  * author: Ante Bilandzic         * 
11  *        (abilandzic@gmail.com)  *
12  *********************************/ 
13
14 #ifndef ALIFLOWANALYSISWITHQCUMULANTS_H
15 #define ALIFLOWANALYSISWITHQCUMULANTS_H
16
17 #include "AliFlowCommonConstants.h" // needed as include
18 #include "TMatrixD.h"
19 #include "TH2D.h"
20 #include "TBits.h"
21
22 class TObjArray;
23 class TList;
24 class TFile;
25 class TGraph;
26
27 class TH1;
28 class TProfile;
29 class TProfile2D;
30 class TDirectoryFile;
31
32 class AliFlowEventSimple;
33 class AliFlowVector;
34
35 class AliFlowCommonHist;
36 class AliFlowCommonHistResults;
37
38 //================================================================================================================
39
40 class AliFlowAnalysisWithQCumulants{
41  public:
42   AliFlowAnalysisWithQCumulants();
43   virtual ~AliFlowAnalysisWithQCumulants(); 
44   // 0.) methods called in the constructor:
45   virtual void InitializeArraysForIntFlow();
46   virtual void InitializeArraysForDiffFlow();
47   virtual void InitializeArraysForDistributions();
48   virtual void InitializeArraysForNestedLoops();
49   // 1.) method Init() and methods called within Init():
50   virtual void Init();
51     virtual void CrossCheckSettings();
52     virtual void AccessConstants();
53     virtual void BookAndNestAllLists();
54     virtual void BookCommonHistograms();
55     virtual void BookAndFillWeightsHistograms();
56     virtual void BookEverythingForIntegratedFlow();
57     virtual void BookEverythingForDifferentialFlow();
58     virtual void BookEverythingForDistributions();  
59     virtual void BookEverythingForNestedLoops();   
60     virtual void StoreIntFlowFlags();
61     virtual void StoreDiffFlowFlags();
62     virtual void StoreFlagsForDistributions();   
63     virtual void StoreHarmonic();
64   // 2.) method Make() and methods called within Make():
65   virtual void Make(AliFlowEventSimple *anEvent);
66     // 2a.) common:
67     virtual void FillAverageMultiplicities(Int_t nRP);
68     virtual void FillCommonControlHistograms(AliFlowEventSimple *anEvent);
69     virtual void ResetEventByEventQuantities();
70     // 2b.) integrated flow:
71     virtual void CalculateIntFlowCorrelations(); 
72     virtual void CalculateIntFlowCorrelationsUsingParticleWeights();
73     virtual void CalculateIntFlowProductOfCorrelations();
74     virtual void CalculateIntFlowSumOfEventWeights();
75     virtual void CalculateIntFlowSumOfProductOfEventWeights();
76     virtual void CalculateIntFlowCorrectionsForNUACosTerms();
77     virtual void CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights();
78     virtual void CalculateIntFlowCorrectionsForNUASinTerms();  
79     virtual void CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights();    
80     virtual void CalculateIntFlowProductOfCorrectionTermsForNUA();
81     virtual void CalculateIntFlowSumOfEventWeightsNUA();
82     virtual void CalculateIntFlowSumOfProductOfEventWeightsNUA();
83     // ...  
84     virtual void CalculateWeightedQProductsForIntFlow();
85     virtual void EvaluateIntFlowCorrelationsWithNestedLoops(AliFlowEventSimple* const anEvent); 
86     virtual void EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* const anEvent); 
87     virtual void EvaluateIntFlowCorrectionsForNUAWithNestedLoops(AliFlowEventSimple* const anEvent); 
88     virtual void EvaluateIntFlowCorrectionsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* const anEvent);
89     // 2c.) differential flow:
90     virtual void CalculateDiffFlowCorrelations(TString type, TString ptOrEta); // type = RP or POI
91     virtual void CalculateDiffFlowCorrelationsUsingParticleWeights(TString type, TString ptOrEta); // type = RP or POI 
92     virtual void CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta); // type = RP or POI
93     virtual void CalculateDiffFlowSumOfEventWeights(TString type, TString ptOrEta); // type = RP or POI
94     virtual void CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta); // type = RP or POI
95     virtual void CalculateDiffFlowCorrectionsForNUACosTerms(TString type, TString ptOrEta);
96     virtual void CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights(TString type, TString ptOrEta);
97     virtual void CalculateDiffFlowCorrectionsForNUASinTerms(TString type, TString ptOrEta);  
98     virtual void CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights(TString type, TString ptOrEta);  
99     // ...
100     //virtual void CalculateCorrelationsForDifferentialFlow2D(TString type); // type = RP or POI
101     //virtual void CalculateCorrectionsForNonUniformAcceptanceForDifferentialFlowCosTerms(TString type); // type = RP or POI  
102     //virtual void CalculateCorrectionsForNonUniformAcceptanceForDifferentialFlowSinTerms(TString type); // type = RP or POI
103     virtual void EvaluateDiffFlowCorrelationsWithNestedLoops(AliFlowEventSimple* const anEvent, TString type, TString ptOrEta);
104     virtual void EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* const anEvent, TString type, TString ptOrEta); 
105     virtual void EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(AliFlowEventSimple* const anEvent, TString type, TString ptOrEta);
106     virtual void EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* const anEvent, TString type, TString ptOrEta);
107     // 2d.) distributions of correlations:
108     virtual void StoreDistributionsOfCorrelations();
109   // 3.) method Finish() and methods called within Finish():
110   virtual void Finish();
111     // 3a.) integrated flow:
112     virtual void FinalizeCorrelationsIntFlow();
113     virtual void FinalizeCorrectionTermsForNUAIntFlow(); 
114     virtual void CalculateCovariancesIntFlow();  
115     virtual void CalculateCovariancesNUAIntFlow();  
116     virtual void CalculateCumulantsIntFlow(); 
117     virtual void CalculateIntFlow(); 
118     virtual void FillCommonHistResultsIntFlow();
119     // nua:   
120     //virtual void CalculateCorrectionsForNUAForIntQcumulants();
121     virtual void CalculateQcumulantsCorrectedForNUAIntFlow(); 
122     virtual void CalculateIntFlowCorrectedForNUA(); 
123     virtual void CalculateDetectorEffectsForTrueCorrelations();
124     //virtual void ApplyCorrectionForNonUniformAcceptanceToCumulantsForIntFlow(Bool_t useParticleWeights, TString eventWeights); 
125     //virtual void PrintQuantifyingCorrectionsForNonUniformAcceptance(Bool_t useParticleWeights, TString eventWeights);
126     virtual void PrintFinalResultsForIntegratedFlow(TString type);
127     virtual void CrossCheckIntFlowCorrelations();
128     virtual void CrossCheckIntFlowExtraCorrelations(); // extra correlations which appear only when particle weights are used
129     virtual void CrossCheckIntFlowCorrectionTermsForNUA(); 
130     // 3b.) differential flow:
131     virtual void FinalizeReducedCorrelations(TString type, TString ptOrEta);
132     virtual void CalculateDiffFlowCovariances(TString type, TString ptOrEta); 
133     virtual void CalculateDiffFlowCumulants(TString type, TString ptOrEta); 
134     virtual void CalculateDiffFlow(TString type, TString ptOrEta); 
135     virtual void FinalizeCorrectionTermsForNUADiffFlow(TString type, TString ptOrEta); 
136     virtual void CalculateDiffFlowCumulantsCorrectedForNUA(TString type, TString ptOrEta);   
137     virtual void CalculateDiffFlowCorrectedForNUA(TString type, TString ptOrEta); 
138     virtual void CalculateFinalResultsForRPandPOIIntegratedFlow(TString type); // to be improved (add also possibility to integrate over eta yield)
139     virtual void FillCommonHistResultsDiffFlow(TString type);   
140     virtual void CrossCheckDiffFlowCorrelations(TString type, TString ptOrEta);
141     virtual void PrintNumberOfParticlesInSelectedBin();     
142     virtual void CrossCheckDiffFlowCorrectionTermsForNUA(TString type, TString ptOrEta); 
143         
144     // to be improved (removed):
145     //virtual void FinalizeCorrelationsForDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights); 
146       
147   // 4.)  method GetOutputHistograms() and methods called within GetOutputHistograms(): 
148   virtual void GetOutputHistograms(TList *outputListHistos);
149     virtual void GetPointersForCommonHistograms(); 
150     virtual void GetPointersForParticleWeightsHistograms();
151     virtual void GetPointersForIntFlowHistograms(); 
152     virtual void GetPointersForDiffFlowHistograms(); 
153     virtual void GetPointersForNestedLoopsHistograms(); 
154     
155   // 5.) other methods:   
156   TProfile* MakePtProjection(TProfile2D *profilePtEta) const;
157   TProfile* MakeEtaProjection(TProfile2D *profilePtEta) const;
158   virtual void WriteHistograms(TString outputFileName);
159   virtual void WriteHistograms(TDirectoryFile *outputFileName);
160   
161   // **** SETTERS and GETTERS ****
162   
163   // 0.) base:
164   void SetHistList(TList* const hlist) {this->fHistList = hlist;} 
165   TList* GetHistList() const {return this->fHistList;} 
166   
167   // 1.) common:
168   void SetCommonHists(AliFlowCommonHist* const ch) {this->fCommonHists = ch;};
169   AliFlowCommonHist* GetCommonHists() const {return this->fCommonHists;};
170   void SetCommonHists2nd(AliFlowCommonHist* const ch2nd) {this->fCommonHists2nd = ch2nd;};
171   AliFlowCommonHist* GetCommonHists2nd() const {return this->fCommonHists2nd;};
172   void SetCommonHists4th(AliFlowCommonHist* const ch4th) {this->fCommonHists4th = ch4th;};
173   AliFlowCommonHist* GetCommonHists4th() const {return this->fCommonHists4th;};
174   void SetCommonHists6th(AliFlowCommonHist* const ch6th) {this->fCommonHists6th = ch6th;};
175   AliFlowCommonHist* GetCommonHists6th() const {return this->fCommonHists6th;};
176   void SetCommonHists8th(AliFlowCommonHist* const ch8th) {this->fCommonHists8th = ch8th;};
177   AliFlowCommonHist* GetCommonHists8th() const {return this->fCommonHists8th;};
178   void SetCommonHistsResults2nd(AliFlowCommonHistResults* const chr2nd) {this->fCommonHistsResults2nd = chr2nd;};
179   AliFlowCommonHistResults* GetCommonHistsResults2nd() const {return this->fCommonHistsResults2nd;};
180   void SetCommonHistsResults4th(AliFlowCommonHistResults* const chr4th) {this->fCommonHistsResults4th = chr4th;};
181   AliFlowCommonHistResults* GetCommonHistsResults4th() const {return this->fCommonHistsResults4th;};
182   void SetCommonHistsResults6th(AliFlowCommonHistResults* const chr6th) {this->fCommonHistsResults6th = chr6th;};
183   AliFlowCommonHistResults* GetCommonHistsResults6th() const {return this->fCommonHistsResults6th;};
184   void SetCommonHistsResults8th(AliFlowCommonHistResults* const chr8th) {this->fCommonHistsResults8th = chr8th;};
185   AliFlowCommonHistResults* GetCommonHistsResults8th() const {return this->fCommonHistsResults8th;};
186   void SetHarmonic(Int_t const harmonic) {this->fHarmonic = harmonic;};
187   Int_t GetHarmonic() const {return this->fHarmonic;};
188   void SetAnalysisLabel(const char *aLabel) {this->fAnalysisLabel->Append(*aLabel);}; // to be improved (Append(*aLabel) changed into Append(aLabel)) 
189   TString *GetAnalysisLabel() const {return this->fAnalysisLabel;};
190   void SetPrintFinalResults(Bool_t const printOrNot, Int_t const i) {this->fPrintFinalResults[i] = printOrNot;};
191   Bool_t GetPrintFinalResults(Int_t i) const {return this->fPrintFinalResults[i];};
192    
193   // 2a.) particle weights:
194   void SetWeightsList(TList* const wlist) {this->fWeightsList = (TList*)wlist->Clone();}
195   TList* GetWeightsList() const {return this->fWeightsList;}  
196   void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
197   Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
198   void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
199   Bool_t GetUsePtWeights() const {return this->fUsePtWeights;};
200   void SetUseEtaWeights(Bool_t const uEtaW) {this->fUseEtaWeights = uEtaW;};
201   Bool_t GetUseEtaWeights() const {return this->fUseEtaWeights;};
202   void SetUseParticleWeights(TProfile* const uPW) {this->fUseParticleWeights = uPW;};
203   TProfile* GetUseParticleWeights() const {return this->fUseParticleWeights;};
204   void SetPhiWeights(TH1F* const histPhiWeights) {this->fPhiWeights = histPhiWeights;};
205   TH1F* GetPhiWeights() const {return this->fPhiWeights;};
206   void SetPtWeights(TH1D* const histPtWeights) {this->fPtWeights = histPtWeights;};
207   TH1D* GetPtWeights() const {return this->fPtWeights;};
208   void SetEtaWeights(TH1D* const histEtaWeights) {this->fEtaWeights = histEtaWeights;};
209   TH1D* GetEtaWeights() const {return this->fEtaWeights;};
210   
211   // 2b.) event weights:
212   void SetMultiplicityWeight(const char *multiplicityWeight) {*this->fMultiplicityWeight = multiplicityWeight;};
213   
214   // 3.) integrated flow:
215   // flags:
216   void SetIntFlowFlags(TProfile* const intFlowFlags) {this->fIntFlowFlags = intFlowFlags;};
217   TProfile* GetIntFlowFlags() const {return this->fIntFlowFlags;};
218   void SetApplyCorrectionForNUA(Bool_t const applyCorrectionForNUA) {this->fApplyCorrectionForNUA = applyCorrectionForNUA;};
219   Bool_t GetApplyCorrectionForNUA() const {return this->fApplyCorrectionForNUA;};
220   void SetApplyCorrectionForNUAVsM(Bool_t const applyCorrectionForNUAVsM) {this->fApplyCorrectionForNUAVsM = applyCorrectionForNUAVsM;};
221   Bool_t GetApplyCorrectionForNUAVsM() const {return this->fApplyCorrectionForNUAVsM;};  
222   void SetnBinsMult(Int_t const nbm) {this->fnBinsMult = nbm;};
223   Int_t GetnBinsMult() const {return this->fnBinsMult;};  
224   void SetMinMult(Double_t const minm) {this->fMinMult = minm;};
225   Double_t GetMinMult() const {return this->fMinMult;};
226   void SetMaxMult(Double_t const maxm) {this->fMaxMult = maxm;};
227   Double_t GetMaxMult() const {return this->fMaxMult;};
228   // integrated flow profiles:
229   void SetAvMultiplicity(TProfile* const avMultiplicity) {this->fAvMultiplicity = avMultiplicity;};
230   TProfile* GetAvMultiplicity() const {return this->fAvMultiplicity;};
231   void SetIntFlowCorrelationsPro(TProfile* const intFlowCorrelationsPro) {this->fIntFlowCorrelationsPro = intFlowCorrelationsPro;};
232   TProfile* GetIntFlowCorrelationsPro() const {return this->fIntFlowCorrelationsPro;};
233   void SetIntFlowCorrelationsVsMPro(TProfile* const ifcvp, Int_t const ci) {this->fIntFlowCorrelationsVsMPro[ci] = ifcvp;};
234   TProfile* GetIntFlowCorrelationsVsMPro(Int_t const ci) const {return this->fIntFlowCorrelationsVsMPro[ci];};  
235   void SetIntFlowCorrelationsAllPro(TProfile* const intFlowCorrelationsAllPro) {this->fIntFlowCorrelationsAllPro = intFlowCorrelationsAllPro;};
236   TProfile* GetIntFlowCorrelationsAllPro() const {return this->fIntFlowCorrelationsAllPro;};  
237   void SetIntFlowExtraCorrelationsPro(TProfile* const intFlowExtraCorrelationsPro) {this->fIntFlowExtraCorrelationsPro = intFlowExtraCorrelationsPro;};
238   TProfile* GetIntFlowExtraCorrelationsPro() const {return this->fIntFlowExtraCorrelationsPro;};  
239   void SetIntFlowProductOfCorrelationsPro(TProfile* const intFlowProductOfCorrelationsPro) {this->fIntFlowProductOfCorrelationsPro = intFlowProductOfCorrelationsPro;};
240   TProfile* GetIntFlowProductOfCorrelationsPro() const {return this->fIntFlowProductOfCorrelationsPro;};      
241   void SetIntFlowProductOfCorrelationsVsMPro(TProfile* const ifpocvm, Int_t const pi) {this->fIntFlowProductOfCorrelationsVsMPro[pi] = ifpocvm;};
242   TProfile* GetIntFlowProductOfCorrelationsVsMPro(Int_t const pi) const {return this->fIntFlowProductOfCorrelationsVsMPro[pi];};    
243   void SetIntFlowProductOfCorrectionTermsForNUAPro(TProfile* const ifpoctfNUA) {this->fIntFlowProductOfCorrectionTermsForNUAPro = ifpoctfNUA;};
244   TProfile* GetIntFlowProductOfCorrectionTermsForNUAPro() const {return this->fIntFlowProductOfCorrectionTermsForNUAPro;};  
245   void SetIntFlowCorrectionTermsForNUAPro(TProfile* const ifctfnp, Int_t const sc) {this->fIntFlowCorrectionTermsForNUAPro[sc] = ifctfnp;};
246   TProfile* GetIntFlowCorrectionTermsForNUAPro(Int_t sc) const {return this->fIntFlowCorrectionTermsForNUAPro[sc];};    
247   void SetIntFlowCorrectionTermsForNUAVsMPro(TProfile* const ifctfnpvm, Int_t const sc, Int_t const ci) {this->fIntFlowCorrectionTermsForNUAVsMPro[sc][ci] = ifctfnpvm;};
248   TProfile* GetIntFlowCorrectionTermsForNUAVsMPro(Int_t sc, Int_t ci) const {return this->fIntFlowCorrectionTermsForNUAVsMPro[sc][ci];};    
249   // integrated flow histograms holding all results:
250   void SetIntFlowCorrelationsHist(TH1D* const intFlowCorrelationsHist) {this->fIntFlowCorrelationsHist = intFlowCorrelationsHist;};
251   TH1D* GetIntFlowCorrelationsHist() const {return this->fIntFlowCorrelationsHist;};
252   void SetIntFlowCorrelationsVsMHist(TH1D* const ifcvmh, Int_t const ci) {this->fIntFlowCorrelationsVsMHist[ci] = ifcvmh;};
253   TH1D* GetIntFlowCorrelationsVsMHist(Int_t const ci) const {return this->fIntFlowCorrelationsVsMHist[ci];};    
254   void SetIntFlowCorrelationsAllHist(TH1D* const intFlowCorrelationsAllHist) {this->fIntFlowCorrelationsAllHist = intFlowCorrelationsAllHist;};
255   TH1D* GetIntFlowCorrelationsAllHist() const {return this->fIntFlowCorrelationsAllHist;};  
256   // to be improved (removed:)
257   //void SetIntFlowProductOfCorrelationsHist(TH1D* const intFlowProductOfCorrelationsHist) {this->fIntFlowProductOfCorrelationsHist = intFlowProductOfCorrelationsHist;};
258   //TH1D* GetIntFlowProductOfCorrelationsHist() const {return this->fIntFlowProductOfCorrelationsHist;};  
259   void SetIntFlowCorrectionTermsForNUAHist(TH1D* const ifctfnh, Int_t const sc) {this->fIntFlowCorrectionTermsForNUAHist[sc] = ifctfnh;};
260   TH1D* GetIntFlowCorrectionTermsForNUAHist(Int_t sc) const {return this->fIntFlowCorrectionTermsForNUAHist[sc];};  
261   void SetIntFlowCovariances(TH1D* const intFlowCovariances) {this->fIntFlowCovariances = intFlowCovariances;};
262   TH1D* GetIntFlowCovariances() const {return this->fIntFlowCovariances;};
263   void SetIntFlowSumOfEventWeights(TH1D* const intFlowSumOfEventWeights, Int_t const power) {this->fIntFlowSumOfEventWeights[power] = intFlowSumOfEventWeights;};
264   TH1D* GetIntFlowSumOfEventWeights(Int_t power) const {return this->fIntFlowSumOfEventWeights[power];};
265   void SetIntFlowSumOfProductOfEventWeights(TH1D* const intFlowSumOfProductOfEventWeights) {this->fIntFlowSumOfProductOfEventWeights = intFlowSumOfProductOfEventWeights;};
266   TH1D* GetIntFlowSumOfProductOfEventWeights() const {return this->fIntFlowSumOfProductOfEventWeights;}; 
267   void SetIntFlowCovariancesVsM(TH1D* const ifcvm, Int_t ci) {this->fIntFlowCovariancesVsM[ci] = ifcvm;};
268   TH1D* GetIntFlowCovariancesVsM(Int_t ci) const {return this->fIntFlowCovariancesVsM[ci];};    
269   void SetIntFlowSumOfEventWeightsVsM(TH1D* const ifsoewvm, Int_t si, Int_t lc) {this->fIntFlowSumOfEventWeightsVsM[si][lc] = ifsoewvm;};
270   TH1D* GetIntFlowSumOfEventWeightsVsM(Int_t si, Int_t lc) const {return this->fIntFlowSumOfEventWeightsVsM[si][lc];};    
271   void SetIntFlowSumOfProductOfEventWeightsVsM(TH1D* const ifsopoevm, Int_t si) {this->fIntFlowSumOfProductOfEventWeightsVsM[si] = ifsopoevm;};
272   TH1D* GetIntFlowSumOfProductOfEventWeightsVsM(Int_t si) const {return this->fIntFlowSumOfProductOfEventWeightsVsM[si];};      
273   void SetIntFlowCovariancesNUA(TH1D* const intFlowCovariancesNUA) {this->fIntFlowCovariancesNUA = intFlowCovariancesNUA;};
274   TH1D* GetIntFlowCovariancesNUA() const {return this->fIntFlowCovariancesNUA;};
275   void SetIntFlowSumOfEventWeightsNUA(TH1D* const ifsoewNUA, Int_t const sc, Int_t const power) {this->fIntFlowSumOfEventWeightsNUA[sc][power] = ifsoewNUA;};
276   TH1D* GetIntFlowSumOfEventWeightsNUA(Int_t sc, Int_t power) const {return this->fIntFlowSumOfEventWeightsNUA[sc][power];};
277   void SetIntFlowSumOfProductOfEventWeightsNUA(TH1D* const ifsopoewNUA) {this->fIntFlowSumOfProductOfEventWeightsNUA = ifsopoewNUA;};
278   TH1D* GetIntFlowSumOfProductOfEventWeightsNUA() const {return this->fIntFlowSumOfProductOfEventWeightsNUA;}; 
279   void SetIntFlowQcumulants(TH1D* const intFlowQcumulants) {this->fIntFlowQcumulants = intFlowQcumulants;};
280   TH1D* GetIntFlowQcumulants() const {return this->fIntFlowQcumulants;}; 
281   void SetIntFlowQcumulantsVsM(TH1D* const intFlowQcumulantsVsM, Int_t co) {this->fIntFlowQcumulantsVsM[co] = intFlowQcumulantsVsM;};
282   TH1D* GetIntFlowQcumulantsVsM(Int_t co) const {return this->fIntFlowQcumulantsVsM[co];}; 
283   void SetIntFlow(TH1D* const intFlow) {this->fIntFlow = intFlow;};
284   TH1D* GetIntFlow() const {return this->fIntFlow;};
285   void SetIntFlowVsM(TH1D* const intFlowVsM, Int_t co) {this->fIntFlowVsM[co] = intFlowVsM;};
286   TH1D* GetIntFlowVsM(Int_t co) const {return this->fIntFlowVsM[co];};   
287   void SetIntFlowDetectorBias(TH1D* const ifdb) {this->fIntFlowDetectorBias = ifdb;};
288   TH1D* GetIntFlowDetectorBias() const {return this->fIntFlowDetectorBias;};  
289   void SetIntFlowDetectorBiasVsM(TH1D* const ifdbvm, Int_t ci) {this->fIntFlowDetectorBiasVsM[ci] = ifdbvm;};
290   TH1D* GetIntFlowDetectorBiasVsM(Int_t ci) const {return this->fIntFlowDetectorBiasVsM[ci];};  
291   // 4.) differential flow:
292   // flags:
293   void SetDiffFlowFlags(TProfile* const diffFlowFlags) {this->fDiffFlowFlags = diffFlowFlags;};
294   TProfile* GetDiffFlowFlags() const {return this->fDiffFlowFlags;};
295   void SetCalculate2DFlow(Bool_t const calculate2DFlow) {this->fCalculate2DFlow = calculate2DFlow;};
296   Bool_t GetCalculate2DFlow() const {return this->fCalculate2DFlow;};
297   // profiles:
298   // 1D:
299   void SetDiffFlowCorrelationsPro(TProfile* const diffFlowCorrelationsPro, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowCorrelationsPro[i][j][k] = diffFlowCorrelationsPro;};
300   TProfile* GetDiffFlowCorrelationsPro(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowCorrelationsPro[i][j][k];};
301   void SetDiffFlowProductOfCorrelationsPro(TProfile* const dfpocp, Int_t const i, Int_t const j, Int_t const k, Int_t const l) {this->fDiffFlowProductOfCorrelationsPro[i][j][k][l] = dfpocp;};
302   TProfile* GetDiffFlowProductOfCorrelationsPro(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowProductOfCorrelationsPro[i][j][k][l];};
303   void SetDiffFlowCorrectionTermsForNUAPro(TProfile* const dfctfnp, Int_t const i, Int_t const j, Int_t const k, Int_t const l) {this->fDiffFlowCorrectionTermsForNUAPro[i][j][k][l] = dfctfnp;};
304   TProfile* GetDiffFlowCorrectionTermsForNUAPro(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowCorrectionTermsForNUAPro[i][j][k][l];};  
305   // 2D:
306   void SetCorrelationsPro(TProfile2D* const correlPro, Int_t const i, Int_t const j, Int_t const k, Int_t const l) {this->fCorrelationsPro[i][j][k][l] = correlPro;};
307   TProfile2D* GetCorrelationsPro(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fCorrelationsPro[i][j][k][l];};
308   void SetProductsOfCorrelationsPro(TProfile2D* const proOfcorrelPro, Int_t const i, Int_t const j, Int_t const k, Int_t const l) {this->fProductsOfCorrelationsPro[i][j][k][l] = proOfcorrelPro;};
309   TProfile2D* GetProductsOfCorrelationsPro(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fProductsOfCorrelationsPro[i][j][k][l];};
310   void SetCorrectionTermsPro(TProfile2D* const correctTermsPro, Int_t const i, Int_t const j, Int_t const k, Int_t const l, Int_t const m) {this->fCorrectionTermsPro[i][j][k][l][m] = correctTermsPro;};
311   TProfile2D* GetCorrectionTermsPro(Int_t i, Int_t j, Int_t k, Int_t l, Int_t m) const {return this->fCorrectionTermsPro[i][j][k][l][m];};  
312   // histograms:
313   void SetDiffFlowCorrelationsHist(TH1D* const diffFlowCorrelationsHist, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowCorrelationsHist[i][j][k] = diffFlowCorrelationsHist;};
314   TH1D* GetDiffFlowCorrelationsHist(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowCorrelationsHist[i][j][k];};
315   void SetDiffFlowCovariances(TH1D* const diffFlowCovariances, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowCovariances[i][j][k] = diffFlowCovariances;};
316   TH1D* GetDiffFlowCovariances(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowCovariances[i][j][k];};  
317   void SetDiffFlowCumulants(TH1D* const diffFlowCumulants, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowCumulants[i][j][k] = diffFlowCumulants;};
318   TH1D* GetDiffFlowCumulants(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowCumulants[i][j][k];};
319   void SetDiffFlow(TH1D* const diffFlow, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlow[i][j][k] = diffFlow;};
320   TH1D* GetDiffFlow(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlow[i][j][k];};
321   void SetDiffFlowSumOfEventWeights(TH1D* const dfsoew, Int_t const i, Int_t const j, Int_t const k, Int_t const l) {this->fDiffFlowSumOfEventWeights[i][j][k][l] = dfsoew;};
322   TH1D* GetDiffFlowSumOfEventWeights(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowSumOfEventWeights[i][j][k][l];};
323   void SetDiffFlowSumOfProductOfEventWeights(TH1D* const dfsopoew, Int_t const i, Int_t const j, Int_t const k, Int_t const l) {this->fDiffFlowSumOfProductOfEventWeights[i][j][k][l] = dfsopoew;};
324   TH1D* GetDiffFlowSumOfProductOfEventWeights(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowSumOfProductOfEventWeights[i][j][k][l];};
325   void SetDiffFlowCorrectionTermsForNUAHist(TH1D* const dfctfnh, Int_t const i, Int_t const j, Int_t const k, Int_t const l) {this->fDiffFlowCorrectionTermsForNUAHist[i][j][k][l] = dfctfnh;};
326   TH1D* GetDiffFlowCorrectionTermsForNUAHist(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowCorrectionTermsForNUAHist[i][j][k][l];};  
327   
328   // 5.) distributions of correlations:
329   // flags:
330   void SetStoreDistributions(Bool_t const storeDistributions) {this->fStoreDistributions = storeDistributions;};
331   Bool_t GetStoreDistributions() const {return this->fStoreDistributions;};
332   // profile:
333   void SetDistributionsFlags(TProfile* const distributionsFlags) {this->fDistributionsFlags = distributionsFlags;};
334   TProfile* GetDistributionsFlags() const {return this->fDistributionsFlags;};  
335   // histograms:
336   void SetDistributions(TH1D* const distributions, Int_t const i) {this->fDistributions[i] = distributions;};
337   TH1D* GetDistributions(Int_t i) const {return this->fDistributions[i];};  
338   // min and max values of correlations (ci is correlations index [0=<2>,1=<4>,2=<6>,3=<8>]):
339   void SetMinValueOfCorrelation(Int_t const ci, Double_t const minValue) {this->fMinValueOfCorrelation[ci] = minValue;};
340   Double_t GetMinValueOfCorrelation(Int_t ci) const {return this->fMinValueOfCorrelation[ci];};
341   void SetMaxValueOfCorrelation(Int_t const ci, Double_t const maxValue) {this->fMaxValueOfCorrelation[ci] = maxValue;};
342   Double_t GetMaxValueOfCorrelation(Int_t ci) const {return this->fMaxValueOfCorrelation[ci];};
343     
344   // x.) debugging and cross-checking:
345   void SetNestedLoopsList(TList* const nllist) {this->fNestedLoopsList = nllist;};
346   TList* GetNestedLoopsList() const {return this->fNestedLoopsList;}; 
347   void SetEvaluateIntFlowNestedLoops(Bool_t const eifnl) {this->fEvaluateIntFlowNestedLoops = eifnl;};
348   Bool_t GetEvaluateIntFlowNestedLoops() const {return this->fEvaluateIntFlowNestedLoops;};
349   void SetEvaluateDiffFlowNestedLoops(Bool_t const edfnl) {this->fEvaluateDiffFlowNestedLoops = edfnl;};
350   Bool_t GetEvaluateDiffFlowNestedLoops() const {return this->fEvaluateDiffFlowNestedLoops;};  
351   void SetMaxAllowedMultiplicity(Int_t const maxAllowedMultiplicity) {this->fMaxAllowedMultiplicity = maxAllowedMultiplicity;};
352   Int_t GetMaxAllowedMultiplicity() const {return this->fMaxAllowedMultiplicity;};
353   void SetEvaluateNestedLoops(TProfile* const enl) {this->fEvaluateNestedLoops = enl;};
354   TProfile* GetEvaluateNestedLoops() const {return this->fEvaluateNestedLoops;}; 
355   void SetIntFlowDirectCorrelations(TProfile* const ifdc) {this->fIntFlowDirectCorrelations = ifdc;};
356   TProfile* GetIntFlowDirectCorrelations() const {return this->fIntFlowDirectCorrelations;};
357   void SetIntFlowExtraDirectCorrelations(TProfile* const ifedc) {this->fIntFlowExtraDirectCorrelations = ifedc;};
358   TProfile* GetIntFlowExtraDirectCorrelations() const {return this->fIntFlowExtraDirectCorrelations;};
359   void SetIntFlowDirectCorrectionTermsForNUA(TProfile* const ifdctfn, Int_t const sc) {this->fIntFlowDirectCorrectionTermsForNUA[sc] = ifdctfn;};
360   TProfile* GetIntFlowDirectCorrectionTermsForNUA(Int_t sc) const {return this->fIntFlowDirectCorrectionTermsForNUA[sc];};  
361   void SetCrossCheckInPtBinNo(Int_t const crossCheckInPtBinNo) {this->fCrossCheckInPtBinNo = crossCheckInPtBinNo;};
362   Int_t GetCrossCheckInPtBinNo() const {return this->fCrossCheckInPtBinNo;};
363   void SetCrossCheckInEtaBinNo(Int_t const crossCheckInEtaBinNo) {this->fCrossCheckInEtaBinNo = crossCheckInEtaBinNo;};
364   Int_t GetCrossCheckInEtaBinNo() const {return this->fCrossCheckInEtaBinNo;};
365   void SetNoOfParticlesInBin(TH1D* const noOfParticlesInBin) {this->fNoOfParticlesInBin = noOfParticlesInBin;};
366   TH1D* GetNoOfParticlesInBin() const {return this->fNoOfParticlesInBin;};  
367   void SetDiffFlowDirectCorrelations(TProfile* const diffFlowDirectCorrelations,Int_t const i,Int_t const j,Int_t const k){this->fDiffFlowDirectCorrelations[i][j][k]=diffFlowDirectCorrelations;};
368   TProfile* GetDiffFlowDirectCorrelations(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowDirectCorrelations[i][j][k];};
369   void SetDiffFlowDirectCorrectionTermsForNUA(TProfile* const dfdctfn, Int_t const i, Int_t const j, Int_t const k, Int_t const l) {this->fDiffFlowDirectCorrectionTermsForNUA[i][j][k][l] = dfdctfn;};
370   TProfile* GetDiffFlowDirectCorrectionTermsForNUA(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowDirectCorrectionTermsForNUA[i][j][k][l];};  
371         
372  private:
373   
374   AliFlowAnalysisWithQCumulants(const AliFlowAnalysisWithQCumulants& afawQc);
375   AliFlowAnalysisWithQCumulants& operator=(const AliFlowAnalysisWithQCumulants& afawQc); 
376   
377   // 0.) base:
378   TList* fHistList; // base list to hold all output object
379   
380   // 1.) common:
381   AliFlowCommonHist *fCommonHists; // common control histograms (taking into account ALL events) 
382   AliFlowCommonHist *fCommonHists2nd; // common control histograms (taking into account only the events with 2 and more particles) 
383   AliFlowCommonHist *fCommonHists4th; // common control histograms (taking into account only the events with 4 and more particles) 
384   AliFlowCommonHist *fCommonHists6th; // common control histograms (taking into account only the events with 6 and more particles) 
385   AliFlowCommonHist *fCommonHists8th; // common control histograms (taking into account only the events with 8 and more particles) 
386   AliFlowCommonHistResults *fCommonHistsResults2nd; // final results for 2nd order int. and diff. flow for events with 2 and more particles
387   AliFlowCommonHistResults *fCommonHistsResults4th; // final results for 4th order int. and diff. flow for events with 4 and more particles 
388   AliFlowCommonHistResults *fCommonHistsResults6th; // final results for 6th order int. and diff. flow for events with 6 and more particles
389   AliFlowCommonHistResults *fCommonHistsResults8th; // final results for 8th order int. and diff. flow for events with 8 and more particles
390   Int_t fnBinsPhi; // number of phi bins
391   Double_t fPhiMin; // minimum phi   
392   Double_t fPhiMax; // maximum phi 
393   Double_t fPhiBinWidth; // bin width for phi histograms  
394   Int_t fnBinsPt; // number of pt bins
395   Double_t fPtMin; // minimum pt   
396   Double_t fPtMax; // maximum pt  
397   Double_t fPtBinWidth; // bin width for pt histograms  
398   Int_t fnBinsEta; // number of eta bins
399   Double_t fEtaMin; // minimum eta   
400   Double_t fEtaMax; // maximum eta
401   Double_t fEtaBinWidth; // bin width for eta histograms  
402   Int_t fHarmonic; // harmonic 
403   TString *fAnalysisLabel; // analysis label (all histograms and output file will have this label)
404   Bool_t fPrintFinalResults[3]; // print on the screen the final results (0=NONAME, 1=RP, 2=POI)
405   
406   // 2a.) particle weights:
407   TList *fWeightsList; // list to hold all histograms with particle weights: fUseParticleWeights, fPhiWeights, fPtWeights and fEtaWeights
408   Bool_t fUsePhiWeights; // use phi weights
409   Bool_t fUsePtWeights; // use pt weights
410   Bool_t fUseEtaWeights; // use eta weights
411   TProfile *fUseParticleWeights; // profile with three bins to hold values of fUsePhiWeights, fUsePtWeights and fUseEtaWeights
412   TH1F *fPhiWeights; // histogram holding phi weights
413   TH1D *fPtWeights; // histogram holding phi weights
414   TH1D *fEtaWeights; // histogram holding phi weights 
415   
416   // 2b.) event weights:
417   TString *fMultiplicityWeight; // event-by-event weights for multiparticle correlations
418   
419   // 3.) integrated flow       
420   //  3a.) lists:
421   TList *fIntFlowList; // list to hold all histograms and profiles relevant for integrated flow 
422   TList *fIntFlowProfiles; // list to hold all profiles relevant for integrated flow
423   TList *fIntFlowResults; // list to hold all histograms with final results relevant for integrated flow  
424   //  3b.) flags:
425   TProfile *fIntFlowFlags; // profile to hold all flags for integrated flow
426   Bool_t fApplyCorrectionForNUA; // apply correction for non-uniform acceptance 
427   Bool_t fApplyCorrectionForNUAVsM; // apply correction for non-uniform acceptance versus M  
428   Int_t fnBinsMult; // number of multiplicity bins for flow analysis versus multiplicity  
429   Double_t fMinMult; // minimal multiplicity for flow analysis versus multiplicity  
430   Double_t fMaxMult; // maximal multiplicity for flow analysis versus multiplicity  
431   //  3c.) event-by-event quantities:
432   TMatrixD *fReQ; // fReQ[m][k] = sum_{i=1}^{M} w_{i}^{k} cos(m*phi_{i})
433   TMatrixD *fImQ; // fImQ[m][k] = sum_{i=1}^{M} w_{i}^{k} sin(m*phi_{i})
434   TMatrixD *fSMpk; // fSM[p][k] = (sum_{i=1}^{M} w_{i}^{k})^{p+1}
435   TH1D *fIntFlowCorrelationsEBE; // 1st bin: <2>, 2nd bin: <4>, 3rd bin: <6>, 4th bin: <8>
436   TH1D *fIntFlowEventWeightsForCorrelationsEBE; // 1st bin: eW_<2>, 2nd bin: eW_<4>, 3rd bin: eW_<6>, 4th bin: eW_<8>
437   TH1D *fIntFlowCorrelationsAllEBE; // to be improved (add comment)
438   TH1D *fIntFlowCorrectionTermsForNUAEBE[2]; // [0=sin terms,1=cos terms], NUA = non-uniform acceptance
439   TH1D *fIntFlowEventWeightForCorrectionTermsForNUAEBE[2]; // [0=sin terms,1=cos terms], NUA = non-uniform acceptance 
440   //  3d.) profiles:
441   TProfile *fAvMultiplicity; // profile to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8
442   TProfile *fIntFlowCorrelationsPro; // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with wrong errors!) 
443   TProfile *fIntFlowCorrelationsVsMPro[4]; // average correlations <<2>>, <<4>>, <<6>> and <<8>> versus multiplicity (error is wrong here!)
444   TProfile *fIntFlowCorrelationsAllPro; // average all correlations for integrated flow (with wrong errors!)
445   TProfile *fIntFlowExtraCorrelationsPro; // when particle weights are used some extra correlations appear 
446   TProfile *fIntFlowProductOfCorrelationsPro; // average product of correlations <2>, <4>, <6> and <8>  
447   TProfile *fIntFlowProductOfCorrelationsVsMPro[6]; // average product of correlations <2>, <4>, <6> and <8>  
448                                                     // [0=<<2><4>>,1=<<2><6>>,2=<<2><8>>,3=<<4><6>>,4=<<4><8>>,5=<<6><8>>]  
449   TProfile *fIntFlowProductOfCorrectionTermsForNUAPro; // average product of correction terms for NUA  
450   TProfile *fIntFlowCorrectionTermsForNUAPro[2]; // average correction terms for non-uniform acceptance (with wrong errors!) [0=sin terms,1=cos terms] 
451   TProfile *fIntFlowCorrectionTermsForNUAVsMPro[2][4]; // average correction terms for non-uniform acceptance (with wrong errors!) [0=sin terms,1=cos terms][correction term index] vs multiplicity   
452   //  3e.) histograms with final results:
453   TH1D *fIntFlowCorrelationsHist; // final results for average correlations <<2>>, <<4>>, <<6>> and <<8>> (with correct errors!) 
454   TH1D *fIntFlowCorrelationsVsMHist[4]; // average correlations <<2>>, <<4>>, <<6>> and <<8>> versus multiplicity (error is correct here!)
455   TH1D *fIntFlowCorrelationsAllHist; // final results for all average correlations (with correct errors!) 
456   TH1D *fIntFlowCorrectionTermsForNUAHist[2];// final results for correction terms for non-uniform acceptance (with correct errors!) [0=sin terms,1=cos terms]
457   TH1D *fIntFlowCovariances; // final result for covariances of correlations (multiplied with weight dependent prefactor)
458   TH1D *fIntFlowSumOfEventWeights[2]; // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>: [0=linear 1,1=quadratic]
459   TH1D *fIntFlowSumOfProductOfEventWeights; // sum of products of event weights for correlations <2>, <4>, <6> and <8>  
460   TH1D *fIntFlowCovariancesVsM[6]; // final result for covariances of correlations (multiplied with weight dependent prefactor) versus M
461                                    // [0=Cov(2,4),1=Cov(2,6),2=Cov(2,8),3=Cov(4,6),4=Cov(4,8),5=Cov(6,8)]
462   TH1D *fIntFlowSumOfEventWeightsVsM[4][2]; // sum of linear and quadratic event weights for <2>, <4>, <6> and <8> versum multiplicity
463                                             // [0=sum{w_{<2>}},1=sum{w_{<4>}},2=sum{w_{<6>}},3=sum{w_{<8>}}][0=linear 1,1=quadratic]
464   TH1D *fIntFlowSumOfProductOfEventWeightsVsM[6]; // sum of products of event weights for correlations <2>, <4>, <6> and <8> vs M
465                                                   // [0=sum{w_{<2>}w_{<4>}},1=sum{w_{<2>}w_{<6>}},2=sum{w_{<2>}w_{<8>}},
466                                                   //  3=sum{w_{<4>}w_{<6>}},4=sum{w_{<4>}w_{<8>}},5=sum{w_{<6>}w_{<8>}}]  
467   TH1D *fIntFlowCovariancesNUA; // final result for covariances of all terms needed for NUA (multiplied with weight dependent prefactor)
468   TH1D *fIntFlowSumOfEventWeightsNUA[2][2]; // sum of linear and quadratic event weights for NUA terms: [0=sin,1=cos][0=linear 1,1=quadratic]
469   TH1D *fIntFlowSumOfProductOfEventWeightsNUA; // sum of products of event weights for NUA terms
470   TH1D *fIntFlowQcumulants; // final results for integrated Q-cumulants QC{2}, QC{4}, QC{6} and QC{8}
471   TH1D *fIntFlowQcumulantsVsM[4]; // final results for integrated Q-cumulants QC{2}, QC{4}, QC{6} and QC{8} versus multiplicity
472   TH1D *fIntFlow; // final results for integrated flow estimates v_n{2,QC}, v_n{4,QC}, v_n{6,QC} and v_n{8,QC}
473   TH1D *fIntFlowVsM[4]; // final results for integrated flow estimates v_n{2,QC}, v_n{4,QC}, v_n{6,QC} and v_n{8,QC} versus multiplicity 
474   TH1D *fIntFlowDetectorBias; // bias coming from detector inefficiencies to <<2>>, <<4>>, <<6>> and <<8>> (corrected/measured)  
475   TH1D *fIntFlowDetectorBiasVsM[4]; // bias coming from detector inefficiencies to <<2>>, <<4>>, <<6>> and <<8>> vs M (corrected/measured)  
476   // 4.) differential flow
477   //  4a.) lists:
478   TList *fDiffFlowList; // list to hold list with all histograms (fDiffFlowResults) and list with profiles (fDiffFlowProfiles) relevant for differential flow 
479   TList *fDiffFlowProfiles; // list to hold all profiles relevant for differential flow
480   TList *fDiffFlowResults; // list to hold all histograms with final results relevant for differential flow  
481   //    4aa.) nested list in list fDiffFlowProfiles: 
482   TList *fDiffFlowCorrelationsProList[2][2]; // list to hold profiles with all correlations for differential flow [0=RP,1=POI][0=pt,1=eta] 
483   TList *fDiffFlowProductOfCorrelationsProList[2][2]; // list to hold profiles with products of all correlations for differential flow [0=RP,1=POI][0=pt,1=eta] 
484   TList *fDiffFlowCorrectionsProList[2][2]; // list to hold profiles with correction term for NUA for differential flow [0=RP,1=POI][0=pt,1=eta] 
485   //    4ab.) nested list in list fDiffFlowResults: 
486   TList *fDiffFlowCorrelationsHistList[2][2]; // list to hold histograms with all correlations for differential flow [0=RP,1=POI][0=pt,1=eta] 
487   TList *fDiffFlowSumOfEventWeightsHistList[2][2][2]; // list to hold histograms with sum of linear/quadratic event weights [0=RP,1=POI][0=pt,1=eta][0=linear 1,1=quadratic]
488   TList *fDiffFlowSumOfProductOfEventWeightsHistList[2][2]; // list to hold histograms with sum of products of event weights [0=RP,1=POI][0=pt,1=eta]
489   TList *fDiffFlowCorrectionsHistList[2][2]; // list to hold histograms with correction term for NUA for differential flow [0=RP,1=POI][0=pt,1=eta] 
490   TList *fDiffFlowCovariancesHistList[2][2]; // list to hold histograms with all covariances for differential flow [0=RP,1=POI][0=pt,1=eta] 
491   TList *fDiffFlowCumulantsHistList[2][2]; // list to hold histograms with all cumulants for differential flow [0=RP,1=POI][0=pt,1=eta] 
492   TList *fDiffFlowHistList[2][2]; // list to hold histograms with final results for differential flow [0=RP,1=POI][0=pt,1=eta]
493   //  4b.) flags:  
494   TProfile *fDiffFlowFlags; // profile to hold all flags for differential flow
495   Bool_t fCalculate2DFlow; // calculate differential flow in (pt,eta) (Remark: this is very expensive in terms of CPU time)
496   //  4c.) event-by-event quantities:
497   // 1D:
498   TProfile *fReRPQ1dEBE[3][2][4][9]; // real part [0=r,1=p,2=q][0=pt,1=eta][m][k]
499   TProfile *fImRPQ1dEBE[3][2][4][9]; // imaginary part [0=r,1=p,2=q][0=pt,1=eta][m][k]
500   TProfile *fs1dEBE[3][2][9]; // [0=r,1=p,2=q][0=pt,1=eta][k] // to be improved
501   TH1D *fDiffFlowCorrelationsEBE[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][reduced correlation index]
502   TH1D *fDiffFlowEventWeightsForCorrelationsEBE[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][event weights for reduced correlation index]
503   TH1D *fDiffFlowCorrectionTermsForNUAEBE[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]
504   // 2D:
505   TProfile2D *fReRPQ2dEBE[3][4][9]; // real part of r_{m*n,k}(pt,eta), p_{m*n,k}(pt,eta) and q_{m*n,k}(pt,eta)
506   TProfile2D *fImRPQ2dEBE[3][4][9]; // imaginary part of r_{m*n,k}(pt,eta), p_{m*n,k}(pt,eta) and q_{m*n,k}(pt,eta)
507   TProfile2D *fs2dEBE[3][9]; // [t][k] // to be improved
508   //  4d.) profiles:
509   // 1D:
510   TProfile *fDiffFlowCorrelationsPro[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][correlation index]
511   TProfile *fDiffFlowProductOfCorrelationsPro[2][2][8][8]; // [0=RP,1=POI][0=pt,1=eta] [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>] x 
512                                                            //                          [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>]
513   TProfile *fDiffFlowCorrectionTermsForNUAPro[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]
514                                                               
515   //  4e.) histograms holding final results:
516   // 1D:
517   TH1D *fDiffFlowCorrelationsHist[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][correlation index]
518   TH1D *fDiffFlowCovariances[2][2][5]; // [0=RP,1=POI][0=pW not used,1=pW used][0=exact eW,1=non-exact eW][0=pt,1=eta][index of covariances] 
519   TH1D *fDiffFlowCumulants[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][0=QC{2'},1=QC{4'},2=QC{6'},3=QC{8'}]
520   TH1D *fDiffFlow[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][0=v'{2},1=v'{4},2=v'{6},3=v'{8}]
521   TH1D *fDiffFlowSumOfEventWeights[2][2][2][4]; // [0=RP,1=POI][0=pt,1=eta][0=linear 1,1=quadratic][0=<2'>,1=<4'>,2=<6'>,3=<8'>]
522   TH1D *fDiffFlowSumOfProductOfEventWeights[2][2][8][8]; // [0=RP,1=POI][0=pt,1=eta]  [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>] x 
523                                                          //                           [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>]
524   TH1D *fDiffFlowCorrectionTermsForNUAHist[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]
525        
526   // 2D:
527   TProfile2D *fCorrelationsPro[2][2][2][4]; // [0=RP,1=POI][0=pWeights not used,1=pWeights used][0=exact eWeights,1=non-exact eWeights][corr.'s index]
528   TProfile2D *fProductsOfCorrelationsPro[2][2][2][5]; // [0=RP,1=POI][0=pW not used,1=pW used][0=exact eWeights,1=non-exact eWeights][products' index]
529   TProfile2D *fCorrectionTermsPro[2][2][2][2][2]; // [0=RP,1=POI][0=pW not used,1=pW used][0=e eW,1=ne eW][0=sin terms,1=cos terms][corr. terms' index]
530         
531   // 5.) distributions:
532   TList *fDistributionsList; // list to hold all distributions of correlations
533   TProfile *fDistributionsFlags; // profile to hold all flags for distributions of correlations
534   Bool_t fStoreDistributions; // store or not distributions of correlations
535   TH1D *fDistributions[4]; // [0=distribution of <2>,1=distribution of <4>,2=distribution of <6>,3=distribution of <8>]
536   Double_t fMinValueOfCorrelation[4]; // min values of <2>, <4>, <6> and <8>
537   Double_t fMaxValueOfCorrelation[4]; // max values of <2>, <4>, <6> and <8>
538     
539   // x.) debugging and cross-checking:
540   TList *fNestedLoopsList; // list to hold all profiles filled with nested loops
541   Bool_t fEvaluateIntFlowNestedLoops; // evaluate nested loops relevant for integrated flow
542   Bool_t fEvaluateDiffFlowNestedLoops; // evaluate nested loops relevant for differential flow
543   Int_t fMaxAllowedMultiplicity; // nested loops will be evaluated only for events with multiplicity <= fMaxAllowedMultiplicity
544   TProfile *fEvaluateNestedLoops; // profile with four bins: fEvaluateIntFlowNestedLoops, fEvaluateDiffFlowNestedLoops, fCrossCheckInPtBinNo and fCrossCheckInEtaBinNo 
545   // integrated flow:
546   TProfile *fIntFlowDirectCorrelations; // multiparticle correlations relevant for int. flow calculated with nested loops  
547   TProfile *fIntFlowExtraDirectCorrelations; // when particle weights are used some extra correlations appear   
548   TProfile *fIntFlowDirectCorrectionTermsForNUA[2]; // average correction terms for non-uniform acceptance evaluated with nested loops [0=sin terms,1=cos terms] 
549   // differential flow:
550   Int_t fCrossCheckInPtBinNo; // cross-check results for reduced correlations and corrections in this pt bin
551   Int_t fCrossCheckInEtaBinNo; // cross-check results for reduced correlations and corrections in this eta bin
552   TH1D *fNoOfParticlesInBin; // bin: 1 = # of RPs in pt bin, 2 = # of RPs in eta bin, 3 = # of POIs in pt bin, 4 = # of POIs in eta bin 
553   TProfile *fDiffFlowDirectCorrelations[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][correlation index]
554   TProfile *fDiffFlowDirectCorrectionTermsForNUA[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]
555                   
556   ClassDef(AliFlowAnalysisWithQCumulants, 0);
557 };
558
559 //================================================================================================================
560
561 #endif
562
563
564
565
566