]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithQCumulants.h
c1a57c948cf191e872f0ca24f75f33cfcc3804ec
[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  *           (anteb@nikhef.nl)    *
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
31 class AliFlowEventSimple;
32 class AliFlowVector;
33
34 class AliFlowCommonHist;
35 class AliFlowCommonHistResults;
36
37 //================================================================================================================
38
39 class AliFlowAnalysisWithQCumulants{
40  public:
41   AliFlowAnalysisWithQCumulants();
42   virtual ~AliFlowAnalysisWithQCumulants(); 
43   // 0.) methods called in the constructor:
44   virtual void InitializeArraysForIntFlow();
45   virtual void InitializeArraysForDiffFlow();
46   virtual void InitializeArraysForDistributions();
47   virtual void InitializeArraysForNestedLoops();
48   // 1.) method Init() and methods called within Init():
49   virtual void Init();
50     virtual void AccessConstants();
51     virtual void BookAndNestAllLists();
52     virtual void BookCommonHistograms();
53     virtual void BookAndFillWeightsHistograms();
54     virtual void BookEverythingForIntegratedFlow();
55     virtual void BookEverythingForDifferentialFlow();
56     virtual void BookEverythingForDistributions();  
57     virtual void BookEverythingForNestedLoops();   
58     virtual void StoreIntFlowFlags();
59     virtual void StoreDiffFlowFlags();
60     virtual void StoreHarmonic();
61   // 2.) method Make() and methods called within Make():
62   virtual void Make(AliFlowEventSimple *anEvent);
63     // 2a.) common:
64     virtual void FillAverageMultiplicities(Int_t nRP);
65     virtual void FillCommonControlHistograms(AliFlowEventSimple *anEvent);
66     virtual void ResetEventByEventQuantities();
67     // 2b.) integrated flow:
68     virtual void CalculateIntFlowCorrelations(); 
69     virtual void CalculateIntFlowProductOfCorrelations();
70     virtual void CalculateIntFlowSumOfEventWeights();
71     virtual void CalculateIntFlowSumOfProductOfEventWeights();
72     virtual void CalculateIntFlowCorrectionsForNUASinTerms();  
73     virtual void CalculateIntFlowCorrectionsForNUACosTerms();
74     // ...  
75     virtual void CalculateIntFlowCorrelationsUsingParticleWeights();
76     virtual void CalculateWeightedQProductsForIntFlow();
77     virtual void EvaluateIntFlowCorrelationsWithNestedLoops(AliFlowEventSimple* const anEvent); 
78     virtual void EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* const anEvent); 
79     virtual void EvaluateIntFlowCorrectionsForNUAWithNestedLoops(AliFlowEventSimple* const anEvent);  
80     // 2c.) differential flow:
81     virtual void CalculateDiffFlowCorrelations(TString type, TString ptOrEta); // type = RP or POI
82     virtual void CalculateDiffFlowCorrelationsUsingParticleWeights(TString type, TString ptOrEta); // type = RP or POI 
83     virtual void CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta); // type = RP or POI
84     virtual void CalculateDiffFlowSumOfEventWeights(TString type, TString ptOrEta); // type = RP or POI
85     virtual void CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta); // type = RP or POI
86     virtual void CalculateDiffFlowCorrectionsForNUASinTerms(TString type, TString ptOrEta);  
87     virtual void CalculateDiffFlowCorrectionsForNUACosTerms(TString type, TString ptOrEta);
88     // ...
89     //virtual void CalculateCorrelationsForDifferentialFlow2D(TString type); // type = RP or POI
90     //virtual void CalculateCorrectionsForNonUniformAcceptanceForDifferentialFlowCosTerms(TString type); // type = RP or POI  
91     //virtual void CalculateCorrectionsForNonUniformAcceptanceForDifferentialFlowSinTerms(TString type); // type = RP or POI
92     virtual void EvaluateDiffFlowCorrelationsWithNestedLoops(AliFlowEventSimple* const anEvent, TString type, TString ptOrEta);
93     virtual void EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* const anEvent, TString type, TString ptOrEta); 
94     virtual void EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(AliFlowEventSimple* const anEvent, TString type, TString ptOrEta);
95   // 3.) method Finish() and methods called within Finish():
96   virtual void Finish();
97     // 3a.) integrated flow:
98     virtual void FinalizeCorrelationsIntFlow();
99     virtual void FinalizeCorrectionTermsForNUAIntFlow(); 
100     virtual void CalculateCovariancesIntFlow();  
101     virtual void CalculateCumulantsIntFlow(); 
102     virtual void CalculateIntFlow(); 
103     virtual void FillCommonHistResultsIntFlow();
104     // nua:   
105     //virtual void CalculateCorrectionsForNUAForIntQcumulants();
106     virtual void CalculateQcumulantsCorrectedForNUAIntFlow(); 
107     virtual void CalculateIntFlowCorrectedForNUA(); 
108     //virtual void ApplyCorrectionForNonUniformAcceptanceToCumulantsForIntFlow(Bool_t useParticleWeights, TString eventWeights); 
109     //virtual void PrintQuantifyingCorrectionsForNonUniformAcceptance(Bool_t useParticleWeights, TString eventWeights);
110     virtual void PrintFinalResultsForIntegratedFlow(TString type);
111     virtual void CrossCheckIntFlowCorrelations();
112     virtual void CrossCheckIntFlowExtraCorrelations(); // extra correlations which appear only when particle weights are used
113     virtual void CrossCheckIntFlowCorrectionTermsForNUA(); 
114     // 3b.) differential flow:
115     virtual void FinalizeReducedCorrelations(TString type, TString ptOrEta);
116     virtual void CalculateDiffFlowCovariances(TString type, TString ptOrEta); 
117     virtual void CalculateDiffFlowCumulants(TString type, TString ptOrEta); 
118     virtual void CalculateDiffFlow(TString type, TString ptOrEta); 
119     virtual void FinalizeCorrectionTermsForNUADiffFlow(TString type, TString ptOrEta); 
120     virtual void CalculateDiffFlowCumulantsCorrectedForNUA(TString type, TString ptOrEta);   \r
121     virtual void CalculateDiffFlowCorrectedForNUA(TString type, TString ptOrEta); 
122     virtual void CalculateFinalResultsForRPandPOIIntegratedFlow(TString type); // to be improved (add also possibility to integrate over eta yield)
123     virtual void FillCommonHistResultsDiffFlow(TString type);   
124     virtual void CrossCheckDiffFlowCorrelations(TString type, TString ptOrEta); 
125     virtual void CrossCheckDiffFlowCorrectionTermsForNUA(TString type, TString ptOrEta); 
126         
127     // to be improved (removed):
128     //virtual void FinalizeCorrelationsForDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights); 
129       
130   // 4.)  method GetOutputHistograms() and methods called within GetOutputHistograms(): 
131   virtual void GetOutputHistograms(TList *outputListHistos);
132     virtual void GetPointersForCommonHistograms(TList *outputListHistos); 
133     virtual void GetPointersForParticleWeightsHistograms(TList *outputListHistos);
134     virtual void GetPointersForIntFlowHistograms(TList *outputListHistos); 
135     virtual void GetPointersForDiffFlowHistograms(TList *outputListHistos); 
136     virtual void GetPointersForNestedLoopsHistograms(TList *outputListHistos); // to be improved (no need to pass here argument, use setter for base list instead)
137     
138   // 5.) other methods:   
139   TProfile* MakePtProjection(TProfile2D *profilePtEta) const;
140   TProfile* MakeEtaProjection(TProfile2D *profilePtEta) const;
141   virtual void WriteHistograms(TString outputFileName);
142   virtual void WriteHistograms(TDirectoryFile *outputFileName);
143   
144   // **** SETTERS and GETTERS ****
145   
146   // 0.) base:                                                                                              
147   TList* GetHistList() const {return this->fHistList;} 
148   
149   // 1.) common:
150   void SetCommonHists(AliFlowCommonHist* const ch) {this->fCommonHists = ch;};
151   AliFlowCommonHist* GetCommonHists() const {return this->fCommonHists;};
152   void SetCommonHists2nd(AliFlowCommonHist* const ch2nd) {this->fCommonHists2nd = ch2nd;};
153   AliFlowCommonHist* GetCommonHists2nd() const {return this->fCommonHists2nd;};
154   void SetCommonHists4th(AliFlowCommonHist* const ch4th) {this->fCommonHists4th = ch4th;};
155   AliFlowCommonHist* GetCommonHists4th() const {return this->fCommonHists4th;};
156   void SetCommonHists6th(AliFlowCommonHist* const ch6th) {this->fCommonHists6th = ch6th;};
157   AliFlowCommonHist* GetCommonHists6th() const {return this->fCommonHists6th;};
158   void SetCommonHists8th(AliFlowCommonHist* const ch8th) {this->fCommonHists8th = ch8th;};
159   AliFlowCommonHist* GetCommonHists8th() const {return this->fCommonHists8th;};
160   void SetCommonHistsResults2nd(AliFlowCommonHistResults* const chr2nd) {this->fCommonHistsResults2nd = chr2nd;};
161   AliFlowCommonHistResults* GetCommonHistsResults2nd() const {return this->fCommonHistsResults2nd;};
162   void SetCommonHistsResults4th(AliFlowCommonHistResults* const chr4th) {this->fCommonHistsResults4th = chr4th;};
163   AliFlowCommonHistResults* GetCommonHistsResults4th() const {return this->fCommonHistsResults4th;};
164   void SetCommonHistsResults6th(AliFlowCommonHistResults* const chr6th) {this->fCommonHistsResults6th = chr6th;};
165   AliFlowCommonHistResults* GetCommonHistsResults6th() const {return this->fCommonHistsResults6th;};
166   void SetCommonHistsResults8th(AliFlowCommonHistResults* const chr8th) {this->fCommonHistsResults8th = chr8th;};
167   AliFlowCommonHistResults* GetCommonHistsResults8th() const {return this->fCommonHistsResults8th;};
168   void SetHarmonic(Int_t const harmonic) {this->fHarmonic = harmonic;};
169   Int_t GetHarmonic() const {return this->fHarmonic;};
170   void SetAnalysisLabel(const char *aLabel) {this->fAnalysisLabel->Append(*aLabel);}; // to be improved (Append(*aLabel) changed into Append(aLabel)) 
171   TString *GetAnalysisLabel() const {return this->fAnalysisLabel;};
172   
173   // 2a.) particle weights:
174   void SetWeightsList(TList* const wlist) {this->fWeightsList = (TList*)wlist->Clone();}
175   TList* GetWeightsList() const {return this->fWeightsList;}  
176   void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
177   Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
178   void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
179   Bool_t GetUsePtWeights() const {return this->fUsePtWeights;};
180   void SetUseEtaWeights(Bool_t const uEtaW) {this->fUseEtaWeights = uEtaW;};
181   Bool_t GetUseEtaWeights() const {return this->fUseEtaWeights;};
182   void SetUseParticleWeights(TProfile* const uPW) {this->fUseParticleWeights = uPW;};
183   TProfile* GetUseParticleWeights() const {return this->fUseParticleWeights;};
184   void SetPhiWeights(TH1F* const histPhiWeights) {this->fPhiWeights = histPhiWeights;};
185   TH1F* GetPhiWeights() const {return this->fPhiWeights;};
186   void SetPtWeights(TH1D* const histPtWeights) {this->fPtWeights = histPtWeights;};
187   TH1D* GetPtWeights() const {return this->fPtWeights;};
188   void SetEtaWeights(TH1D* const histEtaWeights) {this->fEtaWeights = histEtaWeights;};
189   TH1D* GetEtaWeights() const {return this->fEtaWeights;};
190   
191   // 2b.) event weights:
192   void SetMultiplicityWeight(const char *multiplicityWeight) {*this->fMultiplicityWeight = multiplicityWeight;};
193   
194   // 3.) integrated flow:
195   // flags:
196   void SetIntFlowFlags(TProfile* const intFlowFlags) {this->fIntFlowFlags = intFlowFlags;};
197   TProfile* GetIntFlowFlags() const {return this->fIntFlowFlags;};
198   void SetApplyCorrectionForNUA(Bool_t const applyCorrectionForNUA) {this->fApplyCorrectionForNUA = applyCorrectionForNUA;};
199   Bool_t GetApplyCorrectionForNUA() const {return this->fApplyCorrectionForNUA;};
200   // integrated flow profiles:
201   void SetAvMultiplicity(TProfile* const avMultiplicity) {this->fAvMultiplicity = avMultiplicity;};
202   TProfile* GetAvMultiplicity() const {return this->fAvMultiplicity;};
203   void SetIntFlowCorrelationsPro(TProfile* const intFlowCorrelationsPro) {this->fIntFlowCorrelationsPro = intFlowCorrelationsPro;};
204   TProfile* GetIntFlowCorrelationsPro() const {return this->fIntFlowCorrelationsPro;};
205   void SetIntFlowCorrelationsAllPro(TProfile* const intFlowCorrelationsAllPro) {this->fIntFlowCorrelationsAllPro = intFlowCorrelationsAllPro;};
206   TProfile* GetIntFlowCorrelationsAllPro() const {return this->fIntFlowCorrelationsAllPro;};  
207   void SetIntFlowExtraCorrelationsPro(TProfile* const intFlowExtraCorrelationsPro) {this->fIntFlowExtraCorrelationsPro = intFlowExtraCorrelationsPro;};
208   TProfile* GetIntFlowExtraCorrelationsPro() const {return this->fIntFlowExtraCorrelationsPro;};  
209   void SetIntFlowProductOfCorrelationsPro(TProfile* const intFlowProductOfCorrelationsPro) {this->fIntFlowProductOfCorrelationsPro = intFlowProductOfCorrelationsPro;};
210   TProfile* GetIntFlowProductOfCorrelationsPro() const {return this->fIntFlowProductOfCorrelationsPro;};  
211   void SetIntFlowCorrectionTermsForNUAPro(TProfile* const ifctfnp, Int_t const sc) {this->fIntFlowCorrectionTermsForNUAPro[sc] = ifctfnp;};
212   TProfile* GetIntFlowCorrectionTermsForNUAPro(Int_t sc) const {return this->fIntFlowCorrectionTermsForNUAPro[sc];};  
213   // integrated flow histograms holding all results:
214   void SetIntFlowCorrelationsHist(TH1D* const intFlowCorrelationsHist) {this->fIntFlowCorrelationsHist = intFlowCorrelationsHist;};
215   TH1D* GetIntFlowCorrelationsHist() const {return this->fIntFlowCorrelationsHist;};
216   void SetIntFlowCorrelationsAllHist(TH1D* const intFlowCorrelationsAllHist) {this->fIntFlowCorrelationsAllHist = intFlowCorrelationsAllHist;};
217   TH1D* GetIntFlowCorrelationsAllHist() const {return this->fIntFlowCorrelationsAllHist;};  
218   // to be improved (removed:)
219   //void SetIntFlowProductOfCorrelationsHist(TH1D* const intFlowProductOfCorrelationsHist) {this->fIntFlowProductOfCorrelationsHist = intFlowProductOfCorrelationsHist;};
220   //TH1D* GetIntFlowProductOfCorrelationsHist() const {return this->fIntFlowProductOfCorrelationsHist;};  
221   void SetIntFlowCorrectionTermsForNUAHist(TH1D* const ifctfnh, Int_t const sc) {this->fIntFlowCorrectionTermsForNUAHist[sc] = ifctfnh;};
222   TH1D* GetIntFlowCorrectionTermsForNUAHist(Int_t sc) const {return this->fIntFlowCorrectionTermsForNUAHist[sc];};  
223   void SetIntFlowCovariances(TH1D* const intFlowCovariances) {this->fIntFlowCovariances = intFlowCovariances;};
224   TH1D* GetIntFlowCovariances() const {return this->fIntFlowCovariances;};
225   void SetIntFlowSumOfEventWeights(TH1D* const intFlowSumOfEventWeights, Int_t const power) {this->fIntFlowSumOfEventWeights[power] = intFlowSumOfEventWeights;};
226   TH1D* GetIntFlowSumOfEventWeights(Int_t power) const {return this->fIntFlowSumOfEventWeights[power];};
227   void SetIntFlowSumOfProductOfEventWeights(TH1D* const intFlowSumOfProductOfEventWeights) {this->fIntFlowSumOfProductOfEventWeights = intFlowSumOfProductOfEventWeights;};
228   TH1D* GetIntFlowSumOfProductOfEventWeights() const {return this->fIntFlowSumOfProductOfEventWeights;}; 
229   void SetIntFlowQcumulants(TH1D* const intFlowQcumulants) {this->fIntFlowQcumulants = intFlowQcumulants;};
230   TH1D* GetIntFlowQcumulants() const {return this->fIntFlowQcumulants;}; 
231   void SetIntFlow(TH1D* const intFlow) {this->fIntFlow = intFlow;};
232   TH1D* GetIntFlow() const {return this->fIntFlow;};
233   
234   // 4.) differential flow:
235   // flags:
236   void SetDiffFlowFlags(TProfile* const diffFlowFlags) {this->fDiffFlowFlags = diffFlowFlags;};
237   TProfile* GetDiffFlowFlags() const {return this->fDiffFlowFlags;};
238   void SetCalculate2DFlow(Bool_t const calculate2DFlow) {this->fCalculate2DFlow = calculate2DFlow;};
239   Bool_t GetCalculate2DFlow() const {return this->fCalculate2DFlow;};
240   // profiles:
241   // 1D:
242   void SetDiffFlowCorrelationsPro(TProfile* const diffFlowCorrelationsPro, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowCorrelationsPro[i][j][k] = diffFlowCorrelationsPro;};
243   TProfile* GetDiffFlowCorrelationsPro(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowCorrelationsPro[i][j][k];};
244   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;};
245   TProfile* GetDiffFlowProductOfCorrelationsPro(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowProductOfCorrelationsPro[i][j][k][l];};
246   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;};
247   TProfile* GetDiffFlowCorrectionTermsForNUAPro(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowCorrectionTermsForNUAPro[i][j][k][l];};  
248   // 2D:
249   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;};
250   TProfile2D* GetCorrelationsPro(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fCorrelationsPro[i][j][k][l];};
251   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;};
252   TProfile2D* GetProductsOfCorrelationsPro(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fProductsOfCorrelationsPro[i][j][k][l];};
253   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;};
254   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];};  
255   // histograms:
256   void SetDiffFlowCorrelationsHist(TH1D* const diffFlowCorrelationsHist, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowCorrelationsHist[i][j][k] = diffFlowCorrelationsHist;};
257   TH1D* GetDiffFlowCorrelationsHist(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowCorrelationsHist[i][j][k];};
258   void SetDiffFlowCovariances(TH1D* const diffFlowCovariances, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowCovariances[i][j][k] = diffFlowCovariances;};
259   TH1D* GetDiffFlowCovariances(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowCovariances[i][j][k];};  
260   void SetDiffFlowCumulants(TH1D* const diffFlowCumulants, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlowCumulants[i][j][k] = diffFlowCumulants;};
261   TH1D* GetDiffFlowCumulants(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowCumulants[i][j][k];};
262   void SetDiffFlow(TH1D* const diffFlow, Int_t const i, Int_t const j, Int_t const k) {this->fDiffFlow[i][j][k] = diffFlow;};
263   TH1D* GetDiffFlow(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlow[i][j][k];};
264   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;};
265   TH1D* GetDiffFlowSumOfEventWeights(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowSumOfEventWeights[i][j][k][l];};
266   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;};
267   TH1D* GetDiffFlowSumOfProductOfEventWeights(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowSumOfProductOfEventWeights[i][j][k][l];};
268   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;};
269   TH1D* GetDiffFlowCorrectionTermsForNUAHist(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowCorrectionTermsForNUAHist[i][j][k][l];};  
270   
271   // x.) debugging and cross-checking:
272   void SetNestedLoopsList(TList* const nllist) {this->fNestedLoopsList = nllist;};
273   TList* GetNestedLoopsList() const {return this->fNestedLoopsList;}; 
274   void SetEvaluateIntFlowNestedLoops(Bool_t const eifnl) {this->fEvaluateIntFlowNestedLoops = eifnl;};
275   Bool_t GetEvaluateIntFlowNestedLoops() const {return this->fEvaluateIntFlowNestedLoops;};
276   void SetEvaluateDiffFlowNestedLoops(Bool_t const edfnl) {this->fEvaluateDiffFlowNestedLoops = edfnl;};
277   Bool_t GetEvaluateDiffFlowNestedLoops() const {return this->fEvaluateDiffFlowNestedLoops;};  
278   void SetMaxAllowedMultiplicity(Int_t const maxAllowedMultiplicity) {this->fMaxAllowedMultiplicity = maxAllowedMultiplicity;};
279   Int_t GetMaxAllowedMultiplicity() const {return this->fMaxAllowedMultiplicity;};
280   void SetEvaluateNestedLoops(TProfile* const enl) {this->fEvaluateNestedLoops = enl;};
281   TProfile* GetEvaluateNestedLoops() const {return this->fEvaluateNestedLoops;}; 
282   void SetIntFlowDirectCorrelations(TProfile* const ifdc) {this->fIntFlowDirectCorrelations = ifdc;};
283   TProfile* GetIntFlowDirectCorrelations() const {return this->fIntFlowDirectCorrelations;};
284   void SetIntFlowExtraDirectCorrelations(TProfile* const ifedc) {this->fIntFlowExtraDirectCorrelations = ifedc;};
285   TProfile* GetIntFlowExtraDirectCorrelations() const {return this->fIntFlowExtraDirectCorrelations;};
286   void SetIntFlowDirectCorrectionTermsForNUA(TProfile* const ifdctfn, Int_t const sc) {this->fIntFlowDirectCorrectionTermsForNUA[sc] = ifdctfn;};
287   TProfile* GetIntFlowDirectCorrectionTermsForNUA(Int_t sc) const {return this->fIntFlowDirectCorrectionTermsForNUA[sc];};  
288   void SetCrossCheckInPtBinNo(Int_t const crossCheckInPtBinNo) {this->fCrossCheckInPtBinNo = crossCheckInPtBinNo;};
289   Int_t GetCrossCheckInPtBinNo() const {return this->fCrossCheckInPtBinNo;};
290   void SetCrossCheckInEtaBinNo(Int_t const crossCheckInEtaBinNo) {this->fCrossCheckInEtaBinNo = crossCheckInEtaBinNo;};
291   Int_t GetCrossCheckInEtaBinNo() const {return this->fCrossCheckInEtaBinNo;};
292   void SetDiffFlowDirectCorrelations(TProfile* const diffFlowDirectCorrelations,Int_t const i,Int_t const j,Int_t const k){this->fDiffFlowDirectCorrelations[i][j][k]=diffFlowDirectCorrelations;};
293   TProfile* GetDiffFlowDirectCorrelations(Int_t i, Int_t j, Int_t k) const {return this->fDiffFlowDirectCorrelations[i][j][k];};
294   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;};
295   TProfile* GetDiffFlowDirectCorrectionTermsForNUA(Int_t i, Int_t j, Int_t k, Int_t l) const {return this->fDiffFlowDirectCorrectionTermsForNUA[i][j][k][l];};  
296         
297  private:
298   
299   AliFlowAnalysisWithQCumulants(const AliFlowAnalysisWithQCumulants& afawQc);
300   AliFlowAnalysisWithQCumulants& operator=(const AliFlowAnalysisWithQCumulants& afawQc); 
301   
302   // 0.) base:
303   TList* fHistList; // base list to hold all output object
304   
305   // 1.) common:
306   AliFlowCommonHist *fCommonHists; // common control histograms (taking into account ALL events) 
307   AliFlowCommonHist *fCommonHists2nd; // common control histograms (taking into account only the events with 2 and more particles) 
308   AliFlowCommonHist *fCommonHists4th; // common control histograms (taking into account only the events with 4 and more particles) 
309   AliFlowCommonHist *fCommonHists6th; // common control histograms (taking into account only the events with 6 and more particles) 
310   AliFlowCommonHist *fCommonHists8th; // common control histograms (taking into account only the events with 8 and more particles) 
311   AliFlowCommonHistResults *fCommonHistsResults2nd; // final results for 2nd order int. and diff. flow for events with 2 and more particles
312   AliFlowCommonHistResults *fCommonHistsResults4th; // final results for 4th order int. and diff. flow for events with 4 and more particles 
313   AliFlowCommonHistResults *fCommonHistsResults6th; // final results for 6th order int. and diff. flow for events with 6 and more particles
314   AliFlowCommonHistResults *fCommonHistsResults8th; // final results for 8th order int. and diff. flow for events with 8 and more particles
315   Int_t fnBinsPhi; // number of phi bins
316   Double_t fPhiMin; // minimum phi   
317   Double_t fPhiMax; // maximum phi 
318   Double_t fPhiBinWidth; // bin width for phi histograms  
319   Int_t fnBinsPt; // number of pt bins
320   Double_t fPtMin; // minimum pt   
321   Double_t fPtMax; // maximum pt  
322   Double_t fPtBinWidth; // bin width for pt histograms  
323   Int_t fnBinsEta; // number of eta bins
324   Double_t fEtaMin; // minimum eta   
325   Double_t fEtaMax; // maximum eta
326   Double_t fEtaBinWidth; // bin width for eta histograms  
327   Int_t fHarmonic; // harmonic 
328   TString *fAnalysisLabel; // analysis label (all histograms and output file will have this label)
329   
330   // 2a.) particle weights:
331   TList *fWeightsList; // list to hold all histograms with particle weights: fUseParticleWeights, fPhiWeights, fPtWeights and fEtaWeights
332   Bool_t fUsePhiWeights; // use phi weights
333   Bool_t fUsePtWeights; // use pt weights
334   Bool_t fUseEtaWeights; // use eta weights
335   TProfile *fUseParticleWeights; // profile with three bins to hold values of fUsePhiWeights, fUsePtWeights and fUseEtaWeights
336   TH1F *fPhiWeights; // histogram holding phi weights
337   TH1D *fPtWeights; // histogram holding phi weights
338   TH1D *fEtaWeights; // histogram holding phi weights 
339   
340   // 2b.) event weights:
341   TString *fMultiplicityWeight; // event-by-event weights for multiparticle correlations
342   
343   // 3.) integrated flow       
344   //  3a.) lists:
345   TList *fIntFlowList; // list to hold all histograms and profiles relevant for integrated flow 
346   TList *fIntFlowProfiles; // list to hold all profiles relevant for integrated flow
347   TList *fIntFlowResults; // list to hold all histograms with final results relevant for integrated flow  
348   //  3b.) flags:
349   TProfile *fIntFlowFlags; // profile to hold all flags for integrated flow
350   Bool_t fApplyCorrectionForNUA; // apply correction for non-uniform acceptance
351   //  3c.) event-by-event quantities:
352   TMatrixD *fReQ; // fReQ[m][k] = sum_{i=1}^{M} w_{i}^{k} cos(m*phi_{i})
353   TMatrixD *fImQ; // fImQ[m][k] = sum_{i=1}^{M} w_{i}^{k} sin(m*phi_{i})
354   TMatrixD *fSMpk; // fSM[p][k] = (sum_{i=1}^{M} w_{i}^{k})^{p}
355   TH1D *fIntFlowCorrelationsEBE; // 1st bin: <2>, 2nd bin: <4>, 3rd bin: <6>, 4th bin: <8>
356   TH1D *fIntFlowEventWeightsForCorrelationsEBE; // 1st bin: eW_<2>, 2nd bin: eW_<4>, 3rd bin: eW_<6>, 4th bin: eW_<8>
357   TH1D *fIntFlowCorrelationsAllEBE; // to be improved (add comment)
358   TH1D *fIntFlowCorrectionTermsForNUAEBE[2]; // [0=sin terms,1=cos terms], NUA = non-uniform acceptance
359   //  3d.) profiles:
360   TProfile *fAvMultiplicity; // profile to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8
361   TProfile *fIntFlowCorrelationsPro; // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with wrong errors!) 
362   TProfile *fIntFlowCorrelationsAllPro; // average all correlations for integrated flow (with wrong errors!)
363   TProfile *fIntFlowExtraCorrelationsPro; // when particle weights are used some extra correlations appear 
364   TProfile *fIntFlowProductOfCorrelationsPro; // average product of correlations <2>, <4>, <6> and <8>:  
365   TProfile *fIntFlowCorrectionTermsForNUAPro[2]; // average correction terms for non-uniform acceptance (with wrong errors!) [0=sin terms,1=cos terms] 
366   //  3e.) histograms with final results:
367   TH1D *fIntFlowCorrelationsHist; // final results for average correlations <<2>>, <<4>>, <<6>> and <<8>> (with correct errors!) 
368   TH1D *fIntFlowCorrelationsAllHist; // final results for all average correlations (with correct errors!) 
369   TH1D *fIntFlowCorrectionTermsForNUAHist[2];// final results for correction terms for non-uniform acceptance (with correct errors!) [0=sin terms,1=cos terms]
370   TH1D *fIntFlowCovariances; // final result for covariances of correlations (multiplied with weight dependent prefactor)
371   TH1D *fIntFlowSumOfEventWeights[2]; // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>: [0=linear 1,1=quadratic]
372   TH1D *fIntFlowSumOfProductOfEventWeights; // sum of products of event weights for correlations <2>, <4>, <6> and <8>
373   TH1D *fIntFlowQcumulants; // final results for integrated Q-cumulants QC{2}, QC{4}, QC{6} and QC{8}
374   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}
375      
376   // 4.) differential flow
377   //  4a.) lists:
378   TList *fDiffFlowList; // list to hold list with all histograms (fDiffFlowResults) and list with profiles (fDiffFlowProfiles) relevant for differential flow 
379   TList *fDiffFlowProfiles; // list to hold all profiles relevant for differential flow
380   TList *fDiffFlowResults; // list to hold all histograms with final results relevant for differential flow  
381   //    4aa.) nested list in list fDiffFlowProfiles: 
382   TList *fDiffFlowCorrelationsProList[2][2]; // list to hold profiles with all correlations for differential flow [0=RP,1=POI][0=pt,1=eta] 
383   TList *fDiffFlowProductOfCorrelationsProList[2][2]; // list to hold profiles with products of all correlations for differential flow [0=RP,1=POI][0=pt,1=eta] 
384   TList *fDiffFlowCorrectionsProList[2][2]; // list to hold profiles with correction term for NUA for differential flow [0=RP,1=POI][0=pt,1=eta] 
385   //    4ab.) nested list in list fDiffFlowResults: 
386   TList *fDiffFlowCorrelationsHistList[2][2]; // list to hold histograms with all correlations for differential flow [0=RP,1=POI][0=pt,1=eta] 
387   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]
388   TList *fDiffFlowSumOfProductOfEventWeightsHistList[2][2]; // list to hold histograms with sum of products of event weights [0=RP,1=POI][0=pt,1=eta]
389   TList *fDiffFlowCorrectionsHistList[2][2]; // list to hold histograms with correction term for NUA for differential flow [0=RP,1=POI][0=pt,1=eta] 
390   TList *fDiffFlowCovariancesHistList[2][2]; // list to hold histograms with all covariances for differential flow [0=RP,1=POI][0=pt,1=eta] 
391   TList *fDiffFlowCumulantsHistList[2][2]; // list to hold histograms with all cumulants for differential flow [0=RP,1=POI][0=pt,1=eta] 
392   TList *fDiffFlowHistList[2][2]; // list to hold histograms with final results for differential flow [0=RP,1=POI][0=pt,1=eta]
393   //  4b.) flags:  
394   TProfile *fDiffFlowFlags; // profile to hold all flags for differential flow
395   Bool_t fCalculate2DFlow; // calculate differential flow in (pt,eta) (Remark: this is very expensive in terms of CPU time)
396   //  4c.) event-by-event quantities:
397   // 1D:
398   TProfile *fReRPQ1dEBE[3][2][4][9]; // real part [0=r,1=p,2=q][0=pt,1=eta][m][k]
399   TProfile *fImRPQ1dEBE[3][2][4][9]; // imaginary part [0=r,1=p,2=q][0=pt,1=eta][m][k]
400   TProfile *fs1dEBE[3][2][9]; // [0=r,1=p,2=q][0=pt,1=eta][k] // to be improved
401   TH1D *fDiffFlowCorrelationsEBE[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][reduced correlation index]
402   TH1D *fDiffFlowEventWeightsForCorrelationsEBE[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][event weights for reduced correlation index]
403   TH1D *fDiffFlowCorrectionTermsForNUAEBE[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]
404   // 2D:
405   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)
406   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)
407   TProfile2D *fs2dEBE[3][9]; // [t][k] // to be improved
408   //  4d.) profiles:
409   // 1D:
410   TProfile *fDiffFlowCorrelationsPro[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][correlation index]
411   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 
412                                                            //                          [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>]
413   TProfile *fDiffFlowCorrectionTermsForNUAPro[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]
414                                                               
415   //  4e.) histograms holding final results:
416   // 1D:
417   TH1D *fDiffFlowCorrelationsHist[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][correlation index]
418   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] 
419   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'}]
420   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}]
421   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'>]
422   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 
423                                                          //                           [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>]
424   TH1D *fDiffFlowCorrectionTermsForNUAHist[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]
425        
426   // 2D:
427   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]
428   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]
429   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]
430         
431   // 5.) distributions:
432   TList *fDistributionsList; // list to hold all distributions
433   TH1D *fDistributions[2][2][4]; // [0=pWeights not used,1=pWeights used][0=exact eWeights,1=non-exact eWeights][0=<2>,1=<4>,2=<6>,3=<8>]
434     
435   // x.) debugging and cross-checking:
436   TList *fNestedLoopsList; // list to hold all profiles filled with nested loops
437   Bool_t fEvaluateIntFlowNestedLoops; // evaluate nested loops relevant for integrated flow
438   Bool_t fEvaluateDiffFlowNestedLoops; // evaluate nested loops relevant for differential flow
439   Int_t fMaxAllowedMultiplicity; // nested loops will be evaluated only for events with multiplicity <= fMaxAllowedMultiplicity
440   TProfile *fEvaluateNestedLoops; // profile with four bins: fEvaluateIntFlowNestedLoops, fEvaluateDiffFlowNestedLoops, fCrossCheckInPtBinNo and fCrossCheckInEtaBinNo 
441   // integrated flow:
442   TProfile *fIntFlowDirectCorrelations; // multiparticle correlations relevant for int. flow calculated with nested loops  
443   TProfile *fIntFlowExtraDirectCorrelations; // when particle weights are used some extra correlations appear   
444   TProfile *fIntFlowDirectCorrectionTermsForNUA[2]; // average correction terms for non-uniform acceptance evaluated with nested loops [0=sin terms,1=cos terms] 
445   // differential flow:
446   Int_t fCrossCheckInPtBinNo; // cross-check results for reduced correlations and corrections in this pt bin
447   Int_t fCrossCheckInEtaBinNo; // cross-check results for reduced correlations and corrections in this eta bin
448   TProfile *fDiffFlowDirectCorrelations[2][2][4]; // [0=RP,1=POI][0=pt,1=eta][correlation index]
449   TProfile *fDiffFlowDirectCorrectionTermsForNUA[2][2][2][10]; // [0=RP,1=POI][0=pt,1=eta][0=sin terms,1=cos terms][correction term index]
450                   
451   ClassDef(AliFlowAnalysisWithQCumulants, 0);
452 };
453
454 //================================================================================================================
455
456 #endif
457
458
459
460
461