]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithCumulants.h
more methods facilitate to merge
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / AliFlowAnalysisWithCumulants.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 cumulants * 
9  *                              * 
10  * author: Ante Bilandzic       * 
11  *          (anteb@nikhef.nl)   *
12  *******************************/ 
13
14 #ifndef ALIFLOWANALYSISWITHCUMULANTS_H
15 #define ALIFLOWANALYSISWITHCUMULANTS_H
16
17 #include "AliFlowCommonConstants.h"
18 #include "AliFlowCumuConstants.h"
19
20 class TObjArray;
21 class TList;
22 class TFile;
23
24 class TH1;
25 class TProfile;
26 class TProfile2D;
27 class TProfile3D;
28
29 class AliFlowEventSimple;
30 class AliFlowTrackSimple;
31 class AliFlowCommonHist;
32 class AliFlowCommonHistResults;
33 class AliFlowVector;
34
35 //================================================================================================================
36
37 class AliFlowAnalysisWithCumulants{
38  public:
39   AliFlowAnalysisWithCumulants();
40   virtual ~AliFlowAnalysisWithCumulants(); 
41   
42   virtual void Init();
43   virtual void Make(AliFlowEventSimple* anEvent);
44   virtual void GetOutputHistograms(TList *outputListHistos); //get pointers to all output histograms (called before Finish()) 
45   virtual void Finish();
46   virtual void WriteHistograms(TString* outputFileName);
47   virtual void WriteHistograms(TString outputFileName);
48   
49 //----------------------------------------------------------------------------------------------------------------
50 //                                            setters and getters                                                 
51 //----------------------------------------------------------------------------------------------------------------
52   TList* GetHistList() const {return this->fHistList;}     
53   
54   void SetWeightsList(TList* wlist) {this->fWeightsList = wlist;}
55   TList* GetWeightsList() const {return this->fWeightsList;}
56   
57   void SetIntFlowResults(TH1D* const ifr)  {this->fIntFlowResultsGFC = ifr;};
58   TH1D* GetIntFlowResults() const    {return this->fIntFlowResultsGFC;};
59   
60   void SetDiffFlowResults2nd(TH1D* const diff2nd)  {this->fDiffFlowResults2ndOrderGFC = diff2nd;};
61   TH1D* GetDiffFlowResults2nd() const        {return this->fDiffFlowResults2ndOrderGFC;};
62   
63   void SetDiffFlowResults4th(TH1D* const diff4th)  {this->fDiffFlowResults4thOrderGFC = diff4th;};
64   TH1D* GetDiffFlowResults4th() const        {return this->fDiffFlowResults4thOrderGFC;};
65   
66   void SetDiffFlowResults6th(TH1D* const diff6th)  {this->fDiffFlowResults6thOrderGFC = diff6th;};
67   TH1D* GetDiffFlowResults6th() const        {return this->fDiffFlowResults6thOrderGFC;};
68   
69   void SetDiffFlowResults8th(TH1D* const diff8th)  {this->fDiffFlowResults8thOrderGFC = diff8th;};
70   TH1D* GetDiffFlowResults8th() const        {return this->fDiffFlowResults8thOrderGFC;};
71   
72   void SetCommonHistsResults2nd(AliFlowCommonHistResults* const chr2nd)  {this->fCommonHistsResults2nd = chr2nd;};
73   AliFlowCommonHistResults* GetCommonHistsResults2nd() const       {return this->fCommonHistsResults2nd;};
74   
75   void SetCommonHistsResults4th(AliFlowCommonHistResults* const chr4th)  {this->fCommonHistsResults4th = chr4th;};
76   AliFlowCommonHistResults* GetCommonHistsResults4th() const       {return this->fCommonHistsResults4th;};
77   
78   void SetCommonHistsResults6th(AliFlowCommonHistResults* const chr6th)  {this->fCommonHistsResults6th = chr6th;};
79   AliFlowCommonHistResults* GetCommonHistsResults6th() const       {return this->fCommonHistsResults6th;};
80   
81   void SetCommonHistsResults8th(AliFlowCommonHistResults* const chr8th)  {this->fCommonHistsResults8th = chr8th;};
82   AliFlowCommonHistResults* GetCommonHistsResults8th() const       {return this->fCommonHistsResults8th;};
83   
84   void SetIntFlowGenFun(TProfile2D* const ifgf)  {this->fIntFlowGenFun = ifgf;};
85   TProfile2D* GetIntFlowGenFun() const     {return this->fIntFlowGenFun;};
86
87   void SetIntFlowGenFun4(TProfile2D* const ifgf4)  {this->fIntFlowGenFun4 = ifgf4;}; //(only for other system of Eq.)
88   TProfile2D* GetIntFlowGenFun4() const      {return this->fIntFlowGenFun4;};  //(only for other system of Eq.)
89   
90   void SetIntFlowGenFun6(TProfile2D* const ifgf6)  {this->fIntFlowGenFun6 = ifgf6;}; //(only for other system of Eq.)
91   TProfile2D* GetIntFlowGenFun6() const      {return this->fIntFlowGenFun6;};  //(only for other system of Eq.)
92   
93   void SetIntFlowGenFun8(TProfile2D* const ifgf8)  {this->fIntFlowGenFun8 = ifgf8;}; //(only for other system of Eq.)
94   TProfile2D* GetIntFlowGenFun8() const      {return this->fIntFlowGenFun8;};  //(only for other system of Eq.)
95   
96   void SetIntFlowGenFun16(TProfile2D* const ifgf16)  {this->fIntFlowGenFun16 = ifgf16;}; //(only for other system of Eq.)
97   TProfile2D* GetIntFlowGenFun16() const       {return this->fIntFlowGenFun16;};   //(only for other system of Eq.)
98  
99   void SetAverageMultiplicity4(TProfile* const am4)     {this->fAvMultIntFlow4GFC = am4;};  //(only for other system of Eq.)
100   TProfile* GetAverageMultiplicity4() const       {return this->fAvMultIntFlow4GFC;}; //(only for other system of Eq.)
101   
102   void SetAverageMultiplicity6(TProfile* const am6)     {this->fAvMultIntFlow6GFC = am6;};  //(only for other system of Eq.)
103   TProfile* GetAverageMultiplicity6() const       {return this->fAvMultIntFlow6GFC;}; //(only for other system of Eq.)
104   
105   void SetAverageMultiplicity8(TProfile* const am8)     {this->fAvMultIntFlow8GFC = am8;};  //(only for other system of Eq.)
106   TProfile* GetAverageMultiplicity8() const       {return this->fAvMultIntFlow8GFC;}; //(only for other system of Eq.)
107   
108   void SetAverageMultiplicity16(TProfile* const am16)    {this->fAvMultIntFlow16GFC = am16;}; //(only for other system of Eq.)
109   TProfile* GetAverageMultiplicity16() const       {return this->fAvMultIntFlow16GFC;}; //(only for other system of Eq.)
110   
111   //----------------------------------------------------------------------------------------------------------
112   //RP = Reaction Plane (RP denotes particles used to determine the reaction plane)
113   void SetDiffFlowPtRPGenFunRe(TProfile3D* const dfRPPtgfRe)  {this->fDiffFlowPtRPGenFunRe = dfRPPtgfRe;};
114   TProfile3D* GetDiffFlowPtRPGenFunRe() const            {return this->fDiffFlowPtRPGenFunRe;};
115   
116   void SetDiffFlowPtRPGenFunIm(TProfile3D* const dfRPPtgfIm)  {this->fDiffFlowPtRPGenFunIm = dfRPPtgfIm;};
117   TProfile3D* GetDiffPtRPFlowGenFunIm() const            {return this->fDiffFlowPtRPGenFunIm;};
118   
119   void SetNumberOfParticlesPerPtBinRP(TProfile* const nopppbRP) {this->fPtBinRPNoOfParticles = nopppbRP;};
120   TProfile* GetNumberOfParticlesPerPtBinRP() const         {return this->fPtBinRPNoOfParticles;};  
121   
122   void SetDiffFlowEtaRPGenFunRe(TProfile3D* const dfEtaRPgfRe)   {this->fDiffFlowEtaRPGenFunRe = dfEtaRPgfRe;};
123   TProfile3D* GetDiffFlowEtaRPGenFunRe() const              {return this->fDiffFlowEtaRPGenFunRe;};
124   
125   void SetDiffFlowEtaRPGenFunIm(TProfile3D* const dfEtaRPgfIm)   {this->fDiffFlowEtaRPGenFunIm = dfEtaRPgfIm;};
126   TProfile3D* GetDiffFlowEtaRPGenFunIm() const              {return this->fDiffFlowEtaRPGenFunIm;};
127   
128   void SetNumberOfParticlesPerEtaBinRP(TProfile* const noppebRP)    {this->fEtaBinRPNoOfParticles = noppebRP;};
129   TProfile* GetNumberOfParticlesPerEtaBinRP() const            {return this->fEtaBinRPNoOfParticles;}; 
130   //----------------------------------------------------------------------------------------------------------
131    
132   //----------------------------------------------------------------------------------------------------------
133   //POI = Particles Of Interest (POI denotes particles of interest for the final physical results for int. and diff. flow)
134   void SetDiffFlowPtPOIGenFunRe(TProfile3D* const dfPOIPtgfRe)  {this->fDiffFlowPtPOIGenFunRe = dfPOIPtgfRe;};
135   TProfile3D* GetDiffFlowPtPOIGenFunRe() const            {return this->fDiffFlowPtPOIGenFunRe;};
136   
137   void SetDiffFlowPtPOIGenFunIm(TProfile3D* const dfPOIPtgfIm)  {this->fDiffFlowPtPOIGenFunIm = dfPOIPtgfIm;};
138   TProfile3D* GetDiffPtPOIFlowGenFunIm() const            {return this->fDiffFlowPtPOIGenFunIm;};
139   
140   void SetNumberOfParticlesPerPtBinPOI(TProfile* const nopppbPOI) {this->fPtBinPOINoOfParticles = nopppbPOI;};
141   TProfile* GetNumberOfParticlesPerPtBinPOI() const         {return this->fPtBinPOINoOfParticles;};  
142   
143   void SetDiffFlowEtaPOIGenFunRe(TProfile3D* const dfEtaPOIgfRe)   {this->fDiffFlowEtaPOIGenFunRe = dfEtaPOIgfRe;};
144   TProfile3D* GetDiffFlowEtaPOIGenFunRe() const              {return this->fDiffFlowEtaPOIGenFunRe;};
145   
146   void SetDiffFlowEtaPOIGenFunIm(TProfile3D* const dfEtaPOIgfIm)   {this->fDiffFlowEtaPOIGenFunIm = dfEtaPOIgfIm;};
147   TProfile3D* GetDiffFlowEtaPOIGenFunIm() const              {return this->fDiffFlowEtaPOIGenFunIm;};
148   
149   void SetNumberOfParticlesPerEtaBinPOI(TProfile* const noppebPOI)    {this->fEtaBinPOINoOfParticles = noppebPOI;};
150   TProfile* GetNumberOfParticlesPerEtaBinPOI() const            {return this->fEtaBinPOINoOfParticles;};  
151   //----------------------------------------------------------------------------------------------------------
152     
153   void SetAverageMultiplicity(TProfile* const am)      {this->fAvMultIntFlowGFC = am;};
154   TProfile* GetAverageMultiplicity() const       {return this->fAvMultIntFlowGFC;};
155   
156   void SetQVectorComponents(TProfile* const sqvc)    {this->fQVectorComponentsGFC = sqvc;};
157   TProfile* GetQVectorComponents() const       {return this->fQVectorComponentsGFC;};
158   
159   void SetCommonHists(AliFlowCommonHist* const ch)  {this->fCommonHists = ch;};
160   AliFlowCommonHist* GetCommonHists() const   {return this->fCommonHists;};
161   
162   void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
163   Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
164   
165   void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
166   Bool_t GetUsePtWeights() const {return this->fUsePtWeights;};
167   
168   void SetUseEtaWeights(Bool_t const uEtaW) {this->fUseEtaWeights = uEtaW;};
169   Bool_t GetUseEtaWeights() const {return this->fUseEtaWeights;};
170   
171   void SetAverageOfSquaredWeight(TProfile* const aosw) {this->fAverageOfSquaredWeight = aosw;};
172   TProfile* GetSumOfSquaredWeight() const {return this->fAverageOfSquaredWeight;}; 
173 //----------------------------------------------------------------------------------------------------------------
174  
175  private:
176   AliFlowAnalysisWithCumulants(const AliFlowAnalysisWithCumulants& afawc);
177   AliFlowAnalysisWithCumulants& operator=(const AliFlowAnalysisWithCumulants& afawc);
178   AliFlowTrackSimple* fTrack;                                   //track
179   static const Int_t fgkQmax = AliFlowCumuConstants::kQmax;     //needed for numerics
180   static const Int_t fgkPmax = AliFlowCumuConstants::kPmax;     //needed for numerics  
181   static const Int_t fgkQmax4 = AliFlowCumuConstants::kQmax4;   //needed for numerics (only for different system of Eq.)
182   static const Int_t fgkPmax4 = AliFlowCumuConstants::kPmax4;   //needed for numerics (only for different system of Eq.) 
183   static const Int_t fgkQmax6 = AliFlowCumuConstants::kQmax6;   //needed for numerics (only for different system of Eq.)
184   static const Int_t fgkPmax6 = AliFlowCumuConstants::kPmax6;   //needed for numerics (only for different system of Eq.) 
185   static const Int_t fgkQmax8 = AliFlowCumuConstants::kQmax8;   //needed for numerics (only for different system of Eq.)
186   static const Int_t fgkPmax8 = AliFlowCumuConstants::kPmax8;   //needed for numerics (only for different system of Eq.)  
187   static const Int_t fgkQmax16 = AliFlowCumuConstants::kQmax16; //needed for numerics (only for different system of Eq.)
188   static const Int_t fgkPmax16 = AliFlowCumuConstants::kPmax16; //needed for numerics (only for different system of Eq.)
189   static const Int_t fgkFlow = AliFlowCumuConstants::kFlow;     //integrated flow coefficient to be calculated
190   static const Int_t fgkMltpl = AliFlowCumuConstants::kMltpl;   //the multiple in p=m*n (diff. flow) 
191   TList* fHistList;                                             //list to hold all output histograms
192   TList* fWeightsList;                                          //list to hold all histograms with weights
193
194   Double_t fR0;         //needed for numerics
195   Double_t fPtMax;      //maximum pt
196   Double_t fPtMin;      //minimum pt
197   Double_t fBinWidthPt; //width of pt bin (in GeV)
198   Int_t    fgknBinsPt;  //number of pt bins
199   
200   Double_t fEtaMax;      //maximum pt
201   Double_t fEtaMin;      //minimum pt
202   Double_t fBinWidthEta; //width of pt bin (in GeV)
203   Int_t    fgknBinsEta;  //number of pt bins
204       
205   Double_t fAvQx;  //<Q_x>
206   Double_t fAvQy;  //<Q_y>
207   Double_t fAvQ2x; //<(Q_x)^2>
208   Double_t fAvQ2y; //<(Q_y)^2>
209
210   TProfile*          fAvMultIntFlowGFC; //average selected multiplicity
211  
212   TProfile*          fQVectorComponentsGFC; //averages of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, 3rd bin: <(Q_x)^2>, 4th bin: <(Q_y)^2>)
213     
214   TH1D*              fIntFlowResultsGFC; //integrated flow final results
215   
216   TH1D*              fDiffFlowResults2ndOrderGFC; //differential flow final results (2nd order estimate) 
217   TH1D*              fDiffFlowResults4thOrderGFC; //differential flow final results (4th order estimate)
218   TH1D*              fDiffFlowResults6thOrderGFC; //differential flow final results (6th order estimate)
219   TH1D*              fDiffFlowResults8thOrderGFC; //differential flow final results (8th order estimate)
220   
221   AliFlowCommonHistResults*  fCommonHistsResults2nd; //final results for 2nd order int. and diff. flow stored in the common histograms 
222   AliFlowCommonHistResults*  fCommonHistsResults4th; //final results for 4th order int. and diff. flow stored in the common histograms 
223   AliFlowCommonHistResults*  fCommonHistsResults6th; //final results for 6th order int. and diff. flow stored in the common histograms
224   AliFlowCommonHistResults*  fCommonHistsResults8th; //final results for 8th order int. and diff. flow stored in the common histograms
225   
226   TProfile2D*        fIntFlowGenFun;   //avarage of the generating function for integrated flow 
227   
228   TProfile2D*        fIntFlowGenFun4;  //avarage of the generating function for integrated flow (only for different system of Eq.)
229   TProfile2D*        fIntFlowGenFun6;  //avarage of the generating function for integrated flow (only for different system of Eq.)
230   TProfile2D*        fIntFlowGenFun8;  //avarage of the generating function for integrated flow (only for different system of Eq.)
231   TProfile2D*        fIntFlowGenFun16; //avarage of the generating function for integrated flow (only for different system of Eq.)
232
233   TProfile*          fAvMultIntFlow4GFC;  //average selected multiplicity (only for different system of Eq.)
234   TProfile*          fAvMultIntFlow6GFC;  //average selected multiplicity (only for different system of Eq.) 
235   TProfile*          fAvMultIntFlow8GFC;  //average selected multiplicity (only for different system of Eq.)
236   TProfile*          fAvMultIntFlow16GFC; //average selected multiplicity (only for different system of Eq.)
237
238   //RP = Reaction Plane (RP denotes particles used to determine the reaction plane)                                                       
239   TProfile3D*        fDiffFlowPtRPGenFunRe; //avarage of the generating function for differential flow in Pt (real part)
240   TProfile3D*        fDiffFlowPtRPGenFunIm; //avarage of the generating function for differential flow in Pt (imaginary part)
241   TProfile*          fPtBinRPNoOfParticles; //number of particles per pt bin
242   TProfile3D*        fDiffFlowEtaRPGenFunRe; //avarage of the generating function for differential flow in Eta (real part)
243   TProfile3D*        fDiffFlowEtaRPGenFunIm; //avarage of the generating function for differential flow in Eta (imaginary part)
244   TProfile*          fEtaBinRPNoOfParticles; //number of particles per eta bin
245                                     
246   //POI = Particles Of Interest (POI denotes particles of interest for the final physical results for int. and diff. flow)                                                        
247   TProfile3D*        fDiffFlowPtPOIGenFunRe; //avarage of the generating function for differential flow in Pt (real part)
248   TProfile3D*        fDiffFlowPtPOIGenFunIm; //avarage of the generating function for differential flow in Pt (imaginary part)
249   TProfile*          fPtBinPOINoOfParticles; //number of particles per pt bin
250   TProfile3D*        fDiffFlowEtaPOIGenFunRe; //avarage of the generating function for differential flow in Eta (real part)
251   TProfile3D*        fDiffFlowEtaPOIGenFunIm; //avarage of the generating function for differential flow in Eta (imaginary part)
252   TProfile*          fEtaBinPOINoOfParticles; //number of particles per eta bin
253   
254   /*
255   TProfile2D *fDiffFlowGenFunRe0,*fDiffFlowGenFunRe1,*fDiffFlowGenFunRe2,*fDiffFlowGenFunRe3;//differential flow 
256   TProfile2D *fDiffFlowGenFunRe4,*fDiffFlowGenFunRe5,*fDiffFlowGenFunRe6,*fDiffFlowGenFunRe7;//differential flow
257   TProfile2D *fDiffFlowGenFunIm0,*fDiffFlowGenFunIm1,*fDiffFlowGenFunIm2,*fDiffFlowGenFunIm3;//differential flow
258   TProfile2D *fDiffFlowGenFunIm4,*fDiffFlowGenFunIm5,*fDiffFlowGenFunIm6,*fDiffFlowGenFunIm7;//differential flow
259   */
260  
261   AliFlowCommonHist* fCommonHists;      //common control histograms
262   
263   Bool_t fOtherEquations; //numerical equations for cumulants solved up to different highest order 
264   
265   Bool_t fUsePhiWeights;  //phi weights
266   Bool_t fUsePtWeights;   //v_2(pt) weights
267   Bool_t fUseEtaWeights;  //v_2(eta) weights
268   
269   TProfile* fAverageOfSquaredWeight; //<w^2>      
270   
271   ClassDef(AliFlowAnalysisWithCumulants, 0);
272 };
273
274 //================================================================================================================
275
276 #endif
277
278
279
280
281