]>
Commit | Line | Data |
---|---|---|
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 | /******************************** | |
f0e0fbcd | 8 | * estimating reference flow by * |
ce4a88f5 | 9 | * fitting q-distribution * |
10 | * * | |
11 | * author: Ante Bilandzic * | |
f0e0fbcd | 12 | * (abilandzic@gmail.com) * |
ce4a88f5 | 13 | * * |
14 | * based on the macro written * | |
15 | * by Sergei Voloshin * | |
16 | *******************************/ | |
17 | ||
18 | #ifndef ALIFLOWANALYSISWITHFITTINGQDISTRIBUTION_H | |
19 | #define ALIFLOWANALYSISWITHFITTINGQDISTRIBUTION_H | |
20 | ||
53884472 | 21 | #include "AliFlowCommonConstants.h" |
22 | ||
ce4a88f5 | 23 | class TObjArray; |
24 | class TList; | |
25 | class TFile; | |
929098e4 | 26 | class TDirectoryFile; |
ce4a88f5 | 27 | |
929098e4 | 28 | class TH1F; |
29 | class TH1D; | |
53884472 | 30 | class TH2D; |
ce4a88f5 | 31 | class TProfile; |
f0e0fbcd | 32 | class TF1; |
ce4a88f5 | 33 | |
34 | class AliFlowEventSimple; | |
35 | class AliFlowTrackSimple; | |
36 | class AliFlowCommonHist; | |
37 | class AliFlowCommonHistResults; | |
38 | class AliFlowVector; | |
39 | ||
40 | //================================================================================================================ | |
41 | ||
42 | class AliFlowAnalysisWithFittingQDistribution{ | |
43 | public: | |
44 | AliFlowAnalysisWithFittingQDistribution(); | |
45 | virtual ~AliFlowAnalysisWithFittingQDistribution(); | |
46 | // 0.) methods called in the constructor: | |
47 | virtual void InitializeArrays(); | |
48 | // 1.) method Init() and methods called within Init(): | |
49 | virtual void Init(); | |
50 | virtual void AccessConstants(); | |
51 | virtual void BookCommonHistograms(); | |
52 | virtual void BookAndFillWeightsHistograms(); | |
53 | virtual void BookEverythingForDistributions(); | |
ee0860e8 | 54 | virtual void StoreFittingParameters(); |
55 | virtual void AccessFittingParameters(); | |
ce4a88f5 | 56 | // 2.) method Make() and methods called within Make(): |
57 | virtual void Make(AliFlowEventSimple* anEvent); | |
f0e0fbcd | 58 | virtual void CheckPointersUsedInMake(); |
ce4a88f5 | 59 | // 3.) method Finish() and methods called within Finish(): |
60 | virtual void Finish(Bool_t doFit = kTRUE); | |
f0e0fbcd | 61 | virtual void CheckPointersUsedInFinish(); |
62 | virtual void DoFit(Bool_t sigma2Fitted); | |
63 | virtual void FillCommonHistResults(Bool_t sigma2Fitted); | |
64 | virtual void PrintOnTheScreen(); | |
ce4a88f5 | 65 | // 4.) other methods: |
66 | virtual void GetOutputHistograms(TList *outputListHistos); | |
67 | virtual void WriteHistograms(TString *outputFileName); | |
68 | virtual void WriteHistograms(TString outputFileName); | |
ad87ae62 | 69 | virtual void WriteHistograms(TDirectoryFile *outputFileName); |
ce4a88f5 | 70 | |
71 | // **** SETTERS and GETTERS **** | |
72 | ||
73 | // 0.) base: | |
74 | TList* GetHistList() const {return this->fHistList;} | |
75 | // 1.) common: | |
53884472 | 76 | void SetBookOnlyBasicCCH(Bool_t const bobcch) {this->fBookOnlyBasicCCH = bobcch;}; |
77 | Bool_t GetBookOnlyBasicCCH() const {return this->fBookOnlyBasicCCH;}; | |
ce4a88f5 | 78 | void SetCommonHists(AliFlowCommonHist* const ch) {this->fCommonHists = ch;}; |
79 | AliFlowCommonHist* GetCommonHists() const {return this->fCommonHists;}; | |
80 | void SetCommonHistsResults(AliFlowCommonHistResults* const chr) {this->fCommonHistsResults = chr;}; | |
81 | AliFlowCommonHistResults* GetCommonHistsResults() const {return this->fCommonHistsResults;}; | |
82 | void SetHarmonic(Int_t const harmonic) {this->fHarmonic = harmonic;}; | |
83 | Int_t GetHarmonic() const {return this->fHarmonic;}; | |
84 | void SetAnalysisLabel(const char *aLabel) {this->fAnalysisLabel->Append(*aLabel);}; | |
85 | TString *GetAnalysisLabel() const {return this->fAnalysisLabel;}; | |
df23c5ae | 86 | void SetMultiplicityIs(AliFlowCommonConstants::ERefMultSource mi) {this->fMultiplicityIs = mi;}; |
ce4a88f5 | 87 | // 2.) weights: |
88 | void SetWeightsList(TList* wlist) {this->fWeightsList = (TList*)wlist->Clone();}; | |
89 | TList* GetWeightsList() const {return this->fWeightsList;} | |
90 | void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;}; | |
91 | Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;}; | |
92 | void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;}; | |
93 | Bool_t GetUsePtWeights() const {return this->fUsePtWeights;}; | |
94 | void SetUseEtaWeights(Bool_t const uEtaW) {this->fUseEtaWeights = uEtaW;}; | |
95 | Bool_t GetUseEtaWeights() const {return this->fUseEtaWeights;}; | |
96 | void SetUseParticleWeights(TProfile* const uPW) {this->fUseParticleWeights = uPW;}; | |
97 | TProfile* GetUseParticleWeights() const {return this->fUseParticleWeights;}; | |
98 | void SetPhiWeights(TH1F* const histPhiWeights) {this->fPhiWeights = histPhiWeights;}; | |
99 | TH1F* GetPhiWeights() const {return this->fPhiWeights;}; | |
100 | void SetPtWeights(TH1D* const histPtWeights) {this->fPtWeights = histPtWeights;}; | |
101 | TH1D* GetPtWeights() const {return this->fPtWeights;}; | |
102 | void SetEtaWeights(TH1D* const histEtaWeights) {this->fEtaWeights = histEtaWeights;}; | |
103 | TH1D* GetEtaWeights() const {return this->fEtaWeights;}; | |
104 | // 3.) distributions: | |
f0e0fbcd | 105 | void SetSumOfParticleWeights(TH1D* const sopW) {this->fSumOfParticleWeights = sopW;}; |
106 | TH1D* GetSumOfParticleWeights() const {return this->fSumOfParticleWeights;}; | |
107 | void SetqDistribution(TH1D* const qd) {this->fqDistribution = qd;}; | |
108 | TH1D* GetqDistribution() const {return this->fqDistribution;}; | |
109 | void SetqMin(Double_t const qmin) {this->fqMin = qmin;}; | |
110 | Double_t GetqMin() const {return this->fqMin;}; | |
111 | void SetqMax(Double_t const qmax) {this->fqMax = qmax;}; | |
112 | Double_t GetqMax() const {return this->fqMax;}; | |
113 | void SetqNbins(Int_t const qNbins) {this->fqNbins = qNbins;}; | |
53884472 | 114 | Int_t GetqNbins() const {return this->fqNbins;}; |
115 | void SetStoreqDistributionVsMult(Bool_t const sqdvm) {this->fStoreqDistributionVsMult = sqdvm;}; | |
116 | Bool_t GetStoreqDistributionVsMult() const {return this->fStoreqDistributionVsMult;}; | |
117 | void SetqDistributionVsMult(TH2D* const qdvm) {this->fqDistributionVsMult = qdvm;}; | |
118 | TH2D* GetqDistributionVsMult() const {return this->fqDistributionVsMult;}; | |
119 | void SetMinMult(Double_t const minm) {this->fMinMult = minm;}; | |
120 | Double_t GetMinMult() const {return this->fMinMult;}; | |
121 | void SetMaxMult(Double_t const maxm) {this->fMaxMult = maxm;}; | |
122 | Double_t GetMaxMult() const {return this->fMaxMult;}; | |
123 | void SetnBinsMult(Int_t const nbm) {this->fnBinsMult = nbm;}; | |
124 | Int_t GetnBinsMult() const {return this->fnBinsMult;}; | |
ce4a88f5 | 125 | // 4.) final results of fitting: |
f0e0fbcd | 126 | void SetIntFlow(TH1D* const intFlow, Int_t sigmaFitted) {this->fIntFlow[sigmaFitted] = intFlow;}; |
127 | TH1D* GetIntFlow(Int_t sigmaFitted) const {return this->fIntFlow[sigmaFitted];}; | |
128 | void SetSigma2(TH1D* const sigma2, Int_t sigmaFitted) {this->fSigma2[sigmaFitted] = sigma2;}; | |
129 | TH1D* GetSigma2(Int_t sigmaFitted) const {return this->fSigma2[sigmaFitted];}; | |
130 | void SetChi2(TH1D* const chi2, Int_t sigmaFitted) {this->fChi2[sigmaFitted] = chi2;}; | |
131 | TH1D* GetChi2(Int_t sigmaFitted) const {return this->fChi2[sigmaFitted];}; | |
132 | void SetFittingFunction(TF1* const ff, Int_t sigmaFitted) {this->fFittingFunction[sigmaFitted] = ff;}; | |
133 | TF1* GetFittingFunction(Int_t sigmaFitted) const {return this->fFittingFunction[sigmaFitted];}; | |
ee0860e8 | 134 | // 5.) fitting parameters: |
135 | void SetFittingParameters(TProfile* const fp) {this->fFittingParameters = fp;}; | |
136 | TProfile* GetFittingParameters() const {return this->fFittingParameters;}; | |
137 | void SetTreshold(Double_t const treshold) {this->fTreshold = treshold;}; | |
138 | Double_t GetTreshold() const {return this->fTreshold;}; | |
139 | void SetvStart(Double_t const vStart) {this->fvStart = vStart;}; | |
140 | Double_t GetvStart() const {return this->fvStart;}; | |
141 | void SetvMin(Double_t const vMin) {this->fvMin = vMin;}; | |
142 | Double_t GetvMin() const {return this->fvMin;}; | |
143 | void SetvMax(Double_t const vMax) {this->fvMax = vMax;}; | |
144 | Double_t GetvMax() const {return this->fvMax;}; | |
145 | void SetSigma2Start(Double_t const Sigma2Start) {this->fSigma2Start = Sigma2Start;}; | |
146 | Double_t GetSigma2Start() const {return this->fSigma2Start;}; | |
147 | void SetSigma2Min(Double_t const Sigma2Min) {this->fSigma2Min = Sigma2Min;}; | |
148 | Double_t GetSigma2Min() const {return this->fSigma2Min;}; | |
149 | void SetSigma2Max(Double_t const Sigma2Max) {this->fSigma2Max = Sigma2Max;}; | |
150 | Double_t GetSigma2Max() const {return this->fSigma2Max;}; | |
f0e0fbcd | 151 | void SetFinalResultIsFromSigma2Fitted(Bool_t frifs2f) {this->fFinalResultIsFromSigma2Fitted = frifs2f;}; |
152 | Bool_t GetFinalResultIsFromSigma2Fitted() const {return this->fFinalResultIsFromSigma2Fitted;}; | |
153 | void SetPrintOnTheScreen(Bool_t pots) {this->fPrintOnTheScreen = pots;}; | |
154 | Bool_t GetPrintOnTheScreen() const {return this->fPrintOnTheScreen;}; | |
df23c5ae | 155 | void SetDoFit(Bool_t df) {this->fDoFit = df;}; |
156 | Bool_t GetDoFit() const {return this->fDoFit;}; | |
ce4a88f5 | 157 | |
158 | private: | |
159 | AliFlowAnalysisWithFittingQDistribution(const AliFlowAnalysisWithFittingQDistribution &afawfqd); | |
47426051 | 160 | AliFlowAnalysisWithFittingQDistribution& operator=(const AliFlowAnalysisWithFittingQDistribution &afawfqd); |
ce4a88f5 | 161 | // 0.) base: |
162 | TList *fHistList; // base list to hold all output object | |
163 | // 1.) common: | |
53884472 | 164 | Bool_t fBookOnlyBasicCCH; // book only basis common control histrograms (TRUE by default) |
ce4a88f5 | 165 | AliFlowCommonHist *fCommonHists; // common control histograms |
166 | AliFlowCommonHistResults *fCommonHistsResults; // final results in common histograms | |
167 | Int_t fnBinsPhi; // number of phi bins | |
168 | Double_t fPhiMin; // minimum phi | |
169 | Double_t fPhiMax; // maximum phi | |
170 | Double_t fPhiBinWidth; // bin width for phi histograms | |
171 | Int_t fnBinsPt; // number of pt bins | |
172 | Double_t fPtMin; // minimum pt | |
173 | Double_t fPtMax; // maximum pt | |
174 | Double_t fPtBinWidth; // bin width for pt histograms | |
175 | Int_t fnBinsEta; // number of eta bins | |
176 | Double_t fEtaMin; // minimum eta | |
177 | Double_t fEtaMax; // maximum eta | |
178 | Double_t fEtaBinWidth; // bin width for eta histograms | |
179 | Int_t fHarmonic; // harmonic | |
180 | TString *fAnalysisLabel; // analysis label (all histograms and output file will have this label) | |
df23c5ae | 181 | AliFlowCommonConstants::ERefMultSource fMultiplicityIs; // by default "kRP", see AliFlowCommonConstants to see the other options |
ce4a88f5 | 182 | // 2.) particle weights (abbreviated to 'pWeights' or even to 'pW' throughout the code): |
183 | TList *fWeightsList; // list to hold all histograms with particle weights: fUseParticleWeights, fPhiWeights, fPtWeights and fEtaWeights | |
184 | Bool_t fUsePhiWeights; // use phi weights | |
185 | Bool_t fUsePtWeights; // use pt weights | |
186 | Bool_t fUseEtaWeights; // use eta weights | |
187 | TProfile *fUseParticleWeights; // profile with three bins to hold values of fUsePhiWeights, fUsePtWeights and fUseEtaWeights | |
188 | TH1F *fPhiWeights; // histogram holding phi weights | |
47426051 | 189 | TH1D *fPtWeights; // histogram holding pt weights |
190 | TH1D *fEtaWeights; // histogram holding eta weights | |
ce4a88f5 | 191 | // 3.) distributions: |
f0e0fbcd | 192 | TH1D *fSumOfParticleWeights; // distribution of sum of particle weights (for unit weights this equals to multiplicity) |
53884472 | 193 | TH1D *fqDistribution; // distribution of Q/sqrt{M} |
f0e0fbcd | 194 | Double_t fqMin; // lower boundary of TH1D *fqDistribution |
195 | Double_t fqMax; // upper boundary of TH1D *fqDistribution | |
196 | Int_t fqNbins; // number of bins of TH1D *fqDistribution | |
53884472 | 197 | Bool_t fStoreqDistributionVsMult; // store q-distributions vs M |
198 | TH2D *fqDistributionVsMult; // distribution of Q/sqrt{M} vs multiplicity | |
199 | Double_t fMinMult; // minimum multiplicity | |
200 | Double_t fMaxMult; // maximum multiplicity | |
201 | Int_t fnBinsMult; // number of multiplicity bins | |
ce4a88f5 | 202 | // 4.) final results of fitting: |
f0e0fbcd | 203 | TH1D *fIntFlow[2]; // final result for integrated flow [0=sigma^2 not fitted, 1=sigma^2 fitted] |
204 | TH1D *fSigma2[2]; // final results for sigma^2 [0=sigma^2 not fitted, 1=sigma^2 fitted] | |
205 | TH1D *fChi2[2]; // final results for chi^2 from Minuit [0=sigma^2 not fitted, 1=sigma^2 fitted] | |
206 | TF1 *fFittingFunction[2]; // resulting fitting function of q-distribution [0=sigma^2 not fitted, 1=sigma^2 fitted] | |
ee0860e8 | 207 | // 5.) fitting parameters: |
208 | TProfile *fFittingParameters; // profile to hold all fitting parameters | |
47426051 | 209 | Double_t fTreshold; // the first bin taken for the fitting is the first bin with nEntries >= fTreshold (analogously for the last bin) |
ee0860e8 | 210 | Double_t fvStart; // fitting of v will start from this point |
211 | Double_t fvMin; // v range, lower boundary | |
212 | Double_t fvMax; // v range, upper boundary | |
213 | Double_t fSigma2Start; // fitting of sigma2 will start from this point | |
47426051 | 214 | Double_t fSigma2Min; // sigma2 range, lower boundary (this should be kept above 0.5 according to theorists...) |
ee0860e8 | 215 | Double_t fSigma2Max; // sigma2 range, upper boundary |
f0e0fbcd | 216 | Bool_t fFinalResultIsFromSigma2Fitted; // the result obtained with sigma^2 fitted or sigma^2 fixed is being stored |
217 | Bool_t fPrintOnTheScreen; // print or not the final results on the screen | |
df23c5ae | 218 | Bool_t fDoFit; // do the final fit |
ee0860e8 | 219 | |
ce4a88f5 | 220 | ClassDef(AliFlowAnalysisWithFittingQDistribution, 0); |
221 | }; | |
222 | ||
223 | //================================================================================================================ | |
224 | ||
225 | #endif | |
226 | ||
227 | ||
228 | ||
229 | ||
230 |