]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowAnalysisWithQCumulants.h
bug in StepManager fixed, thanks to Andreas
[u/mrichter/AliRoot.git] / PWG2 / FLOW / 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
19 class TObjArray;
20 class TList;
21 class TFile;
22 class TGraph;
23
24 class TH1;
25 class TProfile;
26
27 class AliFlowEventSimple;
28 class AliFlowTrackSimple;
29 class AliFlowVector;
30
31 class AliFlowCommonHist;
32 class AliFlowCommonHistResults;
33
34 //================================================================================================================
35
36 class AliFlowAnalysisWithQCumulants{
37  public:
38   AliFlowAnalysisWithQCumulants();
39   virtual ~AliFlowAnalysisWithQCumulants(); 
40   
41   virtual void Init();
42   virtual void Make(AliFlowEventSimple* anEvent);
43   virtual void Finish();
44   virtual void WriteHistograms(TString outputFileName);
45  
46 //----------------------------------------------------------------------------------------------------------------
47 //                                            setters and getters                                                 
48 //----------------------------------------------------------------------------------------------------------------
49   TList* GetHistList() const {return this->fHistList;} 
50   
51   void SetWeightsList(TList* wlist) {this->fWeightsList = wlist;}
52   TList* GetWeightsList() const {return this->fWeightsList;}   
53  
54   void SetIntFlowResults(TH1D* const ifr) {this->fIntFlowResultsQC = ifr;};
55   TH1D* GetIntFlowResults() const {return this->fIntFlowResultsQC;};
56   
57   void SetDiffFlowResults2nd(TH1D* const diff2nd) {this->fDiffFlowResults2ndOrderQC = diff2nd;};
58   TH1D* GetDiffFlowResults2nd() const {return this->fDiffFlowResults2ndOrderQC;};
59   
60   void SetDiffFlowResults4th(TH1D* const diff4th) {this->fDiffFlowResults4thOrderQC = diff4th;};
61   TH1D* GetDiffFlowResults4th() const {return this->fDiffFlowResults4thOrderQC;};
62   
63   void SetCovariances(TH1D* const cov) {this->fCovariances = cov;};
64   TH1D* GetCovariances() const {return this->fCovariances;};
65   
66   void SetCommonHists2nd(AliFlowCommonHist* const ch2nd) {this->fCommonHists2nd = ch2nd;};
67   AliFlowCommonHist* GetCommonHists2nd() const {return this->fCommonHists2nd;};
68   
69   void SetCommonHists4th(AliFlowCommonHist* const ch4th) {this->fCommonHists4th = ch4th;};
70   AliFlowCommonHist* GetCommonHists4th() const {return this->fCommonHists4th;};
71   
72   void SetCommonHists6th(AliFlowCommonHist* const ch6th) {this->fCommonHists6th = ch6th;};
73   AliFlowCommonHist* GetCommonHists6th() const {return this->fCommonHists6th;};
74   
75   void SetCommonHists8th(AliFlowCommonHist* const ch8th) {this->fCommonHists8th = ch8th;};
76   AliFlowCommonHist* GetCommonHists8th() const {return this->fCommonHists8th;};
77   
78   void SetCommonHistsResults2nd(AliFlowCommonHistResults* const chr2nd) {this->fCommonHistsResults2nd = chr2nd;};
79   AliFlowCommonHistResults* GetCommonHistsResults2nd() const {return this->fCommonHistsResults2nd;};
80   
81   void SetCommonHistsResults4th(AliFlowCommonHistResults* const chr4th) {this->fCommonHistsResults4th = chr4th;};
82   AliFlowCommonHistResults* GetCommonHistsResults4th() const {return this->fCommonHistsResults4th;};
83   
84   void SetCommonHistsResults6th(AliFlowCommonHistResults* const chr6th) {this->fCommonHistsResults6th = chr6th;};
85   AliFlowCommonHistResults* GetCommonHistsResults6th() const {return this->fCommonHistsResults6th;};
86   
87   void SetCommonHistsResults8th(AliFlowCommonHistResults* const chr8th) {this->fCommonHistsResults8th = chr8th;};
88   AliFlowCommonHistResults* GetCommonHistsResults8th() const {return this->fCommonHistsResults8th;};
89   
90   void SetAverageMultiplicity(TProfile* const am) {this->fAvMultIntFlowQC = am;};
91   TProfile* GetAverageMultiplicity() const {return this->fAvMultIntFlowQC;};
92   
93   void SetQvectorForEachEventX(TProfile* const qvfeex) {this->fQvectorForEachEventX = qvfeex;};
94   TProfile* GetQvectorForEachEventX() const {return this->fQvectorForEachEventX;};
95
96   void SetQvectorForEachEventY(TProfile* const qvfeey) {this->fQvectorForEachEventY = qvfeey;};
97   TProfile* GetQvectorForEachEventY() const {return this->fQvectorForEachEventY;};
98         
99   void SetQCorrelations(TProfile* const QCorr) {this->fQCorrelations = QCorr;};
100   TProfile* GetQCorrelations() const {return this->fQCorrelations;};
101   
102   void SetQProduct(TProfile* const qp) {this->fQProduct = qp;};
103   TProfile* GetQProduct() const {return this->fQProduct;};
104   
105   void SetQVectorComponents(TProfile* const qvc) {this->fQvectorComponents = qvc;};
106   TProfile* GetQVectorComponents() const {return this->fQvectorComponents;};
107   
108   void SetTwo1n1nPerPtBinRP(TProfile* const pb2PerPtBin1n1nRP) {this->f2PerPtBin1n1nRP = pb2PerPtBin1n1nRP;};
109   TProfile* GetTwo1n1nPerPtBinRP() const {return this->f2PerPtBin1n1nRP;};
110   
111   void SetTwo2n2nPerPtBinRP(TProfile* const pb2PerPtBin2n2nRP) {this->f2PerPtBin2n2nRP = pb2PerPtBin2n2nRP;};
112   TProfile* GetTwo2n2nPerPtBinRP() const {return this->f2PerPtBin2n2nRP;};
113   
114   void SetThree2n1n1nPerPtBinRP(TProfile* const pb3PerPtBin2n1n1nRP) {this->f3PerPtBin2n1n1nRP = pb3PerPtBin2n1n1nRP;};
115   TProfile* GetThree2n1n1nPerPtBinRP() const {return this->f3PerPtBin2n1n1nRP;};
116   
117   void SetThree1n1n2nPerPtBinRP(TProfile* const pb3PerPtBin1n1n2nRP) {this->f3PerPtBin1n1n2nRP = pb3PerPtBin1n1n2nRP;};
118   TProfile* GetThree1n1n2nPerPtBinRP() const {return this->f3PerPtBin1n1n2nRP;};
119   
120   void SetFour1n1n1n1nPerPtBinRP(TProfile* const pb4PerPtBin1n1n1n1nRP) {this->f4PerPtBin1n1n1n1nRP = pb4PerPtBin1n1n1n1nRP;};
121   TProfile* GetFour1n1n1n1nPerPtBinRP() const {return this->f4PerPtBin1n1n1n1nRP;}; 
122
123   void SetTwo1n1nPerEtaBinRP(TProfile* const pb2PerEtaBin1n1nRP) {this->f2PerEtaBin1n1nRP = pb2PerEtaBin1n1nRP;};
124   TProfile* GetTwo1n1nPerEtaBinRP() const {return this->f2PerEtaBin1n1nRP;};
125   
126   void SetTwo2n2nPerEtaBinRP(TProfile* const pb2PerEtaBin2n2nRP) {this->f2PerEtaBin2n2nRP = pb2PerEtaBin2n2nRP;};
127   TProfile* GetTwo2n2nPerEtaBinRP() const {return this->f2PerEtaBin2n2nRP;};
128   
129   void SetThree2n1n1nPerEtaBinRP(TProfile* const pb3PerEtaBin2n1n1nRP) {this->f3PerEtaBin2n1n1nRP = pb3PerEtaBin2n1n1nRP;};
130   TProfile* GetThree2n1n1nPerEtaBinRP() const {return this->f3PerEtaBin2n1n1nRP;};
131   
132   void SetThree1n1n2nPerEtaBinRP(TProfile* const pb3PerEtaBin1n1n2nRP) {this->f3PerEtaBin1n1n2nRP = pb3PerEtaBin1n1n2nRP;};
133   TProfile* GetThree1n1n2nPerEtaBinRP() const {return this->f3PerEtaBin1n1n2nRP;};
134   
135   void SetFour1n1n1n1nPerEtaBinRP(TProfile* const pb4PerEtaBin1n1n1n1nRP) {this->f4PerEtaBin1n1n1n1nRP = pb4PerEtaBin1n1n1n1nRP;};
136   TProfile* GetFour1n1n1n1nPerEtaBinRP() const {return this->f4PerEtaBin1n1n1n1nRP;}; 
137   
138   void SetTwo1n1nPerPtBinPOI(TProfile* const pb2PerPtBin1n1nPOI) {this->f2PerPtBin1n1nPOI = pb2PerPtBin1n1nPOI;};
139   TProfile* GetTwo1n1nPerPtBinPOI() const {return this->f2PerPtBin1n1nPOI;};
140   
141   void SetTwo2n2nPerPtBinPOI(TProfile* const pb2PerPtBin2n2nPOI) {this->f2PerPtBin2n2nPOI = pb2PerPtBin2n2nPOI;};
142   TProfile* GetTwo2n2nPerPtBinPOI() const {return this->f2PerPtBin2n2nPOI;};
143   
144   void SetThree2n1n1nPerPtBinPOI(TProfile* const pb3PerPtBin2n1n1nPOI) {this->f3PerPtBin2n1n1nPOI = pb3PerPtBin2n1n1nPOI;};
145   TProfile* GetThree2n1n1nPerPtBinPOI() const {return this->f3PerPtBin2n1n1nPOI;};
146   
147   void SetThree1n1n2nPerPtBinPOI(TProfile* const pb3PerPtBin1n1n2nPOI) {this->f3PerPtBin1n1n2nPOI = pb3PerPtBin1n1n2nPOI;};
148   TProfile* GetThree1n1n2nPerPtBinPOI() const {return this->f3PerPtBin1n1n2nPOI;};
149   
150   void SetFour1n1n1n1nPerPtBinPOI(TProfile* const pb4PerPtBin1n1n1n1nPOI) {this->f4PerPtBin1n1n1n1nPOI = pb4PerPtBin1n1n1n1nPOI;};
151   TProfile* GetFour1n1n1n1nPerPtBinPOI() const {return this->f4PerPtBin1n1n1n1nPOI;}; 
152   
153   void SetTwo1n1nPerEtaBinPOI(TProfile* const pb2PerEtaBin1n1nPOI) {this->f2PerEtaBin1n1nPOI = pb2PerEtaBin1n1nPOI;};
154   TProfile* GetTwo1n1nPerEtaBinPOI() const {return this->f2PerEtaBin1n1nPOI;};
155   
156   void SetTwo2n2nPerEtaBinPOI(TProfile* const pb2PerEtaBin2n2nPOI) {this->f2PerEtaBin2n2nPOI = pb2PerEtaBin2n2nPOI;};
157   TProfile* GetTwo2n2nPerEtaBinPOI() const {return this->f2PerEtaBin2n2nPOI;};
158   
159   void SetThree2n1n1nPerEtaBinPOI(TProfile* const pb3PerEtaBin2n1n1nPOI) {this->f3PerEtaBin2n1n1nPOI = pb3PerEtaBin2n1n1nPOI;};
160   TProfile* GetThree2n1n1nPerEtaBinPOI() const {return this->f3PerEtaBin2n1n1nPOI;};
161   
162   void SetThree1n1n2nPerEtaBinPOI(TProfile* const pb3PerEtaBin1n1n2nPOI) {this->f3PerEtaBin1n1n2nPOI = pb3PerEtaBin1n1n2nPOI;};
163   TProfile* GetThree1n1n2nPerEtaBinPOI() const {return this->f3PerEtaBin1n1n2nPOI;};
164   
165   void SetFour1n1n1n1nPerEtaBinPOI(TProfile* const pb4PerEtaBin1n1n1n1nPOI) {this->f4PerEtaBin1n1n1n1nPOI = pb4PerEtaBin1n1n1n1nPOI;};
166   TProfile* GetFour1n1n1n1nPerEtaBinPOI() const {return this->f4PerEtaBin1n1n1n1nPOI;}; 
167   
168   void SetDirectCorrelations(TProfile* const dc) {this->fDirectCorrelations = dc;};
169   TProfile* GetDirectCorrelations() const {return this->fDirectCorrelations;};
170   
171   void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
172   Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
173   
174   void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
175   Bool_t GetUsePtWeights() const {return this->fUsePtWeights;};
176   
177   void SetUseEtaWeights(Bool_t const uEtaW) {this->fUseEtaWeights = uEtaW;};
178   Bool_t GetUseEtaWeights() const {return this->fUseEtaWeights;};
179 //----------------------------------------------------------------------------------------------------------------
180  
181  private:
182   AliFlowAnalysisWithQCumulants(const AliFlowAnalysisWithQCumulants& afawQc);
183   AliFlowAnalysisWithQCumulants& operator=(const AliFlowAnalysisWithQCumulants& afawQc);
184   
185   AliFlowTrackSimple* fTrack;                           //track
186   TList*              fHistList;                        //list to hold all output histograms
187   TList*              fWeightsList;                     //list to hold all histograms with weights
188     
189   TProfile*           fAvMultIntFlowQC;                 //average selected multiplicity (for int. flow)
190  
191   TProfile*           fQvectorComponents;               //averages of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, ...)
192             
193   TH1D*               fIntFlowResultsQC;                //integrated flow results from Q-cumulants
194   TH1D*               fDiffFlowResults2ndOrderQC;       //differential flow results from 2nd order Q-cumulant
195   TH1D*               fDiffFlowResults4thOrderQC;       //differential flow results from 4th order Q-cumulant
196   TH1D*               fCovariances;                     //final results for covariances: 1st bin: <2*4>-<2>*<4>, 2nd bin: <2*6>-<2>*<6>, ...
197   
198   TProfile*                  fQvectorForEachEventX;     //profile containing the x-components of Q-vectors from all events (to be removed)  
199   TProfile*                  fQvectorForEachEventY;     //profile containing the y-components of Q-vectors from all events (to be removed)   
200   TProfile*                  fQCorrelations;            //multi-particle correlations calculated from Q-vectors 
201   TProfile*                  fQProduct;                 //average of products: 1st bin: <2*4>, 2nd bin: <2*6>, ...
202   
203   TProfile*                  fDirectCorrelations;       //multi-particle correlations calculated with nested loop  
204
205   //RP (Reaction Plane particles):  
206   TProfile*                  fPtReq1nRP;                //real part of q-vector evaluated in harmonic n for each pt-bin
207   TProfile*                  fPtImq1nRP;                //imaginary part of q-vector evaluated in harmonic n for each pt-bin
208   TProfile*                  fPtReq2nRP;                //real part of q-vector evaluated in harmonic 2n for each pt-bin
209   TProfile*                  fPtImq2nRP;                //imaginary part of q-vector evaluated in harmonic 2n for each pt-bin
210
211   TProfile*                  f2PerPtBin1n1nRP;          //<<2'>>_{n|n} per pt-bin
212   TProfile*                  f2PerPtBin2n2nRP;          //<<2'>>_{2n|2n} per pt-bin
213   TProfile*                  f3PerPtBin2n1n1nRP;        //<<3'>>_{2n|n,n} per pt-bin
214   TProfile*                  f3PerPtBin1n1n2nRP;        //<<3'>>_{n,n|2n} per pt-bin
215   TProfile*                  f4PerPtBin1n1n1n1nRP;      //<<4'>>_{n,n|n,n} per pt-bin
216   
217   TProfile*                  fEtaReq1nRP;               //real part of q-vector evaluated in harmonic n for each eta-bin
218   TProfile*                  fEtaImq1nRP;               //imaginary part of q-vector evaluated in harmonic n for each eta-bin
219   TProfile*                  fEtaReq2nRP;               //real part of q-vector evaluated in harmonic 2n for each eta-bin
220   TProfile*                  fEtaImq2nRP;               //imaginary part of q-vector evaluated in harmonic 2n for each eta-bin
221
222   TProfile*                  f2PerEtaBin1n1nRP;         //<<2'>>_{n|n} per eta-bin
223   TProfile*                  f2PerEtaBin2n2nRP;         //<<2'>>_{2n|2n} per eta-bin
224   TProfile*                  f3PerEtaBin2n1n1nRP;       //<<3'>>_{2n|n,n} per eta-bin
225   TProfile*                  f3PerEtaBin1n1n2nRP;       //<<3'>>_{n,n|2n} per eta-bin
226   TProfile*                  f4PerEtaBin1n1n1n1nRP;     //<<4'>>_{n,n|n,n} per eta-bin  
227
228   //POI (Particles Of Interest): 
229   TProfile*                  fPtReq1nPrimePOI;          //real part of q'-vector evaluated in harmonic n for each pt-bin
230   TProfile*                  fPtImq1nPrimePOI;          //imaginary part of q'-vector evaluated in harmonic n for each pt-bin
231   TProfile*                  fPtReq2nPrimePOI;          //real part of q'-vector evaluated in harmonic 2n for each pt-bin
232   TProfile*                  fPtImq2nPrimePOI;          //imaginary part of q'-vector evaluated in harmonic 2n for each pt-bin
233   TProfile*                  fmPrimePerPtBin;           //number of particles selected both as POI and not as RP per each pt-bin
234   
235   TProfile*                  fPtReq1nPrimePrimePOI;     //real part of q''-vector evaluated in harmonic n for each pt-bin
236   TProfile*                  fPtImq1nPrimePrimePOI;     //imaginary part of q''-vector evaluated in harmonic n for each pt-bin
237   TProfile*                  fPtReq2nPrimePrimePOI;     //real part of q''-vector evaluated in harmonic 2n for each pt-bin
238   TProfile*                  fPtImq2nPrimePrimePOI;     //imaginary part of q''-vector evaluated in harmonic 2n for each pt-bin
239   TProfile*                  fmPrimePrimePerPtBin;      //number of particles selected both as RP and POI per each pt-bin
240   
241   TProfile*                  fEtaReq1nPrimePOI;         //real part of q'-vector evaluated in harmonic n for each eta-bin
242   TProfile*                  fEtaImq1nPrimePOI;         //imaginary part of q'-vector evaluated in harmonic n for each eta-bin
243   TProfile*                  fEtaReq2nPrimePOI;         //real part of q'-vector evaluated in harmonic 2n for each eta-bin
244   TProfile*                  fEtaImq2nPrimePOI;         //imaginary part of q'-vector evaluated in harmonic 2n for each eta-bin
245   TProfile*                  fmPrimePerEtaBin;          //number of particles selected both as POI and not as RP per each eta-bin
246    
247   TProfile*                  fEtaReq1nPrimePrimePOI;    //real part of q''-vector evaluated in harmonic n for each eta-bin
248   TProfile*                  fEtaImq1nPrimePrimePOI;    //imaginary part of q''-vector evaluated in harmonic n for each eta-bin
249   TProfile*                  fEtaReq2nPrimePrimePOI;    //real part of q''-vector evaluated in harmonic 2n for each eta-bin
250   TProfile*                  fEtaImq2nPrimePrimePOI;    //imaginary part of q''-vector evaluated in harmonic 2n for each eta-bin
251   TProfile*                  fmPrimePrimePerEtaBin;     //number of particles selected both as RP and POI in each eta-bin
252  
253   TProfile*                  f2PerPtBin1n1nPOI;         //<<2'>>_{n|n} per pt-bin
254   TProfile*                  f2PerPtBin2n2nPOI;         //<<2'>>_{2n|2n} per pt-bin
255   TProfile*                  f3PerPtBin2n1n1nPOI;       //<<3'>>_{2n|n,n} per pt-bin
256   TProfile*                  f3PerPtBin1n1n2nPOI;       //<<3'>>_{n,n|2n} per pt-bin
257   TProfile*                  f4PerPtBin1n1n1n1nPOI;     //<<4'>>_{n,n|n,n} per pt-bin
258
259   TProfile*                  f2PerEtaBin1n1nPOI;        //<<2'>>_{n|n} per eta-bin
260   TProfile*                  f2PerEtaBin2n2nPOI;        //<<2'>>_{2n|2n} per eta-bin
261   TProfile*                  f3PerEtaBin2n1n1nPOI;      //<<3'>>_{2n|n,n} per eta-bin
262   TProfile*                  f3PerEtaBin1n1n2nPOI;      //<<3'>>_{n,n|2n} per eta-bin
263   TProfile*                  f4PerEtaBin1n1n1n1nPOI;    //<<4'>>_{n,n|n,n} per eta-bin  
264  
265   AliFlowCommonHist*         fCommonHists2nd;           //common control histograms (taking into account only the events with 2 and more particles) 
266   AliFlowCommonHist*         fCommonHists4th;           //common control histograms (taking into account only the events with 4 and more particles) 
267   AliFlowCommonHist*         fCommonHists6th;           //common control histograms (taking into account only the events with 6 and more particles) 
268   AliFlowCommonHist*         fCommonHists8th;           //common control histograms (taking into account only the events with 8 and more particles) 
269   
270   AliFlowCommonHistResults*  fCommonHistsResults2nd;    //final results for 2nd order int. and diff. flow stored in the common histograms 
271   AliFlowCommonHistResults*  fCommonHistsResults4th;    //final results for 4th order int. and diff. flow stored in the common histograms 
272   AliFlowCommonHistResults*  fCommonHistsResults6th;    //final results for 6th order int. and diff. flow stored in the common histograms
273   AliFlowCommonHistResults*  fCommonHistsResults8th;    //final results for 8th order int. and diff. flow stored in the common histograms
274       
275   TH1D*                      f2pDistribution;           //distribution of <2>_{n|n}
276   TH1D*                      f4pDistribution;           //distribution of <4>_{n,n|n,n}
277   TH1D*                      f6pDistribution;           //distribution of <6>_{n,n,n|n,n,n} 
278   TH1D*                      f8pDistribution;           //distribution of <8>_{n,n,n,n|n,n,n,n}
279  
280   Int_t                      fnBinsPt;                  //number of pt bins
281   Double_t                   fPtMin;                    //minimum pt   
282   Double_t                   fPtMax;                    //maximum pt    
283   
284   Int_t                      fnBinsEta;                 //number of eta bins
285   Double_t                   fEtaMin;                   //minimum eta   
286   Double_t                   fEtaMax;                   //maximum eta
287   Int_t                      fEventCounter;             //counting the number of events    
288    
289   Bool_t                     fUsePhiWeights;            //phi weights
290   Bool_t                     fUsePtWeights;             //v_2(pt) weights
291   Bool_t                     fUseEtaWeights;            //v_2(eta) weights
292                      
293   ClassDef(AliFlowAnalysisWithQCumulants, 0);
294 };
295
296 //================================================================================================================
297
298 #endif
299
300
301
302
303