]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithFittingQDistribution.h
fixing coding violations from FC
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / AliFlowAnalysisWithFittingQDistribution.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  * integrated flow estimate by  *
9  *   fitting q-distribution     * 
10  *                              *
11  * author: Ante Bilandzic       * 
12  *          (anteb@nikhef.nl)   *
13  *                              *  
14  *  based on the macro written  *
15  *     by Sergei Voloshin       *
16  *******************************/ 
17  
18 #ifndef ALIFLOWANALYSISWITHFITTINGQDISTRIBUTION_H
19 #define ALIFLOWANALYSISWITHFITTINGQDISTRIBUTION_H
20
21 #include "AliFlowCommonConstants.h"
22
23 class TObjArray;
24 class TList;
25 class TFile;
26
27 class TH1;
28 class TLegend;
29 class TProfile;
30
31 class AliFlowEventSimple;
32 class AliFlowTrackSimple;
33 class AliFlowCommonHist;
34 class AliFlowCommonHistResults;
35 class AliFlowVector;
36
37 //================================================================================================================
38
39 class AliFlowAnalysisWithFittingQDistribution{
40  public:
41   AliFlowAnalysisWithFittingQDistribution();
42   virtual ~AliFlowAnalysisWithFittingQDistribution(); 
43   // 0.) methods called in the constructor:
44   virtual void InitializeArrays();
45   // 1.) method Init() and methods called within Init():
46   virtual void Init();
47    virtual void AccessConstants();
48    virtual void BookCommonHistograms();
49    virtual void BookAndFillWeightsHistograms();
50    virtual void BookEverythingForDistributions();
51    virtual void StoreFittingParameters();
52    virtual void AccessFittingParameters();
53   // 2.) method Make() and methods called within Make(): 
54   virtual void Make(AliFlowEventSimple* anEvent);
55   // 3.) method Finish() and methods called within Finish(): 
56   virtual void Finish(Bool_t doFit = kTRUE);
57    virtual void DoFit(Bool_t useParticleWeights, Bool_t sigma2Fitted);
58    virtual void FillCommonHistResultsIntFlow(Bool_t useParticleWeights, Bool_t sigma2Fitted);
59    virtual void PrintFinalResultsForIntegratedFlow();
60   // 4.) other methods:
61   virtual void GetOutputHistograms(TList *outputListHistos); 
62   virtual void WriteHistograms(TString *outputFileName);
63   virtual void WriteHistograms(TString outputFileName);
64   virtual void WriteHistograms(TDirectoryFile *outputFileName);
65     
66   // **** SETTERS and GETTERS ****
67   
68   // 0.) base:                                                                                              
69   TList* GetHistList() const {return this->fHistList;} 
70   // 1.) common:
71   void SetCommonHists(AliFlowCommonHist* const ch) {this->fCommonHists = ch;};
72   AliFlowCommonHist* GetCommonHists() const {return this->fCommonHists;};
73   void SetCommonHistsResults(AliFlowCommonHistResults* const chr) {this->fCommonHistsResults = chr;};
74   AliFlowCommonHistResults* GetCommonHistsResults() const {return this->fCommonHistsResults;};
75   void SetHarmonic(Int_t const harmonic) {this->fHarmonic = harmonic;};
76   Int_t GetHarmonic() const {return this->fHarmonic;};
77   void SetAnalysisLabel(const char *aLabel) {this->fAnalysisLabel->Append(*aLabel);};
78   TString *GetAnalysisLabel() const {return this->fAnalysisLabel;};
79   // 2.) weights:
80   void SetWeightsList(TList* wlist) {this->fWeightsList = (TList*)wlist->Clone();};
81   TList* GetWeightsList() const {return this->fWeightsList;}  
82   void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
83   Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
84   void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
85   Bool_t GetUsePtWeights() const {return this->fUsePtWeights;};
86   void SetUseEtaWeights(Bool_t const uEtaW) {this->fUseEtaWeights = uEtaW;};
87   Bool_t GetUseEtaWeights() const {return this->fUseEtaWeights;};
88   void SetUseParticleWeights(TProfile* const uPW) {this->fUseParticleWeights = uPW;};
89   TProfile* GetUseParticleWeights() const {return this->fUseParticleWeights;};
90   void SetPhiWeights(TH1F* const histPhiWeights) {this->fPhiWeights = histPhiWeights;};
91   TH1F* GetPhiWeights() const {return this->fPhiWeights;};
92   void SetPtWeights(TH1D* const histPtWeights) {this->fPtWeights = histPtWeights;};
93   TH1D* GetPtWeights() const {return this->fPtWeights;};
94   void SetEtaWeights(TH1D* const histEtaWeights) {this->fEtaWeights = histEtaWeights;};
95   TH1D* GetEtaWeights() const {return this->fEtaWeights;};
96   // 3.) distributions:
97   void SetSumOfParticleWeights(TH1D* const sopW, Int_t pW) {this->fSumOfParticleWeights[pW] = sopW;};
98   TH1D* GetSumOfParticleWeights(Int_t pW) const {return this->fSumOfParticleWeights[pW];};
99   void SetqDistribution(TH1D* const qd, Int_t pW) {this->fqDistribution[pW] = qd;};
100   TH1D* GetqDistribution(Int_t pW) const {return this->fqDistribution[pW];};
101   // 4.) final results of fitting:
102   void SetIntFlow(TH1D* const intFlow, Int_t pW, Int_t sigmaFitted) {this->fIntFlow[pW][sigmaFitted] = intFlow;};
103   TH1D* GetIntFlow(Int_t pW, Int_t sigmaFitted) const {return this->fIntFlow[pW][sigmaFitted];};
104   void SetSigma2(TH1D* const sigma2, Int_t pW, Int_t sigmaFitted) {this->fSigma2[pW][sigmaFitted] = sigma2;};
105   TH1D* GetSigma2(Int_t pW, Int_t sigmaFitted) const {return this->fSigma2[pW][sigmaFitted];};
106   void SetChi2(TH1D* const chi2, Int_t pW, Int_t sigmaFitted) {this->fChi2[pW][sigmaFitted] = chi2;};
107   TH1D* GetChi2(Int_t pW, Int_t sigmaFitted) const {return this->fChi2[pW][sigmaFitted];};
108   // 5.) fitting parameters:
109   void SetFittingParameters(TProfile* const fp) {this->fFittingParameters = fp;};
110   TProfile* GetFittingParameters() const {return this->fFittingParameters;};
111   void SetTreshold(Double_t const treshold) {this->fTreshold = treshold;};
112   Double_t GetTreshold() const {return this->fTreshold;};
113   void SetvStart(Double_t const vStart) {this->fvStart = vStart;};
114   Double_t GetvStart() const {return this->fvStart;};
115   void SetvMin(Double_t const vMin) {this->fvMin = vMin;};
116   Double_t GetvMin() const {return this->fvMin;};
117   void SetvMax(Double_t const vMax) {this->fvMax = vMax;};
118   Double_t GetvMax() const {return this->fvMax;};
119   void SetSigma2Start(Double_t const Sigma2Start) {this->fSigma2Start = Sigma2Start;};
120   Double_t GetSigma2Start() const {return this->fSigma2Start;};
121   void SetSigma2Min(Double_t const Sigma2Min) {this->fSigma2Min = Sigma2Min;};
122   Double_t GetSigma2Min() const {return this->fSigma2Min;};
123   void SetSigma2Max(Double_t const Sigma2Max) {this->fSigma2Max = Sigma2Max;};
124   Double_t GetSigma2Max() const {return this->fSigma2Max;};
125   void SetPlotResults(Bool_t const pr) {this->fPlotResults = pr;};
126   Double_t GetPlotResults() const {return this->fPlotResults;};
127   
128  private:
129   AliFlowAnalysisWithFittingQDistribution(const AliFlowAnalysisWithFittingQDistribution &afawfqd);
130   AliFlowAnalysisWithFittingQDistribution& operator=(const AliFlowAnalysisWithFittingQDistribution &afawfqd);           
131   // 0.) base:
132   TList *fHistList; // base list to hold all output object
133   // 1.) common:
134   AliFlowCommonHist *fCommonHists; // common control histograms 
135   AliFlowCommonHistResults *fCommonHistsResults; // final results in common histograms
136   Int_t fnBinsPhi; // number of phi bins
137   Double_t fPhiMin; // minimum phi   
138   Double_t fPhiMax; // maximum phi 
139   Double_t fPhiBinWidth; // bin width for phi histograms  
140   Int_t fnBinsPt; // number of pt bins
141   Double_t fPtMin; // minimum pt   
142   Double_t fPtMax; // maximum pt  
143   Double_t fPtBinWidth; // bin width for pt histograms  
144   Int_t fnBinsEta; // number of eta bins
145   Double_t fEtaMin; // minimum eta   
146   Double_t fEtaMax; // maximum eta
147   Double_t fEtaBinWidth; // bin width for eta histograms 
148   Int_t fHarmonic; // harmonic 
149   TString *fAnalysisLabel; // analysis label (all histograms and output file will have this label)
150   // 2.) particle weights (abbreviated to 'pWeights' or even to 'pW' throughout the code):
151   TList *fWeightsList; // list to hold all histograms with particle weights: fUseParticleWeights, fPhiWeights, fPtWeights and fEtaWeights
152   Bool_t fUsePhiWeights; // use phi weights
153   Bool_t fUsePtWeights; // use pt weights
154   Bool_t fUseEtaWeights; // use eta weights
155   TProfile *fUseParticleWeights; // profile with three bins to hold values of fUsePhiWeights, fUsePtWeights and fUseEtaWeights
156   TH1F *fPhiWeights; // histogram holding phi weights
157   TH1D *fPtWeights; // histogram holding pt weights
158   TH1D *fEtaWeights; // histogram holding eta weights 
159   // 3.) distributions:
160   TH1D *fSumOfParticleWeights[2]; // [0=particle weights are unit (not used), 1=particle weights are used]
161   TH1D *fqDistribution[2]; // distribution of Q/sqrt{sum of particle weights} [0=particle weights are unit (not used), 1=particle weights are used]
162   // 4.) final results of fitting:
163   TH1D *fIntFlow[2][2]; // final result for integrated flow [0=pWeights are unit (not used), 1=pWeights are used][0=sigma^2 not fitted, 1=sigma^2 fitted]  
164   TH1D *fSigma2[2][2]; // final results for sigma^2 [0=pWeights are unit (not used), 1=pWeights are used][0=sigma^2 not fitted, 1=sigma^2 fitted]
165   TH1D *fChi2[2][2]; // final results for chi^2 from Minuit [0=pWeights are unit (not used), 1=pWeights are used][0=sigma^2 not fitted, 1=sigma^2 fitted]
166   // 5.) fitting parameters:
167   TProfile *fFittingParameters; // profile to hold all fitting parameters
168   Double_t fTreshold; // the first bin taken for the fitting is the first bin with nEntries >= fTreshold (analogously for the last bin)
169   Double_t fvStart; // fitting of v will start from this point
170   Double_t fvMin; // v range, lower boundary
171   Double_t fvMax; // v range, upper boundary
172   Double_t fSigma2Start; // fitting of sigma2 will start from this point
173   Double_t fSigma2Min; // sigma2 range, lower boundary (this should be kept above 0.5 according to theorists...)
174   Double_t fSigma2Max; // sigma2 range, upper boundary
175   Bool_t fPlotResults; // plot or not q-distribution and resulting fitting function
176   // 6.) rest:
177   TLegend *fLegend; // legend // to be improved (do I need this as data member?)
178   
179   ClassDef(AliFlowAnalysisWithFittingQDistribution, 0);
180 };
181
182 //================================================================================================================
183
184 #endif
185
186
187
188
189