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