]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/FLOW/Base/AliFlowAnalysisWithQCumulants.h
b68af37ae3f6e82043725030bb8d166db5671ce6
[u/mrichter/AliRoot.git] / PWG / FLOW / Base / 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 "TMatrixD.h"
18 #include "TH2D.h"
19 #include "TBits.h"
20
21 class TObjArray;
22 class TList;
23 class TFile;
24 class TGraph;
25
26 class TH1;
27 class TProfile;
28 class TProfile2D;
29 class TDirectoryFile;
30
31 class AliFlowEventSimple;
32 class AliFlowVector;
33
34 class AliFlowCommonConstants;
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 InitializeArraysForVarious();
49   virtual void InitializeArraysForNestedLoops();
50   // 1.) method Init() and methods called within Init():
51   virtual void Init();
52     virtual void CrossCheckSettings();
53     virtual void CommonConstants(TString method);
54     virtual void BookAndNestAllLists();
55       virtual void BookAndNestListsForDifferentialFlow();
56     virtual void BookCommonHistograms();
57     virtual void BookAndFillWeightsHistograms();
58     virtual void BookEverythingForIntegratedFlow();
59     virtual void BookEverythingForDifferentialFlow();
60     virtual void BookEverythingFor2DDifferentialFlow();
61     virtual void BookEverythingForDistributions(); 
62     virtual void BookEverythingForVarious();
63     virtual void BookEverythingForNestedLoops();   
64     virtual void StoreIntFlowFlags();
65     virtual void StoreDiffFlowFlags();
66     virtual void StoreFlagsForDistributions();   
67     virtual void StoreHarmonic();
68   // 2.) method Make() and methods called within Make():
69   virtual void Make(AliFlowEventSimple *anEvent);
70     // 2a.) Common:
71     virtual void CheckPointersUsedInMake();     
72     virtual void FillAverageMultiplicities(Int_t nRP);
73     virtual void FillCommonControlHistograms(AliFlowEventSimple *anEvent);
74     virtual void ResetEventByEventQuantities();
75     // 2b.) Reference flow:
76     virtual void CalculateIntFlowCorrelations(); 
77     virtual void CalculateIntFlowCorrelationsUsingParticleWeights();
78     virtual void CalculateIntFlowProductOfCorrelations();
79     virtual void CalculateIntFlowSumOfEventWeights();
80     virtual void CalculateIntFlowSumOfProductOfEventWeights();
81     virtual void CalculateIntFlowCorrectionsForNUACosTerms();
82     virtual void CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights();
83     virtual void CalculateIntFlowCorrectionsForNUASinTerms();  
84     virtual void CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights();    
85     virtual void CalculateIntFlowProductOfCorrectionTermsForNUA();
86     virtual void CalculateIntFlowSumOfEventWeightsNUA();
87     virtual void CalculateIntFlowSumOfProductOfEventWeightsNUA();
88     // 2c.) Cross-checking reference flow correlations with nested loops: 
89     virtual void EvaluateIntFlowNestedLoops(AliFlowEventSimple* const anEvent);
90     virtual void EvaluateIntFlowCorrelationsWithNestedLoops(AliFlowEventSimple* const anEvent); 
91     virtual void EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* const anEvent); 
92     virtual void EvaluateIntFlowCorrectionsForNUAWithNestedLoops(AliFlowEventSimple* const anEvent); 
93     virtual void EvaluateIntFlowCorrectionsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* const anEvent);
94     // 2d.) Differential flow:
95     virtual void CalculateDiffFlowCorrelations(TString type, TString ptOrEta); // type = RP or POI
96     virtual void CalculateDiffFlowCorrelationsUsingParticleWeights(TString type, TString ptOrEta); // type = RP or POI 
97     virtual void CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta); // type = RP or POI
98     virtual void CalculateDiffFlowSumOfEventWeights(TString type, TString ptOrEta); // type = RP or POI
99     virtual void CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta); // type = RP or POI
100     virtual void CalculateDiffFlowCorrectionsForNUACosTerms(TString type, TString ptOrEta);
101     virtual void CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights(TString type, TString ptOrEta);
102     virtual void CalculateDiffFlowCorrectionsForNUASinTerms(TString type, TString ptOrEta);  
103     virtual void CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights(TString type, TString ptOrEta);  
104     // 2e.) 2D differential flow:
105     virtual void Calculate2DDiffFlowCorrelations(TString type); // type = RP or POI
106     // 2f.) Other differential correlators (i.e. Teaney-Yan correlator):    
107     virtual void CalculateOtherDiffCorrelators(TString type, TString ptOrEta); // type = RP or POI    
108     // 2g.) Distributions of reference flow correlations:
109     virtual void StoreDistributionsOfCorrelations();
110     // 2h.) Store phi distibution for one event to vizualize flow:
111     virtual void StorePhiDistributionForOneEvent(AliFlowEventSimple* const anEvent);    
112     // 2i.) Cross-checking differential flow correlations with nested loops:
113     virtual void EvaluateDiffFlowNestedLoops(AliFlowEventSimple* const anEvent);
114     virtual void EvaluateDiffFlowCorrelationsWithNestedLoops(AliFlowEventSimple* const anEvent, TString type, TString ptOrEta);
115     virtual void EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* const anEvent, TString type, TString ptOrEta); 
116     virtual void EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(AliFlowEventSimple* const anEvent, TString type, TString ptOrEta);
117     virtual void EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* const anEvent, TString type, TString ptOrEta);
118     virtual void EvaluateOtherDiffCorrelatorsWithNestedLoops(AliFlowEventSimple* const anEvent, TString type, TString ptOrEta);
119   // 3.) method Finish() and methods called within Finish():
120   virtual void Finish();
121     virtual void CheckPointersUsedInFinish();     
122     // 3a.) integrated flow:
123     virtual void FinalizeCorrelationsIntFlow();
124     virtual void FinalizeCorrectionTermsForNUAIntFlow(); 
125     virtual void CalculateCovariancesIntFlow();  
126     virtual void CalculateCovariancesNUAIntFlow();  
127     virtual void CalculateCumulantsIntFlow(); 
128     virtual void CalculateReferenceFlow(); 
129     virtual void FillCommonHistResultsIntFlow();
130     //  nua:   
131     virtual void CalculateQcumulantsCorrectedForNUAIntFlow(); 
132     virtual void PrintFinalResultsForIntegratedFlow(TString type);
133     virtual void CrossCheckIntFlowCorrelations();
134     virtual void CrossCheckIntFlowExtraCorrelations(); // extra correlations which appear only when particle weights are used
135     virtual void CrossCheckIntFlowCorrectionTermsForNUA(); 
136     // 3b.) differential flow:
137     virtual void FinalizeReducedCorrelations(TString type, TString ptOrEta);
138     virtual void CalculateDiffFlowCovariances(TString type, TString ptOrEta); 
139     virtual void CalculateDiffFlowCumulants(TString type, TString ptOrEta); 
140     virtual void CalculateDiffFlow(TString type, TString ptOrEta); 
141     virtual void FinalizeCorrectionTermsForNUADiffFlow(TString type, TString ptOrEta); 
142     virtual void CalculateDiffFlowCumulantsCorrectedForNUA(TString type, TString ptOrEta);   
143     virtual void CalculateDiffFlowCorrectedForNUA(TString type, TString ptOrEta); 
144     virtual void CalculateFinalResultsForRPandPOIIntegratedFlow(TString type); // to be improved (add also possibility to integrate over eta yield)
145     virtual void FillCommonHistResultsDiffFlow(TString type);   
146     virtual void CrossCheckDiffFlowCorrelations(TString type, TString ptOrEta);
147     virtual void PrintNumberOfParticlesInSelectedBin();     
148     virtual void CrossCheckDiffFlowCorrectionTermsForNUA(TString type, TString ptOrEta); 
149     // 3c.) 2D:
150     virtual void Calculate2DDiffFlowCumulants(TString type);    
151     virtual void Calculate2DDiffFlow(TString type);    
152     // 3d.) Other differential correlators:
153     virtual void CrossCheckOtherDiffCorrelators(TString type, TString ptOrEta);
154     
155   // 4.)  method GetOutputHistograms() and methods called within GetOutputHistograms(): 
156   virtual void GetOutputHistograms(TList *outputListHistos);
157     virtual void GetPointersForCommonHistograms(); 
158     virtual void GetPointersForParticleWeightsHistograms();
159     virtual void GetPointersForIntFlowHistograms(); 
160     virtual void GetPointersForDiffFlowHistograms(); 
161     virtual void GetPointersFor2DDiffFlowHistograms(); 
162     virtual void GetPointersForOtherDiffCorrelators(); 
163     virtual void GetPointersForNestedLoopsHistograms(); 
164     
165   // 5.) other methods:   
166   TProfile* MakePtProjection(TProfile2D *profilePtEta) const;
167   TProfile* MakeEtaProjection(TProfile2D *profilePtEta) const;
168   virtual void WriteHistograms(TString outputFileName);
169   virtual void WriteHistograms(TDirectoryFile *outputFileName);
170   
171   // **** SETTERS and GETTERS ****
172   
173   // 0.) base:
174   void SetHistList(TList* const hlist) {this->fHistList = hlist;} 
175   TList* GetHistList() const {return this->fHistList;} 
176   
177   // 1.) common:
178   void SetBookOnlyBasicCCH(Bool_t const bobcch) {this->fBookOnlyBasicCCH = bobcch;};
179   Bool_t GetBookOnlyBasicCCH() const {return this->fBookOnlyBasicCCH;};  
180   void SetCommonHists(AliFlowCommonHist* const ch) {this->fCommonHists = ch;};
181   AliFlowCommonHist* GetCommonHists() const {return this->fCommonHists;};
182   void SetCommonHists2nd(AliFlowCommonHist* const ch2nd) {this->fCommonHists2nd = ch2nd;};
183   AliFlowCommonHist* GetCommonHists2nd() const {return this->fCommonHists2nd;};
184   void SetCommonHists4th(AliFlowCommonHist* const ch4th) {this->fCommonHists4th = ch4th;};
185   AliFlowCommonHist* GetCommonHists4th() const {return this->fCommonHists4th;};
186   void SetCommonHists6th(AliFlowCommonHist* const ch6th) {this->fCommonHists6th = ch6th;};
187   AliFlowCommonHist* GetCommonHists6th() const {return this->fCommonHists6th;};
188   void SetCommonHists8th(AliFlowCommonHist* const ch8th) {this->fCommonHists8th = ch8th;};
189   AliFlowCommonHist* GetCommonHists8th() const {return this->fCommonHists8th;};
190   void SetCommonHistsResults2nd(AliFlowCommonHistResults* const chr2nd) {this->fCommonHistsResults2nd = chr2nd;};
191   AliFlowCommonHistResults* GetCommonHistsResults2nd() const {return this->fCommonHistsResults2nd;};
192   void SetCommonHistsResults4th(AliFlowCommonHistResults* const chr4th) {this->fCommonHistsResults4th = chr4th;};
193   AliFlowCommonHistResults* GetCommonHistsResults4th() const {return this->fCommonHistsResults4th;};
194   void SetCommonHistsResults6th(AliFlowCommonHistResults* const chr6th) {this->fCommonHistsResults6th = chr6th;};
195   AliFlowCommonHistResults* GetCommonHistsResults6th() const {return this->fCommonHistsResults6th;};
196   void SetCommonHistsResults8th(AliFlowCommonHistResults* const chr8th) {this->fCommonHistsResults8th = chr8th;};
197   AliFlowCommonHistResults* GetCommonHistsResults8th() const {return this->fCommonHistsResults8th;};
198   void SetCommonConstants(TProfile* const cc) {this->fCommonConstants = cc;};
199   TProfile* GetCommonConstants() const {return this->fCommonConstants;};  
200   void SetFillMultipleControlHistograms(Bool_t const fmch) {this->fFillMultipleControlHistograms = fmch;};
201   Bool_t GetFillMultipleControlHistograms() const {return this->fFillMultipleControlHistograms;};  
202   void SetHarmonic(Int_t const harmonic) {this->fHarmonic = harmonic;};
203   Int_t GetHarmonic() const {return this->fHarmonic;};
204   void SetAnalysisLabel(const char *aLabel) {this->fAnalysisLabel->Append(*aLabel);}; // to be improved (Append(*aLabel) changed into Append(aLabel)) 
205   TString *GetAnalysisLabel() const {return this->fAnalysisLabel;};
206   void SetPrintFinalResults(Bool_t const printOrNot, Int_t const i) {this->fPrintFinalResults[i] = printOrNot;};
207   Bool_t GetPrintFinalResults(Int_t i) const {return this->fPrintFinalResults[i];};  
208    
209   // 2a.) particle weights:
210   void SetWeightsList(TList* const wlist) {this->fWeightsList = (TList*)wlist->Clone();}
211   TList* GetWeightsList() const {return this->fWeightsList;}  
212   void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
213   Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
214   void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
215   Bool_t GetUsePtWeights() const {return this->fUsePtWeights;};
216   void SetUseEtaWeights(Bool_t const uEtaW) {this->fUseEtaWeights = uEtaW;};
217   Bool_t GetUseEtaWeights() const {return this->fUseEtaWeights;};
218   void SetUseTrackWeights(Bool_t const uTrackW) {this->fUseTrackWeights = uTrackW;};
219   Bool_t GetUseTrackWeights() const {return this->fUseTrackWeights;};
220   void SetUseParticleWeights(TProfile* const uPW) {this->fUseParticleWeights = uPW;};
221   TProfile* GetUseParticleWeights() const {return this->fUseParticleWeights;};
222   void SetPhiWeights(TH1F* const histPhiWeights) {this->fPhiWeights = histPhiWeights;};
223   TH1F* GetPhiWeights() const {return this->fPhiWeights;};
224   void SetPtWeights(TH1D* const histPtWeights) {this->fPtWeights = histPtWeights;};
225   TH1D* GetPtWeights() const {return this->fPtWeights;};
226   void SetEtaWeights(TH1D* const histEtaWeights) {this->fEtaWeights = histEtaWeights;};
227   TH1D* GetEtaWeights() const {return this->fEtaWeights;};
228   
229   // 2b.) event weights:
230   void SetMultiplicityWeight(const char *multiplicityWeight) {*this->fMultiplicityWeight = multiplicityWeight;};
231   
232   // 3.) Reference flow:
233   // Flags:
234   void SetIntFlowFlags(TProfile* const intFlowFlags) {this->fIntFlowFlags = intFlowFlags;};
235   TProfile* GetIntFlowFlags() const {return this->fIntFlowFlags;};
236   void SetApplyCorrectionForNUA(Bool_t const applyCorrectionForNUA) {this->fApplyCorrectionForNUA = applyCorrectionForNUA;};
237   Bool_t GetApplyCorrectionForNUA() const {return this->fApplyCorrectionForNUA;};
238   void SetApplyCorrectionForNUAVsM(Bool_t const applyCorrectionForNUAVsM) {this->fApplyCorrectionForNUAVsM = applyCorrectionForNUAVsM;};
239   Bool_t GetApplyCorrectionForNUAVsM() const {return this->fApplyCorrectionForNUAVsM;};  
240   void SetnBinsMult(Int_t const nbm) {this->fnBinsMult = nbm;};
241   Int_t GetnBinsMult() const {return this->fnBinsMult;};  
242   void SetMinMult(Double_t const minm) {this->fMinMult = minm;};
243   Double_t GetMinMult() const {return this->fMinMult;};
244   void SetMaxMult(Double_t const maxm) {this->fMaxMult = maxm;};
245   Double_t GetMaxMult() const {return this->fMaxMult;};
246   void SetPropagateErrorAlsoFromNIT(Bool_t const peafNIT) {this->fPropagateErrorAlsoFromNIT = peafNIT;};
247   Bool_t GetPropagateErrorAlsoFromNIT() const {return this->fPropagateErrorAlsoFromNIT;};  
248   void SetCalculateCumulantsVsM(Bool_t const ccvm) {this->fCalculateCumulantsVsM = ccvm;};
249   Bool_t GetCalculateCumulantsVsM() const {return this->fCalculateCumulantsVsM;};   
250   void SetCalculateAllCorrelationsVsM(Bool_t const cacvm) {this->fCalculateAllCorrelationsVsM = cacvm;};
251   Bool_t GetCalculateAllCorrelationsVsM() const {return this->fCalculateAllCorrelationsVsM;};   
252   void SetMinimumBiasReferenceFlow(Bool_t const mmrf) {this->fMinimumBiasReferenceFlow = mmrf;};
253   Bool_t GetMinimumBiasReferenceFlow() const {return this->fMinimumBiasReferenceFlow;};  
254   void SetForgetAboutCovariances(Bool_t const fac) {this->fForgetAboutCovariances = fac;};
255   Bool_t GetForgetAboutCovariances() const {return this->fForgetAboutCovariances;};
256   void SetStorePhiDistributionForOneEvent(Bool_t const spdfoe) {this->fStorePhiDistributionForOneEvent = spdfoe;};
257   Bool_t GetStorePhiDistributionForOneEvent() const {return this->fStorePhiDistributionForOneEvent;};
258   void SetPhiDistributionForOneEventSettings(Double_t const pdfoes, Int_t const i) {this->fPhiDistributionForOneEventSettings[i] = pdfoes;};
259   Double_t GetPhiDistributionForOneEventSettings(Int_t const i) const {return this->fPhiDistributionForOneEventSettings[i];};
260
261   // Reference flow profiles:
262   void SetAvMultiplicity(TProfile* const avMultiplicity) {this->fAvMultiplicity = avMultiplicity;};
263   TProfile* GetAvMultiplicity() const {return this->fAvMultiplicity;};
264   void SetIntFlowCorrelationsPro(TProfile* const intFlowCorrelationsPro) {this->fIntFlowCorrelationsPro = intFlowCorrelationsPro;};
265   TProfile* GetIntFlowCorrelationsPro() const {return this->fIntFlowCorrelationsPro;};
266   void SetIntFlowSquaredCorrelationsPro(TProfile* const ifscp) {this->fIntFlowSquaredCorrelationsPro = ifscp;};
267   TProfile* GetIntFlowSquaredCorrelationsPro() const {return this->fIntFlowSquaredCorrelationsPro;};
268   void SetIntFlowCorrelationsVsMPro(TProfile* const ifcvp, Int_t const ci) {this->fIntFlowCorrelationsVsMPro[ci] = ifcvp;};
269   TProfile* GetIntFlowCorrelationsVsMPro(Int_t const ci) const {return this->fIntFlowCorrelationsVsMPro[ci];};    
270   void SetIntFlowSquaredCorrelationsVsMPro(TProfile* const ifscvp, Int_t const ci) {this->fIntFlowSquaredCorrelationsVsMPro[ci] = ifscvp;};
271   TProfile* GetIntFlowSquaredCorrelationsVsMPro(Int_t const ci) const {return this->fIntFlowSquaredCorrelationsVsMPro[ci];};   
272   void SetIntFlowCorrelationsAllPro(TProfile* const intFlowCorrelationsAllPro) {this->fIntFlowCorrelationsAllPro = intFlowCorrelationsAllPro;};
273   TProfile* GetIntFlowCorrelationsAllPro() const {return this->fIntFlowCorrelationsAllPro;};  
274   void SetIntFlowExtraCorrelationsPro(TProfile* const intFlowExtraCorrelationsPro) {this->fIntFlowExtraCorrelationsPro = intFlowExtraCorrelationsPro;};
275   TProfile* GetIntFlowExtraCorrelationsPro() const {return this->fIntFlowExtraCorrelationsPro;};  
276   void SetIntFlowProductOfCorrelationsPro(TProfile* const intFlowProductOfCorrelationsPro) {this->fIntFlowProductOfCorrelationsPro = intFlowProductOfCorrelationsPro;};
277   TProfile* GetIntFlowProductOfCorrelationsPro() const {return this->fIntFlowProductOfCorrelationsPro;};      
278   void SetIntFlowProductOfCorrelationsVsMPro(TProfile* const ifpocvm, Int_t const pi) {this->fIntFlowProductOfCorrelationsVsMPro[pi] = ifpocvm;};
279   TProfile* GetIntFlowProductOfCorrelationsVsMPro(Int_t const pi) const {return this->fIntFlowProductOfCorrelationsVsMPro[pi];};    
280   void SetIntFlowProductOfCorrectionTermsForNUAPro(TProfile* const ifpoctfNUA) {this->fIntFlowProductOfCorrectionTermsForNUAPro = ifpoctfNUA;};
281   TProfile* GetIntFlowProductOfCorrectionTermsForNUAPro() const {return this->fIntFlowProductOfCorrectionTermsForNUAPro;};  
282   void SetIntFlowCorrectionTermsForNUAPro(TProfile* const ifctfnp, Int_t const sc) {this->fIntFlowCorrectionTermsForNUAPro[sc] = ifctfnp;};
283   TProfile* GetIntFlowCorrectionTermsForNUAPro(Int_t sc) const {return this->fIntFlowCorrectionTermsForNUAPro[sc];};    
284   void SetIntFlowCorrectionTermsForNUAVsMPro(TProfile* const ifctfnpvm, Int_t const sc, Int_t const ci) {this->fIntFlowCorrectionTermsForNUAVsMPro[sc][ci] = ifctfnpvm;};
285   TProfile* GetIntFlowCorrectionTermsForNUAVsMPro(Int_t sc, Int_t ci) const {return this->fIntFlowCorrectionTermsForNUAVsMPro[sc][ci];};    
286   // integrated flow histograms holding all results:
287   void SetIntFlowCorrelationsHist(TH1D* const intFlowCorrelationsHist) {this->fIntFlowCorrelationsHist = intFlowCorrelationsHist;};
288   TH1D* GetIntFlowCorrelationsHist() const {return this->fIntFlowCorrelationsHist;};
289   void SetIntFlowCorrelationsVsMHist(TH1D* const ifcvmh, Int_t const ci) {this->fIntFlowCorrelationsVsMHist[ci] = ifcvmh;};
290   TH1D* GetIntFlowCorrelationsVsMHist(Int_t const ci) const {return this->fIntFlowCorrelationsVsMHist[ci];};    
291   void SetIntFlowCorrelationsAllHist(TH1D* const intFlowCorrelationsAllHist) {this->fIntFlowCorrelationsAllHist = intFlowCorrelationsAllHist;};
292   TH1D* GetIntFlowCorrelationsAllHist() const {return this->fIntFlowCorrelationsAllHist;};  
293   void SetIntFlowCorrectionTermsForNUAHist(TH1D* const ifctfnh, Int_t const sc) {this->fIntFlowCorrectionTermsForNUAHist[sc] = ifctfnh;};
294   TH1D* GetIntFlowCorrectionTermsForNUAHist(Int_t sc) const {return this->fIntFlowCorrectionTermsForNUAHist[sc];};  
295   void SetIntFlowCovariances(TH1D* const intFlowCovariances) {this->fIntFlowCovariances = intFlowCovariances;};
296   TH1D* GetIntFlowCovariances() const {return this->fIntFlowCovariances;};
297   void SetIntFlowSumOfEventWeights(TH1D* const intFlowSumOfEventWeights, Int_t const power) {this->fIntFlowSumOfEventWeights[power] = intFlowSumOfEventWeights;};
298   TH1D* GetIntFlowSumOfEventWeights(Int_t power) const {return this->fIntFlowSumOfEventWeights[power];};
299   void SetIntFlowSumOfProductOfEventWeights(TH1D* const intFlowSumOfProductOfEventWeights) {this->fIntFlowSumOfProductOfEventWeights = intFlowSumOfProductOfEventWeights;};
300   TH1D* GetIntFlowSumOfProductOfEventWeights() const {return this->fIntFlowSumOfProductOfEventWeights;}; 
301   void SetIntFlowCovariancesVsM(TH1D* const ifcvm, Int_t ci) {this->fIntFlowCovariancesVsM[ci] = ifcvm;};
302   TH1D* GetIntFlowCovariancesVsM(Int_t ci) const {return this->fIntFlowCovariancesVsM[ci];};    
303   void SetIntFlowSumOfEventWeightsVsM(TH1D* const ifsoewvm, Int_t si, Int_t lc) {this->fIntFlowSumOfEventWeightsVsM[si][lc] = ifsoewvm;};
304   TH1D* GetIntFlowSumOfEventWeightsVsM(Int_t si, Int_t lc) const {return this->fIntFlowSumOfEventWeightsVsM[si][lc];};    
305   void SetIntFlowSumOfProductOfEventWeightsVsM(TH1D* const ifsopoevm, Int_t si) {this->fIntFlowSumOfProductOfEventWeightsVsM[si] = ifsopoevm;};
306   TH1D* GetIntFlowSumOfProductOfEventWeightsVsM(Int_t si) const {return this->fIntFlowSumOfProductOfEventWeightsVsM[si];};      
307   void SetIntFlowCovariancesNUA(TH1D* const intFlowCovariancesNUA) {this->fIntFlowCovariancesNUA = intFlowCovariancesNUA;};
308   TH1D* GetIntFlowCovariancesNUA() const {return this->fIntFlowCovariancesNUA;};
309   void SetIntFlowSumOfEventWeightsNUA(TH1D* const ifsoewNUA, Int_t const sc, Int_t const power) {this->fIntFlowSumOfEventWeightsNUA[sc][power] = ifsoewNUA;};
310   TH1D* GetIntFlowSumOfEventWeightsNUA(Int_t sc, Int_t power) const {return this->fIntFlowSumOfEventWeightsNUA[sc][power];};
311   void SetIntFlowSumOfProductOfEventWeightsNUA(TH1D* const ifsopoewNUA) {this->fIntFlowSumOfProductOfEventWeightsNUA = ifsopoewNUA;};
312   TH1D* GetIntFlowSumOfProductOfEventWeightsNUA() const {return this->fIntFlowSumOfProductOfEventWeightsNUA;}; 
313   void SetIntFlowQcumulants(TH1D* const intFlowQcumulants) {this->fIntFlowQcumulants = intFlowQcumulants;};
314   TH1D* GetIntFlowQcumulants() const {return this->fIntFlowQcumulants;}; 
315   void SetIntFlowQcumulantsVsM(TH1D* const intFlowQcumulantsVsM, Int_t co) {this->fIntFlowQcumulantsVsM[co] = intFlowQcumulantsVsM;};
316   TH1D* GetIntFlowQcumulantsVsM(Int_t co) const {return this->fIntFlowQcumulantsVsM[co];};  
317   void SetIntFlowQcumulantsRebinnedInM(TH1D* const ifqcrim) {this->fIntFlowQcumulantsRebinnedInM = ifqcrim;};
318   TH1D* GetIntFlowQcumulantsRebinnedInM() const {return this->fIntFlowQcumulantsRebinnedInM;};    
319   void SetIntFlowQcumulantsErrorSquaredRatio(TH1D* const ifqcesr) {this->fIntFlowQcumulantsErrorSquaredRatio = ifqcesr;};
320   TH1D* GetIntFlowQcumulantsErrorSquaredRatio() const {return this->fIntFlowQcumulantsErrorSquaredRatio;}; 
321   void SetIntFlow(TH1D* const intFlow) {this->fIntFlow = intFlow;};
322   TH1D* GetIntFlow() const {return this->fIntFlow;};
323   void SetIntFlowVsM(TH1D* const intFlowVsM, Int_t co) {this->fIntFlowVsM[co] = intFlowVsM;};
324   TH1D* GetIntFlowVsM(Int_t co) const {return this->fIntFlowVsM[co];};     
325   void SetIntFlowRebinnedInM(TH1D* const ifrim) {this->fIntFlowRebinnedInM = ifrim;};
326   TH1D* GetIntFlowRebinnedInM() const {return this->fIntFlowRebinnedInM;};
327   void SetIntFlowDetectorBias(TH1D* const ifdb) {this->fIntFlowDetectorBias = ifdb;};
328   TH1D* GetIntFlowDetectorBias() const {return this->fIntFlowDetectorBias;};  
329   void SetIntFlowDetectorBiasVsM(TH1D* const ifdbvm, Int_t ci) {this->fIntFlowDetectorBiasVsM[ci] = ifdbvm;};
330   TH1D* GetIntFlowDetectorBiasVsM(Int_t ci) const {return this->fIntFlowDetectorBiasVsM[ci];};  
331   // 4.) Differential flow:
332   //  Flags:
333   void SetDiffFlowFlags(TProfile* const diffFlowFlags) {this->fDiffFlowFlags = diffFlowFlags;};
334   TProfile* GetDiffFlowFlags() const {return this->fDiffFlowFlags;};
335   void SetCalculateDiffFlow(Bool_t const cdf) {this->fCalculateDiffFlow = cdf;};
336   Bool_t GetCalculateDiffFlow() const {return this->fCalculateDiffFlow;};
337   void SetCalculate2DDiffFlow(Bool_t const c2ddf) {this->fCalculate2DDiffFlow = c2ddf;};
338   Bool_t GetCalculate2DDiffFlow() const {return this->fCalculate2DDiffFlow;};
339   void SetCalculateDiffFlowVsEta(Bool_t const cdfve) {this->fCalculateDiffFlowVsEta = cdfve;};
340   Bool_t GetCalculateDiffFlowVsEta() const {return this->fCalculateDiffFlowVsEta;};
341   //  Profiles:
342   //   1D:
343   void SetDiffFlowCorrelationsPro(TProfile* const diffFlowCorrelationsPro, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowCorrelationsPro[i][j][k] = diffFlowCorrelationsPro;};
344   TProfile* GetDiffFlowCorrelationsPro(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowCorrelationsPro[i][j][k];};
345   void SetDiffFlowSquaredCorrelationsPro(TProfile* const diffFlowSquaredCorrelationsPro, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowSquaredCorrelationsPro[i][j][k] = diffFlowSquaredCorrelationsPro;};
346   TProfile* GetDiffFlowSquaredCorrelationsPro(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowSquaredCorrelationsPro[i][j][k];}; 
347   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;};
348   TProfile* GetDiffFlowProductOfCorrelationsPro(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowProductOfCorrelationsPro[i][j][k][l];};
349   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;};
350   TProfile* GetDiffFlowCorrectionTermsForNUAPro(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowCorrectionTermsForNUAPro[i][j][k][l];};  
351   //   2D:
352   void Set2DDiffFlowCorrelationsPro(TProfile2D* const p2ddfcp, Int_t const i, Int_t const k) {this->f2DDiffFlowCorrelationsPro[i][k] = p2ddfcp;};
353   TProfile2D* Get2DDiffFlowCorrelationsPro(Int_t i, Int_t k) const {return this->f2DDiffFlowCorrelationsPro[i][k];};
354   //   Other differential correlators:
355   void SetOtherDiffCorrelators(TProfile* const odc,Int_t const i,Int_t const j,Int_t const k,Int_t const l) {this->fOtherDiffCorrelators[i][j][k][l] = odc;};
356   TProfile* GetOtherDiffCorrelators(Int_t i,Int_t j,Int_t k,Int_t l) const {return this->fOtherDiffCorrelators[i][j][k][l];};   
357   // histograms:
358   void SetDiffFlowCorrelationsHist(TH1D* const diffFlowCorrelationsHist, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowCorrelationsHist[i][j][k] = diffFlowCorrelationsHist;};
359   TH1D* GetDiffFlowCorrelationsHist(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowCorrelationsHist[i][j][k];};
360   void SetDiffFlowCovariances(TH1D* const diffFlowCovariances, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowCovariances[i][j][k] = diffFlowCovariances;};
361   TH1D* GetDiffFlowCovariances(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowCovariances[i][j][k];};  
362   void SetDiffFlowCumulants(TH1D* const diffFlowCumulants, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowCumulants[i][j][k] = diffFlowCumulants;};
363   TH1D* GetDiffFlowCumulants(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowCumulants[i][j][k];};
364   void SetDiffFlowDetectorBias(TH1D* const dfdb, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowDetectorBias[i][j][k] = dfdb;};
365   TH1D* GetDiffFlowDetectorBias(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowDetectorBias[i][j][k];};
366   void SetDiffFlow(TH1D* const diffFlow, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlow[i][j][k] = diffFlow;};
367   TH1D* GetDiffFlow(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlow[i][j][k];};
368   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;};
369   TH1D* GetDiffFlowSumOfEventWeights(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowSumOfEventWeights[i][j][k][l];};
370   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;};
371   TH1D* GetDiffFlowSumOfProductOfEventWeights(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowSumOfProductOfEventWeights[i][j][k][l];};
372   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;};
373   TH1D* GetDiffFlowCorrectionTermsForNUAHist(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowCorrectionTermsForNUAHist[i][j][k][l];};  
374   //  2D:
375   void Set2DDiffFlowCumulants(TH2D* const h2ddfc, Int_t const i, Int_t const j) {this->f2DDiffFlowCumulants[i][j] = h2ddfc;};
376   TH2D* Get2DDiffFlowCumulants(Int_t i, Int_t j) const {return this->f2DDiffFlowCumulants[i][j];};  
377   void Set2DDiffFlow(TH2D* const h2ddf, Int_t const i, Int_t const j) {this->f2DDiffFlow[i][j] = h2ddf;};
378   TH2D* Get2DDiffFlow(Int_t i, Int_t j) const {return this->f2DDiffFlow[i][j];};  
379   // 5.) distributions of correlations:
380   // flags:
381   void SetStoreDistributions(Bool_t const storeDistributions) {this->fStoreDistributions = storeDistributions;};
382   Bool_t GetStoreDistributions() const {return this->fStoreDistributions;};
383   // profile:
384   void SetDistributionsFlags(TProfile* const distributionsFlags) {this->fDistributionsFlags = distributionsFlags;};
385   TProfile* GetDistributionsFlags() const {return this->fDistributionsFlags;};  
386   // histograms:
387   void SetDistributions(TH1D* const distributions, Int_t const i) {this->fDistributions[i] = distributions;};
388   TH1D* GetDistributions(Int_t i) const {return this->fDistributions[i];};  
389   // min and max values of correlations (ci is correlations index [0=<2>,1=<4>,2=<6>,3=<8>]):
390   void SetMinValueOfCorrelation(Int_t const ci, Double_t const minValue) {this->fMinValueOfCorrelation[ci] = minValue;};
391   Double_t GetMinValueOfCorrelation(Int_t ci) const {return this->fMinValueOfCorrelation[ci];};
392   void SetMaxValueOfCorrelation(Int_t const ci, Double_t const maxValue) {this->fMaxValueOfCorrelation[ci] = maxValue;};
393   Double_t GetMaxValueOfCorrelation(Int_t ci) const {return this->fMaxValueOfCorrelation[ci];};
394     
395   // x.) debugging and cross-checking:
396   void SetNestedLoopsList(TList* const nllist) {this->fNestedLoopsList = nllist;};
397   TList* GetNestedLoopsList() const {return this->fNestedLoopsList;}; 
398   void SetEvaluateIntFlowNestedLoops(Bool_t const eifnl) {this->fEvaluateIntFlowNestedLoops = eifnl;};
399   Bool_t GetEvaluateIntFlowNestedLoops() const {return this->fEvaluateIntFlowNestedLoops;};
400   void SetEvaluateDiffFlowNestedLoops(Bool_t const edfnl) {this->fEvaluateDiffFlowNestedLoops = edfnl;};
401   Bool_t GetEvaluateDiffFlowNestedLoops() const {return this->fEvaluateDiffFlowNestedLoops;};  
402   void SetMaxAllowedMultiplicity(Int_t const maxAllowedMultiplicity) {this->fMaxAllowedMultiplicity = maxAllowedMultiplicity;};
403   Int_t GetMaxAllowedMultiplicity() const {return this->fMaxAllowedMultiplicity;};
404   void SetEvaluateNestedLoops(TProfile* const enl) {this->fEvaluateNestedLoops = enl;};
405   TProfile* GetEvaluateNestedLoops() const {return this->fEvaluateNestedLoops;}; 
406   void SetIntFlowDirectCorrelations(TProfile* const ifdc) {this->fIntFlowDirectCorrelations = ifdc;};
407   TProfile* GetIntFlowDirectCorrelations() const {return this->fIntFlowDirectCorrelations;};
408   void SetIntFlowExtraDirectCorrelations(TProfile* const ifedc) {this->fIntFlowExtraDirectCorrelations = ifedc;};
409   TProfile* GetIntFlowExtraDirectCorrelations() const {return this->fIntFlowExtraDirectCorrelations;};
410   void SetIntFlowDirectCorrectionTermsForNUA(TProfile* const ifdctfn, Int_t const sc) {this->fIntFlowDirectCorrectionTermsForNUA[sc] = ifdctfn;};
411   TProfile* GetIntFlowDirectCorrectionTermsForNUA(Int_t sc) const {return this->fIntFlowDirectCorrectionTermsForNUA[sc];};  
412   void SetCrossCheckInPtBinNo(Int_t const crossCheckInPtBinNo) {this->fCrossCheckInPtBinNo = crossCheckInPtBinNo;};
413   Int_t GetCrossCheckInPtBinNo() const {return this->fCrossCheckInPtBinNo;};
414   void SetCrossCheckInEtaBinNo(Int_t const crossCheckInEtaBinNo) {this->fCrossCheckInEtaBinNo = crossCheckInEtaBinNo;};
415   Int_t GetCrossCheckInEtaBinNo() const {return this->fCrossCheckInEtaBinNo;};
416   void SetNoOfParticlesInBin(TH1D* const noOfParticlesInBin) {this->fNoOfParticlesInBin = noOfParticlesInBin;};
417   TH1D* GetNoOfParticlesInBin() const {return this->fNoOfParticlesInBin;};  
418   void SetDiffFlowDirectCorrelations(TProfile* const diffFlowDirectCorrelations,Int_t const i,Int_t const j,Int_t const k){this->fDiffFlowDirectCorrelations[i][j][k]=diffFlowDirectCorrelations;};
419   TProfile* GetDiffFlowDirectCorrelations(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowDirectCorrelations[i][j][k];};
420   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;};
421   TProfile* GetDiffFlowDirectCorrectionTermsForNUA(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowDirectCorrectionTermsForNUA[i][j][k][l];};          
422   void SetOtherDirectDiffCorrelators(TProfile* const oddc, Int_t const i, Int_t const j, Int_t const k, Int_t const l) {this->fOtherDirectDiffCorrelators[i][j][k][l] = oddc;};
423   TProfile* GetOtherDirectDiffCorrelators(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fOtherDirectDiffCorrelators[i][j][k][l];};  
424
425  private:
426   
427   AliFlowAnalysisWithQCumulants(const AliFlowAnalysisWithQCumulants& afawQc);
428   AliFlowAnalysisWithQCumulants& operator=(const AliFlowAnalysisWithQCumulants& afawQc); 
429   
430   // 0.) base:
431   TList* fHistList; // base list to hold all output object
432   
433   // 1.) common:
434   Bool_t fBookOnlyBasicCCH; // book only basis common control histrograms (by default book them all)
435   AliFlowCommonHist *fCommonHists; // common control histograms (taking into account ALL events) 
436   AliFlowCommonHist *fCommonHists2nd; // common control histograms (taking into account only the events with 2 and more particles) 
437   AliFlowCommonHist *fCommonHists4th; // common control histograms (taking into account only the events with 4 and more particles) 
438   AliFlowCommonHist *fCommonHists6th; // common control histograms (taking into account only the events with 6 and more particles) 
439   AliFlowCommonHist *fCommonHists8th; // common control histograms (taking into account only the events with 8 and more particles) 
440   AliFlowCommonHistResults *fCommonHistsResults2nd; // final results for 2nd order int. and diff. flow for events with 2 and more particles
441   AliFlowCommonHistResults *fCommonHistsResults4th; // final results for 4th order int. and diff. flow for events with 4 and more particles 
442   AliFlowCommonHistResults *fCommonHistsResults6th; // final results for 6th order int. and diff. flow for events with 6 and more particles
443   AliFlowCommonHistResults *fCommonHistsResults8th; // final results for 8th order int. and diff. flow for events with 8 and more particles
444   Int_t fnBinsPhi; // number of phi bins
445   Double_t fPhiMin; // minimum phi   
446   Double_t fPhiMax; // maximum phi 
447   Double_t fPhiBinWidth; // bin width for phi histograms  
448   Int_t fnBinsPt; // number of pt bins
449   Double_t fPtMin; // minimum pt   
450   Double_t fPtMax; // maximum pt  
451   Double_t fPtBinWidth; // bin width for pt histograms  
452   Int_t fnBinsEta; // number of eta bins
453   Double_t fEtaMin; // minimum eta   
454   Double_t fEtaMax; // maximum eta
455   Double_t fEtaBinWidth; // bin width for eta histograms  
456   TProfile *fCommonConstants; // profile to hold common constants
457   Bool_t fFillMultipleControlHistograms; // fill separately control histos for events with >= 2, 4, 6 and 8 particles 
458   Int_t fHarmonic; // harmonic 
459   TString *fAnalysisLabel; // analysis label (all histograms and output file will have this label)
460   Bool_t fPrintFinalResults[4]; // print on the screen the final results (0=RF, 1=RP, 2=POI, 3=RF rebinned in M)
461   
462   // 2a.) particle weights:
463   TList *fWeightsList; // list to hold all histograms with particle weights: fUseParticleWeights, fPhiWeights, fPtWeights and fEtaWeights
464   Bool_t fUsePhiWeights; // use phi weights
465   Bool_t fUsePtWeights; // use pt weights
466   Bool_t fUseEtaWeights; // use eta weights
467   Bool_t fUseTrackWeights; // use track weights (e.g. VZERO sector weights)
468   TProfile *fUseParticleWeights; // profile with three bins to hold values of fUsePhiWeights, fUsePtWeights and fUseEtaWeights
469   TH1F *fPhiWeights; // histogram holding phi weights
470   TH1D *fPtWeights; // histogram holding phi weights
471   TH1D *fEtaWeights; // histogram holding phi weights 
472   
473   // 2b.) event weights:
474   TString *fMultiplicityWeight; // event-by-event weights for multiparticle correlations
475   
476   // 3.) integrated flow       
477   //  3a.) lists:
478   TList *fIntFlowList; // list to hold all histograms and profiles relevant for integrated flow 
479   TList *fIntFlowProfiles; // list to hold all profiles relevant for integrated flow
480   TList *fIntFlowResults; // list to hold all histograms with final results relevant for integrated flow  
481   TList *fIntFlowAllCorrelationsVsM; // list to hold all profiles with correlations vs M
482   //  3b.) flags:
483   TProfile *fIntFlowFlags; // profile to hold all flags for integrated flow
484   Bool_t fApplyCorrectionForNUA; // apply correction for non-uniform acceptance 
485   Bool_t fApplyCorrectionForNUAVsM; // apply correction for non-uniform acceptance versus M  
486   Int_t fnBinsMult; // number of multiplicity bins for flow analysis versus multiplicity  
487   Double_t fMinMult; // minimal multiplicity for flow analysis versus multiplicity  
488   Double_t fMaxMult; // maximal multiplicity for flow analysis versus multiplicity  
489   Bool_t fPropagateErrorAlsoFromNIT; // propagate error by taking into account also non-isotropic terms (not sure if resulting error then is correct - to be improved)
490   Bool_t fCalculateCumulantsVsM; // calculate cumulants versus multiplicity  
491   Bool_t fCalculateAllCorrelationsVsM; // calculate all correlations versus multiplicity   
492   Bool_t fMinimumBiasReferenceFlow; // store as reference flow in AliFlowCommonHistResults the minimum bias result (kFALSE by default)   
493   Bool_t fForgetAboutCovariances; // when propagating error forget about the covariances  
494   Bool_t fStorePhiDistributionForOneEvent; // store phi distribution for one event to illustrate flow
495   Double_t fPhiDistributionForOneEventSettings[4]; // [v_min,v_max,refMult_min,refMult_max]
496   //  3c.) event-by-event quantities:
497   TMatrixD *fReQ; // fReQ[m][k] = sum_{i=1}^{M} w_{i}^{k} cos(m*phi_{i})
498   TMatrixD *fImQ; // fImQ[m][k] = sum_{i=1}^{M} w_{i}^{k} sin(m*phi_{i})
499   TMatrixD *fSpk; // fSM[p][k] = (sum_{i=1}^{M} w_{i}^{k})^{p+1}
500   TH1D *fIntFlowCorrelationsEBE; // 1st bin: <2>, 2nd bin: <4>, 3rd bin: <6>, 4th bin: <8>
501   TH1D *fIntFlowEventWeightsForCorrelationsEBE; // 1st bin: eW_<2>, 2nd bin: eW_<4>, 3rd bin: eW_<6>, 4th bin: eW_<8>
502   TH1D *fIntFlowCorrelationsAllEBE; // to be improved (add comment)
503   TH1D *fIntFlowCorrectionTermsForNUAEBE[2]; // [0=sin terms,1=cos terms], NUA = non-uniform acceptance
504   TH1D *fIntFlowEventWeightForCorrectionTermsForNUAEBE[2]; // [0=sin terms,1=cos terms], NUA = non-uniform acceptance 
505   Double_t fReferenceMultiplicityEBE; // reference multiplicity 
506   //  3d.) profiles:
507   TProfile *fAvMultiplicity; // profile to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8
508   TProfile *fIntFlowCorrelationsPro; // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with wrong errors!) 
509   TProfile *fIntFlowSquaredCorrelationsPro; // average correlations squared <<2>^2>, <<4>^2>, <<6>^2> and <<8>^2>  
510   TProfile *fIntFlowCorrelationsVsMPro[4]; // average correlations <<2>>, <<4>>, <<6>> and <<8>> versus multiplicity (error is wrong here!)
511   TProfile *fIntFlowSquaredCorrelationsVsMPro[4]; // average correlations <<2>^2>, <<4>^2>, <<6>^2> and <<8>^2> versus multiplicity  
512   TProfile *fIntFlowCorrelationsAllPro; // average all correlations for integrated flow (with wrong errors!)
513   TProfile *fIntFlowCorrelationsAllVsMPro[64]; // average all correlations vs M (errors via Sumw2 - to me improved)
514   TProfile *fIntFlowExtraCorrelationsPro; // when particle weights are used some extra correlations appear 
515   TProfile *fIntFlowProductOfCorrelationsPro; // average product of correlations <2>, <4>, <6> and <8>  
516   TProfile *fIntFlowProductOfCorrelationsVsMPro[6]; // average product of correlations <2>, <4>, <6> and <8>  
517                                                     // [0=<<2><4>>,1=<<2><6>>,2=<<2><8>>,3=<<4><6>>,4=<<4><8>>,5=<<6><8>>]  
518   TProfile *fIntFlowProductOfCorrectionTermsForNUAPro; // average product of correction terms for NUA  
519   TProfile *fIntFlowCorrectionTermsForNUAPro[2]; // average correction terms for non-uniform acceptance (with wrong errors!) [0=sin terms,1=cos terms] 
520   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   
521   //  3e.) histograms with final results:
522   TH1D *fIntFlowCorrelationsHist; // final results for average correlations <<2>>, <<4>>, <<6>> and <<8>> (with correct errors!) 
523   TH1D *fIntFlowCorrelationsVsMHist[4]; // average correlations <<2>>, <<4>>, <<6>> and <<8>> versus multiplicity (error is correct here!)
524   TH1D *fIntFlowCorrelationsAllHist; // final results for all average correlations (with correct errors!) 
525   TH1D *fIntFlowCorrectionTermsForNUAHist[2];// final results for correction terms for non-uniform acceptance (with correct errors!) [0=sin terms,1=cos terms]
526   TH1D *fIntFlowCovariances; // final result for covariances of correlations (multiplied with weight dependent prefactor)
527   TH1D *fIntFlowSumOfEventWeights[2]; // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>: [0=linear 1,1=quadratic]
528   TH1D *fIntFlowSumOfProductOfEventWeights; // sum of products of event weights for correlations <2>, <4>, <6> and <8>  
529   TH1D *fIntFlowCovariancesVsM[6]; // final result for covariances of correlations (multiplied with weight dependent prefactor) versus M
530                                    // [0=Cov(2,4),1=Cov(2,6),2=Cov(2,8),3=Cov(4,6),4=Cov(4,8),5=Cov(6,8)]
531   TH1D *fIntFlowSumOfEventWeightsVsM[4][2]; // sum of linear and quadratic event weights for <2>, <4>, <6> and <8> versum multiplicity
532                                             // [0=sum{w_{<2>}},1=sum{w_{<4>}},2=sum{w_{<6>}},3=sum{w_{<8>}}][0=linear 1,1=quadratic]
533   TH1D *fIntFlowSumOfProductOfEventWeightsVsM[6]; // sum of products of event weights for correlations <2>, <4>, <6> and <8> vs M
534                                                   // [0=sum{w_{<2>}w_{<4>}},1=sum{w_{<2>}w_{<6>}},2=sum{w_{<2>}w_{<8>}},
535                                                   //  3=sum{w_{<4>}w_{<6>}},4=sum{w_{<4>}w_{<8>}},5=sum{w_{<6>}w_{<8>}}]  
536   TH1D *fIntFlowCovariancesNUA; // final result for covariances of all terms needed for NUA (multiplied with weight dependent prefactor)
537   TH1D *fIntFlowSumOfEventWeightsNUA[2][2]; // sum of linear and quadratic event weights for NUA terms: [0=sin,1=cos][0=linear 1,1=quadratic]
538   TH1D *fIntFlowSumOfProductOfEventWeightsNUA; // sum of products of event weights for NUA terms
539   TH1D *fIntFlowQcumulants; // final results for integrated Q-cumulants QC{2}, QC{4}, QC{6} and QC{8}
540   TH1D *fIntFlowQcumulantsVsM[4]; // final results for integrated Q-cumulants QC{2}, QC{4}, QC{6} and QC{8} versus multiplicity
541   TH1D *fIntFlowQcumulantsRebinnedInM; // final results for reference Q-cumulants QC{2}, QC{4}, QC{6} and QC{8} rebinned in M
542   TH1D *fIntFlowQcumulantsErrorSquaredRatio; // ratio between error squared: with/without non-isotropic terms
543   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}
544   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 
545   TH1D *fIntFlowRebinnedInM; // final results for ref. flow estimates v_n{2,QC}, v_n{4,QC}, v_n{6,QC} and v_n{8,QC} rebinned in M
546   TH1D *fIntFlowDetectorBias; // bias coming from detector inefficiencies to <<2>>, <<4>>, <<6>> and <<8>> (corrected/measured)  
547   TH1D *fIntFlowDetectorBiasVsM[4]; // bias coming from detector inefficiencies to <<2>>, <<4>>, <<6>> and <<8>> vs M (corrected/measured)  
548   // 4.) differential flow
549   //  4a.) lists:
550   TList *fDiffFlowList; // list to hold list with all histograms (fDiffFlowResults) and list with profiles (fDiffFlowProfiles) relevant for differential flow 
551   TList *fDiffFlowProfiles; // list to hold all profiles relevant for differential flow
552   TList *fDiffFlowResults; // list to hold all histograms with final results relevant for differential flow  
553   TList *fDiffFlow2D; // list to hold all objects relevant for 2D differential flow  
554   //    4aa.) nested list in list fDiffFlowProfiles: 
555   TList *fDiffFlowCorrelationsProList[2][2]; // list to hold profiles with all correlations for differential flow [0=RP,1=POI][0=pt,1=eta] 
556   TList *fDiffFlowProductOfCorrelationsProList[2][2]; // list to hold profiles with products of all correlations for differential flow [0=RP,1=POI][0=pt,1=eta] 
557   TList *fDiffFlowCorrectionsProList[2][2]; // list to hold profiles with correction term for NUA for differential flow [0=RP,1=POI][0=pt,1=eta] 
558   TList *f2DDiffFlowCorrelationsProList[2]; // list to hold profiles with all correlations for 2D differential flow [0=RP,1=POI]  
559   //    4ab.) nested list in list fDiffFlowResults: 
560   TList *fDiffFlowCorrelationsHistList[2][2]; // list to hold histograms with all correlations for differential flow [0=RP,1=POI][0=pt,1=eta] 
561   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]
562   TList *fDiffFlowSumOfProductOfEventWeightsHistList[2][2]; // list to hold histograms with sum of products of event weights [0=RP,1=POI][0=pt,1=eta]
563   TList *fDiffFlowCorrectionsHistList[2][2]; // list to hold histograms with correction term for NUA for differential flow [0=RP,1=POI][0=pt,1=eta] 
564   TList *fDiffFlowCovariancesHistList[2][2]; // list to hold histograms with all covariances for differential flow [0=RP,1=POI][0=pt,1=eta] 
565   TList *fDiffFlowCumulantsHistList[2][2]; // list to hold histograms with all cumulants for differential flow [0=RP,1=POI][0=pt,1=eta] 
566   TList *fDiffFlowDetectorBiasHistList[2][2]; // list to hold histograms which quantify detector bias to differential cumulants [0=RP,1=POI][0=pt,1=eta] 
567   TList *fDiffFlowHistList[2][2]; // list to hold histograms with final results for differential flow [0=RP,1=POI][0=pt,1=eta]
568   //  4b.) flags:  
569   TProfile *fDiffFlowFlags; // profile to hold all flags for differential flow
570   Bool_t fCalculateDiffFlow; // if you set kFALSE only reference flow will be calculated
571   Bool_t fCalculate2DDiffFlow; // calculate 2D differential flow vs (pt,eta) (Remark: this is expensive in terms of CPU time)
572   Bool_t fCalculateDiffFlowVsEta; // if you set kFALSE only differential flow vs pt is calculated
573   //  4c.) event-by-event quantities:
574   //   1D:
575   TProfile *fReRPQ1dEBE[3][2][4][9]; // real part [0=r,1=p,2=q][0=pt,1=eta][m][k]
576   TProfile *fImRPQ1dEBE[3][2][4][9]; // imaginary part [0=r,1=p,2=q][0=pt,1=eta][m][k]
577   TProfile *fs1dEBE[3][2][9]; // [0=r,1=p,2=q][0=pt,1=eta][k] // to be improved
578   TH1D *fDiffFlowCorrelationsEBE[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][reduced correlation index]
579   TH1D *fDiffFlowEventWeightsForCorrelationsEBE[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][event weights for reduced correlation index]
580   TH1D *fDiffFlowCorrectionTermsForNUAEBE[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]
581   //   2D:
582   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)
583   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)
584   TProfile2D *fs2dEBE[3][9]; // [t][k] // to be improved
585   //  4d.) profiles:
586   //   1D:
587   TProfile *fDiffFlowCorrelationsPro[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][correlation index]
588   TProfile *fDiffFlowSquaredCorrelationsPro[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][correlation index]
589   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 
590                                                            //                          [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>]
591   TProfile *fDiffFlowCorrectionTermsForNUAPro[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]
592   //   2D:                                                            
593   TProfile2D *f2DDiffFlowCorrelationsPro[2][4]; // [0=RP,1=POI][correlation index]
594   //   Other differential correlators:
595   TList *fOtherDiffCorrelatorsList; // list to hold profiles with other differential correlators
596   TProfile *fOtherDiffCorrelators[2][2][2][1]; // // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correlator index] 
597   //  4e.) histograms holding final results:
598   //   1D:
599   TH1D *fDiffFlowCorrelationsHist[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][correlation index]
600   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] 
601   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'}]
602   TH1D *fDiffFlowDetectorBias[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][0=gQC{2'}/QC{2'},1=gQC{4'}/QC{4'},2=gQC{6'}/QC{6'},3=gQC{8'}/QC{8'}]
603   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}]
604   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'>]
605   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 
606                                                          //                           [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>]
607   TH1D *fDiffFlowCorrectionTermsForNUAHist[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]        
608   //   2D:                                                            
609   TH2D *f2DDiffFlowCumulants[2][4]; // 2D differential cumulants [0=RP,1=POI][cumulant order]
610   TH2D *f2DDiffFlow[2][4]; // 2D differential flow [0=RP,1=POI][cumulants order]
611   // 5.) distributions:
612   TList *fDistributionsList; // list to hold all distributions of correlations
613   TProfile *fDistributionsFlags; // profile to hold all flags for distributions of correlations
614   Bool_t fStoreDistributions; // store or not distributions of correlations
615   TH1D *fDistributions[4]; // [0=distribution of <2>,1=distribution of <4>,2=distribution of <6>,3=distribution of <8>]
616   Double_t fMinValueOfCorrelation[4]; // min values of <2>, <4>, <6> and <8>
617   Double_t fMaxValueOfCorrelation[4]; // max values of <2>, <4>, <6> and <8>
618   
619   // 6.) various:
620   TList *fVariousList; // list to hold various unclassified objects
621   TH1D *fPhiDistributionForOneEvent; // store phi distribution for one event to illustrate flow
622     
623   // x.) debugging and cross-checking:
624   TList *fNestedLoopsList; // list to hold all profiles filled with nested loops
625   Bool_t fEvaluateIntFlowNestedLoops; // evaluate nested loops relevant for integrated flow
626   Bool_t fEvaluateDiffFlowNestedLoops; // evaluate nested loops relevant for differential flow
627   Int_t fMaxAllowedMultiplicity; // nested loops will be evaluated only for events with multiplicity <= fMaxAllowedMultiplicity
628   TProfile *fEvaluateNestedLoops; // profile with four bins: fEvaluateIntFlowNestedLoops, fEvaluateDiffFlowNestedLoops, fCrossCheckInPtBinNo and fCrossCheckInEtaBinNo 
629   // integrated flow:
630   TProfile *fIntFlowDirectCorrelations; // multiparticle correlations relevant for int. flow calculated with nested loops  
631   TProfile *fIntFlowExtraDirectCorrelations; // when particle weights are used some extra correlations appear   
632   TProfile *fIntFlowDirectCorrectionTermsForNUA[2]; // average correction terms for non-uniform acceptance evaluated with nested loops [0=sin terms,1=cos terms] 
633   // differential flow:
634   Int_t fCrossCheckInPtBinNo; // cross-check results for reduced correlations and corrections in this pt bin
635   Int_t fCrossCheckInEtaBinNo; // cross-check results for reduced correlations and corrections in this eta bin
636   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 
637   TProfile *fDiffFlowDirectCorrelations[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][correlation index]
638   TProfile *fDiffFlowDirectCorrectionTermsForNUA[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]
639   // other differential correlators: 
640   TProfile *fOtherDirectDiffCorrelators[2][2][2][1]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correlator index]
641                   
642   ClassDef(AliFlowAnalysisWithQCumulants, 0);
643 };
644
645 //================================================================================================================
646
647 #endif
648
649
650
651
652