]>
Commit | Line | Data |
---|---|---|
8d312f00 | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | /* $Id$ */ | |
5 | ||
6 | ||
395fadba | 7 | #ifndef ALIFLOWANALYSISWITHSCALARPRODUCT_H |
8 | #define ALIFLOWANALYSISWITHSCALARPRODUCT_H | |
8d312f00 | 9 | |
8d312f00 | 10 | #include "TString.h" |
11 | ||
12 | class AliFlowTrackSimple; | |
13 | class AliFlowEventSimple; | |
14 | class AliFlowCommonHist; | |
395fadba | 15 | class AliFlowCommonHistResults; |
8d312f00 | 16 | |
a554b203 | 17 | class TH1D; |
18 | class TH2D; | |
8d312f00 | 19 | class TProfile; |
d7eb18ec | 20 | class TList; |
1dfa3c16 | 21 | class TFile; |
8d312f00 | 22 | class Riostream; |
929098e4 | 23 | class TDirectoryFile; |
8d312f00 | 24 | |
12dc476e | 25 | ///////////////////////////////////////////////////////////////////////////// |
8d312f00 | 26 | // Description: Maker to analyze Flow from the Scalar Product method. |
27 | // | |
12dc476e | 28 | // authors: N. van der Kolk (kolk@nikhef.nl), A. Bilandzic (anteb@nikhef.nl) |
29 | ///////////////////////////////////////////////////////////////////////////// | |
8d312f00 | 30 | |
31 | class AliFlowAnalysisWithScalarProduct { | |
32 | ||
33 | public: | |
34 | ||
e35ddff0 | 35 | AliFlowAnalysisWithScalarProduct(); //default constructor |
8d312f00 | 36 | virtual ~AliFlowAnalysisWithScalarProduct(); //destructor |
37 | ||
ad87ae62 | 38 | void Init(); //defines variables and histograms |
39 | void Make(AliFlowEventSimple* anEvent); //calculates variables and fills histograms | |
40 | void GetOutputHistograms(TList *outputListHistos); //get pointers to all output histograms (called before Finish()) | |
41 | void Finish(); //saves histograms | |
42 | void WriteHistograms(TString* outputFileName); //writes histograms locally | |
43 | void WriteHistograms(TString outputFileName); //writes histograms locally | |
44 | void WriteHistograms(TDirectoryFile *outputFileName); //writes histograms locally | |
a554b203 | 45 | |
12dc476e | 46 | Double_t CalculateStatisticalError(Int_t bin, |
47 | Double_t aStatErrorQaQb, | |
48 | TProfile* aHistProUQ, | |
49 | TProfile* aHistProUQQaQb, | |
50 | TH1D** aHistSumOfWeights); | |
51 | ||
a554b203 | 52 | void SetDebug(Bool_t kt) { this->fDebug = kt ; } |
53 | Bool_t GetDebug() const { return this->fDebug ; } | |
54 | ||
a93de0f0 | 55 | virtual void StoreFlags(); //store all booleans needed in Finish() |
56 | virtual void AccessFlags(); //access all booleans needed in Finish() | |
a554b203 | 57 | |
58 | void SetRelDiffMsub(Double_t diff) { this->fRelDiffMsub = diff; } | |
59 | Double_t GetRelDiffMsub() const { return this->fRelDiffMsub; } | |
12dc476e | 60 | |
29195b69 | 61 | //phi weights |
62 | void SetWeightsList(TList* const aWeightsList) {this->fWeightsList = (TList*)aWeightsList->Clone();} | |
63 | TList* GetWeightsList() const {return this->fWeightsList;} | |
64 | void SetUsePhiWeights(Bool_t const aPhiW) {this->fUsePhiWeights = aPhiW;} | |
65 | Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;} | |
29ecccee | 66 | |
67 | // correction for non-uniforma acceptance: | |
a93de0f0 | 68 | void SetApplyCorrectionForNUA(Bool_t const acfNUA) {this->fApplyCorrectionForNUA = acfNUA;} |
69 | Bool_t GetApplyCorrectionForNUA() const {return this->fApplyCorrectionForNUA;} | |
29195b69 | 70 | |
8d312f00 | 71 | // Output |
04c6b875 | 72 | TList* GetHistList() const { return this->fHistList ; } // Gets output histogram list |
12dc476e | 73 | //histogram getters |
29ecccee | 74 | TProfile* GetHistProFlags() const {return this->fHistProFlags;}; |
12dc476e | 75 | TProfile* GetHistProUQetaRP() const {return this->fHistProUQetaRP;} |
395fadba | 76 | TProfile* GetHistProUQetaPOI() const {return this->fHistProUQetaPOI;} |
12dc476e | 77 | TProfile* GetHistProUQPtRP() const {return this->fHistProUQPtRP;} |
78 | TProfile* GetHistProUQPtPOI() const {return this->fHistProUQPtPOI;} | |
79 | TProfile* GetHistProQaQb() const {return this->fHistProQaQb;} | |
a554b203 | 80 | TProfile* GetHistProQaQbNorm() const {return this->fHistProQaQbNorm;} |
29ecccee | 81 | TProfile* GetHistProQaQbReImNorm() const {return this->fHistProQaQbReImNorm;} |
82 | TProfile* GetHistProNonIsotropicTermsQ() const {return this->fHistProNonIsotropicTermsQ;} | |
83 | TProfile* GetHistProNonIsotropicTermsU(Int_t rp, Int_t pe, Int_t sc) const {return this->fHistProNonIsotropicTermsU[rp][pe][sc];} | |
12dc476e | 84 | TH1D* GetHistSumOfLinearWeights() const {return this->fHistSumOfLinearWeights;} |
85 | TH1D* GetHistSumOfQuadraticWeights() const {return this->fHistSumOfQuadraticWeights;} | |
a554b203 | 86 | |
87 | TProfile* GetHistProUQQaQbPtRP() const {return this->fHistProUQQaQbPtRP;} | |
88 | TProfile* GetHistProUQQaQbEtaRP() const {return this->fHistProUQQaQbEtaRP;} | |
89 | TProfile* GetHistProUQQaQbPtPOI() const {return this->fHistProUQQaQbPtPOI;} | |
90 | TProfile* GetHistProUQQaQbEtaPOI() const {return this->fHistProUQQaQbEtaPOI;} | |
12dc476e | 91 | TH1D* GetHistSumOfWeightsPtRP(Int_t i) const {return this->fHistSumOfWeightsPtRP[i];} |
92 | TH1D* GetHistSumOfWeightsEtaRP(Int_t i) const {return this->fHistSumOfWeightsEtaRP[i];} | |
93 | TH1D* GetHistSumOfWeightsPtPOI(Int_t i) const {return this->fHistSumOfWeightsPtPOI[i];} | |
94 | TH1D* GetHistSumOfWeightsEtaPOI(Int_t i) const {return this->fHistSumOfWeightsEtaPOI[i];} | |
a554b203 | 95 | |
12dc476e | 96 | AliFlowCommonHist* GetCommonHists() const {return this->fCommonHists; } |
395fadba | 97 | AliFlowCommonHistResults* GetCommonHistsRes() const {return this->fCommonHistsRes; } |
395fadba | 98 | |
a554b203 | 99 | TH1D* GetHistQaQb() const {return this->fHistQaQb;} |
100 | TH1D* GetHistQaQbNorm() const {return this->fHistQaQbNorm;} | |
101 | TH1D* GetHistQaQbCos() const {return this->fHistQaQbCos;} | |
102 | TH1D* GetHistResolution() const {return this->fHistResolution;} | |
103 | TH1D* GetHistQaNorm() const {return this->fHistQaNorm;} | |
104 | TH2D* GetHistQaNormvsMa() const {return this->fHistQaNormvsMa;} | |
105 | TH1D* GetHistQbNorm() const {return this->fHistQbNorm;} | |
106 | TH2D* GetHistQbNormvsMb() const {return this->fHistQbNormvsMb;} | |
107 | TH2D* GetMavsMb() const {return this->fHistMavsMb;} | |
108 | ||
29ecccee | 109 | //histogram setters |
110 | void SetHistProFlags(TProfile* const aHistProFlags) | |
111 | {this->fHistProFlags = aHistProFlags;}; | |
12dc476e | 112 | void SetHistProUQetaRP(TProfile* const aHistProUQetaRP) |
113 | {this->fHistProUQetaRP = aHistProUQetaRP;} | |
114 | void SetHistProUQetaPOI(TProfile* const aHistProUQetaPOI) | |
115 | {this->fHistProUQetaPOI = aHistProUQetaPOI;} | |
116 | void SetHistProUQPtRP(TProfile* const aHistProUQPtRP) | |
117 | {this->fHistProUQPtRP = aHistProUQPtRP;} | |
118 | void SetHistProUQPtPOI(TProfile* const aHistProUQPtPOI) | |
119 | {this->fHistProUQPtPOI = aHistProUQPtPOI;} | |
120 | void SetHistProQaQb(TProfile* const aHistProQaQb) | |
121 | {this->fHistProQaQb = aHistProQaQb;} | |
a554b203 | 122 | void SetHistProQaQbNorm(TProfile* const aHistProQaQbNorm) |
29ecccee | 123 | {this->fHistProQaQbNorm = aHistProQaQbNorm;} |
124 | void SetHistProQaQbReImNorm(TProfile* const aHistProQaQbReImNorm) | |
125 | {this->fHistProQaQbReImNorm = aHistProQaQbReImNorm;} | |
126 | void SetHistProNonIsotropicTermsQ(TProfile* const aHistProNonIsotropicTermsQ) | |
127 | {this->fHistProNonIsotropicTermsQ = aHistProNonIsotropicTermsQ;} | |
128 | void SetHistProNonIsotropicTermsU(TProfile* const aHistProNonIsotropicTermsU, Int_t const rp, Int_t const pe, Int_t const sc) | |
129 | {this->fHistProNonIsotropicTermsU[rp][pe][sc] = aHistProNonIsotropicTermsU;} | |
12dc476e | 130 | void SetHistSumOfLinearWeights(TH1D* const aHistSumOfLinearWeights) |
131 | {this->fHistSumOfLinearWeights = aHistSumOfLinearWeights;} | |
132 | void SetHistSumOfQuadraticWeights(TH1D* const aHistSumOfQuadraticWeights) | |
133 | {this->fHistSumOfQuadraticWeights = aHistSumOfQuadraticWeights;} | |
134 | void SetHistProUQQaQbPtRP(TProfile* const aHistProUQQaQbPtRP) | |
135 | {this->fHistProUQQaQbPtRP = aHistProUQQaQbPtRP;} | |
136 | void SetHistProUQQaQbEtaRP(TProfile* const aHistProUQQaQbEtaRP) | |
137 | {this->fHistProUQQaQbEtaRP = aHistProUQQaQbEtaRP;} | |
138 | void SetHistProUQQaQbPtPOI(TProfile* const aHistProUQQaQbPtPOI) | |
139 | {this->fHistProUQQaQbPtPOI = aHistProUQQaQbPtPOI;} | |
140 | void SetHistProUQQaQbEtaPOI(TProfile* const aHistProUQQaQbEtaPOI) | |
141 | {this->fHistProUQQaQbEtaPOI = aHistProUQQaQbEtaPOI;} | |
142 | void SetHistSumOfWeightsPtRP(TH1D* const aHistSumOfWeightsPtRP, Int_t const i) | |
143 | {this->fHistSumOfWeightsPtRP[i] = aHistSumOfWeightsPtRP;} | |
144 | void SetHistSumOfWeightsEtaRP(TH1D* const aHistSumOfWeightsEtaRP, Int_t const i) | |
145 | {this->fHistSumOfWeightsEtaRP[i] = aHistSumOfWeightsEtaRP;} | |
146 | void SetHistSumOfWeightsPtPOI(TH1D* const aHistSumOfWeightsPtPOI, Int_t const i) | |
147 | {this->fHistSumOfWeightsPtPOI[i] = aHistSumOfWeightsPtPOI;} | |
148 | void SetHistSumOfWeightsEtaPOI(TH1D* const aHistSumOfWeightsEtaPOI, Int_t const i) | |
149 | {this->fHistSumOfWeightsEtaPOI[i] = aHistSumOfWeightsEtaPOI;} | |
a554b203 | 150 | |
12dc476e | 151 | void SetCommonHists(AliFlowCommonHist* const someCommonHists) |
152 | {this->fCommonHists = someCommonHists; } | |
153 | void SetCommonHistsRes(AliFlowCommonHistResults* const someCommonHistsRes) | |
154 | {this->fCommonHistsRes = someCommonHistsRes; } | |
395fadba | 155 | |
a554b203 | 156 | void SetHistQaQb(TH1D* const aHistQaQb) |
157 | {this->fHistQaQb = aHistQaQb;} | |
158 | void SetHistQaQbNorm(TH1D* const aHistQaQbNorm) | |
159 | {this->fHistQaQbNorm = aHistQaQbNorm;} | |
160 | void SetHistQaQbCos(TH1D* const aHistQaQbCos) | |
161 | {this->fHistQaQbCos = aHistQaQbCos;} | |
162 | void SetHistResolution(TH1D* const aHistResolution) | |
163 | {this->fHistResolution = aHistResolution;} | |
164 | void SetHistQaNorm(TH1D* const aHistQaNorm) | |
165 | {this->fHistQaNorm = aHistQaNorm;} | |
166 | void SetHistQaNormvsMa(TH2D* const aHistQaNormvsMa) | |
167 | {this->fHistQaNormvsMa = aHistQaNormvsMa;} | |
168 | void SetHistQbNorm(TH1D* const aHistQbNorm) | |
169 | {this->fHistQbNorm = aHistQbNorm;} | |
170 | void SetHistQbNormvsMb(TH2D* const aHistQbNormvsMb) | |
171 | {this->fHistQbNormvsMb = aHistQbNormvsMb;} | |
172 | void SetHistMavsMb(TH2D* const aHistMavsMb) | |
173 | {this->fHistMavsMb = aHistMavsMb;} | |
174 | ||
8d312f00 | 175 | private: |
e35ddff0 | 176 | AliFlowAnalysisWithScalarProduct(const AliFlowAnalysisWithScalarProduct& anAnalysis); //copy constructor |
177 | AliFlowAnalysisWithScalarProduct& operator=(const AliFlowAnalysisWithScalarProduct& anAnalysis); //assignment operator | |
178 | ||
a93de0f0 | 179 | Int_t fEventNumber; // event counter |
180 | Bool_t fDebug ; // flag for analysis: more print statements | |
181 | Bool_t fApplyCorrectionForNUA; // apply correction for non-uniform acceptance | |
e4cecfa0 | 182 | |
a554b203 | 183 | Double_t fRelDiffMsub; // the relative difference the two subevent multiplicities can have |
184 | ||
29195b69 | 185 | TList* fWeightsList; // list holding input histograms with phi weights |
186 | Bool_t fUsePhiWeights; // use phi weights | |
04c6b875 | 187 | TH1F* fPhiWeightsSub0; // histogram holding phi weights for subevent 0 |
188 | TH1F* fPhiWeightsSub1; // histogram holding phi weights for subevent 1 | |
29195b69 | 189 | |
a93de0f0 | 190 | TProfile* fHistProFlags; // profile to hold all boolean flags needed in Finish() |
191 | TProfile* fHistProUQetaRP; // uQ(eta) for RP | |
192 | TProfile* fHistProUQetaPOI; // uQ(eta) for POI | |
193 | TProfile* fHistProUQPtRP; // uQ(pt) for RP | |
194 | TProfile* fHistProUQPtPOI; // uQ(pt) for POI | |
195 | TProfile* fHistProQaQb; // average of QaQb | |
196 | TProfile* fHistProQaQbNorm; // average of QaQb/MaMb | |
197 | TProfile* fHistProQaQbReImNorm; // average of Im[Qa/Ma], Re[Qa/Ma], Im[Qb/Mb], Re[Qb/Mb] | |
198 | TProfile* fHistProNonIsotropicTermsQ; // 1st bin: sin, 2nd bin: cos | |
199 | TProfile* fHistProNonIsotropicTermsU[2][2][2]; // [RP/POI][pt/eta][sin/cos] | |
200 | TH1D* fHistSumOfLinearWeights; // holds sum of Ma*Mb | |
201 | TH1D* fHistSumOfQuadraticWeights; // holds sum of (Ma*Mb)^2 | |
12dc476e | 202 | |
203 | TProfile* fHistProUQQaQbPtRP; //holds weighted average of <QuQaQb> | |
204 | TProfile* fHistProUQQaQbEtaRP; //holds weighted average of <QuQaQb> | |
205 | TProfile* fHistProUQQaQbPtPOI; //holds weighted average of <QuQaQb> | |
206 | TProfile* fHistProUQQaQbEtaPOI; //holds weighted average of <QuQaQb> | |
207 | TH1D* fHistSumOfWeightsPtRP[3]; //holds sums of 0: Mq-1, 1: (Mq-1)^2, 2: (Mq-1)*Ma*Mb for each bin | |
208 | TH1D* fHistSumOfWeightsEtaRP[3]; //holds sums of 0: Mq-1, 1: (Mq-1)^2, 2: (Mq-1)*Ma*Mb for each bin | |
209 | TH1D* fHistSumOfWeightsPtPOI[3]; //holds sums of 0: Mq-1, 1: (Mq-1)^2, 2: (Mq-1)*Ma*Mb for each bin | |
210 | TH1D* fHistSumOfWeightsEtaPOI[3]; //holds sums of 0: Mq-1, 1: (Mq-1)^2, 2: (Mq-1)*Ma*Mb for each bin | |
a93de0f0 | 211 | |
212 | AliFlowCommonHist* fCommonHists; // control histograms | |
213 | AliFlowCommonHistResults* fCommonHistsRes; // results histograms | |
a554b203 | 214 | |
215 | TH1D* fHistQaQb; // distribution of QaQb | |
216 | TH1D* fHistQaQbNorm; // distribution of QaQb/MaMb | |
217 | TH1D* fHistQaQbCos; // distribution of the angle between Qa and Qb (from Acos (va*vb)) | |
218 | TH1D* fHistResolution; // distribution of cos(2(phi_a - phi_b)) | |
219 | TH1D* fHistQaNorm; // distribution of Qa/Ma | |
220 | TH2D* fHistQaNormvsMa; // distribution of Qa/Ma vs Ma | |
221 | TH1D* fHistQbNorm; // distribution of Qb/Mb | |
222 | TH2D* fHistQbNormvsMb; // distribution of Qb/Mb vs Mb | |
223 | TH2D* fHistMavsMb; // Ma vs Mb | |
224 | ||
a93de0f0 | 225 | TList* fHistList; // list to hold all output histograms |
226 | ||
e35ddff0 | 227 | ClassDef(AliFlowAnalysisWithScalarProduct,0) // macro for rootcint |
228 | }; | |
8d312f00 | 229 | |
0092f3c2 | 230 | |
df802279 | 231 | #endif |