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