]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithCumulants.h
start of moving various methods into the flowevent
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowCommon / AliFlowAnalysisWithCumulants.h
CommitLineData
2188af53 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
b6cd16a9 14#ifndef ALIFLOWANALYSISWITHCUMULANTS_H
15#define ALIFLOWANALYSISWITHCUMULANTS_H
f1d945a1 16
f1d945a1 17#include "AliFlowCommonConstants.h"
18#include "AliFlowCumuConstants.h"
19
f1d945a1 20class TObjArray;
2188af53 21class TList;
22class TFile;
aaebd73d 23
929098e4 24class TH1D;
aaebd73d 25class TProfile;
26class TProfile2D;
27class TProfile3D;
929098e4 28class TDirectoryFile;
aaebd73d 29
f1d945a1 30class AliFlowEventSimple;
31class AliFlowTrackSimple;
32class AliFlowCommonHist;
33class AliFlowCommonHistResults;
34class AliFlowVector;
35
2188af53 36//================================================================================================================
37
38class AliFlowAnalysisWithCumulants{
f1d945a1 39 public:
40 AliFlowAnalysisWithCumulants();
2188af53 41 virtual ~AliFlowAnalysisWithCumulants();
729ec982 42
e5e75b58 43 virtual void Init();
dce74562 44 virtual void Make(AliFlowEventSimple* anEvent);
fd46c3dd 45 virtual void GetOutputHistograms(TList *outputListHistos); //get pointers to all output histograms (called before Finish())
dce74562 46 virtual void Finish();
1315fe58 47 virtual void WriteHistograms(TString* outputFileName);
b0fda271 48 virtual void WriteHistograms(TString outputFileName);
ad87ae62 49 virtual void WriteHistograms(TDirectoryFile *outputFileName);
aaebd73d 50
52021ae2 51//----------------------------------------------------------------------------------------------------------------
e5e75b58 52// setters and getters
52021ae2 53//----------------------------------------------------------------------------------------------------------------
e5e75b58 54 TList* GetHistList() const {return this->fHistList;}
55
56 void SetWeightsList(TList* wlist) {this->fWeightsList = wlist;}
57 TList* GetWeightsList() const {return this->fWeightsList;}
52021ae2 58
5270f185 59 void SetIntFlowResults(TH1D* const ifr) {this->fIntFlowResultsGFC = ifr;};
52021ae2 60 TH1D* GetIntFlowResults() const {return this->fIntFlowResultsGFC;};
61
5270f185 62 void SetDiffFlowResults2nd(TH1D* const diff2nd) {this->fDiffFlowResults2ndOrderGFC = diff2nd;};
52021ae2 63 TH1D* GetDiffFlowResults2nd() const {return this->fDiffFlowResults2ndOrderGFC;};
64
5270f185 65 void SetDiffFlowResults4th(TH1D* const diff4th) {this->fDiffFlowResults4thOrderGFC = diff4th;};
52021ae2 66 TH1D* GetDiffFlowResults4th() const {return this->fDiffFlowResults4thOrderGFC;};
67
5270f185 68 void SetDiffFlowResults6th(TH1D* const diff6th) {this->fDiffFlowResults6thOrderGFC = diff6th;};
52021ae2 69 TH1D* GetDiffFlowResults6th() const {return this->fDiffFlowResults6thOrderGFC;};
70
5270f185 71 void SetDiffFlowResults8th(TH1D* const diff8th) {this->fDiffFlowResults8thOrderGFC = diff8th;};
52021ae2 72 TH1D* GetDiffFlowResults8th() const {return this->fDiffFlowResults8thOrderGFC;};
73
5270f185 74 void SetCommonHistsResults2nd(AliFlowCommonHistResults* const chr2nd) {this->fCommonHistsResults2nd = chr2nd;};
52021ae2 75 AliFlowCommonHistResults* GetCommonHistsResults2nd() const {return this->fCommonHistsResults2nd;};
76
5270f185 77 void SetCommonHistsResults4th(AliFlowCommonHistResults* const chr4th) {this->fCommonHistsResults4th = chr4th;};
52021ae2 78 AliFlowCommonHistResults* GetCommonHistsResults4th() const {return this->fCommonHistsResults4th;};
79
5270f185 80 void SetCommonHistsResults6th(AliFlowCommonHistResults* const chr6th) {this->fCommonHistsResults6th = chr6th;};
52021ae2 81 AliFlowCommonHistResults* GetCommonHistsResults6th() const {return this->fCommonHistsResults6th;};
82
5270f185 83 void SetCommonHistsResults8th(AliFlowCommonHistResults* const chr8th) {this->fCommonHistsResults8th = chr8th;};
52021ae2 84 AliFlowCommonHistResults* GetCommonHistsResults8th() const {return this->fCommonHistsResults8th;};
85
5270f185 86 void SetIntFlowGenFun(TProfile2D* const ifgf) {this->fIntFlowGenFun = ifgf;};
b6cd16a9 87 TProfile2D* GetIntFlowGenFun() const {return this->fIntFlowGenFun;};
88
5270f185 89 void SetIntFlowGenFun4(TProfile2D* const ifgf4) {this->fIntFlowGenFun4 = ifgf4;}; //(only for other system of Eq.)
cb308e83 90 TProfile2D* GetIntFlowGenFun4() const {return this->fIntFlowGenFun4;}; //(only for other system of Eq.)
b6cd16a9 91
5270f185 92 void SetIntFlowGenFun6(TProfile2D* const ifgf6) {this->fIntFlowGenFun6 = ifgf6;}; //(only for other system of Eq.)
cb308e83 93 TProfile2D* GetIntFlowGenFun6() const {return this->fIntFlowGenFun6;}; //(only for other system of Eq.)
b6cd16a9 94
5270f185 95 void SetIntFlowGenFun8(TProfile2D* const ifgf8) {this->fIntFlowGenFun8 = ifgf8;}; //(only for other system of Eq.)
cb308e83 96 TProfile2D* GetIntFlowGenFun8() const {return this->fIntFlowGenFun8;}; //(only for other system of Eq.)
52021ae2 97
5270f185 98 void SetIntFlowGenFun16(TProfile2D* const ifgf16) {this->fIntFlowGenFun16 = ifgf16;}; //(only for other system of Eq.)
cb308e83 99 TProfile2D* GetIntFlowGenFun16() const {return this->fIntFlowGenFun16;}; //(only for other system of Eq.)
b6cd16a9 100
5270f185 101 void SetAverageMultiplicity4(TProfile* const am4) {this->fAvMultIntFlow4GFC = am4;}; //(only for other system of Eq.)
cb308e83 102 TProfile* GetAverageMultiplicity4() const {return this->fAvMultIntFlow4GFC;}; //(only for other system of Eq.)
103
5270f185 104 void SetAverageMultiplicity6(TProfile* const am6) {this->fAvMultIntFlow6GFC = am6;}; //(only for other system of Eq.)
cb308e83 105 TProfile* GetAverageMultiplicity6() const {return this->fAvMultIntFlow6GFC;}; //(only for other system of Eq.)
106
5270f185 107 void SetAverageMultiplicity8(TProfile* const am8) {this->fAvMultIntFlow8GFC = am8;}; //(only for other system of Eq.)
cb308e83 108 TProfile* GetAverageMultiplicity8() const {return this->fAvMultIntFlow8GFC;}; //(only for other system of Eq.)
109
5270f185 110 void SetAverageMultiplicity16(TProfile* const am16) {this->fAvMultIntFlow16GFC = am16;}; //(only for other system of Eq.)
cb308e83 111 TProfile* GetAverageMultiplicity16() const {return this->fAvMultIntFlow16GFC;}; //(only for other system of Eq.)
52021ae2 112
813a4157 113 //----------------------------------------------------------------------------------------------------------
114 //RP = Reaction Plane (RP denotes particles used to determine the reaction plane)
5270f185 115 void SetDiffFlowPtRPGenFunRe(TProfile3D* const dfRPPtgfRe) {this->fDiffFlowPtRPGenFunRe = dfRPPtgfRe;};
813a4157 116 TProfile3D* GetDiffFlowPtRPGenFunRe() const {return this->fDiffFlowPtRPGenFunRe;};
117
5270f185 118 void SetDiffFlowPtRPGenFunIm(TProfile3D* const dfRPPtgfIm) {this->fDiffFlowPtRPGenFunIm = dfRPPtgfIm;};
813a4157 119 TProfile3D* GetDiffPtRPFlowGenFunIm() const {return this->fDiffFlowPtRPGenFunIm;};
120
5270f185 121 void SetNumberOfParticlesPerPtBinRP(TProfile* const nopppbRP) {this->fPtBinRPNoOfParticles = nopppbRP;};
813a4157 122 TProfile* GetNumberOfParticlesPerPtBinRP() const {return this->fPtBinRPNoOfParticles;};
123
5270f185 124 void SetDiffFlowEtaRPGenFunRe(TProfile3D* const dfEtaRPgfRe) {this->fDiffFlowEtaRPGenFunRe = dfEtaRPgfRe;};
813a4157 125 TProfile3D* GetDiffFlowEtaRPGenFunRe() const {return this->fDiffFlowEtaRPGenFunRe;};
126
5270f185 127 void SetDiffFlowEtaRPGenFunIm(TProfile3D* const dfEtaRPgfIm) {this->fDiffFlowEtaRPGenFunIm = dfEtaRPgfIm;};
813a4157 128 TProfile3D* GetDiffFlowEtaRPGenFunIm() const {return this->fDiffFlowEtaRPGenFunIm;};
129
5270f185 130 void SetNumberOfParticlesPerEtaBinRP(TProfile* const noppebRP) {this->fEtaBinRPNoOfParticles = noppebRP;};
813a4157 131 TProfile* GetNumberOfParticlesPerEtaBinRP() const {return this->fEtaBinRPNoOfParticles;};
132 //----------------------------------------------------------------------------------------------------------
133
134 //----------------------------------------------------------------------------------------------------------
135 //POI = Particles Of Interest (POI denotes particles of interest for the final physical results for int. and diff. flow)
5270f185 136 void SetDiffFlowPtPOIGenFunRe(TProfile3D* const dfPOIPtgfRe) {this->fDiffFlowPtPOIGenFunRe = dfPOIPtgfRe;};
813a4157 137 TProfile3D* GetDiffFlowPtPOIGenFunRe() const {return this->fDiffFlowPtPOIGenFunRe;};
138
5270f185 139 void SetDiffFlowPtPOIGenFunIm(TProfile3D* const dfPOIPtgfIm) {this->fDiffFlowPtPOIGenFunIm = dfPOIPtgfIm;};
813a4157 140 TProfile3D* GetDiffPtPOIFlowGenFunIm() const {return this->fDiffFlowPtPOIGenFunIm;};
52021ae2 141
5270f185 142 void SetNumberOfParticlesPerPtBinPOI(TProfile* const nopppbPOI) {this->fPtBinPOINoOfParticles = nopppbPOI;};
813a4157 143 TProfile* GetNumberOfParticlesPerPtBinPOI() const {return this->fPtBinPOINoOfParticles;};
52021ae2 144
5270f185 145 void SetDiffFlowEtaPOIGenFunRe(TProfile3D* const dfEtaPOIgfRe) {this->fDiffFlowEtaPOIGenFunRe = dfEtaPOIgfRe;};
813a4157 146 TProfile3D* GetDiffFlowEtaPOIGenFunRe() const {return this->fDiffFlowEtaPOIGenFunRe;};
147
5270f185 148 void SetDiffFlowEtaPOIGenFunIm(TProfile3D* const dfEtaPOIgfIm) {this->fDiffFlowEtaPOIGenFunIm = dfEtaPOIgfIm;};
813a4157 149 TProfile3D* GetDiffFlowEtaPOIGenFunIm() const {return this->fDiffFlowEtaPOIGenFunIm;};
150
5270f185 151 void SetNumberOfParticlesPerEtaBinPOI(TProfile* const noppebPOI) {this->fEtaBinPOINoOfParticles = noppebPOI;};
813a4157 152 TProfile* GetNumberOfParticlesPerEtaBinPOI() const {return this->fEtaBinPOINoOfParticles;};
153 //----------------------------------------------------------------------------------------------------------
154
5270f185 155 void SetAverageMultiplicity(TProfile* const am) {this->fAvMultIntFlowGFC = am;};
52021ae2 156 TProfile* GetAverageMultiplicity() const {return this->fAvMultIntFlowGFC;};
157
5270f185 158 void SetQVectorComponents(TProfile* const sqvc) {this->fQVectorComponentsGFC = sqvc;};
52021ae2 159 TProfile* GetQVectorComponents() const {return this->fQVectorComponentsGFC;};
813a4157 160
5270f185 161 void SetCommonHists(AliFlowCommonHist* const ch) {this->fCommonHists = ch;};
813a4157 162 AliFlowCommonHist* GetCommonHists() const {return this->fCommonHists;};
e5e75b58 163
164 void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
165 Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
166
167 void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
168 Bool_t GetUsePtWeights() const {return this->fUsePtWeights;};
169
170 void SetUseEtaWeights(Bool_t const uEtaW) {this->fUseEtaWeights = uEtaW;};
171 Bool_t GetUseEtaWeights() const {return this->fUseEtaWeights;};
9dd53ff2 172
173 void SetAverageOfSquaredWeight(TProfile* const aosw) {this->fAverageOfSquaredWeight = aosw;};
174 TProfile* GetSumOfSquaredWeight() const {return this->fAverageOfSquaredWeight;};
52021ae2 175//----------------------------------------------------------------------------------------------------------------
924fafb7 176
2188af53 177 private:
178 AliFlowAnalysisWithCumulants(const AliFlowAnalysisWithCumulants& afawc);
179 AliFlowAnalysisWithCumulants& operator=(const AliFlowAnalysisWithCumulants& afawc);
b6cd16a9 180 AliFlowTrackSimple* fTrack; //track
bee2efdc 181 static const Int_t fgkQmax = AliFlowCumuConstants::fgkQmax; //needed for numerics
182 static const Int_t fgkPmax = AliFlowCumuConstants::fgkPmax; //needed for numerics
183 static const Int_t fgkQmax4 = AliFlowCumuConstants::fgkQmax4; //needed for numerics (only for different system of Eq.)
184 static const Int_t fgkPmax4 = AliFlowCumuConstants::fgkPmax4; //needed for numerics (only for different system of Eq.)
185 static const Int_t fgkQmax6 = AliFlowCumuConstants::fgkQmax6; //needed for numerics (only for different system of Eq.)
186 static const Int_t fgkPmax6 = AliFlowCumuConstants::fgkPmax6; //needed for numerics (only for different system of Eq.)
187 static const Int_t fgkQmax8 = AliFlowCumuConstants::fgkQmax8; //needed for numerics (only for different system of Eq.)
188 static const Int_t fgkPmax8 = AliFlowCumuConstants::fgkPmax8; //needed for numerics (only for different system of Eq.)
189 static const Int_t fgkQmax16 = AliFlowCumuConstants::fgkQmax16; //needed for numerics (only for different system of Eq.)
190 static const Int_t fgkPmax16 = AliFlowCumuConstants::fgkPmax16; //needed for numerics (only for different system of Eq.)
191 static const Int_t fgkFlow = AliFlowCumuConstants::fgkFlow; //integrated flow coefficient to be calculated
192 static const Int_t fgkMltpl = AliFlowCumuConstants::fgkMltpl; //the multiple in p=m*n (diff. flow)
b6cd16a9 193 TList* fHistList; //list to hold all output histograms
e5e75b58 194 TList* fWeightsList; //list to hold all histograms with weights
2188af53 195
813a4157 196 Double_t fR0; //needed for numerics
197 Double_t fPtMax; //maximum pt
198 Double_t fPtMin; //minimum pt
199 Double_t fBinWidthPt; //width of pt bin (in GeV)
200 Int_t fgknBinsPt; //number of pt bins
201
202 Double_t fEtaMax; //maximum pt
203 Double_t fEtaMin; //minimum pt
204 Double_t fBinWidthEta; //width of pt bin (in GeV)
205 Int_t fgknBinsEta; //number of pt bins
f1d945a1 206
2188af53 207 Double_t fAvQx; //<Q_x>
208 Double_t fAvQy; //<Q_y>
209 Double_t fAvQ2x; //<(Q_x)^2>
210 Double_t fAvQ2y; //<(Q_y)^2>
211
b6cd16a9 212 TProfile* fAvMultIntFlowGFC; //average selected multiplicity
2188af53 213
52021ae2 214 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>)
2188af53 215
b6cd16a9 216 TH1D* fIntFlowResultsGFC; //integrated flow final results
aaebd73d 217
52021ae2 218 TH1D* fDiffFlowResults2ndOrderGFC; //differential flow final results (2nd order estimate)
219 TH1D* fDiffFlowResults4thOrderGFC; //differential flow final results (4th order estimate)
220 TH1D* fDiffFlowResults6thOrderGFC; //differential flow final results (6th order estimate)
221 TH1D* fDiffFlowResults8thOrderGFC; //differential flow final results (8th order estimate)
222
b6cd16a9 223 AliFlowCommonHistResults* fCommonHistsResults2nd; //final results for 2nd order int. and diff. flow stored in the common histograms
224 AliFlowCommonHistResults* fCommonHistsResults4th; //final results for 4th order int. and diff. flow stored in the common histograms
225 AliFlowCommonHistResults* fCommonHistsResults6th; //final results for 6th order int. and diff. flow stored in the common histograms
226 AliFlowCommonHistResults* fCommonHistsResults8th; //final results for 8th order int. and diff. flow stored in the common histograms
227
228 TProfile2D* fIntFlowGenFun; //avarage of the generating function for integrated flow
cb308e83 229
230 TProfile2D* fIntFlowGenFun4; //avarage of the generating function for integrated flow (only for different system of Eq.)
231 TProfile2D* fIntFlowGenFun6; //avarage of the generating function for integrated flow (only for different system of Eq.)
232 TProfile2D* fIntFlowGenFun8; //avarage of the generating function for integrated flow (only for different system of Eq.)
233 TProfile2D* fIntFlowGenFun16; //avarage of the generating function for integrated flow (only for different system of Eq.)
234
235 TProfile* fAvMultIntFlow4GFC; //average selected multiplicity (only for different system of Eq.)
236 TProfile* fAvMultIntFlow6GFC; //average selected multiplicity (only for different system of Eq.)
237 TProfile* fAvMultIntFlow8GFC; //average selected multiplicity (only for different system of Eq.)
238 TProfile* fAvMultIntFlow16GFC; //average selected multiplicity (only for different system of Eq.)
813a4157 239
240 //RP = Reaction Plane (RP denotes particles used to determine the reaction plane)
241 TProfile3D* fDiffFlowPtRPGenFunRe; //avarage of the generating function for differential flow in Pt (real part)
242 TProfile3D* fDiffFlowPtRPGenFunIm; //avarage of the generating function for differential flow in Pt (imaginary part)
243 TProfile* fPtBinRPNoOfParticles; //number of particles per pt bin
244 TProfile3D* fDiffFlowEtaRPGenFunRe; //avarage of the generating function for differential flow in Eta (real part)
245 TProfile3D* fDiffFlowEtaRPGenFunIm; //avarage of the generating function for differential flow in Eta (imaginary part)
246 TProfile* fEtaBinRPNoOfParticles; //number of particles per eta bin
247
248 //POI = Particles Of Interest (POI denotes particles of interest for the final physical results for int. and diff. flow)
249 TProfile3D* fDiffFlowPtPOIGenFunRe; //avarage of the generating function for differential flow in Pt (real part)
250 TProfile3D* fDiffFlowPtPOIGenFunIm; //avarage of the generating function for differential flow in Pt (imaginary part)
251 TProfile* fPtBinPOINoOfParticles; //number of particles per pt bin
252 TProfile3D* fDiffFlowEtaPOIGenFunRe; //avarage of the generating function for differential flow in Eta (real part)
253 TProfile3D* fDiffFlowEtaPOIGenFunIm; //avarage of the generating function for differential flow in Eta (imaginary part)
254 TProfile* fEtaBinPOINoOfParticles; //number of particles per eta bin
aaebd73d 255
52021ae2 256 /*
2188af53 257 TProfile2D *fDiffFlowGenFunRe0,*fDiffFlowGenFunRe1,*fDiffFlowGenFunRe2,*fDiffFlowGenFunRe3;//differential flow
258 TProfile2D *fDiffFlowGenFunRe4,*fDiffFlowGenFunRe5,*fDiffFlowGenFunRe6,*fDiffFlowGenFunRe7;//differential flow
259 TProfile2D *fDiffFlowGenFunIm0,*fDiffFlowGenFunIm1,*fDiffFlowGenFunIm2,*fDiffFlowGenFunIm3;//differential flow
260 TProfile2D *fDiffFlowGenFunIm4,*fDiffFlowGenFunIm5,*fDiffFlowGenFunIm6,*fDiffFlowGenFunIm7;//differential flow
52021ae2 261 */
2188af53 262
263 AliFlowCommonHist* fCommonHists; //common control histograms
b6cd16a9 264
265 Bool_t fOtherEquations; //numerical equations for cumulants solved up to different highest order
e5e75b58 266
267 Bool_t fUsePhiWeights; //phi weights
268 Bool_t fUsePtWeights; //v_2(pt) weights
9dd53ff2 269 Bool_t fUseEtaWeights; //v_2(eta) weights
270
271 TProfile* fAverageOfSquaredWeight; //<w^2>
272
f1d945a1 273 ClassDef(AliFlowAnalysisWithCumulants, 0);
274};
2188af53 275
276//================================================================================================================
277
f1d945a1 278#endif
279
280
aaebd73d 281
282
283