]>
Commit | Line | Data |
---|---|---|
e2168f8f | 1 | /*************************************************************************\r |
2 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *\r | |
3 | * *\r | |
4 | * Author: The ALICE Off-line Project. *\r | |
5 | * Contributors are mentioned in the code where appropriate. *\r | |
6 | * *\r | |
7 | * Permission to use, copy, modify and distribute this software and its *\r | |
8 | * documentation strictly for non-commercial purposes is hereby granted *\r | |
9 | * without fee, provided that the above copyright notice appears in all *\r | |
10 | * copies and that both the copyright notice and this permission notice *\r | |
11 | * appear in the supporting documentation. The authors make no claims *\r | |
12 | * about the suitability of this software for any purpose. It is *\r | |
13 | * provided "as is" without express or implied warranty. * \r | |
14 | **************************************************************************/\r | |
15 | \r | |
16 | /********************************** \r | |
17 | * flow analysis with Q-cumulants * \r | |
18 | * * \r | |
19 | * author: Ante Bilandzic * \r | |
20 | * (anteb@nikhef.nl) *\r | |
21 | *********************************/ \r | |
22 | \r | |
23 | #define AliFlowAnalysisWithQCumulants_cxx\r | |
24 | \r | |
25 | #include "Riostream.h"\r | |
26 | #include "AliFlowCommonConstants.h"\r | |
27 | #include "AliFlowCommonHist.h"\r | |
28 | #include "AliFlowCommonHistResults.h"\r | |
29 | #include "TChain.h"\r | |
30 | #include "TFile.h"\r | |
31 | #include "TList.h"\r | |
32 | #include "TGraph.h"\r | |
33 | #include "TParticle.h"\r | |
34 | #include "TRandom3.h"\r | |
35 | #include "TStyle.h"\r | |
36 | #include "TProfile.h"\r | |
37 | #include "TProfile2D.h" \r | |
38 | #include "TProfile3D.h"\r | |
39 | #include "TMath.h"\r | |
40 | #include "TArrow.h"\r | |
41 | #include "TPaveLabel.h"\r | |
42 | #include "TCanvas.h"\r | |
43 | #include "AliFlowEventSimple.h"\r | |
44 | #include "AliFlowTrackSimple.h"\r | |
45 | #include "AliFlowAnalysisWithQCumulants.h"\r | |
46 | #include "TArrayD.h"\r | |
47 | #include "TRandom.h"\r | |
48 | #include "TF1.h"\r | |
49 | \r | |
50 | class TH1;\r | |
51 | class TH2;\r | |
52 | class TGraph;\r | |
53 | class TPave;\r | |
54 | class TLatex;\r | |
55 | class TMarker;\r | |
56 | class TRandom3;\r | |
57 | class TObjArray;\r | |
58 | class TList;\r | |
59 | class TCanvas;\r | |
60 | class TSystem;\r | |
61 | class TROOT;\r | |
62 | class AliFlowVector;\r | |
63 | class TVector;\r | |
64 | \r | |
65 | \r | |
66 | //================================================================================================================\r | |
67 | \r | |
68 | \r | |
69 | ClassImp(AliFlowAnalysisWithQCumulants)\r | |
70 | \r | |
71 | AliFlowAnalysisWithQCumulants::AliFlowAnalysisWithQCumulants(): \r | |
72 | // 0.) base:\r | |
73 | fHistList(NULL),\r | |
74 | // 1.) common:\r | |
75 | fCommonHists(NULL),\r | |
76 | fCommonHists2nd(NULL), \r | |
77 | fCommonHists4th(NULL),\r | |
78 | fCommonHists6th(NULL),\r | |
79 | fCommonHists8th(NULL),\r | |
80 | fCommonHistsResults2nd(NULL),\r | |
81 | fCommonHistsResults4th(NULL),\r | |
82 | fCommonHistsResults6th(NULL),\r | |
83 | fCommonHistsResults8th(NULL),\r | |
84 | fnBinsPhi(0),\r | |
85 | fPhiMin(0),\r | |
86 | fPhiMax(0),\r | |
87 | fPhiBinWidth(0),\r | |
88 | fnBinsPt(0),\r | |
89 | fPtMin(0),\r | |
90 | fPtMax(0),\r | |
91 | fPtBinWidth(0),\r | |
92 | fnBinsEta(0),\r | |
93 | fEtaMin(0),\r | |
94 | fEtaMax(0),\r | |
95 | fEtaBinWidth(0),\r | |
96 | fHarmonic(2),\r | |
97 | fAnalysisLabel(NULL),\r | |
98 | // 2.) weights:\r | |
99 | fWeightsList(NULL),\r | |
100 | fUsePhiWeights(kFALSE),\r | |
101 | fUsePtWeights(kFALSE),\r | |
102 | fUseEtaWeights(kFALSE),\r | |
103 | fUseParticleWeights(NULL),\r | |
104 | fPhiWeights(NULL),\r | |
105 | fPtWeights(NULL),\r | |
106 | fEtaWeights(NULL),\r | |
107 | // 3.) integrated flow:\r | |
108 | fIntFlowList(NULL), \r | |
109 | fIntFlowProfiles(NULL),\r | |
110 | fIntFlowResults(NULL),\r | |
111 | fIntFlowFlags(NULL),\r | |
c09d90fd | 112 | fApplyCorrectionForNUA(kTRUE), \r |
e2168f8f | 113 | fReQ(NULL),\r |
114 | fImQ(NULL),\r | |
115 | fSMpk(NULL),\r | |
116 | fIntFlowCorrelationsEBE(NULL),\r | |
117 | fIntFlowCorrelationsAllEBE(NULL),\r | |
118 | fAvMultiplicity(NULL),\r | |
119 | fIntFlowCorrelationsPro(NULL),\r | |
120 | fIntFlowCorrelationsAllPro(NULL),\r | |
121 | fIntFlowProductOfCorrelationsPro(NULL),\r | |
122 | fIntFlowCorrelationsHist(NULL),\r | |
123 | fIntFlowCorrelationsAllHist(NULL),\r | |
124 | fIntFlowCovariances(NULL),\r | |
125 | fIntFlowSumOfProductOfEventWeights(NULL),\r | |
126 | fIntFlowQcumulants(NULL),\r | |
127 | fIntFlow(NULL),\r | |
128 | // 4.) differential flow:\r | |
129 | fDiffFlowList(NULL),\r | |
130 | fDiffFlowProfiles(NULL),\r | |
131 | fDiffFlowResults(NULL),\r | |
132 | fDiffFlowFlags(NULL),\r | |
133 | fCalculate2DFlow(kFALSE),\r | |
134 | // 5.) distributions:\r | |
135 | fDistributionsList(NULL),\r | |
136 | // x.) debugging and cross-checking:\r | |
137 | fNestedLoopsList(NULL),\r | |
138 | fEvaluateNestedLoopsForIntFlow(kFALSE),\r | |
139 | fEvaluateNestedLoopsForDiffFlow(kFALSE), \r | |
140 | fEvaluateNestedLoops(NULL),\r | |
141 | fDirectCorrelations(NULL),\r | |
142 | fDirectCorrectionsCos(NULL),\r | |
143 | fDirectCorrectionsSin(NULL),\r | |
144 | fDirectCorrelationsDiffFlow(NULL),\r | |
145 | fDirectCorrectionsDiffFlowCos(NULL),\r | |
146 | fDirectCorrectionsDiffFlowSin(NULL),\r | |
147 | fDirectCorrelationsW(NULL),\r | |
148 | fDirectCorrectionsCosW(NULL),\r | |
149 | fDirectCorrectionsSinW(NULL),\r | |
150 | fDirectCorrelationsDiffFlowW(NULL),\r | |
151 | fDirectCorrectionsDiffFlowCosW(NULL),\r | |
152 | fDirectCorrectionsDiffFlowSinW(NULL)\r | |
153 | {\r | |
154 | // constructor \r | |
155 | \r | |
156 | // base list to hold all output objects:\r | |
157 | fHistList = new TList();\r | |
158 | fHistList->SetName("cobjQC");\r | |
159 | fHistList->SetOwner(kTRUE);\r | |
160 | \r | |
161 | // list to hold histograms with phi, pt and eta weights: \r | |
162 | fWeightsList = new TList();\r | |
163 | \r | |
164 | // analysis label;\r | |
165 | fAnalysisLabel = new TString();\r | |
166 | \r | |
167 | // initialize all arrays: \r | |
168 | this->InitializeArraysForIntFlow();\r | |
169 | this->InitializeArraysForDiffFlow();\r | |
170 | this->InitializeArraysForDistributions();\r | |
171 | \r | |
172 | } // end of constructor\r | |
173 | \r | |
174 | \r | |
175 | //================================================================================================================ \r | |
176 | \r | |
177 | \r | |
178 | AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants()\r | |
179 | {\r | |
180 | // destructor\r | |
181 | \r | |
182 | delete fHistList;\r | |
183 | \r | |
184 | } // end of AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants()\r | |
185 | \r | |
186 | \r | |
187 | //================================================================================================================\r | |
188 | \r | |
189 | \r | |
190 | void AliFlowAnalysisWithQCumulants::Init()\r | |
191 | {\r | |
192 | // a) Access all common constants;\r | |
193 | // b) Book all objects;\r | |
194 | // c) Store flags for integrated and differential flow;\r | |
195 | // d) Store harmonic which will be estimated.\r | |
196 | \r | |
197 | // a) Access all common constants:\r | |
198 | this->AccessConstants();\r | |
199 | \r | |
200 | // b) Book all objects:\r | |
201 | this->BookAndFillWeightsHistograms();\r | |
202 | this->BookAndNestAllLists();\r | |
203 | this->BookCommonHistograms();\r | |
204 | this->BookEverythingForIntegratedFlow(); \r | |
205 | this->BookEverythingForDifferentialFlow(); \r | |
206 | this->BookEverythingForDistributions();\r | |
207 | this->BookEverythingForNestedLoops();\r | |
208 | \r | |
209 | // c) Store flags for integrated and differential flow:\r | |
210 | this->StoreIntFlowFlags();\r | |
211 | this->StoreDiffFlowFlags();\r | |
212 | \r | |
213 | // d) Store harmonic which will be estimated:\r | |
214 | this->StoreHarmonic();\r | |
215 | \r | |
216 | } // end of void AliFlowAnalysisWithQCumulants::Init()\r | |
217 | \r | |
218 | \r | |
219 | //================================================================================================================\r | |
220 | \r | |
221 | \r | |
222 | void AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent)\r | |
223 | {\r | |
224 | // running over data only in this method\r | |
225 | \r | |
226 | // a) fill the common control histograms and call method to fill fAvMultiplicity;\r | |
227 | // b) loop over data to calculate e-b-e quantities;\r | |
228 | // c) call the methods;\r | |
229 | // d) debugging and cross-checking (evaluate nested loops);\r | |
230 | // e) reset e-b-e quantities.\r | |
231 | \r | |
232 | Double_t dPhi = 0.; // azimuthal angle in the laboratory frame\r | |
233 | Double_t dPt = 0.; // transverse momentum\r | |
234 | Double_t dEta = 0.; // pseudorapidity\r | |
235 | \r | |
236 | Double_t wPhi = 1.; // phi weight\r | |
237 | Double_t wPt = 1.; // pt weight\r | |
238 | Double_t wEta = 1.; // eta weight\r | |
239 | \r | |
240 | // ********************************************\r | |
241 | // **** FILL THE COMMON CONTROL HISTOGRAMS ****\r | |
242 | // ********************************************\r | |
243 | \r | |
244 | Int_t nRP = anEvent->GetEventNSelTracksRP(); // number of RPs (i.e. number of particles used to determine the reaction plane)\r | |
245 | \r | |
246 | fCommonHists->FillControlHistograms(anEvent); \r | |
247 | \r | |
248 | if(nRP>1)\r | |
249 | {\r | |
250 | fCommonHists2nd->FillControlHistograms(anEvent); \r | |
251 | if(nRP>3)\r | |
252 | {\r | |
253 | fCommonHists4th->FillControlHistograms(anEvent); \r | |
254 | if(nRP>5)\r | |
255 | {\r | |
256 | fCommonHists6th->FillControlHistograms(anEvent); \r | |
257 | if(nRP>7)\r | |
258 | {\r | |
259 | fCommonHists8th->FillControlHistograms(anEvent); \r | |
260 | } // end of if(nRP>7) \r | |
261 | } // end of if(nRP>5) \r | |
262 | } // end of if(nRP>3) \r | |
263 | } // end of if(nRP>1) \r | |
264 | \r | |
265 | this->FillAverageMultiplicities(nRP); \r | |
266 | \r | |
267 | // *******************************************************\r | |
268 | // **** LOOP OVER DATA AND CALCULATE E-B-E QUANTITIES ****\r | |
269 | // *******************************************************\r | |
270 | \r | |
271 | Int_t nPrim = anEvent->NumberOfTracks(); // nPrim = total number of primary tracks, i.e. nPrim = nRP + nPOI + rest, where:\r | |
272 | // nRP = # of particles used to determine the reaction plane;\r | |
273 | // nPOI = # of particles of interest for a detailed flow analysis;\r | |
274 | // rest = # of particles which are not niether RPs nor POIs. \r | |
275 | \r | |
276 | AliFlowTrackSimple *aftsTrack = NULL;\r | |
277 | \r | |
278 | for(Int_t i=0;i<nPrim;i++) \r | |
279 | { \r | |
280 | aftsTrack=anEvent->GetTrack(i);\r | |
281 | if(aftsTrack)\r | |
282 | {\r | |
283 | if(!(aftsTrack->InRPSelection() || aftsTrack->InPOISelection())) continue; // consider only tracks which are RPs or POIs\r | |
284 | Int_t n = fHarmonic; // shortcut for the harmonic\r | |
285 | if(aftsTrack->InRPSelection()) // RP condition:\r | |
286 | { \r | |
287 | dPhi = aftsTrack->Phi();\r | |
288 | dPt = aftsTrack->Pt();\r | |
289 | dEta = aftsTrack->Eta();\r | |
290 | if(fUsePhiWeights && fPhiWeights && fnBinsPhi) // determine phi weight for this particle:\r | |
291 | {\r | |
292 | wPhi = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*fnBinsPhi/TMath::TwoPi())));\r | |
293 | }\r | |
294 | if(fUsePtWeights && fPtWeights && fnBinsPt) // determine pt weight for this particle:\r | |
295 | {\r | |
296 | wPt = fPtWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/fPtBinWidth))); \r | |
297 | } \r | |
298 | if(fUseEtaWeights && fEtaWeights && fEtaBinWidth) // determine eta weight for this particle: \r | |
299 | {\r | |
300 | wEta = fEtaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fEtaBinWidth))); \r | |
301 | } \r | |
302 | \r | |
303 | // integrated flow: \r | |
304 | // calculate Re[Q_{m*n,k}] and Im[Q_{m*n,k}], m = 1,2,3,4, for this event:\r | |
305 | for(Int_t m=0;m<4;m++)\r | |
306 | {\r | |
307 | for(Int_t k=0;k<9;k++)\r | |
308 | {\r | |
309 | (*fReQ)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1)*n*dPhi); \r | |
310 | (*fImQ)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1)*n*dPhi); \r | |
311 | } \r | |
312 | }\r | |
313 | // calculate S^{M}_{p,k} for this event \r | |
314 | // Remark: final calculation of S^{M}_{p,k} follows after the loop over data bellow:\r | |
315 | for(Int_t p=0;p<8;p++)\r | |
316 | {\r | |
317 | for(Int_t k=0;k<9;k++)\r | |
318 | { \r | |
319 | (*fSMpk)(p,k)+=pow(wPhi*wPt*wEta,k);\r | |
320 | }\r | |
321 | } \r | |
322 | \r | |
323 | // differential flow:\r | |
324 | // 1D (pt):\r | |
325 | // (r_{m*m,k}(pt)): \r | |
326 | for(Int_t m=0;m<4;m++)\r | |
327 | {\r | |
328 | for(Int_t k=0;k<9;k++)\r | |
329 | {\r | |
330 | fReRPQ1dEBE[0][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.);\r | |
331 | fImRPQ1dEBE[0][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.);\r | |
332 | }\r | |
333 | }\r | |
334 | \r | |
335 | // s_{k}(pt) for RPs // to be improved (clarified)\r | |
336 | // Remark: final calculation of s_{p,k}(pt) follows after the loop over data bellow:\r | |
337 | for(Int_t k=0;k<9;k++)\r | |
338 | {\r | |
339 | fs1dEBE[0][0][k]->Fill(dPt,pow(wPhi*wPt*wEta,k),1.);\r | |
340 | }\r | |
341 | // 1D (eta):\r | |
342 | // (r_{m*m,k}(eta)): \r | |
343 | for(Int_t m=0;m<4;m++)\r | |
344 | {\r | |
345 | for(Int_t k=0;k<9;k++)\r | |
346 | {\r | |
347 | fReRPQ1dEBE[0][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.);\r | |
348 | fImRPQ1dEBE[0][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.);\r | |
349 | }\r | |
350 | } \r | |
351 | // s_{k}(eta) for RPs // to be improved (clarified)\r | |
352 | // Remark: final calculation of s_{p,k}(eta) follows after the loop over data bellow:\r | |
353 | for(Int_t k=0;k<9;k++)\r | |
354 | {\r | |
355 | fs1dEBE[0][1][k]->Fill(dEta,pow(wPhi*wPt*wEta,k),1.);\r | |
356 | }\r | |
357 | \r | |
358 | \r | |
359 | \r | |
360 | /*\r | |
361 | // 2D (pt,eta):\r | |
362 | if(fCalculate2DFlow)\r | |
363 | {\r | |
364 | // (r_{m*m,k}(pt,eta)): \r | |
365 | for(Int_t m=0;m<4;m++)\r | |
366 | {\r | |
367 | for(Int_t k=0;k<9;k++)\r | |
368 | {\r | |
369 | fReRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.);\r | |
370 | fImRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.);\r | |
371 | }\r | |
372 | } \r | |
373 | // s_{k}(pt,eta) for RPs // to be improved (clarified)\r | |
374 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow:\r | |
375 | for(Int_t k=0;k<9;k++)\r | |
376 | {\r | |
377 | fs2dEBE[0][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k),1.);\r | |
378 | }\r | |
379 | } // end of if(fCalculate2DFlow) \r | |
380 | */ \r | |
381 | \r | |
382 | \r | |
383 | \r | |
384 | if(aftsTrack->InPOISelection())\r | |
385 | {\r | |
386 | // 1D (pt): \r | |
387 | // (q_{m*m,k}(pt)): \r | |
388 | for(Int_t m=0;m<4;m++)\r | |
389 | {\r | |
390 | for(Int_t k=0;k<9;k++)\r | |
391 | {\r | |
392 | fReRPQ1dEBE[2][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.);\r | |
393 | fImRPQ1dEBE[2][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.);\r | |
394 | }\r | |
395 | } \r | |
396 | // s_{k}(pt) for RP&&POIs // to be improved (clarified)\r | |
397 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow:\r | |
398 | for(Int_t k=0;k<9;k++)\r | |
399 | {\r | |
400 | fs1dEBE[2][0][k]->Fill(dPt,pow(wPhi*wPt*wEta,k),1.);\r | |
401 | }\r | |
402 | // 1D (eta): \r | |
403 | // (q_{m*m,k}(eta)): \r | |
404 | for(Int_t m=0;m<4;m++)\r | |
405 | {\r | |
406 | for(Int_t k=0;k<9;k++)\r | |
407 | {\r | |
408 | fReRPQ1dEBE[2][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.);\r | |
409 | fImRPQ1dEBE[2][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.);\r | |
410 | }\r | |
411 | } \r | |
412 | // s_{k}(eta) for RP&&POIs // to be improved (clarified)\r | |
413 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow:\r | |
414 | for(Int_t k=0;k<9;k++)\r | |
415 | {\r | |
416 | fs1dEBE[2][1][k]->Fill(dEta,pow(wPhi*wPt*wEta,k),1.);\r | |
417 | }\r | |
418 | \r | |
419 | /*\r | |
420 | // 2D (pt,eta) \r | |
421 | if(fCalculate2DFlow)\r | |
422 | {\r | |
423 | // (q_{m*m,k}(pt,eta)): \r | |
424 | for(Int_t m=0;m<4;m++)\r | |
425 | {\r | |
426 | for(Int_t k=0;k<9;k++)\r | |
427 | {\r | |
428 | fReRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.);\r | |
429 | fImRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.);\r | |
430 | }\r | |
431 | } \r | |
432 | // s_{k}(pt,eta) for RP&&POIs // to be improved (clarified)\r | |
433 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow:\r | |
434 | for(Int_t k=0;k<9;k++)\r | |
435 | {\r | |
436 | fs2dEBE[2][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k),1.);\r | |
437 | }\r | |
438 | } // end of if(fCalculate2DFlow) \r | |
439 | */\r | |
440 | \r | |
441 | } // end of if(aftsTrack->InPOISelection())\r | |
442 | \r | |
443 | \r | |
444 | \r | |
445 | } // end of if(pTrack->InRPSelection())\r | |
446 | \r | |
447 | \r | |
448 | \r | |
449 | if(aftsTrack->InPOISelection())\r | |
450 | {\r | |
451 | dPhi = aftsTrack->Phi();\r | |
452 | dPt = aftsTrack->Pt();\r | |
453 | dEta = aftsTrack->Eta();\r | |
454 | \r | |
455 | // 1D (pt)\r | |
456 | // p_n(m*n,0): \r | |
457 | for(Int_t m=0;m<4;m++)\r | |
458 | {\r | |
459 | fReRPQ1dEBE[1][0][m][0]->Fill(dPt,TMath::Cos((m+1.)*n*dPhi),1.);\r | |
460 | fImRPQ1dEBE[1][0][m][0]->Fill(dPt,TMath::Sin((m+1.)*n*dPhi),1.);\r | |
461 | }\r | |
462 | // 1D (eta)\r | |
463 | // p_n(m*n,0): \r | |
464 | for(Int_t m=0;m<4;m++)\r | |
465 | {\r | |
466 | fReRPQ1dEBE[1][1][m][0]->Fill(dEta,TMath::Cos((m+1.)*n*dPhi),1.);\r | |
467 | fImRPQ1dEBE[1][1][m][0]->Fill(dEta,TMath::Sin((m+1.)*n*dPhi),1.);\r | |
468 | }\r | |
469 | \r | |
470 | \r | |
471 | /*\r | |
472 | // 2D (pt,eta):\r | |
473 | if(fCalculate2DFlow)\r | |
474 | { \r | |
475 | // p_n(m*n,0): \r | |
476 | for(Int_t m=0;m<4;m++)\r | |
477 | {\r | |
478 | fReRPQ2dEBE[1][m][0]->Fill(dPt,dEta,TMath::Cos((m+1.)*n*dPhi),1.);\r | |
479 | fImRPQ2dEBE[1][m][0]->Fill(dPt,dEta,TMath::Sin((m+1.)*n*dPhi),1.);\r | |
480 | }\r | |
481 | } // end of if(fCalculate2DFlow) \r | |
482 | */\r | |
483 | \r | |
484 | \r | |
485 | } // end of if(pTrack->InPOISelection() ) \r | |
486 | \r | |
487 | \r | |
488 | } else // to if(aftsTrack)\r | |
489 | {\r | |
490 | cout<<endl;\r | |
491 | cout<<" WARNING: no particle! (i.e. aftsTrack is a NULL pointer in AFAWQC::Make().)"<<endl;\r | |
492 | cout<<endl; \r | |
493 | }\r | |
494 | } // end of for(Int_t i=0;i<nPrim;i++) \r | |
495 | \r | |
496 | // calculate the final expressions for S^{M}_{p,k}:\r | |
497 | for(Int_t p=0;p<8;p++)\r | |
498 | {\r | |
499 | for(Int_t k=0;k<9;k++)\r | |
500 | {\r | |
501 | (*fSMpk)(p,k)=pow((*fSMpk)(p,k),p+1);\r | |
502 | } \r | |
503 | } \r | |
504 | \r | |
505 | // *****************************\r | |
506 | // **** CALL THE METHODS *******\r | |
507 | // *****************************\r | |
508 | // integrated flow:\r | |
509 | if(!fEvaluateNestedLoopsForIntFlow)\r | |
510 | {\r | |
511 | // without weights:\r | |
512 | if(nRP>1) this->CalculateIntFlowCorrelations();\r | |
513 | if(nRP>3) this->CalculateIntFlowProductOfCorrelations();\r | |
514 | if(nRP>1) this->CalculateIntFlowSumOfEventWeights();\r | |
515 | if(nRP>1) this->CalculateIntFlowSumOfProductOfEventWeights();\r | |
516 | if(fApplyCorrectionForNUA)\r | |
517 | {\r | |
518 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUASinTerms();\r | |
519 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUACosTerms();\r | |
520 | }\r | |
521 | // with weights:\r | |
522 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)\r | |
523 | {\r | |
524 | //if(nRP>1) this->CalculateWeightedCorrelationsForIntegratedFlow();\r | |
525 | //if(nRP>3) this->CalculateWeightedQProductsForIntFlow();\r | |
526 | } \r | |
527 | }\r | |
528 | \r | |
529 | // differential flow:\r | |
530 | if(!fEvaluateNestedLoopsForDiffFlow)\r | |
531 | {\r | |
532 | // 1D differential flow (without usage of particle weights):\r | |
533 | if(nRP>1)\r | |
534 | {\r | |
535 | this->CalculateReducedCorrelations1D("RP","Pt");\r | |
536 | this->CalculateReducedCorrelations1D("RP","Eta");\r | |
537 | this->CalculateReducedCorrelations1D("POI","Pt");\r | |
538 | this->CalculateReducedCorrelations1D("POI","Eta");\r | |
539 | this->CalculateDiffFlowProductOfCorrelations("RP","Pt");\r | |
540 | this->CalculateDiffFlowProductOfCorrelations("RP","Eta");\r | |
541 | this->CalculateDiffFlowProductOfCorrelations("POI","Pt");\r | |
542 | this->CalculateDiffFlowProductOfCorrelations("POI","Eta");\r | |
543 | this->CalculateDiffFlowSumOfEventWeights("RP","Pt");\r | |
544 | this->CalculateDiffFlowSumOfEventWeights("RP","Eta");\r | |
545 | this->CalculateDiffFlowSumOfEventWeights("POI","Pt");\r | |
546 | this->CalculateDiffFlowSumOfEventWeights("POI","Eta");\r | |
547 | this->CalculateDiffFlowSumOfProductOfEventWeights("RP","Pt");\r | |
548 | this->CalculateDiffFlowSumOfProductOfEventWeights("RP","Eta");\r | |
549 | this->CalculateDiffFlowSumOfProductOfEventWeights("POI","Pt");\r | |
550 | this->CalculateDiffFlowSumOfProductOfEventWeights("POI","Eta");\r | |
551 | }\r | |
552 | \r | |
553 | // with weights:\r | |
554 | // ... \r | |
555 | // 1D differential flow (eta) \r | |
556 | if(nRP>1)\r | |
557 | {\r | |
558 | /*\r | |
559 | this->CalculateReducedCorrelations1D("RP","Eta");\r | |
560 | this->CalculateReducedCorrelations1D("POI","Eta");\r | |
561 | this->CalculateQProductsForDiffFlow("RP","Eta");\r | |
562 | this->CalculateQProductsForDiffFlow("POI","Eta");\r | |
563 | this->CalculateSumOfEventWeightsForDiffFlow("RP","Eta");\r | |
564 | this->CalculateProductOfEventWeightsForDiffFlow("RP","Eta");\r | |
565 | this->CalculateSumOfEventWeightsForDiffFlow("POI","Eta");\r | |
566 | this->CalculateProductOfEventWeightsForDiffFlow("POI","Eta");\r | |
567 | */\r | |
568 | }\r | |
569 | \r | |
570 | /*\r | |
571 | // 2D differential flow\r | |
572 | if(fCalculate2DFlow)\r | |
573 | {\r | |
574 | // without weights:\r | |
575 | if(nRP>1) this->CalculateCorrelationsForDifferentialFlow2D("RP");\r | |
576 | if(nRP>1) this->CalculateCorrelationsForDifferentialFlow2D("POI");\r | |
577 | \r | |
578 | // with weights:\r | |
579 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)\r | |
580 | {\r | |
581 | if(nRP>1) this->CalculateWeightedCorrelationsForDifferentialFlow2D("RP");\r | |
582 | if(nRP>1) this->CalculateWeightedCorrelationsForDifferentialFlow2D("POI");\r | |
583 | } \r | |
584 | } // end of if(fCalculate2DFlow)\r | |
585 | */\r | |
586 | \r | |
587 | }\r | |
588 | \r | |
589 | // **************************************************************\r | |
590 | // **** DEBUGGING AND CROSS-CHECKING (EVALUATE NESTED LOOPS) ****\r | |
591 | // **************************************************************\r | |
592 | \r | |
593 | if(fEvaluateNestedLoopsForIntFlow)\r | |
594 | {\r | |
595 | if(nPrim>0 && nPrim<15) // only for these multiplicities it is feasible to evaluate 8 nested loops in short time \r | |
596 | {\r | |
597 | // without weights:\r | |
598 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights))\r | |
599 | {\r | |
600 | this->CalculateIntFlowCorrelations();\r | |
601 | this->CalculateIntFlowCorrectionsForNUASinTerms();\r | |
602 | this->CalculateIntFlowCorrectionsForNUACosTerms();\r | |
603 | }\r | |
604 | // with weights:\r | |
605 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)\r | |
606 | {\r | |
607 | this->CalculateWeightedCorrelationsForIntegratedFlow();\r | |
608 | }\r | |
609 | \r | |
610 | this->EvaluateNestedLoopsForIntegratedFlow(anEvent); \r | |
611 | }\r | |
612 | } \r | |
613 | \r | |
614 | if(fEvaluateNestedLoopsForDiffFlow)\r | |
615 | {\r | |
616 | if(nPrim>0 && nPrim<15) // only for these multiplicities it is feasible to evaluate 8 nested loops in short time \r | |
617 | {\r | |
618 | // without weights:\r | |
619 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights))\r | |
620 | {\r | |
621 | this->CalculateCorrelationsForDifferentialFlow2D("RP");\r | |
622 | this->CalculateCorrelationsForDifferentialFlow2D("POI");\r | |
623 | }\r | |
624 | // with weights:\r | |
625 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)\r | |
626 | {\r | |
627 | this->CalculateWeightedCorrelationsForDifferentialFlow2D("RP");\r | |
628 | this->CalculateWeightedCorrelationsForDifferentialFlow2D("POI");\r | |
629 | }\r | |
630 | \r | |
631 | this->EvaluateNestedLoopsForDifferentialFlow(anEvent); \r | |
632 | }\r | |
633 | } \r | |
634 | \r | |
635 | // ********************************\r | |
636 | // **** RESET E-B-E QUANTITIES ****\r | |
637 | // ********************************\r | |
638 | \r | |
639 | // integrated flow:\r | |
640 | fReQ->Zero();\r | |
641 | fImQ->Zero();\r | |
642 | fSMpk->Zero();\r | |
643 | fIntFlowCorrelationsEBE->Reset();\r | |
644 | fIntFlowCorrelationsAllEBE->Reset();\r | |
645 | \r | |
646 | if(fApplyCorrectionForNUA) \r | |
647 | {\r | |
648 | for(Int_t sc=0;sc<2;sc++)\r | |
649 | {\r | |
650 | fIntFlowCorrectionTermsForNUAEBE[sc]->Reset();\r | |
651 | } \r | |
652 | }\r | |
653 | \r | |
654 | // differential flow:\r | |
655 | // 1D:\r | |
656 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP)\r | |
657 | {\r | |
658 | for(Int_t pe=0;pe<2;pe++) // 1D in pt or eta\r | |
659 | {\r | |
660 | for(Int_t m=0;m<4;m++) // multiple of harmonic\r | |
661 | {\r | |
662 | for(Int_t k=0;k<9;k++) // power of weight\r | |
663 | {\r | |
664 | if(fReRPQ1dEBE[t][pe][m][k]) fReRPQ1dEBE[t][pe][m][k]->Reset();\r | |
665 | if(fImRPQ1dEBE[t][pe][m][k]) fImRPQ1dEBE[t][pe][m][k]->Reset();\r | |
666 | } \r | |
667 | }\r | |
668 | }\r | |
669 | }\r | |
670 | \r | |
671 | for(Int_t t=0;t<3;t++) // type (0 = RP, 1 = POI, 2 = RP&&POI )\r | |
672 | { \r | |
673 | for(Int_t pe=0;pe<2;pe++) // 1D in pt or eta\r | |
674 | {\r | |
675 | for(Int_t k=0;k<9;k++)\r | |
676 | {\r | |
677 | if(fs1dEBE[t][pe][k]) fs1dEBE[t][pe][k]->Reset();\r | |
678 | }\r | |
679 | }\r | |
680 | }\r | |
681 | \r | |
682 | // e-b-e reduced correlations:\r | |
683 | for(Int_t t=0;t<2;t++) // type (0 = RP, 1 = POI)\r | |
684 | { \r | |
685 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
686 | {\r | |
687 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index\r | |
688 | {\r | |
689 | if(fDiffFlowCorrelationsEBE[t][pe][rci]) fDiffFlowCorrelationsEBE[t][pe][rci]->Reset();\r | |
690 | }\r | |
691 | }\r | |
692 | }\r | |
693 | \r | |
694 | // 2D (pt,eta)\r | |
695 | if(fCalculate2DFlow)\r | |
696 | {\r | |
697 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP)\r | |
698 | {\r | |
699 | for(Int_t m=0;m<4;m++) // multiple of harmonic\r | |
700 | {\r | |
701 | for(Int_t k=0;k<9;k++) // power of weight\r | |
702 | {\r | |
703 | if(fReRPQ2dEBE[t][m][k]) fReRPQ2dEBE[t][m][k]->Reset();\r | |
704 | if(fImRPQ2dEBE[t][m][k]) fImRPQ2dEBE[t][m][k]->Reset();\r | |
705 | } \r | |
706 | }\r | |
707 | }\r | |
708 | for(Int_t t=0;t<3;t++) // type (0 = RP, 1 = POI, 2 = RP&&POI )\r | |
709 | { \r | |
710 | for(Int_t k=0;k<9;k++)\r | |
711 | {\r | |
712 | if(fs2dEBE[t][k]) fs2dEBE[t][k]->Reset();\r | |
713 | }\r | |
714 | } \r | |
715 | } // end of if(fCalculate2DFlow) \r | |
716 | \r | |
717 | } // end of AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent)\r | |
718 | \r | |
719 | \r | |
720 | //================================================================================================================================\r | |
721 | \r | |
722 | \r | |
723 | void AliFlowAnalysisWithQCumulants::Finish()\r | |
724 | {\r | |
725 | // Calculate the final results.\r | |
726 | // a) acces the constants;\r | |
727 | // b) access the flags;\r | |
728 | // c) calculate the final results for integrated flow (without and with weights);\r | |
729 | // d) store in AliFlowCommonHistResults and print the final results for integrated flow;\r | |
730 | // e) calculate the final results for differential flow (without and with weights);\r | |
731 | // f) print the final results for integrated flow obtained from differential flow (to be improved (terminology));\r | |
732 | // g) COMPARE RESULTS FROM NESTED LOOPS vs RESULTS FROM Q-VECTORS FOR INTEGRATED FLOW\r | |
733 | \r | |
734 | // ******************************\r | |
735 | // **** ACCESS THE CONSTANTS ****\r | |
736 | // ******************************\r | |
737 | \r | |
738 | this->AccessConstants(); \r | |
afa4af05 | 739 | |
740 | if(fCommonHists && fCommonHists->GetHarmonic())\r | |
741 | { | |
742 | fHarmonic = (Int_t)(fCommonHists->GetHarmonic())->GetBinContent(1); // to be improved (moved somewhere else) | |
743 | } | |
744 | \r | |
e2168f8f | 745 | // **************************\r |
746 | // **** ACCESS THE FLAGS ****\r | |
747 | // ************************** \r | |
748 | fUsePhiWeights = (Int_t)fUseParticleWeights->GetBinContent(1); \r | |
749 | fUsePtWeights = (Int_t)fUseParticleWeights->GetBinContent(2); \r | |
750 | fUseEtaWeights = (Int_t)fUseParticleWeights->GetBinContent(3); \r | |
751 | fApplyCorrectionForNUA = (Int_t)fIntFlowFlags->GetBinContent(3); \r | |
752 | fEvaluateNestedLoopsForIntFlow = (Int_t)fEvaluateNestedLoops->GetBinContent(1);\r | |
753 | fEvaluateNestedLoopsForDiffFlow = (Int_t)fEvaluateNestedLoops->GetBinContent(2); \r | |
754 | \r | |
755 | // *********************************************************\r | |
756 | // **** CALCULATE THE FINAL RESULTS FOR INTEGRATED FLOW ****\r | |
757 | // ********************************************************* \r | |
758 | \r | |
759 | // without weights:\r | |
760 | this->FinalizeCorrelationsIntFlow();\r | |
761 | this->CalculateCovariancesIntFlow();\r | |
762 | this->CalculateCumulantsIntFlow();\r | |
763 | this->CalculateIntFlow(); \r | |
764 | \r | |
765 | if(fApplyCorrectionForNUA) // to be improved (reorganized)\r | |
766 | {\r | |
767 | this->FinalizeCorrectionTermsForNUAIntFlow();\r | |
768 | this->CalculateQcumulantsCorrectedForNUAIntFlow(); \r | |
769 | this->CalculateIntFlowCorrectedForNUA(); \r | |
770 | }\r | |
771 | \r | |
772 | //this->ApplyCorrectionForNonUniformAcceptanceToCumulantsForIntFlow(kFALSE,"exact");\r | |
773 | \r | |
774 | // with weights:\r | |
775 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)\r | |
776 | {\r | |
777 | //this->FinalizeCorrelationsIntFlow(); \r | |
778 | // this->CalculateCorrectionsForNUAForIntQcumulants(kTRUE,"exact");\r | |
779 | //this->CalculateCovariancesIntFlow(kTRUE,"exact");\r | |
780 | //this->CalculateCumulantsIntFlow();\r | |
781 | // this->ApplyCorrectionForNonUniformAcceptanceToCumulantsForIntFlow(kTRUE,"exact");\r | |
782 | //this->CalculateIntFlow(); \r | |
783 | // this->CalculateIntFlow(kTRUE,"exact",kTRUE); // weighted and corrected for non-uniform acceptance\r | |
784 | }\r | |
785 | \r | |
786 | // ***************************************************************\r | |
787 | // **** STORE AND PRINT THE FINAL RESULTS FOR INTEGRATED FLOW ****\r | |
788 | // ***************************************************************\r | |
789 | \r | |
790 | this->FillCommonHistResultsIntFlow(); \r | |
791 | \r | |
792 | this->PrintFinalResultsForIntegratedFlow("NONAME"); // to be improved (name)\r | |
793 | \r | |
794 | // ***********************************************************\r | |
795 | // **** CALCULATE THE FINAL RESULTS FOR DIFFERENTIAL FLOW ****\r | |
796 | // *********************************************************** \r | |
797 | \r | |
798 | // without weights:\r | |
799 | this->FinalizeReducedCorrelations("RP","Pt"); \r | |
800 | this->FinalizeReducedCorrelations("RP","Eta"); \r | |
801 | this->FinalizeReducedCorrelations("POI","Pt"); \r | |
802 | this->FinalizeReducedCorrelations("POI","Eta"); \r | |
803 | this->CalculateDiffFlowCovariances("RP","Pt");\r | |
804 | this->CalculateDiffFlowCovariances("RP","Eta");\r | |
805 | this->CalculateDiffFlowCovariances("POI","Pt");\r | |
806 | this->CalculateDiffFlowCovariances("POI","Eta");\r | |
807 | this->CalculateDiffFlowCumulants("RP","Pt");\r | |
808 | this->CalculateDiffFlowCumulants("RP","Eta");\r | |
809 | this->CalculateDiffFlowCumulants("POI","Pt");\r | |
810 | this->CalculateDiffFlowCumulants("POI","Eta");\r | |
811 | this->CalculateDiffFlow("RP","Pt");\r | |
812 | this->CalculateDiffFlow("RP","Eta");\r | |
813 | this->CalculateDiffFlow("POI","Pt");\r | |
814 | this->CalculateDiffFlow("POI","Eta");\r | |
815 | this->CalculateFinalResultsForRPandPOIIntegratedFlow("RP");\r | |
816 | this->CalculateFinalResultsForRPandPOIIntegratedFlow("POI");\r | |
817 | //this->FinalizeCorrelationsForDiffFlow("RP",kFALSE,"exact");\r | |
818 | //this->FinalizeCorrelationsForDiffFlow("POI",kFALSE,"exact");\r | |
819 | \r | |
820 | // with weights:\r | |
821 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)\r | |
822 | {\r | |
823 | //this->FinalizeCorrelationsForDiffFlow("RP",kTRUE,"exact");\r | |
824 | //this->FinalizeCorrelationsForDiffFlow("POI",kTRUE,"exact");\r | |
825 | //this->CalculateDiffFlowCumulants("RP",kTRUE,"exact");\r | |
826 | //this->CalculateDiffFlowCumulants("POI",kTRUE,"exact");\r | |
827 | //this->CalculateDiffFlow("RP",kTRUE,"exact");\r | |
828 | //this->CalculateDiffFlow("POI",kTRUE,"exact");\r | |
829 | //this->CalculateFinalResultsForRPandPOIIntegratedFlow("RP",kTRUE,"exact");\r | |
830 | //this->CalculateFinalResultsForRPandPOIIntegratedFlow("POI",kTRUE,"exact");\r | |
831 | }\r | |
832 | \r | |
833 | \r | |
834 | //this->CalculateFinalCorrectionsForNonUniformAcceptanceForDifferentialFlow(kFALSE,"POI"); // to be improved (to calculate also when weights are used) \r | |
835 | //this->CalculateFinalCorrectionsForNonUniformAcceptanceForDifferentialFlow(kFALSE,"RP"); // to be improved (to calculate also when weights are used)\r | |
836 | \r | |
837 | \r | |
838 | // *****************************************************************\r | |
839 | // **** STORE AND PRINT THE FINAL RESULTS FOR DIFFERENTIAL FLOW ****\r | |
840 | // *****************************************************************\r | |
841 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)\r | |
842 | {\r | |
843 | //this->FillCommonHistResultsDiffFlow("RP",kTRUE,"exact",kFALSE);\r | |
844 | //this->FillCommonHistResultsDiffFlow("POI",kTRUE,"exact",kFALSE);\r | |
845 | } else\r | |
846 | {\r | |
847 | this->FillCommonHistResultsDiffFlow("RP");\r | |
848 | this->FillCommonHistResultsDiffFlow("POI");\r | |
849 | }\r | |
850 | \r | |
851 | this->PrintFinalResultsForIntegratedFlow("RP"); \r | |
852 | this->PrintFinalResultsForIntegratedFlow("POI"); \r | |
853 | \r | |
854 | // *****************************************************************************************\r | |
855 | // **** COMPARE RESULTS FROM NESTED LOOPS vs RESULTS FROM Q-VECTORS FOR INTEGRATED FLOW ****\r | |
856 | // ***************************************************************************************** \r | |
857 | \r | |
858 | if(fEvaluateNestedLoopsForIntFlow) \r | |
859 | {\r | |
860 | this->CompareResultsFromNestedLoopsAndFromQVectorsForIntFlow(fUsePhiWeights||fUsePtWeights||fUseEtaWeights);\r | |
861 | } \r | |
862 | \r | |
863 | if(fEvaluateNestedLoopsForDiffFlow) \r | |
864 | {\r | |
865 | this->CompareResultsFromNestedLoopsAndFromQVectorsForDiffFlow(fUsePhiWeights||fUsePtWeights||fUseEtaWeights);\r | |
866 | } \r | |
867 | \r | |
868 | } // end of AliFlowAnalysisWithQCumulants::Finish()\r | |
869 | \r | |
870 | \r | |
871 | //================================================================================================================================\r | |
872 | \r | |
873 | \r | |
874 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTerms()\r | |
875 | {\r | |
876 | // calculate corrections for non-uniform acceptance of the detector for no-name integrated flow (cos terms)\r | |
877 | \r | |
878 | // multiplicity:\r | |
879 | Double_t dMult = (*fSMpk)(0,0);\r | |
880 | \r | |
881 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: \r | |
882 | Double_t dReQ1n = (*fReQ)(0,0);\r | |
883 | Double_t dReQ2n = (*fReQ)(1,0);\r | |
884 | //Double_t dReQ3n = (*fReQ)(2,0);\r | |
885 | //Double_t dReQ4n = (*fReQ)(3,0);\r | |
886 | Double_t dImQ1n = (*fImQ)(0,0);\r | |
887 | Double_t dImQ2n = (*fImQ)(1,0);\r | |
888 | //Double_t dImQ3n = (*fImQ)(2,0);\r | |
889 | //Double_t dImQ4n = (*fImQ)(3,0);\r | |
890 | \r | |
891 | // *************************************************************\r | |
892 | // **** corrections for non-uniform acceptance (cos terms): ****\r | |
893 | // *************************************************************\r | |
894 | //\r | |
895 | // Remark 1: corrections for non-uniform acceptance (cos terms) calculated with non-weighted Q-vectors \r | |
896 | // are stored in 1D profile fQCorrectionsCos.\r | |
897 | // Remark 2: binning of fQCorrectionsCos is organized as follows:\r | |
898 | // --------------------------------------------------------------------------------------------------------------------\r | |
899 | // 1st bin: <<cos(n*(phi1))>> = cosP1n\r | |
900 | // 2nd bin: <<cos(n*(phi1+phi2))>> = cosP1nP1n\r | |
901 | // 3rd bin: <<cos(n*(phi1-phi2-phi3))>> = cosP1nM1nM1n\r | |
902 | // ...\r | |
903 | // --------------------------------------------------------------------------------------------------------------------\r | |
904 | \r | |
905 | // 1-particle:\r | |
906 | Double_t cosP1n = 0.; // <<cos(n*(phi1))>>\r | |
907 | \r | |
908 | if(dMult>0)\r | |
909 | {\r | |
910 | cosP1n = dReQ1n/dMult; \r | |
911 | \r | |
912 | // average non-weighted 1-particle correction (cos terms) for non-uniform acceptance for single event:\r | |
913 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(1,cosP1n);\r | |
914 | \r | |
915 | // final average non-weighted 1-particle correction (cos terms) for non-uniform acceptance for all events:\r | |
916 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(0.5,cosP1n,dMult); \r | |
917 | } \r | |
918 | \r | |
919 | // 2-particle:\r | |
920 | Double_t cosP1nP1n = 0.; // <<cos(n*(phi1+phi2))>>\r | |
921 | \r | |
922 | if(dMult>1)\r | |
923 | {\r | |
924 | cosP1nP1n = (pow(dReQ1n,2)-pow(dImQ1n,2)-dReQ2n)/(dMult*(dMult-1)); \r | |
925 | \r | |
926 | // average non-weighted 2-particle correction (cos terms) for non-uniform acceptance for single event:\r | |
927 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(2,cosP1nP1n);\r | |
928 | \r | |
929 | // final average non-weighted 2-particle correction (cos terms) for non-uniform acceptance for all events:\r | |
930 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(1.5,cosP1nP1n,dMult*(dMult-1)); \r | |
931 | } \r | |
932 | \r | |
933 | // 3-particle:\r | |
934 | Double_t cosP1nM1nM1n = 0.; // <<cos(n*(phi1-phi2-phi3))>>\r | |
935 | \r | |
936 | if(dMult>2)\r | |
937 | {\r | |
938 | cosP1nM1nM1n = (dReQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))-dReQ1n*dReQ2n-dImQ1n*dImQ2n-2.*(dMult-1)*dReQ1n)\r | |
939 | / (dMult*(dMult-1)*(dMult-2)); \r | |
940 | \r | |
941 | // average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for single event:\r | |
942 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(3,cosP1nM1nM1n);\r | |
943 | \r | |
944 | // final average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for all events:\r | |
945 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(2.5,cosP1nM1nM1n,dMult*(dMult-1)*(dMult-2)); \r | |
946 | } \r | |
947 | \r | |
948 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTerms()\r | |
949 | \r | |
950 | \r | |
951 | //================================================================================================================================\r | |
952 | \r | |
953 | \r | |
954 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTerms()\r | |
955 | {\r | |
956 | // calculate corrections for non-uniform acceptance of the detector for no-name integrated flow (sin terms)\r | |
957 | \r | |
958 | // multiplicity:\r | |
959 | Double_t dMult = (*fSMpk)(0,0);\r | |
960 | \r | |
961 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: \r | |
962 | Double_t dReQ1n = (*fReQ)(0,0);\r | |
963 | Double_t dReQ2n = (*fReQ)(1,0);\r | |
964 | //Double_t dReQ3n = (*fReQ)(2,0);\r | |
965 | //Double_t dReQ4n = (*fReQ)(3,0);\r | |
966 | Double_t dImQ1n = (*fImQ)(0,0);\r | |
967 | Double_t dImQ2n = (*fImQ)(1,0);\r | |
968 | //Double_t dImQ3n = (*fImQ)(2,0);\r | |
969 | //Double_t dImQ4n = (*fImQ)(3,0);\r | |
970 | \r | |
971 | // *************************************************************\r | |
972 | // **** corrections for non-uniform acceptance (sin terms): ****\r | |
973 | // *************************************************************\r | |
974 | //\r | |
975 | // Remark 1: corrections for non-uniform acceptance (sin terms) calculated with non-weighted Q-vectors \r | |
976 | // are stored in 1D profile fQCorrectionsSin.\r | |
977 | // Remark 2: binning of fQCorrectionsSin is organized as follows:\r | |
978 | // --------------------------------------------------------------------------------------------------------------------\r | |
979 | // 1st bin: <<sin(n*(phi1))>> = sinP1n\r | |
980 | // 2nd bin: <<sin(n*(phi1+phi2))>> = sinP1nP1n\r | |
981 | // 3rd bin: <<sin(n*(phi1-phi2-phi3))>> = sinP1nM1nM1n\r | |
982 | // ...\r | |
983 | // --------------------------------------------------------------------------------------------------------------------\r | |
984 | \r | |
985 | // 1-particle:\r | |
986 | Double_t sinP1n = 0.; // <sin(n*(phi1))>\r | |
987 | \r | |
988 | if(dMult>0)\r | |
989 | {\r | |
990 | sinP1n = dImQ1n/dMult; \r | |
991 | \r | |
992 | // average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for single event:\r | |
993 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(1,sinP1n);\r | |
994 | \r | |
995 | // final average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: \r | |
996 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(0.5,sinP1n,dMult); \r | |
997 | } \r | |
998 | \r | |
999 | // 2-particle:\r | |
1000 | Double_t sinP1nP1n = 0.; // <<sin(n*(phi1+phi2))>>\r | |
1001 | \r | |
1002 | if(dMult>1)\r | |
1003 | {\r | |
1004 | sinP1nP1n = (2.*dReQ1n*dImQ1n-dImQ2n)/(dMult*(dMult-1)); \r | |
1005 | \r | |
1006 | // average non-weighted 2-particle correction (sin terms) for non-uniform acceptance for single event:\r | |
1007 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(2,sinP1nP1n);\r | |
1008 | \r | |
1009 | // final average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: \r | |
1010 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(1.5,sinP1nP1n,dMult*(dMult-1)); \r | |
1011 | } \r | |
1012 | \r | |
1013 | // 3-particle:\r | |
1014 | Double_t sinP1nM1nM1n = 0.; // <<sin(n*(phi1-phi2-phi3))>>\r | |
1015 | \r | |
1016 | if(dMult>2)\r | |
1017 | {\r | |
1018 | sinP1nM1nM1n = (-dImQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))+dReQ1n*dImQ2n-dImQ1n*dReQ2n+2.*(dMult-1)*dImQ1n)\r | |
1019 | / (dMult*(dMult-1)*(dMult-2)); \r | |
1020 | \r | |
1021 | // average non-weighted 3-particle correction (sin terms) for non-uniform acceptance for single event:\r | |
1022 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(3,sinP1nM1nM1n);\r | |
1023 | \r | |
1024 | // final average non-weighted 3-particle correction (sin terms) for non-uniform acceptance for all events: \r | |
1025 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(2.5,sinP1nM1nM1n,dMult*(dMult-1)*(dMult-2)); \r | |
1026 | } \r | |
1027 | \r | |
1028 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTerms()\r | |
1029 | \r | |
1030 | \r | |
1031 | //================================================================================================================================\r | |
1032 | \r | |
1033 | \r | |
1034 | void AliFlowAnalysisWithQCumulants::CalculateCorrectionsForNonUniformAcceptanceForDifferentialFlowCosTerms(TString type)\r | |
1035 | {\r | |
1036 | // calculate corrections for non-uniform acceptance of the detector for differential flow (cos terms)\r | |
1037 | \r | |
1038 | // multiplicity:\r | |
1039 | //Double_t dMult = (*fSMpk)(0,0);\r | |
1040 | \r | |
1041 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: \r | |
1042 | //Double_t dReQ1n = (*fReQ)(0,0);\r | |
1043 | //Double_t dReQ2n = (*fReQ)(1,0);\r | |
1044 | //Double_t dReQ3n = (*fReQ)(2,0);\r | |
1045 | //Double_t dReQ4n = (*fReQ)(3,0);\r | |
1046 | //Double_t dImQ1n = (*fImQ)(0,0);\r | |
1047 | //Double_t dImQ2n = (*fImQ)(1,0);\r | |
1048 | //Double_t dImQ3n = (*fImQ)(2,0);\r | |
1049 | //Double_t dImQ4n = (*fImQ)(3,0);\r | |
1050 | \r | |
1051 | // looping over all (pt,eta) bins and calculating correlations needed for differential flow: \r | |
1052 | for(Int_t p=1;p<=fnBinsPt;p++)\r | |
1053 | {\r | |
1054 | for(Int_t e=1;e<=fnBinsEta;e++)\r | |
1055 | {\r | |
1056 | // real and imaginary parts of q_n (non-weighted Q-vector evaluated only for POIs in harmonic n for each (pt,eta) bin): \r | |
1057 | //Double_t dReqnPtEta = 0.;\r | |
1058 | //Double_t dImqnPtEta = 0.;\r | |
1059 | \r | |
1060 | // number of POIs in each (pt,eta) bin:\r | |
1061 | Double_t dmPtEta = 0.;\r | |
1062 | \r | |
1063 | // real and imaginary parts of q''_{n}, q''_{2n}, ... \r | |
1064 | // (non-weighted Q-vectors evaluated only for particles which are both RPs and POIs in harmonic n, 2n, ... for each (pt,eta) bin): \r | |
1065 | //Double_t dReqPrimePrime1nPtEta = 0.;\r | |
1066 | //Double_t dImqPrimePrime1nPtEta = 0.;\r | |
1067 | //Double_t dReqPrimePrime2nPtEta = 0.;\r | |
1068 | //Double_t dImqPrimePrime2nPtEta = 0.;\r | |
1069 | \r | |
1070 | // number of particles which are both RPs and POIs in each (pt,eta) bin:\r | |
1071 | //Double_t dmPrimePrimePtEta = 0.;\r | |
1072 | \r | |
1073 | if(type == "POI")\r | |
1074 | {\r | |
1075 | // q''_{n}, q''_{2n}:\r | |
1076 | //...............................................................................................\r | |
1077 | //dReqPrimePrime1nPtEta = fReqPrimePrime1nPtEta->GetBinContent(fReqPrimePrime1nPtEta->GetBin(p,e));\r | |
1078 | //dImqPrimePrime1nPtEta = fImqPrimePrime1nPtEta->GetBinContent(fImqPrimePrime1nPtEta->GetBin(p,e));\r | |
1079 | //dReqPrimePrime2nPtEta = fReqPrimePrime2nPtEta->GetBinContent(fReqPrimePrime2nPtEta->GetBin(p,e));\r | |
1080 | //dImqPrimePrime2nPtEta = fImqPrimePrime2nPtEta->GetBinContent(fImqPrimePrime2nPtEta->GetBin(p,e));\r | |
1081 | //...............................................................................................\r | |
1082 | \r | |
1083 | // m'':\r | |
1084 | //dmPrimePrimePtEta = fmPrimePrimePtEta->GetBinContent(fmPrimePrimePtEta->GetBin(p,e));\r | |
1085 | \r | |
1086 | // q'_{n}: \r | |
1087 | //dReqnPtEta = fReqnPtEta->GetBinContent(fReqnPtEta->GetBin(p,e));\r | |
1088 | //dImqnPtEta = fImqnPtEta->GetBinContent(fImqnPtEta->GetBin(p,e));\r | |
1089 | //dmPtEta = fmPtEta->GetBinContent(fmPtEta->GetBin(p,e));\r | |
1090 | }\r | |
1091 | else if(type == "RP")\r | |
1092 | {\r | |
1093 | // q_RP{n}, q_RP{2n}:\r | |
1094 | //...............................................................................................\r | |
1095 | //dReqPrimePrime1nPtEta = fReqRP1nPtEta->GetBinContent(fReqRP1nPtEta->GetBin(p,e));\r | |
1096 | //dImqPrimePrime1nPtEta = fImqRP1nPtEta->GetBinContent(fImqRP1nPtEta->GetBin(p,e));\r | |
1097 | //dReqPrimePrime2nPtEta = fReqRP2nPtEta->GetBinContent(fReqRP2nPtEta->GetBin(p,e));\r | |
1098 | //dImqPrimePrime2nPtEta = fImqRP2nPtEta->GetBinContent(fImqRP2nPtEta->GetBin(p,e));\r | |
1099 | //...............................................................................................\r | |
1100 | \r | |
1101 | // m'':\r | |
1102 | //dmPrimePrimePtEta = fmRPPtEta->GetBinContent(fmRPPtEta->GetBin(p,e));\r | |
1103 | \r | |
1104 | //dReqnPtEta = fReqRP1nPtEta->GetBinContent(fReqRP1nPtEta->GetBin(p,e)); // not a bug ;-)\r | |
1105 | //dImqnPtEta = fImqRP1nPtEta->GetBinContent(fImqRP1nPtEta->GetBin(p,e)); // not a bug ;-)\r | |
1106 | //dmPtEta = fmRPPtEta->GetBinContent(fmRPPtEta->GetBin(p,e)); // not a bug ;-) \r | |
1107 | }\r | |
1108 | \r | |
1109 | // 1'-p correction:\r | |
1110 | //Double_t oneCosP1nPsiPtEta = 0.;\r | |
1111 | \r | |
1112 | if(dmPtEta)\r | |
1113 | {\r | |
1114 | //oneCosP1nPsiPtEta = dReqnPtEta/dmPtEta;\r | |
1115 | \r | |
1116 | // fill the 2D profile to get the average 1'-p correction for each (pt, eta) bin:\r | |
1117 | if(type == "POI")\r | |
1118 | { \r | |
1119 | //fCorrectionsCosP1nPsiPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,\r | |
1120 | // oneCosP1nPsiPtEta,dmPtEta);\r | |
1121 | }\r | |
1122 | else if(type == "RP")\r | |
1123 | {\r | |
1124 | //fCorrectionsCosP1nPsiPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,\r | |
1125 | // oneCosP1nPsiPtEta,dmPtEta);\r | |
1126 | }\r | |
1127 | } // end of if(dmPtEta*dMult-dmPrimePrimePtEta)\r | |
1128 | \r | |
1129 | /*\r | |
1130 | \r | |
1131 | // 4'-particle correlation:\r | |
1132 | Double_t four1n1n1n1nPtEta = 0.;\r | |
1133 | if((dmPtEta-dmPrimePrimePtEta)*dMult*(dMult-1.)*(dMult-2.)\r | |
1134 | + dmPrimePrimePtEta*(dMult-1.)*(dMult-2.)*(dMult-3.)) // to be improved (introduce a new variable for this expression)\r | |
1135 | {\r | |
1136 | four1n1n1n1nPtEta = ((pow(dReQ1n,2.)+pow(dImQ1n,2.))*(dReqnPtEta*dReQ1n+dImqnPtEta*dImQ1n)\r | |
1137 | - dReqPrimePrime2nPtEta*(pow(dReQ1n,2.)-pow(dImQ1n,2.))\r | |
1138 | - 2.*dImqPrimePrime2nPtEta*dReQ1n*dImQ1n\r | |
1139 | - dReqnPtEta*(dReQ1n*dReQ2n+dImQ1n*dImQ2n)\r | |
1140 | + dImqnPtEta*(dImQ1n*dReQ2n-dReQ1n*dImQ2n)\r | |
1141 | - 2.*dMult*(dReqnPtEta*dReQ1n+dImqnPtEta*dImQ1n)\r | |
1142 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*dmPrimePrimePtEta \r | |
1143 | + 6.*(dReqPrimePrime1nPtEta*dReQ1n+dImqPrimePrime1nPtEta*dImQ1n) \r | |
1144 | + 1.*(dReqPrimePrime2nPtEta*dReQ2n+dImqPrimePrime2nPtEta*dImQ2n) \r | |
1145 | + 2.*(dReqnPtEta*dReQ1n+dImqnPtEta*dImQ1n) \r | |
1146 | + 2.*dmPrimePrimePtEta*dMult \r | |
1147 | - 6.*dmPrimePrimePtEta) \r | |
1148 | / ((dmPtEta-dmPrimePrimePtEta)*dMult*(dMult-1.)*(dMult-2.)\r | |
1149 | + dmPrimePrimePtEta*(dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
1150 | \r | |
1151 | // fill the 2D profile to get the average correlation for each (pt, eta) bin:\r | |
1152 | if(type == "POI")\r | |
1153 | {\r | |
1154 | f4pPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta,\r | |
1155 | (dmPtEta-dmPrimePrimePtEta)*dMult*(dMult-1.)*(dMult-2.)\r | |
1156 | + dmPrimePrimePtEta*(dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
1157 | }\r | |
1158 | else if(type == "RP")\r | |
1159 | {\r | |
1160 | f4pPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta,\r | |
1161 | (dmPtEta-dmPrimePrimePtEta)*dMult*(dMult-1.)*(dMult-2.)\r | |
1162 | + dmPrimePrimePtEta*(dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
1163 | }\r | |
1164 | } // end of if((dmPtEta-dmPrimePrimePtEta)*dMult*(dMult-1.)*(dMult-2.)\r | |
1165 | // +dmPrimePrimePtEta*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
1166 | \r | |
1167 | */\r | |
1168 | \r | |
1169 | } // end of for(Int_t e=1;e<=fnBinsEta;e++)\r | |
1170 | } // end of for(Int_t p=1;p<=fnBinsPt;p++)\r | |
1171 | \r | |
1172 | } // end of AliFlowAnalysisWithQCumulants::CalculateCorrectionsForNonUniformAcceptanceForDifferentialFlowCosTerms(TString type)\r | |
1173 | \r | |
1174 | \r | |
1175 | //================================================================================================================================\r | |
1176 | \r | |
1177 | \r | |
1178 | void AliFlowAnalysisWithQCumulants::CalculateCorrectionsForNonUniformAcceptanceForDifferentialFlowSinTerms(TString type)\r | |
1179 | {\r | |
1180 | // calculate corrections for non-uniform acceptance of the detector for differential flow (sin terms)\r | |
1181 | \r | |
1182 | // multiplicity:\r | |
1183 | //Double_t dMult = (*fSMpk)(0,0);\r | |
1184 | \r | |
1185 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: \r | |
1186 | //Double_t dReQ1n = (*fReQ)(0,0);\r | |
1187 | //Double_t dReQ2n = (*fReQ)(1,0);\r | |
1188 | //Double_t dReQ3n = (*fReQ)(2,0);\r | |
1189 | //Double_t dReQ4n = (*fReQ)(3,0);\r | |
1190 | //Double_t dImQ1n = (*fImQ)(0,0);\r | |
1191 | //Double_t dImQ2n = (*fImQ)(1,0);\r | |
1192 | //Double_t dImQ3n = (*fImQ)(2,0);\r | |
1193 | //Double_t dImQ4n = (*fImQ)(3,0);\r | |
1194 | \r | |
1195 | // looping over all (pt,eta) bins and calculating correlations needed for differential flow: \r | |
1196 | for(Int_t p=1;p<=fnBinsPt;p++)\r | |
1197 | {\r | |
1198 | for(Int_t e=1;e<=fnBinsEta;e++)\r | |
1199 | {\r | |
1200 | // real and imaginary parts of q_n (non-weighted Q-vector evaluated only for POIs in harmonic n for each (pt,eta) bin): \r | |
1201 | //Double_t dReqnPtEta = 0.;\r | |
1202 | //Double_t dImqnPtEta = 0.;\r | |
1203 | \r | |
1204 | // number of POIs in each (pt,eta) bin:\r | |
1205 | Double_t dmPtEta = 0.;\r | |
1206 | \r | |
1207 | // real and imaginary parts of q''_{n}, q''_{2n}, ... \r | |
1208 | // (non-weighted Q-vectors evaluated only for particles which are both RPs and POIs in harmonic n, 2n, ... for each (pt,eta) bin): \r | |
1209 | //Double_t dReqPrimePrime1nPtEta = 0.;\r | |
1210 | //Double_t dImqPrimePrime1nPtEta = 0.;\r | |
1211 | //Double_t dReqPrimePrime2nPtEta = 0.;\r | |
1212 | //Double_t dImqPrimePrime2nPtEta = 0.;\r | |
1213 | \r | |
1214 | // number of particles which are both RPs and POIs in each (pt,eta) bin:\r | |
1215 | //Double_t dmPrimePrimePtEta = 0.;\r | |
1216 | \r | |
1217 | if(type == "POI")\r | |
1218 | {\r | |
1219 | // q''_{n}, q''_{2n}:\r | |
1220 | //...............................................................................................\r | |
1221 | //dReqPrimePrime1nPtEta = fReqPrimePrime1nPtEta->GetBinContent(fReqPrimePrime1nPtEta->GetBin(p,e));\r | |
1222 | //dImqPrimePrime1nPtEta = fImqPrimePrime1nPtEta->GetBinContent(fImqPrimePrime1nPtEta->GetBin(p,e));\r | |
1223 | //dReqPrimePrime2nPtEta = fReqPrimePrime2nPtEta->GetBinContent(fReqPrimePrime2nPtEta->GetBin(p,e));\r | |
1224 | //dImqPrimePrime2nPtEta = fImqPrimePrime2nPtEta->GetBinContent(fImqPrimePrime2nPtEta->GetBin(p,e));\r | |
1225 | //...............................................................................................\r | |
1226 | \r | |
1227 | // m'':\r | |
1228 | //dmPrimePrimePtEta = fmPrimePrimePtEta->GetBinContent(fmPrimePrimePtEta->GetBin(p,e));\r | |
1229 | \r | |
1230 | // q'_{n}: \r | |
1231 | //dReqnPtEta = fReqnPtEta->GetBinContent(fReqnPtEta->GetBin(p,e));\r | |
1232 | //dImqnPtEta = fImqnPtEta->GetBinContent(fImqnPtEta->GetBin(p,e));\r | |
1233 | //dmPtEta = fmPtEta->GetBinContent(fmPtEta->GetBin(p,e));\r | |
1234 | }\r | |
1235 | else if(type == "RP")\r | |
1236 | {\r | |
1237 | // q_RP{n}, q_RP{2n}:\r | |
1238 | //...............................................................................................\r | |
1239 | //dReqPrimePrime1nPtEta = fReqRP1nPtEta->GetBinContent(fReqRP1nPtEta->GetBin(p,e));\r | |
1240 | //dImqPrimePrime1nPtEta = fImqRP1nPtEta->GetBinContent(fImqRP1nPtEta->GetBin(p,e));\r | |
1241 | //dReqPrimePrime2nPtEta = fReqRP2nPtEta->GetBinContent(fReqRP2nPtEta->GetBin(p,e));\r | |
1242 | //dImqPrimePrime2nPtEta = fImqRP2nPtEta->GetBinContent(fImqRP2nPtEta->GetBin(p,e));\r | |
1243 | //...............................................................................................\r | |
1244 | \r | |
1245 | // m'':\r | |
1246 | //dmPrimePrimePtEta = fmRPPtEta->GetBinContent(fmRPPtEta->GetBin(p,e));\r | |
1247 | \r | |
1248 | //dReqnPtEta = fReqRP1nPtEta->GetBinContent(fReqRP1nPtEta->GetBin(p,e)); // not a bug ;-)\r | |
1249 | //dImqnPtEta = fImqRP1nPtEta->GetBinContent(fImqRP1nPtEta->GetBin(p,e)); // not a bug ;-)\r | |
1250 | //dmPtEta = fmRPPtEta->GetBinContent(fmRPPtEta->GetBin(p,e)); // not a bug ;-) \r | |
1251 | }\r | |
1252 | \r | |
1253 | // 1'-p correction:\r | |
1254 | //Double_t oneSinP1nPsiPtEta = 0.;\r | |
1255 | \r | |
1256 | if(dmPtEta)\r | |
1257 | {\r | |
1258 | //oneSinP1nPsiPtEta = dImqnPtEta/dmPtEta;\r | |
1259 | \r | |
1260 | // fill the 2D profile to get the average 1'-p correction for each (pt, eta) bin:\r | |
1261 | if(type == "POI")\r | |
1262 | { \r | |
1263 | //fCorrectionsSinP1nPsiPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,\r | |
1264 | // oneSinP1nPsiPtEta,dmPtEta);\r | |
1265 | }\r | |
1266 | else if(type == "RP")\r | |
1267 | {\r | |
1268 | //fCorrectionsSinP1nPsiPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,\r | |
1269 | // oneSinP1nPsiPtEta,dmPtEta);\r | |
1270 | }\r | |
1271 | } // end of if(dmPtEta*dMult-dmPrimePrimePtEta)\r | |
1272 | \r | |
1273 | /*\r | |
1274 | \r | |
1275 | // 4'-particle correlation:\r | |
1276 | Double_t four1n1n1n1nPtEta = 0.;\r | |
1277 | if((dmPtEta-dmPrimePrimePtEta)*dMult*(dMult-1.)*(dMult-2.)\r | |
1278 | + dmPrimePrimePtEta*(dMult-1.)*(dMult-2.)*(dMult-3.)) // to be improved (introduce a new variable for this expression)\r | |
1279 | {\r | |
1280 | four1n1n1n1nPtEta = ((pow(dReQ1n,2.)+pow(dImQ1n,2.))*(dReqnPtEta*dReQ1n+dImqnPtEta*dImQ1n)\r | |
1281 | - dReqPrimePrime2nPtEta*(pow(dReQ1n,2.)-pow(dImQ1n,2.))\r | |
1282 | - 2.*dImqPrimePrime2nPtEta*dReQ1n*dImQ1n\r | |
1283 | - dReqnPtEta*(dReQ1n*dReQ2n+dImQ1n*dImQ2n)\r | |
1284 | + dImqnPtEta*(dImQ1n*dReQ2n-dReQ1n*dImQ2n)\r | |
1285 | - 2.*dMult*(dReqnPtEta*dReQ1n+dImqnPtEta*dImQ1n)\r | |
1286 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*dmPrimePrimePtEta \r | |
1287 | + 6.*(dReqPrimePrime1nPtEta*dReQ1n+dImqPrimePrime1nPtEta*dImQ1n) \r | |
1288 | + 1.*(dReqPrimePrime2nPtEta*dReQ2n+dImqPrimePrime2nPtEta*dImQ2n) \r | |
1289 | + 2.*(dReqnPtEta*dReQ1n+dImqnPtEta*dImQ1n) \r | |
1290 | + 2.*dmPrimePrimePtEta*dMult \r | |
1291 | - 6.*dmPrimePrimePtEta) \r | |
1292 | / ((dmPtEta-dmPrimePrimePtEta)*dMult*(dMult-1.)*(dMult-2.)\r | |
1293 | + dmPrimePrimePtEta*(dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
1294 | \r | |
1295 | // fill the 2D profile to get the average correlation for each (pt, eta) bin:\r | |
1296 | if(type == "POI")\r | |
1297 | {\r | |
1298 | f4pPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta,\r | |
1299 | (dmPtEta-dmPrimePrimePtEta)*dMult*(dMult-1.)*(dMult-2.)\r | |
1300 | + dmPrimePrimePtEta*(dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
1301 | }\r | |
1302 | else if(type == "RP")\r | |
1303 | {\r | |
1304 | f4pPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta,\r | |
1305 | (dmPtEta-dmPrimePrimePtEta)*dMult*(dMult-1.)*(dMult-2.)\r | |
1306 | + dmPrimePrimePtEta*(dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
1307 | }\r | |
1308 | } // end of if((dmPtEta-dmPrimePrimePtEta)*dMult*(dMult-1.)*(dMult-2.)\r | |
1309 | // +dmPrimePrimePtEta*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
1310 | \r | |
1311 | */\r | |
1312 | \r | |
1313 | } // end of for(Int_t e=1;e<=fnBinsEta;e++)\r | |
1314 | } // end of for(Int_t p=1;p<=fnBinsPt;p++)\r | |
1315 | \r | |
1316 | } // end of AliFlowAnalysisWithQCumulants::CalculateCorrectionsForNonUniformAcceptanceForDifferentialFlowSinTerms(TString type)\r | |
1317 | \r | |
1318 | \r | |
1319 | //================================================================================================================================\r | |
1320 | \r | |
1321 | \r | |
1322 | void AliFlowAnalysisWithQCumulants::EvaluateNestedLoopsForDifferentialFlow(AliFlowEventSimple* anEvent)\r | |
1323 | {\r | |
1324 | // evaluate the nested loops relevant for differential flow (needed for cross-checking the results)\r | |
1325 | \r | |
1326 | Int_t nPrim = anEvent->NumberOfTracks(); \r | |
1327 | AliFlowTrackSimple *aftsTrack = NULL;\r | |
1328 | \r | |
1329 | Double_t psi1=0., phi2=0., phi3=0., phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.;\r | |
1330 | Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1.;// wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.;\r | |
1331 | \r | |
1332 | Int_t n = fHarmonic; // to be improved\r | |
1333 | \r | |
1334 | // ********************************************\r | |
1335 | // **** NESTED LOOPS FOR DIFFERENTIAL FLOW ****\r | |
1336 | // ******************************************** \r | |
1337 | \r | |
1338 | // Remark 1: (pt,eta) bin in which the cross-checking will be performed is given by 1.1 < pt < 1.2 GeV and -0.55 < eta < -0.525 \r | |
1339 | \r | |
1340 | // Remark 2: multi-particle correlations needed for diff. flow calculated with nested loops without weights are stored in 1D profile \r | |
1341 | // fDirectCorrelationsDiffFlow\r | |
1342 | \r | |
1343 | // Remark 3: multi-particle correlations needed for diff. flow calculated with nested loops with weights are stored in 1D profile \r | |
1344 | // fDirectCorrelationsDiffFlowW;\r | |
1345 | \r | |
1346 | // Remark 4: binning of fDirectCorrelationsDiffFlow is organized as follows:\r | |
1347 | //......................................................................................\r | |
1348 | // ---- bins 1-20: 2-particle correlations ----\r | |
1349 | // 1st bin: <2'>_{1n|1n} = twoPrime1n1n = <cos(n*(psi1-phi2))>\r | |
1350 | // ---- bins 21-40: 3-particle correlations ----\r | |
1351 | // ---- bins 41-60: 4-particle correlations ----\r | |
1352 | // 41st bin: <4'>_{1n,1n|1n,1n} = fourPrime1n1n1n1n = <cos(n*(psi1+phi2-phi3-phi4))>\r | |
1353 | //......................................................................................\r | |
1354 | \r | |
1355 | // Remark 5: binning of fDirectCorrelationsDiffFlow is organized as follows:\r | |
1356 | //......................................................................................\r | |
1357 | // ---- bins 1-20: 2-particle correlations ----\r | |
1358 | // 1st bin: twoPrime1n1nW0W1 = <w2 cos(n*(psi1-phi2))>\r | |
1359 | // ---- bins 21-40: 3-particle correlations ----\r | |
1360 | // ---- bins 41-60: 4-particle correlations ----\r | |
1361 | // 41st bin: fourPrime1n1n1n1nW0W1W1W1 = <w2 w3 w4 cos(n*(psi1+phi2-phi3-phi4))>\r | |
1362 | //......................................................................................\r | |
1363 | \r | |
1364 | // 2'-particle:\r | |
1365 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
1366 | {\r | |
1367 | aftsTrack=anEvent->GetTrack(i1);\r | |
1368 | // POI condition (first particle in the correlator must be POI): \r | |
1369 | if(!((aftsTrack->Pt()>=1.1 && aftsTrack->Pt()<1.2) && (aftsTrack->Eta()>=-0.55 && aftsTrack->Eta()<-0.525) && (aftsTrack->InPOISelection())))continue;\r | |
1370 | psi1=aftsTrack->Phi(); \r | |
1371 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(psi1*fnBinsPhi/TMath::TwoPi())));\r | |
1372 | \r | |
1373 | fDirectCorrectionsDiffFlowCos->Fill(0.,cos(1.*n*(psi1)),1.); // <<cos(n*(psi1))>>\r | |
1374 | fDirectCorrectionsDiffFlowSin->Fill(0.,sin(1.*n*(psi1)),1.); // <<sin(n*(psi1))>>\r | |
1375 | \r | |
1376 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
1377 | {\r | |
1378 | if(i2==i1)continue;\r | |
1379 | aftsTrack=anEvent->GetTrack(i2);\r | |
1380 | // RP condition (!(first) particle in the correlator must be RP):\r | |
1381 | if(!(aftsTrack->InRPSelection()))continue;\r | |
1382 | phi2=aftsTrack->Phi();\r | |
1383 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi())));\r | |
1384 | \r | |
1385 | // non-weighted: \r | |
1386 | //..................................................................................... \r | |
1387 | fDirectCorrelationsDiffFlow->Fill(0.,cos(1.*n*(psi1-phi2)),1.); // <cos(n*(psi1-phi2))>\r | |
1388 | //..................................................................................... \r | |
1389 | // weighted:\r | |
1390 | //..................................................................................... \r | |
1391 | if(fUsePhiWeights) fDirectCorrelationsDiffFlowW->Fill(0.,cos(1.*n*(psi1-phi2)),wPhi2); // <w2 cos(n*(psi1-phi2))>\r | |
1392 | //..................................................................................... \r | |
1393 | \r | |
1394 | //fDirectCorrelations->Fill(103.,cos(1.*n*(phi1-phi2)),pow(wPhi1,2)*wPhi2);//<2'>_{n,n}\r | |
1395 | //fDirectCorrelations->Fill(104.,cos(2.*n*(phi1-phi2)),wPhi1*pow(wPhi2,2));//<2'>_{n,n}\r | |
1396 | //fDirectCorrelations->Fill(105.,cos(1.*n*(phi1-phi2)),pow(wPhi2,3));//<2'>_{n,n} \r | |
1397 | //fDirectCorrelations->Fill(41.,cos(2.*n*(phi1-phi2)),1);//<2'>_{2n,2n}\r | |
1398 | //fDirectCorrelations->Fill(42.,cos(3.*n*(phi1-phi2)),1);//<2'>_{3n,3n}\r | |
1399 | //fDirectCorrelations->Fill(43.,cos(4.*n*(phi1-phi2)),1);//<2'>_{4n,4n} \r | |
1400 | \r | |
1401 | }//end of for(Int_t i2=0;i2<nPrim;i2++)\r | |
1402 | }//end of for(Int_t i1=0;i1<nPrim;i1++)\r | |
1403 | \r | |
1404 | \r | |
1405 | \r | |
1406 | /*\r | |
1407 | \r | |
1408 | //<3'>_{2n|n,n}\r | |
1409 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
1410 | {\r | |
1411 | aftsTrack=anEvent->GetTrack(i1);\r | |
1412 | if(!((aftsTrack->Pt()>=0.5&&aftsTrack->Pt()<0.6)&&(aftsTrack->InPOISelection())))continue;//POI condition\r | |
1413 | psi1=aftsTrack->Phi();\r | |
1414 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(psi1*fnBinsPhi/TMath::TwoPi())));\r | |
1415 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
1416 | {\r | |
1417 | if(i2==i1)continue;\r | |
1418 | aftsTrack=anEvent->GetTrack(i2);\r | |
1419 | if(!(aftsTrack->InRPSelection()))continue;//RP condition\r | |
1420 | phi2=aftsTrack->Phi();\r | |
1421 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi())));\r | |
1422 | for(Int_t i3=0;i3<nPrim;i3++)\r | |
1423 | {\r | |
1424 | if(i3==i1||i3==i2)continue;\r | |
1425 | aftsTrack=anEvent->GetTrack(i3);\r | |
1426 | if(!(aftsTrack->InRPSelection()))continue;//RP condition\r | |
1427 | phi3=aftsTrack->Phi();\r | |
1428 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi())));\r | |
1429 | //fill the fDirectCorrelations: \r | |
1430 | \r | |
1431 | // 2-p\r | |
1432 | //fDirectCorrelations->Fill(101.,cos(n*(phi2-phi3)),wPhi1*wPhi2*wPhi3); // <w1 w2 w3 cos(n(phi2-phi3))>\r | |
1433 | //fDirectCorrelations->Fill(102.,cos(n*(phi1-phi3)),pow(wPhi2,2.)*wPhi3); // <w2^2 w3 cos(n(psi1-phi2))>\r | |
1434 | \r | |
1435 | // 3-p \r | |
1436 | //fDirectCorrelations->Fill(110.,cos(n*(2.*phi1-phi2-phi3)),wPhi1*wPhi2*wPhi3); // <w1 w2 w3 cos(n(2psi1-phi2-phi3))>\r | |
1437 | //fDirectCorrelations->Fill(111.,cos(n*(phi1+phi2-2.*phi3)),wPhi2*pow(wPhi3,2.)); // <w2 w3^2 cos(n(psi1+phi2-2.*phi3))>\r | |
1438 | \r | |
1439 | \r | |
1440 | //fDirectCorrelations->Fill(46.,cos(n*(phi1+phi2-2.*phi3)),1);//<3'>_{n,n|2n} \r | |
1441 | }//end of for(Int_t i3=0;i3<nPrim;i3++) \r | |
1442 | }//end of for(Int_t i2=0;i2<nPrim;i2++) \r | |
1443 | }//end of for(Int_t i1=0;i1<nPrim;i1++)\r | |
1444 | */\r | |
1445 | \r | |
1446 | // 4'-particle:\r | |
1447 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
1448 | {\r | |
1449 | aftsTrack=anEvent->GetTrack(i1);\r | |
1450 | // POI condition (first particle in the correlator must be POI): \r | |
1451 | if(!((aftsTrack->Pt()>=1.1 && aftsTrack->Pt()<1.2) && (aftsTrack->Eta()>=-0.55 && aftsTrack->Eta()<-0.525) && (aftsTrack->InPOISelection())))continue;\r | |
1452 | psi1=aftsTrack->Phi();\r | |
1453 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(psi1*fnBinsPhi/TMath::TwoPi())));\r | |
1454 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
1455 | {\r | |
1456 | if(i2==i1)continue;\r | |
1457 | aftsTrack=anEvent->GetTrack(i2);\r | |
1458 | // RP condition (!(first) particle in the correlator must be RP): \r | |
1459 | if(!(aftsTrack->InRPSelection()))continue;\r | |
1460 | phi2=aftsTrack->Phi();\r | |
1461 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi())));\r | |
1462 | for(Int_t i3=0;i3<nPrim;i3++)\r | |
1463 | { \r | |
1464 | if(i3==i1||i3==i2)continue;\r | |
1465 | aftsTrack=anEvent->GetTrack(i3);\r | |
1466 | // RP condition (!(first) particle in the correlator must be RP):\r | |
1467 | if(!(aftsTrack->InRPSelection()))continue;\r | |
1468 | phi3=aftsTrack->Phi();\r | |
1469 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi())));\r | |
1470 | for(Int_t i4=0;i4<nPrim;i4++)\r | |
1471 | {\r | |
1472 | if(i4==i1||i4==i2||i4==i3)continue;\r | |
1473 | aftsTrack=anEvent->GetTrack(i4);\r | |
1474 | // RP condition (!(first) particle in the correlator must be RP):\r | |
1475 | if(!(aftsTrack->InRPSelection()))continue; \r | |
1476 | phi4=aftsTrack->Phi();\r | |
1477 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi())));\r | |
1478 | \r | |
1479 | // non-weighted:\r | |
1480 | //.........................................................................................................................\r | |
1481 | fDirectCorrelationsDiffFlow->Fill(40.,cos(n*(psi1+phi2-phi3-phi4)),1.); // <cos(n(psi1+phi1-phi2-phi3))> \r | |
1482 | //......................................................................................................................... \r | |
1483 | // weighted:\r | |
1484 | //...............................................................................................................................\r | |
1485 | if(fUsePhiWeights) fDirectCorrelationsDiffFlowW->Fill(40.,cos(n*(psi1+phi2-phi3-phi4)),wPhi2*wPhi3*wPhi4); // <w2 w3 w4 cos(n(psi1+phi2-phi3-phi4))> \r | |
1486 | //............................................................................................................................... \r | |
1487 | \r | |
1488 | }//end of for(Int_t i4=0;i4<nPrim;i4++)\r | |
1489 | }//end of for(Int_t i3=0;i3<nPrim;i3++)\r | |
1490 | }//end of for(Int_t i2=0;i2<nPrim;i2++) \r | |
1491 | }//end of for(Int_t i1=0;i1<nPrim;i1++)\r | |
1492 | \r | |
1493 | /* \r | |
1494 | //<5'>_{2n,n|n,n,n}\r | |
1495 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
1496 | {\r | |
1497 | aftsTrack=anEvent->GetTrack(i1);\r | |
1498 | if(!((aftsTrack->Pt()>=0.5&&aftsTrack->Pt()<0.6)&&(aftsTrack->InPOISelection())))continue;//POI condition\r | |
1499 | phi1=aftsTrack->Phi();\r | |
1500 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
1501 | {\r | |
1502 | if(i2==i1)continue;\r | |
1503 | aftsTrack=anEvent->GetTrack(i2);\r | |
1504 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1505 | phi2=aftsTrack->Phi();\r | |
1506 | for(Int_t i3=0;i3<nPrim;i3++)\r | |
1507 | { \r | |
1508 | if(i3==i1||i3==i2)continue;\r | |
1509 | aftsTrack=anEvent->GetTrack(i3);\r | |
1510 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1511 | phi3=aftsTrack->Phi();\r | |
1512 | for(Int_t i4=0;i4<nPrim;i4++)\r | |
1513 | {\r | |
1514 | if(i4==i1||i4==i2||i4==i3)continue;\r | |
1515 | aftsTrack=anEvent->GetTrack(i4);\r | |
1516 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1517 | phi4=aftsTrack->Phi();//\r | |
1518 | for(Int_t i5=0;i5<nPrim;i5++)\r | |
1519 | {\r | |
1520 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue;\r | |
1521 | aftsTrack=anEvent->GetTrack(i5);\r | |
1522 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1523 | phi5=aftsTrack->Phi(); \r | |
1524 | //fill the fDirectCorrelations:if(bNestedLoops)\r | |
1525 | //fDirectCorrelations->Fill(55.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),1);//<5'>_{2n,n|n,n,n}\r | |
1526 | }//end of for(Int_t i5=0;i5<nPrim;i5++) \r | |
1527 | }//end of for(Int_t i4=0;i4<nPrim;i4++)\r | |
1528 | }//end of for(Int_t i3=0;i3<nPrim;i3++)\r | |
1529 | }//end of for(Int_t i2=0;i2<nPrim;i2++) \r | |
1530 | }//end of for(Int_t i1=0;i1<nPrim;i1++)\r | |
1531 | \r | |
1532 | \r | |
1533 | \r | |
1534 | */\r | |
1535 | /*\r | |
1536 | \r | |
1537 | \r | |
1538 | \r | |
1539 | //<6'>_{n,n,n|n,n,n}\r | |
1540 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
1541 | {\r | |
1542 | aftsTrack=anEvent->GetTrack(i1);\r | |
1543 | if(!((aftsTrack->Pt()>=0.5&&aftsTrack->Pt()<0.6)&&(aftsTrack->InPOISelection())))continue;//POI condition\r | |
1544 | phi1=aftsTrack->Phi();\r | |
1545 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
1546 | {\r | |
1547 | if(i2==i1)continue;\r | |
1548 | aftsTrack=anEvent->GetTrack(i2);\r | |
1549 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1550 | phi2=aftsTrack->Phi();\r | |
1551 | for(Int_t i3=0;i3<nPrim;i3++)\r | |
1552 | { \r | |
1553 | if(i3==i1||i3==i2)continue;\r | |
1554 | aftsTrack=anEvent->GetTrack(i3);\r | |
1555 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1556 | phi3=aftsTrack->Phi();\r | |
1557 | for(Int_t i4=0;i4<nPrim;i4++)\r | |
1558 | {\r | |
1559 | if(i4==i1||i4==i2||i4==i3)continue;\r | |
1560 | aftsTrack=anEvent->GetTrack(i4);\r | |
1561 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1562 | phi4=aftsTrack->Phi();\r | |
1563 | for(Int_t i5=0;i5<nPrim;i5++)\r | |
1564 | {\r | |
1565 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue;\r | |
1566 | aftsTrack=anEvent->GetTrack(i5);\r | |
1567 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1568 | phi5=aftsTrack->Phi(); \r | |
1569 | for(Int_t i6=0;i6<nPrim;i6++)\r | |
1570 | {\r | |
1571 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;\r | |
1572 | aftsTrack=anEvent->GetTrack(i6);\r | |
1573 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1574 | phi6=aftsTrack->Phi(); \r | |
1575 | //fill the fDirectCorrelations:\r | |
1576 | //fDirectCorrelations->Fill(60.,cos(n*(phi1+phi2+phi3-phi4-phi5-phi6)),1);//<6'>_{n,n,n|n,n,n}\r | |
1577 | }//end of for(Int_t i6=0;i6<nPrim;i6++) \r | |
1578 | }//end of for(Int_t i5=0;i5<nPrim;i5++) \r | |
1579 | }//end of for(Int_t i4=0;i4<nPrim;i4++)\r | |
1580 | }//end of for(Int_t i3=0;i3<nPrim;i3++)\r | |
1581 | }//end of for(Int_t i2=0;i2<nPrim;i2++) \r | |
1582 | }//end of for(Int_t i1=0;i1<nPrim;i1++)\r | |
1583 | \r | |
1584 | \r | |
1585 | */\r | |
1586 | /* \r | |
1587 | \r | |
1588 | \r | |
1589 | //<7'>_{2n,n,n|n,n,n,n}\r | |
1590 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
1591 | {\r | |
1592 | aftsTrack=anEvent->GetTrack(i1);\r | |
1593 | if(!((aftsTrack->Pt()>=0.5&&aftsTrack->Pt()<0.6)&&(aftsTrack->InPOISelection())))continue;//POI condition\r | |
1594 | phi1=aftsTrack->Phi();\r | |
1595 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
1596 | {\r | |
1597 | if(i2==i1)continue;\r | |
1598 | aftsTrack=anEvent->GetTrack(i2);\r | |
1599 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1600 | phi2=aftsTrack->Phi();\r | |
1601 | for(Int_t i3=0;i3<nPrim;i3++)\r | |
1602 | { \r | |
1603 | if(i3==i1||i3==i2)continue;\r | |
1604 | aftsTrack=anEvent->GetTrack(i3);\r | |
1605 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1606 | phi3=aftsTrack->Phi();\r | |
1607 | for(Int_t i4=0;i4<nPrim;i4++)\r | |
1608 | {\r | |
1609 | if(i4==i1||i4==i2||i4==i3)continue;\r | |
1610 | aftsTrack=anEvent->GetTrack(i4);\r | |
1611 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1612 | phi4=aftsTrack->Phi();\r | |
1613 | for(Int_t i5=0;i5<nPrim;i5++)\r | |
1614 | {\r | |
1615 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue;\r | |
1616 | aftsTrack=anEvent->GetTrack(i5);\r | |
1617 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1618 | phi5=aftsTrack->Phi(); \r | |
1619 | for(Int_t i6=0;i6<nPrim;i6++)\r | |
1620 | {\r | |
1621 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;\r | |
1622 | aftsTrack=anEvent->GetTrack(i6);\r | |
1623 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1624 | phi6=aftsTrack->Phi();\r | |
1625 | for(Int_t i7=0;i7<nPrim;i7++)\r | |
1626 | {\r | |
1627 | if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;\r | |
1628 | aftsTrack=anEvent->GetTrack(i7);\r | |
1629 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1630 | phi7=aftsTrack->Phi(); \r | |
1631 | //fill the fDirectCorrelations:\r | |
1632 | //fDirectCorrelations->Fill(65.,cos(2.*n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6-n*phi7),1);//<7'>_{2n,n,n|n,n,n,n}\r | |
1633 | }//end of for(Int_t i7=0;i7<nPrim;i7++) \r | |
1634 | }//end of for(Int_t i6=0;i6<nPrim;i6++) \r | |
1635 | }//end of for(Int_t i5=0;i5<nPrim;i5++) \r | |
1636 | }//end of for(Int_t i4=0;i4<nPrim;i4++)\r | |
1637 | }//end of for(Int_t i3=0;i3<nPrim;i3++)\r | |
1638 | }//end of for(Int_t i2=0;i2<nPrim;i2++) \r | |
1639 | }//end of for(Int_t i1=0;i1<nPrim;i1++)\r | |
1640 | \r | |
1641 | \r | |
1642 | \r | |
1643 | */\r | |
1644 | /* \r | |
1645 | \r | |
1646 | \r | |
1647 | \r | |
1648 | //<8'>_{n,n,n,n|n,n,n,n}\r | |
1649 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
1650 | {\r | |
1651 | aftsTrack=anEvent->GetTrack(i1);\r | |
1652 | if(!((aftsTrack->Pt()>=0.5&&aftsTrack->Pt()<0.6)&&(aftsTrack->InPOISelection())))continue;//POI condition\r | |
1653 | phi1=aftsTrack->Phi();\r | |
1654 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
1655 | {\r | |
1656 | if(i2==i1)continue;\r | |
1657 | aftsTrack=anEvent->GetTrack(i2);\r | |
1658 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1659 | phi2=aftsTrack->Phi();\r | |
1660 | for(Int_t i3=0;i3<nPrim;i3++)\r | |
1661 | { \r | |
1662 | if(i3==i1||i3==i2)continue;\r | |
1663 | aftsTrack=anEvent->GetTrack(i3);\r | |
1664 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1665 | phi3=aftsTrack->Phi();\r | |
1666 | for(Int_t i4=0;i4<nPrim;i4++)\r | |
1667 | {\r | |
1668 | if(i4==i1||i4==i2||i4==i3)continue;\r | |
1669 | aftsTrack=anEvent->GetTrack(i4);\r | |
1670 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1671 | phi4=aftsTrack->Phi();\r | |
1672 | for(Int_t i5=0;i5<nPrim;i5++)\r | |
1673 | {\r | |
1674 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue;\r | |
1675 | aftsTrack=anEvent->GetTrack(i5);\r | |
1676 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1677 | phi5=aftsTrack->Phi(); \r | |
1678 | for(Int_t i6=0;i6<nPrim;i6++)\r | |
1679 | {\r | |
1680 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;\r | |
1681 | aftsTrack=anEvent->GetTrack(i6);\r | |
1682 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1683 | phi6=aftsTrack->Phi();\r | |
1684 | for(Int_t i7=0;i7<nPrim;i7++)\r | |
1685 | {\r | |
1686 | if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;\r | |
1687 | aftsTrack=anEvent->GetTrack(i7);\r | |
1688 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1689 | phi7=aftsTrack->Phi();\r | |
1690 | for(Int_t i8=0;i8<nPrim;i8++)\r | |
1691 | {\r | |
1692 | if(i8==i1||i8==i2||i8==i3||i8==i4||i8==i5||i8==i6||i8==i7)continue;\r | |
1693 | aftsTrack=anEvent->GetTrack(i8);\r | |
1694 | if(!(aftsTrack->InRPSelection()))continue;//RP condition \r | |
1695 | phi8=aftsTrack->Phi(); \r | |
1696 | //fill the fDirectCorrelations:\r | |
1697 | //fDirectCorrelations->Fill(70.,cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8)),1);//<8'>_{n,n,n,n|n,n,n,n}\r | |
1698 | }//end of for(Int_t i8=0;i8<nPrim;i8++) \r | |
1699 | }//end of for(Int_t i7=0;i7<nPrim;i7++) \r | |
1700 | }//end of for(Int_t i6=0;i6<nPrim;i6++) \r | |
1701 | }//end of for(Int_t i5=0;i5<nPrim;i5++) \r | |
1702 | }//end of for(Int_t i4=0;i4<nPrim;i4++)\r | |
1703 | }//end of for(Int_t i3=0;i3<nPrim;i3++)\r | |
1704 | }//end of for(Int_t i2=0;i2<nPrim;i2++) \r | |
1705 | }//end of for(Int_t i1=0;i1<nPrim;i1++)\r | |
1706 | \r | |
1707 | \r | |
1708 | \r | |
1709 | */ \r | |
1710 | \r | |
1711 | \r | |
1712 | \r | |
1713 | \r | |
1714 | } // end of AliFlowAnalysisWithQCumulants::EvaluateNestedLoopsForDifferentialFlow(AliFlowEventSimple* anEvent)\r | |
1715 | \r | |
1716 | \r | |
1717 | //================================================================================================================================\r | |
1718 | \r | |
1719 | \r | |
1720 | void AliFlowAnalysisWithQCumulants::GetOutputHistograms(TList *outputListHistos)\r | |
1721 | {\r | |
1722 | // a) Get pointers for common control and common result histograms and profiles.\r | |
1723 | // b) Get pointers for histograms with particle weights.\r | |
1724 | // c) Get pointers for histograms and profiles relevant for integrated flow.\r | |
1725 | // d) Get pointers for histograms and profiles relevant for differental flow.\r | |
1726 | // e) Get pointers for histograms and profiles holding results obtained with nested loops.\r | |
1727 | \r | |
1728 | if(outputListHistos)\r | |
1729 | { \r | |
1730 | this->GetPointersForCommonHistograms(outputListHistos); // to be improved (no need to pass here argument, use setter for base list instead)\r | |
1731 | this->GetPointersForParticleWeightsHistograms(outputListHistos); // to be improved (no need to pass here argument, use setter for base list instead)\r | |
1732 | this->GetPointersForIntFlowHistograms(outputListHistos); // to be improved (no need to pass here argument, use setter for base list instead)\r | |
1733 | this->GetPointersForDiffFlowHistograms(outputListHistos); // to be improved (no need to pass here argument, use setter for base list instead)\r | |
1734 | this->GetPointersForNestedLoopsHistograms(outputListHistos); // to be improved (no need to pass here argument, use setter for base list instead)\r | |
1735 | }\r | |
1736 | \r | |
1737 | \r | |
1738 | /*\r | |
1739 | \r | |
1740 | \r | |
1741 | // profiles and results: \r | |
1742 | diffFlowListProfiles = dynamic_cast<TList*>(diffFlowList->FindObject("Profiles"));\r | |
1743 | diffFlowListResults = dynamic_cast<TList*>(diffFlowList->FindObject("Results"));\r | |
1744 | } else\r | |
1745 | {\r | |
1746 | cout<<"WARNING: diffFlowList is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1747 | } \r | |
1748 | \r | |
1749 | // nested list in the list of profiles fDiffFlowListProfiles "Profiles":\r | |
1750 | TList *dfpType[2] = {NULL};\r | |
1751 | TList *dfpParticleWeights[2][2] = {{NULL}};\r | |
1752 | TList *dfpEventWeights[2][2][2] = {{{NULL}}};\r | |
1753 | TList *diffFlowCorrelations[2][2][2] = {{{NULL}}};\r | |
1754 | TList *diffFlowProductsOfCorrelations[2][2][2] = {{{NULL}}};\r | |
1755 | TList *diffFlowCorrectionTerms[2][2][2][2] = {{{{NULL}}}};\r | |
1756 | \r | |
1757 | if(diffFlowListProfiles)\r | |
1758 | {\r | |
1759 | for(Int_t t=0;t<2;t++)\r | |
1760 | {\r | |
1761 | dfpType[t] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(typeFlag[t].Data()));\r | |
1762 | if(dfpType[t])\r | |
1763 | {\r | |
1764 | for(Int_t pW=0;pW<(1+(Int_t)(bUsePhiWeights||bUsePtWeights||bUseEtaWeights));pW++)\r | |
1765 | {\r | |
1766 | dfpParticleWeights[t][pW] = dynamic_cast<TList*>(dfpType[t]->FindObject(Form("%s, pWeights %s",typeFlag[t].Data(),pWeightsFlag[pW].Data())));\r | |
1767 | if(dfpParticleWeights[t][pW])\r | |
1768 | {\r | |
1769 | for(Int_t eW=0;eW<2;eW++)\r | |
1770 | {\r | |
1771 | dfpEventWeights[t][pW][eW] = dynamic_cast<TList*>(dfpParticleWeights[t][pW]->FindObject(Form("%s, pWeights %s, eWeights %s",typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())));\r | |
1772 | if(dfpEventWeights[t][pW][eW])\r | |
1773 | {\r | |
1774 | // correlations: \r | |
1775 | diffFlowCorrelations[t][pW][eW] = dynamic_cast<TList*>(dfpEventWeights[t][pW][eW]->FindObject(Form("Correlations (%s, pWeights %s, eWeights %s)",typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())));\r | |
1776 | // products of correlations:\r | |
1777 | diffFlowProductsOfCorrelations[t][pW][eW] = dynamic_cast<TList*>(dfpEventWeights[t][pW][eW]->FindObject(Form("Products of correlations (%s, pWeights %s, eWeights %s)",typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())));\r | |
1778 | // correction terms:\r | |
1779 | for(Int_t sc=0;sc<2;sc++)\r | |
1780 | {\r | |
1781 | diffFlowCorrectionTerms[t][pW][eW][sc] = dynamic_cast<TList*>(dfpEventWeights[t][pW][eW]->FindObject(Form("Corrections for NUA (%s, pWeights %s, eWeights %s, %s terms)",typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data(),sinCosFlag[sc].Data())));\r | |
1782 | //this->SetDiffFlowCorrectionTerms(diffFlowCorrectionTerms[t][pW][sc],t,pW,sc); \r | |
1783 | }\r | |
1784 | } else // to if(dfpEventWeights[t][pW][eW])\r | |
1785 | {\r | |
1786 | cout<<"WARNING: dfpEventWeights[t][pW][eW] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1787 | cout<<"t = "<<t<<endl;\r | |
1788 | cout<<"pW = "<<pW<<endl;\r | |
1789 | cout<<"eW = "<<eW<<endl;\r | |
1790 | }\r | |
1791 | } // end of for(Int_t eW=0;eW<2;eW++) \r | |
1792 | } else // to if(dfpParticleWeights[t][pW])\r | |
1793 | {\r | |
1794 | cout<<"WARNING: dfpParticleWeights[t][pW] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1795 | cout<<"t = "<<t<<endl;\r | |
1796 | cout<<"pW = "<<pW<<endl;\r | |
1797 | }\r | |
1798 | } // end of for(Int_t pW=0;pW<(1+(Int_t)(bUsePhiWeights||bUsePtWeights||bUseEtaWeights));pW++) \r | |
1799 | } else // if(dfpType[t]) \r | |
1800 | {\r | |
1801 | cout<<"WARNING: dfpType[t] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1802 | cout<<"t = "<<t<<endl;\r | |
1803 | }\r | |
1804 | } // end of for(Int_t t=0;t<2;t++)\r | |
1805 | } else // to if(diffFlowListProfiles)\r | |
1806 | {\r | |
1807 | cout<<"WARNING: diffFlowListProfiles is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1808 | } \r | |
1809 | \r | |
1810 | TProfile2D *correlationsPro[2][2][2][4] = {{{{NULL}}}};\r | |
1811 | TProfile2D *productsOfCorrelationsPro[2][2][2][5] = {{{{NULL}}}};\r | |
1812 | TProfile2D *correctionTermsPro[2][2][2][2][2] = {{{{{NULL}}}}};\r | |
1813 | \r | |
1814 | TString correlationName[4] = {"<2'>","<4'>","<6'>","<8'>"};\r | |
1815 | TString cumulantName[4] = {"QC{2'}","QC{4'}","QC{6'}","QC{8'}"};\r | |
1816 | TString productOfCorrelationsName[5] = {"<2><2'>","<2><4'>","<4><2'>","<4><4'>","<2'><4'>"};\r | |
1817 | TString correctionsSinTermsName[2] = {"sin(1)","sin(2)"};\r | |
1818 | TString correctionsCosTermsName[2] = {"cos(1)","cos(2)"};\r | |
1819 | TString correctionName[4] = {"corr. to QC{2'}","corr. to QC{4'}","corr. to QC{6'}","corr. to QC{8'}"};\r | |
1820 | TString covarianceName[5] = {"Cov(<2>,<2'>)","Cov(<2>,<4'>)","Cov(<4>,<2'>)","Cov(<4>,<4'>)","Cov(<2'>,<4'>)"}; \r | |
1821 | TString flowName[4] = {"v'{2}","v'{4}","v'{6}","v'{8}"}; \r | |
1822 | \r | |
1823 | for(Int_t t=0;t<2;t++)\r | |
1824 | {\r | |
1825 | for(Int_t pW=0;pW<(1+(Int_t)(bUsePhiWeights||bUsePtWeights||bUseEtaWeights));pW++)\r | |
1826 | {\r | |
1827 | for(Int_t eW=0;eW<2;eW++)\r | |
1828 | {\r | |
1829 | // correlations:\r | |
1830 | if(diffFlowCorrelations[t][pW][eW])\r | |
1831 | {\r | |
1832 | for(Int_t correlIndex=0;correlIndex<4;correlIndex++)\r | |
1833 | {\r | |
1834 | correlationsPro[t][pW][eW][correlIndex] = dynamic_cast<TProfile2D*>(diffFlowCorrelations[t][pW][eW]->FindObject(correlationName[correlIndex].Data()));\r | |
1835 | if(correlationsPro[t][pW][eW][correlIndex])\r | |
1836 | {\r | |
1837 | this->SetCorrelationsPro(correlationsPro[t][pW][eW][correlIndex],t,pW,eW,correlIndex);\r | |
1838 | } else // to if(correlationsPro[t][pW][ew][correlIndex])\r | |
1839 | {\r | |
1840 | cout<<"WARNING: correlationsPro[t][pW][eW][correlIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1841 | cout<<"t = "<<t<<endl;\r | |
1842 | cout<<"pW = "<<pW<<endl;\r | |
1843 | cout<<"eW = "<<eW<<endl;\r | |
1844 | cout<<"ci = "<<correlIndex<<endl;\r | |
1845 | } \r | |
1846 | }\r | |
1847 | } else // to if(diffFlowCorrelations[t][pW][eW])\r | |
1848 | {\r | |
1849 | cout<<"WARNING: diffFlowCorrelations[t][pW][eW] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1850 | cout<<"t = "<<t<<endl;\r | |
1851 | cout<<"pW = "<<pW<<endl;\r | |
1852 | cout<<"eW = "<<eW<<endl;\r | |
1853 | } \r | |
1854 | // products of correlations:\r | |
1855 | if(diffFlowProductsOfCorrelations[t][pW][eW])\r | |
1856 | {\r | |
1857 | for(Int_t productOfCorrelationsIndex=0;productOfCorrelationsIndex<5;productOfCorrelationsIndex++)\r | |
1858 | {\r | |
1859 | productsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex] = dynamic_cast<TProfile2D*>(diffFlowProductsOfCorrelations[t][pW][eW]->FindObject(productOfCorrelationsName[productOfCorrelationsIndex].Data()));\r | |
1860 | if(productsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex])\r | |
1861 | {\r | |
1862 | this->SetProductsOfCorrelationsPro(productsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex],t,pW,eW,productOfCorrelationsIndex);\r | |
1863 | } else // to if(productsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex])\r | |
1864 | {\r | |
1865 | cout<<"WARNING: productsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1866 | cout<<"t = "<<t<<endl;\r | |
1867 | cout<<"pW = "<<pW<<endl;\r | |
1868 | cout<<"eW = "<<eW<<endl;\r | |
1869 | cout<<"ci = "<<productOfCorrelationsIndex<<endl;\r | |
1870 | } \r | |
1871 | }\r | |
1872 | } else // to if(diffFlowProductsOfCorrelations[t][pW][eW])\r | |
1873 | {\r | |
1874 | cout<<"WARNING: diffFlowProductsOfCorrelations[t][pW][eW] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1875 | cout<<"t = "<<t<<endl;\r | |
1876 | cout<<"pW = "<<pW<<endl;\r | |
1877 | cout<<"eW = "<<eW<<endl;\r | |
1878 | }\r | |
1879 | // correction terms:\r | |
1880 | for(Int_t sc=0;sc<2;sc++)\r | |
1881 | {\r | |
1882 | if(diffFlowCorrectionTerms[t][pW][eW][sc])\r | |
1883 | {\r | |
1884 | for(Int_t correctionIndex=0;correctionIndex<2;correctionIndex++)\r | |
1885 | {\r | |
1886 | if(sc==0)\r | |
1887 | {\r | |
1888 | correctionTermsPro[t][pW][eW][sc][correctionIndex] = dynamic_cast<TProfile2D*>(diffFlowCorrectionTerms[t][pW][eW][sc]->FindObject(correctionsSinTermsName[correctionIndex].Data())); \r | |
1889 | if(correctionTermsPro[t][pW][eW][sc][correctionIndex])\r | |
1890 | {\r | |
1891 | this->SetCorrectionTermsPro(correctionTermsPro[t][pW][eW][sc][correctionIndex],t,pW,eW,sc,correctionIndex);\r | |
1892 | } else \r | |
1893 | {\r | |
1894 | cout<<"WARNING: correctionTermsPro[t][pW][eW][sc][correctionIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1895 | cout<<"t = "<<t<<endl;\r | |
1896 | cout<<"pW = "<<pW<<endl;\r | |
1897 | cout<<"eW = "<<eW<<endl;\r | |
1898 | cout<<"sc = "<<sc<<endl;\r | |
1899 | cout<<"ci = "<<correctionIndex<<endl;\r | |
1900 | }\r | |
1901 | } \r | |
1902 | if(sc==1)\r | |
1903 | {\r | |
1904 | correctionTermsPro[t][pW][eW][sc][correctionIndex] = dynamic_cast<TProfile2D*>(diffFlowCorrectionTerms[t][pW][eW][sc]->FindObject(correctionsCosTermsName[correctionIndex].Data())); \r | |
1905 | if(correctionTermsPro[t][pW][eW][sc][correctionIndex])\r | |
1906 | {\r | |
1907 | this->SetCorrectionTermsPro(correctionTermsPro[t][pW][eW][sc][correctionIndex],t,pW,eW,sc,correctionIndex);\r | |
1908 | } else \r | |
1909 | {\r | |
1910 | cout<<"WARNING: correctionTermsPro[t][pW][eW][sc][correctionIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1911 | cout<<"t = "<<t<<endl;\r | |
1912 | cout<<"pW = "<<pW<<endl;\r | |
1913 | cout<<"eW = "<<eW<<endl;\r | |
1914 | cout<<"sc = "<<sc<<endl;\r | |
1915 | cout<<"ci = "<<correctionIndex<<endl;\r | |
1916 | } \r | |
1917 | } \r | |
1918 | } // end of for(Int_t correctionIndex=0;correctionIndex<2;correctionIndex++)\r | |
1919 | } else // to if(diffFlowCorrectionTerms[t][pW][eW][sc])\r | |
1920 | {\r | |
1921 | cout<<"WARNING: diffFlowCorrectionTerms[t][pW][eW][sc] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1922 | cout<<"t = "<<t<<endl;\r | |
1923 | cout<<"pW = "<<pW<<endl;\r | |
1924 | cout<<"eW = "<<eW<<endl;\r | |
1925 | cout<<"sc = "<<sc<<endl;\r | |
1926 | }\r | |
1927 | } // end of for(Int_t sc=0;sc<2;sc++) \r | |
1928 | } // end of for(Int_t eW=0;eW<2;eW++)\r | |
1929 | } // end of for(Int_t pW=0;pW<(1+(Int_t)(bUsePhiWeights||bUsePtWeights||bUseEtaWeights));pW++)\r | |
1930 | } // end of for(Int_t t=0;t<2;t++)\r | |
1931 | \r | |
1932 | // nested list in the list of results fDiffFlowListResults "Results":\r | |
1933 | TList *dfrType[2] = {NULL};\r | |
1934 | TList *dfrParticleWeights[2][2] = {{NULL}};\r | |
1935 | TList *dfrEventWeights[2][2][2] = {{{NULL}}};\r | |
1936 | TList *dfrCorrections[2][2][2][2] = {{{{NULL}}}}; \r | |
1937 | TList *diffFlowFinalCorrelations[2][2][2] = {{{NULL}}}; \r | |
1938 | TList *diffFlowFinalCorrections[2][2][2] = {{{NULL}}}; \r | |
1939 | TList *diffFlowFinalCovariances[2][2][2] = {{{NULL}}}; \r | |
1940 | TList *diffFlowFinalCumulants[2][2][2][2] = {{{{NULL}}}}; \r | |
1941 | TList *diffFlowFinalFlow[2][2][2][2] = {{{{NULL}}}}; \r | |
1942 | \r | |
1943 | if(diffFlowListResults)\r | |
1944 | {\r | |
1945 | for(Int_t t=0;t<2;t++)\r | |
1946 | {\r | |
1947 | dfrType[t] = dynamic_cast<TList*>(diffFlowListResults->FindObject(typeFlag[t].Data()));\r | |
1948 | if(dfrType[t])\r | |
1949 | {\r | |
1950 | for(Int_t pW=0;pW<(1+(Int_t)(bUsePhiWeights||bUsePtWeights||bUseEtaWeights));pW++)\r | |
1951 | {\r | |
1952 | dfrParticleWeights[t][pW] = dynamic_cast<TList*>(dfrType[t]->FindObject(Form("%s, pWeights %s",typeFlag[t].Data(),pWeightsFlag[pW].Data())));\r | |
1953 | if(dfrParticleWeights[t][pW])\r | |
1954 | {\r | |
1955 | for(Int_t eW=0;eW<2;eW++)\r | |
1956 | {\r | |
1957 | dfrEventWeights[t][pW][eW] = dynamic_cast<TList*>(dfrParticleWeights[t][pW]->FindObject(Form("%s, pWeights %s, eWeights %s",typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())));\r | |
1958 | if(dfrEventWeights[t][pW][eW])\r | |
1959 | {\r | |
1960 | diffFlowFinalCorrelations[t][pW][eW] = dynamic_cast<TList*>(dfrEventWeights[t][pW][eW]->FindObject(Form("Correlations (%s, pWeights %s, eWeights %s)",typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())));\r | |
1961 | diffFlowFinalCorrections[t][pW][eW] = dynamic_cast<TList*>(dfrEventWeights[t][pW][eW]->FindObject(Form("Corrections (%s, pWeights %s, eWeights %s)",typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())));\r | |
1962 | diffFlowFinalCovariances[t][pW][eW] = dynamic_cast<TList*>(dfrEventWeights[t][pW][eW]->FindObject(Form("Covariances (%s, pWeights %s, eWeights %s)",typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data()))); \r | |
1963 | for(Int_t nua=0;nua<2;nua++)\r | |
1964 | {\r | |
1965 | dfrCorrections[t][pW][eW][nua] = dynamic_cast<TList*>(dfrEventWeights[t][pW][eW]->FindObject(Form("%s, pWeights %s, eWeights %s, %s for NUA",typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data(),nuaFlag[nua].Data())));\r | |
1966 | if(dfrCorrections[t][pW][eW][nua])\r | |
1967 | {\r | |
1968 | diffFlowFinalCumulants[t][pW][eW][nua] = dynamic_cast<TList*>(dfrCorrections[t][pW][eW][nua]->FindObject(Form("Cumulants (%s, pWeights %s, eWeights %s, %s for NUA)",typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data(),nuaFlag[nua].Data())));\r | |
1969 | diffFlowFinalFlow[t][pW][eW][nua] = dynamic_cast<TList*>(dfrCorrections[t][pW][eW][nua]->FindObject(Form("Differential Flow (%s, pWeights %s, eWeights %s, %s for NUA)",typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data(),nuaFlag[nua].Data())));\r | |
1970 | } else // to if(dfrCorrections[t][pW][eW][nua])\r | |
1971 | {\r | |
1972 | cout<<"WARNING: dfrCorrections[t][pW][eW][nua] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1973 | cout<<"t = "<<t<<endl;\r | |
1974 | cout<<"pW = "<<pW<<endl;\r | |
1975 | cout<<"eW = "<<eW<<endl;\r | |
1976 | cout<<"nua = "<<nua<<endl;\r | |
1977 | }\r | |
1978 | } // end of for(Int_t nua=0;nua<2;nua++)\r | |
1979 | } else // to if(dfrEventWeights[t][pW][eW])\r | |
1980 | {\r | |
1981 | cout<<"WARNING: dfrEventWeights[t][pW][eW] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1982 | cout<<"t = "<<t<<endl;\r | |
1983 | cout<<"pW = "<<pW<<endl;\r | |
1984 | cout<<"eW = "<<eW<<endl;\r | |
1985 | }\r | |
1986 | } // end of for(Int_t eW=0;eW<2;eW++)\r | |
1987 | } else // to if(dfrParticleWeights[t][pW])\r | |
1988 | {\r | |
1989 | cout<<"WARNING: dfrParticleWeights[t][pW] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1990 | cout<<"t = "<<t<<endl;\r | |
1991 | cout<<"pW = "<<pW<<endl;\r | |
1992 | }\r | |
1993 | } // end of for(Int_t pW=0;pW<(1+(Int_t)(bUsePhiWeights||bUsePtWeights||bUseEtaWeights));pW++)\r | |
1994 | } else // to if(dfrType[t])\r | |
1995 | {\r | |
1996 | cout<<"WARNING: dfrType[t] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
1997 | cout<<"t = "<<t<<endl;\r | |
1998 | }\r | |
1999 | } // end of for(Int_t t=0;t<2;t++)\r | |
2000 | } else // to if(diffFlowListResults)\r | |
2001 | {\r | |
2002 | cout<<"WARNING: diffFlowListResults is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2003 | }\r | |
2004 | \r | |
2005 | TH2D *finalCorrelations2D[2][2][2][4] = {{{{NULL}}}};\r | |
2006 | TH1D *finalCorrelations1D[2][2][2][2][4] = {{{{{NULL}}}}}; \r | |
2007 | TH2D *finalCumulants2D[2][2][2][2][4] = {{{{{NULL}}}}};\r | |
2008 | TH1D *finalCumulantsPt[2][2][2][2][4] = {{{{{NULL}}}}}; \r | |
2009 | TH1D *finalCumulantsEta[2][2][2][2][4] = {{{{{NULL}}}}}; \r | |
2010 | TH2D *finalCorrections2D[2][2][2][4] = {{{{NULL}}}};\r | |
2011 | TH1D *finalCorrections1D[2][2][2][2][4] = {{{{{NULL}}}}}; \r | |
2012 | TH2D *finalCovariances2D[2][2][2][4] = {{{{NULL}}}};\r | |
2013 | TH1D *finalCovariances1D[2][2][2][2][5] = {{{{{NULL}}}}}; \r | |
2014 | TH2D *finalFlow2D[2][2][2][2][4] = {{{{{NULL}}}}};\r | |
2015 | TH1D *finalFlowPt[2][2][2][2][4] = {{{{{NULL}}}}}; \r | |
2016 | TH1D *finalFlowEta[2][2][2][2][4] = {{{{{NULL}}}}}; \r | |
2017 | TH2D *nonEmptyBins2D[2] = {NULL};\r | |
2018 | //TH1D *nonEmptyBins1D[2][2] = {{NULL}};\r | |
2019 | \r | |
2020 | for(Int_t t=0;t<2;t++)\r | |
2021 | {\r | |
2022 | // 2D:\r | |
2023 | nonEmptyBins2D[t] = dynamic_cast<TH2D*>(dfrType[t]->FindObject(Form("%s, (p_{t},#eta)",typeFlag[t].Data())));\r | |
2024 | if(nonEmptyBins2D[t])\r | |
2025 | {\r | |
2026 | this->SetNonEmptyBins2D(nonEmptyBins2D[t],t);\r | |
2027 | } else\r | |
2028 | { \r | |
2029 | cout<<"WARNING: nonEmptyBins2D[t] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2030 | cout<<"t = "<<t<<endl;\r | |
2031 | }\r | |
2032 | // 1D:\r | |
2033 | \r | |
2034 | \r | |
2035 | \r | |
2036 | \r | |
2037 | \r | |
2038 | */\r | |
2039 | \r | |
2040 | \r | |
2041 | \r | |
2042 | \r | |
2043 | \r | |
2044 | /*\r | |
2045 | for(Int_t pe=0;pe<2;pe++)\r | |
2046 | {\r | |
2047 | nonEmptyBins1D[t][pe] = dynamic_cast<TH1D*>(dfrType[t]->FindObject(Form("%s, %s",typeFlag[t].Data(),ptEtaFlag[pe].Data())));\r | |
2048 | if(nonEmptyBins1D[t][pe])\r | |
2049 | {\r | |
2050 | this->SetNonEmptyBins1D(nonEmptyBins1D[t][pe],t,pe);\r | |
2051 | } else\r | |
2052 | { \r | |
2053 | cout<<"WARNING: nonEmptyBins1D[t][pe] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2054 | cout<<"t = "<<t<<endl;\r | |
2055 | cout<<"pe = "<<pe<<endl;\r | |
2056 | }\r | |
2057 | } \r | |
2058 | */ \r | |
2059 | \r | |
2060 | \r | |
2061 | \r | |
2062 | \r | |
2063 | \r | |
2064 | /*\r | |
2065 | \r | |
2066 | \r | |
2067 | \r | |
2068 | \r | |
2069 | \r | |
2070 | for(Int_t pW=0;pW<(1+(Int_t)(bUsePhiWeights||bUsePtWeights||bUseEtaWeights));pW++)\r | |
2071 | {\r | |
2072 | for(Int_t eW=0;eW<2;eW++)\r | |
2073 | {\r | |
2074 | // correlations:\r | |
2075 | if(diffFlowFinalCorrelations[t][pW][eW])\r | |
2076 | {\r | |
2077 | for(Int_t correlIndex=0;correlIndex<4;correlIndex++)\r | |
2078 | {\r | |
2079 | // 2D:\r | |
2080 | finalCorrelations2D[t][pW][eW][correlIndex] = dynamic_cast<TH2D*>(diffFlowFinalCorrelations[t][pW][eW]->FindObject(Form("%s, (p_{t},#eta)",correlationName[correlIndex].Data())));\r | |
2081 | if(finalCorrelations2D[t][pW][eW][correlIndex])\r | |
2082 | {\r | |
2083 | this->SetFinalCorrelations2D(finalCorrelations2D[t][pW][eW][correlIndex],t,pW,eW,correlIndex);\r | |
2084 | } else\r | |
2085 | {\r | |
2086 | cout<<"WARNING: finalCorrelations2D[t][pW][eW][correlIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2087 | cout<<"t = "<<t<<endl;\r | |
2088 | cout<<"pW = "<<pW<<endl;\r | |
2089 | cout<<"eW = "<<eW<<endl;\r | |
2090 | cout<<"ci = "<<correlIndex<<endl;\r | |
2091 | }\r | |
2092 | // 1D\r | |
2093 | for(Int_t pe=0;pe<2;pe++)\r | |
2094 | {\r | |
2095 | if(pe==0)\r | |
2096 | {\r | |
2097 | finalCorrelations1D[t][pW][eW][pe][correlIndex] = dynamic_cast<TH1D*>(diffFlowFinalCorrelations[t][pW][eW]->FindObject(Form("%s, (p_{t})",correlationName[correlIndex].Data())));\r | |
2098 | }\r | |
2099 | if(pe==1)\r | |
2100 | {\r | |
2101 | finalCorrelations1D[t][pW][eW][pe][correlIndex] = dynamic_cast<TH1D*>(diffFlowFinalCorrelations[t][pW][eW]->FindObject(Form("%s, (#eta)",correlationName[correlIndex].Data())));\r | |
2102 | } \r | |
2103 | if(finalCorrelations1D[t][pW][eW][pe][correlIndex])\r | |
2104 | {\r | |
2105 | this->SetFinalCorrelations1D(finalCorrelations1D[t][pW][eW][pe][correlIndex],t,pW,eW,pe,correlIndex);\r | |
2106 | } else\r | |
2107 | {\r | |
2108 | cout<<"WARNING: finalCorrelations1D[t][pW][eW][pe][correlIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2109 | cout<<"t = "<<t<<endl;\r | |
2110 | cout<<"pW = "<<pW<<endl;\r | |
2111 | cout<<"eW = "<<eW<<endl;\r | |
2112 | cout<<"pe = "<<pe<<endl;\r | |
2113 | cout<<"ci = "<<correlIndex<<endl;\r | |
2114 | } \r | |
2115 | } // end of for(Int_t pe=0;pe<2;pe++) \r | |
2116 | } // end of for(Int_t correlIndex=0;correlIndex<4;correlIndex++)\r | |
2117 | } else // to if(diffFlowFinalCorrelations[t][pW][eW])\r | |
2118 | { \r | |
2119 | cout<<"WARNING: diffFlowFinalCorrelations[t][pW] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2120 | cout<<"t = "<<t<<endl;\r | |
2121 | cout<<"pW = "<<pW<<endl;\r | |
2122 | cout<<"eW = "<<eW<<endl;\r | |
2123 | }\r | |
2124 | // corrections:\r | |
2125 | if(diffFlowFinalCorrections[t][pW][eW])\r | |
2126 | {\r | |
2127 | for(Int_t correctionIndex=0;correctionIndex<4;correctionIndex++)\r | |
2128 | {\r | |
2129 | // 2D:\r | |
2130 | finalCorrections2D[t][pW][eW][correctionIndex] = dynamic_cast<TH2D*>(diffFlowFinalCorrections[t][pW][eW]->FindObject(Form("%s, (p_{t},#eta)",correctionName[correctionIndex].Data())));\r | |
2131 | if(finalCorrections2D[t][pW][eW][correctionIndex])\r | |
2132 | {\r | |
2133 | this->SetFinalCorrections2D(finalCorrections2D[t][pW][eW][correctionIndex],t,pW,eW,correctionIndex);\r | |
2134 | } else\r | |
2135 | {\r | |
2136 | cout<<"WARNING: finalCorrections2D[t][pW][eW][correctionIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2137 | cout<<"t = "<<t<<endl;\r | |
2138 | cout<<"pW = "<<pW<<endl;\r | |
2139 | cout<<"eW = "<<eW<<endl;\r | |
2140 | cout<<"ci = "<<correctionIndex<<endl;\r | |
2141 | }\r | |
2142 | // 1D\r | |
2143 | for(Int_t pe=0;pe<2;pe++)\r | |
2144 | {\r | |
2145 | if(pe==0)\r | |
2146 | {\r | |
2147 | finalCorrections1D[t][pW][eW][pe][correctionIndex] = dynamic_cast<TH1D*>(diffFlowFinalCorrections[t][pW][eW]->FindObject(Form("%s, (p_{t})",correctionName[correctionIndex].Data())));\r | |
2148 | }\r | |
2149 | if(pe==1)\r | |
2150 | {\r | |
2151 | finalCorrections1D[t][pW][eW][pe][correctionIndex] = dynamic_cast<TH1D*>(diffFlowFinalCorrections[t][pW][eW]->FindObject(Form("%s, (#eta)",correctionName[correctionIndex].Data())));\r | |
2152 | } \r | |
2153 | if(finalCorrections1D[t][pW][eW][pe][correctionIndex])\r | |
2154 | {\r | |
2155 | this->SetFinalCorrections1D(finalCorrections1D[t][pW][eW][pe][correctionIndex],t,pW,eW,pe,correctionIndex);\r | |
2156 | } else\r | |
2157 | {\r | |
2158 | cout<<"WARNING: finalCorrections1D[t][pW][eW][pe][correctionIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2159 | cout<<"t = "<<t<<endl;\r | |
2160 | cout<<"pW = "<<pW<<endl;\r | |
2161 | cout<<"eW = "<<eW<<endl;\r | |
2162 | cout<<"pe = "<<pe<<endl;\r | |
2163 | cout<<"ci = "<<correctionIndex<<endl;\r | |
2164 | } \r | |
2165 | } // end of for(Int_t pe=0;pe<2;pe++) \r | |
2166 | } // end of for(Int_t correctionIndex=0;correctionIndex<4;correctionIndex++)\r | |
2167 | } else // to if(diffFlowFinalCorrections[t][pW][eW])\r | |
2168 | { \r | |
2169 | cout<<"WARNING: diffFlowFinalCorrections[t][pW][eW] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2170 | cout<<"t = "<<t<<endl;\r | |
2171 | cout<<"pW = "<<pW<<endl;\r | |
2172 | cout<<"eW = "<<eW<<endl;\r | |
2173 | } \r | |
2174 | // covariances:\r | |
2175 | if(diffFlowFinalCovariances[t][pW][eW])\r | |
2176 | {\r | |
2177 | for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++)\r | |
2178 | {\r | |
2179 | // 2D:\r | |
2180 | finalCovariances2D[t][pW][eW][covarianceIndex] = dynamic_cast<TH2D*>(diffFlowFinalCovariances[t][pW][eW]->FindObject(Form("%s, (p_{t},#eta)",covarianceName[covarianceIndex].Data())));\r | |
2181 | if(finalCovariances2D[t][pW][eW][covarianceIndex])\r | |
2182 | {\r | |
2183 | this->SetFinalCovariances2D(finalCovariances2D[t][pW][eW][covarianceIndex],t,pW,eW,covarianceIndex);\r | |
2184 | } else\r | |
2185 | {\r | |
2186 | cout<<"WARNING: finalCovariances2D[t][pW][eW][nua][covarianceIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2187 | cout<<"t = "<<t<<endl;\r | |
2188 | cout<<"pW = "<<pW<<endl;\r | |
2189 | cout<<"eW = "<<eW<<endl;\r | |
2190 | cout<<"ci = "<<covarianceIndex<<endl;\r | |
2191 | }\r | |
2192 | // 1D:\r | |
2193 | for(Int_t pe=0;pe<2;pe++)\r | |
2194 | {\r | |
2195 | if(pe==0)\r | |
2196 | {\r | |
2197 | finalCovariances1D[t][pW][eW][pe][covarianceIndex] = dynamic_cast<TH1D*>(diffFlowFinalCovariances[t][pW][eW]->FindObject(Form("%s, (p_{t})",covarianceName[covarianceIndex].Data())));\r | |
2198 | }\r | |
2199 | if(pe==1)\r | |
2200 | {\r | |
2201 | finalCovariances1D[t][pW][eW][pe][covarianceIndex] = dynamic_cast<TH1D*>(diffFlowFinalCovariances[t][pW][eW]->FindObject(Form("%s, (#eta)",covarianceName[covarianceIndex].Data())));\r | |
2202 | } \r | |
2203 | if(finalCovariances1D[t][pW][eW][pe][covarianceIndex])\r | |
2204 | {\r | |
2205 | this->SetFinalCovariances1D(finalCovariances1D[t][pW][eW][pe][covarianceIndex],t,pW,eW,pe,covarianceIndex);\r | |
2206 | } else\r | |
2207 | {\r | |
2208 | cout<<"WARNING: finalCovariances1D[t][pW][eW][pe][covarianceIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2209 | cout<<"t = "<<t<<endl;\r | |
2210 | cout<<"pW = "<<pW<<endl;\r | |
2211 | cout<<"eW = "<<eW<<endl;\r | |
2212 | cout<<"pe = "<<pe<<endl;\r | |
2213 | cout<<"ci = "<<covarianceIndex<<endl;\r | |
2214 | } \r | |
2215 | } // end of for(Int_t pe=0;pe<2;pe++) \r | |
2216 | } // end of for(Int_t covarianceIndex=0;covarianceIndex<4;covarianceIndex++)\r | |
2217 | } else // to if(diffFlowFinalCovariances[t][pW][eW])\r | |
2218 | { \r | |
2219 | cout<<"WARNING: diffFlowFinalCovariances[t][pW][eW] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2220 | cout<<"t = "<<t<<endl;\r | |
2221 | cout<<"pW = "<<pW<<endl;\r | |
2222 | cout<<"eW = "<<eW<<endl;\r | |
2223 | } \r | |
2224 | \r | |
2225 | for(Int_t nua=0;nua<2;nua++)\r | |
2226 | { \r | |
2227 | // cumulants:\r | |
2228 | if(diffFlowFinalCumulants[t][pW][eW][nua])\r | |
2229 | {\r | |
2230 | for(Int_t cumulantIndex=0;cumulantIndex<4;cumulantIndex++)\r | |
2231 | {\r | |
2232 | // 2D:\r | |
2233 | finalCumulants2D[t][pW][eW][nua][cumulantIndex] = dynamic_cast<TH2D*>(diffFlowFinalCumulants[t][pW][eW][nua]->FindObject(Form("%s, (p_{t},#eta)",cumulantName[cumulantIndex].Data())));\r | |
2234 | if(finalCumulants2D[t][pW][eW][nua][cumulantIndex])\r | |
2235 | {\r | |
2236 | this->SetFinalCumulants2D(finalCumulants2D[t][pW][eW][nua][cumulantIndex],t,pW,eW,nua,cumulantIndex);\r | |
2237 | } else\r | |
2238 | {\r | |
2239 | cout<<"WARNING: finalCumulants2D[t][pW][eW][nua][cumulantIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2240 | cout<<"t = "<<t<<endl;\r | |
2241 | cout<<"pW = "<<pW<<endl;\r | |
2242 | cout<<"eW = "<<eW<<endl;\r | |
2243 | cout<<"nua = "<<nua<<endl;\r | |
2244 | cout<<"ci = "<<cumulantIndex<<endl;\r | |
2245 | }\r | |
2246 | // pt: \r | |
2247 | finalCumulantsPt[t][pW][eW][nua][cumulantIndex] = dynamic_cast<TH1D*>(diffFlowFinalCumulants[t][pW][eW][nua]->FindObject(Form("%s, (p_{t})",cumulantName[cumulantIndex].Data())));\r | |
2248 | if(finalCumulantsPt[t][pW][eW][nua][cumulantIndex])\r | |
2249 | {\r | |
2250 | this->SetFinalCumulantsPt(finalCumulantsPt[t][pW][eW][nua][cumulantIndex],t,pW,eW,nua,cumulantIndex);\r | |
2251 | } else\r | |
2252 | {\r | |
2253 | cout<<"WARNING: finalCumulantsPt[t][pW][eW][nua][cumulantIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2254 | cout<<"t = "<<t<<endl;\r | |
2255 | cout<<"pW = "<<pW<<endl;\r | |
2256 | cout<<"eW = "<<eW<<endl;\r | |
2257 | cout<<"nua = "<<nua<<endl;\r | |
2258 | cout<<"ci = "<<cumulantIndex<<endl;\r | |
2259 | } \r | |
2260 | // eta:\r | |
2261 | finalCumulantsEta[t][pW][eW][nua][cumulantIndex] = dynamic_cast<TH1D*>(diffFlowFinalCumulants[t][pW][eW][nua]->FindObject(Form("%s, (#eta)",cumulantName[cumulantIndex].Data())));\r | |
2262 | if(finalCumulantsEta[t][pW][eW][nua][cumulantIndex])\r | |
2263 | {\r | |
2264 | this->SetFinalCumulantsEta(finalCumulantsEta[t][pW][eW][nua][cumulantIndex],t,pW,eW,nua,cumulantIndex);\r | |
2265 | } else\r | |
2266 | {\r | |
2267 | cout<<"WARNING: finalCumulantsEta[t][pW][eW][nua][cumulantIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2268 | cout<<"t = "<<t<<endl;\r | |
2269 | cout<<"pW = "<<pW<<endl;\r | |
2270 | cout<<"eW = "<<eW<<endl;\r | |
2271 | cout<<"nua = "<<nua<<endl;\r | |
2272 | cout<<"ci = "<<cumulantIndex<<endl;\r | |
2273 | } \r | |
2274 | } // end of for(Int_t cumulantIndex=0;cumulantIndex<4;cumulantIndex++)\r | |
2275 | } else // to if(diffFlowFinalCumulants[t][pW][eW][nua])\r | |
2276 | { \r | |
2277 | cout<<"WARNING: diffFlowFinalCumulants[t][pW][eW][nua] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2278 | cout<<"t = "<<t<<endl;\r | |
2279 | cout<<"pW = "<<pW<<endl;\r | |
2280 | cout<<"eW = "<<eW<<endl;\r | |
2281 | cout<<"nua = "<<nua<<endl;\r | |
2282 | } \r | |
2283 | // flow:\r | |
2284 | if(diffFlowFinalFlow[t][pW][eW][nua])\r | |
2285 | {\r | |
2286 | for(Int_t flowIndex=0;flowIndex<4;flowIndex++)\r | |
2287 | {\r | |
2288 | // 2D:\r | |
2289 | finalFlow2D[t][pW][eW][nua][flowIndex] = dynamic_cast<TH2D*>(diffFlowFinalFlow[t][pW][eW][nua]->FindObject(Form("%s, (p_{t},#eta)",flowName[flowIndex].Data())));\r | |
2290 | if(finalFlow2D[t][pW][eW][nua][flowIndex])\r | |
2291 | {\r | |
2292 | this->SetFinalFlow2D(finalFlow2D[t][pW][eW][nua][flowIndex],t,pW,eW,nua,flowIndex);\r | |
2293 | } else\r | |
2294 | {\r | |
2295 | cout<<"WARNING: finalFlow2D[t][pW][eW][nua][flowIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2296 | cout<<"t = "<<t<<endl;\r | |
2297 | cout<<"pW = "<<pW<<endl;\r | |
2298 | cout<<"eW = "<<eW<<endl;\r | |
2299 | cout<<"nua = "<<nua<<endl;\r | |
2300 | cout<<"ci = "<<flowIndex<<endl;\r | |
2301 | }\r | |
2302 | // pt:\r | |
2303 | finalFlowPt[t][pW][eW][nua][flowIndex] = dynamic_cast<TH1D*>(diffFlowFinalFlow[t][pW][eW][nua]->FindObject(Form("%s, (p_{t})",flowName[flowIndex].Data())));\r | |
2304 | if(finalFlowPt[t][pW][eW][nua][flowIndex])\r | |
2305 | {\r | |
2306 | this->SetFinalFlowPt(finalFlowPt[t][pW][eW][nua][flowIndex],t,pW,eW,nua,flowIndex);\r | |
2307 | } else\r | |
2308 | {\r | |
2309 | cout<<"WARNING: finalFlow1D[t][pW][nua][flowIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2310 | cout<<"t = "<<t<<endl;\r | |
2311 | cout<<"pW = "<<pW<<endl;\r | |
2312 | cout<<"eW = "<<eW<<endl;\r | |
2313 | cout<<"nua = "<<nua<<endl;\r | |
2314 | cout<<"ci = "<<flowIndex<<endl;\r | |
2315 | } \r | |
2316 | // eta: \r | |
2317 | finalFlowEta[t][pW][eW][nua][flowIndex] = dynamic_cast<TH1D*>(diffFlowFinalFlow[t][pW][eW][nua]->FindObject(Form("%s, (#eta)",flowName[flowIndex].Data()))); \r | |
2318 | if(finalFlowEta[t][pW][eW][nua][flowIndex])\r | |
2319 | {\r | |
2320 | this->SetFinalFlowEta(finalFlowEta[t][pW][eW][nua][flowIndex],t,pW,eW,nua,flowIndex);\r | |
2321 | } else\r | |
2322 | {\r | |
2323 | cout<<"WARNING: finalFlow1D[t][pW][nua][flowIndex] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2324 | cout<<"t = "<<t<<endl;\r | |
2325 | cout<<"pW = "<<pW<<endl;\r | |
2326 | cout<<"eW = "<<eW<<endl;\r | |
2327 | cout<<"nua = "<<nua<<endl;\r | |
2328 | cout<<"ci = "<<flowIndex<<endl;\r | |
2329 | } \r | |
2330 | } // end of for(Int_t flowIndex=0;flowIndex<4;flowIndex++)\r | |
2331 | } else // to if(diffFlowFinalFlow[t][pW][eW][nua])\r | |
2332 | { \r | |
2333 | cout<<"WARNING: diffFlowFinalFlow[t][pW][eW][nua] is NULL in AFAWQC::GOH() !!!!"<<endl;\r | |
2334 | cout<<"t = "<<t<<endl;\r | |
2335 | cout<<"pW = "<<pW<<endl;\r | |
2336 | cout<<"eW = "<<eW<<endl;\r | |
2337 | cout<<"nua = "<<nua<<endl;\r | |
2338 | } \r | |
2339 | } // end of for(Int_t nua=0;nua<2;nua++)\r | |
2340 | } // end of for(Int_t eW=0;eW<2;eW++) \r | |
2341 | } // end of for(Int_t pW=0;pW<(1+(Int_t)(bUsePhiWeights||bUsePtWeights||bUseEtaWeights));pW++)\r | |
2342 | } // end of for(Int_t t=0;t<2;t++)\r | |
2343 | \r | |
2344 | // x.) nested loops:\r | |
2345 | TList *nestedLoopsList = dynamic_cast<TList*>(outputListHistos->FindObject("Nested Loops"));\r | |
2346 | if(nestedLoopsList) this->SetNestedLoopsList(nestedLoopsList);\r | |
2347 | TProfile *evaluateNestedLoops = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fEvaluateNestedLoops"));\r | |
2348 | Bool_t bEvaluateNestedLoopsForIntFlow = kFALSE;\r | |
2349 | Bool_t bEvaluateNestedLoopsForDiffFlow = kFALSE;\r | |
2350 | if(evaluateNestedLoops)\r | |
2351 | {\r | |
2352 | this->SetEvaluateNestedLoops(evaluateNestedLoops);\r | |
2353 | bEvaluateNestedLoopsForIntFlow = (Int_t)evaluateNestedLoops->GetBinContent(1);\r | |
2354 | bEvaluateNestedLoopsForDiffFlow = (Int_t)evaluateNestedLoops->GetBinContent(2);\r | |
2355 | }\r | |
2356 | \r | |
2357 | if(bEvaluateNestedLoopsForIntFlow)\r | |
2358 | {\r | |
2359 | TProfile *directCorrelations = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrelation"));\r | |
2360 | if(directCorrelations) this->SetDirectCorrelations(directCorrelations);\r | |
2361 | TProfile *directCorrectionsCos = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsCos"));\r | |
2362 | if(directCorrectionsCos) this->SetDirectCorrectionsCos(directCorrectionsCos);\r | |
2363 | TProfile *directCorrectionsSin = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsSin"));\r | |
2364 | if(directCorrectionsSin) this->SetDirectCorrectionsSin(directCorrectionsSin);\r | |
2365 | if(bUsePhiWeights||bUsePtWeights||bUseEtaWeights)\r | |
2366 | {\r | |
2367 | TProfile *directCorrelationsW = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrelationW"));\r | |
2368 | if(directCorrelationsW) this->SetDirectCorrelationsW(directCorrelationsW);\r | |
2369 | TProfile *directCorrectionsCosW = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsCosW"));\r | |
2370 | if(directCorrectionsCosW) this->SetDirectCorrectionsCosW(directCorrectionsCosW);\r | |
2371 | TProfile *directCorrectionsSinW = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsSinW")); \r | |
2372 | if(directCorrectionsSinW) this->SetDirectCorrectionsSinW(directCorrectionsSinW);\r | |
2373 | }\r | |
2374 | }\r | |
2375 | \r | |
2376 | if(bEvaluateNestedLoopsForDiffFlow)\r | |
2377 | {\r | |
2378 | TProfile *directCorrelationsDiffFlow = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrelationsDiffFlow"));\r | |
2379 | if(directCorrelationsDiffFlow) this->SetDirectCorrelationsDiffFlow(directCorrelationsDiffFlow);\r | |
2380 | TProfile *directCorrectionsDiffFlowCos = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsDiffFlowCos"));\r | |
2381 | if(directCorrectionsDiffFlowCos) this->SetDirectCorrectionsDiffFlowCos(directCorrectionsDiffFlowCos);\r | |
2382 | TProfile *directCorrectionsDiffFlowSin = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsDiffFlowSin"));\r | |
2383 | if(directCorrectionsDiffFlowSin) this->SetDirectCorrectionsDiffFlowSin(directCorrectionsDiffFlowSin);\r | |
2384 | if(bUsePhiWeights||bUsePtWeights||bUseEtaWeights)\r | |
2385 | {\r | |
2386 | TProfile *directCorrelationsDiffFlowW = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrelationsDiffFlowW")); \r | |
2387 | if(directCorrelationsDiffFlowW) this->SetDirectCorrelationsDiffFlowW(directCorrelationsDiffFlowW);\r | |
2388 | TProfile *directCorrectionsDiffFlowCosW = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsDiffFlowCosW"));\r | |
2389 | if(directCorrectionsDiffFlowCosW) this->SetDirectCorrectionsDiffFlowCosW(directCorrectionsDiffFlowCosW);\r | |
2390 | TProfile *directCorrectionsDiffFlowSinW = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsDiffFlowSinW"));\r | |
2391 | if(directCorrectionsDiffFlowSinW) this->SetDirectCorrectionsDiffFlowSinW(directCorrectionsDiffFlowSinW);\r | |
2392 | }\r | |
2393 | }\r | |
2394 | \r | |
2395 | } \r | |
2396 | \r | |
2397 | */\r | |
2398 | \r | |
2399 | \r | |
2400 | \r | |
2401 | }\r | |
2402 | \r | |
2403 | \r | |
2404 | //================================================================================================================================\r | |
2405 | \r | |
2406 | \r | |
2407 | TProfile* AliFlowAnalysisWithQCumulants::MakePtProjection(TProfile2D *profilePtEta) const\r | |
2408 | {\r | |
2409 | // project 2D profile onto pt axis to get 1D profile\r | |
2410 | \r | |
2411 | Int_t nBinsPt = profilePtEta->GetNbinsX();\r | |
2412 | Double_t dPtMin = (profilePtEta->GetXaxis())->GetXmin();\r | |
2413 | Double_t dPtMax = (profilePtEta->GetXaxis())->GetXmax();\r | |
2414 | \r | |
2415 | Int_t nBinsEta = profilePtEta->GetNbinsY();\r | |
2416 | \r | |
2417 | TProfile *profilePt = new TProfile("","",nBinsPt,dPtMin,dPtMax); \r | |
2418 | \r | |
2419 | for(Int_t p=1;p<=nBinsPt;p++)\r | |
2420 | {\r | |
2421 | Double_t contentPt = 0.;\r | |
2422 | Double_t entryPt = 0.;\r | |
2423 | Double_t spreadPt = 0.;\r | |
2424 | Double_t sum1 = 0.;\r | |
2425 | Double_t sum2 = 0.;\r | |
2426 | Double_t sum3 = 0.;\r | |
2427 | for(Int_t e=1;e<=nBinsEta;e++)\r | |
2428 | {\r | |
2429 | contentPt += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)))\r | |
2430 | * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));\r | |
2431 | entryPt += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));\r | |
2432 | \r | |
2433 | sum1 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)))\r | |
2434 | * (pow(profilePtEta->GetBinError(profilePtEta->GetBin(p,e)),2.)\r | |
2435 | + pow(profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)),2.)); \r | |
2436 | sum2 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));\r | |
2437 | sum3 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)))\r | |
2438 | * (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))); \r | |
2439 | }\r | |
2440 | if(sum2>0. && sum1/sum2-pow(sum3/sum2,2.) > 0.)\r | |
2441 | {\r | |
2442 | spreadPt = pow(sum1/sum2-pow(sum3/sum2,2.),0.5);\r | |
2443 | }\r | |
2444 | profilePt->SetBinContent(p,contentPt);\r | |
2445 | profilePt->SetBinEntries(p,entryPt);\r | |
2446 | {\r | |
2447 | profilePt->SetBinError(p,spreadPt);\r | |
2448 | }\r | |
2449 | \r | |
2450 | }\r | |
2451 | \r | |
2452 | return profilePt;\r | |
2453 | \r | |
2454 | } // end of TProfile* AliFlowAnalysisWithQCumulants::MakePtProjection(TProfile2D *profilePtEta)\r | |
2455 | \r | |
2456 | \r | |
2457 | //================================================================================================================================\r | |
2458 | \r | |
2459 | \r | |
2460 | TProfile* AliFlowAnalysisWithQCumulants::MakeEtaProjection(TProfile2D *profilePtEta) const\r | |
2461 | {\r | |
2462 | // project 2D profile onto eta axis to get 1D profile\r | |
2463 | \r | |
2464 | Int_t nBinsEta = profilePtEta->GetNbinsY();\r | |
2465 | Double_t dEtaMin = (profilePtEta->GetYaxis())->GetXmin();\r | |
2466 | Double_t dEtaMax = (profilePtEta->GetYaxis())->GetXmax();\r | |
2467 | \r | |
2468 | Int_t nBinsPt = profilePtEta->GetNbinsX();\r | |
2469 | \r | |
2470 | TProfile *profileEta = new TProfile("","",nBinsEta,dEtaMin,dEtaMax); \r | |
2471 | \r | |
2472 | for(Int_t e=1;e<=nBinsEta;e++)\r | |
2473 | {\r | |
2474 | Double_t contentEta = 0.;\r | |
2475 | Double_t entryEta = 0.;\r | |
2476 | for(Int_t p=1;p<=nBinsPt;p++)\r | |
2477 | {\r | |
2478 | contentEta += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)))\r | |
2479 | * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));\r | |
2480 | entryEta += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));\r | |
2481 | }\r | |
2482 | profileEta->SetBinContent(e,contentEta);\r | |
2483 | profileEta->SetBinEntries(e,entryEta);\r | |
2484 | }\r | |
2485 | \r | |
2486 | return profileEta;\r | |
2487 | \r | |
2488 | } // end of TProfile* AliFlowAnalysisWithQCumulants::MakeEtaProjection(TProfile2D *profilePtEta)\r | |
2489 | \r | |
2490 | \r | |
2491 | //================================================================================================================================\r | |
2492 | \r | |
2493 | \r | |
2494 | void AliFlowAnalysisWithQCumulants::CalculateFinalCorrectionsForNonUniformAcceptanceForDifferentialFlow(Bool_t useParticleWeights,TString type)\r | |
2495 | {\r | |
2496 | \r | |
2497 | useParticleWeights=kFALSE;\r | |
2498 | type="ac";\r | |
2499 | \r | |
2500 | // calculate final corrections due to non-uniform acceptance of the detector to reduced multi-particle correlations\r | |
2501 | /*\r | |
2502 | if(!(useParticleWeights))\r | |
2503 | {\r | |
2504 | if(type == "POI")\r | |
2505 | { \r | |
2506 | // **** corrections for non-uniform acceptance for 2nd order QC' for POI's ****\r | |
2507 | \r | |
2508 | // 1st term: <<cos(n*psi)>><<cos(n*phi)>>:\r | |
2509 | if(fCorrectionsCosP1nPsiPtEtaPOI && fQCorrectionsCos)\r | |
2510 | {\r | |
2511 | // pt,eta: \r | |
2512 | if(f2pFinalCorrectionsForNUAPtEtaPOI) f2pFinalCorrectionsForNUAPtEtaPOI->Reset(); // to be improved\r | |
2513 | TH2D *correctionPtEta1stTerm = new TH2D(*(fCorrectionsCosP1nPsiPtEtaPOI->ProjectionXY("","e")));\r | |
2514 | correctionPtEta1stTerm->Scale(fQCorrectionsCos->GetBinContent(1)); // to be improved: are errors propagated correctly here? \r | |
2515 | if(f2pFinalCorrectionsForNUAPtEtaPOI) f2pFinalCorrectionsForNUAPtEtaPOI->Add(correctionPtEta1stTerm); // to be improved (if condition goes somewhere else)\r | |
2516 | delete correctionPtEta1stTerm;\r | |
2517 | // pt:\r | |
2518 | if(f2pFinalCorrectionsForNUAPtPOI) f2pFinalCorrectionsForNUAPtPOI->Reset(); // to be improved\r | |
2519 | TH1D *correctionPt1stTerm = new TH1D(*((this->MakePtProjection(fCorrectionsCosP1nPsiPtEtaPOI))->ProjectionX("","e"))); // to be improved: are errors propagated correctly here? \r | |
2520 | correctionPt1stTerm->Scale(fQCorrectionsCos->GetBinContent(1)); // to be improved: are errors propagated correctly here? \r | |
2521 | if(f2pFinalCorrectionsForNUAPtPOI) f2pFinalCorrectionsForNUAPtPOI->Add(correctionPt1stTerm); // to be improved (if condition goes somewhere else)\r | |
2522 | delete correctionPt1stTerm;\r | |
2523 | // eta:\r | |
2524 | if(f2pFinalCorrectionsForNUAEtaPOI) f2pFinalCorrectionsForNUAEtaPOI->Reset(); // to be improved \r | |
2525 | TH1D *correctionEta1stTerm = new TH1D(*((this->MakeEtaProjection(fCorrectionsCosP1nPsiPtEtaPOI))->ProjectionX("","e"))); // to be improved: are errors propagated correctly here? \r | |
2526 | correctionEta1stTerm->Scale(fQCorrectionsCos->GetBinContent(1)); // to be improved: are errors propagated correctly here? \r | |
2527 | if(f2pFinalCorrectionsForNUAEtaPOI) f2pFinalCorrectionsForNUAEtaPOI->Add(correctionEta1stTerm); // to be improved (if condition goes somewhere else)\r | |
2528 | delete correctionEta1stTerm; \r | |
2529 | } else\r | |
2530 | { \r | |
2531 | cout<<"WARNING: (fCorrectionsCosP1nPsiPtEtaPOI && fQCorrectionsCos && f2pFinalCorrectionsForNUAPtEtaPOI) is NULL in QC::CFCFNUAFDF() !!!! "<<endl;\r | |
2532 | cout<<" Corrections for non-uniform acceptance for differential flow are not correct."<<endl;\r | |
2533 | } \r | |
2534 | \r | |
2535 | // 2nd term: <<sin(n*psi)>><<sin(n*phi)>>: \r | |
2536 | if(fCorrectionsSinP1nPsiPtEtaPOI && fQCorrectionsSin)\r | |
2537 | {\r | |
2538 | // pt,eta:\r | |
2539 | TH2D *correctionPtEta2ndTerm = new TH2D(*(fCorrectionsSinP1nPsiPtEtaPOI->ProjectionXY("","e")));\r | |
2540 | correctionPtEta2ndTerm->Scale(fQCorrectionsSin->GetBinContent(1)); // to be improved: are errors propagated correctly here? \r | |
2541 | if(f2pFinalCorrectionsForNUAPtEtaPOI) f2pFinalCorrectionsForNUAPtEtaPOI->Add(correctionPtEta2ndTerm); // to be improved (if condition goes somewhere else)\r | |
2542 | delete correctionPtEta2ndTerm;\r | |
2543 | // pt:\r | |
2544 | TH1D *correctionPt2ndTerm = new TH1D(*((this->MakePtProjection(fCorrectionsSinP1nPsiPtEtaPOI))->ProjectionX("","e"))); // to be improved: are errors propagated correctly here? \r | |
2545 | correctionPt2ndTerm->Scale(fQCorrectionsSin->GetBinContent(1)); // to be improved: are errors propagated correctly here? \r | |
2546 | if(f2pFinalCorrectionsForNUAPtPOI) f2pFinalCorrectionsForNUAPtPOI->Add(correctionPt2ndTerm); // to be improved (if condition goes somewhere else)\r | |
2547 | delete correctionPt2ndTerm;\r | |
2548 | // eta:\r | |
2549 | TH1D *correctionEta2ndTerm = new TH1D(*((this->MakeEtaProjection(fCorrectionsSinP1nPsiPtEtaPOI))->ProjectionX("","e"))); // to be improved: are errors propagated correctly here? \r | |
2550 | correctionEta2ndTerm->Scale(fQCorrectionsSin->GetBinContent(1)); // to be improved: are errors propagated correctly here? \r | |
2551 | if(f2pFinalCorrectionsForNUAEtaPOI) f2pFinalCorrectionsForNUAEtaPOI->Add(correctionEta2ndTerm); // to be improved (if condition goes somewhere else)\r | |
2552 | delete correctionEta2ndTerm; \r | |
2553 | } else\r | |
2554 | { \r | |
2555 | cout<<"WARNING: (fCorrectionsSinP1nPsiPtEtaPOI && fQCorrectionsSin) is NULL in QC::CFCFNUAFDF() !!!! "<<endl;\r | |
2556 | cout<<" Corrections for non-uniform acceptance for differential flow are not correct."<<endl;\r | |
2557 | } \r | |
2558 | } else if(type == "RP")\r | |
2559 | {\r | |
2560 | // **** corrections for non-uniform acceptance for 2nd order QC' for RP's ****\r | |
2561 | \r | |
2562 | // 1st term: <<cos(n*psi)>><<cos(n*phi)>>:\r | |
2563 | if(fCorrectionsCosP1nPsiPtEtaRP && fQCorrectionsCos)\r | |
2564 | {\r | |
2565 | // pt,eta: \r | |
2566 | if(f2pFinalCorrectionsForNUAPtEtaRP) f2pFinalCorrectionsForNUAPtEtaRP->Reset(); // to be improved\r | |
2567 | TH2D *correctionPtEta1stTerm = new TH2D(*(fCorrectionsCosP1nPsiPtEtaRP->ProjectionXY("","e")));\r | |
2568 | correctionPtEta1stTerm->Scale(fQCorrectionsCos->GetBinContent(1)); // to be improved: are errors propagated correctly here? \r | |
2569 | if(f2pFinalCorrectionsForNUAPtEtaRP) f2pFinalCorrectionsForNUAPtEtaRP->Add(correctionPtEta1stTerm); // to be improved (if condition goes somewhere else)\r | |
2570 | delete correctionPtEta1stTerm;\r | |
2571 | // pt:\r | |
2572 | if(f2pFinalCorrectionsForNUAPtRP) f2pFinalCorrectionsForNUAPtRP->Reset(); // to be improved\r | |
2573 | TH1D *correctionPt1stTerm = new TH1D(*((this->MakePtProjection(fCorrectionsCosP1nPsiPtEtaRP))->ProjectionX("","e"))); // to be improved: are errors propagated correctly here? \r | |
2574 | correctionPt1stTerm->Scale(fQCorrectionsCos->GetBinContent(1)); // to be improved: are errors propagated correctly here? \r | |
2575 | if(f2pFinalCorrectionsForNUAPtRP) f2pFinalCorrectionsForNUAPtRP->Add(correctionPt1stTerm); // to be improved (if condition goes somewhere else)\r | |
2576 | delete correctionPt1stTerm;\r | |
2577 | // eta:\r | |
2578 | if(f2pFinalCorrectionsForNUAEtaRP) f2pFinalCorrectionsForNUAEtaRP->Reset(); // to be improved\r | |
2579 | TH1D *correctionEta1stTerm = new TH1D(*((this->MakeEtaProjection(fCorrectionsCosP1nPsiPtEtaRP))->ProjectionX("","e"))); // to be improved: are errors propagated correctly here? \r | |
2580 | correctionEta1stTerm->Scale(fQCorrectionsCos->GetBinContent(1)); // to be improved: are errors propagated correctly here? \r | |
2581 | if(f2pFinalCorrectionsForNUAEtaRP) f2pFinalCorrectionsForNUAEtaRP->Add(correctionEta1stTerm); // to be improved (if condition goes somewhere else)\r | |
2582 | delete correctionEta1stTerm; \r | |
2583 | } else\r | |
2584 | { \r | |
2585 | cout<<"WARNING: (fCorrectionsCosP1nPsiPtEtaRP && fQCorrectionsCos) is NULL in QC::CFCFNUAFDF() !!!! "<<endl;\r | |
2586 | cout<<" Corrections for non-uniform acceptance for differential flow are not correct."<<endl;\r | |
2587 | } \r | |
2588 | // 2nd term: <<sin(n*psi)>><<sin(n*phi)>>: \r | |
2589 | if(fCorrectionsSinP1nPsiPtEtaRP && fQCorrectionsSin)\r | |
2590 | {\r | |
2591 | // pt,eta: \r | |
2592 | TH2D *correctionPtEta2ndTerm = new TH2D(*(fCorrectionsSinP1nPsiPtEtaRP->ProjectionXY("","e")));\r | |
2593 | correctionPtEta2ndTerm->Scale(fQCorrectionsSin->GetBinContent(1)); // to be improved: are errors propagated correctly here? \r | |
2594 | if(f2pFinalCorrectionsForNUAPtEtaRP) f2pFinalCorrectionsForNUAPtEtaRP->Add(correctionPtEta2ndTerm); // to be improved (if condition goes somewhere else)\r | |
2595 | delete correctionPtEta2ndTerm;\r | |
2596 | // pt:\r | |
2597 | TH1D *correctionPt2ndTerm = new TH1D(*((this->MakePtProjection(fCorrectionsSinP1nPsiPtEtaRP))->ProjectionX("","e"))); // to be improved: are errors propagated correctly here? \r | |
2598 | correctionPt2ndTerm->Scale(fQCorrectionsSin->GetBinContent(1)); // to be improved: are errors propagated correctly here? \r | |
2599 | if(f2pFinalCorrectionsForNUAPtRP) f2pFinalCorrectionsForNUAPtRP->Add(correctionPt2ndTerm); // to be improved (if condition goes somewhere else)\r | |
2600 | delete correctionPt2ndTerm;\r | |
2601 | // eta:\r | |
2602 | TH1D *correctionEta2ndTerm = new TH1D(*((this->MakeEtaProjection(fCorrectionsSinP1nPsiPtEtaRP))->ProjectionX("","e"))); // to be improved: are errors propagated correctly here? \r | |
2603 | correctionEta2ndTerm->Scale(fQCorrectionsSin->GetBinContent(1)); // to be improved: are errors propagated correctly here? \r | |
2604 | if(f2pFinalCorrectionsForNUAEtaRP) f2pFinalCorrectionsForNUAEtaRP->Add(correctionEta2ndTerm); // to be improved (if condition goes somewhere else)\r | |
2605 | delete correctionEta2ndTerm; \r | |
2606 | } else\r | |
2607 | { \r | |
2608 | cout<<"WARNING: (fCorrectionsSinP1nPsiPtEtaRP && fQCorrectionsSin) is NULL in QC::CFCFNUAFDF() !!!! "<<endl;\r | |
2609 | cout<<" Corrections for non-uniform acceptance for differential flow are not correct."<<endl;\r | |
2610 | } \r | |
2611 | } else // to else if(type == "RP")\r | |
2612 | {\r | |
2613 | cout<<"WARNING: Type must be either POI or RP in QC::CFCFNUAFDF() !!!! "<<endl;\r | |
2614 | cout<<" Corrections for non-uniform acceptance for differential flow were not calculated."<<endl;\r | |
2615 | } \r | |
2616 | } else // to if(!(useParticleWeights))\r | |
2617 | {\r | |
2618 | // ...\r | |
2619 | }\r | |
2620 | */\r | |
2621 | } // end of AliFlowAnalysisWithQCumulants::CalculateFinalCorrectionsForNonUniformAcceptanceForDifferentialFlow(Bool_t useParticleWeights,TString type)\r | |
2622 | \r | |
2623 | \r | |
2624 | //==================================================================================================================================\r | |
2625 | \r | |
2626 | /*\r | |
2627 | void AliFlowAnalysisWithQCumulants::CalculateFinalResultsForDifferentialFlow(\r | |
2628 | TH2D *flowPtEta, TH1D *flowPt, TH1D *flowEta, \r | |
2629 | TProfile2D *profile2ndPtEta, TProfile2D *profile4thPtEta, \r | |
2630 | TProfile2D *profile6thPtEta, TProfile2D *profile8thPtEta)\r | |
2631 | {\r | |
2632 | // calculate and store the final results for integrated flow\r | |
2633 | \r | |
2634 | TString *namePtEta = new TString();\r | |
2635 | TString *type = new TString();\r | |
2636 | TString *order2nd = new TString();\r | |
2637 | TString *order4th = new TString();\r | |
2638 | TString *order6th = new TString();\r | |
2639 | TString *order8th = new TString(); \r | |
2640 | TString *pW = new TString();\r | |
2641 | \r | |
2642 | if(profile2ndPtEta) *namePtEta = profile2ndPtEta->GetName();\r | |
2643 | if(namePtEta->Contains("POI")) *type = "POI";\r | |
2644 | if(namePtEta->Contains("RP")) *type = "RP";\r | |
2645 | if(namePtEta->Contains("W")) *pW = "W";\r | |
2646 | if(namePtEta->Contains("2")) *order2nd = "2";\r | |
2647 | if(profile4thPtEta) *namePtEta = profile4thPtEta->GetName();\r | |
2648 | if(namePtEta->Contains("4")) *order4th = "4";\r | |
2649 | \r | |
2650 | if(profile6thPtEta) *namePtEta = profile6thPtEta->GetName();\r | |
2651 | if(namePtEta->Contains("6")) *order6th = "6";\r | |
2652 | \r | |
2653 | if(profile8thPtEta) *namePtEta = profile8thPtEta->GetName();\r | |
2654 | if(namePtEta->Contains("8")) *order8th = "8";\r | |
2655 | \r | |
2656 | TProfile *profile2ndPt = NULL;\r | |
2657 | TProfile *profile4thPt = NULL;\r | |
2658 | TProfile *profile6thPt = NULL;\r | |
2659 | TProfile *profile8thPt = NULL;\r | |
2660 | \r | |
2661 | TProfile *profile2ndEta = NULL;\r | |
2662 | TProfile *profile4thEta = NULL;\r | |
2663 | TProfile *profile6thEta = NULL;\r | |
2664 | TProfile *profile8thEta = NULL;\r | |
2665 | \r | |
2666 | if(*order2nd == "2")\r | |
2667 | {\r | |
2668 | profile2ndPt = new TProfile(*(this->MakePtProjection(profile2ndPtEta))); \r | |
2669 | profile2ndEta = new TProfile(*(this->MakeEtaProjection(profile2ndPtEta))); \r | |
2670 | if(*order4th == "4")\r | |
2671 | {\r | |
2672 | profile4thPt = new TProfile(*(this->MakePtProjection(profile4thPtEta))); \r | |
2673 | profile4thEta = new TProfile(*(this->MakeEtaProjection(profile4thPtEta))); \r | |
2674 | if(*order6th == "6")\r | |
2675 | {\r | |
2676 | profile6thPt = new TProfile(*(this->MakePtProjection(profile6thPtEta))); \r | |
2677 | profile6thEta = new TProfile(*(this->MakeEtaProjection(profile6thPtEta))); \r | |
2678 | if(*order8th == "8")\r | |
2679 | {\r | |
2680 | profile8thPt = new TProfile(*(this->MakePtProjection(profile8thPtEta))); \r | |
2681 | profile8thEta = new TProfile(*(this->MakeEtaProjection(profile8thPtEta))); \r | |
2682 | } \r | |
2683 | } \r | |
2684 | } \r | |
2685 | }\r | |
2686 | \r | |
2687 | Int_t nBinsPt = profile2ndPt->GetNbinsX();\r | |
2688 | Int_t nBinsEta = profile2ndEta->GetNbinsX();\r | |
2689 | \r | |
2690 | Double_t dV2 = 0.;\r | |
2691 | Double_t dV4 = 0.;\r | |
2692 | Double_t dV6 = 0.;\r | |
2693 | Double_t dV8 = 0.; \r | |
2694 | \r | |
2695 | if(!(*pW == "W"))\r | |
2696 | {\r | |
2697 | dV2 = fIntFlowResultsQC->GetBinContent(1); \r | |
2698 | dV4 = fIntFlowResultsQC->GetBinContent(2); \r | |
2699 | dV6 = fIntFlowResultsQC->GetBinContent(3); \r | |
2700 | dV8 = fIntFlowResultsQC->GetBinContent(4); \r | |
2701 | } \r | |
2702 | else if(*pW == "W")\r | |
2703 | {\r | |
2704 | dV2 = fIntFlowResultsQCW->GetBinContent(1); \r | |
2705 | dV4 = fIntFlowResultsQCW->GetBinContent(2); \r | |
2706 | dV6 = fIntFlowResultsQCW->GetBinContent(3); \r | |
2707 | dV8 = fIntFlowResultsQCW->GetBinContent(4); \r | |
2708 | } \r | |
2709 | \r | |
2710 | // 3D (pt,eta): \r | |
2711 | Double_t twoPrimePtEta = 0.; // <<2'>> (pt,eta) \r | |
2712 | Double_t fourPrimePtEta = 0.; // <<4'>> (pt,eta) \r | |
2713 | //Double_t sixPrimePtEta = 0.; // <<6'>> (pt,eta) \r | |
2714 | //Double_t eightPrimePtEta = 0.; // <<8'>> (pt,eta) \r | |
2715 | Double_t secondOrderDiffFlowCumulantPtEta = 0.; // d_n{2,Q} (pt,eta)\r | |
2716 | Double_t fourthOrderDiffFlowCumulantPtEta = 0.; // d_n{4,Q} (pt,eta) \r | |
2717 | //Double_t sixthOrderDiffFlowCumulantPtEta = 0.; // d_n{6,Q} (pt,eta)\r | |
2718 | //Double_t eightOrderDiffFlowCumulantPtEta = 0.; // d_n{8,Q} (pt,eta)2nd\r | |
2719 | Double_t dv2PtEta = 0.; // v'_n{2} (pt,eta) \r | |
2720 | Double_t dv4PtEta = 0.; // v'_n{4} (pt,eta) \r | |
2721 | //Double_t dv6PtEta = 0.; // v'_n{6} (pt,eta) \r | |
2722 | //Double_t dv8PtEta = 0.; // v'_n{8} (pt,eta) \r | |
2723 | \r | |
2724 | // 2D (pt): \r | |
2725 | Double_t twoPrimePt = 0.; // <<2'>> (pt) \r | |
2726 | Double_t fourPrimePt = 0.; // <<4'>> (pt) \r | |
2727 | //Double_t sixPrimePt = 0.; // <<6'>> (pt) \r | |
2728 | //Double_t eightPrimePt = 0.; // <<8'>> (pt) \r | |
2729 | Double_t secondOrderDiffFlowCumulantPt = 0.; // d_n{2,Q} (pt) \r | |
2730 | Double_t fourthOrderDiffFlowCumulantPt = 0.; // d_n{4,Q} (pt) \r | |
2731 | //Double_t sixthOrderDiffFlowCumulantPt = 0.; // d_n{6,Q} (pt)\r | |
2732 | //Double_t eightOrderDiffFlowCumulantPt = 0.; // d_n{8,Q} (pt)\r | |
2733 | Double_t dv2Pt = 0.; // v'_n{2} (pt)\r | |
2734 | Double_t dv4Pt = 0.; // v'_n{4} (pt)\r | |
2735 | //Double_t dv6Pt = 0.; // v'_n{6} (pt) \r | |
2736 | //Double_t dv8Pt = 0.; // v'_n{8} (pt) \r | |
2737 | \r | |
2738 | // 2D (eta): \r | |
2739 | Double_t twoPrimeEta = 0.; // <<2'>> (eta) \r | |
2740 | Double_t fourPrimeEta = 0.; // <<4>> (eta) \r | |
2741 | //Double_t sixPrimeEta = 0.; // <<6>> (eta) \r | |
2742 | //Double_t eightPrimeEta = 0.; // <<8'>> (eta) \r | |
2743 | Double_t secondOrderDiffFlowCumulantEta = 0.; // d_n{2,Q} (eta)\r | |
2744 | Double_t fourthOrderDiffFlowCumulantEta = 0.; // d_n{4,Q} (eta) \r | |
2745 | //Double_t sixthOrderDiffFlowCumulantEta = 0.; // d_n{6,Q} (eta) \r | |
2746 | //Double_t eightOrderDiffFlowCumulantEta = 0.; // d_n{8,Q} (eta) \r | |
2747 | Double_t dv2Eta = 0.; // v'_n{2} (eta)\r | |
2748 | Double_t dv4Eta = 0.; // v'_n{4} (eta)\r | |
2749 | //Double_t dv6Eta = 0.; // v'_n{6} (eta) \r | |
2750 | //Double_t dv8Eta = 0.; // v'_n{8} (eta)\r | |
2751 | \r | |
2752 | \r | |
2753 | // looping over (pt,eta) bins to calculate v'(pt,eta) \r | |
2754 | for(Int_t p=1;p<nBinsPt+1;p++)\r | |
2755 | {\r | |
2756 | for(Int_t e=1;e<nBinsEta+1;e++)\r | |
2757 | {\r | |
2758 | \r | |
2759 | // 2nd order: \r | |
2760 | twoPrimePtEta = profile2ndPtEta->GetBinContent(profile2ndPtEta->GetBin(p,e));\r | |
2761 | secondOrderDiffFlowCumulantPtEta = twoPrimePtEta;\r | |
2762 | \r | |
2763 | \r | |
2764 | //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r | |
2765 | // to be improved (applying correction for NUA):\r | |
2766 | if(namePtEta->Contains("POI"))\r | |
2767 | {\r | |
2768 | if(f2pFinalCorrectionsForNUAPtEtaPOI) secondOrderDiffFlowCumulantPtEta = twoPrimePtEta \r | |
2769 | - f2pFinalCorrectionsForNUAPtEtaPOI->GetBinContent(f2pFinalCorrectionsForNUAPtEtaPOI->GetBin(p,e)) ;\r | |
2770 | } else if (namePtEta->Contains("RP"))\r | |
2771 | { \r | |
2772 | if(f2pFinalCorrectionsForNUAPtEtaRP) secondOrderDiffFlowCumulantPtEta = twoPrimePtEta \r | |
2773 | - f2pFinalCorrectionsForNUAPtEtaRP->GetBinContent(f2pFinalCorrectionsForNUAPtEtaRP->GetBin(p,e));\r | |
2774 | }\r | |
2775 | //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r | |
2776 | \r | |
2777 | \r | |
2778 | if(dV2)\r | |
2779 | {\r | |
2780 | dv2PtEta = secondOrderDiffFlowCumulantPtEta/dV2;\r | |
2781 | if(*order2nd == "2") \r | |
2782 | {\r | |
2783 | flowPtEta->SetBinContent(p,e,dv2PtEta); \r | |
2784 | } \r | |
2785 | }\r | |
2786 | \r | |
2787 | // 4th order: \r | |
2788 | if(*order4th == "4" || *order6th == "6" || *order8th == "8")\r | |
2789 | {\r | |
2790 | fourPrimePtEta = profile4thPtEta->GetBinContent(profile4thPtEta->GetBin(p,e));\r | |
2791 | fourthOrderDiffFlowCumulantPtEta = fourPrimePtEta - 2.*twoPrimePtEta*pow(dV2,2.); // to be improved (correlations instead of pow(dV2,2.))\r | |
2792 | if(dV4)\r | |
2793 | {\r | |
2794 | dv4PtEta = -fourthOrderDiffFlowCumulantPtEta/pow(dV4,3);\r | |
2795 | if(*order4th == "4")\r | |
2796 | {\r | |
2797 | flowPtEta->SetBinContent(p,e,dv4PtEta);\r | |
2798 | } \r | |
2799 | }\r | |
2800 | } \r | |
2801 | \r | |
2802 | } // end of for(Int_t e=1;e<nBinsEta+1;e++)\r | |
2803 | } // end of for(Int_t p=1;p<nBinsPt+1;p++) \r | |
2804 | \r | |
2805 | \r | |
2806 | // looping over (pt) bins to calcualate v'(pt)\r | |
2807 | for(Int_t p=1;p<nBinsPt+1;p++)\r | |
2808 | {\r | |
2809 | \r | |
2810 | // 2nd order: \r | |
2811 | twoPrimePt = profile2ndPt->GetBinContent(p);\r | |
2812 | secondOrderDiffFlowCumulantPt = twoPrimePt;\r | |
2813 | \r | |
2814 | \r | |
2815 | //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r | |
2816 | // to be improved (applying correction for NUA):\r | |
2817 | if(namePtEta->Contains("POI"))\r | |
2818 | {\r | |
2819 | if(f2pFinalCorrectionsForNUAPtPOI) secondOrderDiffFlowCumulantPt = twoPrimePt\r | |
2820 | - f2pFinalCorrectionsForNUAPtPOI->GetBinContent(p) ;\r | |
2821 | } else if (namePtEta->Contains("RP"))\r | |
2822 | {\r | |
2823 | if(f2pFinalCorrectionsForNUAPtRP) secondOrderDiffFlowCumulantPt = twoPrimePt\r | |
2824 | - f2pFinalCorrectionsForNUAPtRP->GetBinContent(p);\r | |
2825 | }\r | |
2826 | //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r | |
2827 | \r | |
2828 | \r | |
2829 | if(dV2)\r | |
2830 | {\r | |
2831 | dv2Pt = secondOrderDiffFlowCumulantPt/dV2;\r | |
2832 | if(*order2nd == "2") \r | |
2833 | {\r | |
2834 | flowPt->SetBinContent(p,dv2Pt);\r | |
2835 | }\r | |
2836 | \r | |
2837 | // common control histos: (to be improved fill only once. now they are filled first without weights and then with weights):\r | |
2838 | if(namePtEta->Contains("POI") && *order2nd == "2")\r | |
2839 | {\r | |
2840 | fCommonHistsResults2nd->FillDifferentialFlowPtPOI(p,dv2Pt,0.); //to be improved (errors && bb or bb+1 ?)\r | |
2841 | } \r | |
2842 | else if(namePtEta->Contains("RP") && *order2nd == "2")\r | |
2843 | {\r | |
2844 | fCommonHistsResults2nd->FillDifferentialFlowPtRP(p,dv2Pt,0.); //to be improved (errors && bb or bb+1 ?)\r | |
2845 | }\r | |
2846 | \r | |
2847 | }\r | |
2848 | \r | |
2849 | // 4th order: \r | |
2850 | if(*order4th == "4" || *order6th == "6" || *order8th == "8")\r | |
2851 | {\r | |
2852 | fourPrimePt = profile4thPt->GetBinContent(profile4thPt->GetBin(p));\r | |
2853 | fourthOrderDiffFlowCumulantPt = fourPrimePt - 2.*twoPrimePt*pow(dV2,2.); // to be improved (correlations instead of pow(dV2,2.))\r | |
2854 | if(dV4)\r | |
2855 | {\r | |
2856 | dv4Pt = -fourthOrderDiffFlowCumulantPt/pow(dV4,3);\r | |
2857 | if(*order4th == "4") \r | |
2858 | {\r | |
2859 | flowPt->SetBinContent(p,dv4Pt);\r | |
2860 | }\r | |
2861 | \r | |
2862 | // common control histos: (to be improved):\r | |
2863 | if(namePtEta->Contains("POI") && *order4th == "4")\r | |
2864 | {\r | |
2865 | fCommonHistsResults4th->FillDifferentialFlowPtPOI(p,dv4Pt,0.); //to be improved (errors && bb or bb+1 ?)\r | |
2866 | } \r | |
2867 | else if(namePtEta->Contains("RP") && *order4th == "4" )\r | |
2868 | {\r | |
2869 | fCommonHistsResults4th->FillDifferentialFlowPtRP(p,dv4Pt,0.); //to be improved (errors && bb or bb+1 ?)\r | |
2870 | }\r | |
2871 | \r | |
2872 | }\r | |
2873 | } \r | |
2874 | \r | |
2875 | } // end of for(Int_t p=1;p<nBinsPt+1;p++) \r | |
2876 | \r | |
2877 | \r | |
2878 | // looping over (eta) bins to calcualate v'(eta)\r | |
2879 | for(Int_t e=1;e<nBinsEta+1;e++)\r | |
2880 | {\r | |
2881 | \r | |
2882 | // 2nd order: \r | |
2883 | twoPrimeEta = profile2ndEta->GetBinContent(e);\r | |
2884 | secondOrderDiffFlowCumulantEta = twoPrimeEta;\r | |
2885 | \r | |
2886 | \r | |
2887 | //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r | |
2888 | // to be improved (applying correction for NUA):\r | |
2889 | if(namePtEta->Contains("POI"))\r | |
2890 | {\r | |
2891 | if(f2pFinalCorrectionsForNUAEtaPOI) secondOrderDiffFlowCumulantEta = twoPrimeEta\r | |
2892 | - f2pFinalCorrectionsForNUAEtaPOI->GetBinContent(e) ;\r | |
2893 | } else if (namePtEta->Contains("RP"))\r | |
2894 | {\r | |
2895 | if(f2pFinalCorrectionsForNUAEtaRP) secondOrderDiffFlowCumulantEta = twoPrimeEta\r | |
2896 | - f2pFinalCorrectionsForNUAEtaRP->GetBinContent(e);\r | |
2897 | }\r | |
2898 | //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r | |
2899 | \r | |
2900 | \r | |
2901 | if(dV2)\r | |
2902 | {\r | |
2903 | dv2Eta = secondOrderDiffFlowCumulantEta/dV2;\r | |
2904 | if(*order2nd == "2") \r | |
2905 | {\r | |
2906 | flowEta->SetBinContent(e,dv2Eta);\r | |
2907 | }\r | |
2908 | \r | |
2909 | // common control histos: (to be improved):\r | |
2910 | if(namePtEta->Contains("POI") && *order2nd == "2")\r | |
2911 | {\r | |
2912 | fCommonHistsResults2nd->FillDifferentialFlowEtaPOI(e,dv2Eta,0.); //to be improved (errors && bb or bb+1 ?)\r | |
2913 | } \r | |
2914 | else if(namePtEta->Contains("RP") && *order2nd == "2")\r | |
2915 | {\r | |
2916 | fCommonHistsResults2nd->FillDifferentialFlowEtaRP(e,dv2Eta,0.); //to be improved (errors && bb or bb+1 ?)\r | |
2917 | }\r | |
2918 | \r | |
2919 | \r | |
2920 | }\r | |
2921 | \r | |
2922 | // 4th order: \r | |
2923 | if(*order4th == "4" || *order6th == "6" || *order8th == "8")\r | |
2924 | {\r | |
2925 | fourPrimeEta = profile4thEta->GetBinContent(profile4thEta->GetBin(e));\r | |
2926 | fourthOrderDiffFlowCumulantEta = fourPrimeEta - 2.*twoPrimeEta*pow(dV2,2.); // to be improved (correlations instead of pow(dV2,2.))\r | |
2927 | if(dV4)\r | |
2928 | {\r | |
2929 | dv4Eta = -fourthOrderDiffFlowCumulantEta/pow(dV4,3);\r | |
2930 | if(*order4th == "4")\r | |
2931 | {\r | |
2932 | flowEta->SetBinContent(e,dv4Eta);\r | |
2933 | }\r | |
2934 | \r | |
2935 | // common control histos: (to be improved):\r | |
2936 | if(namePtEta->Contains("POI") && *order4th == "4")\r | |
2937 | {\r | |
2938 | fCommonHistsResults4th->FillDifferentialFlowEtaPOI(e,dv4Eta,0.); //to be improved (errors && bb or bb+1 ?)\r | |
2939 | } \r | |
2940 | else if(namePtEta->Contains("RP") && *order4th == "4")\r | |
2941 | {\r | |
2942 | fCommonHistsResults4th->FillDifferentialFlowEtaRP(e,dv4Eta,0.); //to be improved (errors && bb or bb+1 ?)\r | |
2943 | }\r | |
2944 | \r | |
2945 | }\r | |
2946 | } \r | |
2947 | \r | |
2948 | } // end of for(Int_t e=1;e<nBinsEta+1;e++) \r | |
2949 | \r | |
2950 | delete namePtEta;\r | |
2951 | delete type;\r | |
2952 | delete order2nd;\r | |
2953 | delete order4th;\r | |
2954 | delete order6th;\r | |
2955 | delete order8th;\r | |
2956 | delete pW;\r | |
2957 | delete profile2ndPt;\r | |
2958 | delete profile4thPt;\r | |
2959 | delete profile6thPt;\r | |
2960 | delete profile8thPt;\r | |
2961 | delete profile2ndEta;\r | |
2962 | delete profile4thEta;\r | |
2963 | delete profile6thEta;\r | |
2964 | delete profile8thEta;\r | |
2965 | \r | |
2966 | } // end of AliFlowAnalysisWithQCumulants::CalculateFinalResultsForDifferentialFlow(Bool_t useParticleWeights, TString type)\r | |
2967 | */\r | |
2968 | \r | |
2969 | //================================================================================================================================\r | |
2970 | \r | |
2971 | \r | |
2972 | void AliFlowAnalysisWithQCumulants::PrintFinalResultsForIntegratedFlow(TString type)\r | |
2973 | {\r | |
2974 | // printing on the screen the final results for integrated flow (NONAME, POI and RP) // to be improved (NONAME) \r | |
2975 | \r | |
2976 | Int_t n = fHarmonic; \r | |
2977 | \r | |
2978 | if(type == "NONAME" || type == "RP" || type == "POI")\r | |
2979 | {\r | |
2980 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th))\r | |
2981 | {\r | |
2982 | cout<<"WARNING: fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl;\r | |
2983 | cout<<" is NULL in AFAWQC::PFRFIF() !!!!"<<endl;\r | |
2984 | }\r | |
2985 | } else\r | |
2986 | {\r | |
2987 | cout<<"WARNING: type in not from {NONAME, RP, POI} in AFAWQC::PFRFIF() !!!!"<<endl;\r | |
2988 | exit(0);\r | |
2989 | }\r | |
2990 | \r | |
2991 | Double_t dVn[4] = {0.}; // array to hold Vn{2}, Vn{4}, Vn{6} and Vn{8} \r | |
2992 | Double_t dVnErr[4] = {0.}; // array to hold errors of Vn{2}, Vn{4}, Vn{6} and Vn{8} \r | |
2993 | \r | |
2994 | if(type == "NONAME")\r | |
2995 | {\r | |
2996 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlow())->GetBinContent(1); \r | |
2997 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlow())->GetBinError(1); \r | |
2998 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlow())->GetBinContent(1); \r | |
2999 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlow())->GetBinError(1); \r | |
3000 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlow())->GetBinContent(1); \r | |
3001 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlow())->GetBinError(1); \r | |
3002 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlow())->GetBinContent(1); \r | |
3003 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlow())->GetBinError(1); \r | |
3004 | } else if(type == "RP")\r | |
3005 | {\r | |
3006 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlowRP())->GetBinContent(1); \r | |
3007 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlowRP())->GetBinError(1); \r | |
3008 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlowRP())->GetBinContent(1); \r | |
3009 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlowRP())->GetBinError(1); \r | |
3010 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlowRP())->GetBinContent(1); \r | |
3011 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlowRP())->GetBinError(1); \r | |
3012 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlowRP())->GetBinContent(1); \r | |
3013 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlowRP())->GetBinError(1); \r | |
3014 | } else if(type == "POI")\r | |
3015 | {\r | |
3016 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlowPOI())->GetBinContent(1); \r | |
3017 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlowPOI())->GetBinError(1); \r | |
3018 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlowPOI())->GetBinContent(1); \r | |
3019 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlowPOI())->GetBinError(1); \r | |
3020 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlowPOI())->GetBinContent(1); \r | |
3021 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlowPOI())->GetBinError(1); \r | |
3022 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlowPOI())->GetBinContent(1); \r | |
3023 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlowPOI())->GetBinError(1); \r | |
3024 | }\r | |
3025 | \r | |
3026 | TString title = " flow estimates from Q-cumulants"; \r | |
3027 | TString subtitle = " ("; \r | |
3028 | \r | |
3029 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights))\r | |
3030 | {\r | |
3031 | subtitle.Append(type);\r | |
3032 | subtitle.Append(", without weights)");\r | |
3033 | } else \r | |
3034 | {\r | |
3035 | subtitle.Append(type);\r | |
3036 | subtitle.Append(", with weights)");\r | |
3037 | }\r | |
3038 | \r | |
3039 | cout<<endl;\r | |
3040 | cout<<"*************************************"<<endl;\r | |
3041 | cout<<"*************************************"<<endl;\r | |
3042 | cout<<title.Data()<<endl; \r | |
3043 | cout<<subtitle.Data()<<endl; \r | |
3044 | cout<<endl;\r | |
3045 | \r | |
3046 | for(Int_t i=0;i<4;i++)\r | |
3047 | {\r | |
3048 | if(dVn[i]>=0.)\r | |
3049 | {\r | |
3050 | cout<<" v_"<<n<<"{"<<2*(i+1)<<"} = "<<dVn[i]<<" +/- "<<dVnErr[i]<<endl;\r | |
3051 | }\r | |
3052 | else\r | |
3053 | {\r | |
3054 | cout<<" v_"<<n<<"{"<<2*(i+1)<<"} = Im"<<endl;\r | |
3055 | } \r | |
3056 | }\r | |
3057 | \r | |
3058 | cout<<endl;\r | |
3059 | /*\r | |
3060 | if(type == "NONAME")\r | |
3061 | {\r | |
3062 | cout<<" nEvts = "<<nEvtsNoName<<", AvM = "<<dMultNoName<<endl; // to be improved\r | |
3063 | }\r | |
3064 | else if (type == "RP")\r | |
3065 | {\r | |
3066 | cout<<" nEvts = "<<nEvtsRP<<", AvM = "<<dMultRP<<endl; // to be improved \r | |
3067 | } \r | |
3068 | else if (type == "POI")\r | |
3069 | {\r | |
3070 | cout<<" nEvts = "<<nEvtsPOI<<", AvM = "<<dMultPOI<<endl; // to be improved \r | |
3071 | } \r | |
3072 | */\r | |
3073 | cout<<"*************************************"<<endl;\r | |
3074 | cout<<"*************************************"<<endl;\r | |
3075 | cout<<endl; \r | |
3076 | \r | |
3077 | }// end of AliFlowAnalysisWithQCumulants::PrintFinalResultsForIntegratedFlow(TString type="NONAME");\r | |
3078 | \r | |
3079 | \r | |
3080 | //================================================================================================================================\r | |
3081 | \r | |
3082 | \r | |
3083 | void AliFlowAnalysisWithQCumulants::CompareResultsFromNestedLoopsAndFromQVectorsForDiffFlow(Bool_t useParticleWeights)\r | |
3084 | {\r | |
3085 | // compare correlations needed for diff. flow calculated with nested loops and those calculated from Q-vectors\r | |
3086 | \r | |
3087 | cout<<endl;\r | |
3088 | cout<<" *************************************"<<endl;\r | |
3089 | cout<<" **** cross-checking the formulas ****"<<endl;\r | |
3090 | cout<<" **** for differential flow ****"<<endl;\r | |
3091 | cout<<" **** ****"<<endl;\r | |
3092 | cout<<" **** (pt,eta) bin: ****"<<endl; \r | |
3093 | cout<<" **** 1.1 < pt < 1.2 GeV ****"<<endl; \r | |
3094 | cout<<" **** -0.55 < eta < -0.525 ****"<<endl; \r | |
3095 | cout<<" *************************************"<<endl; \r | |
3096 | cout<<endl;\r | |
3097 | \r | |
3098 | if(!useParticleWeights)\r | |
3099 | { \r | |
3100 | cout<<"<cos(n(psi1-phi2))> from Q-vectors = "<<fCorrelationsPro[0][0][0][0]->GetBinContent(fCorrelationsPro[0][0][0][0]->GetBin(12,19))<<endl;\r | |
3101 | cout<<"<cos(n(psi1-phi2))> from nested loops = "<<fDirectCorrelationsDiffFlow->GetBinContent(1)<<endl;\r | |
3102 | cout<<endl; \r | |
3103 | cout<<"<cos(n(psi1+phi2-phi3-phi4))> from Q-vectors = "<<fCorrelationsPro[0][0][0][1]->GetBinContent(fCorrelationsPro[0][0][0][1]->GetBin(12,19))<<endl;\r | |
3104 | cout<<"<cos(n(psi1+phi2-phi3-phi4))> from nested loops = "<<fDirectCorrelationsDiffFlow->GetBinContent(41)<<endl;\r | |
3105 | cout<<endl; \r | |
3106 | cout<<"****************************************************"<<endl;\r | |
3107 | cout<<"****************************************************"<<endl;\r | |
3108 | cout<<endl;\r | |
3109 | /*\r | |
3110 | cout<<"<cos(n(psi1))> from Q-vectors = "<<fCorrectionsCosP1nPsiPtEtaPOI->GetBinContent(fCorrectionsCosP1nPsiPtEtaPOI->GetBin(12,19))<<endl;\r | |
3111 | cout<<"<cos(n(psi1))> from nested loops = "<<fDirectCorrectionsDiffFlowCos->GetBinContent(1)<<endl;\r | |
3112 | cout<<endl; \r | |
3113 | cout<<"<sin(n(psi1))> from Q-vectors = "<<fCorrectionsSinP1nPsiPtEtaPOI->GetBinContent(fCorrectionsSinP1nPsiPtEtaPOI->GetBin(12,19))<<endl;\r | |
3114 | cout<<"<sin(n(psi1))> from nested loops = "<<fDirectCorrectionsDiffFlowSin->GetBinContent(1)<<endl;\r | |
3115 | cout<<endl;\r | |
3116 | */\r | |
3117 | }\r | |
3118 | \r | |
3119 | if(useParticleWeights)\r | |
3120 | {\r | |
3121 | cout<<"<w2 cos(n(psi1-phi2))> from Q-vectors (RP) = "<<fCorrelationsPro[0][1][0][0]->GetBinContent(fCorrelationsPro[0][1][0][0]->GetBin(12,19))<<endl;\r | |
3122 | cout<<"<w2 cos(n(psi1-phi2))> from Q-vectors (POI) = "<<fCorrelationsPro[1][1][0][0]->GetBinContent(fCorrelationsPro[1][1][0][0]->GetBin(12,19))<<endl;\r | |
3123 | cout<<"<w2 cos(n(psi1-phi2))> from nested loops = "<<fDirectCorrelationsDiffFlowW->GetBinContent(1)<<endl;\r | |
3124 | cout<<endl; \r | |
3125 | cout<<"<w2 w3 w4 cos(n(psi1+phi2-phi3-phi4))> from Q-vectors (RP) = "<<fCorrelationsPro[0][1][0][1]->GetBinContent(fCorrelationsPro[0][1][0][1]->GetBin(12,19))<<endl;\r | |
3126 | cout<<"<w2 w3 w4 cos(n(psi1+phi2-phi3-phi4))> from Q-vectors (POI) = "<<fCorrelationsPro[1][1][0][1]->GetBinContent(fCorrelationsPro[1][1][0][1]->GetBin(12,19))<<endl;\r | |
3127 | cout<<"<w2 w3 w4 cos(n(psi1+phi2-phi3-phi4))> from nested loops = "<<fDirectCorrelationsDiffFlowW->GetBinContent(41)<<endl;\r | |
3128 | cout<<endl; \r | |
3129 | }\r | |
3130 | \r | |
3131 | } // end of void AliFlowAnalysisWithQCumulants::CompareResultsFromNestedLoopsAndFromQVectorsForDiffFlow()\r | |
3132 | \r | |
3133 | \r | |
3134 | //================================================================================================================================\r | |
3135 | \r | |
3136 | \r | |
3137 | void AliFlowAnalysisWithQCumulants::WriteHistograms(TString outputFileName)\r | |
3138 | {\r | |
3139 | //store the final results in output .root file\r | |
3140 | TFile *output = new TFile(outputFileName.Data(),"RECREATE");\r | |
3141 | //output->WriteObject(fHistList, "cobjQC","SingleKey");\r | |
3142 | fHistList->Write(fHistList->GetName(), TObject::kSingleKey);\r | |
3143 | delete output;\r | |
3144 | }\r | |
3145 | \r | |
3146 | \r | |
3147 | //================================================================================================================================\r | |
3148 | \r | |
3149 | \r | |
3150 | void AliFlowAnalysisWithQCumulants::BookCommonHistograms()\r | |
3151 | {\r | |
afa4af05 | 3152 | // Book common control histograms and common histograms for final results.\r |
3153 | // common control histogram (ALL events) | |
3154 | TString commonHistsName = "AliFlowCommonHistQC";\r | |
3155 | commonHistsName += fAnalysisLabel->Data(); | |
3156 | fCommonHists = new AliFlowCommonHist(commonHistsName.Data());\r | |
e2168f8f | 3157 | fHistList->Add(fCommonHists); \r |
e2168f8f | 3158 | // common control histogram (for events with 2 and more particles)\r |
afa4af05 | 3159 | TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC";\r |
3160 | commonHists2ndOrderName += fAnalysisLabel->Data(); | |
3161 | fCommonHists2nd = new AliFlowCommonHist(commonHists2ndOrderName.Data());\r | |
e2168f8f | 3162 | fHistList->Add(fCommonHists2nd); \r |
e2168f8f | 3163 | // common control histogram (for events with 4 and more particles)\r |
afa4af05 | 3164 | TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC";\r |
3165 | commonHists4thOrderName += fAnalysisLabel->Data(); | |
3166 | fCommonHists4th = new AliFlowCommonHist(commonHists4thOrderName.Data());\r | |
e2168f8f | 3167 | fHistList->Add(fCommonHists4th); \r |
e2168f8f | 3168 | // common control histogram (for events with 6 and more particles)\r |
afa4af05 | 3169 | TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC";\r |
3170 | commonHists6thOrderName += fAnalysisLabel->Data(); | |
3171 | fCommonHists6th = new AliFlowCommonHist(commonHists6thOrderName.Data());\r | |
e2168f8f | 3172 | fHistList->Add(fCommonHists6th); \r |
e2168f8f | 3173 | // common control histogram (for events with 8 and more particles)\r |
afa4af05 | 3174 | TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC";\r |
3175 | commonHists8thOrderName += fAnalysisLabel->Data(); | |
3176 | fCommonHists8th = new AliFlowCommonHist(commonHists8thOrderName.Data());\r | |
3177 | fHistList->Add(fCommonHists8th); \r | |
e2168f8f | 3178 | // common histograms for final results (calculated for events with 2 and more particles)\r |
afa4af05 | 3179 | TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC";\r |
3180 | commonHistResults2ndOrderName += fAnalysisLabel->Data(); | |
3181 | fCommonHistsResults2nd = new AliFlowCommonHistResults(commonHistResults2ndOrderName.Data());\r | |
3182 | fHistList->Add(fCommonHistsResults2nd); \r | |
e2168f8f | 3183 | // common histograms for final results (calculated for events with 4 and more particles)\r |
afa4af05 | 3184 | TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC";\r |
3185 | commonHistResults4thOrderName += fAnalysisLabel->Data(); | |
3186 | fCommonHistsResults4th = new AliFlowCommonHistResults(commonHistResults4thOrderName.Data());\r | |
3187 | fHistList->Add(fCommonHistsResults4th); \r | |
e2168f8f | 3188 | // common histograms for final results (calculated for events with 6 and more particles)\r |
afa4af05 | 3189 | TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC";\r |
3190 | commonHistResults6thOrderName += fAnalysisLabel->Data(); | |
3191 | fCommonHistsResults6th = new AliFlowCommonHistResults(commonHistResults6thOrderName.Data());\r | |
3192 | fHistList->Add(fCommonHistsResults6th); | |
e2168f8f | 3193 | // common histograms for final results (calculated for events with 8 and more particles)\r |
afa4af05 | 3194 | TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC";\r |
3195 | commonHistResults8thOrderName += fAnalysisLabel->Data(); | |
3196 | fCommonHistsResults8th = new AliFlowCommonHistResults(commonHistResults8thOrderName.Data());\r | |
e2168f8f | 3197 | fHistList->Add(fCommonHistsResults8th); \r |
3198 | \r | |
3199 | } // end of void AliFlowAnalysisWithQCumulants::BookCommonHistograms()\r | |
3200 | \r | |
3201 | \r | |
3202 | //================================================================================================================================\r | |
3203 | \r | |
3204 | \r | |
3205 | void AliFlowAnalysisWithQCumulants::BookAndFillWeightsHistograms()\r | |
3206 | {\r | |
3207 | // book and fill histograms which hold phi, pt and eta weights\r | |
3208 | \r | |
3209 | if(!fWeightsList)\r | |
3210 | {\r | |
3211 | cout<<"WARNING: fWeightsList is NULL in AFAWQC::BAFWH() !!!!"<<endl;\r | |
3212 | exit(0); \r | |
3213 | }\r | |
3214 | \r | |
3215 | TString fUseParticleWeightsName = "fUseParticleWeightsQC";\r | |
3216 | fUseParticleWeightsName += fAnalysisLabel->Data();\r | |
3217 | fUseParticleWeights = new TProfile(fUseParticleWeightsName.Data(),"0 = particle weight not used, 1 = particle weight used ",3,0,3);\r | |
3218 | fUseParticleWeights->SetLabelSize(0.06);\r | |
3219 | (fUseParticleWeights->GetXaxis())->SetBinLabel(1,"w_{#phi}");\r | |
3220 | (fUseParticleWeights->GetXaxis())->SetBinLabel(2,"w_{p_{T}}");\r | |
3221 | (fUseParticleWeights->GetXaxis())->SetBinLabel(3,"w_{#eta}");\r | |
3222 | fUseParticleWeights->Fill(0.5,(Int_t)fUsePhiWeights);\r | |
3223 | fUseParticleWeights->Fill(1.5,(Int_t)fUsePtWeights);\r | |
3224 | fUseParticleWeights->Fill(2.5,(Int_t)fUseEtaWeights);\r | |
3225 | fWeightsList->Add(fUseParticleWeights); \r | |
3226 | \r | |
3227 | if(fUsePhiWeights)\r | |
3228 | {\r | |
3229 | if(fWeightsList->FindObject("phi_weights"))\r | |
3230 | {\r | |
3231 | fPhiWeights = dynamic_cast<TH1F*>(fWeightsList->FindObject("phi_weights"));\r | |
3232 | if(fPhiWeights->GetBinWidth(1) != fPhiBinWidth)\r | |
3233 | {\r | |
3234 | cout<<"WARNING: fPhiWeights->GetBinWidth(1) != fPhiBinWidth in AFAWQC::BAFWH() !!!! "<<endl;\r | |
3235 | cout<<" This indicates inconsistent binning in phi histograms throughout the code."<<endl;\r | |
3236 | exit(0);\r | |
3237 | }\r | |
3238 | } else \r | |
3239 | {\r | |
3240 | cout<<"WARNING: fWeightsList->FindObject(\"phi_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;\r | |
3241 | exit(0);\r | |
3242 | }\r | |
3243 | } // end of if(fUsePhiWeights)\r | |
3244 | \r | |
3245 | if(fUsePtWeights) \r | |
3246 | {\r | |
3247 | if(fWeightsList->FindObject("pt_weights"))\r | |
3248 | {\r | |
3249 | fPtWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("pt_weights"));\r | |
3250 | if(fPtWeights->GetBinWidth(1) != fPtBinWidth)\r | |
3251 | {\r | |
3252 | cout<<"WARNING: fPtWeights->GetBinWidth(1) != fPtBinWidth in AFAWQC::BAFWH() !!!! "<<endl;\r | |
3253 | cout<<" This indicates insconsistent binning in pt histograms throughout the code."<<endl;\r | |
3254 | exit(0);\r | |
3255 | }\r | |
3256 | } else \r | |
3257 | {\r | |
3258 | cout<<"WARNING: fWeightsList->FindObject(\"pt_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;\r | |
3259 | exit(0);\r | |
3260 | }\r | |
3261 | } // end of if(fUsePtWeights) \r | |
3262 | \r | |
3263 | if(fUseEtaWeights) \r | |
3264 | {\r | |
3265 | if(fWeightsList->FindObject("eta_weights"))\r | |
3266 | {\r | |
3267 | fEtaWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("eta_weights"));\r | |
3268 | if(fEtaWeights->GetBinWidth(1) != fEtaBinWidth)\r | |
3269 | {\r | |
3270 | cout<<"WARNING: fEtaWeights->GetBinWidth(1) != fEtaBinWidth in AFAWQC::BAFWH() !!!! "<<endl;\r | |
3271 | cout<<" This indicates insconsistent binning in eta histograms throughout the code."<<endl;\r | |
3272 | exit(0);\r | |
3273 | }\r | |
3274 | } else \r | |
3275 | {\r | |
3276 | cout<<"WARNING: fUseEtaWeights && fWeightsList->FindObject(\"eta_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;\r | |
3277 | exit(0);\r | |
3278 | }\r | |
3279 | } // end of if(fUseEtaWeights)\r | |
3280 | \r | |
3281 | } // end of AliFlowAnalysisWithQCumulants::BookAndFillWeightsHistograms()\r | |
3282 | \r | |
3283 | \r | |
3284 | //================================================================================================================================\r | |
3285 | \r | |
3286 | \r | |
3287 | void AliFlowAnalysisWithQCumulants::BookEverythingForIntegratedFlow()\r | |
3288 | {\r | |
3289 | // Book all objects for integrated flow:\r | |
3290 | // a) Book profile to hold all flags for integrated flow.\r | |
3291 | // b) Book event-by-event quantities.\r | |
3292 | // c) Book profiles. // to be improved (comment)\r | |
3293 | // d) Book histograms holding the final results.\r | |
3294 | \r | |
3295 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?)\r | |
3296 | TString powerFlag[2] = {"linear","quadratic"}; // to be improved (should I promote this to data members?)\r | |
3297 | \r | |
3298 | // a) Book profile to hold all flags for integrated flow:\r | |
3299 | TString intFlowFlagsName = "fIntFlowFlags";\r | |
3300 | intFlowFlagsName += fAnalysisLabel->Data();\r | |
3301 | fIntFlowFlags = new TProfile(intFlowFlagsName.Data(),"Flags for Integrated Flow",3,0,3);\r | |
3302 | fIntFlowFlags->SetTickLength(-0.01,"Y");\r | |
3303 | fIntFlowFlags->SetMarkerStyle(25);\r | |
3304 | fIntFlowFlags->SetLabelSize(0.05);\r | |
3305 | fIntFlowFlags->SetLabelOffset(0.02,"Y");\r | |
3306 | (fIntFlowFlags->GetXaxis())->SetBinLabel(1,"Particle Weights");\r | |
3307 | (fIntFlowFlags->GetXaxis())->SetBinLabel(2,"Event Weights");\r | |
3308 | (fIntFlowFlags->GetXaxis())->SetBinLabel(3,"Corrected for NUA?");\r | |
3309 | fIntFlowList->Add(fIntFlowFlags);\r | |
3310 | \r | |
3311 | // b) Book event-by-event quantities:\r | |
3312 | // Re[Q_{m*n,k}], Im[Q_{m*n,k}] and S_{p,k}^M: \r | |
3313 | fReQ = new TMatrixD(4,9);\r | |
3314 | fImQ = new TMatrixD(4,9);\r | |
3315 | fSMpk = new TMatrixD(8,9);\r | |
3316 | // average correlations <2>, <4>, <6> and <8> for single event (bining is the same as in fIntFlowCorrelationsPro and fIntFlowCorrelationsHist):\r | |
3317 | TString intFlowCorrelationsEBEName = "fIntFlowCorrelationsEBE";\r | |
3318 | intFlowCorrelationsEBEName += fAnalysisLabel->Data();\r | |
3319 | fIntFlowCorrelationsEBE = new TH1D(intFlowCorrelationsEBEName.Data(),intFlowCorrelationsEBEName.Data(),4,0,4);\r | |
3320 | // average all correlations for single event (bining is the same as in fIntFlowCorrelationsAllPro and fIntFlowCorrelationsAllHist):\r | |
3321 | TString intFlowCorrelationsAllEBEName = "fIntFlowCorrelationsAllEBE";\r | |
3322 | intFlowCorrelationsAllEBEName += fAnalysisLabel->Data();\r | |
3323 | fIntFlowCorrelationsAllEBE = new TH1D(intFlowCorrelationsAllEBEName.Data(),intFlowCorrelationsAllEBEName.Data(),32,0,32);\r | |
3324 | // average correction terms for non-uniform acceptance for single event \r | |
3325 | // (binning is the same as in fIntFlowCorrectionTermsForNUAPro[2] and fIntFlowCorrectionTermsForNUAHist[2]):\r | |
3326 | TString fIntFlowCorrectionTermsForNUAEBEName = "fIntFlowCorrectionTermsForNUAEBE";\r | |
3327 | fIntFlowCorrectionTermsForNUAEBEName += fAnalysisLabel->Data();\r | |
3328 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms\r | |
3329 | {\r | |
3330 | fIntFlowCorrectionTermsForNUAEBE[sc] = new TH1D(Form("%s: %s terms",fIntFlowCorrectionTermsForNUAEBEName.Data(),sinCosFlag[sc].Data()),Form("Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),10,0,10); \r | |
3331 | }\r | |
3332 | \r | |
3333 | // c) Book profiles: // to be improved (comment)\r | |
3334 | // profile to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8:\r | |
3335 | TString avMultiplicityName = "fAvMultiplicity";\r | |
3336 | avMultiplicityName += fAnalysisLabel->Data();\r | |
3337 | fAvMultiplicity = new TProfile(avMultiplicityName.Data(),"Average Multiplicities of RPs",9,0,9);\r | |
3338 | fAvMultiplicity->SetTickLength(-0.01,"Y");\r | |
3339 | fAvMultiplicity->SetMarkerStyle(25);\r | |
3340 | fAvMultiplicity->SetLabelSize(0.05);\r | |
3341 | fAvMultiplicity->SetLabelOffset(0.02,"Y");\r | |
3342 | fAvMultiplicity->SetYTitle("Average Multiplicity");\r | |
3343 | (fAvMultiplicity->GetXaxis())->SetBinLabel(1,"all evts");\r | |
3344 | (fAvMultiplicity->GetXaxis())->SetBinLabel(2,"n_{RP} #geq 1");\r | |
3345 | (fAvMultiplicity->GetXaxis())->SetBinLabel(3,"n_{RP} #geq 2");\r | |
3346 | (fAvMultiplicity->GetXaxis())->SetBinLabel(4,"n_{RP} #geq 3");\r | |
3347 | (fAvMultiplicity->GetXaxis())->SetBinLabel(5,"n_{RP} #geq 4");\r | |
3348 | (fAvMultiplicity->GetXaxis())->SetBinLabel(6,"n_{RP} #geq 5");\r | |
3349 | (fAvMultiplicity->GetXaxis())->SetBinLabel(7,"n_{RP} #geq 6");\r | |
3350 | (fAvMultiplicity->GetXaxis())->SetBinLabel(8,"n_{RP} #geq 7");\r | |
3351 | (fAvMultiplicity->GetXaxis())->SetBinLabel(9,"n_{RP} #geq 8");\r | |
3352 | fIntFlowProfiles->Add(fAvMultiplicity);\r | |
3353 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with wrong errors!):\r | |
3354 | TString intFlowCorrelationsProName = "fIntFlowCorrelationsPro";\r | |
3355 | intFlowCorrelationsProName += fAnalysisLabel->Data();\r | |
3356 | fIntFlowCorrelationsPro = new TProfile(intFlowCorrelationsProName.Data(),"Average correlations for all events",4,0,4,"s");\r | |
3357 | fIntFlowCorrelationsPro->SetTickLength(-0.01,"Y");\r | |
3358 | fIntFlowCorrelationsPro->SetMarkerStyle(25);\r | |
3359 | fIntFlowCorrelationsPro->SetLabelSize(0.06);\r | |
3360 | fIntFlowCorrelationsPro->SetLabelOffset(0.01,"Y");\r | |
3361 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<2>>");\r | |
3362 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<4>>");\r | |
3363 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(3,"<<6>>");\r | |
3364 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(4,"<<8>>");\r | |
3365 | fIntFlowProfiles->Add(fIntFlowCorrelationsPro);\r | |
3366 | // average all correlations for all events (with wrong errors!):\r | |
3367 | TString intFlowCorrelationsAllProName = "fIntFlowCorrelationsAllPro";\r | |
3368 | intFlowCorrelationsAllProName += fAnalysisLabel->Data();\r | |
3369 | fIntFlowCorrelationsAllPro = new TProfile(intFlowCorrelationsAllProName.Data(),"Average correlations for all events",32,0,32,"s");\r | |
3370 | fIntFlowCorrelationsAllPro->SetTickLength(-0.01,"Y");\r | |
3371 | fIntFlowCorrelationsAllPro->SetMarkerStyle(25);\r | |
3372 | fIntFlowCorrelationsAllPro->SetLabelSize(0.03);\r | |
3373 | fIntFlowCorrelationsAllPro->SetLabelOffset(0.01,"Y");\r | |
3374 | // 2-p correlations:\r | |
3375 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}");\r | |
3376 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}");\r | |
3377 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}");\r | |
3378 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}");\r | |
3379 | // 3-p correlations:\r | |
3380 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}");\r | |
3381 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}");\r | |
3382 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}");\r | |
3383 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}");\r | |
3384 | // 4-p correlations:\r | |
3385 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}"); \r | |
3386 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}");\r | |
3387 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}");\r | |
3388 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}");\r | |
3389 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}");\r | |
3390 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}"); \r | |
3391 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}");\r | |
3392 | // 5-p correlations:\r | |
3393 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}"); \r | |
3394 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}");\r | |
3395 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}");\r | |
3396 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}");\r | |
3397 | // 6-p correlations:\r | |
3398 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}");\r | |
3399 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}");\r | |
3400 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}");\r | |
3401 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}");\r | |
3402 | // 7-p correlations: \r | |
3403 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}");\r | |
3404 | // 8-p correlations:\r | |
3405 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}");\r | |
3406 | fIntFlowProfiles->Add(fIntFlowCorrelationsAllPro);\r | |
3407 | // average product of correlations <2>, <4>, <6> and <8>: \r | |
3408 | TString intFlowProductOfCorrelationsProName = "fIntFlowProductOfCorrelationsPro";\r | |
3409 | intFlowProductOfCorrelationsProName += fAnalysisLabel->Data();\r | |
3410 | fIntFlowProductOfCorrelationsPro = new TProfile(intFlowProductOfCorrelationsProName.Data(),"Average products of correlations",6,0,6);\r | |
3411 | fIntFlowProductOfCorrelationsPro->SetTickLength(-0.01,"Y");\r | |
3412 | fIntFlowProductOfCorrelationsPro->SetMarkerStyle(25); \r | |
3413 | fIntFlowProductOfCorrelationsPro->SetLabelSize(0.05);\r | |
3414 | fIntFlowProductOfCorrelationsPro->SetLabelOffset(0.01,"Y");\r | |
3415 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<2><4>>");\r | |
3416 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<2><6>>");\r | |
3417 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(3,"<<2><8>>");\r | |
3418 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(4,"<<4><6>>");\r | |
3419 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(5,"<<4><8>>");\r | |
3420 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(6,"<<6><8>>");\r | |
3421 | fIntFlowProfiles->Add(fIntFlowProductOfCorrelationsPro);\r | |
3422 | // average correction terms for non-uniform acceptance (with wrong errors!):\r | |
3423 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms\r | |
3424 | {\r | |
3425 | TString intFlowCorrectionTermsForNUAProName = "fIntFlowCorrectionTermsForNUAPro";\r | |
3426 | intFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data();\r | |
3427 | fIntFlowCorrectionTermsForNUAPro[sc] = new TProfile(Form("%s: %s terms",intFlowCorrectionTermsForNUAProName.Data(),sinCosFlag[sc].Data()),Form("Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),10,0,10,"s");\r | |
3428 | fIntFlowCorrectionTermsForNUAPro[sc]->SetTickLength(-0.01,"Y");\r | |
3429 | fIntFlowCorrectionTermsForNUAPro[sc]->SetMarkerStyle(25);\r | |
3430 | fIntFlowCorrectionTermsForNUAPro[sc]->SetLabelSize(0.03);\r | |
3431 | fIntFlowCorrectionTermsForNUAPro[sc]->SetLabelOffset(0.01,"Y");\r | |
3432 | // ......................................................................... \r | |
3433 | // 1-p terms:\r | |
3434 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(1,Form("%s(n(#phi_{1}))>",sinCosFlag[sc].Data()));\r | |
3435 | // 2-p terms:\r | |
3436 | // 3-p terms:\r | |
3437 | // ...\r | |
3438 | // ......................................................................... \r | |
3439 | fIntFlowProfiles->Add(fIntFlowCorrectionTermsForNUAPro[sc]);\r | |
3440 | } // end of for(Int_t sc=0;sc<2;sc++) \r | |
3441 | \r | |
3442 | // d) Book histograms holding the final results:\r | |
3443 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with correct errors!):\r | |
3444 | TString intFlowCorrelationsHistName = "fIntFlowCorrelationsHist";\r | |
3445 | intFlowCorrelationsHistName += fAnalysisLabel->Data();\r | |
3446 | fIntFlowCorrelationsHist = new TH1D(intFlowCorrelationsHistName.Data(),"Average correlations for all events",4,0,4);\r | |
3447 | fIntFlowCorrelationsHist->SetTickLength(-0.01,"Y");\r | |
3448 | fIntFlowCorrelationsHist->SetMarkerStyle(25);\r | |
3449 | fIntFlowCorrelationsHist->SetLabelSize(0.06);\r | |
3450 | fIntFlowCorrelationsHist->SetLabelOffset(0.01,"Y");\r | |
3451 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(1,"<<2>>");\r | |
3452 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(2,"<<4>>");\r | |
3453 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(3,"<<6>>");\r | |
3454 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(4,"<<8>>");\r | |
3455 | fIntFlowResults->Add(fIntFlowCorrelationsHist);\r | |
3456 | // average all correlations for all events (with correct errors!):\r | |
3457 | TString intFlowCorrelationsAllHistName = "fIntFlowCorrelationsAllHist";\r | |
3458 | intFlowCorrelationsAllHistName += fAnalysisLabel->Data();\r | |
3459 | fIntFlowCorrelationsAllHist = new TH1D(intFlowCorrelationsAllHistName.Data(),"Average correlations for all events",32,0,32);\r | |
3460 | fIntFlowCorrelationsAllHist->SetTickLength(-0.01,"Y");\r | |
3461 | fIntFlowCorrelationsAllHist->SetMarkerStyle(25);\r | |
3462 | fIntFlowCorrelationsAllHist->SetLabelSize(0.03);\r | |
3463 | fIntFlowCorrelationsAllHist->SetLabelOffset(0.01,"Y");\r | |
3464 | // 2-p correlations:\r | |
3465 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}");\r | |
3466 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}");\r | |
3467 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}");\r | |
3468 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}");\r | |
3469 | // 3-p correlations:\r | |
3470 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}");\r | |
3471 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}");\r | |
3472 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}");\r | |
3473 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}");\r | |
3474 | // 4-p correlations:\r | |
3475 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}"); \r | |
3476 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}");\r | |
3477 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}");\r | |
3478 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}");\r | |
3479 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}");\r | |
3480 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}"); \r | |
3481 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}");\r | |
3482 | // 5-p correlations:\r | |
3483 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}"); \r | |
3484 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}");\r | |
3485 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}");\r | |
3486 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}");\r | |
3487 | // 6-p correlations:\r | |
3488 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}");\r | |
3489 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}");\r | |
3490 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}");\r | |
3491 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}");\r | |
3492 | // 7-p correlations: \r | |
3493 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}");\r | |
3494 | // 8-p correlations:\r | |
3495 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}");\r | |
3496 | fIntFlowResults->Add(fIntFlowCorrelationsAllHist);\r | |
3497 | // average correction terms for non-uniform acceptance (with correct errors!):\r | |
3498 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms\r | |
3499 | {\r | |
3500 | TString intFlowCorrectionTermsForNUAHistName = "fIntFlowCorrectionTermsForNUAHist";\r | |
3501 | intFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data();\r | |
3502 | fIntFlowCorrectionTermsForNUAHist[sc] = new TH1D(Form("%s: %s terms",intFlowCorrectionTermsForNUAHistName.Data(),sinCosFlag[sc].Data()),Form("Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),10,0,10);\r | |
3503 | fIntFlowCorrectionTermsForNUAHist[sc]->SetTickLength(-0.01,"Y");\r | |
3504 | fIntFlowCorrectionTermsForNUAHist[sc]->SetMarkerStyle(25);\r | |
3505 | fIntFlowCorrectionTermsForNUAHist[sc]->SetLabelSize(0.03);\r | |
3506 | fIntFlowCorrectionTermsForNUAHist[sc]->SetLabelOffset(0.01,"Y");\r | |
3507 | // ......................................................................... \r | |
3508 | // 1-p terms:\r | |
3509 | (fIntFlowCorrectionTermsForNUAHist[sc]->GetXaxis())->SetBinLabel(1,Form("%s(n(#phi_{1}))>",sinCosFlag[sc].Data()));\r | |
3510 | // 2-p terms:\r | |
3511 | // 3-p terms:\r | |
3512 | // ...\r | |
3513 | // ......................................................................... \r | |
3514 | fIntFlowResults->Add(fIntFlowCorrectionTermsForNUAHist[sc]);\r | |
3515 | } // end of for(Int_t sc=0;sc<2;sc++) \r | |
3516 | // covariances (multiplied with weight dependent prefactor):\r | |
3517 | TString intFlowCovariancesName = "fIntFlowCovariances";\r | |
3518 | intFlowCovariancesName += fAnalysisLabel->Data();\r | |
3519 | fIntFlowCovariances = new TH1D(intFlowCovariancesName.Data(),"Covariances (multiplied with weight dependent prefactor)",6,0,6);\r | |
3520 | fIntFlowCovariances->SetLabelSize(0.04);\r | |
3521 | fIntFlowCovariances->SetMarkerStyle(25);\r | |
3522 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(1,"Cov(<2>,<4>)");\r | |
3523 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(2,"Cov(<2>,<6>)");\r | |
3524 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(3,"Cov(<2>,<8>)");\r | |
3525 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(4,"Cov(<4>,<6>)");\r | |
3526 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(5,"Cov(<4>,<8>)");\r | |
3527 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(6,"Cov(<6>,<8>)"); \r | |
3528 | fIntFlowResults->Add(fIntFlowCovariances);\r | |
3529 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>:\r | |
3530 | TString intFlowSumOfEventWeightsName = "fIntFlowSumOfEventWeights";\r | |
3531 | intFlowSumOfEventWeightsName += fAnalysisLabel->Data();\r | |
3532 | for(Int_t power=0;power<2;power++)\r | |
3533 | {\r | |
3534 | fIntFlowSumOfEventWeights[power] = new TH1D(Form("%s: %s",intFlowSumOfEventWeightsName.Data(),powerFlag[power].Data()),Form("Sum of %s event weights for correlations",powerFlag[power].Data()),4,0,4);\r | |
3535 | fIntFlowSumOfEventWeights[power]->SetLabelSize(0.05);\r | |
3536 | fIntFlowSumOfEventWeights[power]->SetMarkerStyle(25);\r | |
3537 | if(power == 0)\r | |
3538 | {\r | |
3539 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>}");\r | |
3540 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<4>}");\r | |
3541 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<6>}");\r | |
3542 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<8>}");\r | |
3543 | } else if (power == 1) \r | |
3544 | {\r | |
3545 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>}^{2}");\r | |
3546 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<4>}^{2}");\r | |
3547 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<6>}^{2}");\r | |
3548 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<8>}^{2}");\r | |
3549 | }\r | |
3550 | fIntFlowResults->Add(fIntFlowSumOfEventWeights[power]);\r | |
3551 | } \r | |
3552 | // sum of products of event weights for correlations <2>, <4>, <6> and <8>: \r | |
3553 | TString intFlowSumOfProductOfEventWeightsName = "fIntFlowSumOfProductOfEventWeights";\r | |
3554 | intFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data();\r | |
3555 | fIntFlowSumOfProductOfEventWeights = new TH1D(intFlowSumOfProductOfEventWeightsName.Data(),"Sum of product of event weights for correlations",6,0,6);\r | |
3556 | fIntFlowSumOfProductOfEventWeights->SetLabelSize(0.05);\r | |
3557 | fIntFlowSumOfProductOfEventWeights->SetMarkerStyle(25);\r | |
3558 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>} w_{<4>}");\r | |
3559 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<2>} w_{<6>}");\r | |
3560 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<2>} w_{<8>}");\r | |
3561 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<4>} w_{<6>}");\r | |
3562 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(5,"#sum_{i=1}^{N} w_{<4>} w_{<8>}");\r | |
3563 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(6,"#sum_{i=1}^{N} w_{<6>} w_{<8>}");\r | |
3564 | fIntFlowResults->Add(fIntFlowSumOfProductOfEventWeights);\r | |
3565 | // final results for integrated Q-cumulants:\r | |
3566 | TString intFlowQcumulantsName = "fIntFlowQcumulants";\r | |
3567 | intFlowQcumulantsName += fAnalysisLabel->Data();\r | |
3568 | fIntFlowQcumulants = new TH1D(intFlowQcumulantsName.Data(),"Integrated Q-cumulants",4,0,4);\r | |
3569 | fIntFlowQcumulants->SetLabelSize(0.05);\r | |
3570 | fIntFlowQcumulants->SetMarkerStyle(25);\r | |
3571 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(1,"QC{2}");\r | |
3572 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(2,"QC{4}");\r | |
3573 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(3,"QC{6}");\r | |
3574 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(4,"QC{8}");\r | |
3575 | fIntFlowResults->Add(fIntFlowQcumulants);\r | |
3576 | // final integrated flow estimates from Q-cumulants:\r | |
3577 | TString intFlowName = "fIntFlow";\r | |
3578 | intFlowName += fAnalysisLabel->Data(); \r | |
3579 | // integrated flow from Q-cumulants:\r | |
3580 | fIntFlow = new TH1D(intFlowName.Data(),"Integrated flow estimates from Q-cumulants",4,0,4);\r | |
3581 | fIntFlow->SetLabelSize(0.05);\r | |
3582 | fIntFlow->SetMarkerStyle(25);\r | |
3583 | (fIntFlow->GetXaxis())->SetBinLabel(1,"v_{2}{2,QC}");\r | |
3584 | (fIntFlow->GetXaxis())->SetBinLabel(2,"v_{2}{4,QC}");\r | |
3585 | (fIntFlow->GetXaxis())->SetBinLabel(3,"v_{2}{6,QC}");\r | |
3586 | (fIntFlow->GetXaxis())->SetBinLabel(4,"v_{2}{8,QC}");\r | |
3587 | fIntFlowResults->Add(fIntFlow);\r | |
3588 | \r | |
3589 | /* // to be improved (removed):\r | |
3590 | // final average weighted multi-particle correlations for all events calculated from Q-vectors\r | |
3591 | fQCorrelations[1] = new TProfile("Weighted correlations","final average multi-particle correlations from weighted Q-vectors",200,0,200,"s");\r | |
3592 | fQCorrelations[1]->SetTickLength(-0.01,"Y");\r | |
3593 | fQCorrelations[1]->SetMarkerStyle(25);\r | |
3594 | fQCorrelations[1]->SetLabelSize(0.03);\r | |
3595 | fQCorrelations[1]->SetLabelOffset(0.01,"Y");\r | |
3596 | // 2-particle correlations:\r | |
3597 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(1,"<w_{1}w_{2}cos(n(#phi_{1}-#phi_{2}))>");\r | |
3598 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(2,"<w_{1}^{2}w_{2}^{2}cos(2n(#phi_{1}-#phi_{2}))>");\r | |
3599 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(3,"<w_{1}^{3}w_{2}^{3}cos(3n(#phi_{1}-#phi_{2}))>");\r | |
3600 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(4,"<w_{1}^{4}w_{2}^{4}cos(4n(#phi_{1}-#phi_{2}))>");\r | |
3601 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(5,"<w_{1}^{3}w_{2}cos(n(#phi_{1}-#phi_{2}))>");\r | |
3602 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(6,"<w_{1}^{2}w_{2}w_{3}cos(n(#phi_{1}-#phi_{2}))>");\r | |
3603 | // 3-particle correlations:\r | |
3604 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(21,"<w_{1}w_{2}w_{3}^{2}cos(n(2#phi_{1}-#phi_{2}-#phi_{3}))>");\r | |
3605 | // 4-particle correlations:\r | |
3606 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(41,"<w_{1}w_{2}w_{3}w_{4}cos(n(#phi_{1}+#phi_{2}-#phi_{3}-#phi_{4}))>");\r | |
3607 | // add fQCorrelations[1] to the list fIntFlowList:\r | |
3608 | fIntFlowList->Add(fQCorrelations[1]); \r | |
3609 | */\r | |
3610 | \r | |
3611 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForIntegratedFlow()\r | |
3612 | \r | |
3613 | \r | |
3614 | //================================================================================================================================\r | |
3615 | \r | |
3616 | \r | |
3617 | void AliFlowAnalysisWithQCumulants::BookEverythingForNestedLoops()\r | |
3618 | {\r | |
3619 | // Book all objects relevant for calculations with nested loops.\r | |
3620 | \r | |
3621 | // to be improved: hardwired names for some objects here\r | |
3622 | \r | |
3623 | TString evaluateNestedLoopsName = "fEvaluateNestedLoops";\r | |
3624 | evaluateNestedLoopsName += fAnalysisLabel->Data();\r | |
3625 | fEvaluateNestedLoops = new TProfile(evaluateNestedLoopsName.Data(),"1 = evaluate, 0 = do not evaluate",2,0,2);\r | |
3626 | fEvaluateNestedLoops->SetLabelSize(0.05);\r | |
3627 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(1,"Nested Loops (Int. Flow)");\r | |
3628 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(2,"Nested Loops (Diff. Flow)");\r | |
3629 | fEvaluateNestedLoops->Fill(0.5,(Int_t)fEvaluateNestedLoopsForIntFlow);\r | |
3630 | fEvaluateNestedLoops->Fill(1.5,(Int_t)fEvaluateNestedLoopsForDiffFlow);\r | |
3631 | fNestedLoopsList->Add(fEvaluateNestedLoops);\r | |
3632 | // nested loops for integrated flow:\r | |
3633 | if(fEvaluateNestedLoopsForIntFlow)\r | |
3634 | {\r | |
3635 | fDirectCorrelations = new TProfile("fDirectCorrelations","multi-particle correlations with nested loops",100,0,100,"s");\r | |
3636 | fNestedLoopsList->Add(fDirectCorrelations);\r | |
3637 | fDirectCorrectionsCos = new TProfile("fDirectCorrectionsCos"," corrections for non-uniform acceptance (cos terms)",100,0,100,"s");\r | |
3638 | fNestedLoopsList->Add(fDirectCorrectionsCos);\r | |
3639 | fDirectCorrectionsSin = new TProfile("fDirectCorrectionsSin"," corrections for non-uniform acceptance (sin terms)",100,0,100,"s");\r | |
3640 | fNestedLoopsList->Add(fDirectCorrectionsSin); \r | |
3641 | if(fUsePhiWeights) // Remark: cross-checking performed only with phi-weights (this is sufficient)\r | |
3642 | {\r | |
3643 | fDirectCorrelationsW = new TProfile("fDirectCorrelationsW","multi-particle correlations with nested loops",200,0,200,"s"); \r | |
3644 | fNestedLoopsList->Add(fDirectCorrelationsW);\r | |
3645 | fDirectCorrectionsCosW = new TProfile("fDirectCorrectionsCosW"," corrections for non-uniform acceptance (cos terms)",100,0,100,"s");\r | |
3646 | fNestedLoopsList->Add(fDirectCorrectionsCosW);\r | |
3647 | fDirectCorrectionsSinW = new TProfile("fDirectCorrectionsSinW"," corrections for non-uniform acceptance (sin terms)",100,0,100,"s");\r | |
3648 | fNestedLoopsList->Add(fDirectCorrectionsSinW); \r | |
3649 | }\r | |
3650 | }\r | |
3651 | // nested loops for differential flow: \r | |
3652 | if(fEvaluateNestedLoopsForDiffFlow)\r | |
3653 | {\r | |
3654 | fDirectCorrelationsDiffFlow = new TProfile("fDirectCorrelationsDiffFlow","multi-particle correlations with nested loops",200,0,200,"s");\r | |
3655 | fNestedLoopsList->Add(fDirectCorrelationsDiffFlow); \r | |
3656 | fDirectCorrectionsDiffFlowCos = new TProfile("fDirectCorrectionsDiffFlowCos",\r | |
3657 | "corrections for non-uniform acceptance (cos terms) with nested loops",200,0,200,"s");\r | |
3658 | fNestedLoopsList->Add(fDirectCorrectionsDiffFlowCos); \r | |
3659 | fDirectCorrectionsDiffFlowSin = new TProfile("fDirectCorrectionsDiffFlowSin",\r | |
3660 | "corrections for non-uniform acceptance (sin terms) with nested loops",200,0,200,"s");\r | |
3661 | fNestedLoopsList->Add(fDirectCorrectionsDiffFlowSin); \r | |
3662 | if(fUsePhiWeights) // Remark: cross-checking performed only with phi-weights (this is sufficient)\r | |
3663 | {\r | |
3664 | fDirectCorrelationsDiffFlowW = new TProfile("fDirectCorrelationsDiffFlowW","multi-particle correlations with nested loops",200,0,200,"s");\r | |
3665 | fNestedLoopsList->Add(fDirectCorrelationsDiffFlowW);\r | |
3666 | fDirectCorrectionsDiffFlowCosW = new TProfile("fDirectCorrectionsDiffFlowCosW",\r | |
3667 | "corrections for non-uniform acceptance (cos terms) with nested loops",200,0,200,"s");\r | |
3668 | fNestedLoopsList->Add(fDirectCorrectionsDiffFlowCosW); \r | |
3669 | fDirectCorrectionsDiffFlowSinW = new TProfile("fDirectCorrectionsDiffFlowSinW",\r | |
3670 | "corrections for non-uniform acceptance (sin terms) with nested loops",200,0,200,"s");\r | |
3671 | fNestedLoopsList->Add(fDirectCorrectionsDiffFlowSinW); \r | |
3672 | }\r | |
3673 | }\r | |
3674 | \r | |
3675 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForNestedLoops()\r | |
3676 | \r | |
3677 | \r | |
3678 | //================================================================================================================================\r | |
3679 | \r | |
3680 | \r | |
3681 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations()\r | |
3682 | {\r | |
3683 | // calculate all correlations needed for integrated flow\r | |
3684 | \r | |
3685 | // multiplicity:\r | |
3686 | Double_t dMult = (*fSMpk)(0,0);\r | |
3687 | \r | |
3688 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: \r | |
3689 | Double_t dReQ1n = (*fReQ)(0,0);\r | |
3690 | Double_t dReQ2n = (*fReQ)(1,0);\r | |
3691 | Double_t dReQ3n = (*fReQ)(2,0);\r | |
3692 | Double_t dReQ4n = (*fReQ)(3,0);\r | |
3693 | Double_t dImQ1n = (*fImQ)(0,0);\r | |
3694 | Double_t dImQ2n = (*fImQ)(1,0);\r | |
3695 | Double_t dImQ3n = (*fImQ)(2,0);\r | |
3696 | Double_t dImQ4n = (*fImQ)(3,0);\r | |
3697 | \r | |
3698 | // real and imaginary parts of some expressions involving various combinations of Q-vectors evaluated in harmonics n, 2n, 3n and 4n:\r | |
3699 | // (these expression appear in the Eqs. for the multi-particle correlations bellow)\r | |
3700 | \r | |
3701 | // Re[Q_{2n} Q_{n}^* Q_{n}^*]\r | |
3702 | Double_t reQ2nQ1nstarQ1nstar = pow(dReQ1n,2.)*dReQ2n + 2.*dReQ1n*dImQ1n*dImQ2n - pow(dImQ1n,2.)*dReQ2n; \r | |
3703 | \r | |
3704 | // Im[Q_{2n} Q_{n}^* Q_{n}^*]\r | |
3705 | //Double_t imQ2nQ1nstarQ1nstar = pow(dReQ1n,2.)*dImQ2n-2.*dReQ1n*dImQ1n*dReQ2n-pow(dImQ1n,2.)*dImQ2n; \r | |
3706 | \r | |
3707 | // Re[Q_{n} Q_{n} Q_{2n}^*] = Re[Q_{2n} Q_{n}^* Q_{n}^*]\r | |
3708 | Double_t reQ1nQ1nQ2nstar = reQ2nQ1nstarQ1nstar; \r | |
3709 | \r | |
3710 | // Re[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*]\r | |
3711 | Double_t reQ3nQ1nQ2nstarQ2nstar = (pow(dReQ2n,2.)-pow(dImQ2n,2.))*(dReQ3n*dReQ1n-dImQ3n*dImQ1n) \r | |
3712 | + 2.*dReQ2n*dImQ2n*(dReQ3n*dImQ1n+dImQ3n*dReQ1n);\r | |
3713 | \r | |
3714 | // Im[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] \r | |
3715 | //Double_t imQ3nQ1nQ2nstarQ2nstar = calculate and implement this (deleteMe)\r | |
3716 | \r | |
3717 | // Re[Q_{2n} Q_{2n} Q_{3n}^* Q_{1n}^*] = Re[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*]\r | |
3718 | Double_t reQ2nQ2nQ3nstarQ1nstar = reQ3nQ1nQ2nstarQ2nstar;\r | |
3719 | \r | |
3720 | // Re[Q_{4n} Q_{2n}^* Q_{2n}^*]\r | |
3721 | Double_t reQ4nQ2nstarQ2nstar = pow(dReQ2n,2.)*dReQ4n+2.*dReQ2n*dImQ2n*dImQ4n-pow(dImQ2n,2.)*dReQ4n;\r | |
3722 | \r | |
3723 | // Im[Q_{4n} Q_{2n}^* Q_{2n}^*]\r | |
3724 | //Double_t imQ4nQ2nstarQ2nstar = calculate and implement this (deleteMe)\r | |
3725 | \r | |
3726 | // Re[Q_{2n} Q_{2n} Q_{4n}^*] = Re[Q_{4n} Q_{2n}^* Q_{2n}^*]\r | |
3727 | Double_t reQ2nQ2nQ4nstar = reQ4nQ2nstarQ2nstar;\r | |
3728 | \r | |
3729 | // Re[Q_{4n} Q_{3n}^* Q_{n}^*]\r | |
3730 | Double_t reQ4nQ3nstarQ1nstar = dReQ4n*(dReQ3n*dReQ1n-dImQ3n*dImQ1n)+dImQ4n*(dReQ3n*dImQ1n+dImQ3n*dReQ1n);\r | |
3731 | \r | |
3732 | // Re[Q_{3n} Q_{n} Q_{4n}^*] = Re[Q_{4n} Q_{3n}^* Q_{n}^*]\r | |
3733 | Double_t reQ3nQ1nQ4nstar = reQ4nQ3nstarQ1nstar;\r | |
3734 | \r | |
3735 | // Im[Q_{4n} Q_{3n}^* Q_{n}^*]\r | |
3736 | //Double_t imQ4nQ3nstarQ1nstar = calculate and implement this (deleteMe)\r | |
3737 | \r | |
3738 | // Re[Q_{3n} Q_{2n}^* Q_{n}^*]\r | |
3739 | Double_t reQ3nQ2nstarQ1nstar = dReQ3n*dReQ2n*dReQ1n-dReQ3n*dImQ2n*dImQ1n+dImQ3n*dReQ2n*dImQ1n\r | |
3740 | + dImQ3n*dImQ2n*dReQ1n;\r | |
3741 | \r | |
3742 | // Re[Q_{2n} Q_{n} Q_{3n}^*] = Re[Q_{3n} Q_{2n}^* Q_{n}^*]\r | |
3743 | Double_t reQ2nQ1nQ3nstar = reQ3nQ2nstarQ1nstar;\r | |
3744 | \r | |
3745 | // Im[Q_{3n} Q_{2n}^* Q_{n}^*]\r | |
3746 | //Double_t imQ3nQ2nstarQ1nstar; //calculate and implement this (deleteMe)\r | |
3747 | \r | |
3748 | // Re[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*]\r | |
3749 | Double_t reQ3nQ1nstarQ1nstarQ1nstar = dReQ3n*pow(dReQ1n,3)-3.*dReQ1n*dReQ3n*pow(dImQ1n,2)\r | |
3750 | + 3.*dImQ1n*dImQ3n*pow(dReQ1n,2)-dImQ3n*pow(dImQ1n,3);\r | |
3751 | \r | |
3752 | // Im[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*]\r | |
3753 | //Double_t imQ3nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)\r | |
3754 | \r | |
3755 | // |Q_{2n}|^2 |Q_{n}|^2\r | |
3756 | Double_t dQ2nQ1nQ2nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.));\r | |
3757 | \r | |
3758 | // Re[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*]\r | |
3759 | Double_t reQ4nQ2nstarQ1nstarQ1nstar = (dReQ4n*dReQ2n+dImQ4n*dImQ2n)*(pow(dReQ1n,2)-pow(dImQ1n,2))\r | |
3760 | + 2.*dReQ1n*dImQ1n*(dImQ4n*dReQ2n-dReQ4n*dImQ2n); \r | |
3761 | \r | |
3762 | // Im[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*]\r | |
3763 | //Double_t imQ4nQ2nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)\r | |
3764 | \r | |
3765 | // Re[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*]\r | |
3766 | Double_t reQ2nQ1nQ1nstarQ1nstarQ1nstar = (dReQ2n*dReQ1n-dImQ2n*dImQ1n)*(pow(dReQ1n,3)-3.*dReQ1n*pow(dImQ1n,2))\r | |
3767 | + (dReQ2n*dImQ1n+dReQ1n*dImQ2n)*(3.*dImQ1n*pow(dReQ1n,2)-pow(dImQ1n,3));\r | |
3768 | \r | |
3769 | // Im[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*] \r | |
3770 | //Double_t imQ2nQ1nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe)\r | |
3771 | \r | |
3772 | // Re[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*]\r | |
3773 | Double_t reQ2nQ2nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.))\r | |
3774 | * (dReQ2n*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) + 2.*dImQ2n*dReQ1n*dImQ1n);\r | |
3775 | \r | |
3776 | // Im[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*]\r | |
3777 | //Double_t imQ2nQ2nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.))\r | |
3778 | // * (dImQ2n*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) - 2.*dReQ2n*dReQ1n*dImQ1n);\r | |
3779 | \r | |
3780 | // Re[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]\r | |
3781 | Double_t reQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(dReQ1n,4.)*dReQ4n-6.*pow(dReQ1n,2.)*dReQ4n*pow(dImQ1n,2.)\r | |
3782 | + pow(dImQ1n,4.)*dReQ4n+4.*pow(dReQ1n,3.)*dImQ1n*dImQ4n\r | |
3783 | - 4.*pow(dImQ1n,3.)*dReQ1n*dImQ4n;\r | |
3784 | \r | |
3785 | // Im[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]\r | |
3786 | //Double_t imQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(dReQ1n,4.)*dImQ4n-6.*pow(dReQ1n,2.)*dImQ4n*pow(dImQ1n,2.)\r | |
3787 | // + pow(dImQ1n,4.)*dImQ4n+4.*pow(dImQ1n,3.)*dReQ1n*dReQ4n\r | |
3788 | // - 4.*pow(dReQ1n,3.)*dImQ1n*dReQ4n;\r | |
3789 | \r | |
3790 | // Re[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*]\r | |
3791 | Double_t reQ3nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.))\r | |
3792 | * (dReQ1n*dReQ2n*dReQ3n-dReQ3n*dImQ1n*dImQ2n+dReQ2n*dImQ1n*dImQ3n+dReQ1n*dImQ2n*dImQ3n);\r | |
3793 | \r | |
3794 | // Im[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*]\r | |
3795 | //Double_t imQ3nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.))\r | |
3796 | // * (-dReQ2n*dReQ3n*dImQ1n-dReQ1n*dReQ3n*dImQ2n+dReQ1n*dReQ2n*dImQ3n-dImQ1n*dImQ2n*dImQ3n);\r | |
3797 | \r | |
3798 | \r | |
3799 | // Re[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]\r | |
3800 | Double_t reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)*dReQ2n-2.*dReQ1n*dReQ2n*dImQ1n-dReQ2n*pow(dImQ1n,2.)\r | |
3801 | + dImQ2n*pow(dReQ1n,2.)+2.*dReQ1n*dImQ1n*dImQ2n-pow(dImQ1n,2.)*dImQ2n)\r | |
3802 | * (pow(dReQ1n,2.)*dReQ2n+2.*dReQ1n*dReQ2n*dImQ1n-dReQ2n*pow(dImQ1n,2.)\r | |
3803 | - dImQ2n*pow(dReQ1n,2.)+2.*dReQ1n*dImQ1n*dImQ2n+pow(dImQ1n,2.)*dImQ2n);\r | |
3804 | \r | |
3805 | // Im[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]\r | |
3806 | //Double_t imQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = 2.*(pow(dReQ1n,2.)*dReQ2n-dReQ2n*pow(dImQ1n,2.)\r | |
3807 | // + 2.*dReQ1n*dImQ1n*dImQ2n)*(pow(dReQ1n,2.)*dImQ2n\r | |
3808 | // - 2.*dReQ1n*dImQ1n*dReQ2n-pow(dImQ1n,2.)*dImQ2n);\r | |
3809 | \r | |
3810 | // Re[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]\r | |
3811 | Double_t reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.))\r | |
3812 | * (pow(dReQ1n,3.)*dReQ3n-3.*dReQ1n*dReQ3n*pow(dImQ1n,2.)\r | |
3813 | + 3.*pow(dReQ1n,2.)*dImQ1n*dImQ3n-pow(dImQ1n,3.)*dImQ3n);\r | |
3814 | \r | |
3815 | // Im[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] \r | |
3816 | //Double_t imQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.))\r | |
3817 | // * (pow(dImQ1n,3.)*dReQ3n-3.*dImQ1n*dReQ3n*pow(dReQ1n,2.)\r | |
3818 | // - 3.*pow(dImQ1n,2.)*dReQ1n*dImQ3n+pow(dReQ1n,3.)*dImQ3n);\r | |
3819 | \r | |
3820 | // |Q_{2n}|^2 |Q_{n}|^4\r | |
3821 | Double_t dQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.))*pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.);\r | |
3822 | \r | |
3823 | // Re[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*]\r | |
3824 | Double_t reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)\r | |
3825 | * (pow(dReQ1n,2.)*dReQ2n-dReQ2n*pow(dImQ1n,2.)\r | |
3826 | + 2.*dReQ1n*dImQ1n*dImQ2n);\r | |
3827 | \r | |
3828 | // Im[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] \r | |
3829 | //Double_t imQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)\r | |
3830 | // * (pow(dReQ1n,2.)*dImQ2n-dImQ2n*pow(dImQ1n,2.)\r | |
3831 | // - 2.*dReQ1n*dReQ2n*dImQ1n);\r | |
3832 | \r | |
3833 | \r | |
3834 | \r | |
3835 | \r | |
3836 | // **************************************\r | |
3837 | // **** multi-particle correlations: ****\r | |
3838 | // **************************************\r | |
3839 | //\r | |
3840 | // Remark 1: multi-particle correlations calculated with non-weighted Q-vectors are stored in 1D profile fQCorrelations[0].\r | |
3841 | // Remark 2: binning of fQCorrelations[0] is organized as follows:\r | |
3842 | // --------------------------------------------------------------------------------------------------------------------\r | |
3843 | // 1st bin: <2>_{1n|1n} = two1n1n = cos(n*(phi1-phi2))>\r | |
3844 | // 2nd bin: <2>_{2n|2n} = two2n2n = cos(2n*(phi1-phi2))>\r | |
3845 | // 3rd bin: <2>_{3n|3n} = two3n3n = cos(3n*(phi1-phi2))> \r | |
3846 | // 4th bin: <2>_{4n|4n} = two4n4n = cos(4n*(phi1-phi2))>\r | |
3847 | // 5th bin: ---- EMPTY ----\r | |
3848 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1n = <cos(n*(2.*phi1-phi2-phi3))>\r | |
3849 | // 7th bin: <3>_{3n|2n,1n} = three3n2n1n = <cos(n*(3.*phi1-2.*phi2-phi3))>\r | |
3850 | // 8th bin: <3>_{4n|2n,2n} = three4n2n2n = <cos(n*(4.*phi1-2.*phi2-2.*phi3))>\r | |
3851 | // 9th bin: <3>_{4n|3n,1n} = three4n3n1n = <cos(n*(4.*phi1-3.*phi2-phi3))>\r | |
3852 | // 10th bin: ---- EMPTY ----\r | |
3853 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1n = <cos(n*(phi1+phi2-phi3-phi4))>\r | |
3854 | // 12th bin: <4>_{2n,1n|2n,1n} = four2n1n2n1n = <cos(2.*n*(phi1+phi2-phi3-phi4))>\r | |
3855 | // 13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n = <cos(n*(2.*phi1+phi2-2.*phi3-phi4))>\r | |
3856 | // 14th bin: <4>_{3n|1n,1n,1n} = four3n1n1n1n = <cos(n*(3.*phi1-phi2-phi3-phi4))> \r | |
3857 | // 15th bin: <4>_{3n,1n|3n,1n} = four3n1n3n1n = <cos(n*(4.*phi1-2.*phi2-phi3-phi4))>\r | |
3858 | // 16th bin: <4>_{3n,1n|2n,2n} = four3n1n2n2n = <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))>\r | |
3859 | // 17th bin: <4>_{4n|2n,1n,1n} = four4n2n1n1n = <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> \r | |
3860 | // 18th bin: ---- EMPTY ----\r | |
3861 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = five2n1n1n1n1n = <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))>\r | |
3862 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = five2n2n2n1n1n = <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))>\r | |
3863 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = five3n1n2n1n1n = <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))>\r | |
3864 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = five4n1n1n1n1n = <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))>\r | |
3865 | // 23rd bin: ---- EMPTY ----\r | |
3866 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = six1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))>\r | |
3867 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = six2n1n1n2n1n1n = <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))>\r | |
3868 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = six2n2n1n1n1n1n = <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))>\r | |
3869 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = six3n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))>\r | |
3870 | // 28th bin: ---- EMPTY ----\r | |
3871 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = seven2n1n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))>\r | |
3872 | // 30th bin: ---- EMPTY ----\r | |
3873 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = eight1n1n1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))>\r | |
3874 | // --------------------------------------------------------------------------------------------------------------------\r | |
3875 | \r | |
3876 | // 2-particle:\r | |
3877 | Double_t two1n1n = 0.; // <cos(n*(phi1-phi2))>\r | |
3878 | Double_t two2n2n = 0.; // <cos(2n*(phi1-phi2))>\r | |
3879 | Double_t two3n3n = 0.; // <cos(3n*(phi1-phi2))>\r | |
3880 | Double_t two4n4n = 0.; // <cos(4n*(phi1-phi2))>\r | |
3881 | \r | |
3882 | if(dMult>1)\r | |
3883 | {\r | |
3884 | two1n1n = (pow(dReQ1n,2.)+pow(dImQ1n,2.)-dMult)/(dMult*(dMult-1.)); \r | |
3885 | two2n2n = (pow(dReQ2n,2.)+pow(dImQ2n,2.)-dMult)/(dMult*(dMult-1.)); \r | |
3886 | two3n3n = (pow(dReQ3n,2.)+pow(dImQ3n,2.)-dMult)/(dMult*(dMult-1.)); \r | |
3887 | two4n4n = (pow(dReQ4n,2.)+pow(dImQ4n,2.)-dMult)/(dMult*(dMult-1.)); \r | |
3888 | \r | |
3889 | // average 2-particle correlations for single event: \r | |
3890 | fIntFlowCorrelationsAllEBE->SetBinContent(1,two1n1n);\r | |
3891 | fIntFlowCorrelationsAllEBE->SetBinContent(2,two2n2n);\r | |
3892 | fIntFlowCorrelationsAllEBE->SetBinContent(3,two3n3n);\r | |
3893 | fIntFlowCorrelationsAllEBE->SetBinContent(4,two4n4n);\r | |
3894 | \r | |
3895 | // average 2-particle correlations for all events: \r | |
3896 | fIntFlowCorrelationsAllPro->Fill(0.5,two1n1n,dMult*(dMult-1.)); \r | |
3897 | fIntFlowCorrelationsAllPro->Fill(1.5,two2n2n,dMult*(dMult-1.)); \r | |
3898 | fIntFlowCorrelationsAllPro->Fill(2.5,two3n3n,dMult*(dMult-1.)); \r | |
3899 | fIntFlowCorrelationsAllPro->Fill(3.5,two4n4n,dMult*(dMult-1.)); \r | |
3900 | \r | |
3901 | // store separetately <2> (to be improved: do I really need this?)\r | |
3902 | fIntFlowCorrelationsEBE->SetBinContent(1,two1n1n);\r | |
3903 | fIntFlowCorrelationsPro->Fill(0.5,two1n1n,dMult*(dMult-1.));\r | |
3904 | \r | |
3905 | // distribution of <cos(n*(phi1-phi2))>:\r | |
3906 | //f2pDistribution->Fill(two1n1n,dMult*(dMult-1.)); \r | |
3907 | } // end of if(dMult>1)\r | |
3908 | \r | |
3909 | // 3-particle:\r | |
3910 | Double_t three2n1n1n = 0.; // <cos(n*(2.*phi1-phi2-phi3))>\r | |
3911 | Double_t three3n2n1n = 0.; // <cos(n*(3.*phi1-2.*phi2-phi3))>\r | |
3912 | Double_t three4n2n2n = 0.; // <cos(n*(4.*phi1-2.*phi2-2.*phi3))>\r | |
3913 | Double_t three4n3n1n = 0.; // <cos(n*(4.*phi1-3.*phi2-phi3))>\r | |
3914 | \r | |
3915 | if(dMult>2)\r | |
3916 | {\r | |
3917 | three2n1n1n = (reQ2nQ1nstarQ1nstar-2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))\r | |
3918 | - (pow(dReQ2n,2.)+pow(dImQ2n,2.))+2.*dMult)\r | |
3919 | / (dMult*(dMult-1.)*(dMult-2.)); \r | |
3920 | three3n2n1n = (reQ3nQ2nstarQ1nstar-(pow(dReQ3n,2.)+pow(dImQ3n,2.))\r | |
3921 | - (pow(dReQ2n,2.)+pow(dImQ2n,2.))\r | |
3922 | - (pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult)\r | |
3923 | / (dMult*(dMult-1.)*(dMult-2.));\r | |
3924 | three4n2n2n = (reQ4nQ2nstarQ2nstar-2.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))\r | |
3925 | - (pow(dReQ4n,2.)+pow(dImQ4n,2.))+2.*dMult)\r | |
3926 | / (dMult*(dMult-1.)*(dMult-2.)); \r | |
3927 | three4n3n1n = (reQ4nQ3nstarQ1nstar-(pow(dReQ4n,2.)+pow(dImQ4n,2.))\r | |
3928 | - (pow(dReQ3n,2.)+pow(dImQ3n,2.))\r | |
3929 | - (pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult)\r | |
3930 | / (dMult*(dMult-1.)*(dMult-2.)); \r | |
3931 | \r | |
3932 | // average 3-particle correlations for single event: \r | |
3933 | fIntFlowCorrelationsAllEBE->SetBinContent(6,three2n1n1n);\r | |
3934 | fIntFlowCorrelationsAllEBE->SetBinContent(7,three3n2n1n);\r | |
3935 | fIntFlowCorrelationsAllEBE->SetBinContent(8,three4n2n2n);\r | |
3936 | fIntFlowCorrelationsAllEBE->SetBinContent(9,three4n3n1n);\r | |
3937 | \r | |
3938 | // average 3-particle correlations for all events: \r | |
3939 | fIntFlowCorrelationsAllPro->Fill(5.5,three2n1n1n,dMult*(dMult-1.)*(dMult-2.)); \r | |
3940 | fIntFlowCorrelationsAllPro->Fill(6.5,three3n2n1n,dMult*(dMult-1.)*(dMult-2.));\r | |
3941 | fIntFlowCorrelationsAllPro->Fill(7.5,three4n2n2n,dMult*(dMult-1.)*(dMult-2.)); \r | |
3942 | fIntFlowCorrelationsAllPro->Fill(8.5,three4n3n1n,dMult*(dMult-1.)*(dMult-2.)); \r | |
3943 | } // end of if(dMult>2)\r | |
3944 | \r | |
3945 | // 4-particle:\r | |
3946 | Double_t four1n1n1n1n = 0.; // <cos(n*(phi1+phi2-phi3-phi4))>\r | |
3947 | Double_t four2n2n2n2n = 0.; // <cos(2.*n*(phi1+phi2-phi3-phi4))>\r | |
3948 | Double_t four2n1n2n1n = 0.; // <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> \r | |
3949 | Double_t four3n1n1n1n = 0.; // <cos(n*(3.*phi1-phi2-phi3-phi4))> \r | |
3950 | Double_t four4n2n1n1n = 0.; // <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> \r | |
3951 | Double_t four3n1n2n2n = 0.; // <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> \r | |
3952 | Double_t four3n1n3n1n = 0.; // <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> \r | |
3953 | \r | |
3954 | if(dMult>3)\r | |
3955 | {\r | |
3956 | four1n1n1n1n = (2.*dMult*(dMult-3.)+pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)-4.*(dMult-2.)*(pow(dReQ1n,2.)\r | |
3957 | + pow(dImQ1n,2.))-2.*reQ2nQ1nstarQ1nstar+(pow(dReQ2n,2.)+pow(dImQ2n,2.)))\r | |
3958 | / (dMult*(dMult-1)*(dMult-2.)*(dMult-3.)); \r | |
3959 | four2n2n2n2n = (2.*dMult*(dMult-3.)+pow((pow(dReQ2n,2.)+pow(dImQ2n,2.)),2.)-4.*(dMult-2.)*(pow(dReQ2n,2.)\r | |
3960 | + pow(dImQ2n,2.))-2.*reQ4nQ2nstarQ2nstar+(pow(dReQ4n,2.)+pow(dImQ4n,2.)))\r | |
3961 | / (dMult*(dMult-1)*(dMult-2.)*(dMult-3.));\r | |
3962 | four2n1n2n1n = (dQ2nQ1nQ2nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar-2.*reQ2nQ1nstarQ1nstar)\r | |
3963 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
3964 | - ((dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))\r | |
3965 | + (dMult-4.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-(pow(dReQ3n,2.)+pow(dImQ3n,2.)))\r | |
3966 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
3967 | + (dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
3968 | four3n1n1n1n = (reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar-3.*reQ2nQ1nstarQ1nstar)\r | |
3969 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
3970 | + (2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))+3.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))\r | |
3971 | + 6.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))-6.*dMult)\r | |
3972 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
3973 | four4n2n1n1n = (reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar-2.*reQ3nQ2nstarQ1nstar)\r | |
3974 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
3975 | - (reQ2nQ1nstarQ1nstar-2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))-2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))\r | |
3976 | - 3.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.)))\r | |
3977 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
3978 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
3979 | four3n1n2n2n = (reQ3nQ1nQ2nstarQ2nstar-reQ4nQ2nstarQ2nstar-reQ3nQ1nQ4nstar-2.*reQ3nQ2nstarQ1nstar)\r | |
3980 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
3981 | - (2.*reQ1nQ1nQ2nstar-(pow(dReQ4n,2.)+pow(dImQ4n,2.))-2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))\r | |
3982 | - 4.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.)))\r | |
3983 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
3984 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
3985 | four3n1n3n1n = ((pow(dReQ3n,2.)+pow(dImQ3n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.))\r | |
3986 | - 2.*reQ4nQ3nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar)\r | |
3987 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
3988 | + ((pow(dReQ4n,2.)+pow(dImQ4n,2.))-(dMult-4.)*(pow(dReQ3n,2.)+pow(dImQ3n,2.))\r | |
3989 | + (pow(dReQ2n,2.)+pow(dImQ2n,2.))-(dMult-4.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.)))\r | |
3990 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
3991 | + (dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
3992 | \r | |
3993 | // average 4-particle correlations for single event: \r | |
3994 | fIntFlowCorrelationsAllEBE->SetBinContent(11,four1n1n1n1n);\r | |
3995 | fIntFlowCorrelationsAllEBE->SetBinContent(12,four2n1n2n1n);\r | |
3996 | fIntFlowCorrelationsAllEBE->SetBinContent(13,four2n2n2n2n);\r | |
3997 | fIntFlowCorrelationsAllEBE->SetBinContent(14,four3n1n1n1n);\r | |
3998 | fIntFlowCorrelationsAllEBE->SetBinContent(15,four3n1n3n1n);\r | |
3999 | fIntFlowCorrelationsAllEBE->SetBinContent(16,four3n1n2n2n);\r | |
4000 | fIntFlowCorrelationsAllEBE->SetBinContent(17,four4n2n1n1n);\r | |
4001 | \r | |
4002 | // average 4-particle correlations for all events: \r | |
4003 | fIntFlowCorrelationsAllPro->Fill(10.5,four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
4004 | fIntFlowCorrelationsAllPro->Fill(11.5,four2n1n2n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
4005 | fIntFlowCorrelationsAllPro->Fill(12.5,four2n2n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
4006 | fIntFlowCorrelationsAllPro->Fill(13.5,four3n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
4007 | fIntFlowCorrelationsAllPro->Fill(14.5,four3n1n3n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
4008 | fIntFlowCorrelationsAllPro->Fill(15.5,four3n1n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
4009 | fIntFlowCorrelationsAllPro->Fill(16.5,four4n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
4010 | \r | |
4011 | // store separetately <4> (to be improved: do I really need this?)\r | |
4012 | fIntFlowCorrelationsEBE->SetBinContent(2,four1n1n1n1n);\r | |
4013 | fIntFlowCorrelationsPro->Fill(1.5,four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
4014 | \r | |
4015 | // distribution of <cos(n*(phi1+phi2-phi3-phi4))>\r | |
4016 | //f4pDistribution->Fill(four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
4017 | \r | |
4018 | } // end of if(dMult>3)\r | |
4019 | \r | |
4020 | // 5-particle:\r | |
4021 | Double_t five2n1n1n1n1n = 0.; // <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))>\r | |
4022 | Double_t five2n2n2n1n1n = 0.; // <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))>\r | |
4023 | Double_t five3n1n2n1n1n = 0.; // <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))>\r | |
4024 | Double_t five4n1n1n1n1n = 0.; // <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))>\r | |
4025 | \r | |
4026 | if(dMult>4)\r | |
4027 | {\r | |
4028 | five2n1n1n1n1n = (reQ2nQ1nQ1nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar+6.*reQ3nQ2nstarQ1nstar)\r | |
4029 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4030 | - (reQ2nQ1nQ3nstar+3.*(dMult-6.)*reQ2nQ1nstarQ1nstar+3.*reQ1nQ1nQ2nstar)\r | |
4031 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4032 | - (2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))\r | |
4033 | + 3.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) \r | |
4034 | - 3.*(dMult-4.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.)))\r | |
4035 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4036 | - 3.*(pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)\r | |
4037 | - 2.*(2*dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult*(dMult-4.))\r | |
4038 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));\r | |
4039 | \r | |
4040 | five2n2n2n1n1n = (reQ2nQ2nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ2nQ2nQ3nstarQ1nstar)\r | |
4041 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4042 | + 2.*(reQ4nQ2nstarQ2nstar+4.*reQ3nQ2nstarQ1nstar+reQ3nQ1nQ4nstar)\r | |
4043 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4044 | + (reQ2nQ2nQ4nstar-2.*(dMult-5.)*reQ2nQ1nstarQ1nstar+2.*reQ1nQ1nQ2nstar)\r | |
4045 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4046 | - (2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))+4.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))\r | |
4047 | + 1.*pow((pow(dReQ2n,2.)+pow(dImQ2n,2.)),2.)\r | |
4048 | - 2.*(3.*dMult-10.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.)))\r | |
4049 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4050 | - (4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*(pow(dReQ2n,2.)+pow(dImQ2n,2.))\r | |
4051 | - 4.*(dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))+4.*dMult*(dMult-6.))\r | |
4052 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); \r | |
4053 | \r | |
4054 | five4n1n1n1n1n = (reQ4nQ1nstarQ1nstarQ1nstarQ1nstar-6.*reQ4nQ2nstarQ1nstarQ1nstar-4.*reQ3nQ1nstarQ1nstarQ1nstar)\r | |
4055 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4056 | + (8.*reQ4nQ3nstarQ1nstar+3.*reQ4nQ2nstarQ2nstar+12.*reQ3nQ2nstarQ1nstar+12.*reQ2nQ1nstarQ1nstar)\r | |
4057 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4058 | - (6.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))+8.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))\r | |
4059 | + 12.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))+24.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))-24.*dMult)\r | |
4060 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));\r | |
4061 | \r | |
4062 | five3n1n2n1n1n = (reQ3nQ1nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar)\r | |
4063 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4064 | - (reQ3nQ1nQ2nstarQ2nstar-3.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar)\r | |
4065 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4066 | - ((2.*dMult-13.)*reQ3nQ2nstarQ1nstar-reQ3nQ1nQ4nstar-9.*reQ2nQ1nstarQ1nstar)\r | |
4067 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4068 | - (2.*reQ1nQ1nQ2nstar+2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))\r | |
4069 | - 2.*(dMult-5.)*(pow(dReQ3n,2.)+pow(dImQ3n,2.))+2.*(pow(dReQ3n,2.)\r | |
4070 | + pow(dImQ3n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)))\r | |
4071 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4072 | + (2.*(dMult-6.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))\r | |
4073 | - 2.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.))\r | |
4074 | - pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)\r | |
4075 | + 2.*(3.*dMult-11.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.)))\r | |
4076 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.))\r | |
4077 | - 4.*(dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));\r | |
4078 | \r | |
4079 | // average 5-particle correlations for single event: \r | |
4080 | fIntFlowCorrelationsAllEBE->SetBinContent(19,five2n1n1n1n1n);\r | |
4081 | fIntFlowCorrelationsAllEBE->SetBinContent(20,five2n2n2n1n1n);\r | |
4082 | fIntFlowCorrelationsAllEBE->SetBinContent(21,five3n1n2n1n1n);\r | |
4083 | fIntFlowCorrelationsAllEBE->SetBinContent(22,five4n1n1n1n1n);\r | |
4084 | \r | |
4085 | // average 5-particle correlations for all events: \r | |
4086 | fIntFlowCorrelationsAllPro->Fill(18.5,five2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); \r | |
4087 | fIntFlowCorrelationsAllPro->Fill(19.5,five2n2n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));\r | |
4088 | fIntFlowCorrelationsAllPro->Fill(20.5,five3n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));\r | |
4089 | fIntFlowCorrelationsAllPro->Fill(21.5,five4n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.));\r | |
4090 | } // end of if(dMult>4)\r | |
4091 | \r | |
4092 | // 6-particle:\r | |
4093 | Double_t six1n1n1n1n1n1n = 0.; // <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))>\r | |
4094 | Double_t six2n2n1n1n1n1n = 0.; // <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))>\r | |
4095 | Double_t six3n1n1n1n1n1n = 0.; // <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))>\r | |
4096 | Double_t six2n1n1n2n1n1n = 0.; // <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))>\r | |
4097 | \r | |
4098 | if(dMult>5)\r | |
4099 | {\r | |
4100 | six1n1n1n1n1n1n = (pow(pow(dReQ1n,2.)+pow(dImQ1n,2.),3.)+9.*dQ2nQ1nQ2nstarQ1nstar-6.*reQ2nQ1nQ1nstarQ1nstarQ1nstar)\r | |
4101 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.))\r | |
4102 | + 4.*(reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar)\r | |
4103 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.))\r | |
4104 | + 2.*(9.*(dMult-4.)*reQ2nQ1nstarQ1nstar+2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)))\r | |
4105 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.))\r | |
4106 | - 9.*(pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)+(pow(dReQ2n,2.)+pow(dImQ2n,2.)))\r | |
4107 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-5.))\r | |
4108 | + (18.*(pow(dReQ1n,2.)+pow(dImQ1n,2.)))\r | |
4109 | / (dMult*(dMult-1)*(dMult-3)*(dMult-4))\r | |
4110 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
4111 | \r | |
4112 | six2n1n1n2n1n1n = (dQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)\r | |
4113 | * (2.*five2n2n2n1n1n+4.*five2n1n1n1n1n+4.*five3n1n2n1n1n+4.*four2n1n2n1n+1.*four1n1n1n1n)\r | |
4114 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four1n1n1n1n+4.*two1n1n\r | |
4115 | + 2.*three2n1n1n+2.*three2n1n1n+4.*four3n1n1n1n+8.*three2n1n1n+2.*four4n2n1n1n\r | |
4116 | + 4.*four2n1n2n1n+2.*two2n2n+8.*four2n1n2n1n+4.*four3n1n3n1n+8.*three3n2n1n\r | |
4117 | + 4.*four3n1n2n2n+4.*four1n1n1n1n+4.*four2n1n2n1n+1.*four2n2n2n2n)\r | |
4118 | - dMult*(dMult-1.)*(dMult-2.)*(2.*three2n1n1n+8.*two1n1n+4.*two1n1n+2.\r | |
4119 | + 4.*two1n1n+4.*three2n1n1n+2.*two2n2n+4.*three2n1n1n+8.*three3n2n1n\r | |
4120 | + 8.*two2n2n+4.*three4n3n1n+4.*two3n3n+4.*three3n2n1n+4.*two1n1n\r | |
4121 | + 8.*three2n1n1n+4.*two1n1n+4.*three3n2n1n+4.*three2n1n1n+2.*two2n2n\r | |
4122 | + 4.*three3n2n1n+2.*three4n2n2n)-dMult*(dMult-1.)\r | |
4123 | * (4.*two1n1n+4.+4.*two1n1n+2.*two2n2n+1.+4.*two1n1n+4.*two2n2n+4.*two3n3n\r | |
4124 | + 1.+2.*two2n2n+1.*two4n4n)-dMult)\r | |
4125 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed)\r | |
4126 | \r | |
4127 | six2n2n1n1n1n1n = (reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)\r | |
4128 | * (five4n1n1n1n1n+8.*five2n1n1n1n1n+6.*five2n2n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)\r | |
4129 | * (4.*four3n1n1n1n+6.*four4n2n1n1n+12.*three2n1n1n+12.*four1n1n1n1n+24.*four2n1n2n1n\r | |
4130 | + 4.*four3n1n2n2n+3.*four2n2n2n2n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n\r | |
4131 | + 4.*three4n3n1n+3.*three4n2n2n+8.*three2n1n1n+24.*two1n1n+12.*two2n2n+12.*three2n1n1n+8.*three3n2n1n\r | |
4132 | + 1.*three4n2n2n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+2.*two2n2n+8.*two1n1n+6.)-dMult)\r | |
4133 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed)\r | |
4134 | \r | |
4135 | six3n1n1n1n1n1n = (reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)\r | |
4136 | * (five4n1n1n1n1n+4.*five2n1n1n1n1n+6.*five3n1n2n1n1n+4.*four3n1n1n1n)\r | |
4137 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+6.*four1n1n1n1n\r | |
4138 | + 12.*three2n1n1n+12.*four2n1n2n1n+6.*four3n1n1n1n+12.*three3n2n1n+4.*four3n1n3n1n+3.*four3n1n2n2n)\r | |
4139 | - dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n+4.*three4n3n1n+3.*three4n2n2n+4.*two1n1n\r | |
4140 | + 12.*two1n1n+6.*three2n1n1n+12.*three2n1n1n+4.*three3n2n1n+12.*two2n2n+4.*three3n2n1n+4.*two3n3n+1.*three4n3n1n\r | |
4141 | + 6.*three3n2n1n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+1.*two1n1n+4.+6.*two1n1n+4.*two2n2n\r | |
4142 | + 1.*two3n3n)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed)\r | |
4143 | \r | |
4144 | // average 6-particle correlations for single event: \r | |
4145 | fIntFlowCorrelationsAllEBE->SetBinContent(24,six1n1n1n1n1n1n);\r | |
4146 | fIntFlowCorrelationsAllEBE->SetBinContent(25,six2n1n1n2n1n1n);\r | |
4147 | fIntFlowCorrelationsAllEBE->SetBinContent(26,six2n2n1n1n1n1n);\r | |
4148 | fIntFlowCorrelationsAllEBE->SetBinContent(27,six3n1n1n1n1n1n);\r | |
4149 | \r | |
4150 | // average 6-particle correlations for all events: \r | |
4151 | fIntFlowCorrelationsAllPro->Fill(23.5,six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); \r | |
4152 | fIntFlowCorrelationsAllPro->Fill(24.5,six2n1n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); \r | |
4153 | fIntFlowCorrelationsAllPro->Fill(25.5,six2n2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));\r | |
4154 | fIntFlowCorrelationsAllPro->Fill(26.5,six3n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); \r | |
4155 | \r | |
4156 | // store separetately <6> (to be improved: do I really need this?)\r | |
4157 | fIntFlowCorrelationsEBE->SetBinContent(3,six1n1n1n1n1n1n);\r | |
4158 | fIntFlowCorrelationsPro->Fill(2.5,six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.));\r | |
4159 | \r | |
4160 | // distribution of <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))>\r | |
4161 | //f6pDistribution->Fill(six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); \r | |
4162 | } // end of if(dMult>5)\r | |
4163 | \r | |
4164 | // 7-particle:\r | |
4165 | Double_t seven2n1n1n1n1n1n1n = 0.; // <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))>\r | |
4166 | \r | |
4167 | if(dMult>6)\r | |
4168 | {\r | |
4169 | seven2n1n1n1n1n1n1n = (reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)\r | |
4170 | * (2.*six3n1n1n1n1n1n+4.*six1n1n1n1n1n1n+1.*six2n2n1n1n1n1n+6.*six2n1n1n2n1n1n+8.*five2n1n1n1n1n)\r | |
4171 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(1.*five4n1n1n1n1n +8.*five2n1n1n1n1n+8.*four3n1n1n1n\r | |
4172 | + 12.*five3n1n2n1n1n+4.*five2n1n1n1n1n+3.*five2n2n2n1n1n+6.*five2n2n2n1n1n+6.*four1n1n1n1n+24.*four1n1n1n1n\r | |
4173 | + 12.*five2n1n1n1n1n+12.*five2n1n1n1n1n+12.*three2n1n1n+24.*four2n1n2n1n+4.*five3n1n2n1n1n+4.*five2n1n1n1n1n)\r | |
4174 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+12.*four1n1n1n1n+24.*three2n1n1n\r | |
4175 | + 24.*four2n1n2n1n+12.*four3n1n1n1n+24.*three3n2n1n+8.*four3n1n3n1n+6.*four3n1n2n2n+6.*three2n1n1n+12.*four1n1n1n1n\r | |
4176 | + 12.*four2n1n2n1n+6.*three2n1n1n+12.*four2n1n2n1n+4.*four3n1n2n2n+3.*four2n2n2n2n+4.*four1n1n1n1n+6.*three2n1n1n\r | |
4177 | + 24.*two1n1n+24.*four1n1n1n1n+4.*four3n1n1n1n+24.*two1n1n+24.*three2n1n1n+12.*two2n2n+24.*three2n1n1n+12.*four2n1n2n1n\r | |
4178 | + 8.*three3n2n1n+8.*four2n1n2n1n+1.*four4n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+1.*three2n1n1n+8.*two1n1n\r | |
4179 | + 12.*three3n2n1n+24.*two1n1n+12.*three2n1n1n+4.*three2n1n1n+8.*two1n1n+4.*three4n3n1n+24.*three2n1n1n+8.*three3n2n1n\r | |
4180 | + 12.*two1n1n+12.*two1n1n+3.*three4n2n2n+24.*two2n2n+6.*two2n2n+12.+12.*three3n2n1n+8.*two3n3n+12.*three2n1n1n+24.*two1n1n\r | |
4181 | + 4.*three3n2n1n+8.*three3n2n1n+2.*three4n3n1n+12.*two1n1n+8.*three2n1n1n+4.*three2n1n1n+2.*three3n2n1n+6.*two2n2n+8.*two2n2n\r | |
4182 | + 1.*three4n2n2n+4.*three3n2n1n+6.*three2n1n1n)-dMult*(dMult-1.)*(4.*two1n1n+2.*two1n1n+6.*two2n2n+8.+1.*two2n2n+4.*two3n3n\r | |
4183 | + 12.*two1n1n+4.*two1n1n+1.*two4n4n+8.*two2n2n+6.+2.*two3n3n+4.*two1n1n+1.*two2n2n)-dMult)\r | |
4184 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)); // to be improved (direct formula needed)\r | |
4185 | \r | |
4186 | // average 7-particle correlations for single event: \r | |
4187 | fIntFlowCorrelationsAllEBE->SetBinContent(29,seven2n1n1n1n1n1n1n);\r | |
4188 | \r | |
4189 | // average 7-particle correlations for all events: \r | |
4190 | fIntFlowCorrelationsAllPro->Fill(28.5,seven2n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.));\r | |
4191 | } // end of if(dMult>6)\r | |
4192 | \r | |
4193 | // 8-particle:\r | |
4194 | Double_t eight1n1n1n1n1n1n1n1n = 0.; // <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))>\r | |
4195 | if(dMult>7)\r | |
4196 | {\r | |
4197 | eight1n1n1n1n1n1n1n1n = (pow(pow(dReQ1n,2.)+pow(dImQ1n,2.),4.)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)\r | |
4198 | * (12.*seven2n1n1n1n1n1n1n+16.*six1n1n1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)\r | |
4199 | * (8.*six3n1n1n1n1n1n+48.*six1n1n1n1n1n1n+6.*six2n2n1n1n1n1n+96.*five2n1n1n1n1n+72.*four1n1n1n1n+36.*six2n1n1n2n1n1n)\r | |
4200 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(2.*five4n1n1n1n1n+32.*five2n1n1n1n1n+36.*four1n1n1n1n\r | |
4201 | + 32.*four3n1n1n1n+48.*five2n1n1n1n1n+48.*five3n1n2n1n1n+144.*five2n1n1n1n1n+288.*four1n1n1n1n+36.*five2n2n2n1n1n\r | |
4202 | + 144.*three2n1n1n+96.*two1n1n+144.*four2n1n2n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)\r | |
4203 | * (8.*four3n1n1n1n+48.*four1n1n1n1n+12.*four4n2n1n1n+96.*four2n1n2n1n+96.*three2n1n1n+72.*three2n1n1n+144.*two1n1n\r | |
4204 | + 16.*four3n1n3n1n+48.*four3n1n1n1n+144.*four1n1n1n1n+72.*four1n1n1n1n+96.*three3n2n1n+24.*four3n1n2n2n+144.*four2n1n2n1n\r | |
4205 | + 288.*two1n1n+288.*three2n1n1n+9.*four2n2n2n2n+72.*two2n2n+24.)-dMult*(dMult-1.)*(dMult-2.)*(12.*three2n1n1n+16.*two1n1n\r | |
4206 | + 24.*three3n2n1n+48.*three2n1n1n+96.*two1n1n+8.*three4n3n1n+32.*three3n2n1n+96.*three2n1n1n+144.*two1n1n+6.*three4n2n2n\r | |
4207 | + 96.*two2n2n+36.*two2n2n+72.+48.*three3n2n1n+16.*two3n3n+72.*three2n1n1n+144.*two1n1n)-dMult*(dMult-1.)*(8.*two1n1n\r | |
4208 | + 12.*two2n2n+16.+8.*two3n3n+48.*two1n1n+1.*two4n4n+16.*two2n2n+18.)-dMult)\r | |
4209 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); // to be improved (direct formula needed)\r | |
4210 | \r | |
4211 | // average 8-particle correlations for single event: \r | |
4212 | fIntFlowCorrelationsAllEBE->SetBinContent(31,eight1n1n1n1n1n1n1n1n);\r | |
4213 | \r | |
4214 | // average 8-particle correlations for all events: \r | |
4215 | fIntFlowCorrelationsAllPro->Fill(30.5,eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.));\r | |
4216 | \r | |
4217 | // store separetately <8> (to be improved: do I really need this?)\r | |
4218 | fIntFlowCorrelationsEBE->SetBinContent(4,eight1n1n1n1n1n1n1n1n);\r | |
4219 | fIntFlowCorrelationsPro->Fill(3.5,eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.));\r | |
4220 | \r | |
4221 | // distribution of <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))>\r | |
4222 | //f8pDistribution->Fill(eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.));\r | |
4223 | } // end of if(dMult>7) \r | |
4224 | \r | |
4225 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations()\r | |
4226 | \r | |
4227 | \r | |
4228 | //================================================================================================================================\r | |
4229 | \r | |
4230 | \r | |
4231 | void AliFlowAnalysisWithQCumulants::EvaluateNestedLoopsForIntegratedFlow(AliFlowEventSimple* anEvent)\r | |
4232 | {\r | |
4233 | // 1.) Evaluate with nested loops the relevant correlations for integrated flow without and with using the particle weights. \r | |
4234 | // Results are stored in profiles fDirectCorrelations and fDirectCorrelationsW, respectively.\r | |
4235 | \r | |
4236 | // 2.) Evaluate with nested loops corrections for non-uniform acceptance relevant for integrated flow, \r | |
4237 | // without and with using the particle weights.\r | |
4238 | // Without weights: cos terms are stored in profile fDirectCorrectionsCos, and sin terms in profile fDirectCorrectionsSin.\r | |
4239 | // With weights: cos terms are stored in profile fDirectCorrectionsCosW, and sin terms in profile fDirectCorrectionsSinW.\r | |
4240 | \r | |
4241 | // 3.) Binning of fDirectCorrelations is organized as follows:\r | |
4242 | // \r | |
4243 | // 1st bin: <2>_{1n|1n} = two1n1n = cos(n*(phi1-phi2))>\r | |
4244 | // 2nd bin: <2>_{2n|2n} = two2n2n = cos(2n*(phi1-phi2))>\r | |
4245 | // 3rd bin: <2>_{3n|3n} = two3n3n = cos(3n*(phi1-phi2))> \r | |
4246 | // 4th bin: <2>_{4n|4n} = two4n4n = cos(4n*(phi1-phi2))>\r | |
4247 | // 5th bin: ---- EMPTY ----\r | |
4248 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1n = <cos(n*(2.*phi1-phi2-phi3))>\r | |
4249 | // 7th bin: <3>_{3n|2n,1n} = three3n2n1n = <cos(n*(3.*phi1-2.*phi2-phi3))>\r | |
4250 | // 8th bin: <3>_{4n|2n,2n} = three4n2n2n = <cos(n*(4.*phi1-2.*phi2-2.*phi3))>\r | |
4251 | // 9th bin: <3>_{4n|3n,1n} = three4n3n1n = <cos(n*(4.*phi1-3.*phi2-phi3))>\r | |
4252 | // 10th bin: ---- EMPTY ----\r | |
4253 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1n = <cos(n*(phi1+phi2-phi3-phi4))>\r | |
4254 | // 12th bin: <4>_{2n,1n|2n,1n} = four2n1n2n1n = <cos(2.*n*(phi1+phi2-phi3-phi4))>\r | |
4255 | // 13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n = <cos(n*(2.*phi1+phi2-2.*phi3-phi4))>\r | |
4256 | // 14th bin: <4>_{3n|1n,1n,1n} = four3n1n1n1n = <cos(n*(3.*phi1-phi2-phi3-phi4))> \r | |
4257 | // 15th bin: <4>_{3n,1n|3n,1n} = four3n1n3n1n = <cos(n*(4.*phi1-2.*phi2-phi3-phi4))>\r | |
4258 | // 16th bin: <4>_{3n,1n|2n,2n} = four3n1n2n2n = <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))>\r | |
4259 | // 17th bin: <4>_{4n|2n,1n,1n} = four4n2n1n1n = <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> \r | |
4260 | // 18th bin: ---- EMPTY ----\r | |
4261 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = five2n1n1n1n1n = <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))>\r | |
4262 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = five2n2n2n1n1n = <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))>\r | |
4263 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = five3n1n2n1n1n = <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))>\r | |
4264 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = five4n1n1n1n1n = <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))>\r | |
4265 | // 23rd bin: ---- EMPTY ----\r | |
4266 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = six1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))>\r | |
4267 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = six2n1n1n2n1n1n = <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))>\r | |
4268 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = six2n2n1n1n1n1n = <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))>\r | |
4269 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = six3n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))>\r | |
4270 | // 28th bin: ---- EMPTY ----\r | |
4271 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = seven2n1n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))>\r | |
4272 | // 30th bin: ---- EMPTY ----\r | |
4273 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = eight1n1n1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))>\r | |
4274 | \r | |
4275 | // 4.) Binning of fDirectCorrelationsW is organized as follows:\r | |
4276 | // ..............................................................................................\r | |
4277 | // ---- bins 1-20: 2-particle correlations ----\r | |
4278 | // 1st bin: two1n1nW1W1 = <w1 w2 cos(n*(phi1-phi2))>\r | |
4279 | // 2nd bin: two2n2nW2W2 = <w1^2 w2^2 cos(2n*(phi1-phi2))>\r | |
4280 | // 3rd bin: two3n3nW3W3 = <w1^3 w2^3 cos(3n*(phi1-phi2))>\r | |
4281 | // 4th bin: two4n4nW4W4 = <w1^4 w2^4 cos(4n*(phi1-phi2))>\r | |
4282 | // 5th bin: two1n1nW3W1 = <w1^3 w2 cos(n*(phi1-phi2))>\r | |
4283 | // 6th bin: two1n1nW1W1W2 = <w1 w2 w3^2 cos(n*(phi1-phi2))> \r | |
4284 | // ---- bins 21-40: 3-particle correlations ----\r | |
4285 | // 21st bin: three2n1n1nW2W1W1 = <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> \r | |
4286 | // ---- bins 41-60: 4-particle correlations ----\r | |
4287 | // 41st bin: four1n1n1n1nW1W1W1W1 = <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))>\r | |
4288 | // ---- bins 61-80: 5-particle correlations ---- \r | |
4289 | // ---- bins 81-100: 6-particle correlations ----\r | |
4290 | // ---- bins 101-120: 7-particle correlations ----\r | |
4291 | // ---- bins 121-140: 8-particle correlations ----\r | |
4292 | // ..............................................................................................\r | |
4293 | \r | |
4294 | // 5.) Binning of fDirectCorrectionsCos is organized as follows:\r | |
4295 | // ..............................................................................................\r | |
4296 | // 1st bin: <<cos(n*(phi1))>> = cosP1n\r | |
4297 | // 2nd bin: <<cos(n*(phi1+phi2))>> = cosP1nP1n\r | |
4298 | // 3rd bin: <<cos(n*(phi1-phi2-phi3))>> = cosP1nM1nM1n\r | |
4299 | // ...\r | |
4300 | // ..............................................................................................\r | |
4301 | \r | |
4302 | // 6.) Binning of fDirectCorrectionsSin is organized as follows:\r | |
4303 | // ..............................................................................................\r | |
4304 | // 1st bin: <<sin(n*(phi1))>> = sinP1n\r | |
4305 | // 2nd bin: <<sin(n*(phi1+phi2))>> = sinP1nP1n\r | |
4306 | // 3rd bin: <<sin(n*(phi1-phi2-phi3))>> = sinP1nM1nM1n\r | |
4307 | // ...\r | |
4308 | // ..............................................................................................\r | |
4309 | \r | |
4310 | // 7.) Binning of fDirectCorrectionsCosW is organized as follows:\r | |
4311 | // .............................................................................................. \r | |
4312 | // ...\r | |
4313 | // .............................................................................................. \r | |
4314 | \r | |
4315 | // 8.) Binning of fDirectCorrectionsSinW is organized as follows:\r | |
4316 | // .............................................................................................. \r | |
4317 | // ...\r | |
4318 | // .............................................................................................. \r | |
4319 | \r | |
4320 | Int_t nPrim = anEvent->NumberOfTracks(); \r | |
4321 | AliFlowTrackSimple *aftsTrack = NULL;\r | |
4322 | \r | |
4323 | Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.;\r | |
4324 | Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1., wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.;\r | |
4325 | \r | |
4326 | Int_t n = fHarmonic; \r | |
4327 | \r | |
4328 | // 2-particle correlations and 1- and 2-particle correction terms: \r | |
4329 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
4330 | {\r | |
4331 | aftsTrack=anEvent->GetTrack(i1);\r | |
4332 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4333 | phi1=aftsTrack->Phi();\r | |
4334 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi())));\r | |
4335 | \r | |
4336 | // corrections for non-uniform acceptance:\r | |
4337 | // non-weighted: \r | |
4338 | fDirectCorrectionsCos->Fill(0.5,cos(n*phi1),1.); // <cos(n*phi1)>\r | |
4339 | fDirectCorrectionsSin->Fill(0.5,sin(n*phi1),1.); // <sin(n*phi1)> \r | |
4340 | // weighted:\r | |
4341 | // fDirectCorrectionsCosW->Fill(0.5,???,1); // to be improved (continued)\r | |
4342 | // fDirectCorrectionsSinW->Fill(0.5,???,1); // to be improved (continued)\r | |
4343 | \r | |
4344 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
4345 | {\r | |
4346 | if(i2==i1)continue;\r | |
4347 | aftsTrack=anEvent->GetTrack(i2);\r | |
4348 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4349 | phi2=aftsTrack->Phi();\r | |
4350 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi())));\r | |
4351 | \r | |
4352 | // non-weighted correlations: \r | |
4353 | fDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),1.); // <cos(n*(phi1-phi2))>\r | |
4354 | fDirectCorrelations->Fill(1.5,cos(2.*n*(phi1-phi2)),1.); // <cos(2n*(phi1-phi2))>\r | |
4355 | fDirectCorrelations->Fill(2.5,cos(3.*n*(phi1-phi2)),1.); // <cos(3n*(phi1-phi2))>\r | |
4356 | fDirectCorrelations->Fill(3.5,cos(4.*n*(phi1-phi2)),1.); // <cos(4n*(phi1-phi2))> \r | |
4357 | \r | |
4358 | // weighted correlations:\r | |
4359 | // ................................................................................................................\r | |
4360 | if(fUsePhiWeights) fDirectCorrelationsW->Fill(0.5,cos(n*(phi1-phi2)),wPhi1*wPhi2); // <w1 w2 cos( n*(phi1-phi2))>\r | |
4361 | if(fUsePhiWeights) fDirectCorrelationsW->Fill(1.5,cos(2.*n*(phi1-phi2)),pow(wPhi1,2)*pow(wPhi2,2)); // <w1^2 w2^2 cos(2n*(phi1-phi2))>\r | |
4362 | if(fUsePhiWeights) fDirectCorrelationsW->Fill(2.5,cos(3.*n*(phi1-phi2)),pow(wPhi1,3)*pow(wPhi2,3)); // <w1^3 w2^3 cos(3n*(phi1-phi2))>\r | |
4363 | if(fUsePhiWeights) fDirectCorrelationsW->Fill(3.5,cos(4.*n*(phi1-phi2)),pow(wPhi1,4)*pow(wPhi2,4)); // <w1^4 w2^4 cos(4n*(phi1-phi2))> \r | |
4364 | if(fUsePhiWeights) fDirectCorrelationsW->Fill(4.5,cos(n*(phi1-phi2)),pow(wPhi1,3)*wPhi2); // <w1^3 w2 cos(n*(phi1-phi2))>\r | |
4365 | // ...\r | |
4366 | // ................................................................................................................\r | |
4367 | \r | |
4368 | // non-weighted corrections for non-uniform acceptance (cos terms)\r | |
4369 | // ................................................................................................................\r | |
4370 | fDirectCorrectionsCos->Fill(1.5,cos(n*(phi1+phi2)),1.); // <<cos(n*(phi1+phi2))>>\r | |
4371 | // ...\r | |
4372 | // ................................................................................................................\r | |
4373 | \r | |
4374 | // non-weighted corrections for non-uniform acceptance (sin terms)\r | |
4375 | // ................................................................................................................\r | |
4376 | fDirectCorrectionsSin->Fill(1.5,sin(n*(phi1+phi2)),1.); // <<sin(n*(phi1+phi2))>>\r | |
4377 | // ...\r | |
4378 | // ................................................................................................................\r | |
4379 | \r | |
4380 | // weighted corrections for non-uniform acceptance (cos terms)\r | |
4381 | // ................................................................................................................\r | |
4382 | // fDirectCorrectionsCosW->Fill(1.5,???,1.); // to be improved (continued)\r | |
4383 | // ...\r | |
4384 | // ................................................................................................................\r | |
4385 | \r | |
4386 | // non-weighted corrections for non-uniform acceptance (sin terms)\r | |
4387 | // ................................................................................................................\r | |
4388 | // fDirectCorrectionsSinW->Fill(1.5,???,1.); // to be improved (continued)\r | |
4389 | // ...\r | |
4390 | // ................................................................................................................\r | |
4391 | \r | |
4392 | } // end of for(Int_t i2=0;i2<nPrim;i2++)\r | |
4393 | } // end of for(Int_t i1=0;i1<nPrim;i1++)\r | |
4394 | \r | |
4395 | // 3-particle correlations: \r | |
4396 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
4397 | {\r | |
4398 | aftsTrack=anEvent->GetTrack(i1);\r | |
4399 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4400 | phi1=aftsTrack->Phi();\r | |
4401 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi())));\r | |
4402 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
4403 | {\r | |
4404 | if(i2==i1)continue;\r | |
4405 | aftsTrack=anEvent->GetTrack(i2);\r | |
4406 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4407 | phi2=aftsTrack->Phi();\r | |
4408 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi())));\r | |
4409 | for(Int_t i3=0;i3<nPrim;i3++)\r | |
4410 | {\r | |
4411 | if(i3==i1||i3==i2)continue;\r | |
4412 | aftsTrack=anEvent->GetTrack(i3);\r | |
4413 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4414 | phi3=aftsTrack->Phi();\r | |
4415 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi())));\r | |
4416 | \r | |
4417 | // non-weighted correlations:\r | |
4418 | fDirectCorrelations->Fill(5.,cos(2.*n*phi1-n*(phi2+phi3)),1.); //<3>_{2n|nn,n}\r | |
4419 | fDirectCorrelations->Fill(6.,cos(3.*n*phi1-2.*n*phi2-n*phi3),1.); //<3>_{3n|2n,n}\r | |
4420 | fDirectCorrelations->Fill(7.,cos(4.*n*phi1-2.*n*phi2-2.*n*phi3),1.); //<3>_{4n|2n,2n}\r | |
4421 | fDirectCorrelations->Fill(8.,cos(4.*n*phi1-3.*n*phi2-n*phi3),1.); //<3>_{4n|3n,n}\r | |
4422 | \r | |
4423 | // weighted correlations:\r | |
4424 | // ..............................................................................................................................\r | |
4425 | // 2-p:\r | |
4426 | if(fUsePhiWeights) fDirectCorrelationsW->Fill(5.,cos(n*(phi1-phi2)),wPhi1*wPhi2*pow(wPhi3,2)); // <w1 w2 w3^2 cos(n*(phi1-phi2))>\r | |
4427 | // 3-p:\r | |
4428 | if(fUsePhiWeights) fDirectCorrelationsW->Fill(20.,cos(2.*n*phi1-n*(phi2+phi3)),pow(wPhi1,2)*wPhi2*wPhi3); // <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))>\r | |
4429 | // ...\r | |
4430 | // ..............................................................................................................................\r | |
4431 | \r | |
4432 | // non-weighted corrections for non-uniform acceptance (cos terms)\r | |
4433 | // ................................................................................................................\r | |
4434 | fDirectCorrectionsCos->Fill(2.,cos(n*(phi1-phi2-phi3)),1.); // <<cos(n*(phi1-phi2-phi3))>>\r | |
4435 | // ...\r | |
4436 | // ................................................................................................................\r | |
4437 | \r | |
4438 | // non-weighted corrections for non-uniform acceptance (sin terms)\r | |
4439 | // ................................................................................................................\r | |
4440 | fDirectCorrectionsSin->Fill(2.,sin(n*(phi1-phi2-phi3)),1.); // <<sin(n*(phi1-phi2-phi3))>>\r | |
4441 | // ...\r | |
4442 | // ................................................................................................................\r | |
4443 | \r | |
4444 | // weighted corrections for non-uniform acceptance (cos terms)\r | |
4445 | // ................................................................................................................\r | |
4446 | // ...\r | |
4447 | // ................................................................................................................\r | |
4448 | \r | |
4449 | // weighted corrections for non-uniform acceptance (sin terms)\r | |
4450 | // ................................................................................................................\r | |
4451 | // ...\r | |
4452 | // ................................................................................................................\r | |
4453 | \r | |
4454 | } // end of for(Int_t i3=0;i3<nPrim;i3++)\r | |
4455 | } // end of for(Int_t i2=0;i2<nPrim;i2++)\r | |
4456 | } // end of for(Int_t i1=0;i1<nPrim;i1++)\r | |
4457 | \r | |
4458 | // 4-particle correlations: \r | |
4459 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
4460 | {\r | |
4461 | aftsTrack=anEvent->GetTrack(i1);\r | |
4462 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4463 | phi1=aftsTrack->Phi();\r | |
4464 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi())));\r | |
4465 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
4466 | {\r | |
4467 | if(i2==i1)continue;\r | |
4468 | aftsTrack=anEvent->GetTrack(i2);\r | |
4469 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4470 | phi2=aftsTrack->Phi();\r | |
4471 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi())));\r | |
4472 | for(Int_t i3=0;i3<nPrim;i3++)\r | |
4473 | {\r | |
4474 | if(i3==i1||i3==i2)continue;\r | |
4475 | aftsTrack=anEvent->GetTrack(i3);\r | |
4476 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4477 | phi3=aftsTrack->Phi();\r | |
4478 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi())));\r | |
4479 | for(Int_t i4=0;i4<nPrim;i4++)\r | |
4480 | {\r | |
4481 | if(i4==i1||i4==i2||i4==i3)continue;\r | |
4482 | aftsTrack=anEvent->GetTrack(i4);\r | |
4483 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4484 | phi4=aftsTrack->Phi();\r | |
4485 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi())));\r | |
4486 | \r | |
4487 | // non-weighted:\r | |
4488 | fDirectCorrelations->Fill(10.,cos(n*phi1+n*phi2-n*phi3-n*phi4),1.); // <4>_{n,n|n,n} \r | |
4489 | fDirectCorrelations->Fill(11.,cos(2.*n*phi1+n*phi2-2.*n*phi3-n*phi4),1.); // <4>_{2n,n|2n,n}\r | |
4490 | fDirectCorrelations->Fill(12.,cos(2.*n*phi1+2*n*phi2-2.*n*phi3-2.*n*phi4),1.); // <4>_{2n,2n|2n,2n}\r | |
4491 | fDirectCorrelations->Fill(13.,cos(3.*n*phi1-n*phi2-n*phi3-n*phi4),1.); // <4>_{3n|n,n,n}\r | |
4492 | fDirectCorrelations->Fill(14.,cos(3.*n*phi1+n*phi2-3.*n*phi3-n*phi4),1.); // <4>_{3n,n|3n,n} \r | |
4493 | fDirectCorrelations->Fill(15.,cos(3.*n*phi1+n*phi2-2.*n*phi3-2.*n*phi4),1.); // <4>_{3n,n|2n,2n}\r | |
4494 | fDirectCorrelations->Fill(16.,cos(4.*n*phi1-2.*n*phi2-n*phi3-n*phi4),1.); // <4>_{4n|2n,n,n}\r | |
4495 | \r | |
4496 | // weighted:\r | |
4497 | //.......................................................................................\r | |
4498 | // 4-p:\r | |
4499 | if(fUsePhiWeights) fDirectCorrelationsW->Fill(40.,cos(n*phi1+n*phi2-n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); \r | |
4500 | // ... \r | |
4501 | //.......................................................................................\r | |
4502 | \r | |
4503 | } \r | |
4504 | }\r | |
4505 | }\r | |
4506 | }\r | |
4507 | \r | |
4508 | // 5-particle correlations: \r | |
4509 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
4510 | {\r | |
4511 | //cout<<"i1 = "<<i1<<endl;\r | |
4512 | aftsTrack=anEvent->GetTrack(i1);\r | |
4513 | if(!(aftsTrack->InRPSelection())) continue; \r | |
4514 | phi1=aftsTrack->Phi();\r | |
4515 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi())));\r | |
4516 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
4517 | {\r | |
4518 | if(i2==i1)continue;\r | |
4519 | aftsTrack=anEvent->GetTrack(i2);\r | |
4520 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4521 | phi2=aftsTrack->Phi();\r | |
4522 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi())));\r | |
4523 | for(Int_t i3=0;i3<nPrim;i3++)\r | |
4524 | {\r | |
4525 | if(i3==i1||i3==i2)continue;\r | |
4526 | aftsTrack=anEvent->GetTrack(i3);\r | |
4527 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4528 | phi3=aftsTrack->Phi();\r | |
4529 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi())));\r | |
4530 | for(Int_t i4=0;i4<nPrim;i4++)\r | |
4531 | {\r | |
4532 | if(i4==i1||i4==i2||i4==i3)continue;\r | |
4533 | aftsTrack=anEvent->GetTrack(i4);\r | |
4534 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4535 | phi4=aftsTrack->Phi();\r | |
4536 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi())));\r | |
4537 | for(Int_t i5=0;i5<nPrim;i5++)\r | |
4538 | {\r | |
4539 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue;\r | |
4540 | aftsTrack=anEvent->GetTrack(i5);\r | |
4541 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4542 | phi5=aftsTrack->Phi();\r | |
4543 | if(fUsePhiWeights && fPhiWeights) wPhi5 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi5*fnBinsPhi/TMath::TwoPi())));\r | |
4544 | \r | |
4545 | // non-weighted:\r | |
4546 | //------------------------------------------------------------------------------------------------------\r | |
4547 | fDirectCorrelations->Fill(18.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),1.); //<5>_{2n,n|n,n,n}\r | |
4548 | fDirectCorrelations->Fill(19.,cos(2.*n*phi1+2.*n*phi2-2.*n*phi3-n*phi4-n*phi5),1.); //<5>_{2n,2n|2n,n,n}\r | |
4549 | fDirectCorrelations->Fill(20.,cos(3.*n*phi1+n*phi2-2.*n*phi3-n*phi4-n*phi5),1.); //<5>_{3n,n|2n,n,n}\r | |
4550 | fDirectCorrelations->Fill(21.,cos(4.*n*phi1-n*phi2-n*phi3-n*phi4-n*phi5),1.); //<5>_{4n|n,n,n,n}\r | |
4551 | //------------------------------------------------------------------------------------------------------\r | |
4552 | \r | |
4553 | // weighted:\r | |
4554 | //..............................................................................................................\r | |
4555 | // 5-p:\r | |
4556 | if(fUsePhiWeights) fDirectCorrelationsW->Fill(60.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),pow(wPhi1,2)*wPhi2*wPhi3*wPhi4*wPhi5); \r | |
4557 | //..............................................................................................................\r | |
4558 | \r | |
4559 | }\r | |
4560 | } \r | |
4561 | }\r | |
4562 | }\r | |
4563 | }\r | |
4564 | \r | |
4565 | // 6-particle correlations:\r | |
4566 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
4567 | {\r | |
4568 | //cout<<"i1 = "<<i1<<endl;\r | |
4569 | aftsTrack=anEvent->GetTrack(i1);\r | |
4570 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4571 | phi1=aftsTrack->Phi();\r | |
4572 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi())));\r | |
4573 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
4574 | {\r | |
4575 | if(i2==i1)continue;\r | |
4576 | aftsTrack=anEvent->GetTrack(i2);\r | |
4577 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4578 | phi2=aftsTrack->Phi();\r | |
4579 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi())));\r | |
4580 | for(Int_t i3=0;i3<nPrim;i3++)\r | |
4581 | {\r | |
4582 | if(i3==i1||i3==i2)continue;\r | |
4583 | aftsTrack=anEvent->GetTrack(i3);\r | |
4584 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4585 | phi3=aftsTrack->Phi();\r | |
4586 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi())));\r | |
4587 | for(Int_t i4=0;i4<nPrim;i4++)\r | |
4588 | {\r | |
4589 | if(i4==i1||i4==i2||i4==i3)continue;\r | |
4590 | aftsTrack=anEvent->GetTrack(i4);\r | |
4591 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4592 | phi4=aftsTrack->Phi();\r | |
4593 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi())));\r | |
4594 | for(Int_t i5=0;i5<nPrim;i5++)\r | |
4595 | {\r | |
4596 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue;\r | |
4597 | aftsTrack=anEvent->GetTrack(i5);\r | |
4598 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4599 | phi5=aftsTrack->Phi();\r | |
4600 | if(fUsePhiWeights && fPhiWeights) wPhi5 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi5*fnBinsPhi/TMath::TwoPi())));\r | |
4601 | for(Int_t i6=0;i6<nPrim;i6++)\r | |
4602 | {\r | |
4603 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;\r | |
4604 | aftsTrack=anEvent->GetTrack(i6);\r | |
4605 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4606 | phi6=aftsTrack->Phi(); \r | |
4607 | if(fUsePhiWeights && fPhiWeights) wPhi6 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi6*fnBinsPhi/TMath::TwoPi())));\r | |
4608 | \r | |
4609 | // non-weighted:\r | |
4610 | //-----------------------------------------------------------------------------------------------------------\r | |
4611 | fDirectCorrelations->Fill(23.,cos(n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6),1.); //<6>_{n,n,n|n,n,n}\r | |
4612 | fDirectCorrelations->Fill(24.,cos(2.*n*phi1+n*phi2+n*phi3-2.*n*phi4-n*phi5-n*phi6),1.); //<6>_{2n,n,n|2n,n,n}\r | |
4613 | fDirectCorrelations->Fill(25.,cos(2.*n*phi1+2.*n*phi2-n*phi3-n*phi4-n*phi5-n*phi6),1.); //<6>_{2n,2n|n,n,n,n}\r | |
4614 | fDirectCorrelations->Fill(26.,cos(3.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5-n*phi6),1.); //<6>_{3n,n|n,n,n,n} \r | |
4615 | //-----------------------------------------------------------------------------------------------------------\r | |
4616 | \r | |
4617 | // weighted:\r | |
4618 | //.................................................................................................................\r | |
4619 | // 6-p:\r | |
4620 | if(fUsePhiWeights) fDirectCorrelationsW->Fill(80.,cos(n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6),wPhi1*wPhi2*wPhi3*wPhi4*wPhi5*wPhi6);\r | |
4621 | //................................................................................................................. \r | |
4622 | \r | |
4623 | } \r | |
4624 | }\r | |
4625 | } \r | |
4626 | }\r | |
4627 | }\r | |
4628 | }\r | |
4629 | \r | |
4630 | // 7-particle correlations:\r | |
4631 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
4632 | {\r | |
4633 | //cout<<"i1 = "<<i1<<endl;\r | |
4634 | aftsTrack=anEvent->GetTrack(i1);\r | |
4635 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4636 | phi1=aftsTrack->Phi();\r | |
4637 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi())));\r | |
4638 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
4639 | {\r | |
4640 | if(i2==i1)continue;\r | |
4641 | aftsTrack=anEvent->GetTrack(i2);\r | |
4642 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4643 | phi2=aftsTrack->Phi();\r | |
4644 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi())));\r | |
4645 | for(Int_t i3=0;i3<nPrim;i3++)\r | |
4646 | {\r | |
4647 | if(i3==i1||i3==i2)continue;\r | |
4648 | aftsTrack=anEvent->GetTrack(i3);\r | |
4649 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4650 | phi3=aftsTrack->Phi();\r | |
4651 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi())));\r | |
4652 | for(Int_t i4=0;i4<nPrim;i4++)\r | |
4653 | {\r | |
4654 | if(i4==i1||i4==i2||i4==i3)continue;\r | |
4655 | aftsTrack=anEvent->GetTrack(i4);\r | |
4656 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4657 | phi4=aftsTrack->Phi();\r | |
4658 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi())));\r | |
4659 | for(Int_t i5=0;i5<nPrim;i5++)\r | |
4660 | {\r | |
4661 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue;\r | |
4662 | aftsTrack=anEvent->GetTrack(i5);\r | |
4663 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4664 | phi5=aftsTrack->Phi();\r | |
4665 | if(fUsePhiWeights && fPhiWeights) wPhi5 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi5*fnBinsPhi/TMath::TwoPi())));\r | |
4666 | for(Int_t i6=0;i6<nPrim;i6++)\r | |
4667 | {\r | |
4668 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;\r | |
4669 | aftsTrack=anEvent->GetTrack(i6);\r | |
4670 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4671 | phi6=aftsTrack->Phi(); \r | |
4672 | if(fUsePhiWeights && fPhiWeights) wPhi6 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi6*fnBinsPhi/TMath::TwoPi())));\r | |
4673 | for(Int_t i7=0;i7<nPrim;i7++)\r | |
4674 | {\r | |
4675 | if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;\r | |
4676 | aftsTrack=anEvent->GetTrack(i7);\r | |
4677 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4678 | phi7=aftsTrack->Phi(); \r | |
4679 | if(fUsePhiWeights && fPhiWeights) wPhi7 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi7*fnBinsPhi/TMath::TwoPi())));\r | |
4680 | \r | |
4681 | // non-weighted:\r | |
4682 | //---------------------------------------------------------------------------------------------------------------\r | |
4683 | fDirectCorrelations->Fill(28.,cos(2.*n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6-n*phi7),1.);//<7>_{2n,n,n|n,n,n,n}\r | |
4684 | //---------------------------------------------------------------------------------------------------------------\r | |
4685 | \r | |
4686 | // weighted:\r | |
4687 | //..........................................................................................................................................\r | |
4688 | if(fUsePhiWeights) fDirectCorrelationsW->Fill(100.,cos(2.*n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6-n*phi7),\r | |
4689 | pow(wPhi1,2.)*wPhi2*wPhi3*wPhi4*wPhi5*wPhi6*wPhi7);\r | |
4690 | //..........................................................................................................................................\r | |
4691 | \r | |
4692 | } \r | |
4693 | } \r | |
4694 | }\r | |
4695 | } \r | |
4696 | }\r | |
4697 | }\r | |
4698 | }\r | |
4699 | \r | |
4700 | cout<<endl;\r | |
4701 | \r | |
4702 | // 8-particle correlations:\r | |
4703 | for(Int_t i1=0;i1<nPrim;i1++)\r | |
4704 | {\r | |
4705 | cout<<"i1 = "<<i1<<endl;\r | |
4706 | aftsTrack=anEvent->GetTrack(i1);\r | |
4707 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4708 | phi1=aftsTrack->Phi();\r | |
4709 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi())));\r | |
4710 | for(Int_t i2=0;i2<nPrim;i2++)\r | |
4711 | {\r | |
4712 | if(i2==i1)continue;\r | |
4713 | aftsTrack=anEvent->GetTrack(i2);\r | |
4714 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4715 | phi2=aftsTrack->Phi();\r | |
4716 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi())));\r | |
4717 | for(Int_t i3=0;i3<nPrim;i3++)\r | |
4718 | {\r | |
4719 | if(i3==i1||i3==i2)continue;\r | |
4720 | aftsTrack=anEvent->GetTrack(i3);\r | |
4721 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4722 | phi3=aftsTrack->Phi();\r | |
4723 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi())));\r | |
4724 | for(Int_t i4=0;i4<nPrim;i4++)\r | |
4725 | {\r | |
4726 | if(i4==i1||i4==i2||i4==i3)continue;\r | |
4727 | aftsTrack=anEvent->GetTrack(i4);\r | |
4728 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4729 | phi4=aftsTrack->Phi();\r | |
4730 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi())));\r | |
4731 | for(Int_t i5=0;i5<nPrim;i5++)\r | |
4732 | {\r | |
4733 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue;\r | |
4734 | aftsTrack=anEvent->GetTrack(i5);\r | |
4735 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4736 | phi5=aftsTrack->Phi();\r | |
4737 | if(fUsePhiWeights && fPhiWeights) wPhi5 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi5*fnBinsPhi/TMath::TwoPi())));\r | |
4738 | for(Int_t i6=0;i6<nPrim;i6++)\r | |
4739 | {\r | |
4740 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue;\r | |
4741 | aftsTrack=anEvent->GetTrack(i6);\r | |
4742 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4743 | phi6=aftsTrack->Phi();\r | |
4744 | if(fUsePhiWeights && fPhiWeights) wPhi6 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi6*fnBinsPhi/TMath::TwoPi()))); \r | |
4745 | for(Int_t i7=0;i7<nPrim;i7++)\r | |
4746 | {\r | |
4747 | if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue;\r | |
4748 | aftsTrack=anEvent->GetTrack(i7);\r | |
4749 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4750 | phi7=aftsTrack->Phi();\r | |
4751 | if(fUsePhiWeights && fPhiWeights) wPhi7 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi7*fnBinsPhi/TMath::TwoPi()))); \r | |
4752 | for(Int_t i8=0;i8<nPrim;i8++)\r | |
4753 | {\r | |
4754 | if(i8==i1||i8==i2||i8==i3||i8==i4||i8==i5||i8==i6||i8==i7)continue;\r | |
4755 | aftsTrack=anEvent->GetTrack(i8);\r | |
4756 | if(!(aftsTrack->InRPSelection())) continue;\r | |
4757 | phi8=aftsTrack->Phi();\r | |
4758 | if(fUsePhiWeights && fPhiWeights) wPhi8 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi8*fnBinsPhi/TMath::TwoPi()))); \r | |
4759 | \r | |
4760 | // non-weighted: \r | |
4761 | //--------------------------------------------------------------------------------------------------------------------\r | |
4762 | fDirectCorrelations->Fill(30.,cos(n*phi1+n*phi2+n*phi3+n*phi4-n*phi5-n*phi6-n*phi7-n*phi8),1.);//<8>_{n,n,n,n|n,n,n,n}\r | |
4763 | //--------------------------------------------------------------------------------------------------------------------\r | |
4764 | \r | |
4765 | // weighted: \r | |
4766 | //...........................................................................................................................................\r | |
4767 | if(fUsePhiWeights) fDirectCorrelationsW->Fill(120.,cos(n*phi1+n*phi2+n*phi3+n*phi4-n*phi5-n*phi6-n*phi7-n*phi8),\r | |
4768 | wPhi1*wPhi2*wPhi3*wPhi4*wPhi5*wPhi6*wPhi7*wPhi8);\r | |
4769 | //...........................................................................................................................................\r | |
4770 | \r | |
4771 | } \r | |
4772 | } \r | |
4773 | } \r | |
4774 | }\r | |
4775 | } \r | |
4776 | }\r | |
4777 | }\r | |
4778 | }\r | |
4779 | \r | |
4780 | } // end of AliFlowAnalysisWithQCumulants::EvaluateNestedLoopsForIntegratedFlow(AliFlowEventSimple* anEvent)\r | |
4781 | \r | |
4782 | \r | |
4783 | //================================================================================================================================\r | |
4784 | \r | |
4785 | \r | |
4786 | void AliFlowAnalysisWithQCumulants::CompareResultsFromNestedLoopsAndFromQVectorsForIntFlow(Bool_t useParticleWeights)\r | |
4787 | {\r | |
4788 | // compare results needed for int. flow calculated with nested loops and with those calculated from Q-vectors\r | |
4789 | \r | |
4790 | \r | |
4791 | /*\r | |
4792 | \r | |
4793 | \r | |
4794 | cout<<endl;\r | |
4795 | cout<<endl;\r | |
4796 | cout<<" *************************************"<<endl;\r | |
4797 | cout<<" **** cross-checking the formulas ****"<<endl;\r | |
4798 | cout<<" **** for integrated flow ****"<<endl;\r | |
4799 | cout<<" *************************************"<<endl;\r | |
4800 | cout<<endl;\r | |
4801 | cout<<endl;\r | |
4802 | \r | |
4803 | \r | |
4804 | */ \r | |
4805 | \r | |
4806 | if(!(useParticleWeights))\r | |
4807 | {\r | |
4808 | \r | |
4809 | /*\r | |
4810 | \r | |
4811 | cout<<" **** results for non-weighted correlations: ****"<<endl;\r | |
4812 | cout<<endl;\r | |
4813 | cout<<"<2>_{1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(1)<<endl;\r | |
4814 | cout<<"<2>_{1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(1)<<endl;\r | |
4815 | cout<<endl;\r | |
4816 | cout<<"<2>_{2n,2n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(2)<<endl;\r | |
4817 | cout<<"<2>_{2n,2n} from nested loops = "<<fDirectCorrelations->GetBinContent(2)<<endl;\r | |
4818 | cout<<endl;\r | |
4819 | cout<<"<2>_{3n,3n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(3)<<endl;\r | |
4820 | cout<<"<2>_{3n,3n} from nested loops = "<<fDirectCorrelations->GetBinContent(3)<<endl;\r | |
4821 | cout<<endl;\r | |
4822 | cout<<"<2>_{4n,4n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(4)<<endl;\r | |
4823 | cout<<"<2>_{4n,4n} from nested loops = "<<fDirectCorrelations->GetBinContent(4)<<endl;\r | |
4824 | cout<<endl; \r | |
4825 | cout<<"<3>_{2n|1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(6)<<endl;\r | |
4826 | cout<<"<3>_{2n|1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(6)<<endl;\r | |
4827 | cout<<endl;\r | |
4828 | cout<<"<3>_{3n|2n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(7)<<endl;\r | |
4829 | cout<<"<3>_{3n|2n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(7)<<endl;\r | |
4830 | cout<<endl;\r | |
4831 | cout<<"<3>_{4n,2n,2n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(8)<<endl;\r | |
4832 | cout<<"<3>_{4n,2n,2n} from nested loops = "<<fDirectCorrelations->GetBinContent(8)<<endl;\r | |
4833 | cout<<endl;\r | |
4834 | cout<<"<3>_{4n,3n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(9)<<endl;\r | |
4835 | cout<<"<3>_{4n,3n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(9)<<endl;\r | |
4836 | cout<<endl; \r | |
4837 | cout<<"<4>_{1n,1n|1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(11)<<endl;\r | |
4838 | cout<<"<4>_{1n,1n|1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(11)<<endl;\r | |
4839 | cout<<endl;\r | |
4840 | cout<<"<4>_{2n,1n|2n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(12)<<endl;\r | |
4841 | cout<<"<4>_{2n,1n|2n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(12)<<endl;\r | |
4842 | cout<<endl;\r | |
4843 | cout<<"<4>_{2n,2n|2n,2n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(13)<<endl;\r | |
4844 | cout<<"<4>_{2n,2n|2n,2n} from nested loops = "<<fDirectCorrelations->GetBinContent(13)<<endl;\r | |
4845 | cout<<endl;\r | |
4846 | cout<<"<4>_{3n|1n,1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(14)<<endl;\r | |
4847 | cout<<"<4>_{3n|1n,1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(14)<<endl;\r | |
4848 | cout<<endl;\r | |
4849 | cout<<"<4>_{3n,1n|3n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(15)<<endl;\r | |
4850 | cout<<"<4>_{3n,1n|3n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(15)<<endl;\r | |
4851 | cout<<endl;\r | |
4852 | cout<<"<4>_{3n,1n|2n,2n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(16)<<endl;\r | |
4853 | cout<<"<4>_{3n,1n|2n,2n} from nested loops = "<<fDirectCorrelations->GetBinContent(16)<<endl;\r | |
4854 | cout<<endl; \r | |
4855 | cout<<"<4>_{4n|2n,1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(17)<<endl;\r | |
4856 | cout<<"<4>_{4n|2n,1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(17)<<endl;\r | |
4857 | cout<<endl;\r | |
4858 | cout<<"<5>_{2n,1n|1n,1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(19)<<endl;\r | |
4859 | cout<<"<5>_{2n,1n|1n,1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(19)<<endl;\r | |
4860 | cout<<endl;\r | |
4861 | cout<<"<5>_{2n,2n|2n,1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(20)<<endl;\r | |
4862 | cout<<"<5>_{2n,2n|2n,1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(20)<<endl;\r | |
4863 | cout<<endl;\r | |
4864 | cout<<"<5>_{3n,1n|2n,1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(21)<<endl;\r | |
4865 | cout<<"<5>_{3n,1n|2n,1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(21)<<endl;\r | |
4866 | cout<<endl;\r | |
4867 | cout<<"<5>_{4n|1n,1n,1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(22)<<endl;\r | |
4868 | cout<<"<5>_{4n|1n,1n,1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(22)<<endl;\r | |
4869 | cout<<endl;\r | |
4870 | cout<<"<6>_{1n,1n,1n|1n,1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(24)<<endl;\r | |
4871 | cout<<"<6>_{1n,1n,1n|1n,1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(24)<<endl;\r | |
4872 | cout<<endl; \r | |
4873 | cout<<"<6>_{2n,1n,1n|2n,1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(25)<<endl;\r | |
4874 | cout<<"<6>_{2n,1n,1n|2n,1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(25)<<endl;\r | |
4875 | cout<<endl;\r | |
4876 | cout<<"<6>_{2n,2n|1n,1n,1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(26)<<endl;\r | |
4877 | cout<<"<6>_{2n,2n|1n,1n,1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(26)<<endl;\r | |
4878 | cout<<endl; \r | |
4879 | cout<<"<6>_{3n,1n|1n,1n,1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(27)<<endl;\r | |
4880 | cout<<"<6>_{3n,1n|1n,1n,1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(27)<<endl;\r | |
4881 | cout<<endl; \r | |
4882 | cout<<"<7>_{2n,1n,1n|1n,1n,1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(29)<<endl;\r | |
4883 | cout<<"<7>_{2n,1n,1n|1n,1n,1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(29)<<endl;\r | |
4884 | cout<<endl; \r | |
4885 | cout<<"<8>_{1n,1n,1n,1n|1n,1n,1n,1n} from Q-vectors = "<<fQCorrelations[0][0]->GetBinContent(31)<<endl;\r | |
4886 | cout<<"<8>_{1n,1n,1n,1n|1n,1n,1n,1n} from nested loops = "<<fDirectCorrelations->GetBinContent(31)<<endl;\r | |
4887 | cout<<endl; \r | |
4888 | cout<<endl; \r | |
4889 | cout<<" **** results for non-weighted correction terms: ****"<<endl;\r | |
4890 | cout<<endl;\r | |
4891 | //.........................................................................................\r | |
4892 | cout<<"<cos(n*phi1)> from Q-vectors = "<<fQCorrections[0][0][1]->GetBinContent(1)<<endl;\r | |
4893 | cout<<"<cos(n*phi1)> from nested loops = "<<fDirectCorrectionsCos->GetBinContent(1)<<endl;\r | |
4894 | cout<<endl;\r | |
4895 | cout<<"<sin(n*phi1)> from Q-vectors = "<<fQCorrections[0][0][0]->GetBinContent(1)<<endl;\r | |
4896 | cout<<"<sin(n*phi1)> from nested loops = "<<fDirectCorrectionsSin->GetBinContent(1)<<endl;\r | |
4897 | cout<<endl; \r | |
4898 | cout<<"<cos(n*(phi1+phi2))> from Q-vectors = "<<fQCorrections[0][0][1]->GetBinContent(2)<<endl;\r | |
4899 | cout<<"<cos(n*(phi1+phi2))> from nested loops = "<<fDirectCorrectionsCos->GetBinContent(2)<<endl;\r | |
4900 | cout<<endl;\r | |
4901 | cout<<"<sin(n*(phi1+phi2))> from Q-vectors = "<<fQCorrections[0][0][0]->GetBinContent(2)<<endl;\r | |
4902 | cout<<"<sin(n*(phi1+phi2))> from nested loops = "<<fDirectCorrectionsSin->GetBinContent(2)<<endl;\r | |
4903 | cout<<endl; \r | |
4904 | cout<<"<cos(n*(phi1-phi2-phi3))> from Q-vectors = "<<fQCorrections[0][0][1]->GetBinContent(3)<<endl;\r | |
4905 | cout<<"<cos(n*(phi1-phi2-phi3))> from nested loops = "<<fDirectCorrectionsCos->GetBinContent(3)<<endl;\r | |
4906 | cout<<endl;\r | |
4907 | cout<<"<sin(n*(phi1-phi2-phi3))> from Q-vectors = "<<fQCorrections[0][0][0]->GetBinContent(3)<<endl;\r | |
4908 | cout<<"<sin(n*(phi1-phi2-phi3))> from nested loops = "<<fDirectCorrectionsSin->GetBinContent(3)<<endl;\r | |
4909 | cout<<endl; \r | |
4910 | //.........................................................................................\r | |
4911 | \r | |
4912 | */\r | |
4913 | \r | |
4914 | }\r | |
4915 | \r | |
4916 | if(useParticleWeights)\r | |
4917 | {\r | |
4918 | \r | |
4919 | /* \r | |
4920 | \r | |
4921 | cout<<" **** results for weighted correlations: ****"<<endl;\r | |
4922 | cout<<endl;\r | |
4923 | //.........................................................................................\r | |
4924 | cout<<"<w1 w2 cos(n*(phi1-phi2))> from Q-vectors = "<<fQCorrelations[1][0]->GetBinContent(1)<<endl;\r | |
4925 | cout<<"<<w1 w2 cos(n*(phi1-phi2))> from nested loops = "<<fDirectCorrelationsW->GetBinContent(1)<<endl;\r | |
4926 | cout<<endl;\r | |
4927 | cout<<"<w1^2 w2^2 cos(2n*(phi1-phi2))> from Q-vectors = "<<fQCorrelations[1][0]->GetBinContent(2)<<endl;\r | |
4928 | cout<<"<w1^2 w2^2 cos(2n*(phi1-phi2))> from nested loops = "<<fDirectCorrelationsW->GetBinContent(2)<<endl;\r | |
4929 | cout<<endl;\r | |
4930 | cout<<"<w1^3 w2^3 cos(3n*(phi1-phi2))> from Q-vectors = "<<fQCorrelations[1][0]->GetBinContent(3)<<endl;\r | |
4931 | cout<<"<w1^3 w2^3 cos(3n*(phi1-phi2))> from nested loops = "<<fDirectCorrelationsW->GetBinContent(3)<<endl;\r | |
4932 | cout<<endl;\r | |
4933 | cout<<"<w1^4 w2^4 cos(4n*(phi1-phi2))> from Q-vectors = "<<fQCorrelations[1][0]->GetBinContent(4)<<endl;\r | |
4934 | cout<<"<w1^4 w2^4 cos(4n*(phi1-phi2))> from nested loops = "<<fDirectCorrelationsW->GetBinContent(4)<<endl;\r | |
4935 | cout<<endl; \r | |
4936 | \r | |
4937 | \r | |
4938 | */\r | |
4939 | \r | |
4940 | \r | |
4941 | /*\r | |
4942 | cout<<"<w1^3 w2 cos(n*(phi1-phi2))> from Q-vectors = "<<fQCorrelationsW->GetBinContent(5)<<endl;\r | |
4943 | cout<<"<w1^3 w2 cos(n*(phi1-phi2))> from nested loops = "<<fDirectCorrelationsW->GetBinContent(5)<<endl;\r | |
4944 | cout<<endl;\r | |
4945 | cout<<"<w1 w2 w3^2 cos(n*(phi1-phi2))> from Q-vectors = "<<fQCorrelationsW->GetBinContent(6)<<endl;\r | |
4946 | cout<<"<w1 w2 w3^2 cos(n*(phi1-phi2))> from nested loops = "<<fDirectCorrelationsW->GetBinContent(6)<<endl;\r | |
4947 | cout<<endl;\r | |
4948 | cout<<"<w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> from Q-vectors = "<<fQCorrelationsW->GetBinContent(21)<<endl;\r | |
4949 | cout<<"<w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> from nested loops = "<<fDirectCorrelationsW->GetBinContent(21)<<endl;\r | |
4950 | cout<<endl;\r | |
4951 | */ \r | |
4952 | \r | |
4953 | \r | |
4954 | /*\r | |
4955 | \r | |
4956 | \r | |
4957 | cout<<"<w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> from Q-vectors = "<<fQCorrelations[1][0]->GetBinContent(11)<<endl;\r | |
4958 | cout<<"<w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> from nested loops = "<<fDirectCorrelationsW->GetBinContent(41)<<endl;\r | |
4959 | cout<<endl;\r | |
4960 | //.........................................................................................\r | |
4961 | //cout<<endl; \r | |
4962 | //cout<<endl; \r | |
4963 | //cout<<" **** results for weighted correction terms: ****"<<endl;\r | |
4964 | //cout<<endl;\r | |
4965 | //.........................................................................................\r | |
4966 | \r | |
4967 | */\r | |
4968 | \r | |
4969 | } \r | |
4970 | \r | |
4971 | } // end of AliFlowAnalysisWithQCumulants::CompareResultsFromNestedLoopsAndFromQVectorsForIntFlow(Bool_t useParticleWeights)\r | |
4972 | \r | |
4973 | \r | |
4974 | //================================================================================================================================\r | |
4975 | \r | |
4976 | \r | |
4977 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrelations()\r | |
4978 | {\r | |
4979 | // Calculate averages of products of correlations for integrated flow\r | |
4980 | \r | |
4981 | // a) Binning of fIntFlowProductOfCorrelationsPro is organized as follows:\r | |
4982 | // 1st bin: <<2><4>> \r | |
4983 | // 2nd bin: <<2><6>>\r | |
4984 | // 3rd bin: <<2><8>>\r | |
4985 | // 4th bin: <<4><6>>\r | |
4986 | // 5th bin: <<4><8>>\r | |
4987 | // 6th bin: <<6><8>>\r | |
4988 | \r | |
4989 | Double_t dMult = (*fSMpk)(0,0); // multiplicity \r | |
4990 | \r | |
4991 | Double_t twoEBE = 0.; // <2>\r | |
4992 | Double_t fourEBE = 0.; // <4>\r | |
4993 | Double_t sixEBE = 0.; // <6>\r | |
4994 | Double_t eightEBE = 0.; // <8>\r | |
4995 | \r | |
4996 | // to be improved (this can be implemented better)\r | |
4997 | if(dMult>1)\r | |
4998 | {\r | |
4999 | twoEBE = fIntFlowCorrelationsEBE->GetBinContent(1);\r | |
5000 | if(dMult>3)\r | |
5001 | { \r | |
5002 | fourEBE = fIntFlowCorrelationsEBE->GetBinContent(2);\r | |
5003 | if(dMult>5) \r | |
5004 | {\r | |
5005 | sixEBE = fIntFlowCorrelationsEBE->GetBinContent(3);\r | |
5006 | if(dMult>7) \r | |
5007 | { \r | |
5008 | eightEBE = fIntFlowCorrelationsEBE->GetBinContent(4);\r | |
5009 | }\r | |
5010 | }\r | |
5011 | }\r | |
5012 | } \r | |
5013 | \r | |
5014 | // <<2><4>>\r | |
5015 | if(dMult>3)\r | |
5016 | {\r | |
5017 | fIntFlowProductOfCorrelationsPro->Fill(0.5,twoEBE*fourEBE,dMult*(dMult-1)*dMult*(dMult-1)*(dMult-2)*(dMult-3));\r | |
5018 | }\r | |
5019 | \r | |
5020 | // <<2><6>>\r | |
5021 | if(dMult>5)\r | |
5022 | {\r | |
5023 | fIntFlowProductOfCorrelationsPro->Fill(1.5,twoEBE*sixEBE,dMult*(dMult-1)*dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5));\r | |
5024 | }\r | |
5025 | \r | |
5026 | // <<2><8>>\r | |
5027 | if(dMult>7)\r | |
5028 | {\r | |
5029 | fIntFlowProductOfCorrelationsPro->Fill(2.5,twoEBE*eightEBE,dMult*(dMult-1)*dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7));\r | |
5030 | }\r | |
5031 | \r | |
5032 | // <<4><6>>\r | |
5033 | if(dMult>5)\r | |
5034 | {\r | |
5035 | fIntFlowProductOfCorrelationsPro->Fill(3.5,fourEBE*sixEBE,dMult*(dMult-1)*(dMult-2)*(dMult-3)*dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5));\r | |
5036 | }\r | |
5037 | \r | |
5038 | // <<4><8>>\r | |
5039 | if(dMult>7)\r | |
5040 | {\r | |
5041 | fIntFlowProductOfCorrelationsPro->Fill(4.5,fourEBE*eightEBE,dMult*(dMult-1)*(dMult-2)*(dMult-3)*\r | |
5042 | dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7));\r | |
5043 | }\r | |
5044 | \r | |
5045 | // <<6><8>>\r | |
5046 | if(dMult>7)\r | |
5047 | {\r | |
5048 | fIntFlowProductOfCorrelationsPro->Fill(5.5,sixEBE*eightEBE,dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*\r | |
5049 | dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7));\r | |
5050 | }\r | |
5051 | \r | |
5052 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrelations()\r | |
5053 | \r | |
5054 | \r | |
5055 | //================================================================================================================================\r | |
5056 | \r | |
5057 | \r | |
5058 | void AliFlowAnalysisWithQCumulants::CalculateCovariancesIntFlow()\r | |
5059 | {\r | |
5060 | // a) Calculate unbiased estimators Cov(<2>,<4>), Cov(<2>,<6>), Cov(<2>,<8>), Cov(<4>,<6>), Cov(<4>,<8>) and Cov(<6>,<8>)\r | |
5061 | // for covariances V_(<2>,<4>), V_(<2>,<6>), V_(<2>,<8>), V_(<4>,<6>), V_(<4>,<8>) and V_(<6>,<8>).\r | |
5062 | // b) Store in histogram fIntFlowCovariances for instance the following: \r | |
5063 | //\r | |
5064 | // Cov(<2>,<4>) * (sum_{i=1}^{N} w_{<2>}_i w_{<4>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<4>}_j)]\r | |
5065 | // \r | |
5066 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<4>} is event weight for <4>.\r | |
5067 | // c) Binning of fIntFlowCovariances is organized as follows:\r | |
5068 | // \r | |
5069 | // 1st bin: Cov(<2>,<4>) * (sum_{i=1}^{N} w_{<2>}_i w_{<4>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<4>}_j)] \r | |
5070 | // 2nd bin: Cov(<2>,<6>) * (sum_{i=1}^{N} w_{<2>}_i w_{<6>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<6>}_j)]\r | |
5071 | // 3rd bin: Cov(<2>,<8>) * (sum_{i=1}^{N} w_{<2>}_i w_{<8>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<8>}_j)]\r | |
5072 | // 4th bin: Cov(<4>,<6>) * (sum_{i=1}^{N} w_{<4>}_i w_{<6>}_i )/[(sum_{i=1}^{N} w_{<4>}_i) * (sum_{j=1}^{N} w_{<6>}_j)]\r | |
5073 | // 5th bin: Cov(<4>,<8>) * (sum_{i=1}^{N} w_{<4>}_i w_{<8>}_i )/[(sum_{i=1}^{N} w_{<4>}_i) * (sum_{j=1}^{N} w_{<8>}_j)]\r | |
5074 | // 6th bin: Cov(<6>,<8>) * (sum_{i=1}^{N} w_{<6>}_i w_{<8>}_i )/[(sum_{i=1}^{N} w_{<6>}_i) * (sum_{j=1}^{N} w_{<8>}_j)]\r | |
5075 | \r | |
5076 | for(Int_t power=0;power<2;power++)\r | |
5077 | { \r | |
5078 | if(!(fIntFlowCorrelationsPro && fIntFlowProductOfCorrelationsPro \r | |
5079 | && fIntFlowSumOfEventWeights[power] && fIntFlowSumOfProductOfEventWeights\r | |
5080 | && fIntFlowCovariances)) \r | |
5081 | {\r | |
5082 | cout<<"WARNING: fIntFlowCorrelationsPro && fIntFlowProductOfCorrelationsPro "<<endl;\r | |
5083 | cout<<" && fIntFlowSumOfEventWeights[power] && fIntFlowSumOfProductOfEventWeights"<<endl;\r | |
5084 | cout<<" && fIntFlowCovariances is NULL in AFAWQC::FCIF() !!!!"<<endl;\r | |
5085 | cout<<"power = "<<power<<endl;\r | |
5086 | exit(0);\r | |
5087 | }\r | |
5088 | }\r | |
5089 | \r | |
5090 | // average 2-, 4-, 6- and 8-particle correlations for all events:\r | |
5091 | Double_t correlation[4] = {0.};\r | |
5092 | for(Int_t ci=0;ci<4;ci++)\r | |
5093 | {\r | |
5094 | correlation[ci] = fIntFlowCorrelationsPro->GetBinContent(ci+1);\r | |
5095 | } \r | |
5096 | // average products of 2-, 4-, 6- and 8-particle correlations: \r | |
5097 | Double_t productOfCorrelations[4][4] = {{0.}};\r | |
5098 | Int_t productOfCorrelationsLabel = 1;\r | |
5099 | // denominators in the expressions for the unbiased estimator for covariance:\r | |
5100 | Double_t denominator[4][4] = {{0.}};\r | |
5101 | Int_t sumOfProductOfEventWeightsLabel1 = 1;\r | |
5102 | // weight dependent prefactor which multiply unbiased estimators for covariances:\r | |
5103 | Double_t wPrefactor[4][4] = {{0.}}; \r | |
5104 | Int_t sumOfProductOfEventWeightsLabel2 = 1;\r | |
5105 | for(Int_t c1=0;c1<4;c1++)\r | |
5106 | {\r | |
5107 | for(Int_t c2=c1+1;c2<4;c2++)\r | |
5108 | {\r | |
5109 | productOfCorrelations[c1][c2] = fIntFlowProductOfCorrelationsPro->GetBinContent(productOfCorrelationsLabel);\r | |
5110 | if(fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) && fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1))\r | |
5111 | {\r | |
5112 | denominator[c1][c2] = 1.-(fIntFlowSumOfProductOfEventWeights->GetBinContent(sumOfProductOfEventWeightsLabel1))/\r | |
5113 | (fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) \r | |
5114 | * fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1));\r | |
5115 | \r | |
5116 | wPrefactor[c1][c2] = fIntFlowSumOfProductOfEventWeights->GetBinContent(sumOfProductOfEventWeightsLabel2)/ \r | |
5117 | (fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1)\r | |
5118 | * fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1));\r | |
5119 | \r | |
5120 | \r | |
5121 | }\r | |
5122 | productOfCorrelationsLabel++;\r | |
5123 | sumOfProductOfEventWeightsLabel1++;\r | |
5124 | sumOfProductOfEventWeightsLabel2++; \r | |
5125 | }\r | |
5126 | }\r | |
5127 | \r | |
5128 | // covariance label:\r | |
5129 | Int_t covarianceLabel = 1;\r | |
5130 | for(Int_t c1=0;c1<4;c1++)\r | |
5131 | {\r | |
5132 | for(Int_t c2=c1+1;c2<4;c2++)\r | |
5133 | {\r | |
5134 | if(denominator[c1][c2])\r | |
5135 | {\r | |
5136 | // covariances:\r | |
5137 | Double_t cov = (productOfCorrelations[c1][c2]-correlation[c1]*correlation[c2])/denominator[c1][c2]; \r | |
5138 | // covarianced multiplied with weight dependent prefactor:\r | |
5139 | Double_t wCov = cov * wPrefactor[c1][c2];\r | |
5140 | fIntFlowCovariances->SetBinContent(covarianceLabel,wCov);\r | |
5141 | }\r | |
5142 | covarianceLabel++;\r | |
5143 | }\r | |
5144 | }\r | |
5145 | \r | |
5146 | } // end of AliFlowAnalysisWithQCumulants::CalculateCovariancesIntFlow()\r | |
5147 | \r | |
5148 | \r | |
5149 | //================================================================================================================================\r | |
5150 | \r | |
5151 | \r | |
5152 | void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsIntFlow() \r | |
5153 | {\r | |
5154 | // From profile fIntFlowCorrelationsPro access measured correlations and spread, \r | |
5155 | // correctly calculate the statistical errors and store the final results and \r | |
5156 | // statistical errors for correlations in histogram fIntFlowCorrelationsHist.\r | |
5157 | //\r | |
5158 | // Remark: Statistical error of correlation is calculated as:\r | |
5159 | //\r | |
5160 | // statistical error = termA * spread * termB:\r | |
5161 | // termA = sqrt{sum_{i=1}^{N} w^2}/(sum_{i=1}^{N} w)\r | |
5162 | // termB = 1/sqrt(1-termA^2) \r | |
5163 | \r | |
5164 | for(Int_t power=0;power<2;power++)\r | |
5165 | { \r | |
5166 | if(!(fIntFlowCorrelationsHist && fIntFlowCorrelationsPro && fIntFlowSumOfEventWeights[power])) \r | |
5167 | {\r | |
5168 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCorrelationsPro && fIntFlowSumOfEventWeights[power] is NULL in AFAWQC::FCIF() !!!!"<<endl;\r | |
5169 | cout<<"power = "<<power<<endl;\r | |
5170 | exit(0);\r | |
5171 | }\r | |
5172 | }\r | |
5173 | \r | |
5174 | for(Int_t ci=1;ci<=4;ci++) // correlation index\r | |
5175 | {\r | |
5176 | Double_t correlation = fIntFlowCorrelationsPro->GetBinContent(ci);\r | |
5177 | Double_t spread = fIntFlowCorrelationsPro->GetBinError(ci);\r | |
5178 | Double_t sumOfLinearEventWeights = fIntFlowSumOfEventWeights[0]->GetBinContent(ci);\r | |
5179 | Double_t sumOfQuadraticEventWeights = fIntFlowSumOfEventWeights[1]->GetBinContent(ci);\r | |
5180 | Double_t termA = 0.;\r | |
5181 | Double_t termB = 0.;\r | |
5182 | if(sumOfLinearEventWeights)\r | |
5183 | {\r | |
5184 | termA = pow(sumOfQuadraticEventWeights,0.5)/sumOfLinearEventWeights;\r | |
5185 | } else\r | |
5186 | {\r | |
5187 | cout<<"WARNING: sumOfLinearEventWeights == 0 in AFAWQC::FCIF() !!!!"<<endl;\r | |
5188 | cout<<" (for "<<2*ci<<"-particle correlation)"<<endl;\r | |
5189 | }\r | |
5190 | if(1.-pow(termA,2.) > 0.)\r | |
5191 | {\r | |
5192 | termB = 1./pow(1-pow(termA,2.),0.5);\r | |
5193 | } else\r | |
5194 | {\r | |
5195 | cout<<"WARNING: 1.-pow(termA,2.) <= 0 in AFAWQC::FCIF() !!!!"<<endl; \r | |
5196 | cout<<" (for "<<2*ci<<"-particle correlation)"<<endl;\r | |
5197 | } \r | |
5198 | Double_t statisticalError = termA * spread * termB;\r | |
5199 | fIntFlowCorrelationsHist->SetBinContent(ci,correlation);\r | |
5200 | fIntFlowCorrelationsHist->SetBinError(ci,statisticalError);\r | |
5201 | } // end of for(Int_t ci=1;ci<=4;ci++) // correlation index \r | |
5202 | \r | |
5203 | } // end of AliFlowAnalysisWithQCumulants::FinalizeCorrelationsIntFlow()\r | |
5204 | \r | |
5205 | \r | |
5206 | //================================================================================================================================\r | |
5207 | \r | |
5208 | \r | |
5209 | void AliFlowAnalysisWithQCumulants::FillAverageMultiplicities(Int_t nRP)\r | |
5210 | {\r | |
5211 | // Fill profile fAverageMultiplicity to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8\r | |
5212 | \r | |
5213 | // Binning of fAverageMultiplicity is organized as follows:\r | |
5214 | // 1st bin: all events (including the empty ones)\r | |
5215 | // 2nd bin: event with # of RPs greater or equal to 1\r | |
5216 | // 3rd bin: event with # of RPs greater or equal to 2\r | |
5217 | // 4th bin: event with # of RPs greater or equal to 3\r | |
5218 | // 5th bin: event with # of RPs greater or equal to 4\r | |
5219 | // 6th bin: event with # of RPs greater or equal to 5\r | |
5220 | // 7th bin: event with # of RPs greater or equal to 6\r | |
5221 | // 8th bin: event with # of RPs greater or equal to 7\r | |
5222 | // 9th bin: event with # of RPs greater or equal to 8\r | |
5223 | \r | |
5224 | if(!fAvMultiplicity)\r | |
5225 | {\r | |
5226 | cout<<"WARNING: fAvMultiplicity is NULL in AFAWQC::FAM() !!!!"<<endl;\r | |
5227 | exit(0);\r | |
5228 | }\r | |
5229 | \r | |
5230 | if(nRP<0)\r | |
5231 | {\r | |
5232 | cout<<"WARNING: nRP<0 in in AFAWQC::FAM() !!!!"<<endl;\r | |
5233 | exit(0);\r | |
5234 | }\r | |
5235 | \r | |
5236 | for(Int_t i=0;i<9;i++)\r | |
5237 | {\r | |
5238 | if(nRP>=i) fAvMultiplicity->Fill(i+0.5,nRP,1);\r | |
5239 | }\r | |
5240 | \r | |
5241 | } // end of AliFlowAnalysisWithQCumulants::FillAverageMultiplicities(nRP)\r | |
5242 | \r | |
5243 | \r | |
5244 | //================================================================================================================================\r | |
5245 | \r | |
5246 | \r | |
5247 | void AliFlowAnalysisWithQCumulants::CalculateCumulantsIntFlow()\r | |
5248 | {\r | |
5249 | // a) Calculate Q-cumulants from the measured multiparticle correlations.\r | |
5250 | // b) Propagate the statistical errors of measured multiparticle correlations to statistical errors of Q-cumulants. \r | |
5251 | // c) REMARK: Q-cumulants calculated in this method are biased by non-uniform acceptance of detector !!!! \r | |
5252 | // Method ApplyCorrectionForNonUniformAcceptance* (to be improved: finalize the name here)\r | |
5253 | // is called afterwards to correct for this bias. \r | |
5254 | // d) Store the results and statistical error of Q-cumulants in histogram fCumulants.\r | |
5255 | // Binning of fCumulants is organized as follows:\r | |
5256 | //\r | |
5257 | // 1st bin: QC{2}\r | |
5258 | // 2nd bin: QC{4}\r | |
5259 | // 3rd bin: QC{6}\r | |
5260 | // 4th bin: QC{8}\r | |
5261 | \r | |
5262 | if(!(fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants))\r | |
5263 | {\r | |
5264 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants is NULL in AFAWQC::CCIF() !!!!"<<endl;\r | |
5265 | exit(0);\r | |
5266 | }\r | |
5267 | \r | |
5268 | // correlations:\r | |
5269 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> \r | |
5270 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> \r | |
5271 | Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> \r | |
5272 | Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> \r | |
5273 | \r | |
5274 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations:\r | |
5275 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <2> \r | |
5276 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <4> \r | |
5277 | Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <6> \r | |
5278 | Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <8> \r | |
5279 | \r | |
5280 | // covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()):\r | |
5281 | Double_t wCov24 = fIntFlowCovariances->GetBinContent(1); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>)\r | |
5282 | Double_t wCov26 = fIntFlowCovariances->GetBinContent(2); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>)\r | |
5283 | Double_t wCov28 = fIntFlowCovariances->GetBinContent(3); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>)\r | |
5284 | Double_t wCov46 = fIntFlowCovariances->GetBinContent(4); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>)\r | |
5285 | Double_t wCov48 = fIntFlowCovariances->GetBinContent(5); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>)\r | |
5286 | Double_t wCov68 = fIntFlowCovariances->GetBinContent(6); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>)\r | |
5287 | \r | |
5288 | // Q-cumulants: \r | |
5289 | Double_t qc2 = 0.; // QC{2}\r | |
5290 | Double_t qc4 = 0.; // QC{4}\r | |
5291 | Double_t qc6 = 0.; // QC{6}\r | |
5292 | Double_t qc8 = 0.; // QC{8}\r | |
5293 | if(two) qc2 = two; \r | |
5294 | if(four) qc4 = four-2.*pow(two,2.); \r | |
5295 | if(six) qc6 = six-9.*two*four+12.*pow(two,3.); \r | |
5296 | if(eight) qc8 = eight-16.*two*six-18.*pow(four,2.)+144.*pow(two,2.)*four-144.*pow(two,4.); \r | |
5297 | \r | |
5298 | // statistical errors of Q-cumulants: \r | |
5299 | Double_t qc2Error = 0.;\r | |
5300 | Double_t qc4Error = 0.;\r | |
5301 | Double_t qc6Error = 0.;\r | |
5302 | Double_t qc8Error = 0.;\r | |
5303 | \r | |
5304 | // squared statistical errors of Q-cumulants: \r | |
5305 | //Double_t qc2ErrorSquared = 0.;\r | |
5306 | Double_t qc4ErrorSquared = 0.;\r | |
5307 | Double_t qc6ErrorSquared = 0.;\r | |
5308 | Double_t qc8ErrorSquared = 0.;\r | |
5309 | \r | |
5310 | // statistical error of QC{2}: \r | |
5311 | qc2Error = twoError; \r | |
5312 | \r | |
5313 | // statistical error of QC{4}: \r | |
5314 | qc4ErrorSquared = 16.*pow(two,2.)*pow(twoError,2)+pow(fourError,2.)\r | |
5315 | - 8.*two*wCov24; \r | |
5316 | if(qc4ErrorSquared>=0.)\r | |
5317 | {\r | |
5318 | qc4Error = pow(qc4ErrorSquared,0.5);\r | |
5319 | } else \r | |
5320 | {\r | |
5321 | cout<<"WARNING: Statistical error of QC{4} is imaginary !!!!"<<endl;\r | |
5322 | }\r | |
5323 | \r | |
5324 | // statistical error of QC{6}: \r | |
5325 | qc6ErrorSquared = 81.*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.)\r | |
5326 | + 81.*pow(two,2.)*pow(fourError,2.)\r | |
5327 | + pow(sixError,2.)\r | |
5328 | - 162.*two*(4.*pow(two,2.)-four)*wCov24\r | |
5329 | + 18.*(4.*pow(two,2.)-four)*wCov26\r | |
5330 | - 18.*two*wCov46; \r | |
5331 | \r | |
5332 | if(qc6ErrorSquared>=0.)\r | |
5333 | {\r | |
5334 | qc6Error = pow(qc6ErrorSquared,0.5);\r | |
5335 | } else \r | |
5336 | {\r | |
5337 | cout<<"WARNING: Statistical error of QC{6} is imaginary !!!!"<<endl;\r | |
5338 | }\r | |
5339 | \r | |
5340 | // statistical error of QC{8}: \r | |
5341 | qc8ErrorSquared = 256.*pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.)\r | |
5342 | + 1296.*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.)\r | |
5343 | + 256.*pow(two,2.)*pow(sixError,2.)\r | |
5344 | + pow(eightError,2.)\r | |
5345 | - 1152.*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24\r | |
5346 | + 512.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26\r | |
5347 | - 32.*(36.*pow(two,3.)-18.*four*two+six)*wCov28\r | |
5348 | - 1152.*two*(4.*pow(two,2.)-four)*wCov46\r | |
5349 | + 72.*(4.*pow(two,2.)-four)*wCov48\r | |
5350 | - 32.*two*wCov68; \r | |
5351 | if(qc8ErrorSquared>=0.)\r | |
5352 | {\r | |
5353 | qc8Error = pow(qc8ErrorSquared,0.5);\r | |
5354 | } else \r | |
5355 | {\r | |
5356 | cout<<"WARNING: Statistical error of QC{8} is imaginary !!!!"<<endl;\r | |
5357 | }\r | |
5358 | \r | |
5359 | // store the results and statistical errors for Q-cumulants:\r | |
5360 | fIntFlowQcumulants->SetBinContent(1,qc2);\r | |
5361 | fIntFlowQcumulants->SetBinError(1,qc2Error);\r | |
5362 | fIntFlowQcumulants->SetBinContent(2,qc4);\r | |
5363 | fIntFlowQcumulants->SetBinError(2,qc4Error);\r | |
5364 | fIntFlowQcumulants->SetBinContent(3,qc6);\r | |
5365 | fIntFlowQcumulants->SetBinError(3,qc6Error);\r | |
5366 | fIntFlowQcumulants->SetBinContent(4,qc8); \r | |
5367 | fIntFlowQcumulants->SetBinError(4,qc8Error); \r | |
5368 | \r | |
5369 | } // end of AliFlowAnalysisWithQCumulants::CalculateCumulantsIntFlow()\r | |
5370 | \r | |
5371 | \r | |
5372 | //================================================================================================================================ \r | |
5373 | \r | |
5374 | \r | |
5375 | void AliFlowAnalysisWithQCumulants::CalculateIntFlow()\r | |
5376 | {\r | |
5377 | // a) Calculate the final results for integrated flow estimates from Q-cumulants.\r | |
5378 | // b) Propagate the statistical errors of measured multiparticle correlations to statistical errors of integrated flow estimates. \r | |
5379 | // c) Store the results and statistical errors of integrated flow estimates in histogram fIntFlow.\r | |
5380 | // Binning of fIntFlow is organized as follows:\r | |
5381 | //\r | |
5382 | // 1st bin: v{2,QC}\r | |
5383 | // 2nd bin: v{4,QC}\r | |
5384 | // 3rd bin: v{6,QC}\r | |
5385 | // 4th bin: v{8,QC}\r | |
5386 | \r | |
5387 | if(!(fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants && fIntFlow))\r | |
5388 | {\r | |
5389 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants && fIntFlow is NULL in AFAWQC::CCIF() !!!!"<<endl;\r | |
5390 | exit(0);\r | |
5391 | }\r | |
5392 | \r | |
5393 | // Q-cumulants:\r | |
5394 | Double_t qc2 = fIntFlowQcumulants->GetBinContent(1); // QC{2} \r | |
5395 | Double_t qc4 = fIntFlowQcumulants->GetBinContent(2); // QC{4} \r | |
5396 | Double_t qc6 = fIntFlowQcumulants->GetBinContent(3); // QC{6} \r | |
5397 | Double_t qc8 = fIntFlowQcumulants->GetBinContent(4); // QC{8}\r | |
5398 | \r | |
5399 | // correlations:\r | |
5400 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> \r | |
5401 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> \r | |
5402 | Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> \r | |
5403 | Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> \r | |
5404 | \r | |
5405 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations:\r | |
5406 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <2> \r | |
5407 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <4> \r | |
5408 | Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <6> \r | |
5409 | Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <8> \r | |
5410 | \r | |
5411 | // covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()):\r | |
5412 | Double_t wCov24 = fIntFlowCovariances->GetBinContent(1); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>)\r | |
5413 | Double_t wCov26 = fIntFlowCovariances->GetBinContent(2); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>)\r | |
5414 | Double_t wCov28 = fIntFlowCovariances->GetBinContent(3); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>)\r | |
5415 | Double_t wCov46 = fIntFlowCovariances->GetBinContent(4); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>)\r | |
5416 | Double_t wCov48 = fIntFlowCovariances->GetBinContent(5); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>)\r | |
5417 | Double_t wCov68 = fIntFlowCovariances->GetBinContent(6); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>)\r | |
5418 | \r | |
5419 | // integrated flow estimates:\r | |
5420 | Double_t v2 = 0.; // v{2,QC} \r | |
5421 | Double_t v4 = 0.; // v{4,QC} \r | |
5422 | Double_t v6 = 0.; // v{6,QC} \r | |
5423 | Double_t v8 = 0.; // v{8,QC}\r | |
5424 | \r | |
5425 | // calculate integrated flow estimates from Q-cumulants: \r | |
5426 | if(qc2>=0.) v2 = pow(qc2,1./2.); \r | |
5427 | if(qc4<=0.) v4 = pow(-1.*qc4,1./4.); \r | |
5428 | if(qc6>=0.) v6 = pow((1./4.)*qc6,1./6.); \r | |
5429 | if(qc8<=0.) v8 = pow((-1./33.)*qc8,1./8.); \r | |
5430 | \r | |
5431 | // statistical errors of integrated flow estimates:\r | |
5432 | Double_t v2Error = 0.; // statistical error of v{2,QC} \r | |
5433 | Double_t v4Error = 0.; // statistical error of v{4,QC} \r | |
5434 | Double_t v6Error = 0.; // statistical error of v{6,QC} \r | |
5435 | Double_t v8Error = 0.; // statistical error of v{8,QC}\r | |
5436 | \r | |
5437 | // squares of statistical errors of integrated flow estimates:\r | |
5438 | Double_t v2ErrorSquared = 0.; // squared statistical error of v{2,QC} \r | |
5439 | Double_t v4ErrorSquared = 0.; // squared statistical error of v{4,QC} \r | |
5440 | Double_t v6ErrorSquared = 0.; // squared statistical error of v{6,QC} \r | |
5441 | Double_t v8ErrorSquared = 0.; // squared statistical error of v{8,QC} \r | |
5442 | \r | |
5443 | // calculate squared statistical errors of integrated flow estimates:\r | |
5444 | if(two != 0.) \r | |
5445 | { \r | |
5446 | v2ErrorSquared = (1./(4.*two))*pow(twoError,2.);\r | |
5447 | } \r | |
5448 | if(2.*pow(two,2.)-four > 0.)\r | |
5449 | {\r | |
5450 | v4ErrorSquared = (1./pow(2.*pow(two,2.)-four,3./2.))*\r | |
5451 | (pow(two,2.)*pow(twoError,2.)+(1./16.)*pow(fourError,2.)-(1./2.)*two*wCov24);\r | |
5452 | }\r | |
5453 | if(six-9.*four*two+12.*pow(two,3.) > 0.) \r | |
5454 | {\r | |
5455 | v6ErrorSquared = ((1./2.)*(1./pow(2.,2./3.))*(1./pow(six-9.*four*two+12.*pow(two,3.),5./3.)))*\r | |
5456 | ((9./2.)*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) \r | |
5457 | + (9./2.)*pow(two,2.)*pow(fourError,2.)+(1./18.)*pow(sixError,2.)\r | |
5458 | - 9.*two*(4.*pow(two,2.)-four)*wCov24+(4.*pow(two,2.)-four)*wCov26-two*wCov46); \r | |
5459 | }\r | |
5460 | if(-1.*eight+16.*six*two+18.*pow(four,2.)-144.*four*pow(two,2.)+144.*pow(two,4.) > 0.) \r | |
5461 | {\r | |
5462 | v8ErrorSquared = (4./pow(33,1./4.))*(1./pow(-1.*eight+16.*six*two+18.*pow(four,2.)-144.*four*pow(two,2.)+144.*pow(two,4.),7./4.))*\r | |
5463 | (pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.)\r | |
5464 | + (81./16.)*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.)\r | |
5465 | + pow(two,2.)*pow(sixError,2.)\r | |
5466 | + (1./256.)*pow(eightError,2.)\r | |
5467 | - (9./2.)*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24\r | |
5468 | + 2.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26\r | |
5469 | - (1./8.)*(36.*pow(two,3.)-18.*four*two+six)*wCov28 \r | |
5470 | - (9./2.)*two*(4.*pow(two,2.)-four)*wCov46 \r | |
5471 | + (9./32.)*(4.*pow(two,2.)-four)*wCov48 \r | |
5472 | - (1./8.)*two*wCov68);\r | |
5473 | } \r | |
5474 | \r | |
5475 | // calculate statistical errors of integrated flow estimates: \r | |
5476 | if(v2ErrorSquared >= 0.)\r | |
5477 | {\r | |
5478 | v2Error = pow(v2ErrorSquared,0.5);\r | |
5479 | } else\r | |
5480 | {\r | |
5481 | cout<<"WARNING: Statistical error of v{2,QC} is imaginary !!!!"<<endl;\r | |
5482 | } \r | |
5483 | if(v4ErrorSquared >= 0.)\r | |
5484 | {\r | |
5485 | v4Error = pow(v4ErrorSquared,0.5);\r | |
5486 | } else\r | |
5487 | {\r | |
5488 | cout<<"WARNING: Statistical error of v{4,QC} is imaginary !!!!"<<endl;\r | |
5489 | } \r | |
5490 | if(v6ErrorSquared >= 0.)\r | |
5491 | {\r | |
5492 | v6Error = pow(v6ErrorSquared,0.5);\r | |
5493 | } else\r | |
5494 | {\r | |
5495 | cout<<"WARNING: Statistical error of v{6,QC} is imaginary !!!!"<<endl;\r | |
5496 | } \r | |
5497 | if(v8ErrorSquared >= 0.)\r | |
5498 | {\r | |
5499 | v8Error = pow(v8ErrorSquared,0.5);\r | |
5500 | } else\r | |
5501 | {\r | |
5502 | cout<<"WARNING: Statistical error of v{8,QC} is imaginary !!!!"<<endl;\r | |
5503 | } \r | |
5504 | \r | |
5505 | // store the results and statistical errors of integrated flow estimates:\r | |
5506 | fIntFlow->SetBinContent(1,v2);\r | |
5507 | fIntFlow->SetBinError(1,v2Error);\r | |
5508 | fIntFlow->SetBinContent(2,v4);\r | |
5509 | fIntFlow->SetBinError(2,v4Error);\r | |
5510 | fIntFlow->SetBinContent(3,v6);\r | |
5511 | fIntFlow->SetBinError(3,v6Error);\r | |
5512 | fIntFlow->SetBinContent(4,v8);\r | |
5513 | fIntFlow->SetBinError(4,v8Error);\r | |
5514 | \r | |
5515 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlow()\r | |
5516 | \r | |
5517 | \r | |
5518 | //================================================================================================================================ \r | |
5519 | \r | |
5520 | \r | |
5521 | void AliFlowAnalysisWithQCumulants::FillCommonHistResultsIntFlow()\r | |
5522 | {\r | |
5523 | // Fill in AliFlowCommonHistResults histograms relevant for 'NONAME' integrated flow (to be improved (name))\r | |
5524 | \r | |
5525 | if(!fIntFlow)\r | |
5526 | {\r | |
5527 | cout<<"WARNING: fIntFlow is NULL in AFAWQC::FCHRIF() !!!!"<<endl;\r | |
5528 | exit(0); \r | |
5529 | } \r | |
5530 | \r | |
5531 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th))\r | |
5532 | {\r | |
5533 | cout<<"WARNING: fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl; \r | |
5534 | cout<<" is NULL in AFAWQC::FCHRIF() !!!!"<<endl;\r | |
5535 | exit(0);\r | |
5536 | }\r | |
5537 | \r | |
5538 | Double_t v2 = fIntFlow->GetBinContent(1);\r | |
5539 | Double_t v4 = fIntFlow->GetBinContent(2);\r | |
5540 | Double_t v6 = fIntFlow->GetBinContent(3);\r | |
5541 | Double_t v8 = fIntFlow->GetBinContent(4);\r | |
5542 | \r | |
5543 | Double_t v2Error = fIntFlow->GetBinError(1);\r | |
5544 | Double_t v4Error = fIntFlow->GetBinError(2);\r | |
5545 | Double_t v6Error = fIntFlow->GetBinError(3);\r | |
5546 | Double_t v8Error = fIntFlow->GetBinError(4);\r | |
5547 | \r | |
5548 | fCommonHistsResults2nd->FillIntegratedFlow(v2,v2Error); // to be improved (hardwired 2nd in the name) \r | |
5549 | fCommonHistsResults4th->FillIntegratedFlow(v4,v4Error); // to be improved (hardwired 4th in the name)\r | |
5550 | fCommonHistsResults6th->FillIntegratedFlow(v6,v6Error); // to be improved (hardwired 6th in the name)\r | |
5551 | fCommonHistsResults8th->FillIntegratedFlow(v8,v8Error); // to be improved (hardwired 8th in the name) \r | |
5552 | \r | |
5553 | } // end of AliFlowAnalysisWithQCumulants::FillCommonHistResultsIntFlow()\r | |
5554 | \r | |
5555 | \r | |
5556 | //================================================================================================================================ \r | |
5557 | \r | |
5558 | \r | |
5559 | /*\r | |
5560 | void AliFlowAnalysisWithQCumulants::ApplyCorrectionForNonUniformAcceptanceToCumulantsForIntFlow(Bool_t useParticleWeights, TString eventWeights)\r | |
5561 | {\r | |
5562 | // apply correction for non-uniform acceptance to cumulants for integrated flow \r | |
5563 | // (Remark: non-corrected cumulants are accessed from fCumulants[pW][0], corrected cumulants are stored in fCumulants[pW][1])\r | |
5564 | \r | |
5565 | // shortcuts for the flags:\r | |
5566 | Int_t pW = (Int_t)(useParticleWeights); // 0=pWeights not used, 1=pWeights used\r | |
5567 | Int_t eW = -1;\r | |
5568 | \r | |
5569 | if(eventWeights == "exact")\r | |
5570 | {\r | |
5571 | eW = 0;\r | |
5572 | }\r | |
5573 | \r | |
5574 | if(!(fCumulants[pW][eW][0] && fCumulants[pW][eW][1] && fCorrections[pW][eW]))\r | |
5575 | {\r | |
5576 | cout<<"WARNING: fCumulants[pW][eW][0] && fCumulants[pW][eW][1] && fCorrections[pW][eW] is NULL in AFAWQC::ACFNUATCFIF() !!!!"<<endl;\r | |
5577 | cout<<"pW = "<<pW<<endl;\r | |
5578 | cout<<"eW = "<<eW<<endl;\r | |
5579 | exit(0);\r | |
5580 | } \r | |
5581 | \r | |
5582 | // non-corrected cumulants:\r | |
5583 | Double_t qc2 = fCumulants[pW][eW][0]->GetBinContent(1); \r | |
5584 | Double_t qc4 = fCumulants[pW][eW][0]->GetBinContent(2); \r | |
5585 | Double_t qc6 = fCumulants[pW][eW][0]->GetBinContent(3); \r | |
5586 | Double_t qc8 = fCumulants[pW][eW][0]->GetBinContent(4); \r | |
5587 | // statistical error of non-corrected cumulants: \r | |
5588 | Double_t qc2Error = fCumulants[pW][eW][0]->GetBinError(1); \r | |
5589 | Double_t qc4Error = fCumulants[pW][eW][0]->GetBinError(2); \r | |
5590 | Double_t qc6Error = fCumulants[pW][eW][0]->GetBinError(3); \r | |
5591 | Double_t qc8Error = fCumulants[pW][eW][0]->GetBinError(4); \r | |
5592 | // corrections for non-uniform acceptance:\r | |
5593 | Double_t qc2Correction = fCorrections[pW][eW]->GetBinContent(1); \r | |
5594 | Double_t qc4Correction = fCorrections[pW][eW]->GetBinContent(2); \r | |
5595 | Double_t qc6Correction = fCorrections[pW][eW]->GetBinContent(3); \r | |
5596 | Double_t qc8Correction = fCorrections[pW][eW]->GetBinContent(4); \r | |
5597 | // corrected cumulants:\r | |
5598 | Double_t qc2Corrected = qc2 + qc2Correction;\r | |
5599 | Double_t qc4Corrected = qc4 + qc4Correction;\r | |
5600 | Double_t qc6Corrected = qc6 + qc6Correction;\r | |
5601 | Double_t qc8Corrected = qc8 + qc8Correction;\r | |
5602 | \r | |
5603 | // ... to be improved (I need here also to correct error of QCs for NUA. \r | |
5604 | // For simplicity sake I assume at the moment that this correction is negliglible, but it will be added eventually...)\r | |
5605 | \r | |
5606 | // store corrected results and statistical errors for cumulants: \r | |
5607 | fCumulants[pW][eW][1]->SetBinContent(1,qc2Corrected);\r | |
5608 | fCumulants[pW][eW][1]->SetBinContent(2,qc4Corrected);\r | |
5609 | fCumulants[pW][eW][1]->SetBinContent(3,qc6Corrected);\r | |
5610 | fCumulants[pW][eW][1]->SetBinContent(4,qc8Corrected);\r | |
5611 | fCumulants[pW][eW][1]->SetBinError(1,qc2Error); // to be improved (correct also qc2Error for NUA)\r | |
5612 | fCumulants[pW][eW][1]->SetBinError(2,qc4Error); // to be improved (correct also qc4Error for NUA)\r | |
5613 | fCumulants[pW][eW][1]->SetBinError(3,qc6Error); // to be improved (correct also qc6Error for NUA)\r | |
5614 | fCumulants[pW][eW][1]->SetBinError(4,qc8Error); // to be improved (correct also qc8Error for NUA) \r | |
5615 | \r | |
5616 | } // end of AliFlowAnalysisWithQCumulants::ApplyCorrectionForNonUniformAcceptanceToCumulantsForIntFlow(Bool_t useParticleWeights, TString eventWeights)\r | |
5617 | */\r | |
5618 | \r | |
5619 | \r | |
5620 | //================================================================================================================================\r | |
5621 | \r | |
5622 | \r | |
5623 | /* \r | |
5624 | void AliFlowAnalysisWithQCumulants::PrintQuantifyingCorrectionsForNonUniformAcceptance(Bool_t useParticleWeights, TString eventWeights)\r | |
5625 | {\r | |
5626 | // print on the screen QC{n,biased}/QC{n,corrected}\r | |
5627 | \r | |
5628 | // shortcuts for the flags:\r | |
5629 | Int_t pW = (Int_t)(useParticleWeights); // 0=pWeights not used, 1=pWeights used\r | |
5630 | \r | |
5631 | Int_t eW = -1;\r | |
5632 | \r | |
5633 | if(eventWeights == "exact")\r | |
5634 | {\r | |
5635 | eW = 0;\r | |
5636 | } \r | |
5637 | \r | |
5638 | if(!(fCumulants[pW][eW][0] && fCumulants[pW][eW][1]))\r | |
5639 | {\r | |
5640 | cout<<"WARNING: fCumulants[pW][eW][0] && fCumulants[pW][eW][1] is NULL in AFAWQC::PQCFNUA() !!!!"<<endl;\r | |
5641 | cout<<"pW = "<<pW<<endl;\r | |
5642 | cout<<"eW = "<<eW<<endl;\r | |
5643 | exit(0);\r | |
5644 | }\r | |
5645 | \r | |
5646 | cout<<endl;\r | |
5647 | cout<<" Quantifying the bias to Q-cumulants from"<<endl;\r | |
5648 | cout<<" non-uniform acceptance of the detector:"<<endl;\r | |
5649 | cout<<endl;\r | |
5650 | \r | |
5651 | if(fCumulants[pW][eW][1]->GetBinContent(1)) \r | |
5652 | { \r | |
5653 | cout<<" QC{2,biased}/QC{2,corrected} = "<<(fCumulants[pW][eW][0]->GetBinContent(1))/(fCumulants[pW][eW][1]->GetBinContent(1))<<endl; \r | |
5654 | }\r | |
5655 | if(fCumulants[pW][eW][1]->GetBinContent(2)) \r | |
5656 | { \r | |
5657 | cout<<" QC{4,biased}/QC{4,corrected} = "<<fCumulants[pW][eW][0]->GetBinContent(2)/fCumulants[pW][eW][1]->GetBinContent(2)<<endl; \r | |
5658 | }\r | |
5659 | \r | |
5660 | cout<<endl;\r | |
5661 | \r | |
5662 | } // end of AliFlowAnalysisWithQCumulants::PrintQuantifyingCorrectionsForNonUniformAcceptance(Bool_t useParticleWeights, TString eventWeights)\r | |
5663 | */\r | |
5664 | \r | |
5665 | \r | |
5666 | //================================================================================================================================\r | |
5667 | \r | |
5668 | \r | |
5669 | void AliFlowAnalysisWithQCumulants::CalculateWeightedCorrelationsForIntegratedFlow()\r | |
5670 | {\r | |
5671 | // calculate all weighted correlations needed for integrated flow and store them in 1D profile fQCorrelations[1][eW] and fQExtraCorrelations[1][eW]\r | |
5672 | \r | |
5673 | /*\r | |
5674 | \r | |
5675 | for(Int_t eW=0;eW<2;eW++)\r | |
5676 | {\r | |
5677 | if(!(fQCorrelationsEBE[1] && fQCorrelations[1][eW]))\r | |
5678 | {\r | |
5679 | cout<<"WARNING: fQCorrelationsEBE[1] && fQCorrelations[1][eW] is NULL in AFAWQC::CWCFIF() !!!!"<<endl;\r | |
5680 | cout<<"eW = "<<eW<<endl;\r | |
5681 | exit(0);\r | |
5682 | }\r | |
5683 | }\r | |
5684 | \r | |
5685 | // Remark 1: binning of fQCorrelations[W] is organized as follows:\r | |
5686 | //..............................................................................................\r | |
5687 | // ---- bins 1-20: 2-particle correlations ----\r | |
5688 | // 1st bin: two1n1nW1W1 = <w1 w2 cos(n*(phi1-phi2))>\r | |
5689 | // 2nd bin: two2n2nW2W2 = <w1^2 w2^2 cos(2n*(phi1-phi2))>\r | |
5690 | // 3rd bin: two3n3nW3W3 = <w1^3 w2^3 cos(3n*(phi1-phi2))>\r | |
5691 | // 4th bin: two4n4nW4W4 = <w1^4 w2^4 cos(4n*(phi1-phi2))>\r | |
5692 | // 5th bin: two1n1nW3W1 = <w1^3 w2 cos(n*(phi1-phi2))>\r | |
5693 | // 6th bin: two1n1nW1W1W2 = <w1 w2 w3^2 cos(n*(phi1-phi2))> \r | |
5694 | // ---- bins 21-40: 3-particle correlations ----\r | |
5695 | // 21st bin: three2n1n1nW2W1W1 = <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> \r | |
5696 | // ---- bins 41-60: 4-particle correlations ----\r | |
5697 | // 41st bin: four1n1n1n1nW1W1W1W1 = <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))>\r | |
5698 | // ---- bins 61-80: 5-particle correlations ---- \r | |
5699 | // ---- bins 81-100: 6-particle correlations ----\r | |
5700 | // ---- bins 101-120: 7-particle correlations ----\r | |
5701 | // ---- bins 121-140: 8-particle correlations ----\r | |
5702 | //..............................................................................................\r | |
5703 | \r | |
5704 | // multiplicity (number of particles used to determine the reaction plane)\r | |
5705 | Double_t dMult = (*fSMpk)(0,0);\r | |
5706 | \r | |
5707 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: \r | |
5708 | Double_t dReQ1n1k = (*fReQ)(0,1);\r | |
5709 | Double_t dReQ2n2k = (*fReQ)(1,2);\r | |
5710 | Double_t dReQ3n3k = (*fReQ)(2,3);\r | |
5711 | Double_t dReQ4n4k = (*fReQ)(3,4);\r | |
5712 | Double_t dReQ1n3k = (*fReQ)(0,3);\r | |
5713 | Double_t dImQ1n1k = (*fImQ)(0,1);\r | |
5714 | Double_t dImQ2n2k = (*fImQ)(1,2);\r | |
5715 | Double_t dImQ3n3k = (*fImQ)(2,3);\r | |
5716 | Double_t dImQ4n4k = (*fImQ)(3,4);\r | |
5717 | Double_t dImQ1n3k = (*fImQ)(0,3);\r | |
5718 | \r | |
5719 | // dMs are variables introduced in order to simplify some Eqs. bellow:\r | |
5720 | //..............................................................................................\r | |
5721 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j\r | |
5722 | Double_t dM22 = (*fSMpk)(1,2)-(*fSMpk)(0,4); // dM22 = sum_{i,j=1,i!=j}^M w_i^2 w_j^2\r | |
5723 | Double_t dM33 = (*fSMpk)(1,3)-(*fSMpk)(0,6); // dM33 = sum_{i,j=1,i!=j}^M w_i^3 w_j^3\r | |
5724 | Double_t dM44 = (*fSMpk)(1,4)-(*fSMpk)(0,8); // dM44 = sum_{i,j=1,i!=j}^M w_i^4 w_j^4\r | |
5725 | Double_t dM31 = (*fSMpk)(0,3)*(*fSMpk)(0,1)-(*fSMpk)(0,4); // dM31 = sum_{i,j=1,i!=j}^M w_i^3 w_j\r | |
5726 | Double_t dM211 = (*fSMpk)(0,2)*(*fSMpk)(1,1)-2.*(*fSMpk)(0,3)*(*fSMpk)(0,1)\r | |
5727 | - (*fSMpk)(1,2)+2.*(*fSMpk)(0,4); // dM211 = sum_{i,j,k=1,i!=j!=k}^M w_i^2 w_j w_k\r | |
5728 | Double_t dM1111 = (*fSMpk)(3,1)-6.*(*fSMpk)(0,2)*(*fSMpk)(1,1) \r | |
5729 | + 8.*(*fSMpk)(0,3)*(*fSMpk)(0,1)\r | |
5730 | + 3.*(*fSMpk)(1,2)-6.*(*fSMpk)(0,4); // dM1111 = sum_{i,j,k,l=1,i!=j!=k!=l}^M w_i w_j w_k w_l\r | |
5731 | //..............................................................................................\r | |
5732 | \r | |
5733 | // ***********************************************\r | |
5734 | // **** weighted multi-particle correlations: ****\r | |
5735 | // ***********************************************\r | |
5736 | //.............................................................................................. \r | |
5737 | // weighted 2-particle correlations:\r | |
5738 | Double_t two1n1nW1W1 = 0.; // <w1 w2 cos(n*(phi1-phi2))>\r | |
5739 | Double_t two2n2nW2W2 = 0.; // <w1^2 w2^2 cos(2n*(phi1-phi2))>\r | |
5740 | Double_t two3n3nW3W3 = 0.; // <w1^3 w2^3 cos(3n*(phi1-phi2))>\r | |
5741 | Double_t two4n4nW4W4 = 0.; // <w1^4 w2^4 cos(4n*(phi1-phi2))>\r | |
5742 | Double_t two1n1nW3W1 = 0.; // <w1^3 w2 cos(n*(phi1-phi2))>\r | |
5743 | Double_t two1n1nW1W1W2 = 0.; // <w1 w2 w3^2 cos(n*(phi1-phi2))> \r | |
5744 | \r | |
5745 | if(dMult>1) \r | |
5746 | { \r | |
5747 | if(dM11)\r | |
5748 | {\r | |
5749 | two1n1nW1W1 = (pow(dReQ1n1k,2)+pow(dImQ1n1k,2)-(*fSMpk)(0,2))/dM11; \r | |
5750 | \r | |
5751 | // average weighted correlation <w1 w2 cos(n*(phi1-phi2))> for single event: \r | |
5752 | fQCorrelationsEBE[1]->SetBinContent(1,two1n1nW1W1);\r | |
5753 | \r | |
5754 | // average weighted correlation <w1 w2 cos(n*(phi1-phi2))> for all events:\r | |
5755 | //fQCorrelationsW->Fill(0.,two1n1nW1W1,dM11);\r | |
5756 | fQCorrelations[1][0]->Fill(0.5,two1n1nW1W1,dM11);\r | |
5757 | }\r | |
5758 | if(dM22)\r | |
5759 | {\r | |
5760 | two2n2nW2W2 = (pow(dReQ2n2k,2)+pow(dImQ2n2k,2)-(*fSMpk)(0,4))/dM22; \r | |
5761 | //fQCorrelationsW->Fill(1.,two2n2nW2W2,dM22); \r | |
5762 | fQCorrelations[1][0]->Fill(1.5,two2n2nW2W2,dM22);\r | |
5763 | }\r | |
5764 | if(dM33)\r | |
5765 | {\r | |
5766 | two3n3nW3W3 = (pow(dReQ3n3k,2)+pow(dImQ3n3k,2)-(*fSMpk)(0,6))/dM33;\r | |
5767 | //fQCorrelationsW->Fill(2.,two3n3nW3W3,dM33);\r | |
5768 | fQCorrelations[1][0]->Fill(2.5,two3n3nW3W3,dM33);\r | |
5769 | }\r | |
5770 | if(dM44)\r | |
5771 | {\r | |
5772 | two4n4nW4W4 = (pow(dReQ4n4k,2)+pow(dImQ4n4k,2)-(*fSMpk)(0,8))/dM44; \r | |
5773 | //fQCorrelationsW->Fill(3.,two4n4nW4W4,dM44); \r | |
5774 | fQCorrelations[1][0]->Fill(3.5,two4n4nW4W4,dM44); \r | |
5775 | } \r | |
5776 | if(dM31)\r | |
5777 | {\r | |
5778 | two1n1nW3W1 = (dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k-(*fSMpk)(0,4))/dM31; \r | |
5779 | //fQCorrelationsW->Fill(4.,two1n1nW3W1,dM31); \r | |
5780 | } \r | |
5781 | if(dM211)\r | |
5782 | {\r | |
5783 | two1n1nW1W1W2 = ((*fSMpk)(0,2)*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)-(*fSMpk)(0,2))\r | |
5784 | - 2.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k\r | |
5785 | - (*fSMpk)(0,4)))/dM211;\r | |
5786 | //fQCorrelationsW->Fill(5.,two1n1nW1W1W2,dM211); \r | |
5787 | } \r | |
5788 | } // end of if(dMult>1)\r | |
5789 | //..............................................................................................\r | |
5790 | \r | |
5791 | //..............................................................................................\r | |
5792 | // weighted 3-particle correlations:\r | |
5793 | Double_t three2n1n1nW2W1W1 = 0.; // <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))>\r | |
5794 | \r | |
5795 | if(dMult>2) \r | |
5796 | { \r | |
5797 | if(dM211)\r | |
5798 | { \r | |
5799 | three2n1n1nW2W1W1 = (pow(dReQ1n1k,2.)*dReQ2n2k+2.*dReQ1n1k*dImQ1n1k*dImQ2n2k-pow(dImQ1n1k,2.)*dReQ2n2k\r | |
5800 | - 2.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k)\r | |
5801 | - pow(dReQ2n2k,2)-pow(dImQ2n2k,2)\r | |
5802 | + 2.*(*fSMpk)(0,4))/dM211; \r | |
5803 | //fQCorrelationsW->Fill(20.,three2n1n1nW2W1W1,dM211);\r | |
5804 | } \r | |
5805 | } // end of if(dMult>2) \r | |
5806 | //..............................................................................................\r | |
5807 | \r | |
5808 | //..............................................................................................\r | |
5809 | // weighted 4-particle correlations:\r | |
5810 | Double_t four1n1n1n1nW1W1W1W1 = 0.; // <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))>\r | |
5811 | if(dMult>3) \r | |
5812 | { \r | |
5813 | if(dM1111)\r | |
5814 | { \r | |
5815 | four1n1n1n1nW1W1W1W1 = (pow(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.),2)\r | |
5816 | - 2.*(pow(dReQ1n1k,2.)*dReQ2n2k+2.*dReQ1n1k*dImQ1n1k*dImQ2n2k-pow(dImQ1n1k,2.)*dReQ2n2k)\r | |
5817 | + 8.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k)\r | |
5818 | + (pow(dReQ2n2k,2)+pow(dImQ2n2k,2))\r | |
5819 | - 4.*(*fSMpk)(0,2)*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2))\r | |
5820 | - 6.*(*fSMpk)(0,4)+2.*(*fSMpk)(1,2))/dM1111; \r | |
5821 | \r | |
5822 | // average weighted correlation <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> for single event: \r | |
5823 | fQCorrelationsEBE[1]->SetBinContent(11,four1n1n1n1nW1W1W1W1);\r | |
5824 | \r | |
5825 | // average weighted correlation <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> for all events: \r | |
5826 | //fQCorrelationsW->Fill(40.,four1n1n1n1nW1W1W1W1,dM1111);\r | |
5827 | \r | |
5828 | fQCorrelations[1][0]->Fill(10.5,four1n1n1n1nW1W1W1W1,dM1111);\r | |
5829 | } \r | |
5830 | } // end of if(dMult>3) \r | |
5831 | //..............................................................................................\r | |
5832 | \r | |
5833 | */\r | |
5834 | \r | |
5835 | } // end of AliFlowAnalysisWithQCumulants::CalculateWeightedCorrelationsForIntegratedFlow()\r | |
5836 | \r | |
5837 | \r | |
5838 | //================================================================================================================================\r | |
5839 | \r | |
5840 | \r | |
5841 | void AliFlowAnalysisWithQCumulants::CalculateWeightedQProductsForIntFlow() // to be improved (completed)\r | |
5842 | {\r | |
5843 | // calculate averages like <<2><4>>, <<2><6>>, <<4><6>>, etc. which are needed to calculate covariances \r | |
5844 | // Remark: here we take weighted correlations!\r | |
5845 | \r | |
5846 | /*\r | |
5847 | \r | |
5848 | // binning of fQProductsW is organized as follows:\r | |
5849 | // \r | |
5850 | // 1st bin: <2><4> \r | |
5851 | // 2nd bin: <2><6>\r | |
5852 | // 3rd bin: <2><8>\r | |
5853 | // 4th bin: <4><6>\r | |
5854 | // 5th bin: <4><8>\r | |
5855 | // 6th bin: <6><8>\r | |
5856 | \r | |
5857 | Double_t dMult = (*fSMpk)(0,0); // multiplicity (number of particles used to determine the reaction plane)\r | |
5858 | \r | |
5859 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j\r | |
5860 | Double_t dM1111 = (*fSMpk)(3,1)-6.*(*fSMpk)(0,2)*(*fSMpk)(1,1) \r | |
5861 | + 8.*(*fSMpk)(0,3)*(*fSMpk)(0,1)\r | |
5862 | + 3.*(*fSMpk)(1,2)-6.*(*fSMpk)(0,4); // dM1111 = sum_{i,j,k,l=1,i!=j!=k!=l}^M w_i w_j w_k w_l\r | |
5863 | \r | |
5864 | Double_t twoEBEW = 0.; // <2>\r | |
5865 | Double_t fourEBEW = 0.; // <4>\r | |
5866 | \r | |
5867 | twoEBEW = fQCorrelationsEBE[1]->GetBinContent(1);\r | |
5868 | fourEBEW = fQCorrelationsEBE[1]->GetBinContent(11);\r | |
5869 | \r | |
5870 | // <2><4>\r | |
5871 | if(dMult>3)\r | |
5872 | {\r | |
5873 | fQProducts[1][0]->Fill(0.5,twoEBEW*fourEBEW,dM11*dM1111);\r | |
5874 | }\r | |
5875 | \r | |
5876 | */\r | |
5877 | \r | |
5878 | } // end of AliFlowAnalysisWithQCumulants::CalculateWeightedQProductsForIntFlow() \r | |
5879 | \r | |
5880 | \r | |
5881 | //================================================================================================================================\r | |
5882 | \r | |
5883 | \r | |
5884 | void AliFlowAnalysisWithQCumulants::InitializeArraysForIntFlow()\r | |
5885 | {\r | |
5886 | // Initialize all arrays used to calculate integrated flow.\r | |
5887 | \r | |
5888 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms\r | |
5889 | {\r | |
5890 | fIntFlowCorrectionTermsForNUAEBE[sc] = NULL;\r | |
5891 | fIntFlowCorrectionTermsForNUAPro[sc] = NULL;\r | |
5892 | fIntFlowCorrectionTermsForNUAHist[sc] = NULL;\r | |
5893 | }\r | |
5894 | \r | |
5895 | for(Int_t power=0;power<2;power++) // linear or quadratic \r | |
5896 | {\r | |
5897 | fIntFlowSumOfEventWeights[power] = NULL; \r | |
5898 | }\r | |
5899 | \r | |
5900 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForIntFlow()\r | |
5901 | \r | |
5902 | \r | |
5903 | //================================================================================================================================\r | |
5904 | \r | |
5905 | \r | |
5906 | void AliFlowAnalysisWithQCumulants::InitializeArraysForDiffFlow()\r | |
5907 | {\r | |
5908 | // Initialize all arrays needed to calculate differential flow.\r | |
5909 | // a) Initialize lists holding profiles;\r | |
5910 | // b) Initialize lists holding histograms;\r | |
5911 | // c) Initialize event-by-event quantities;\r | |
5912 | // d) Initialize profiles;\r | |
5913 | // e) Initialize histograms holding final results.\r | |
5914 | \r | |
5915 | // a) Initialize lists holding profiles;\r | |
5916 | for(Int_t t=0;t<2;t++) // type (RP, POI)\r | |
5917 | {\r | |
5918 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
5919 | {\r | |
5920 | fDiffFlowCorrelationsProList[t][pe] = NULL;\r | |
5921 | fDiffFlowProductOfCorrelationsProList[t][pe] = NULL;\r | |
5922 | fDiffFlowCorrectionsProList[t][pe] = NULL;\r | |
5923 | }\r | |
5924 | } \r | |
5925 | \r | |
5926 | // b) Initialize lists holding histograms;\r | |
5927 | for(Int_t t=0;t<2;t++) // type (RP, POI)\r | |
5928 | {\r | |
5929 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
5930 | {\r | |
5931 | fDiffFlowCorrelationsHistList[t][pe] = NULL;\r | |
5932 | for(Int_t power=0;power<2;power++)\r | |
5933 | {\r | |
5934 | fDiffFlowSumOfEventWeightsHistList[t][pe][power] = NULL;\r | |
5935 | } // end of for(Int_t power=0;power<2;power++) \r | |
5936 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe] = NULL;\r | |
5937 | fDiffFlowCovariancesHistList[t][pe] = NULL;\r | |
5938 | fDiffFlowCumulantsHistList[t][pe] = NULL;\r | |
5939 | fDiffFlowHistList[t][pe] = NULL;\r | |
5940 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
5941 | } // enf of for(Int_t t=0;t<2;t++) // type (RP, POI) \r | |
5942 | \r | |
5943 | // c) Initialize event-by-event quantities:\r | |
5944 | // 1D:\r | |
5945 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP)\r | |
5946 | {\r | |
5947 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
5948 | { \r | |
5949 | for(Int_t m=0;m<4;m++) // multiple of harmonic\r | |
5950 | {\r | |
5951 | for(Int_t k=0;k<9;k++) // power of weight\r | |
5952 | {\r | |
5953 | fReRPQ1dEBE[t][pe][m][k] = NULL;\r | |
5954 | fImRPQ1dEBE[t][pe][m][k] = NULL;\r | |
5955 | fs1dEBE[t][pe][k] = NULL; // to be improved (this doesn't need to be within loop over m)\r | |
5956 | } \r | |
5957 | }\r | |
5958 | }\r | |
5959 | }\r | |
5960 | // 2D: \r | |
5961 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP)\r | |
5962 | {\r | |
5963 | for(Int_t m=0;m<4;m++) // multiple of harmonic\r | |
5964 | {\r | |
5965 | for(Int_t k=0;k<9;k++) // power of weight\r | |
5966 | {\r | |
5967 | fReRPQ2dEBE[t][m][k] = NULL;\r | |
5968 | fImRPQ2dEBE[t][m][k] = NULL;\r | |
5969 | fs2dEBE[t][k] = NULL; // to be improved (this doesn't need to be within loop over m)\r | |
5970 | } \r | |
5971 | }\r | |
5972 | }\r | |
5973 | \r | |
5974 | // d) Initialize profiles:\r | |
5975 | for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
5976 | { \r | |
5977 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
5978 | {\r | |
5979 | for(Int_t ci=0;ci<4;ci++) // correlation index\r | |
5980 | {\r | |
5981 | fDiffFlowCorrelationsPro[t][pe][ci] = NULL;\r | |
5982 | } // end of for(Int_t ci=0;ci<4;ci++) \r | |
5983 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index\r | |
5984 | {\r | |
5985 | for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index\r | |
5986 | {\r | |
5987 | fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2] = NULL;\r | |
5988 | } // end of for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index\r | |
5989 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index \r | |
5990 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
5991 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
5992 | \r | |
5993 | // e) Initialize histograms holding final results.\r | |
5994 | for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
5995 | { \r | |
5996 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
5997 | {\r | |
5998 | for(Int_t ci=0;ci<4;ci++) // correlation index\r | |
5999 | {\r | |
6000 | fDiffFlowCorrelationsHist[t][pe][ci] = NULL;\r | |
6001 | fDiffFlowCumulants[t][pe][ci] = NULL;\r | |
6002 | fDiffFlow[t][pe][ci] = NULL;\r | |
6003 | } // end of for(Int_t ci=0;ci<4;ci++) \r | |
6004 | for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++) \r | |
6005 | {\r | |
6006 | fDiffFlowCovariances[t][pe][covarianceIndex] = NULL; \r | |
6007 | } // end of for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++) \r | |
6008 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
6009 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
6010 | \r | |
6011 | \r | |
6012 | // sum of event weights for reduced correlations:\r | |
6013 | for(Int_t t=0;t<2;t++) // type = RP or POI\r | |
6014 | {\r | |
6015 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
6016 | {\r | |
6017 | for(Int_t p=0;p<2;p++) // power of weight is 1 or 2\r | |
6018 | {\r | |
6019 | for(Int_t ew=0;ew<4;ew++) // event weight index for reduced correlations\r | |
6020 | {\r | |
6021 | fDiffFlowSumOfEventWeights[t][pe][p][ew] = NULL;\r | |
6022 | } \r | |
6023 | } \r | |
6024 | }\r | |
6025 | }\r | |
6026 | // product of event weights for both types of correlations:\r | |
6027 | for(Int_t t=0;t<2;t++) // type = RP or POI\r | |
6028 | {\r | |
6029 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
6030 | {\r | |
6031 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index\r | |
6032 | {\r | |
6033 | for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index\r | |
6034 | {\r | |
6035 | fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] = NULL;\r | |
6036 | } \r | |
6037 | } \r | |
6038 | }\r | |
6039 | }\r | |
6040 | \r | |
6041 | \r | |
6042 | \r | |
6043 | \r | |
6044 | /*\r | |
6045 | \r | |
6046 | // nested lists in fDiffFlowProfiles:\r | |
6047 | for(Int_t t=0;t<2;t++)\r | |
6048 | {\r | |
6049 | fDFPType[t] = NULL;\r | |
6050 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1)\r | |
6051 | {\r | |
6052 | fDFPParticleWeights[t][pW] = NULL;\r | |
6053 | for(Int_t eW=0;eW<2;eW++)\r | |
6054 | { \r | |
6055 | fDFPEventWeights[t][pW][eW] = NULL;\r | |
6056 | fDiffFlowCorrelations[t][pW][eW] = NULL;\r | |
6057 | fDiffFlowProductsOfCorrelations[t][pW][eW] = NULL;\r | |
6058 | for(Int_t sc=0;sc<2;sc++)\r | |
6059 | {\r | |
6060 | fDiffFlowCorrectionTerms[t][pW][eW][sc] = NULL;\r | |
6061 | }\r | |
6062 | } \r | |
6063 | }\r | |
6064 | } \r | |
6065 | \r | |
6066 | \r | |
6067 | */\r | |
6068 | \r | |
6069 | \r | |
6070 | \r | |
6071 | /*\r | |
6072 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1)\r | |
6073 | {\r | |
6074 | for(Int_t eW=0;eW<2;eW++)\r | |
6075 | {\r | |
6076 | // correlations:\r | |
6077 | for(Int_t correlationIndex=0;correlationIndex<4;correlationIndex++)\r | |
6078 | {\r | |
6079 | fCorrelationsPro[t][pW][eW][correlationIndex] = NULL;\r | |
6080 | }\r | |
6081 | // products of correlations:\r | |
6082 | for(Int_t productOfCorrelationsIndex=0;productOfCorrelationsIndex<6;productOfCorrelationsIndex++)\r | |
6083 | {\r | |
6084 | fProductsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex] = NULL;\r | |
6085 | }\r | |
6086 | // correction terms:\r | |
6087 | for(Int_t sc=0;sc<2;sc++)\r | |
6088 | {\r | |
6089 | for(Int_t correctionsIndex=0;correctionsIndex<2;correctionsIndex++)\r | |
6090 | {\r | |
6091 | fCorrectionTermsPro[t][pW][eW][sc][correctionsIndex] = NULL;\r | |
6092 | } \r | |
6093 | } \r | |
6094 | }\r | |
6095 | } \r | |
6096 | */\r | |
6097 | \r | |
6098 | \r | |
6099 | \r | |
6100 | \r | |
6101 | \r | |
6102 | /*\r | |
6103 | \r | |
6104 | \r | |
6105 | \r | |
6106 | // nested lists in fDiffFlowResults:\r | |
6107 | for(Int_t t=0;t<2;t++)\r | |
6108 | {\r | |
6109 | fDFRType[t] = NULL;\r | |
6110 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1)\r | |
6111 | {\r | |
6112 | fDFRParticleWeights[t][pW] = NULL;\r | |
6113 | for(Int_t eW=0;eW<2;eW++)\r | |
6114 | { \r | |
6115 | fDFREventWeights[t][pW][eW] = NULL;\r | |
6116 | fDiffFlowFinalCorrelations[t][pW][eW] = NULL;\r | |
6117 | fDiffFlowFinalCorrections[t][pW][eW] = NULL;\r | |
6118 | fDiffFlowFinalCovariances[t][pW][eW] = NULL;\r | |
6119 | for(Int_t nua=0;nua<2;nua++)\r | |
6120 | {\r | |
6121 | fDFRCorrections[t][pW][eW][nua] = NULL; \r | |
6122 | fDiffFlowFinalCumulants[t][pW][eW][nua] = NULL; \r | |
6123 | fDiffFlowFinalFlow[t][pW][eW][nua] = NULL;\r | |
6124 | }\r | |
6125 | } \r | |
6126 | }\r | |
6127 | } \r | |
6128 | \r | |
6129 | // 2D and 1D histograms in nested lists in fDiffFlowResults:\r | |
6130 | for(Int_t t=0;t<2;t++) \r | |
6131 | {\r | |
6132 | fNonEmptyBins2D[t] = NULL;\r | |
6133 | for(Int_t pe=0;pe<2;pe++)\r | |
6134 | {\r | |
6135 | fNonEmptyBins1D[t][pe] = NULL;\r | |
6136 | }\r | |
6137 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1)\r | |
6138 | {\r | |
6139 | for(Int_t eW=0;eW<2;eW++)\r | |
6140 | {\r | |
6141 | // correlations:\r | |
6142 | for(Int_t correlationIndex=0;correlationIndex<4;correlationIndex++) \r | |
6143 | {\r | |
6144 | fFinalCorrelations2D[t][pW][eW][correlationIndex] = NULL;\r | |
6145 | for(Int_t pe=0;pe<2;pe++)\r | |
6146 | {\r | |
6147 | fFinalCorrelations1D[t][pW][eW][pe][correlationIndex] = NULL; \r | |
6148 | }\r | |
6149 | }\r | |
6150 | // corrections:\r | |
6151 | for(Int_t correctionIndex=0;correctionIndex<4;correctionIndex++) \r | |
6152 | {\r | |
6153 | fFinalCorrections2D[t][pW][eW][correctionIndex] = NULL;\r | |
6154 | for(Int_t pe=0;pe<2;pe++)\r | |
6155 | {\r | |
6156 | fFinalCorrections1D[t][pW][eW][pe][correctionIndex] = NULL; \r | |
6157 | }\r | |
6158 | }\r | |
6159 | // covariances:\r | |
6160 | for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++) \r | |
6161 | {\r | |
6162 | fFinalCovariances2D[t][pW][eW][covarianceIndex] = NULL;\r | |
6163 | for(Int_t pe=0;pe<2;pe++)\r | |
6164 | {\r | |
6165 | fFinalCovariances1D[t][pW][eW][pe][covarianceIndex] = NULL; \r | |
6166 | }\r | |
6167 | }\r | |
6168 | for(Int_t nua=0;nua<2;nua++) \r | |
6169 | { \r | |
6170 | // cumulants:\r | |
6171 | for(Int_t cumulantIndex=0;cumulantIndex<4;cumulantIndex++) \r | |
6172 | {\r | |
6173 | fFinalCumulants2D[t][pW][eW][nua][cumulantIndex] = NULL;\r | |
6174 | fFinalCumulantsPt[t][pW][eW][nua][cumulantIndex] = NULL; \r | |
6175 | fFinalCumulantsEta[t][pW][eW][nua][cumulantIndex] = NULL; \r | |
6176 | }\r | |
6177 | // final flow:\r | |
6178 | for(Int_t finalFlowIndex=0;finalFlowIndex<4;finalFlowIndex++) \r | |
6179 | {\r | |
6180 | fFinalFlow2D[t][pW][eW][nua][finalFlowIndex] = NULL;\r | |
6181 | fFinalFlowPt[t][pW][eW][nua][finalFlowIndex] = NULL; \r | |
6182 | fFinalFlowEta[t][pW][eW][nua][finalFlowIndex] = NULL; \r | |
6183 | }\r | |
6184 | } \r | |
6185 | } \r | |
6186 | }\r | |
6187 | }\r | |
6188 | \r | |
6189 | \r | |
6190 | */\r | |
6191 | \r | |
6192 | \r | |
6193 | } // end of AliFlowAnalysisWithQCumulants::InitializeArraysForDiffFlow()\r | |
6194 | \r | |
6195 | \r | |
6196 | //================================================================================================================================\r | |
6197 | \r | |
6198 | \r | |
6199 | void AliFlowAnalysisWithQCumulants::CalculateCorrelationsForDifferentialFlow2D(TString type)\r | |
6200 | {\r | |
6201 | // calculate all reduced correlations needed for differential flow for each (pt,eta) bin: \r | |
6202 | \r | |
6203 | if(type == "RP") // to be improved (removed)\r | |
6204 | {\r | |
6205 | cout<<endl;\r | |
6206 | }\r | |
6207 | // ... \r | |
6208 | \r | |
6209 | /*\r | |
6210 | \r | |
6211 | Int_t typeFlag = -1; \r | |
6212 | \r | |
6213 | // reduced correlations ares stored in fCorrelationsPro[t][pW][index] and are indexed as follows:\r | |
6214 | // index:\r | |
6215 | // 0: <2'>\r | |
6216 | // 1: <4'>\r | |
6217 | \r | |
6218 | // multiplicity:\r | |
6219 | Double_t dMult = (*fSMpk)(0,0);\r | |
6220 | \r | |
6221 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: \r | |
6222 | Double_t dReQ1n = (*fReQ)(0,0);\r | |
6223 | Double_t dReQ2n = (*fReQ)(1,0);\r | |
6224 | //Double_t dReQ3n = (*fReQ)(2,0);\r | |
6225 | //Double_t dReQ4n = (*fReQ)(3,0);\r | |
6226 | Double_t dImQ1n = (*fImQ)(0,0);\r | |
6227 | Double_t dImQ2n = (*fImQ)(1,0);\r | |
6228 | //Double_t dImQ3n = (*fImQ)(2,0);\r | |
6229 | //Double_t dImQ4n = (*fImQ)(3,0);\r | |
6230 | \r | |
6231 | // looping over all (pt,eta) bins and calculating correlations needed for differential flow: \r | |
6232 | for(Int_t p=1;p<=fnBinsPt;p++)\r | |
6233 | {\r | |
6234 | for(Int_t e=1;e<=fnBinsEta;e++)\r | |
6235 | {\r | |
6236 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): \r | |
6237 | Double_t p1n0kRe = 0.;\r | |
6238 | Double_t p1n0kIm = 0.;\r | |
6239 | \r | |
6240 | // number of POIs in particular (pt,eta) bin:\r | |
6241 | Double_t mp = 0.;\r | |
6242 | \r | |
6243 | // real and imaginary parts of q_{m*n,0} (non-weighted Q-vector evaluated for particles which are both RPs and POIs in particular (pt,eta) bin):\r | |
6244 | Double_t q1n0kRe = 0.;\r | |
6245 | Double_t q1n0kIm = 0.;\r | |
6246 | Double_t q2n0kRe = 0.;\r | |
6247 | Double_t q2n0kIm = 0.;\r | |
6248 | \r | |
6249 | // number of particles which are both RPs and POIs in particular (pt,eta) bin:\r | |
6250 | Double_t mq = 0.;\r | |
6251 | \r | |
6252 | // q_{m*n,0}:\r | |
6253 | q1n0kRe = fReEBE2D[2][0][0]->GetBinContent(fReEBE2D[2][0][0]->GetBin(p,e))\r | |
6254 | * fReEBE2D[2][0][0]->GetBinEntries(fReEBE2D[2][0][0]->GetBin(p,e));\r | |
6255 | q1n0kIm = fImEBE2D[2][0][0]->GetBinContent(fImEBE2D[2][0][0]->GetBin(p,e))\r | |
6256 | * fImEBE2D[2][0][0]->GetBinEntries(fImEBE2D[2][0][0]->GetBin(p,e));\r | |
6257 | q2n0kRe = fReEBE2D[2][1][0]->GetBinContent(fReEBE2D[2][1][0]->GetBin(p,e))\r | |
6258 | * fReEBE2D[2][1][0]->GetBinEntries(fReEBE2D[2][1][0]->GetBin(p,e));\r | |
6259 | q2n0kIm = fImEBE2D[2][1][0]->GetBinContent(fImEBE2D[2][1][0]->GetBin(p,e))\r | |
6260 | * fImEBE2D[2][1][0]->GetBinEntries(fImEBE2D[2][1][0]->GetBin(p,e));\r | |
6261 | \r | |
6262 | mq = fReEBE2D[2][0][0]->GetBinEntries(fReEBE2D[2][0][0]->GetBin(p,e)); // to be improved (cross-checked by accessing other profiles here)\r | |
6263 | \r | |
6264 | if(type == "POI")\r | |
6265 | {\r | |
6266 | // p_{m*n,0}:\r | |
6267 | p1n0kRe = fReEBE2D[1][0][0]->GetBinContent(fReEBE2D[1][0][0]->GetBin(p,e))\r | |
6268 | * fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e));\r | |
6269 | p1n0kIm = fImEBE2D[1][0][0]->GetBinContent(fImEBE2D[1][0][0]->GetBin(p,e)) \r | |
6270 | * fImEBE2D[1][0][0]->GetBinEntries(fImEBE2D[1][0][0]->GetBin(p,e));\r | |
6271 | \r | |
6272 | mp = fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); // to be improved (cross-checked by accessing other profiles here)\r | |
6273 | \r | |
6274 | typeFlag = 1;\r | |
6275 | }\r | |
6276 | else if(type == "RP")\r | |
6277 | {\r | |
6278 | // p_{m*n,0} = q_{m*n,0}:\r | |
6279 | p1n0kRe = q1n0kRe; \r | |
6280 | p1n0kIm = q1n0kIm; \r | |
6281 | mp = mq; \r | |
6282 | \r | |
6283 | typeFlag = 0;\r | |
6284 | }\r | |
6285 | \r | |
6286 | // count events with non-empty (pt,eta) bin:\r | |
6287 | if(mp>0)\r | |
6288 | {\r | |
6289 | fNonEmptyBins2D[typeFlag]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,1);\r | |
6290 | }\r | |
6291 | \r | |
6292 | // 2'-particle correlation for particular (pt,eta) bin:\r | |
6293 | Double_t two1n1nPtEta = 0.;\r | |
6294 | if(mp*dMult-mq)\r | |
6295 | {\r | |
6296 | two1n1nPtEta = (p1n0kRe*dReQ1n+p1n0kIm*dImQ1n-mq)\r | |
6297 | / (mp*dMult-mq);\r | |
6298 | \r | |
6299 | // fill the 2D profile to get the average correlation for each (pt,eta) bin:\r | |
6300 | if(type == "POI")\r | |
6301 | { \r | |
6302 | //f2pPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq);\r | |
6303 | \r | |
6304 | fCorrelationsPro[1][0][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq);\r | |
6305 | }\r | |
6306 | else if(type == "RP")\r | |
6307 | {\r | |
6308 | //f2pPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); \r | |
6309 | fCorrelationsPro[0][0][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq);\r | |
6310 | }\r | |
6311 | } // end of if(mp*dMult-mq)\r | |
6312 | \r | |
6313 | // 4'-particle correlation:\r | |
6314 | Double_t four1n1n1n1nPtEta = 0.;\r | |
6315 | if((mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
6316 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) // to be improved (introduce a new variable for this expression)\r | |
6317 | {\r | |
6318 | four1n1n1n1nPtEta = ((pow(dReQ1n,2.)+pow(dImQ1n,2.))*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n)\r | |
6319 | - q2n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.))\r | |
6320 | - 2.*q2n0kIm*dReQ1n*dImQ1n\r | |
6321 | - p1n0kRe*(dReQ1n*dReQ2n+dImQ1n*dImQ2n)\r | |
6322 | + p1n0kIm*(dImQ1n*dReQ2n-dReQ1n*dImQ2n)\r | |
6323 | - 2.*dMult*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n)\r | |
6324 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*mq \r | |
6325 | + 6.*(q1n0kRe*dReQ1n+q1n0kIm*dImQ1n) \r | |
6326 | + 1.*(q2n0kRe*dReQ2n+q2n0kIm*dImQ2n) \r | |
6327 | + 2.*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) \r | |
6328 | + 2.*mq*dMult \r | |
6329 | - 6.*mq) \r | |
6330 | / ((mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
6331 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
6332 | \r | |
6333 | // fill the 2D profile to get the average correlation for each (pt, eta) bin:\r | |
6334 | if(type == "POI")\r | |
6335 | {\r | |
6336 | //f4pPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta,\r | |
6337 | // (mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
6338 | // + mq*(dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
6339 | \r | |
6340 | fCorrelationsPro[1][0][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta,\r | |
6341 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
6342 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.));\r | |
6343 | }\r | |
6344 | else if(type == "RP")\r | |
6345 | {\r | |
6346 | //f4pPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta,\r | |
6347 | // (mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
6348 | // + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
6349 | \r | |
6350 | fCorrelationsPro[0][0][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta,\r | |
6351 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
6352 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
6353 | }\r | |
6354 | } // end of if((mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
6355 | // +mq*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
6356 | \r | |
6357 | } // end of for(Int_t e=1;e<=fnBinsEta;e++)\r | |
6358 | } // end of for(Int_t p=1;p<=fnBinsPt;p++)\r | |
6359 | \r | |
6360 | \r | |
6361 | \r | |
6362 | */\r | |
6363 | \r | |
6364 | \r | |
6365 | \r | |
6366 | } // end of AliFlowAnalysisWithQCumulants::CalculateCorrelationsForDifferentialFlow2D()\r | |
6367 | \r | |
6368 | \r | |
6369 | //================================================================================================================================\r | |
6370 | \r | |
6371 | \r | |
6372 | void AliFlowAnalysisWithQCumulants::CalculateWeightedCorrelationsForDifferentialFlow2D(TString type)\r | |
6373 | {\r | |
6374 | // calculate all weighted correlations needed for differential flow \r | |
6375 | \r | |
6376 | if(type == "RP") // to be improved (removed)\r | |
6377 | {\r | |
6378 | cout<<endl;\r | |
6379 | }\r | |
6380 | // ... \r | |
6381 | \r | |
6382 | /*\r | |
6383 | \r | |
6384 | \r | |
6385 | \r | |
6386 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: \r | |
6387 | Double_t dReQ1n1k = (*fReQ)(0,1);\r | |
6388 | Double_t dReQ2n2k = (*fReQ)(1,2);\r | |
6389 | Double_t dReQ1n3k = (*fReQ)(0,3);\r | |
6390 | //Double_t dReQ4n4k = (*fReQ)(3,4);\r | |
6391 | Double_t dImQ1n1k = (*fImQ)(0,1);\r | |
6392 | Double_t dImQ2n2k = (*fImQ)(1,2);\r | |
6393 | Double_t dImQ1n3k = (*fImQ)(0,3);\r | |
6394 | //Double_t dImQ4n4k = (*fImQ)(3,4);\r | |
6395 | \r | |
6396 | // S^M_{p,k} (see .h file for the definition of fSMpk):\r | |
6397 | Double_t dSM1p1k = (*fSMpk)(0,1);\r | |
6398 | Double_t dSM1p2k = (*fSMpk)(0,2);\r | |
6399 | Double_t dSM1p3k = (*fSMpk)(0,3);\r | |
6400 | Double_t dSM2p1k = (*fSMpk)(1,1);\r | |
6401 | Double_t dSM3p1k = (*fSMpk)(2,1);\r | |
6402 | \r | |
6403 | // looping over all (pt,eta) bins and calculating weighted correlations needed for differential flow: \r | |
6404 | for(Int_t p=1;p<=fnBinsPt;p++)\r | |
6405 | {\r | |
6406 | for(Int_t e=1;e<=fnBinsEta;e++)\r | |
6407 | {\r | |
6408 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): \r | |
6409 | Double_t p1n0kRe = 0.;\r | |
6410 | Double_t p1n0kIm = 0.;\r | |
6411 | \r | |
6412 | // number of POIs in particular (pt,eta) bin):\r | |
6413 | Double_t mp = 0.;\r | |
6414 | \r | |
6415 | // real and imaginary parts of q_{m*n,k}: \r | |
6416 | // (weighted Q-vector evaluated for particles which are both RPs and POIs in particular (pt,eta) bin)\r | |
6417 | Double_t q1n2kRe = 0.;\r | |
6418 | Double_t q1n2kIm = 0.;\r | |
6419 | Double_t q2n1kRe = 0.;\r | |
6420 | Double_t q2n1kIm = 0.;\r | |
6421 | \r | |
6422 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) \r | |
6423 | Double_t s1p1k = 0.; \r | |
6424 | Double_t s1p2k = 0.; \r | |
6425 | Double_t s1p3k = 0.; \r | |
6426 | \r | |
6427 | // M0111 from Eq. (118) in QC2c (to be improved (notation))\r | |
6428 | Double_t dM0111 = 0.;\r | |
6429 | \r | |
6430 | if(type == "POI")\r | |
6431 | {\r | |
6432 | // p_{m*n,0}:\r | |
6433 | p1n0kRe = fReEBE2D[1][0][0]->GetBinContent(fReEBE2D[1][0][0]->GetBin(p,e))\r | |
6434 | * fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e));\r | |
6435 | p1n0kIm = fImEBE2D[1][0][0]->GetBinContent(fImEBE2D[1][0][0]->GetBin(p,e))\r | |
6436 | * fImEBE2D[1][0][0]->GetBinEntries(fImEBE2D[1][0][0]->GetBin(p,e)); \r | |
6437 | \r | |
6438 | mp = fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e));\r | |
6439 | \r | |
6440 | // q_{m*n,k}: \r | |
6441 | q1n2kRe = fReEBE2D[2][0][2]->GetBinContent(fReEBE2D[2][0][2]->GetBin(p,e))\r | |
6442 | * fReEBE2D[2][0][2]->GetBinEntries(fReEBE2D[2][0][2]->GetBin(p,e));\r | |
6443 | q1n2kIm = fImEBE2D[2][0][2]->GetBinContent(fImEBE2D[2][0][2]->GetBin(p,e))\r | |
6444 | * fImEBE2D[2][0][2]->GetBinEntries(fImEBE2D[2][0][2]->GetBin(p,e));\r | |
6445 | q2n1kRe = fReEBE2D[2][1][1]->GetBinContent(fReEBE2D[2][1][1]->GetBin(p,e))\r | |
6446 | * fReEBE2D[2][1][1]->GetBinEntries(fReEBE2D[2][1][1]->GetBin(p,e)); \r | |
6447 | q2n1kIm = fImEBE2D[2][1][1]->GetBinContent(fImEBE2D[2][1][1]->GetBin(p,e))\r | |
6448 | * fImEBE2D[2][1][1]->GetBinEntries(fImEBE2D[2][1][1]->GetBin(p,e));\r | |
6449 | \r | |
6450 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) \r | |
6451 | s1p1k = pow(fs2D[2][1]->GetBinContent(fs2D[2][1]->GetBin(p,e)),1.); \r | |
6452 | s1p2k = pow(fs2D[2][2]->GetBinContent(fs2D[2][2]->GetBin(p,e)),1.); \r | |
6453 | s1p3k = pow(fs2D[2][3]->GetBinContent(fs2D[2][3]->GetBin(p,e)),1.); \r | |
6454 | \r | |
6455 | // M0111 from Eq. (118) in QC2c (to be improved (notation)):\r | |
6456 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k)\r | |
6457 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k)\r | |
6458 | + 2.*(s1p3k-s1p2k*dSM1p1k));\r | |
6459 | }\r | |
6460 | else if(type == "RP")\r | |
6461 | {\r | |
6462 | p1n0kRe = fReEBE2D[0][0][0]->GetBinContent(fReEBE2D[0][0][0]->GetBin(p,e))\r | |
6463 | * fReEBE2D[0][0][0]->GetBinEntries(fReEBE2D[0][0][0]->GetBin(p,e));\r | |
6464 | p1n0kIm = fImEBE2D[0][0][0]->GetBinContent(fImEBE2D[0][0][0]->GetBin(p,e))\r | |
6465 | * fImEBE2D[0][0][0]->GetBinEntries(fImEBE2D[0][0][0]->GetBin(p,e));\r | |
6466 | \r | |
6467 | mp = fReEBE2D[0][0][0]->GetBinEntries(fReEBE2D[0][0][0]->GetBin(p,e));\r | |
6468 | \r | |
6469 | // q_{m*n,k}: \r | |
6470 | q1n2kRe = fReEBE2D[0][0][2]->GetBinContent(fReEBE2D[0][0][2]->GetBin(p,e))\r | |
6471 | * fReEBE2D[0][0][2]->GetBinEntries(fReEBE2D[0][0][2]->GetBin(p,e));\r | |
6472 | q1n2kIm = fImEBE2D[0][0][2]->GetBinContent(fImEBE2D[0][0][2]->GetBin(p,e))\r | |
6473 | * fImEBE2D[0][0][2]->GetBinEntries(fImEBE2D[0][0][2]->GetBin(p,e));\r | |
6474 | q2n1kRe = fReEBE2D[0][1][1]->GetBinContent(fReEBE2D[0][1][1]->GetBin(p,e))\r | |
6475 | * fReEBE2D[0][1][1]->GetBinEntries(fReEBE2D[0][1][1]->GetBin(p,e));\r | |
6476 | q2n1kIm = fImEBE2D[0][1][1]->GetBinContent(fImEBE2D[0][1][1]->GetBin(p,e))\r | |
6477 | * fImEBE2D[0][1][1]->GetBinEntries(fImEBE2D[0][1][1]->GetBin(p,e));\r | |
6478 | \r | |
6479 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) \r | |
6480 | s1p1k = pow(fs2D[0][1]->GetBinContent(fs2D[0][1]->GetBin(p,e)),1.); \r | |
6481 | s1p2k = pow(fs2D[0][2]->GetBinContent(fs2D[0][2]->GetBin(p,e)),1.); \r | |
6482 | s1p3k = pow(fs2D[0][3]->GetBinContent(fs2D[0][3]->GetBin(p,e)),1.); \r | |
6483 | \r | |
6484 | // M0111 from Eq. (118) in QC2c (to be improved (notation)):\r | |
6485 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k)\r | |
6486 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k)\r | |
6487 | + 2.*(s1p3k-s1p2k*dSM1p1k));\r | |
6488 | //............................................................................................... \r | |
6489 | }\r | |
6490 | \r | |
6491 | // 2'-particle correlation:\r | |
6492 | Double_t two1n1nW0W1PtEta = 0.;\r | |
6493 | if(mp*dSM1p1k-s1p1k)\r | |
6494 | {\r | |
6495 | two1n1nW0W1PtEta = (p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k-s1p1k)\r | |
6496 | / (mp*dSM1p1k-s1p1k);\r | |
6497 | \r | |
6498 | // fill the 2D profile to get the average correlation for each (pt, eta) bin:\r | |
6499 | if(type == "POI")\r | |
6500 | {\r | |
6501 | //f2pPtEtaPOIW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta,\r | |
6502 | // mp*dSM1p1k-s1p1k);\r | |
6503 | fCorrelationsPro[1][1][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta,mp*dSM1p1k-s1p1k);\r | |
6504 | }\r | |
6505 | else if(type == "RP")\r | |
6506 | {\r | |
6507 | //f2pPtEtaRPW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta,\r | |
6508 | // mp*dSM1p1k-s1p1k); \r | |
6509 | fCorrelationsPro[0][1][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta,mp*dSM1p1k-s1p1k); \r | |
6510 | }\r | |
6511 | } // end of if(mp*dMult-dmPrimePrimePtEta)\r | |
6512 | \r | |
6513 | // 4'-particle correlation:\r | |
6514 | Double_t four1n1n1n1nW0W1W1W1PtEta = 0.;\r | |
6515 | if(dM0111)\r | |
6516 | {\r | |
6517 | four1n1n1n1nW0W1W1W1PtEta = ((pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k)\r | |
6518 | - q2n1kRe*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.))\r | |
6519 | - 2.*q2n1kIm*dReQ1n1k*dImQ1n1k\r | |
6520 | - p1n0kRe*(dReQ1n1k*dReQ2n2k+dImQ1n1k*dImQ2n2k)\r | |
6521 | + p1n0kIm*(dImQ1n1k*dReQ2n2k-dReQ1n1k*dImQ2n2k)\r | |
6522 | - 2.*dSM1p2k*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k)\r | |
6523 | - 2.*(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*s1p1k \r | |
6524 | + 6.*(q1n2kRe*dReQ1n1k+q1n2kIm*dImQ1n1k) \r | |
6525 | + 1.*(q2n1kRe*dReQ2n2k+q2n1kIm*dImQ2n2k) \r | |
6526 | + 2.*(p1n0kRe*dReQ1n3k+p1n0kIm*dImQ1n3k) \r | |
6527 | + 2.*s1p1k*dSM1p2k \r | |
6528 | - 6.*s1p3k) \r | |
6529 | / dM0111; // to be imropoved (notation of dM0111)\r | |
6530 | \r | |
6531 | // fill the 2D profile to get the average correlation for each (pt, eta) bin:\r | |
6532 | if(type == "POI")\r | |
6533 | {\r | |
6534 | //f4pPtEtaPOIW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111);\r | |
6535 | fCorrelationsPro[1][1][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111);\r | |
6536 | }\r | |
6537 | else if(type == "RP")\r | |
6538 | {\r | |
6539 | //f4pPtEtaRPW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); \r | |
6540 | fCorrelationsPro[0][1][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); \r | |
6541 | }\r | |
6542 | } // end of if(dM0111)\r | |
6543 | \r | |
6544 | } // end of for(Int_t e=1;e<=fnBinsEta;e++)\r | |
6545 | } // end of for(Int_t p=1;p<=fnBinsPt;p++)\r | |
6546 | \r | |
6547 | \r | |
6548 | */ \r | |
6549 | \r | |
6550 | \r | |
6551 | } // end of AliFlowAnalysisWithQCumulants::CalculateWeightedCorrelationsForDifferentialFlow2D(TString type)\r | |
6552 | \r | |
6553 | \r | |
6554 | //================================================================================================================================\r | |
6555 | \r | |
6556 | \r | |
6557 | /*\r | |
6558 | void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsForDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights)\r | |
6559 | {\r | |
6560 | // 1.) Access average for 2D correlations from profiles and store them in 2D final results histograms;\r | |
6561 | // 2.) Access spread for 2D correlations from profiles, calculate error and store it in 2D final results histograms;\r | |
6562 | // 3.) Make projections along pt and eta axis and store results and errors in 1D final results histograms. \r | |
6563 | \r | |
6564 | Int_t typeFlag = -1;\r | |
6565 | Int_t pWeightsFlag = -1;\r | |
6566 | Int_t eWeightsFlag = -1;\r | |
6567 | \r | |
6568 | if(type == "RP")\r | |
6569 | {\r | |
6570 | typeFlag = 0;\r | |
6571 | } else if(type == "POI")\r | |
6572 | {\r | |
6573 | typeFlag = 1;\r | |
6574 | } else \r | |
6575 | {\r | |
6576 | cout<<"WARNING: type must be either RP or POI in AFAWQC::FCFDF() !!!!"<<endl;\r | |
6577 | exit(0);\r | |
6578 | }\r | |
6579 | \r | |
6580 | if(!useParticleWeights)\r | |
6581 | {\r | |
6582 | pWeightsFlag = 0;\r | |
6583 | } else \r | |
6584 | {\r | |
6585 | pWeightsFlag = 1; \r | |
6586 | } \r | |
6587 | \r | |
6588 | if(eventWeights == "exact")\r | |
6589 | {\r | |
6590 | eWeightsFlag = 0;\r | |
6591 | } \r | |
6592 | \r | |
6593 | // shortcuts:\r | |
6594 | Int_t t = typeFlag;\r | |
6595 | Int_t pW = pWeightsFlag;\r | |
6596 | Int_t eW = eWeightsFlag;\r | |
6597 | \r | |
6598 | // from 2D histogram fNonEmptyBins2D make two 1D histograms fNonEmptyBins1D in pt and eta (to be improved (i.e. moved somewhere else)) \r | |
6599 | // pt:\r | |
6600 | for(Int_t p=1;p<fnBinsPt;p++)\r | |
6601 | {\r | |
6602 | Double_t contentPt = 0.;\r | |
6603 | for(Int_t e=1;e<=fnBinsEta;e++)\r | |
6604 | {\r | |
6605 | contentPt += (fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e))); \r | |
6606 | }\r | |
6607 | fNonEmptyBins1D[t][0]->SetBinContent(p,contentPt);\r | |
6608 | }\r | |
6609 | // eta:\r | |
6610 | for(Int_t e=1;e<fnBinsEta;e++)\r | |
6611 | {\r | |
6612 | Double_t contentEta = 0.;\r | |
6613 | for(Int_t p=1;p<=fnBinsPt;p++)\r | |
6614 | {\r | |
6615 | contentEta += (fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e))); \r | |
6616 | }\r | |
6617 | fNonEmptyBins1D[t][1]->SetBinContent(e,contentEta);\r | |
6618 | }\r | |
6619 | \r | |
6620 | // from 2D profile in (pt,eta) make two 1D profiles in (pt) and (eta):\r | |
6621 | TProfile *profile[2][4]; // [0=pt,1=eta][correlation index] // to be improved (do not hardwire the correlation index)\r | |
6622 | \r | |
6623 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
6624 | {\r | |
6625 | for(Int_t ci=0;ci<4;ci++) // correlation index\r | |
6626 | {\r | |
6627 | if(pe==0) profile[pe][ci] = this->MakePtProjection(fCorrelationsPro[t][pW][eW][ci]);\r | |
6628 | if(pe==1) profile[pe][ci] = this->MakeEtaProjection(fCorrelationsPro[t][pW][eW][ci]);\r | |
6629 | }\r | |
6630 | }\r | |
6631 | \r | |
6632 | // transfer 2D profile into 2D histogram:\r | |
6633 | // to be improved (see in documentation if there is a method to transfer values from 2D profile into 2D histogram) \r | |
6634 | for(Int_t ci=0;ci<4;ci++)\r | |
6635 | {\r | |
6636 | for(Int_t p=1;p<=fnBinsPt;p++)\r | |
6637 | {\r | |
6638 | for(Int_t e=1;e<=fnBinsEta;e++)\r | |
6639 | {\r | |
6640 | Double_t correlation = fCorrelationsPro[t][pW][eW][ci]->GetBinContent(fCorrelationsPro[t][pW][eW][ci]->GetBin(p,e)); \r | |
6641 | Double_t spread = fCorrelationsPro[t][pW][eW][ci]->GetBinError(fCorrelationsPro[t][pW][eW][ci]->GetBin(p,e));\r | |
6642 | Double_t nEvts = fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e));\r | |
6643 | Double_t error = 0.;\r | |
6644 | fFinalCorrelations2D[t][pW][eW][ci]->SetBinContent(fFinalCorrelations2D[t][pW][eW][ci]->GetBin(p,e),correlation); \r | |
6645 | if(nEvts>0)\r | |
6646 | {\r | |
6647 | error = spread/pow(nEvts,0.5);\r | |
6648 | fFinalCorrelations2D[t][pW][eW][ci]->SetBinError(fFinalCorrelations2D[t][pW][eW][ci]->GetBin(p,e),error);\r | |
6649 | }\r | |
6650 | } // end of for(Int_t e=1;e<=fnBinsEta;e++)\r | |
6651 | } // end of for(Int_t p=1;p<=fnBinsPt;p++)\r | |
6652 | } // end of for(Int_t ci=0;ci<4;ci++)\r | |
6653 | \r | |
6654 | // transfer 1D profile into 1D histogram (pt):\r | |
6655 | // to be improved (see in documentation if there is a method to transfer values from 1D profile into 1D histogram) \r | |
6656 | for(Int_t ci=0;ci<4;ci++)\r | |
6657 | {\r | |
6658 | for(Int_t p=1;p<=fnBinsPt;p++)\r | |
6659 | {\r | |
6660 | if(profile[0][ci])\r | |
6661 | {\r | |
6662 | Double_t correlation = profile[0][ci]->GetBinContent(p); \r | |
6663 | Double_t spread = profile[0][ci]->GetBinError(p);\r | |
6664 | Double_t nEvts = fNonEmptyBins1D[t][0]->GetBinContent(p);\r | |
6665 | Double_t error = 0.;\r | |
6666 | fFinalCorrelations1D[t][pW][eW][0][ci]->SetBinContent(p,correlation); \r | |
6667 | if(nEvts>0)\r | |
6668 | {\r | |
6669 | error = spread/pow(nEvts,0.5);\r | |
6670 | fFinalCorrelations1D[t][pW][eW][0][ci]->SetBinError(p,error);\r | |
6671 | } \r | |
6672 | } \r | |
6673 | } // end of for(Int_t p=1;p<=fnBinsPt;p++)\r | |
6674 | } // end of for(Int_t ci=0;ci<4;ci++)\r | |
6675 | \r | |
6676 | // transfer 1D profile into 1D histogram (eta):\r | |
6677 | // to be improved (see in documentation if there is a method to transfer values from 1D profile into 1D histogram) \r | |
6678 | for(Int_t ci=0;ci<4;ci++)\r | |
6679 | {\r | |
6680 | for(Int_t e=1;e<=fnBinsEta;e++)\r | |
6681 | {\r | |
6682 | if(profile[1][ci])\r | |
6683 | {\r | |
6684 | Double_t correlation = profile[1][ci]->GetBinContent(e); \r | |
6685 | fFinalCorrelations1D[t][pW][eW][1][ci]->SetBinContent(e,correlation); \r | |
6686 | } \r | |
6687 | } // end of for(Int_t e=1;e<=fnBinsEta;e++)\r | |
6688 | } // end of for(Int_t ci=0;ci<4;ci++)\r | |
6689 | \r | |
6690 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsForDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights)\r | |
6691 | */\r | |
6692 | \r | |
6693 | \r | |
6694 | //================================================================================================================================\r | |
6695 | \r | |
6696 | \r | |
6697 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulants(TString type, TString ptOrEta)\r | |
6698 | {\r | |
6699 | // calcualate cumulants for differential flow from measured correlations\r | |
6700 | // Remark: cumulants calculated here are NOT corrected for non-uniform acceptance. This correction is applied in the method ...\r | |
6701 | // to be improved (description) \r | |
6702 | \r | |
6703 | Int_t typeFlag = -1;\r | |
6704 | Int_t ptEtaFlag = -1;\r | |
6705 | \r | |
6706 | if(type == "RP")\r | |
6707 | {\r | |
6708 | typeFlag = 0;\r | |
6709 | } else if(type == "POI")\r | |
6710 | {\r | |
6711 | typeFlag = 1;\r | |
6712 | } \r | |
6713 | \r | |
6714 | if(ptOrEta == "Pt")\r | |
6715 | {\r | |
6716 | ptEtaFlag = 0;\r | |
6717 | } else if(ptOrEta == "Eta")\r | |
6718 | {\r | |
6719 | ptEtaFlag = 1;\r | |
6720 | } \r | |
6721 | \r | |
6722 | // shortcuts:\r | |
6723 | Int_t t = typeFlag;\r | |
6724 | Int_t pe = ptEtaFlag;\r | |
6725 | \r | |
6726 | // common:\r | |
6727 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta};\r | |
6728 | \r | |
6729 | // correlation <<2>>: \r | |
6730 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1);\r | |
6731 | \r | |
6732 | // 1D:\r | |
6733 | for(Int_t b=1;b<=nBinsPtEta[pe];b++)\r | |
6734 | {\r | |
6735 | // reduced correlations: \r | |
6736 | Double_t twoPrime = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); // <<2'>>(pt)\r | |
6737 | Double_t fourPrime = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); // <<4'>>(pt)\r | |
6738 | // final statistical error of reduced correlations:\r | |
6739 | //Double_t twoPrimeError = fFinalCorrelations1D[t][pW][eW][0][0]->GetBinError(p); \r | |
6740 | // QC{2'}:\r | |
6741 | Double_t qc2Prime = twoPrime; // QC{2'}\r | |
6742 | //Double_t qc2PrimeError = twoPrimeError; // final stat. error of QC{2'}\r | |
6743 | fDiffFlowCumulants[t][pe][0]->SetBinContent(b,qc2Prime); \r | |
6744 | //fFinalCumulantsPt[t][pW][eW][nua][0]->SetBinError(p,qc2PrimeError); \r | |
6745 | // QC{4'}:\r | |
6746 | Double_t qc4Prime = fourPrime - 2.*twoPrime*two; // QC{4'} = <<4'>> - 2*<<2'>><<2>>\r | |
6747 | fDiffFlowCumulants[t][pe][1]->SetBinContent(b,qc4Prime); \r | |
6748 | } // end of for(Int_t p=1;p<=fnBinsPt;p++)\r | |
6749 | \r | |
6750 | \r | |
6751 | /*\r | |
6752 | // 1D (eta):\r | |
6753 | // to be improved (see documentation if I can do all this without looping)\r | |
6754 | // to be improved (treat pt and eta in one go)\r | |
6755 | // to be improved (combine loops over nua for 2D and 1D)\r | |
6756 | for(Int_t e=1;e<=fnBinsEta;e++)\r | |
6757 | {\r | |
6758 | // reduced correlations: \r | |
6759 | Double_t twoPrime = fFinalCorrelations1D[t][pW][eW][1][0]->GetBinContent(e); // <<2'>>(eta)\r | |
6760 | Double_t fourPrime = fFinalCorrelations1D[t][pW][eW][1][1]->GetBinContent(e); // <<4'>>(eta)\r | |
6761 | // final statistical error of reduced correlations:\r | |
6762 | Double_t twoPrimeError = fFinalCorrelations1D[t][pW][eW][1][0]->GetBinError(e); \r | |
6763 | for(Int_t nua=0;nua<2;nua++)\r | |
6764 | {\r | |
6765 | // QC{2'}:\r | |
6766 | Double_t qc2Prime = twoPrime; // QC{2'}\r | |
6767 | Double_t qc2PrimeError = twoPrimeError; // final stat. error of QC{2'}\r | |
6768 | fFinalCumulantsEta[t][pW][eW][nua][0]->SetBinContent(e,qc2Prime); \r | |
6769 | fFinalCumulantsEta[t][pW][eW][nua][0]->SetBinError(e,qc2PrimeError); \r | |
6770 | // QC{4'}:\r | |
6771 | Double_t qc4Prime = fourPrime - 2.*twoPrime*two; // QC{4'} = <<4'>> - 2*<<2'>><<2>>\r | |
6772 | fFinalCumulantsEta[t][pW][eW][nua][1]->SetBinContent(e,qc4Prime);\r | |
6773 | } // end of for(Int_t nua=0;nua<2;nua++) \r | |
6774 | } // end of for(Int_t e=1;e<=fnBinsEta;e++)\r | |
6775 | */ \r | |
6776 | \r | |
6777 | \r | |
6778 | \r | |
6779 | \r | |
6780 | \r | |
6781 | \r | |
6782 | \r | |
6783 | \r | |
6784 | \r | |
6785 | \r | |
6786 | \r | |
6787 | \r | |
6788 | \r | |
6789 | /* \r | |
6790 | // 2D (pt,eta):\r | |
6791 | // to be improved (see documentation if I can do all this without looping)\r | |
6792 | for(Int_t p=1;p<=fnBinsPt;p++)\r | |
6793 | {\r | |
6794 | for(Int_t e=1;e<=fnBinsEta;e++) \r | |
6795 | { \r | |
6796 | // reduced correlations: \r | |
6797 | Double_t twoPrime = fFinalCorrelations2D[t][pW][eW][0]->GetBinContent(fFinalCorrelations2D[t][pW][eW][0]->GetBin(p,e)); // <<2'>>(pt,eta)\r | |
6798 | Double_t fourPrime = fFinalCorrelations2D[t][pW][eW][1]->GetBinContent(fFinalCorrelations2D[t][pW][eW][1]->GetBin(p,e)); // <<4'>>(pt,eta)\r | |
6799 | for(Int_t nua=0;nua<2;nua++)\r | |
6800 | {\r | |
6801 | // QC{2'}:\r | |
6802 | Double_t qc2Prime = twoPrime; // QC{2'} = <<2'>>\r | |
6803 | fFinalCumulants2D[t][pW][eW][nua][0]->SetBinContent(fFinalCumulants2D[t][pW][eW][nua][0]->GetBin(p,e),qc2Prime); \r | |
6804 | // QC{4'}:\r | |
6805 | Double_t qc4Prime = fourPrime - 2.*twoPrime*two; // QC{4'} = <<4'>> - 2*<<2'>><<2>>\r | |
6806 | fFinalCumulants2D[t][pW][eW][nua][1]->SetBinContent(fFinalCumulants2D[t][pW][eW][nua][1]->GetBin(p,e),qc4Prime); \r | |
6807 | } // end of for(Int_t nua=0;nua<2;nua++) \r | |
6808 | } // end of for(Int_t e=1;e<=fnBinsEta;e++)\r | |
6809 | } // end of for(Int_t p=1;p<=fnBinsPt;p++)\r | |
6810 | */\r | |
6811 | \r | |
6812 | \r | |
6813 | /*\r | |
6814 | \r | |
6815 | \r | |
6816 | \r | |
6817 | */\r | |
6818 | \r | |
6819 | \r | |
6820 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulants(TString type, Bool_t useParticleWeights, TString eventWeights); \r | |
6821 | \r | |
6822 | \r | |
6823 | //================================================================================================================================\r | |
6824 | \r | |
6825 | \r | |
6826 | void AliFlowAnalysisWithQCumulants::CalculateFinalResultsForRPandPOIIntegratedFlow(TString type)\r | |
6827 | {\r | |
6828 | // calculate final results for integrated flow of RPs and POIs \r | |
6829 | \r | |
6830 | Int_t typeFlag = -1;\r | |
6831 | \r | |
6832 | if(type == "RP")\r | |
6833 | {\r | |
6834 | typeFlag = 0;\r | |
6835 | } else if(type == "POI")\r | |
6836 | {\r | |
6837 | typeFlag = 1;\r | |
6838 | } else \r | |
6839 | {\r | |
6840 | cout<<"WARNING: type must be either RP or POI in AFAWQC::CDF() !!!!"<<endl;\r | |
6841 | exit(0);\r | |
6842 | }\r | |
6843 | \r | |
6844 | // shortcuts:\r | |
6845 | Int_t t = typeFlag;\r | |
6846 | \r | |
6847 | // pt yield: \r | |
6848 | TH1F *yield2ndPt = NULL;\r | |
6849 | TH1F *yield4thPt = NULL;\r | |
6850 | TH1F *yield6thPt = NULL;\r | |
6851 | TH1F *yield8thPt = NULL;\r | |
6852 | \r | |
6853 | if(type == "POI")\r | |
6854 | {\r | |
6855 | yield2ndPt = (TH1F*)(fCommonHists2nd->GetHistPtPOI())->Clone();\r | |
6856 | yield4thPt = (TH1F*)(fCommonHists4th->GetHistPtPOI())->Clone();\r | |
6857 | yield6thPt = (TH1F*)(fCommonHists6th->GetHistPtPOI())->Clone();\r | |
6858 | yield8thPt = (TH1F*)(fCommonHists8th->GetHistPtPOI())->Clone(); \r | |
6859 | } \r | |
6860 | else if(type == "RP")\r | |
6861 | {\r | |
6862 | yield2ndPt = (TH1F*)(fCommonHists2nd->GetHistPtRP())->Clone();\r | |
6863 | yield4thPt = (TH1F*)(fCommonHists4th->GetHistPtRP())->Clone();\r | |
6864 | yield6thPt = (TH1F*)(fCommonHists6th->GetHistPtRP())->Clone();\r | |
6865 | yield8thPt = (TH1F*)(fCommonHists8th->GetHistPtRP())->Clone(); \r | |
6866 | } \r | |
6867 | \r | |
6868 | Int_t nBinsPt = yield2ndPt->GetNbinsX();\r | |
6869 | \r | |
6870 | TH1D *flow2ndPt = NULL;\r | |
6871 | TH1D *flow4thPt = NULL;\r | |
6872 | TH1D *flow6thPt = NULL;\r | |
6873 | TH1D *flow8thPt = NULL;\r | |
6874 | \r | |
6875 | // to be improved (hardwired pt index)\r | |
6876 | flow2ndPt = (TH1D*)fDiffFlow[t][0][0]->Clone();\r | |
6877 | flow4thPt = (TH1D*)fDiffFlow[t][0][1]->Clone();\r | |
6878 | flow6thPt = (TH1D*)fDiffFlow[t][0][2]->Clone();\r | |
6879 | flow8thPt = (TH1D*)fDiffFlow[t][0][3]->Clone(); \r | |
6880 | \r | |
6881 | Double_t dvn2nd = 0., dvn4th = 0., dvn6th = 0., dvn8th = 0.; // differential flow\r | |
6882 | Double_t dErrvn2nd = 0., dErrvn4th = 0., dErrvn6th = 0., dErrvn8th = 0.; // error on differential flow\r | |
6883 | \r | |
6884 | Double_t dVn2nd = 0., dVn4th = 0., dVn6th = 0., dVn8th = 0.; // integrated flow \r | |
6885 | Double_t dErrVn2nd = 0., dErrVn4th = 0., dErrVn6th = 0., dErrVn8th = 0.; // error on integrated flow\r | |
6886 | \r | |
6887 | Double_t dYield2nd = 0., dYield4th = 0., dYield6th = 0., dYield8th = 0.; // pt yield \r | |
6888 | Double_t dSum2nd = 0., dSum4th = 0., dSum6th = 0., dSum8th = 0.; // needed for normalizing integrated flow\r | |
6889 | \r | |
6890 | // looping over pt bins:\r | |
6891 | for(Int_t p=1;p<nBinsPt+1;p++)\r | |
6892 | {\r | |
6893 | dvn2nd = flow2ndPt->GetBinContent(p);\r | |
6894 | dvn4th = flow4thPt->GetBinContent(p);\r | |
6895 | dvn6th = flow6thPt->GetBinContent(p);\r | |
6896 | dvn8th = flow8thPt->GetBinContent(p);\r | |
6897 | \r | |
6898 | dErrvn2nd = flow2ndPt->GetBinError(p);\r | |
6899 | dErrvn4th = flow4thPt->GetBinError(p);\r | |
6900 | dErrvn6th = flow6thPt->GetBinError(p);\r | |
6901 | dErrvn8th = flow8thPt->GetBinError(p);\r | |
6902 | \r | |
6903 | dYield2nd = yield2ndPt->GetBinContent(p); \r | |
6904 | dYield4th = yield4thPt->GetBinContent(p);\r | |
6905 | dYield6th = yield6thPt->GetBinContent(p);\r | |
6906 | dYield8th = yield8thPt->GetBinContent(p);\r | |
6907 | \r | |
6908 | dVn2nd += dvn2nd*dYield2nd;\r | |
6909 | dVn4th += dvn4th*dYield4th;\r | |
6910 | dVn6th += dvn6th*dYield6th;\r | |
6911 | dVn8th += dvn8th*dYield8th;\r | |
6912 | \r | |
6913 | dSum2nd += dYield2nd;\r | |
6914 | dSum4th += dYield4th;\r | |
6915 | dSum6th += dYield6th;\r | |
6916 | dSum8th += dYield8th;\r | |
6917 | \r | |
6918 | dErrVn2nd += dYield2nd*dYield2nd*dErrvn2nd*dErrvn2nd; // ro be improved (check this relation)\r | |
6919 | dErrVn4th += dYield4th*dYield4th*dErrvn4th*dErrvn4th;\r | |
6920 | dErrVn6th += dYield6th*dYield6th*dErrvn6th*dErrvn6th;\r | |
6921 | dErrVn8th += dYield8th*dYield8th*dErrvn8th*dErrvn8th;\r | |
6922 | \r | |
6923 | } // end of for(Int_t p=1;p<nBinsPt+1;p++)\r | |
6924 | \r | |
6925 | // normalizing the results for integrated flow:\r | |
6926 | if(dSum2nd) \r | |
6927 | {\r | |
6928 | dVn2nd /= dSum2nd;\r | |
6929 | dErrVn2nd /= (dSum2nd*dSum2nd);\r | |
6930 | dErrVn2nd = TMath::Sqrt(dErrVn2nd);\r | |
6931 | } \r | |
6932 | if(dSum4th) \r | |
6933 | {\r | |
6934 | dVn4th /= dSum4th;\r | |
6935 | dErrVn4th /= (dSum4th*dSum4th);\r | |
6936 | dErrVn4th = TMath::Sqrt(dErrVn4th);\r | |
6937 | } \r | |
6938 | //if(dSum6th) dVn6th/=dSum6th;\r | |
6939 | //if(dSum8th) dVn8th/=dSum8th;\r | |
6940 | \r | |
6941 | \r | |
6942 | /* \r | |
6943 | // storing the results for integrated flow: // to be improved (make a new method for this!)\r | |
6944 | if(!(useParticleWeights))\r | |
6945 | {\r | |
6946 | if(type == "POI")\r | |
6947 | {\r | |
6948 | // 2nd:\r | |
6949 | fIntFlowResultsPOIQC->SetBinContent(1,dVn2nd);\r | |
6950 | fIntFlowResultsPOIQC->SetBinError(1,dSd2nd);\r | |
6951 | // 4th:\r | |
6952 | fIntFlowResultsPOIQC->SetBinContent(2,dVn4th);\r | |
6953 | fIntFlowResultsPOIQC->SetBinError(2,dSd4th);\r | |
6954 | // 6th:\r | |
6955 | fIntFlowResultsPOIQC->SetBinContent(3,dVn6th);\r | |
6956 | fIntFlowResultsPOIQC->SetBinError(3,dSd6th);\r | |
6957 | // 8th:\r | |
6958 | fIntFlowResultsPOIQC->SetBinContent(4,dVn8th);\r | |
6959 | fIntFlowResultsPOIQC->SetBinError(4,dSd8th);\r | |
6960 | }\r | |
6961 | else if (type == "RP")\r | |
6962 | {\r | |
6963 | // 2nd:\r | |
6964 | fIntFlowResultsRPQC->SetBinContent(1,dVn2nd);\r | |
6965 | fIntFlowResultsRPQC->SetBinError(1,dSd2nd);\r | |
6966 | // 4th:\r | |
6967 | fIntFlowResultsRPQC->SetBinContent(2,dVn4th);\r | |
6968 | fIntFlowResultsRPQC->SetBinError(2,dSd4th);\r | |
6969 | // 6th:\r | |
6970 | fIntFlowResultsRPQC->SetBinContent(3,dVn6th);\r | |
6971 | fIntFlowResultsRPQC->SetBinError(3,dSd6th);\r | |
6972 | // 8th:\r | |
6973 | fIntFlowResultsRPQC->SetBinContent(4,dVn8th);\r | |
6974 | fIntFlowResultsRPQC->SetBinError(4,dSd8th);\r | |
6975 | }\r | |
6976 | } \r | |
6977 | else if (useParticleWeights)\r | |
6978 | {\r | |
6979 | if(type == "POI")\r | |
6980 | {\r | |
6981 | // 2nd:\r | |
6982 | fIntFlowResultsPOIQCW->SetBinContent(1,dVn2nd);\r | |
6983 | fIntFlowResultsPOIQCW->SetBinError(1,dSd2nd);\r | |
6984 | // 4th:\r | |
6985 | fIntFlowResultsPOIQCW->SetBinContent(2,dVn4th);\r | |
6986 | fIntFlowResultsPOIQCW->SetBinError(2,dSd4th);\r | |
6987 | // 6th:\r | |
6988 | fIntFlowResultsPOIQCW->SetBinContent(3,dVn6th);\r | |
6989 | fIntFlowResultsPOIQCW->SetBinError(3,dSd6th);\r | |
6990 | // 8th:\r | |
6991 | fIntFlowResultsPOIQCW->SetBinContent(4,dVn8th);\r | |
6992 | fIntFlowResultsPOIQCW->SetBinError(4,dSd8th);\r | |
6993 | }\r | |
6994 | else if (type == "RP")\r | |
6995 | {\r | |
6996 | // 2nd:\r | |
6997 | fIntFlowResultsRPQCW->SetBinContent(1,dVn2nd);\r | |
6998 | fIntFlowResultsRPQCW->SetBinError(1,dSd2nd);\r | |
6999 | // 4th:\r | |
7000 | fIntFlowResultsRPQCW->SetBinContent(2,dVn4th);\r | |
7001 | fIntFlowResultsRPQCW->SetBinError(2,dSd4th);\r | |
7002 | // 6th:\r | |
7003 | fIntFlowResultsRPQCW->SetBinContent(3,dVn6th);\r | |
7004 | fIntFlowResultsRPQCW->SetBinError(3,dSd6th);\r | |
7005 | // 8th:\r | |
7006 | fIntFlowResultsRPQCW->SetBinContent(4,dVn8th);\r | |
7007 | fIntFlowResultsRPQCW->SetBinError(4,dSd8th);\r | |
7008 | }\r | |
7009 | }\r | |
7010 | */\r | |
7011 | \r | |
7012 | \r | |
7013 | \r | |
7014 | // storing the results for integrated flow in common histos: (to be improved: new method for this?)\r | |
7015 | if(type == "POI")\r | |
7016 | {\r | |
7017 | fCommonHistsResults2nd->FillIntegratedFlowPOI(dVn2nd,dErrVn2nd); \r | |
7018 | fCommonHistsResults4th->FillIntegratedFlowPOI(dVn4th,dErrVn4th); \r | |
7019 | fCommonHistsResults6th->FillIntegratedFlowPOI(dVn6th,0.); // to be improved (errors)\r | |
7020 | fCommonHistsResults8th->FillIntegratedFlowPOI(dVn8th,0.); // to be improved (errors)\r | |
7021 | }\r | |
7022 | else if (type == "RP")\r | |
7023 | {\r | |
7024 | fCommonHistsResults2nd->FillIntegratedFlowRP(dVn2nd,dErrVn2nd); \r | |
7025 | fCommonHistsResults4th->FillIntegratedFlowRP(dVn4th,dErrVn4th);\r | |
7026 | fCommonHistsResults6th->FillIntegratedFlowRP(dVn6th,0.); // to be improved (errors)\r | |
7027 | fCommonHistsResults8th->FillIntegratedFlowRP(dVn8th,0.); // to be improved (errors)\r | |
7028 | }\r | |
7029 | \r | |
7030 | delete flow2ndPt;\r | |
7031 | delete flow4thPt;\r | |
7032 | //delete flow6thPt;\r | |
7033 | //delete flow8thPt;\r | |
7034 | \r | |
7035 | delete yield2ndPt;\r | |
7036 | delete yield4thPt;\r | |
7037 | delete yield6thPt;\r | |
7038 | delete yield8thPt;\r | |
7039 | \r | |
7040 | \r | |
7041 | } // end of AliFlowAnalysisWithQCumulants::CalculateFinalResultsForRPandPOIIntegratedFlow(TString type)\r | |
7042 | \r | |
7043 | \r | |
7044 | //================================================================================================================================\r | |
7045 | \r | |
7046 | \r | |
7047 | void AliFlowAnalysisWithQCumulants::InitializeArraysForDistributions()\r | |
7048 | {\r | |
7049 | // initialize arrays used for distributions:\r | |
7050 | \r | |
7051 | /*\r | |
7052 | \r | |
7053 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1)\r | |
7054 | {\r | |
7055 | for(Int_t eW=0;eW<2;eW++)\r | |
7056 | {\r | |
7057 | for(Int_t di=0;di<4;di++) // distribution index\r | |
7058 | {\r | |
7059 | fDistributions[pW][eW][di] = NULL;\r | |
7060 | }\r | |
7061 | } \r | |
7062 | }\r | |
7063 | \r | |
7064 | */\r | |
7065 | \r | |
7066 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForDistributions()\r | |
7067 | \r | |
7068 | \r | |
7069 | //================================================================================================================================\r | |
7070 | \r | |
7071 | \r | |
7072 | void AliFlowAnalysisWithQCumulants::BookEverythingForDistributions()\r | |
7073 | {\r | |
7074 | // book all histograms for distributions\r | |
7075 | \r | |
7076 | /*\r | |
7077 | //weighted <2>_{n|n} distribution\r | |
7078 | f2pDistribution = new TH1D("f2pDistribution","<2>_{n|n} distribution",100000,-0.02,0.1);\r | |
7079 | f2pDistribution->SetXTitle("<2>_{n|n}");\r | |
7080 | f2pDistribution->SetYTitle("Counts");\r | |
7081 | fHistList->Add(f2pDistribution);\r | |
7082 | \r | |
7083 | //weighted <4>_{n,n|n,n} distribution\r | |
7084 | f4pDistribution = new TH1D("f4pDistribution","<4>_{n,n|n,n} distribution",100000,-0.00025,0.002);\r | |
7085 | f4pDistribution->SetXTitle("<4>_{n,n|n,n}");\r | |
7086 | f4pDistribution->SetYTitle("Counts");\r | |
7087 | fHistList->Add(f4pDistribution); \r | |
7088 | \r | |
7089 | //weighted <6>_{n,n,n|n,n,n} distribution\r | |
7090 | f6pDistribution = new TH1D("f6pDistribution","<6>_{n,n,n|n,n,n} distribution",100000,-0.000005,0.000025);\r | |
7091 | f6pDistribution->SetXTitle("<6>_{n,n,n|n,n,n}");\r | |
7092 | f6pDistribution->SetYTitle("Counts");\r | |
7093 | fHistList->Add(f6pDistribution);\r | |
7094 | \r | |
7095 | //weighted <8>_{n,n,n,n|n,n,n,n} distribution\r | |
7096 | f8pDistribution = new TH1D("f8pDistribution","<8>_{n,n,n,n|n,n,n,n} distribution",100000,-0.000000001,0.00000001);\r | |
7097 | f8pDistribution->SetXTitle("<8>_{n,n,n,n|n,n,n,n}");\r | |
7098 | f8pDistribution->SetYTitle("Counts");\r | |
7099 | fHistList->Add(f8pDistribution);\r | |
7100 | */\r | |
7101 | \r | |
7102 | } // end of void AliFlowAnalysisWithQCumulants::BookEverythingForDistributions()\r | |
7103 | \r | |
7104 | \r | |
7105 | //================================================================================================================================\r | |
7106 | \r | |
7107 | \r | |
7108 | void AliFlowAnalysisWithQCumulants::BookAndNestAllLists()\r | |
7109 | {\r | |
7110 | // Book and nest all lists nested in the base list fHistList.\r | |
7111 | // a) Book and nest lists for integrated flow;\r | |
7112 | // b) Book and nest lists for differential flow;\r | |
7113 | // c) Book and nest list for particle weights;\r | |
7114 | // d) Book and nest list for distributions;\r | |
7115 | // e) Book and nest list for nested loops;\r | |
7116 | \r | |
7117 | // a) Book and nest all lists for integrated flow:\r | |
7118 | // base list for integrated flow:\r | |
7119 | fIntFlowList = new TList();\r | |
7120 | fIntFlowList->SetName("Integrated Flow");\r | |
7121 | fIntFlowList->SetOwner(kTRUE);\r | |
7122 | fHistList->Add(fIntFlowList);\r | |
7123 | // list holding profiles: \r | |
7124 | fIntFlowProfiles = new TList();\r | |
7125 | fIntFlowProfiles->SetName("Profiles");\r | |
7126 | fIntFlowProfiles->SetOwner(kTRUE);\r | |
7127 | fIntFlowList->Add(fIntFlowProfiles);\r | |
7128 | // list holding histograms with results:\r | |
7129 | fIntFlowResults = new TList();\r | |
7130 | fIntFlowResults->SetName("Results");\r | |
7131 | fIntFlowResults->SetOwner(kTRUE);\r | |
7132 | fIntFlowList->Add(fIntFlowResults);\r | |
7133 | \r | |
7134 | // b) Book and nest lists for differential flow;\r | |
7135 | fDiffFlowList = new TList();\r | |
7136 | fDiffFlowList->SetName("Differential Flow");\r | |
7137 | fDiffFlowList->SetOwner(kTRUE); \r | |
7138 | fHistList->Add(fDiffFlowList);\r | |
7139 | // list holding profiles: \r | |
7140 | fDiffFlowProfiles = new TList(); \r | |
7141 | fDiffFlowProfiles->SetName("Profiles");\r | |
7142 | fDiffFlowProfiles->SetOwner(kTRUE);\r | |
7143 | fDiffFlowList->Add(fDiffFlowProfiles);\r | |
7144 | // list holding histograms with results: \r | |
7145 | fDiffFlowResults = new TList();\r | |
7146 | fDiffFlowResults->SetName("Results");\r | |
7147 | fDiffFlowResults->SetOwner(kTRUE);\r | |
7148 | fDiffFlowList->Add(fDiffFlowResults);\r | |
7149 | // flags used for naming nested lists in list fDiffFlowProfiles and fDiffFlowResults: \r | |
7150 | TList list;\r | |
7151 | list.SetOwner(kTRUE);\r | |
7152 | TString typeFlag[2] = {"RP","POI"}; \r | |
7153 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; \r | |
7154 | TString powerFlag[2] = {"linear","quadratic"}; \r | |
7155 | // nested lists in fDiffFlowProfiles (~/Differential Flow/Profiles):\r | |
7156 | for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
7157 | {\r | |
7158 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
7159 | {\r | |
7160 | // list holding profiles with correlations:\r | |
7161 | fDiffFlowCorrelationsProList[t][pe] = (TList*)list.Clone();\r | |
7162 | fDiffFlowCorrelationsProList[t][pe]->SetName(Form("Profiles with correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()));\r | |
7163 | fDiffFlowProfiles->Add(fDiffFlowCorrelationsProList[t][pe]);\r | |
7164 | // list holding profiles with products of correlations:\r | |
7165 | fDiffFlowProductOfCorrelationsProList[t][pe] = (TList*)list.Clone();\r | |
7166 | fDiffFlowProductOfCorrelationsProList[t][pe]->SetName(Form("Profiles with products of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()));\r | |
7167 | fDiffFlowProfiles->Add(fDiffFlowProductOfCorrelationsProList[t][pe]);\r | |
7168 | // list holding profiles with correlations:\r | |
7169 | fDiffFlowCorrectionsProList[t][pe] = (TList*)list.Clone();\r | |
7170 | fDiffFlowCorrectionsProList[t][pe]->SetName(Form("Profiles with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()));\r | |
7171 | fDiffFlowProfiles->Add(fDiffFlowCorrectionsProList[t][pe]); \r | |
7172 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta \r | |
7173 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI \r | |
7174 | // nested lists in fDiffFlowResults (~/Differential Flow/Results):\r | |
7175 | for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
7176 | {\r | |
7177 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
7178 | {\r | |
7179 | // list holding histograms with correlations:\r | |
7180 | fDiffFlowCorrelationsHistList[t][pe] = (TList*)list.Clone();\r | |
7181 | fDiffFlowCorrelationsHistList[t][pe]->SetName(Form("Correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()));\r | |
7182 | fDiffFlowResults->Add(fDiffFlowCorrelationsHistList[t][pe]);\r | |
7183 | for(Int_t power=0;power<2;power++)\r | |
7184 | {\r | |
7185 | // list holding histograms with sums of event weights:\r | |
7186 | fDiffFlowSumOfEventWeightsHistList[t][pe][power] = (TList*)list.Clone();\r | |
7187 | fDiffFlowSumOfEventWeightsHistList[t][pe][power]->SetName(Form("Sum of %s event weights (%s, %s)",powerFlag[power].Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data()));\r | |
7188 | fDiffFlowResults->Add(fDiffFlowSumOfEventWeightsHistList[t][pe][power]); \r | |
7189 | } // end of for(Int_t power=0;power<2;power++)\r | |
7190 | // list holding histograms with sums of products of event weights:\r | |
7191 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe] = (TList*)list.Clone();\r | |
7192 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]->SetName(Form("Sum of products of event weights (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()));\r | |
7193 | fDiffFlowResults->Add(fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]);\r | |
7194 | // list holding histograms with covariances of correlations:\r | |
7195 | fDiffFlowCovariancesHistList[t][pe] = (TList*)list.Clone();\r | |
7196 | fDiffFlowCovariancesHistList[t][pe]->SetName(Form("Covariances of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()));\r | |
7197 | fDiffFlowResults->Add(fDiffFlowCovariancesHistList[t][pe]);\r | |
7198 | // list holding histograms with differential Q-cumulants:\r | |
7199 | fDiffFlowCumulantsHistList[t][pe] = (TList*)list.Clone();\r | |
7200 | fDiffFlowCumulantsHistList[t][pe]->SetName(Form("Differential Q-cumulants (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()));\r | |
7201 | fDiffFlowResults->Add(fDiffFlowCumulantsHistList[t][pe]); \r | |
7202 | // list holding histograms with differential flow estimates from Q-cumulants:\r | |
7203 | fDiffFlowHistList[t][pe] = (TList*)list.Clone();\r | |
7204 | fDiffFlowHistList[t][pe]->SetName(Form("Differential flow (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()));\r | |
7205 | fDiffFlowResults->Add(fDiffFlowHistList[t][pe]); \r | |
7206 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
7207 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
7208 | \r | |
7209 | // c) Book and nest list for particle weights:\r | |
7210 | fWeightsList->SetName("Weights");\r | |
7211 | fWeightsList->SetOwner(kTRUE); \r | |
7212 | fHistList->Add(fWeightsList); \r | |
7213 | \r | |
7214 | // d) Book and nest list for distributions:\r | |
7215 | fDistributionsList = new TList();\r | |
7216 | fDistributionsList->SetName("Distributions");\r | |
7217 | fDistributionsList->SetOwner(kTRUE);\r | |
7218 | fHistList->Add(fDistributionsList);\r | |
7219 | \r | |
7220 | // e) Book and nest list for nested loops:\r | |
7221 | fNestedLoopsList = new TList();\r | |
7222 | fNestedLoopsList->SetName("Nested Loops");\r | |
7223 | fNestedLoopsList->SetOwner(kTRUE);\r | |
7224 | fHistList->Add(fNestedLoopsList);\r | |
7225 | \r | |
7226 | } // end of void AliFlowAnalysisWithQCumulants::BookAndNestAllLists()\r | |
7227 | \r | |
7228 | \r | |
7229 | //================================================================================================================================\r | |
7230 | \r | |
7231 | \r | |
7232 | void AliFlowAnalysisWithQCumulants::FillCommonHistResultsDiffFlow(TString type)\r | |
7233 | {\r | |
7234 | // fill common result histograms for differential flow\r | |
7235 | \r | |
7236 | Int_t typeFlag = -1;\r | |
7237 | //Int_t ptEtaFlag = -1;\r | |
7238 | \r | |
7239 | if(type == "RP")\r | |
7240 | {\r | |
7241 | typeFlag = 0;\r | |
7242 | } else if(type == "POI")\r | |
7243 | {\r | |
7244 | typeFlag = 1;\r | |
7245 | } \r | |
7246 | \r | |
7247 | // shortcuts:\r | |
7248 | Int_t t = typeFlag;\r | |
7249 | //Int_t pe = ptEtaFlag;\r | |
7250 | \r | |
7251 | /* // to be improved (implement protection here)\r | |
7252 | for(Int_t o=0;o<4;o++) // order\r | |
7253 | {\r | |
7254 | if(!fFinalFlowPt[t][pW][eW][nua][o])\r | |
7255 | {\r | |
7256 | cout<<"WARNING: fFinalFlowPt[t][pW][eW][nua][o] is NULL in AFAWQC::FCHRIF() !!!!"<<endl;\r | |
7257 | cout<<"t = "<<t<<endl;\r | |
7258 | cout<<"pW = "<<pW<<endl;\r | |
7259 | cout<<"eW = "<<eW<<endl;\r | |
7260 | cout<<"nua = "<<nua<<endl;\r | |
7261 | cout<<"o = "<<o<<endl;\r | |
7262 | exit(0); \r | |
7263 | }\r | |
7264 | if(!fFinalFlowEta[t][pW][eW][nua][o])\r | |
7265 | {\r | |
7266 | cout<<"WARNING: fFinalFlowEta[t][pW][eW][nua][o] is NULL in AFAWQC::FCHRIF() !!!!"<<endl;\r | |
7267 | cout<<"t = "<<t<<endl;\r | |
7268 | cout<<"pW = "<<pW<<endl;\r | |
7269 | cout<<"eW = "<<eW<<endl;\r | |
7270 | cout<<"nua = "<<nua<<endl;\r | |
7271 | cout<<"o = "<<o<<endl;\r | |
7272 | exit(0); \r | |
7273 | } \r | |
7274 | } \r | |
7275 | */\r | |
7276 | \r | |
7277 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th))\r | |
7278 | {\r | |
7279 | cout<<"WARNING: fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl; \r | |
7280 | cout<<" is NULL in AFAWQC::FCHRIF() !!!!"<<endl;\r | |
7281 | exit(0);\r | |
7282 | }\r | |
7283 | \r | |
7284 | // pt:\r | |
7285 | for(Int_t p=1;p<=fnBinsPt;p++)\r | |
7286 | {\r | |
7287 | Double_t v2 = fDiffFlow[t][0][0]->GetBinContent(p);\r | |
7288 | Double_t v4 = fDiffFlow[t][0][1]->GetBinContent(p);\r | |
7289 | Double_t v6 = fDiffFlow[t][0][2]->GetBinContent(p);\r | |
7290 | Double_t v8 = fDiffFlow[t][0][3]->GetBinContent(p);\r | |
7291 | \r | |
7292 | Double_t v2Error = fDiffFlow[t][0][0]->GetBinError(p);\r | |
7293 | Double_t v4Error = fDiffFlow[t][0][1]->GetBinError(p);\r | |
7294 | //Double_t v6Error = fFinalFlow1D[t][pW][nua][0][2]->GetBinError(p);\r | |
7295 | //Double_t v8Error = fFinalFlow1D[t][pW][nua][0][3]->GetBinError(p);\r | |
7296 | \r | |
7297 | if(type == "RP")\r | |
7298 | {\r | |
7299 | fCommonHistsResults2nd->FillDifferentialFlowPtRP(p,v2,v2Error);\r | |
7300 | fCommonHistsResults4th->FillDifferentialFlowPtRP(p,v4,v4Error);\r | |
7301 | fCommonHistsResults6th->FillDifferentialFlowPtRP(p,v6,0.);\r | |
7302 | fCommonHistsResults8th->FillDifferentialFlowPtRP(p,v8,0.);\r | |
7303 | } else if(type == "POI")\r | |
7304 | {\r | |
7305 | fCommonHistsResults2nd->FillDifferentialFlowPtPOI(p,v2,v2Error);\r | |
7306 | fCommonHistsResults4th->FillDifferentialFlowPtPOI(p,v4,v4Error);\r | |
7307 | fCommonHistsResults6th->FillDifferentialFlowPtPOI(p,v6,0.);\r | |
7308 | fCommonHistsResults8th->FillDifferentialFlowPtPOI(p,v8,0.);\r | |
7309 | }\r | |
7310 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) \r | |
7311 | \r | |
7312 | // eta:\r | |
7313 | for(Int_t e=1;e<=fnBinsEta;e++)\r | |
7314 | {\r | |
7315 | Double_t v2 = fDiffFlow[t][1][0]->GetBinContent(e);\r | |
7316 | Double_t v4 = fDiffFlow[t][1][1]->GetBinContent(e);\r | |
7317 | Double_t v6 = fDiffFlow[t][1][2]->GetBinContent(e);\r | |
7318 | Double_t v8 = fDiffFlow[t][1][3]->GetBinContent(e);\r | |
7319 | \r | |
7320 | Double_t v2Error = fDiffFlow[t][1][0]->GetBinError(e);\r | |
7321 | Double_t v4Error = fDiffFlow[t][1][1]->GetBinError(e);\r | |
7322 | //Double_t v6Error = fDiffFlow[t][1][2]->GetBinError(e);\r | |
7323 | //Double_t v8Error = fDiffFlow[t][1][3]->GetBinError(e);\r | |
7324 | \r | |
7325 | if(type == "RP")\r | |
7326 | {\r | |
7327 | fCommonHistsResults2nd->FillDifferentialFlowEtaRP(e,v2,v2Error);\r | |
7328 | fCommonHistsResults4th->FillDifferentialFlowEtaRP(e,v4,v4Error);\r | |
7329 | fCommonHistsResults6th->FillDifferentialFlowEtaRP(e,v6,0.);\r | |
7330 | fCommonHistsResults8th->FillDifferentialFlowEtaRP(e,v8,0.);\r | |
7331 | } else if(type == "POI")\r | |
7332 | {\r | |
7333 | fCommonHistsResults2nd->FillDifferentialFlowEtaPOI(e,v2,v2Error);\r | |
7334 | fCommonHistsResults4th->FillDifferentialFlowEtaPOI(e,v4,v4Error);\r | |
7335 | fCommonHistsResults6th->FillDifferentialFlowEtaPOI(e,v6,0.);\r | |
7336 | fCommonHistsResults8th->FillDifferentialFlowEtaPOI(e,v8,0.);\r | |
7337 | }\r | |
7338 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) \r | |
7339 | \r | |
7340 | } // end of void AliFlowAnalysisWithQCumulants::FillCommonHistResultsDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights, Bool_t correctedForNUA)\r | |
7341 | \r | |
7342 | \r | |
7343 | //================================================================================================================================\r | |
7344 | \r | |
7345 | \r | |
7346 | void AliFlowAnalysisWithQCumulants::AccessConstants()\r | |
7347 | {\r | |
7348 | // access needed common constants from AliFlowCommonConstants\r | |
7349 | \r | |
7350 | fnBinsPhi = AliFlowCommonConstants::GetNbinsPhi();\r | |
7351 | fPhiMin = AliFlowCommonConstants::GetPhiMin(); \r | |
7352 | fPhiMax = AliFlowCommonConstants::GetPhiMax();\r | |
7353 | if(fnBinsPhi) fPhiBinWidth = (fPhiMax-fPhiMin)/fnBinsPhi; \r | |
7354 | fnBinsPt = AliFlowCommonConstants::GetNbinsPt();\r | |
7355 | fPtMin = AliFlowCommonConstants::GetPtMin(); \r | |
7356 | fPtMax = AliFlowCommonConstants::GetPtMax();\r | |
7357 | if(fnBinsPt) fPtBinWidth = (fPtMax-fPtMin)/fnBinsPt; \r | |
7358 | fnBinsEta = AliFlowCommonConstants::GetNbinsEta();\r | |
7359 | fEtaMin = AliFlowCommonConstants::GetEtaMin(); \r | |
7360 | fEtaMax = AliFlowCommonConstants::GetEtaMax();\r | |
7361 | if(fnBinsEta) fEtaBinWidth = (fEtaMax-fEtaMin)/fnBinsEta; \r | |
7362 | \r | |
7363 | } // end of void AliFlowAnalysisWithQCumulants::AccessConstants()\r | |
7364 | \r | |
7365 | \r | |
7366 | //================================================================================================================================\r | |
7367 | \r | |
7368 | \r | |
7369 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeights()\r | |
7370 | {\r | |
7371 | // Calculate sum of linear and quadratic event weights for correlations\r | |
7372 | \r | |
7373 | Double_t dMult = (*fSMpk)(0,0); // multiplicity \r | |
7374 | \r | |
7375 | Double_t eventWeight[4] = {0}; \r | |
7376 | eventWeight[0] = dMult*(dMult-1); // event weight for <2> \r | |
7377 | eventWeight[1] = dMult*(dMult-1)*(dMult-2)*(dMult-3); // event weight for <4> \r | |
7378 | eventWeight[2] = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5); // event weight for <6> \r | |
7379 | eventWeight[3] = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7); // event weight for <8> \r | |
7380 | \r | |
7381 | for(Int_t p=0;p<2;p++) // power-1\r | |
7382 | {\r | |
7383 | for(Int_t ci=0;ci<4;ci++) // correlation index\r | |
7384 | { \r | |
7385 | fIntFlowSumOfEventWeights[p]->Fill(ci+0.5,pow(eventWeight[ci],p+1)); \r | |
7386 | }\r | |
7387 | }\r | |
7388 | \r | |
7389 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeights()\r | |
7390 | \r | |
7391 | \r | |
7392 | //================================================================================================================================\r | |
7393 | \r | |
7394 | \r | |
7395 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfProductOfEventWeights()\r | |
7396 | {\r | |
7397 | // Calculate sum of product of event weights for correlations\r | |
7398 | \r | |
7399 | Double_t dMult = (*fSMpk)(0,0); // multiplicity \r | |
7400 | \r | |
7401 | Double_t eventWeight[4] = {0}; \r | |
7402 | eventWeight[0] = dMult*(dMult-1); // event weight for <2> \r | |
7403 | eventWeight[1] = dMult*(dMult-1)*(dMult-2)*(dMult-3); // event weight for <4> \r | |
7404 | eventWeight[2] = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5); // event weight for <6> \r | |
7405 | eventWeight[3] = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7); // event weight for <8> \r | |
7406 | \r | |
7407 | fIntFlowSumOfProductOfEventWeights->Fill(0.5,eventWeight[0]*eventWeight[1]); \r | |
7408 | fIntFlowSumOfProductOfEventWeights->Fill(1.5,eventWeight[0]*eventWeight[2]); \r | |
7409 | fIntFlowSumOfProductOfEventWeights->Fill(2.5,eventWeight[0]*eventWeight[3]); \r | |
7410 | fIntFlowSumOfProductOfEventWeights->Fill(3.5,eventWeight[1]*eventWeight[2]); \r | |
7411 | fIntFlowSumOfProductOfEventWeights->Fill(4.5,eventWeight[1]*eventWeight[3]); \r | |
7412 | fIntFlowSumOfProductOfEventWeights->Fill(5.5,eventWeight[2]*eventWeight[3]); \r | |
7413 | \r | |
7414 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowIntFlowSumOfProductOfEventWeights()\r | |
7415 | \r | |
7416 | \r | |
7417 | //================================================================================================================================\r | |
7418 | \r | |
7419 | \r | |
7420 | void AliFlowAnalysisWithQCumulants::CalculateReducedCorrelations1D(TString type, TString ptOrEta)\r | |
7421 | {\r | |
7422 | // calculate reduced correlations for RPs or POIs in pt or eta bins\r | |
7423 | \r | |
7424 | // multiplicity:\r | |
7425 | Double_t dMult = (*fSMpk)(0,0);\r | |
7426 | \r | |
7427 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: \r | |
7428 | Double_t dReQ1n = (*fReQ)(0,0);\r | |
7429 | Double_t dReQ2n = (*fReQ)(1,0);\r | |
7430 | //Double_t dReQ3n = (*fReQ)(2,0);\r | |
7431 | //Double_t dReQ4n = (*fReQ)(3,0);\r | |
7432 | Double_t dImQ1n = (*fImQ)(0,0);\r | |
7433 | Double_t dImQ2n = (*fImQ)(1,0);\r | |
7434 | //Double_t dImQ3n = (*fImQ)(2,0);\r | |
7435 | //Double_t dImQ4n = (*fImQ)(3,0);\r | |
7436 | \r | |
7437 | // reduced correlations are stored in fDiffFlowCorrelationsPro[0=RP,1=POI][0=pt,1=eta][correlation index]. Correlation index runs as follows:\r | |
7438 | // \r | |
7439 | // 0: <<2'>>\r | |
7440 | // 1: <<4'>>\r | |
7441 | // 2: <<6'>>\r | |
7442 | // 3: <<8'>>\r | |
7443 | \r | |
7444 | Int_t t = -1; // type flag \r | |
7445 | Int_t pe = -1; // ptEta flag\r | |
7446 | \r | |
7447 | if(type == "RP")\r | |
7448 | {\r | |
7449 | t = 0;\r | |
7450 | } else if(type == "POI")\r | |
7451 | {\r | |
7452 | t = 1;\r | |
7453 | }\r | |
7454 | \r | |
7455 | if(ptOrEta == "Pt")\r | |
7456 | {\r | |
7457 | pe = 0;\r | |
7458 | } else if(ptOrEta == "Eta")\r | |
7459 | {\r | |
7460 | pe = 1;\r | |
7461 | }\r | |
7462 | \r | |
7463 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta};\r | |
7464 | Double_t minPtEta[2] = {fPtMin,fEtaMin};\r | |
7465 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax};\r | |
7466 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth};\r | |
7467 | \r | |
7468 | // looping over all bins and calculating reduced correlations: \r | |
7469 | for(Int_t b=1;b<=nBinsPtEta[pe];b++)\r | |
7470 | {\r | |
7471 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): \r | |
7472 | Double_t p1n0kRe = 0.;\r | |
7473 | Double_t p1n0kIm = 0.;\r | |
7474 | \r | |
7475 | // number of POIs in particular pt or eta bin:\r | |
7476 | Double_t mp = 0.;\r | |
7477 | \r | |
7478 | // real and imaginary parts of q_{m*n,0} (non-weighted Q-vector evaluated for particles which are both RPs and POIs in particular pt or eta bin):\r | |
7479 | Double_t q1n0kRe = 0.;\r | |
7480 | Double_t q1n0kIm = 0.;\r | |
7481 | Double_t q2n0kRe = 0.;\r | |
7482 | Double_t q2n0kIm = 0.;\r | |
7483 | \r | |
7484 | // number of particles which are both RPs and POIs in particular pt or eta bin:\r | |
7485 | Double_t mq = 0.;\r | |
7486 | \r | |
7487 | // q_{m*n,0}:\r | |
7488 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b))\r | |
7489 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b));\r | |
7490 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b))\r | |
7491 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b));\r | |
7492 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b))\r | |
7493 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b));\r | |
7494 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b))\r | |
7495 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); \r | |
7496 | \r | |
7497 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here)\r | |
7498 | \r | |
7499 | if(type == "POI")\r | |
7500 | {\r | |
7501 | // p_{m*n,0}:\r | |
7502 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b))\r | |
7503 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b));\r | |
7504 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) \r | |
7505 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b));\r | |
7506 | \r | |
7507 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here)\r | |
7508 | \r | |
7509 | t = 1; // typeFlag = RP or POI\r | |
7510 | }\r | |
7511 | else if(type == "RP")\r | |
7512 | {\r | |
7513 | // p_{m*n,0} = q_{m*n,0}:\r | |
7514 | p1n0kRe = q1n0kRe; \r | |
7515 | p1n0kIm = q1n0kIm; \r | |
7516 | mp = mq; \r | |
7517 | \r | |
7518 | t = 0; // typeFlag = RP or POI\r | |
7519 | }\r | |
7520 | \r | |
7521 | // 2'-particle correlation for particular (pt,eta) bin:\r | |
7522 | Double_t two1n1nPtEta = 0.;\r | |
7523 | if(mp*dMult-mq)\r | |
7524 | {\r | |
7525 | two1n1nPtEta = (p1n0kRe*dReQ1n+p1n0kIm*dImQ1n-mq)\r | |
7526 | / (mp*dMult-mq);\r | |
7527 | \r | |
7528 | if(type == "POI")\r | |
7529 | { \r | |
7530 | // fill profile to get <<2'>> for POIs\r | |
7531 | fDiffFlowCorrelationsPro[1][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nPtEta,mp*dMult-mq);\r | |
7532 | // histogram to store <2'> for POIs e-b-e (needed in some other methods):\r | |
7533 | fDiffFlowCorrelationsEBE[1][pe][0]->SetBinContent(b,two1n1nPtEta); \r | |
7534 | }\r | |
7535 | else if(type == "RP")\r | |
7536 | {\r | |
7537 | // profile to get <<2'>> for RPs:\r | |
7538 | fDiffFlowCorrelationsPro[0][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nPtEta,mp*dMult-mq);\r | |
7539 | // histogram to store <2'> for RPs e-b-e (needed in some other methods):\r | |
7540 | fDiffFlowCorrelationsEBE[0][pe][0]->SetBinContent(b,two1n1nPtEta); \r | |
7541 | }\r | |
7542 | } // end of if(mp*dMult-mq)\r | |
7543 | \r | |
7544 | // 4'-particle correlation:\r | |
7545 | Double_t four1n1n1n1nPtEta = 0.;\r | |
7546 | if((mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
7547 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) // to be improved (introduce a new variable for this expression)\r | |
7548 | {\r | |
7549 | four1n1n1n1nPtEta = ((pow(dReQ1n,2.)+pow(dImQ1n,2.))*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n)\r | |
7550 | - q2n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.))\r | |
7551 | - 2.*q2n0kIm*dReQ1n*dImQ1n\r | |
7552 | - p1n0kRe*(dReQ1n*dReQ2n+dImQ1n*dImQ2n)\r | |
7553 | + p1n0kIm*(dImQ1n*dReQ2n-dReQ1n*dImQ2n)\r | |
7554 | - 2.*dMult*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n)\r | |
7555 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*mq \r | |
7556 | + 6.*(q1n0kRe*dReQ1n+q1n0kIm*dImQ1n) \r | |
7557 | + 1.*(q2n0kRe*dReQ2n+q2n0kIm*dImQ2n) \r | |
7558 | + 2.*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) \r | |
7559 | + 2.*mq*dMult \r | |
7560 | - 6.*mq) \r | |
7561 | / ((mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
7562 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
7563 | \r | |
7564 | if(type == "POI")\r | |
7565 | {\r | |
7566 | // profile to get <<4'>> for POIs:\r | |
7567 | fDiffFlowCorrelationsPro[1][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nPtEta,\r | |
7568 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
7569 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
7570 | // histogram to store <4'> for POIs e-b-e (needed in some other methods):\r | |
7571 | fDiffFlowCorrelationsEBE[1][pe][1]->SetBinContent(b,four1n1n1n1nPtEta); \r | |
7572 | }\r | |
7573 | else if(type == "RP")\r | |
7574 | {\r | |
7575 | // profile to get <<4'>> for RPs:\r | |
7576 | fDiffFlowCorrelationsPro[0][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nPtEta,\r | |
7577 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
7578 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); \r | |
7579 | // histogram to store <4'> for RPs e-b-e (needed in some other methods):\r | |
7580 | fDiffFlowCorrelationsEBE[0][pe][1]->SetBinContent(b,four1n1n1n1nPtEta); \r | |
7581 | }\r | |
7582 | } // end of if((mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
7583 | // +mq*(dMult-1.)*(dMult-2.)*(dMult-3.))\r | |
7584 | \r | |
7585 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++)\r | |
7586 | \r | |
7587 | \r | |
7588 | } // end of void AliFlowAnalysisWithQCumulants::CalculateReducedCorrelations1D(TString type, TString ptOrEta);\r | |
7589 | \r | |
7590 | \r | |
7591 | //================================================================================================================================\r | |
7592 | \r | |
7593 | \r | |
7594 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfEventWeights(TString type, TString ptOrEta)\r | |
7595 | {\r | |
7596 | // Calculate sums of various event weights for reduced correlations. \r | |
7597 | // (These quantitites are needed in expressions for unbiased estimators relevant for the statistical errors.)\r | |
7598 | \r | |
7599 | Int_t typeFlag = -1;\r | |
7600 | Int_t ptEtaFlag = -1;\r | |
7601 | \r | |
7602 | if(type == "RP")\r | |
7603 | {\r | |
7604 | typeFlag = 0;\r | |
7605 | } else if(type == "POI")\r | |
7606 | {\r | |
7607 | typeFlag = 1;\r | |
7608 | } \r | |
7609 | \r | |
7610 | if(ptOrEta == "Pt")\r | |
7611 | {\r | |
7612 | ptEtaFlag = 0;\r | |
7613 | } else if(ptOrEta == "Eta")\r | |
7614 | {\r | |
7615 | ptEtaFlag = 1;\r | |
7616 | } \r | |
7617 | \r | |
7618 | // shortcuts:\r | |
7619 | Int_t t = typeFlag;\r | |
7620 | Int_t pe = ptEtaFlag;\r | |
7621 | \r | |
7622 | // binning:\r | |
7623 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta};\r | |
7624 | Double_t minPtEta[2] = {fPtMin,fEtaMin};\r | |
7625 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax};\r | |
7626 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth};\r | |
7627 | \r | |
7628 | for(Int_t rpq=0;rpq<3;rpq++)\r | |
7629 | {\r | |
7630 | for(Int_t m=0;m<4;m++)\r | |
7631 | {\r | |
7632 | for(Int_t k=0;k<9;k++)\r | |
7633 | {\r | |
7634 | if(!fReRPQ1dEBE[rpq][pe][m][k])\r | |
7635 | {\r | |
7636 | cout<<"WARNING: fReRPQ1dEBE[rpq][pe][m][k] is NULL in AFAWQC::CSAPOEWFDF() !!!!"<<endl;\r | |
7637 | cout<<"pe = "<<pe<<endl;\r | |
7638 | cout<<"rpq = "<<rpq<<endl;\r | |
7639 | cout<<"m = "<<m<<endl;\r | |
7640 | cout<<"k = "<<k<<endl;\r | |
7641 | exit(0); \r | |
7642 | }\r | |
7643 | }\r | |
7644 | }\r | |
7645 | } \r | |
7646 | \r | |
7647 | // multiplicities:\r | |
7648 | Double_t dMult = (*fSMpk)(0,0); // total event multiplicity\r | |
7649 | Double_t mr = 0.; // number of RPs in particular pt or eta bin\r | |
7650 | Double_t mp = 0.; // number of POIs in particular pt or eta bin \r | |
7651 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin\r | |
7652 | \r | |
7653 | // event weights for reduced correlations:\r | |
7654 | Double_t dw2 = 0.; // event weight for <2'>\r | |
7655 | Double_t dw4 = 0.; // event weight for <4'>\r | |
7656 | //Double_t dw6 = 0.; // event weight for <6'>\r | |
7657 | //Double_t dw8 = 0.; // event weight for <8'>\r | |
7658 | \r | |
7659 | // looping over bins:\r | |
7660 | for(Int_t b=1;b<=nBinsPtEta[pe];b++)\r | |
7661 | {\r | |
7662 | if(type == "RP")\r | |
7663 | {\r | |
7664 | mr = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b);\r | |
7665 | mp = mr; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow\r | |
7666 | mq = mr; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow\r | |
7667 | } else if(type == "POI")\r | |
7668 | {\r | |
7669 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b);\r | |
7670 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); \r | |
7671 | }\r | |
7672 | \r | |
7673 | // event weight for <2'>:\r | |
7674 | dw2 = mp*dMult-mq; \r | |
7675 | fDiffFlowSumOfEventWeights[t][pe][0][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2);\r | |
7676 | fDiffFlowSumOfEventWeights[t][pe][1][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw2,2.));\r | |
7677 | \r | |
7678 | // event weight for <4'>:\r | |
7679 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
7680 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); \r | |
7681 | fDiffFlowSumOfEventWeights[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4);\r | |
7682 | fDiffFlowSumOfEventWeights[t][pe][1][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw4,2.));\r | |
7683 | \r | |
7684 | // event weight for <6'>:\r | |
7685 | //dw6 = ...; \r | |
7686 | //fDiffFlowSumOfEventWeights[t][pe][0][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6);\r | |
7687 | //fDiffFlowSumOfEventWeights[t][pe][t][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw6,2.));\r | |
7688 | \r | |
7689 | // event weight for <8'>:\r | |
7690 | //dw8 = ...; \r | |
7691 | //fDiffFlowSumOfEventWeights[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw8);\r | |
7692 | //fDiffFlowSumOfEventWeights[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw8,2.)); \r | |
7693 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) \r | |
7694 | \r | |
7695 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfEventWeights()\r | |
7696 | \r | |
7697 | \r | |
7698 | //================================================================================================================================\r | |
7699 | \r | |
7700 | \r | |
7701 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta)\r | |
7702 | {\r | |
7703 | // Calculate sum of products of various event weights for both types of correlations (the ones for int. and diff. flow). \r | |
7704 | // (These quantitites are needed in expressions for unbiased estimators relevant for the statistical errors.)\r | |
7705 | //\r | |
7706 | // Important: To fill fDiffFlowSumOfProductOfEventWeights[][][][] use bellow table (i,j) with following constraints: \r | |
7707 | // 1.) i<j \r | |
7708 | // 2.) do not store terms which DO NOT include reduced correlations;\r | |
7709 | // Table:\r | |
7710 | // [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>] x [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>]\r | |
7711 | \r | |
7712 | Int_t typeFlag = -1;\r | |
7713 | Int_t ptEtaFlag = -1;\r | |
7714 | \r | |
7715 | if(type == "RP")\r | |
7716 | {\r | |
7717 | typeFlag = 0;\r | |
7718 | } else if(type == "POI")\r | |
7719 | {\r | |
7720 | typeFlag = 1;\r | |
7721 | } \r | |
7722 | \r | |
7723 | if(ptOrEta == "Pt")\r | |
7724 | {\r | |
7725 | ptEtaFlag = 0;\r | |
7726 | } else if(ptOrEta == "Eta")\r | |
7727 | {\r | |
7728 | ptEtaFlag = 1;\r | |
7729 | } \r | |
7730 | \r | |
7731 | // shortcuts:\r | |
7732 | Int_t t = typeFlag;\r | |
7733 | Int_t pe = ptEtaFlag;\r | |
7734 | \r | |
7735 | // binning:\r | |
7736 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta};\r | |
7737 | Double_t minPtEta[2] = {fPtMin,fEtaMin};\r | |
7738 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax};\r | |
7739 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth};\r | |
7740 | \r | |
7741 | // protection:\r | |
7742 | for(Int_t rpq=0;rpq<3;rpq++)\r | |
7743 | {\r | |
7744 | for(Int_t m=0;m<4;m++)\r | |
7745 | {\r | |
7746 | for(Int_t k=0;k<9;k++)\r | |
7747 | {\r | |
7748 | if(!fReRPQ1dEBE[rpq][pe][m][k])\r | |
7749 | {\r | |
7750 | cout<<"WARNING: fReRPQ1dEBE[rpq][pe][m][k] is NULL in AFAWQC::CSAPOEWFDF() !!!!"<<endl;\r | |
7751 | cout<<"pe = "<<pe<<endl;\r | |
7752 | cout<<"rpq = "<<rpq<<endl;\r | |
7753 | cout<<"m = "<<m<<endl;\r | |
7754 | cout<<"k = "<<k<<endl;\r | |
7755 | exit(0); \r | |
7756 | }\r | |
7757 | }\r | |
7758 | }\r | |
7759 | } \r | |
7760 | \r | |
7761 | // multiplicities:\r | |
7762 | Double_t dMult = (*fSMpk)(0,0); // total event multiplicity\r | |
7763 | Double_t mr = 0.; // number of RPs in particular pt or eta bin\r | |
7764 | Double_t mp = 0.; // number of POIs in particular pt or eta bin \r | |
7765 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin\r | |
7766 | \r | |
7767 | // event weights for correlations:\r | |
7768 | Double_t dW2 = dMult*(dMult-1); // event weight for <2> \r | |
7769 | Double_t dW4 = dMult*(dMult-1)*(dMult-2)*(dMult-3); // event weight for <4> \r | |
7770 | Double_t dW6 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5); // event weight for <6> \r | |
7771 | Double_t dW8 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7); // event weight for <8> \r | |
7772 | \r | |
7773 | // event weights for reduced correlations:\r | |
7774 | Double_t dw2 = 0.; // event weight for <2'>\r | |
7775 | Double_t dw4 = 0.; // event weight for <4'>\r | |
7776 | //Double_t dw6 = 0.; // event weight for <6'>\r | |
7777 | //Double_t dw8 = 0.; // event weight for <8'>\r | |
7778 | \r | |
7779 | // looping over bins:\r | |
7780 | for(Int_t b=1;b<=nBinsPtEta[pe];b++)\r | |
7781 | {\r | |
7782 | if(type == "RP")\r | |
7783 | {\r | |
7784 | mr = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b);\r | |
7785 | mp = mr; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow\r | |
7786 | mq = mr; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow\r | |
7787 | } else if(type == "POI")\r | |
7788 | {\r | |
7789 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b);\r | |
7790 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); \r | |
7791 | }\r | |
7792 | \r | |
7793 | // event weight for <2'>:\r | |
7794 | dw2 = mp*dMult-mq; \r | |
7795 | fDiffFlowSumOfProductOfEventWeights[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw2); // storing product of even weights for <2> and <2'>\r | |
7796 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW4); // storing product of even weights for <4> and <2'>\r | |
7797 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW6); // storing product of even weights for <6> and <2'>\r | |
7798 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW8); // storing product of even weights for <8> and <2'>\r | |
7799 | \r | |
7800 | // event weight for <4'>:\r | |
7801 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
7802 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); \r | |
7803 | fDiffFlowSumOfProductOfEventWeights[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw4); // storing product of even weights for <2> and <4'>\r | |
7804 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw4); // storing product of even weights for <2'> and <4'>\r | |
7805 | fDiffFlowSumOfProductOfEventWeights[t][pe][2][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw4); // storing product of even weights for <4> and <4'>\r | |
7806 | fDiffFlowSumOfProductOfEventWeights[t][pe][3][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dW6); // storing product of even weights for <6> and <4'> \r | |
7807 | fDiffFlowSumOfProductOfEventWeights[t][pe][3][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dW8); // storing product of even weights for <8> and <4'>\r | |
7808 | \r | |
7809 | // event weight for <6'>:\r | |
7810 | //dw6 = ...; \r | |
7811 | //fDiffFlowSumOfProductOfEventWeights[t][pe][0][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw6); // storing product of even weights for <2> and <6'>\r | |
7812 | //fDiffFlowSumOfProductOfEventWeights[t][pe][1][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw6); // storing product of even weights for <2'> and <6'>\r | |
7813 | //fDiffFlowSumOfProductOfEventWeights[t][pe][2][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw6); // storing product of even weights for <4> and <6'>\r | |
7814 | //fDiffFlowSumOfProductOfEventWeights[t][pe][3][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dw6); // storing product of even weights for <4'> and <6'> \r | |
7815 | //fDiffFlowSumOfProductOfEventWeights[t][pe][4][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW6*dw6); // storing product of even weights for <6> and <6'>\r | |
7816 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dW8); // storing product of even weights for <6'> and <8>\r | |
7817 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dw8); // storing product of even weights for <6'> and <8'>\r | |
7818 | \r | |
7819 | // event weight for <8'>:\r | |
7820 | //dw8 = ...; \r | |
7821 | //fDiffFlowSumOfProductOfEventWeights[t][pe][0][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw8); // storing product of even weights for <2> and <8'>\r | |
7822 | //fDiffFlowSumOfProductOfEventWeights[t][pe][1][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw8); // storing product of even weights for <2'> and <8'>\r | |
7823 | //fDiffFlowSumOfProductOfEventWeights[t][pe][2][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw8); // storing product of even weights for <4> and <8'>\r | |
7824 | //fDiffFlowSumOfProductOfEventWeights[t][pe][3][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dw8); // storing product of even weights for <4'> and <8'> \r | |
7825 | //fDiffFlowSumOfProductOfEventWeights[t][pe][4][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW6*dw8); // storing product of even weights for <6> and <8'>\r | |
7826 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dw8); // storing product of even weights for <6'> and <8'>\r | |
7827 | //fDiffFlowSumOfProductOfEventWeights[t][pe][6][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW8*dw8); // storing product of even weights for <8> and <8'>\r | |
7828 | \r | |
7829 | // Table:\r | |
7830 | // [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>] x [0=<2>,1=<2'>,2=<4>,3=<4'>,4=<6>,5=<6'>,6=<8>,7=<8'>]\r | |
7831 | \r | |
7832 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++)\r | |
7833 | \r | |
7834 | \r | |
7835 | \r | |
7836 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta)\r | |
7837 | \r | |
7838 | \r | |
7839 | //================================================================================================================================\r | |
7840 | \r | |
7841 | \r | |
7842 | void AliFlowAnalysisWithQCumulants::FinalizeReducedCorrelations(TString type, TString ptOrEta)\r | |
7843 | {\r | |
7844 | // Transfer profiles into histograms and calculate statistical errors correctly.\r | |
7845 | \r | |
7846 | Int_t typeFlag = -1;\r | |
7847 | Int_t ptEtaFlag = -1;\r | |
7848 | \r | |
7849 | if(type == "RP")\r | |
7850 | {\r | |
7851 | typeFlag = 0;\r | |
7852 | } else if(type == "POI")\r | |
7853 | {\r | |
7854 | typeFlag = 1;\r | |
7855 | } \r | |
7856 | \r | |
7857 | if(ptOrEta == "Pt")\r | |
7858 | {\r | |
7859 | ptEtaFlag = 0;\r | |
7860 | } else if(ptOrEta == "Eta")\r | |
7861 | {\r | |
7862 | ptEtaFlag = 1;\r | |
7863 | } \r | |
7864 | \r | |
7865 | // shortcuts:\r | |
7866 | Int_t t = typeFlag;\r | |
7867 | Int_t pe = ptEtaFlag;\r | |
7868 | \r | |
7869 | for(Int_t rci=0;rci<4;rci++)\r | |
7870 | {\r | |
7871 | if(!fDiffFlowCorrelationsPro[t][pe][rci])\r | |
7872 | {\r | |
7873 | cout<<"WARNING: fDiffFlowCorrelationsPro[t][pe][rci] is NULL in AFAWQC::FRC() !!!!"<<endl;\r | |
7874 | cout<<"t = "<<t<<endl; \r | |
7875 | cout<<"pe = "<<pe<<endl; \r | |
7876 | cout<<"rci = "<<rci<<endl;\r | |
7877 | exit(0); \r | |
7878 | }\r | |
7879 | for(Int_t power=0;power<2;power++)\r | |
7880 | {\r | |
7881 | if(!fDiffFlowSumOfEventWeights[t][pe][power][rci])\r | |
7882 | {\r | |
7883 | cout<<"WARNING: fDiffFlowSumOfEventWeights[t][pe][power][rci] is NULL in AFAWQC::FRC() !!!!"<<endl;\r | |
7884 | cout<<"t = "<<t<<endl; \r | |
7885 | cout<<"pe = "<<pe<<endl;\r | |
7886 | cout<<"power = "<<power<<endl; \r | |
7887 | cout<<"rci = "<<rci<<endl;\r | |
7888 | exit(0); \r | |
7889 | } \r | |
7890 | } // end of for(Int_t power=0;power<2;power++)\r | |
7891 | } // end of for(Int_t rci=0;rci<4;rci++)\r | |
7892 | \r | |
7893 | // common:\r | |
7894 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta};\r | |
7895 | \r | |
7896 | // transfer 1D profile into 1D histogram:\r | |
7897 | Double_t correlation = 0.;\r | |
7898 | Double_t spread = 0.;\r | |
7899 | Double_t sumOfWeights = 0.; // sum of weights for particular reduced correlations for particular pt or eta bin\r | |
7900 | Double_t sumOfSquaredWeights = 0.; // sum of squared weights for particular reduced correlations for particular pt or eta bin\r | |
7901 | Double_t error = 0.; // error = termA * spread * termB\r | |
7902 | // termA = (sqrt(sumOfSquaredWeights)/sumOfWeights) \r | |
7903 | // termB = 1/pow(1-termA^2,0.5)\r | |
7904 | Double_t termA = 0.; \r | |
7905 | Double_t termB = 0.; \r | |
7906 | for(Int_t rci=0;rci<4;rci++) // index of reduced correlation\r | |
7907 | {\r | |
7908 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) // number of pt or eta bins\r | |
7909 | {\r | |
7910 | correlation = fDiffFlowCorrelationsPro[t][pe][rci]->GetBinContent(b); \r | |
7911 | spread = fDiffFlowCorrelationsPro[t][pe][rci]->GetBinError(b);\r | |
7912 | sumOfWeights = fDiffFlowSumOfEventWeights[t][pe][0][rci]->GetBinContent(b);\r | |
7913 | sumOfSquaredWeights = fDiffFlowSumOfEventWeights[t][pe][1][rci]->GetBinContent(b);\r | |
7914 | if(sumOfWeights) termA = (pow(sumOfSquaredWeights,0.5)/sumOfWeights);\r | |
7915 | if(1.-pow(termA,2.)>0.) termB = 1./pow(1.-pow(termA,2.),0.5); \r | |
7916 | error = termA*spread*termB; // final error (unbiased estimator for standard deviation)\r | |
7917 | fDiffFlowCorrelationsHist[t][pe][rci]->SetBinContent(b,correlation); \r | |
7918 | fDiffFlowCorrelationsHist[t][pe][rci]->SetBinError(b,error); \r | |
7919 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++)\r | |
7920 | } // end of for(Int_t rci=0;rci<4;rci++)\r | |
7921 | \r | |
7922 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeReducedCorrelations(TString type, TString ptOrEta)\r | |
7923 | \r | |
7924 | \r | |
7925 | //================================================================================================================================\r | |
7926 | \r | |
7927 | \r | |
7928 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta)\r | |
7929 | {\r | |
7930 | // store products: <2><2'>, <2><4'>, <2><6'>, <2><8'>, <2'><4>, \r | |
7931 | // <2'><4'>, <2'><6>, <2'><6'>, <2'><8>, <2'><8'>,\r | |
7932 | // <4><4'>, <4><6'>, <4><8'>, <4'><6>, <4'><6'>, \r | |
7933 | // <4'><8>, <4'><8'>, <6><6'>, <6><8'>, <6'><8>, \r | |
7934 | // <6'><8'>, <8><8'>.\r | |
7935 | \r | |
7936 | Int_t typeFlag = -1;\r | |
7937 | Int_t ptEtaFlag = -1;\r | |
7938 | \r | |
7939 | if(type == "RP")\r | |
7940 | {\r | |
7941 | typeFlag = 0;\r | |
7942 | } else if(type == "POI")\r | |
7943 | {\r | |
7944 | typeFlag = 1;\r | |
7945 | } \r | |
7946 | \r | |
7947 | if(ptOrEta == "Pt")\r | |
7948 | {\r | |
7949 | ptEtaFlag = 0;\r | |
7950 | } else if(ptOrEta == "Eta")\r | |
7951 | {\r | |
7952 | ptEtaFlag = 1;\r | |
7953 | } \r | |
7954 | \r | |
7955 | // shortcuts:\r | |
7956 | Int_t t = typeFlag;\r | |
7957 | Int_t pe = ptEtaFlag;\r | |
7958 | \r | |
7959 | // common:\r | |
7960 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta};\r | |
7961 | Double_t minPtEta[2] = {fPtMin,fEtaMin};\r | |
7962 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth};\r | |
7963 | \r | |
7964 | // protections // to be improved (add protection for all pointers in this method)\r | |
7965 | if(!fIntFlowCorrelationsEBE)\r | |
7966 | {\r | |
7967 | cout<<"WARNING: fIntFlowCorrelationsEBE is NULL in AFAWQC::CDFPOC() !!!!"<<endl;\r | |
7968 | exit(0);\r | |
7969 | } \r | |
7970 | \r | |
7971 | Double_t dMult = (*fSMpk)(0,0); // multiplicity (number of particles used to determine the reaction plane)\r | |
7972 | Double_t mr = 0.; // number of RPs in particular pt or eta bin\r | |
7973 | Double_t mp = 0.; // number of POIs in particular pt or eta bin \r | |
7974 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin\r | |
7975 | \r | |
7976 | // e-b-e correlations:\r | |
7977 | Double_t twoEBE = 0.; // <2>\r | |
7978 | Double_t fourEBE = 0.; // <4>\r | |
7979 | Double_t sixEBE = 0.; // <6>\r | |
7980 | Double_t eightEBE = 0.; // <8>\r | |
7981 | \r | |
7982 | if(dMult>1)\r | |
7983 | { \r | |
7984 | twoEBE = fIntFlowCorrelationsEBE->GetBinContent(1);\r | |
7985 | if(dMult>3)\r | |
7986 | {\r | |
7987 | fourEBE = fIntFlowCorrelationsEBE->GetBinContent(2);\r | |
7988 | if(dMult>5) \r | |
7989 | {\r | |
7990 | sixEBE = fIntFlowCorrelationsEBE->GetBinContent(3);\r | |
7991 | if(dMult>7) \r | |
7992 | { \r | |
7993 | eightEBE = fIntFlowCorrelationsEBE->GetBinContent(4);\r | |
7994 | }\r | |
7995 | }\r | |
7996 | }\r | |
7997 | } \r | |
7998 | \r | |
7999 | // event weights for correlations:\r | |
8000 | Double_t dW2 = dMult*(dMult-1); // event weight for <2> \r | |
8001 | Double_t dW4 = dMult*(dMult-1)*(dMult-2)*(dMult-3); // event weight for <4> \r | |
8002 | Double_t dW6 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5); // event weight for <6> \r | |
8003 | Double_t dW8 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7); // event weight for <8> \r | |
8004 | \r | |
8005 | // e-b-e reduced correlations:\r | |
8006 | Double_t twoReducedEBE = 0.; // <2'>\r | |
8007 | Double_t fourReducedEBE = 0.; // <4'>\r | |
8008 | Double_t sixReducedEBE = 0.; // <6'>\r | |
8009 | Double_t eightReducedEBE = 0.; // <8'> \r | |
8010 | \r | |
8011 | // event weights for reduced correlations:\r | |
8012 | Double_t dw2 = 0.; // event weight for <2'>\r | |
8013 | Double_t dw4 = 0.; // event weight for <4'>\r | |
8014 | //Double_t dw6 = 0.; // event weight for <6'>\r | |
8015 | //Double_t dw8 = 0.; // event weight for <8'>\r | |
8016 | \r | |
8017 | // looping over bins:\r | |
8018 | for(Int_t b=1;b<=nBinsPtEta[pe];b++)\r | |
8019 | {\r | |
8020 | // e-b-e reduced correlations:\r | |
8021 | twoReducedEBE = fDiffFlowCorrelationsEBE[t][pe][0]->GetBinContent(b);\r | |
8022 | fourReducedEBE = fDiffFlowCorrelationsEBE[t][pe][1]->GetBinContent(b);\r | |
8023 | sixReducedEBE = fDiffFlowCorrelationsEBE[t][pe][2]->GetBinContent(b);\r | |
8024 | eightReducedEBE = fDiffFlowCorrelationsEBE[t][pe][3]->GetBinContent(b);\r | |
8025 | \r | |
8026 | // to be improved (I should not do this here again)\r | |
8027 | if(type == "RP")\r | |
8028 | {\r | |
8029 | mr = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b);\r | |
8030 | mp = mr; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow\r | |
8031 | mq = mr; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow\r | |
8032 | } else if(type == "POI")\r | |
8033 | {\r | |
8034 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b);\r | |
8035 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); \r | |
8036 | }\r | |
8037 | \r | |
8038 | // event weights for reduced correlations:\r | |
8039 | dw2 = mp*dMult-mq; // weight for <2'> \r | |
8040 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.)\r | |
8041 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); // weight for <4'>\r | |
8042 | //dw6 = ... \r | |
8043 | //dw8 = ... \r | |
8044 | \r | |
8045 | // storing all products:\r | |
8046 | fDiffFlowProductOfCorrelationsPro[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*twoReducedEBE,dW2*dw2); // storing <2><2'>\r | |
8047 | fDiffFlowProductOfCorrelationsPro[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*twoReducedEBE,dW4*dw2); // storing <4><2'>\r | |
8048 | fDiffFlowProductOfCorrelationsPro[t][pe][1][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*twoReducedEBE,dW6*dw2); // storing <6><2'>\r | |
8049 | fDiffFlowProductOfCorrelationsPro[t][pe][1][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*twoReducedEBE,dW8*dw2); // storing <8><2'>\r | |
8050 | \r | |
8051 | // event weight for <4'>:\r | |
8052 | fDiffFlowProductOfCorrelationsPro[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*fourReducedEBE,dW2*dw4); // storing <2><4'>\r | |
8053 | fDiffFlowProductOfCorrelationsPro[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*fourReducedEBE,dw2*dw4); // storing <2'><4'>\r | |
8054 | fDiffFlowProductOfCorrelationsPro[t][pe][2][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*fourReducedEBE,dW4*dw4); // storing <4><4'>\r | |
8055 | fDiffFlowProductOfCorrelationsPro[t][pe][3][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*fourReducedEBE,dW6*dw4); // storing <6><4'> \r | |
8056 | fDiffFlowProductOfCorrelationsPro[t][pe][3][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*fourReducedEBE,dW8*dw4); // storing <8><4'>\r | |
8057 | \r | |
8058 | // event weight for <6'>:\r | |
8059 | //dw6 = ...; \r | |
8060 | //fDiffFlowProductOfCorrelationsPro[t][pe][0][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*sixReducedEBE,dW2*dw6); // storing <2><6'>\r | |
8061 | //fDiffFlowProductOfCorrelationsPro[t][pe][1][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*sixReducedEBE,dw2*dw6); // storing <2'><6'>\r | |
8062 | //fDiffFlowProductOfCorrelationsPro[t][pe][2][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*sixReducedEBE,dW4*dw6); // storing <4><6'>\r | |
8063 | //fDiffFlowProductOfCorrelationsPro[t][pe][3][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourReducedEBE*sixReducedEBE,dw4*dw6); // storing <4'><6'> \r | |
8064 | //fDiffFlowProductOfCorrelationsPro[t][pe][4][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*sixReducedEBE,dW6*dw6); // storing <6><6'>\r | |
8065 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightEBE,dw6*dW8); // storing <6'><8>\r | |
8066 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightReducedEBE,dw6*dw8); // storing <6'><8'>\r | |
8067 | \r | |
8068 | // event weight for <8'>:\r | |
8069 | //dw8 = ...; \r | |
8070 | //fDiffFlowProductOfCorrelationsPro[t][pe][0][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*eightReducedEBE,dW2*dw8); // storing <2><8'>\r | |
8071 | //fDiffFlowProductOfCorrelationsPro[t][pe][1][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*eightReducedEBE,dw2*dw8); // storing <2'><8'>\r | |
8072 | //fDiffFlowProductOfCorrelationsPro[t][pe][2][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*eightReducedEBE,dW4*dw8); // storing <4><8'>\r | |
8073 | //fDiffFlowProductOfCorrelationsPro[t][pe][3][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourReducedEBE*eightReducedEBE,dw4*dw8); // storing <4'><8'> \r | |
8074 | //fDiffFlowProductOfCorrelationsPro[t][pe][4][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*eightReducedEBE,dW6*dw8); // storing <6><8'>\r | |
8075 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightReducedEBE,dw6*dw8); // storing <6'><8'>\r | |
8076 | //fDiffFlowProductOfCorrelationsPro[t][pe][6][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*eightReducedEBE,dW8*dw8); // storing <8><8'> \r | |
8077 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++ \r | |
8078 | \r | |
8079 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta)\r | |
8080 | \r | |
8081 | \r | |
8082 | //================================================================================================================================\r | |
8083 | \r | |
8084 | \r | |
8085 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCovariances(TString type, TString ptOrEta) // to be improved (reimplemented)\r | |
8086 | {\r | |
8087 | // a) Calculate unbiased estimators Cov(<2>,<2'>), Cov(<2>,<4'>), Cov(<4>,<2'>), Cov(<4>,<4'>) and Cov(<2'>,<4'>)\r | |
8088 | // for covariances V(<2>,<2'>), V(<2>,<4'>), V(<4>,<2'>), V(<4>,<4'>) and V(<2'>,<4'>). \r | |
8089 | // b) Store in histogram fDiffFlowCovariances[t][pe][index] for instance the following: \r | |
8090 | //\r | |
8091 | // Cov(<2>,<2'>) * (sum_{i=1}^{N} w_{<2>}_i w_{<2'>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<2'>}_j)]\r | |
8092 | // \r | |
8093 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<2'>} is event weight for <2'>.\r | |
8094 | // c) Binning of fDiffFlowCovariances[t][pe][index] is organized as follows:\r | |
8095 | // \r | |
8096 | // 1st bin: Cov(<2>,<2'>) * (sum_{i=1}^{N} w_{<2>}_i w_{<2'>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<2'>}_j)] \r | |
8097 | // 2nd bin: Cov(<2>,<4'>) * (sum_{i=1}^{N} w_{<2>}_i w_{<4'>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<4'>}_j)] \r | |
8098 | // 3rd bin: Cov(<4>,<2'>) * (sum_{i=1}^{N} w_{<4>}_i w_{<2'>}_i )/[(sum_{i=1}^{N} w_{<4>}_i) * (sum_{j=1}^{N} w_{<2'>}_j)] \r | |
8099 | // 4th bin: Cov(<4>,<4'>) * (sum_{i=1}^{N} w_{<4>}_i w_{<4'>}_i )/[(sum_{i=1}^{N} w_{<4>}_i) * (sum_{j=1}^{N} w_{<4'>}_j)] \r | |
8100 | // 5th bin: Cov(<2'>,<4'>) * (sum_{i=1}^{N} w_{<2'>}_i w_{<4'>}_i )/[(sum_{i=1}^{N} w_{<2'>}_i) * (sum_{j=1}^{N} w_{<4'>}_j)] \r | |
8101 | // ...\r | |
8102 | \r | |
8103 | Int_t typeFlag = -1;\r | |
8104 | Int_t ptEtaFlag = -1;\r | |
8105 | \r | |
8106 | if(type == "RP")\r | |
8107 | {\r | |
8108 | typeFlag = 0;\r | |
8109 | } else if(type == "POI")\r | |
8110 | {\r | |
8111 | typeFlag = 1;\r | |
8112 | } \r | |
8113 | \r | |
8114 | if(ptOrEta == "Pt")\r | |
8115 | {\r | |
8116 | ptEtaFlag = 0;\r | |
8117 | } else if(ptOrEta == "Eta")\r | |
8118 | {\r | |
8119 | ptEtaFlag = 1;\r | |
8120 | } \r | |
8121 | \r | |
8122 | // shortcuts:\r | |
8123 | Int_t t = typeFlag;\r | |
8124 | Int_t pe = ptEtaFlag;\r | |
8125 | \r | |
8126 | // common:\r | |
8127 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta};\r | |
8128 | //Double_t minPtEta[2] = {fPtMin,fEtaMin};\r | |
8129 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax};\r | |
8130 | //Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth};\r | |
8131 | \r | |
8132 | // average correlations:\r | |
8133 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>>\r | |
8134 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>>\r | |
8135 | //Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>>\r | |
8136 | //Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>>\r | |
8137 | \r | |
8138 | // sum of weights for correlation:\r | |
8139 | Double_t sumOfWeightsForTwo = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // sum_{i=1}^{N} w_{<2>}\r | |
8140 | Double_t sumOfWeightsForFour = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // sum_{i=1}^{N} w_{<4>}\r | |
8141 | //Double_t sumOfWeightsForSix = fIntFlowSumOfEventWeights[0]->GetBinContent(3); // sum_{i=1}^{N} w_{<6>}\r | |
8142 | //Double_t sumOfWeightsForEight = fIntFlowSumOfEventWeights[0]->GetBinContent(4); // sum_{i=1}^{N} w_{<8>}\r | |
8143 | \r | |
8144 | // average reduced correlations:\r | |
8145 | Double_t twoReduced = 0.; // <<2'>> \r | |
8146 | Double_t fourReduced = 0.; // <<4'>>\r | |
8147 | //Double_t sixReduced = 0.; // <<6'>>\r | |
8148 | //Double_t eightReduced = 0.; // <<8'>>\r | |
8149 | \r | |
8150 | // sum of weights for reduced correlation:\r | |
8151 | Double_t sumOfWeightsForTwoReduced = 0.; // sum_{i=1}^{N} w_{<2'>}\r | |
8152 | Double_t sumOfWeightsForFourReduced = 0.; // sum_{i=1}^{N} w_{<4'>}\r | |
8153 | //Double_t sumOfWeightsForSixReduced = 0.; // sum_{i=1}^{N} w_{<6'>}\r | |
8154 | //Double_t sumOfWeightsForEightReduced = 0.; // sum_{i=1}^{N} w_{<8'>}\r | |
8155 | \r | |
8156 | // product of weights for reduced correlation:\r | |
8157 | Double_t productOfWeightsForTwoTwoReduced = 0.; // sum_{i=1}^{N} w_{<2>}w_{<2'>}\r | |
8158 | Double_t productOfWeightsForTwoFourReduced = 0.; // sum_{i=1}^{N} w_{<2>}w_{<4'>}\r | |
8159 | Double_t productOfWeightsForFourTwoReduced = 0.; // sum_{i=1}^{N} w_{<4>}w_{<2'>}\r | |
8160 | Double_t productOfWeightsForFourFourReduced = 0.; // sum_{i=1}^{N} w_{<4>}w_{<4'>}\r | |
8161 | Double_t productOfWeightsForTwoReducedFourReduced = 0.; // sum_{i=1}^{N} w_{<2'>}w_{<4'>}\r | |
8162 | // ...\r | |
8163 | \r | |
8164 | // products for differential flow:\r | |
8165 | Double_t twoTwoReduced = 0; // <<2><2'>> \r | |
8166 | Double_t twoFourReduced = 0; // <<2><4'>> \r | |
8167 | Double_t fourTwoReduced = 0; // <<4><2'>> \r | |
8168 | Double_t fourFourReduced = 0; // <<4><4'>> \r | |
8169 | Double_t twoReducedFourReduced = 0; // <<2'><4'>> \r | |
8170 | \r | |
8171 | // denominators in the expressions for the unbiased estimators for covariances:\r | |
8172 | // denominator = 1 - term1/(term2*term3)\r | |
8173 | // prefactor = term1/(term2*term3)\r | |
8174 | Double_t denominator = 0.; \r | |
8175 | Double_t prefactor = 0.;\r | |
8176 | Double_t term1 = 0.; \r | |
8177 | Double_t term2 = 0.; \r | |
8178 | Double_t term3 = 0.; \r | |
8179 | \r | |
8180 | // unbiased estimators for covariances for differential flow:\r | |
8181 | Double_t covTwoTwoReduced = 0.; // Cov(<2>,<2'>)\r | |
8182 | Double_t wCovTwoTwoReduced = 0.; // Cov(<2>,<2'>) * prefactor(w_{<2>},w_{<2'>})\r | |
8183 | Double_t covTwoFourReduced = 0.; // Cov(<2>,<4'>)\r | |
8184 | Double_t wCovTwoFourReduced = 0.; // Cov(<2>,<4'>) * prefactor(w_{<2>},w_{<4'>})\r | |
8185 | Double_t covFourTwoReduced = 0.; // Cov(<4>,<2'>)\r | |
8186 | Double_t wCovFourTwoReduced = 0.; // Cov(<4>,<2'>) * prefactor(w_{<4>},w_{<2'>})\r | |
8187 | Double_t covFourFourReduced = 0.; // Cov(<4>,<4'>)\r | |
8188 | Double_t wCovFourFourReduced = 0.; // Cov(<4>,<4'>) * prefactor(w_{<4>},w_{<4'>})\r | |
8189 | Double_t covTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>)\r | |
8190 | Double_t wCovTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) * prefactor(w_{<2'>},w_{<4'>})\r | |
8191 | \r | |
8192 | for(Int_t b=1;b<=nBinsPtEta[pe];b++)\r | |
8193 | {\r | |
8194 | // average reduced corelations:\r | |
8195 | twoReduced = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b);\r | |
8196 | fourReduced = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b);\r | |
8197 | // average products:\r | |
8198 | twoTwoReduced = fDiffFlowProductOfCorrelationsPro[t][pe][0][1]->GetBinContent(b);\r | |
8199 | twoFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][0][3]->GetBinContent(b);\r | |
8200 | fourTwoReduced = fDiffFlowProductOfCorrelationsPro[t][pe][1][2]->GetBinContent(b);\r | |
8201 | fourFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][2][3]->GetBinContent(b);\r | |
8202 | twoReducedFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][1][3]->GetBinContent(b); \r | |
8203 | // sum of weights for reduced correlations:\r | |
8204 | sumOfWeightsForTwoReduced = fDiffFlowSumOfEventWeights[t][pe][0][0]->GetBinContent(b);\r | |
8205 | sumOfWeightsForFourReduced = fDiffFlowSumOfEventWeights[t][pe][0][1]->GetBinContent(b);\r | |
8206 | // products of weights for correlations:\r | |
8207 | productOfWeightsForTwoTwoReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][0][1]->GetBinContent(b); \r | |
8208 | productOfWeightsForTwoFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][0][3]->GetBinContent(b);\r | |
8209 | productOfWeightsForFourTwoReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][1][2]->GetBinContent(b);\r | |
8210 | productOfWeightsForFourFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][2][3]->GetBinContent(b);\r | |
8211 | productOfWeightsForTwoReducedFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][1][3]->GetBinContent(b);\r | |
8212 | // denominator for the unbiased estimator for covariances: 1 - term1/(term2*term3) \r | |
8213 | // prefactor (multiplies Cov's) = term1/(term2*term3) \r | |
8214 | // <2>,<2'>:\r | |
8215 | term1 = productOfWeightsForTwoTwoReduced; \r | |
8216 | term2 = sumOfWeightsForTwo;\r | |
8217 | term3 = sumOfWeightsForTwoReduced; \r | |
8218 | if(term2*term3>0.)\r | |
8219 | {\r | |
8220 | denominator = 1.-term1/(term2*term3);\r | |
8221 | prefactor = term1/(term2*term3);\r | |
8222 | if(denominator!=0.)\r | |
8223 | {\r | |
8224 | covTwoTwoReduced = (twoTwoReduced-two*twoReduced)/denominator; \r | |
8225 | wCovTwoTwoReduced = covTwoTwoReduced*prefactor; \r | |
8226 | fDiffFlowCovariances[t][pe][0]->SetBinContent(b,wCovTwoTwoReduced);\r | |
8227 | }\r | |
8228 | }\r | |
8229 | // <2>,<4'>:\r | |
8230 | term1 = productOfWeightsForTwoFourReduced; \r | |
8231 | term2 = sumOfWeightsForTwo;\r | |
8232 | term3 = sumOfWeightsForFourReduced; \r | |
8233 | if(term2*term3>0.)\r | |
8234 | {\r | |
8235 | denominator = 1.-term1/(term2*term3);\r | |
8236 | prefactor = term1/(term2*term3);\r | |
8237 | if(denominator!=0.)\r | |
8238 | {\r | |
8239 | covTwoFourReduced = (twoFourReduced-two*fourReduced)/denominator; \r | |
8240 | wCovTwoFourReduced = covTwoFourReduced*prefactor; \r | |
8241 | fDiffFlowCovariances[t][pe][1]->SetBinContent(b,wCovTwoFourReduced);\r | |
8242 | }\r | |
8243 | }\r | |
8244 | // <4>,<2'>:\r | |
8245 | term1 = productOfWeightsForFourTwoReduced; \r | |
8246 | term2 = sumOfWeightsForFour;\r | |
8247 | term3 = sumOfWeightsForTwoReduced; \r | |
8248 | if(term2*term3>0.)\r | |
8249 | {\r | |
8250 | denominator = 1.-term1/(term2*term3);\r | |
8251 | prefactor = term1/(term2*term3);\r | |
8252 | if(denominator!=0.)\r | |
8253 | {\r | |
8254 | covFourTwoReduced = (fourTwoReduced-four*twoReduced)/denominator; \r | |
8255 | wCovFourTwoReduced = covFourTwoReduced*prefactor; \r | |
8256 | fDiffFlowCovariances[t][pe][2]->SetBinContent(b,wCovFourTwoReduced);\r | |
8257 | }\r | |
8258 | }\r | |
8259 | // <4>,<4'>:\r | |
8260 | term1 = productOfWeightsForFourFourReduced; \r | |
8261 | term2 = sumOfWeightsForFour;\r | |
8262 | term3 = sumOfWeightsForFourReduced; \r | |
8263 | if(term2*term3>0.)\r | |
8264 | {\r | |
8265 | denominator = 1.-term1/(term2*term3);\r | |
8266 | prefactor = term1/(term2*term3);\r | |
8267 | if(denominator!=0.)\r | |
8268 | {\r | |
8269 | covFourFourReduced = (fourFourReduced-four*fourReduced)/denominator; \r | |
8270 | wCovFourFourReduced = covFourFourReduced*prefactor; \r | |
8271 | fDiffFlowCovariances[t][pe][3]->SetBinContent(b,wCovFourFourReduced);\r | |
8272 | }\r | |
8273 | }\r | |
8274 | // <2'>,<4'>:\r | |
8275 | term1 = productOfWeightsForTwoReducedFourReduced; \r | |
8276 | term2 = sumOfWeightsForTwoReduced;\r | |
8277 | term3 = sumOfWeightsForFourReduced; \r | |
8278 | if(term2*term3>0.)\r | |
8279 | {\r | |
8280 | denominator = 1.-term1/(term2*term3);\r | |
8281 | prefactor = term1/(term2*term3);\r | |
8282 | if(denominator!=0.)\r | |
8283 | {\r | |
8284 | covTwoReducedFourReduced = (twoReducedFourReduced-twoReduced*fourReduced)/denominator; \r | |
8285 | wCovTwoReducedFourReduced = covTwoReducedFourReduced*prefactor; \r | |
8286 | fDiffFlowCovariances[t][pe][4]->SetBinContent(b,wCovTwoReducedFourReduced);\r | |
8287 | }\r | |
8288 | }\r | |
8289 | \r | |
8290 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++)\r | |
8291 | \r | |
8292 | \r | |
8293 | \r | |
8294 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCovariances(TString type, TString ptOrEta)\r | |
8295 | \r | |
8296 | \r | |
8297 | //================================================================================================================================\r | |
8298 | \r | |
8299 | \r | |
8300 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlow(TString type, TString ptOrEta)\r | |
8301 | {\r | |
8302 | // calculate differential flow from differential cumulants and previously obtained integrated flow: (to be improved: description)\r | |
8303 | \r | |
8304 | Int_t typeFlag = -1;\r | |
8305 | Int_t ptEtaFlag = -1;\r | |
8306 | \r | |
8307 | if(type == "RP")\r | |
8308 | {\r | |
8309 | typeFlag = 0;\r | |
8310 | } else if(type == "POI")\r | |
8311 | {\r | |
8312 | typeFlag = 1;\r | |
8313 | } \r | |
8314 | \r | |
8315 | if(ptOrEta == "Pt")\r | |
8316 | {\r | |
8317 | ptEtaFlag = 0;\r | |
8318 | } else if(ptOrEta == "Eta")\r | |
8319 | {\r | |
8320 | ptEtaFlag = 1;\r | |
8321 | } \r | |
8322 | \r | |
8323 | // shortcuts:\r | |
8324 | Int_t t = typeFlag;\r | |
8325 | Int_t pe = ptEtaFlag;\r | |
8326 | \r | |
8327 | // common:\r | |
8328 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta};\r | |
8329 | \r | |
8330 | // correlations:\r | |
8331 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>>\r | |
8332 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>>\r | |
8333 | \r | |
8334 | // statistical errors of correlations:\r | |
8335 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1);\r | |
8336 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); \r | |
8337 | \r | |
8338 | // reduced correlations:\r | |
8339 | Double_t twoReduced = 0.; // <<2'>>\r | |
8340 | Double_t fourReduced = 0.; // <<4'>>\r | |
8341 | \r | |
8342 | // statistical errors of reduced correlations:\r | |
8343 | Double_t twoReducedError = 0.; \r | |
8344 | Double_t fourReducedError = 0.; \r | |
8345 | \r | |
8346 | // covariances:\r | |
8347 | Double_t wCovTwoFour = fIntFlowCovariances->GetBinContent(1);// // Cov(<2>,<4>) * prefactor(<2>,<4>)\r | |
8348 | Double_t wCovTwoTwoReduced = 0.; // Cov(<2>,<2'>) * prefactor(<2>,<2'>)\r | |
8349 | Double_t wCovTwoFourReduced = 0.; // Cov(<2>,<4'>) * prefactor(<2>,<4'>)\r | |
8350 | Double_t wCovFourTwoReduced = 0.; // Cov(<4>,<2'>) * prefactor(<4>,<2'>)\r | |
8351 | Double_t wCovFourFourReduced = 0.; // Cov(<4>,<4'>) * prefactor(<4>,<4'>)\r | |
8352 | Double_t wCovTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) * prefactor(<2'>,<4'>)\r | |
8353 | \r | |
8354 | // differential flow:\r | |
8355 | Double_t v2Prime = 0.; // v'{2} \r | |
8356 | Double_t v4Prime = 0.; // v'{4}\r | |
8357 | \r | |
8358 | // statistical error of differential flow:\r | |
8359 | Double_t v2PrimeError = 0.; \r | |
8360 | Double_t v4PrimeError = 0.; \r | |
8361 | \r | |
8362 | // squared statistical error of differential flow:\r | |
8363 | Double_t v2PrimeErrorSquared = 0.; \r | |
8364 | Double_t v4PrimeErrorSquared = 0.; \r | |
8365 | \r | |
8366 | // loop over pt or eta bins:\r | |
8367 | for(Int_t b=1;b<=nBinsPtEta[pe];b++)\r | |
8368 | {\r | |
8369 | // reduced correlations and statistical errors:\r | |
8370 | twoReduced = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b);\r | |
8371 | twoReducedError = fDiffFlowCorrelationsHist[t][pe][0]->GetBinError(b);\r | |
8372 | fourReduced = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b);\r | |
8373 | fourReducedError = fDiffFlowCorrelationsHist[t][pe][1]->GetBinError(b);\r | |
8374 | // covariances:\r | |
8375 | wCovTwoTwoReduced = fDiffFlowCovariances[t][pe][0]->GetBinContent(b);\r | |
8376 | wCovTwoFourReduced = fDiffFlowCovariances[t][pe][1]->GetBinContent(b);\r | |
8377 | wCovFourTwoReduced = fDiffFlowCovariances[t][pe][2]->GetBinContent(b);\r | |
8378 | wCovFourFourReduced = fDiffFlowCovariances[t][pe][3]->GetBinContent(b);\r | |
8379 | wCovTwoReducedFourReduced = fDiffFlowCovariances[t][pe][4]->GetBinContent(b);\r | |
8380 | // differential flow:\r | |
8381 | // v'{2}:\r | |
8382 | if(two>0.) \r | |
8383 | {\r | |
8384 | v2Prime = twoReduced/pow(two,0.5);\r | |
8385 | v2PrimeErrorSquared = (1./4.)*pow(two,-3.)*\r | |
8386 | (pow(twoReduced,2.)*pow(twoError,2.)\r | |
8387 | + 4.*pow(two,2.)*pow(twoReducedError,2.)\r | |
8388 | - 4.*two*twoReduced*wCovTwoTwoReduced);\r | |
8389 | \r | |
8390 | \r | |
8391 | if(v2PrimeErrorSquared>0.) v2PrimeError = pow(v2PrimeErrorSquared,0.5);\r | |
8392 | fDiffFlow[t][pe][0]->SetBinContent(b,v2Prime); \r | |
8393 | fDiffFlow[t][pe][0]->SetBinError(b,v2PrimeError); \r | |
8394 | }\r | |
8395 | // differential flow:\r | |
8396 | // v'{4}\r | |
8397 | if(2.*pow(two,2.)-four > 0.) \r | |
8398 | {\r | |
8399 | v4Prime = (2.*two*twoReduced-fourReduced)/pow(2.*pow(two,2.)-four,3./4.);\r | |
8400 | v4PrimeErrorSquared = pow(2.*pow(two,2.)-four,-7./2.)*\r | |
8401 | (pow(2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced,2.)*pow(twoError,2.)\r | |
8402 | + (9./16.)*pow(2.*two*twoReduced-fourReduced,2.)*pow(fourError,2.)\r | |
8403 | + 4.*pow(two,2.)*pow(2.*pow(two,2.)-four,2.)*pow(twoReducedError,2.)\r | |
8404 | + pow(2.*pow(two,2.)-four,2.)*pow(fourReducedError,2.) \r | |
8405 | - (3./2.)*(2.*two*twoReduced-fourReduced)\r | |
8406 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoFour\r | |
8407 | - 4.*two*(2.*pow(two,2.)-four)\r | |
8408 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoTwoReduced\r | |
8409 | + 2.*(2.*pow(two,2.)-four)\r | |
8410 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoFourReduced\r | |
8411 | + 3.*two*(2.*pow(two,2.)-four)*(2.*two*twoReduced-fourReduced)*wCovFourTwoReduced\r | |
8412 | - (3./2.)*(2.*pow(two,2.)-four)*(2.*two*twoReduced-fourReduced)*wCovFourFourReduced \r | |
8413 | - 4.*two*pow(2.*pow(two,2.)-four,2.)*wCovTwoReducedFourReduced); \r | |
8414 | if(v4PrimeErrorSquared>0.) v4PrimeError = pow(v4PrimeErrorSquared,0.5); \r | |
8415 | fDiffFlow[t][pe][1]->SetBinContent(b,v4Prime);\r | |
8416 | fDiffFlow[t][pe][1]->SetBinError(b,v4PrimeError); \r | |
8417 | }\r | |
8418 | \r | |
8419 | } // end of for(Int_t b=1;b<=fnBinsPtEta[pe];b++)\r | |
8420 | \r | |
8421 | \r | |
8422 | \r | |
8423 | \r | |
8424 | /*\r | |
8425 | // 2D:\r | |
8426 | for(Int_t nua=0;nua<2;nua++)\r | |
8427 | {\r | |
8428 | for(Int_t p=1;p<=fnBinsPt;p++)\r | |
8429 | {\r | |
8430 | for(Int_t e=1;e<=fnBinsEta;e++) \r | |
8431 | { \r | |
8432 | // differential cumulants:\r | |
8433 | Double_t qc2Prime = fFinalCumulants2D[t][pW][eW][nua][0]->GetBinContent(fFinalCumulants2D[t][pW][eW][nua][0]->GetBin(p,e)); // QC{2'} \r | |
8434 | Double_t qc4Prime = fFinalCumulants2D[t][pW][eW][nua][1]->GetBinContent(fFinalCumulants2D[t][pW][eW][nua][1]->GetBin(p,e)); // QC{4'}\r | |
8435 | // differential flow:\r | |
8436 | Double_t v2Prime = 0.; \r | |
8437 | Double_t v4Prime = 0.; \r | |
8438 | if(v2) \r | |
8439 | {\r | |
8440 | v2Prime = qc2Prime/v2;\r | |
8441 | fFinalFlow2D[t][pW][eW][nua][0]->SetBinContent(fFinalFlow2D[t][pW][eW][nua][0]->GetBin(p,e),v2Prime); \r | |
8442 | } \r | |
8443 | if(v4)\r | |
8444 | {\r | |
8445 | v4Prime = -qc4Prime/pow(v4,3.); \r | |
8446 | fFinalFlow2D[t][pW][eW][nua][1]->SetBinContent(fFinalFlow2D[t][pW][eW][nua][1]->GetBin(p,e),v4Prime); \r | |
8447 | } \r | |
8448 | } // end of for(Int_t e=1;e<=fnBinsEta;e++)\r | |
8449 | } // end of for(Int_t p=1;p<=fnBinsPt;p++)\r | |
8450 | } // end of for(Int_t nua=0;nua<2;nua++)\r | |
8451 | */\r | |
8452 | \r | |
8453 | \r | |
8454 | \r | |
8455 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlow(TString type, Bool_t useParticleWeights)\r | |
8456 | \r | |
8457 | \r | |
8458 | \r | |
8459 | //================================================================================================================================\r | |
8460 | \r | |
8461 | \r | |
8462 | void AliFlowAnalysisWithQCumulants::StoreIntFlowFlags()\r | |
8463 | {\r | |
8464 | // a) Store all flags for integrated flow in profile fIntFlowFlags.\r | |
8465 | \r | |
8466 | if(!fIntFlowFlags)\r | |
8467 | {\r | |
8468 | cout<<"WARNING: fIntFlowFlags is NULL in AFAWQC::SFFIF() !!!!"<<endl;\r | |
8469 | exit(0);\r | |
8470 | } \r | |
8471 | \r | |
c09d90fd | 8472 | fIntFlowFlags->Fill(0.5,(Int_t)fUsePhiWeights||fUsePtWeights||fUseEtaWeights); // particle weights used or not\r |
8473 | //fIntFlowFlags->Fill(1.5,""); // which event weight was used? // to be improved\r | |
8474 | fIntFlowFlags->Fill(2.5,(Int_t)fApplyCorrectionForNUA); // corrected for non-uniform acceptance or not\r | |
e2168f8f | 8475 | \r |
8476 | } // end of void AliFlowAnalysisWithQCumulants::StoreIntFlowFlags()\r | |
8477 | \r | |
8478 | \r | |
8479 | //================================================================================================================================\r | |
8480 | \r | |
8481 | \r | |
8482 | void AliFlowAnalysisWithQCumulants::StoreDiffFlowFlags()\r | |
8483 | {\r | |
8484 | // Store all flags for differential flow in the profile fDiffFlowFlags.\r | |
8485 | \r | |
8486 | if(!fDiffFlowFlags)\r | |
8487 | {\r | |
8488 | cout<<"WARNING: fDiffFlowFlags is NULL in AFAWQC::SFFDF() !!!!"<<endl;\r | |
8489 | exit(0);\r | |
8490 | } \r | |
8491 | \r | |
c09d90fd | 8492 | fDiffFlowFlags->Fill(0.5,fUsePhiWeights||fUsePtWeights||fUseEtaWeights); // particle weights used or not\r |
8493 | //fDiffFlowFlags->Fill(1.5,""); // which event weight was used? // to be improved\r | |
8494 | fDiffFlowFlags->Fill(2.5,fApplyCorrectionForNUA); // corrected for non-uniform acceptance or not\r | |
8495 | fDiffFlowFlags->Fill(3.5,fCalculate2DFlow); // calculate also 2D differential flow in (pt,eta) or not\r | |
e2168f8f | 8496 | \r |
8497 | } // end of void AliFlowAnalysisWithQCumulants::StoreDiffFlowFlags()\r | |
8498 | \r | |
8499 | \r | |
8500 | //================================================================================================================================\r | |
8501 | \r | |
8502 | \r | |
8503 | void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms(TList *outputListHistos) \r | |
8504 | {\r | |
afa4af05 | 8505 | // Access all pointers to common control and common result histograms and profiles.\r |
e2168f8f | 8506 | \r |
8507 | if(outputListHistos) \r | |
8508 | {\r | |
afa4af05 | 8509 | TString commonHistsName = "AliFlowCommonHistQC";\r |
8510 | commonHistsName += fAnalysisLabel->Data();\r | |
8511 | AliFlowCommonHist *commonHist = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHistsName.Data()));\r | |
8512 | if(commonHist) this->SetCommonHists(commonHist); | |
8513 | TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC";\r | |
8514 | commonHists2ndOrderName += fAnalysisLabel->Data(); | |
8515 | AliFlowCommonHist *commonHist2nd = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHists2ndOrderName.Data()));\r | |
8516 | if(commonHist2nd) this->SetCommonHists2nd(commonHist2nd); | |
8517 | TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC";\r | |
8518 | commonHists4thOrderName += fAnalysisLabel->Data();\r | |
8519 | AliFlowCommonHist *commonHist4th = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHists4thOrderName.Data()));\r | |
8520 | if(commonHist4th) this->SetCommonHists4th(commonHist4th); | |
8521 | TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC";\r | |
8522 | commonHists6thOrderName += fAnalysisLabel->Data(); | |
8523 | AliFlowCommonHist *commonHist6th = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHists6thOrderName.Data()));\r | |
8524 | if(commonHist6th) this->SetCommonHists6th(commonHist6th); \r | |
8525 | TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC";\r | |
8526 | commonHists8thOrderName += fAnalysisLabel->Data(); | |
8527 | AliFlowCommonHist *commonHist8th = dynamic_cast<AliFlowCommonHist*>(outputListHistos->FindObject(commonHists8thOrderName.Data()));\r | |
8528 | if(commonHist8th) this->SetCommonHists8th(commonHist8th); | |
8529 | TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC"; \r | |
8530 | commonHistResults2ndOrderName += fAnalysisLabel->Data(); \r | |
e2168f8f | 8531 | AliFlowCommonHistResults *commonHistRes2nd = dynamic_cast<AliFlowCommonHistResults*>\r |
afa4af05 | 8532 | (outputListHistos->FindObject(commonHistResults2ndOrderName.Data()));\r |
8533 | if(commonHistRes2nd) this->SetCommonHistsResults2nd(commonHistRes2nd); | |
8534 | TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC";\r | |
8535 | commonHistResults4thOrderName += fAnalysisLabel->Data(); | |
e2168f8f | 8536 | AliFlowCommonHistResults *commonHistRes4th = dynamic_cast<AliFlowCommonHistResults*>\r |
afa4af05 | 8537 | (outputListHistos->FindObject(commonHistResults4thOrderName.Data()));\r |
8538 | if(commonHistRes4th) this->SetCommonHistsResults4th(commonHistRes4th); | |
8539 | TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC";\r | |
8540 | commonHistResults6thOrderName += fAnalysisLabel->Data();\r | |
e2168f8f | 8541 | AliFlowCommonHistResults *commonHistRes6th = dynamic_cast<AliFlowCommonHistResults*>\r |
afa4af05 | 8542 | (outputListHistos->FindObject(commonHistResults6thOrderName.Data()));\r |
8543 | if(commonHistRes6th) this->SetCommonHistsResults6th(commonHistRes6th); | |
8544 | TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC";\r | |
8545 | commonHistResults8thOrderName += fAnalysisLabel->Data();\r | |
e2168f8f | 8546 | AliFlowCommonHistResults *commonHistRes8th = dynamic_cast<AliFlowCommonHistResults*>\r |
afa4af05 | 8547 | (outputListHistos->FindObject(commonHistResults8thOrderName.Data())); \r |
e2168f8f | 8548 | if(commonHistRes8th) this->SetCommonHistsResults8th(commonHistRes8th);\r |
8549 | } else\r | |
8550 | {\r | |
8551 | cout<<"WARNING: outputListHistos is NULL in AFAWQC::GPFCH() !!!!"<<endl;\r | |
8552 | exit(0);\r | |
8553 | }\r | |
8554 | \r | |
8555 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms(TList *outputListHistos) \r | |
8556 | \r | |
8557 | \r | |
8558 | //================================================================================================================================\r | |
8559 | \r | |
8560 | \r | |
8561 | void AliFlowAnalysisWithQCumulants::GetPointersForParticleWeightsHistograms(TList *outputListHistos) \r | |
8562 | {\r | |
8563 | // Get pointers for histograms with particle weights.\r | |
8564 | \r | |
8565 | if(outputListHistos)\r | |
8566 | {\r | |
8567 | TList *weightsList = dynamic_cast<TList*>(outputListHistos->FindObject("Weights"));\r | |
8568 | if(weightsList) this->SetWeightsList(weightsList);\r | |
8569 | Bool_t bUsePhiWeights = kFALSE;\r | |
8570 | Bool_t bUsePtWeights = kFALSE;\r | |
8571 | Bool_t bUseEtaWeights = kFALSE;\r | |
8572 | TString fUseParticleWeightsName = "fUseParticleWeightsQC"; // to be improved (hirdwired label QC)\r | |
8573 | fUseParticleWeightsName += fAnalysisLabel->Data();\r | |
8574 | TProfile *useParticleWeights = dynamic_cast<TProfile*>(weightsList->FindObject(fUseParticleWeightsName.Data()));\r | |
8575 | if(useParticleWeights)\r | |
8576 | {\r | |
8577 | this->SetUseParticleWeights(useParticleWeights); \r | |
8578 | bUsePhiWeights = (Int_t)useParticleWeights->GetBinContent(1);\r | |
8579 | bUsePtWeights = (Int_t)useParticleWeights->GetBinContent(2);\r | |
8580 | bUseEtaWeights = (Int_t)useParticleWeights->GetBinContent(3);\r | |
8581 | }\r | |
8582 | } else\r | |
8583 | {\r | |
8584 | cout<<"WARNING: outputListHistos is NULL in AFAWQC::GPFPWH() !!!!"<<endl;\r | |
8585 | exit(0);\r | |
8586 | }\r | |
8587 | \r | |
8588 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForParticleWeightsHistograms(TList *outputListHistos); \r | |
8589 | \r | |
8590 | \r | |
8591 | //================================================================================================================================\r | |
8592 | \r | |
8593 | \r | |
8594 | void AliFlowAnalysisWithQCumulants::GetPointersForIntFlowHistograms(TList *outputListHistos) \r | |
8595 | {\r | |
8596 | // Get pointers for histograms and profiles relevant for integrated flow:\r | |
8597 | // a) Get pointer to base list for integrated flow holding profile fIntFlowFlags and lists fIntFlowProfiles and fIntFlowResults.\r | |
8598 | // b) Get pointer to profile fIntFlowFlags holding all flags for integrated flow.\r | |
8599 | // c) Get pointer to list fIntFlowProfiles and pointers to all objects that she holds. \r | |
8600 | // d) Get pointer to list fIntFlowResults and pointers to all objects that she holds. \r | |
8601 | \r | |
8602 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data member?)\r | |
8603 | TString powerFlag[2] = {"linear","quadratic"}; // to be improved (should I promote this to data member?)\r | |
8604 | \r | |
8605 | if(outputListHistos)\r | |
8606 | {\r | |
8607 | // a) Get pointer to base list for integrated flow holding profile fIntFlowFlags and lists fIntFlowProfiles and fIntFlowResults:\r | |
8608 | TList *intFlowList = NULL;\r | |
8609 | intFlowList = dynamic_cast<TList*>(outputListHistos->FindObject("Integrated Flow"));\r | |
8610 | if(!intFlowList) \r | |
8611 | {\r | |
8612 | cout<<"WARNING: intFlowList is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8613 | exit(0); \r | |
8614 | } \r | |
8615 | \r | |
8616 | // b) Get pointer to profile fIntFlowFlags holding all flags for integrated flow:\r | |
8617 | TString intFlowFlagsName = "fIntFlowFlags";\r | |
8618 | intFlowFlagsName += fAnalysisLabel->Data();\r | |
8619 | TProfile *intFlowFlags = dynamic_cast<TProfile*>(intFlowList->FindObject(intFlowFlagsName.Data()));\r | |
8620 | Bool_t bApplyCorrectionForNUA = kFALSE;\r | |
8621 | if(intFlowFlags)\r | |
8622 | {\r | |
8623 | this->SetIntFlowFlags(intFlowFlags); \r | |
8624 | bApplyCorrectionForNUA = (Int_t)intFlowFlags->GetBinContent(3); \r | |
8625 | this->SetApplyCorrectionForNUA(bApplyCorrectionForNUA); \r | |
8626 | } else \r | |
8627 | {\r | |
8628 | cout<<"WARNING: intFlowFlags is NULL in FAWQC::GPFIFH() !!!!"<<endl;\r | |
8629 | }\r | |
8630 | \r | |
8631 | // c) Get pointer to list fIntFlowProfiles and pointers to all objects that she holds:\r | |
8632 | TList *intFlowProfiles = NULL;\r | |
8633 | intFlowProfiles = dynamic_cast<TList*>(intFlowList->FindObject("Profiles"));\r | |
8634 | if(intFlowProfiles) \r | |
8635 | {\r | |
8636 | // average multiplicities:\r | |
8637 | TString avMultiplicityName = "fAvMultiplicity";\r | |
8638 | avMultiplicityName += fAnalysisLabel->Data();\r | |
8639 | TProfile *avMultiplicity = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(avMultiplicityName.Data()));\r | |
8640 | if(avMultiplicity) \r | |
8641 | {\r | |
8642 | this->SetAvMultiplicity(avMultiplicity);\r | |
8643 | } else \r | |
8644 | {\r | |
8645 | cout<<"WARNING: avMultiplicity is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8646 | }\r | |
8647 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with wrong errors!):\r | |
8648 | TString intFlowCorrelationsProName = "fIntFlowCorrelationsPro";\r | |
8649 | intFlowCorrelationsProName += fAnalysisLabel->Data();\r | |
8650 | TProfile *intFlowCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowCorrelationsProName.Data()));\r | |
8651 | if(intFlowCorrelationsPro) \r | |
8652 | {\r | |
8653 | this->SetIntFlowCorrelationsPro(intFlowCorrelationsPro);\r | |
8654 | } else \r | |
8655 | {\r | |
8656 | cout<<"WARNING: intFlowCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8657 | } \r | |
8658 | // average all correlations for integrated flow (with wrong errors!):\r | |
8659 | TString intFlowCorrelationsAllProName = "fIntFlowCorrelationsAllPro";\r | |
8660 | intFlowCorrelationsAllProName += fAnalysisLabel->Data();\r | |
8661 | TProfile *intFlowCorrelationsAllPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowCorrelationsAllProName.Data()));\r | |
8662 | if(intFlowCorrelationsAllPro) \r | |
8663 | {\r | |
8664 | this->SetIntFlowCorrelationsAllPro(intFlowCorrelationsAllPro);\r | |
8665 | } else \r | |
8666 | {\r | |
8667 | cout<<"WARNING: intFlowCorrelationsAllPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8668 | } \r | |
8669 | // average products of correlations <2>, <4>, <6> and <8>: \r | |
8670 | TString intFlowProductOfCorrelationsProName = "fIntFlowProductOfCorrelationsPro";\r | |
8671 | intFlowProductOfCorrelationsProName += fAnalysisLabel->Data();\r | |
8672 | TProfile *intFlowProductOfCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowProductOfCorrelationsProName.Data()));\r | |
8673 | if(intFlowProductOfCorrelationsPro) \r | |
8674 | {\r | |
8675 | this->SetIntFlowProductOfCorrelationsPro(intFlowProductOfCorrelationsPro);\r | |
8676 | } else \r | |
8677 | {\r | |
8678 | cout<<"WARNING: intFlowProductOfCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8679 | } \r | |
8680 | // average correction terms for non-uniform acceptance (with wrong errors!):\r | |
8681 | for(Int_t sc=0;sc<2;sc++)\r | |
8682 | {\r | |
8683 | TString intFlowCorrectionTermsForNUAProName = "fIntFlowCorrectionTermsForNUAPro";\r | |
8684 | intFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data();\r | |
8685 | TProfile *intFlowCorrectionTermsForNUAPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject((Form("%s: %s terms",intFlowCorrectionTermsForNUAProName.Data(),sinCosFlag[sc].Data()))));\r | |
8686 | if(intFlowCorrectionTermsForNUAPro) \r | |
8687 | {\r | |
8688 | this->SetIntFlowCorrectionTermsForNUAPro(intFlowCorrectionTermsForNUAPro,sc);\r | |
8689 | } else \r | |
8690 | {\r | |
8691 | cout<<"WARNING: intFlowCorrectionTermsForNUAPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8692 | cout<<"sc = "<<sc<<endl;\r | |
8693 | } \r | |
8694 | } // end of for(Int_t sc=0;sc<2;sc++) \r | |
8695 | } else // to if(intFlowProfiles) \r | |
8696 | {\r | |
8697 | cout<<"WARNING: intFlowProfiles is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8698 | }\r | |
8699 | \r | |
8700 | // d) Get pointer to list fIntFlowResults and pointers to all objects that she holds. \r | |
8701 | TList *intFlowResults = NULL;\r | |
8702 | intFlowResults = dynamic_cast<TList*>(intFlowList->FindObject("Results"));\r | |
8703 | if(intFlowResults)\r | |
8704 | {\r | |
8705 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with correct errors!):\r | |
8706 | TString intFlowCorrelationsHistName = "fIntFlowCorrelationsHist";\r | |
8707 | intFlowCorrelationsHistName += fAnalysisLabel->Data();\r | |
8708 | TH1D *intFlowCorrelationsHist = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCorrelationsHistName.Data()));\r | |
8709 | if(intFlowCorrelationsHist) \r | |
8710 | {\r | |
8711 | this->SetIntFlowCorrelationsHist(intFlowCorrelationsHist);\r | |
8712 | } else \r | |
8713 | {\r | |
8714 | cout<<"WARNING: intFlowCorrelationsHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8715 | } \r | |
8716 | // average all correlations for integrated flow (with correct errors!):\r | |
8717 | TString intFlowCorrelationsAllHistName = "fIntFlowCorrelationsAllHist";\r | |
8718 | intFlowCorrelationsAllHistName += fAnalysisLabel->Data();\r | |
8719 | TH1D *intFlowCorrelationsAllHist = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCorrelationsAllHistName.Data()));\r | |
8720 | if(intFlowCorrelationsAllHist) \r | |
8721 | {\r | |
8722 | this->SetIntFlowCorrelationsAllHist(intFlowCorrelationsAllHist);\r | |
8723 | } else \r | |
8724 | {\r | |
8725 | cout<<"WARNING: intFlowCorrelationsAllHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8726 | } \r | |
8727 | // average correction terms for non-uniform acceptance (with correct errors!):\r | |
8728 | TString intFlowCorrectionTermsForNUAHistName = "fIntFlowCorrectionTermsForNUAHist";\r | |
8729 | intFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data();\r | |
8730 | for(Int_t sc=0;sc<2;sc++)\r | |
8731 | {\r | |
8732 | TH1D *intFlowCorrectionTermsForNUAHist = dynamic_cast<TH1D*>(intFlowResults->FindObject((Form("%s: %s terms",intFlowCorrectionTermsForNUAHistName.Data(),sinCosFlag[sc].Data()))));\r | |
8733 | if(intFlowCorrectionTermsForNUAHist) \r | |
8734 | {\r | |
8735 | this->SetIntFlowCorrectionTermsForNUAHist(intFlowCorrectionTermsForNUAHist,sc);\r | |
8736 | } else \r | |
8737 | {\r | |
8738 | cout<<"WARNING: intFlowCorrectionTermsForNUAHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8739 | cout<<"sc = "<<sc<<endl;\r | |
8740 | } \r | |
8741 | } // end of for(Int_t sc=0;sc<2;sc++) \r | |
8742 | // covariances (multiplied with weight dependent prefactor):\r | |
8743 | TString intFlowCovariancesName = "fIntFlowCovariances";\r | |
8744 | intFlowCovariancesName += fAnalysisLabel->Data();\r | |
8745 | TH1D *intFlowCovariances = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCovariancesName.Data()));\r | |
8746 | if(intFlowCovariances) \r | |
8747 | {\r | |
8748 | this->SetIntFlowCovariances(intFlowCovariances); \r | |
8749 | } else \r | |
8750 | {\r | |
8751 | cout<<"WARNING: intFlowCovariances is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8752 | } \r | |
8753 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>:\r | |
8754 | TString intFlowSumOfEventWeightsName = "fIntFlowSumOfEventWeights";\r | |
8755 | intFlowSumOfEventWeightsName += fAnalysisLabel->Data();\r | |
8756 | for(Int_t power=0;power<2;power++)\r | |
8757 | {\r | |
8758 | TH1D *intFlowSumOfEventWeights = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s: %s",intFlowSumOfEventWeightsName.Data(),powerFlag[power].Data())));\r | |
8759 | if(intFlowSumOfEventWeights) \r | |
8760 | {\r | |
8761 | this->SetIntFlowSumOfEventWeights(intFlowSumOfEventWeights,power);\r | |
8762 | } else \r | |
8763 | {\r | |
8764 | cout<<"WARNING: intFlowSumOfEventWeights is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8765 | cout<<"power = "<<power<<endl;\r | |
8766 | } \r | |
8767 | } // end of for(Int_t power=0;power<2;power++) \r | |
8768 | // sum of products of event weights for correlations <2>, <4>, <6> and <8>: \r | |
8769 | TString intFlowSumOfProductOfEventWeightsName = "fIntFlowSumOfProductOfEventWeights";\r | |
8770 | intFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data();\r | |
8771 | TH1D *intFlowSumOfProductOfEventWeights = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowSumOfProductOfEventWeightsName.Data()));\r | |
8772 | if(intFlowSumOfProductOfEventWeights) \r | |
8773 | {\r | |
8774 | this->SetIntFlowSumOfProductOfEventWeights(intFlowSumOfProductOfEventWeights);\r | |
8775 | } else \r | |
8776 | {\r | |
8777 | cout<<"WARNING: intFlowSumOfProductOfEventWeights is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8778 | } \r | |
8779 | // final results for integrated Q-cumulants:\r | |
8780 | TString intFlowQcumulantsName = "fIntFlowQcumulants";\r | |
8781 | intFlowQcumulantsName += fAnalysisLabel->Data();\r | |
8782 | TH1D *intFlowQcumulants = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowQcumulantsName.Data()));\r | |
8783 | if(intFlowQcumulants) \r | |
8784 | {\r | |
8785 | this->SetIntFlowQcumulants(intFlowQcumulants);\r | |
8786 | } else \r | |
8787 | {\r | |
8788 | cout<<"WARNING: intFlowQcumulants is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8789 | } \r | |
8790 | // final integrated flow estimates from Q-cumulants:\r | |
8791 | TString intFlowName = "fIntFlow";\r | |
8792 | intFlowName += fAnalysisLabel->Data();\r | |
8793 | TH1D *intFlow = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowName.Data()));\r | |
8794 | if(intFlow) \r | |
8795 | {\r | |
8796 | this->SetIntFlow(intFlow);\r | |
8797 | } else \r | |
8798 | {\r | |
8799 | cout<<"WARNING: intFlow is NULL in AFAWQC::GPFIFH() !!!!"<<endl; \r | |
8800 | } \r | |
8801 | } else // to if(intFlowResults)\r | |
8802 | {\r | |
8803 | cout<<"WARNING: intFlowResults is NULL in AFAWQC::GPFIFH() !!!!"<<endl;\r | |
8804 | }\r | |
8805 | } // end of if(outputListHistos)\r | |
8806 | \r | |
8807 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForIntFlowHistograms(TList *outputListHistos)\r | |
8808 | \r | |
8809 | \r | |
8810 | //================================================================================================================================\r | |
8811 | \r | |
8812 | \r | |
8813 | void AliFlowAnalysisWithQCumulants::GetPointersForDiffFlowHistograms(TList *outputListHistos)\r | |
8814 | {\r | |
8815 | // Get pointer to all objects relevant for differential flow.\r | |
8816 | // a) Define flags locally (to be improved: should I promote flags to data members?);\r | |
8817 | // b) Get pointer to base list for differential flow fDiffFlowList and nested lists fDiffFlowListProfiles and fDiffFlowListResults;\r | |
8818 | // c) Get pointer to profile fDiffFlowFlags holding all flags for differential flow;\r | |
8819 | // d) Get pointers to all nested lists in fDiffFlowListProfiles and to profiles which they hold;\r | |
8820 | // e) Get pointers to all nested lists in fDiffFlowListResults and to histograms which they hold.\r | |
8821 | \r | |
8822 | // a) Define flags locally (to be improved: should I promote flags to data members?): \r | |
8823 | TString typeFlag[2] = {"RP","POI"}; \r | |
8824 | TString ptEtaFlag[2] = {"p_{T}","#eta"};\r | |
8825 | TString powerFlag[2] = {"linear","quadratic"};\r | |
8826 | TString differentialCumulantIndex[4] = {"QC{2'}","QC{4'}","QC{6'}","QC{8'}"}; \r | |
8827 | TString differentialFlowIndex[4] = {"v'{2}","v'{4}","v'{6}","v'{8}"}; \r | |
8828 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"};\r | |
8829 | TString mixedCorrelationIndex[8] = {"<2>","<2'>","<4>","<4'>","<6>","<6'>","<8>","<8'>"};\r | |
8830 | TString covarianceName[5] = {"Cov(<2>,<2'>)","Cov(<2>,<4'>)","Cov(<4>,<2'>)","Cov(<4>,<4'>)","Cov(<2'>,<4'>)"}; \r | |
8831 | \r | |
8832 | // b) Get pointer to base list for differential flow fDiffFlowList and nested lists fDiffFlowListProfiles and fDiffFlowListResults:\r | |
8833 | TList *diffFlowList = NULL;\r | |
8834 | diffFlowList = dynamic_cast<TList*>(outputListHistos->FindObject("Differential Flow")); \r | |
8835 | if(!diffFlowList)\r | |
8836 | { \r | |
8837 | cout<<"WARNING: diffFlowList is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
8838 | exit(0);\r | |
8839 | }\r | |
8840 | // list holding nested lists containing profiles:\r | |
8841 | TList *diffFlowListProfiles = NULL;\r | |
8842 | diffFlowListProfiles = dynamic_cast<TList*>(diffFlowList->FindObject("Profiles"));\r | |
8843 | if(!diffFlowListProfiles)\r | |
8844 | { \r | |
8845 | cout<<"WARNING: diffFlowListProfiles is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
8846 | exit(0);\r | |
8847 | }\r | |
8848 | // list holding nested lists containing 2D and 1D histograms with final results:\r | |
8849 | TList *diffFlowListResults = NULL;\r | |
8850 | diffFlowListResults = dynamic_cast<TList*>(diffFlowList->FindObject("Results"));\r | |
8851 | if(!diffFlowListResults)\r | |
8852 | { \r | |
8853 | cout<<"WARNING: diffFlowListResults is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
8854 | exit(0);\r | |
8855 | }\r | |
8856 | \r | |
8857 | // c) Get pointer to profile holding all flags for differential flow;\r | |
8858 | TString diffFlowFlagsName = "fDiffFlowFlags";\r | |
8859 | diffFlowFlagsName += fAnalysisLabel->Data();\r | |
8860 | TProfile *diffFlowFlags = dynamic_cast<TProfile*>(diffFlowList->FindObject(diffFlowFlagsName.Data()));\r | |
8861 | Bool_t bCalculate2DFlow = kFALSE;\r | |
8862 | if(diffFlowFlags)\r | |
8863 | {\r | |
8864 | this->SetDiffFlowFlags(diffFlowFlags); \r | |
8865 | bCalculate2DFlow = (Int_t)diffFlowFlags->GetBinContent(4);\r | |
8866 | this->SetCalculate2DFlow(bCalculate2DFlow); // to be improved (shoul I call this setter somewhere else?) \r | |
8867 | }\r | |
8868 | \r | |
8869 | // d) Get pointers to all nested lists in fDiffFlowListProfiles and to profiles which they hold;\r | |
8870 | // correlations:\r | |
8871 | TList *diffFlowCorrelationsProList[2][2] = {{NULL}};\r | |
8872 | TString diffFlowCorrelationsProName = "fDiffFlowCorrelationsPro";\r | |
8873 | diffFlowCorrelationsProName += fAnalysisLabel->Data();\r | |
8874 | TProfile *diffFlowCorrelationsPro[2][2][4] = {{{NULL}}}; \r | |
8875 | // products of correlations:\r | |
8876 | TList *diffFlowProductOfCorrelationsProList[2][2] = {{NULL}};\r | |
8877 | TString diffFlowProductOfCorrelationsProName = "fDiffFlowProductOfCorrelationsPro";\r | |
8878 | diffFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); \r | |
8879 | TProfile *diffFlowProductOfCorrelationsPro[2][2][8][8] = {{{{NULL}}}}; \r | |
8880 | // corrections:\r | |
8881 | TList *diffFlowCorrectionsProList[2][2] = {{NULL}};\r | |
8882 | // ...\r | |
8883 | for(Int_t t=0;t<2;t++)\r | |
8884 | {\r | |
8885 | for(Int_t pe=0;pe<2;pe++)\r | |
8886 | {\r | |
8887 | diffFlowCorrelationsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())));\r | |
8888 | if(!diffFlowCorrelationsProList[t][pe])\r | |
8889 | { \r | |
8890 | cout<<"WARNING: diffFlowCorrelationsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
8891 | cout<<"t = "<<t<<endl;\r | |
8892 | cout<<"pe = "<<pe<<endl;\r | |
8893 | exit(0);\r | |
8894 | }\r | |
8895 | for(Int_t ci=0;ci<4;ci++) // correlation index\r | |
8896 | {\r | |
8897 | diffFlowCorrelationsPro[t][pe][ci] = dynamic_cast<TProfile*>(diffFlowCorrelationsProList[t][pe]->FindObject(Form("%s, %s, %s, %s",diffFlowCorrelationsProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[ci].Data())));\r | |
8898 | if(diffFlowCorrelationsPro[t][pe][ci])\r | |
8899 | {\r | |
8900 | this->SetDiffFlowCorrelationsPro(diffFlowCorrelationsPro[t][pe][ci],t,pe,ci);\r | |
8901 | } else\r | |
8902 | {\r | |
8903 | cout<<"WARNING: diffFlowCorrelationsPro[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
8904 | cout<<"t = "<<t<<endl;\r | |
8905 | cout<<"pe = "<<pe<<endl; \r | |
8906 | cout<<"ci = "<<ci<<endl;\r | |
8907 | } \r | |
8908 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index \r | |
8909 | // products of correlations: \r | |
8910 | diffFlowProductOfCorrelationsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with products of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); \r | |
8911 | if(!diffFlowProductOfCorrelationsProList[t][pe])\r | |
8912 | { \r | |
8913 | cout<<"WARNING: ddiffFlowProductOfCorrelationsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
8914 | cout<<"t = "<<t<<endl;\r | |
8915 | cout<<"pe = "<<pe<<endl;\r | |
8916 | exit(0);\r | |
8917 | }\r | |
8918 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index\r | |
8919 | {\r | |
8920 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index\r | |
8921 | {\r | |
8922 | diffFlowProductOfCorrelationsPro[t][pe][mci1][mci2] = dynamic_cast<TProfile*>(diffFlowProductOfCorrelationsProList[t][pe]->FindObject(Form("%s, %s, %s, %s, %s",diffFlowProductOfCorrelationsProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),mixedCorrelationIndex[mci1].Data(),mixedCorrelationIndex[mci2].Data())));\r | |
8923 | if(diffFlowProductOfCorrelationsPro[t][pe][mci1][mci2])\r | |
8924 | {\r | |
8925 | this->SetDiffFlowProductOfCorrelationsPro(diffFlowProductOfCorrelationsPro[t][pe][mci1][mci2],t,pe,mci1,mci2);\r | |
8926 | } else\r | |
8927 | {\r | |
8928 | cout<<"WARNING: diffFlowCorrelationsPro[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
8929 | cout<<"t = "<<t<<endl;\r | |
8930 | cout<<"pe = "<<pe<<endl; \r | |
8931 | cout<<"mci1 = "<<mci1<<endl;\r | |
8932 | cout<<"mci2 = "<<mci2<<endl;\r | |
8933 | }\r | |
8934 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here\r | |
8935 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index\r | |
8936 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index \r | |
8937 | // corrections:\r | |
8938 | diffFlowCorrectionsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())));\r | |
8939 | if(!diffFlowCorrectionsProList[t][pe])\r | |
8940 | { \r | |
8941 | cout<<"WARNING: diffFlowCorrectionsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
8942 | cout<<"t = "<<t<<endl;\r | |
8943 | cout<<"pe = "<<pe<<endl;\r | |
8944 | exit(0);\r | |
8945 | }\r | |
8946 | // ... \r | |
8947 | } // end of for(Int_t pe=0;pe<2;pe++)\r | |
8948 | } // end of for(Int_t t=0;t<2;t++)\r | |
8949 | \r | |
8950 | // e) Get pointers to all nested lists in fDiffFlowListResults and to histograms which they hold.\r | |
8951 | // reduced correlations:\r | |
8952 | TList *diffFlowCorrelationsHistList[2][2] = {{NULL}};\r | |
8953 | TString diffFlowCorrelationsHistName = "fDiffFlowCorrelationsHist";\r | |
8954 | diffFlowCorrelationsHistName += fAnalysisLabel->Data(); \r | |
8955 | TH1D *diffFlowCorrelationsHist[2][2][4] = {{{NULL}}};\r | |
8956 | // differential Q-cumulants:\r | |
8957 | TList *diffFlowCumulantsHistList[2][2] = {{NULL}};\r | |
8958 | TString diffFlowCumulantsName = "fDiffFlowCumulants";\r | |
8959 | diffFlowCumulantsName += fAnalysisLabel->Data(); \r | |
8960 | TH1D *diffFlowCumulants[2][2][4] = {{{NULL}}};\r | |
8961 | // differential flow estimates from Q-cumulants:\r | |
8962 | TList *diffFlowHistList[2][2] = {{NULL}};\r | |
8963 | TString diffFlowName = "fDiffFlow";\r | |
8964 | diffFlowName += fAnalysisLabel->Data(); \r | |
8965 | TH1D *diffFlow[2][2][4] = {{{NULL}}};\r | |
8966 | // differential covariances:\r | |
8967 | TList *diffFlowCovariancesHistList[2][2] = {{NULL}};\r | |
8968 | TString diffFlowCovariancesName = "fDiffFlowCovariances";\r | |
8969 | diffFlowCovariancesName += fAnalysisLabel->Data(); \r | |
8970 | TH1D *diffFlowCovariances[2][2][5] = {{{NULL}}};\r | |
8971 | for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
8972 | { \r | |
8973 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
8974 | {\r | |
8975 | // reduced correlations:\r | |
8976 | diffFlowCorrelationsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())));\r | |
8977 | if(!diffFlowCorrelationsHistList[t][pe])\r | |
8978 | { \r | |
8979 | cout<<"WARNING: diffFlowCorrelationsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
8980 | cout<<"t = "<<t<<endl;\r | |
8981 | cout<<"pe = "<<pe<<endl;\r | |
8982 | exit(0);\r | |
8983 | }\r | |
8984 | for(Int_t index=0;index<4;index++) \r | |
8985 | {\r | |
8986 | diffFlowCorrelationsHist[t][pe][index] = dynamic_cast<TH1D*>(diffFlowCorrelationsHistList[t][pe]->FindObject(Form("%s, %s, %s, %s",diffFlowCorrelationsHistName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[index].Data())));\r | |
8987 | if(diffFlowCorrelationsHist[t][pe][index])\r | |
8988 | {\r | |
8989 | this->SetDiffFlowCorrelationsHist(diffFlowCorrelationsHist[t][pe][index],t,pe,index);\r | |
8990 | } else \r | |
8991 | {\r | |
8992 | cout<<"WARNING: diffFlowCorrelationsHist[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
8993 | cout<<"t = "<<t<<endl;\r | |
8994 | cout<<"pe = "<<pe<<endl;\r | |
8995 | cout<<"index = "<<index<<endl;\r | |
8996 | exit(0); \r | |
8997 | } \r | |
8998 | } // end of for(Int_t index=0;index<4;index++)\r | |
8999 | // differential Q-cumulants:\r | |
9000 | diffFlowCumulantsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Differential Q-cumulants (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())));\r | |
9001 | if(!diffFlowCumulantsHistList[t][pe])\r | |
9002 | { \r | |
9003 | cout<<"WARNING: diffFlowCumulantsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
9004 | cout<<"t = "<<t<<endl;\r | |
9005 | cout<<"pe = "<<pe<<endl;\r | |
9006 | exit(0);\r | |
9007 | }\r | |
9008 | for(Int_t index=0;index<4;index++) \r | |
9009 | {\r | |
9010 | diffFlowCumulants[t][pe][index] = dynamic_cast<TH1D*>(diffFlowCumulantsHistList[t][pe]->FindObject(Form("%s, %s, %s, %s",diffFlowCumulantsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),differentialCumulantIndex[index].Data())));\r | |
9011 | if(diffFlowCumulants[t][pe][index])\r | |
9012 | {\r | |
9013 | this->SetDiffFlowCumulants(diffFlowCumulants[t][pe][index],t,pe,index);\r | |
9014 | } else \r | |
9015 | {\r | |
9016 | cout<<"WARNING: diffFlowCumulants[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
9017 | cout<<"t = "<<t<<endl;\r | |
9018 | cout<<"pe = "<<pe<<endl;\r | |
9019 | cout<<"index = "<<index<<endl;\r | |
9020 | exit(0); \r | |
9021 | } \r | |
9022 | } // end of for(Int_t index=0;index<4;index++)\r | |
9023 | // differential flow estimates from Q-cumulants:\r | |
9024 | diffFlowHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Differential flow (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())));\r | |
9025 | if(!diffFlowHistList[t][pe])\r | |
9026 | { \r | |
9027 | cout<<"WARNING: diffFlowHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
9028 | cout<<"t = "<<t<<endl;\r | |
9029 | cout<<"pe = "<<pe<<endl;\r | |
9030 | exit(0);\r | |
9031 | }\r | |
9032 | for(Int_t index=0;index<4;index++) \r | |
9033 | {\r | |
9034 | diffFlow[t][pe][index] = dynamic_cast<TH1D*>(diffFlowHistList[t][pe]->FindObject(Form("%s, %s, %s, %s",diffFlowName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),differentialFlowIndex[index].Data())));\r | |
9035 | if(diffFlow[t][pe][index])\r | |
9036 | {\r | |
9037 | this->SetDiffFlow(diffFlow[t][pe][index],t,pe,index);\r | |
9038 | } else \r | |
9039 | {\r | |
9040 | cout<<"WARNING: diffFlow[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
9041 | cout<<"t = "<<t<<endl;\r | |
9042 | cout<<"pe = "<<pe<<endl;\r | |
9043 | cout<<"index = "<<index<<endl;\r | |
9044 | exit(0); \r | |
9045 | } \r | |
9046 | } // end of for(Int_t index=0;index<4;index++)\r | |
9047 | // differential covariances:\r | |
9048 | diffFlowCovariancesHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Covariances of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())));\r | |
9049 | if(!diffFlowCovariancesHistList[t][pe])\r | |
9050 | { \r | |
9051 | cout<<"WARNING: diffFlowCovariancesHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
9052 | cout<<"t = "<<t<<endl;\r | |
9053 | cout<<"pe = "<<pe<<endl;\r | |
9054 | exit(0);\r | |
9055 | }\r | |
9056 | for(Int_t covIndex=0;covIndex<5;covIndex++) \r | |
9057 | {\r | |
9058 | diffFlowCovariances[t][pe][covIndex] = dynamic_cast<TH1D*>(diffFlowCovariancesHistList[t][pe]->FindObject(Form("%s, %s, %s, %s",diffFlowCovariancesName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),covarianceName[covIndex].Data())));\r | |
9059 | if(diffFlowCovariances[t][pe][covIndex])\r | |
9060 | {\r | |
9061 | this->SetDiffFlowCovariances(diffFlowCovariances[t][pe][covIndex],t,pe,covIndex);\r | |
9062 | } else \r | |
9063 | {\r | |
9064 | cout<<"WARNING: diffFlowCovariances[t][pe][covIndex] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
9065 | cout<<"t = "<<t<<endl;\r | |
9066 | cout<<"pe = "<<pe<<endl;\r | |
9067 | cout<<"covIndex = "<<covIndex<<endl;\r | |
9068 | exit(0); \r | |
9069 | } \r | |
9070 | } // end of for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index \r | |
9071 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
9072 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI \r | |
9073 | // sum of event weights for reduced correlations:\r | |
9074 | TList *diffFlowSumOfEventWeightsHistList[2][2][2] = {{{NULL}}};\r | |
9075 | TString diffFlowSumOfEventWeightsName = "fDiffFlowSumOfEventWeights";\r | |
9076 | diffFlowSumOfEventWeightsName += fAnalysisLabel->Data(); \r | |
9077 | TH1D *diffFlowSumOfEventWeights[2][2][2][4] = {{{{NULL}}}};\r | |
9078 | for(Int_t t=0;t<2;t++) // type is RP or POI\r | |
9079 | { \r | |
9080 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
9081 | { \r | |
9082 | for(Int_t p=0;p<2;p++) // power of event weights is either 1 or 2\r | |
9083 | {\r | |
9084 | diffFlowSumOfEventWeightsHistList[t][pe][p] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Sum of %s event weights (%s, %s)",powerFlag[p].Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data())));\r | |
9085 | if(!diffFlowSumOfEventWeightsHistList[t][pe][p])\r | |
9086 | { \r | |
9087 | cout<<"WARNING: diffFlowSumOfEventWeightsHistList[t][pe][p] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
9088 | cout<<"t = "<<t<<endl;\r | |
9089 | cout<<"pe = "<<pe<<endl;\r | |
9090 | cout<<"power = "<<p<<endl;\r | |
9091 | exit(0);\r | |
9092 | }\r | |
9093 | for(Int_t ew=0;ew<4;ew++) // index of reduced correlation\r | |
9094 | {\r | |
9095 | diffFlowSumOfEventWeights[t][pe][p][ew] = dynamic_cast<TH1D*>(diffFlowSumOfEventWeightsHistList[t][pe][p]->FindObject(Form("%s, %s, %s, %s, %s",diffFlowSumOfEventWeightsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),powerFlag[p].Data(),reducedCorrelationIndex[ew].Data()))); \r | |
9096 | if(diffFlowSumOfEventWeights[t][pe][p][ew])\r | |
9097 | {\r | |
9098 | this->SetDiffFlowSumOfEventWeights(diffFlowSumOfEventWeights[t][pe][p][ew],t,pe,p,ew);\r | |
9099 | } else \r | |
9100 | {\r | |
9101 | cout<<"WARNING: diffFlowSumOfEventWeights[t][pe][p][ew] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
9102 | cout<<"t = "<<t<<endl;\r | |
9103 | cout<<"pe = "<<pe<<endl;\r | |
9104 | cout<<"power = "<<p<<endl;\r | |
9105 | cout<<"ew = "<<ew<<endl;\r | |
9106 | exit(0); \r | |
9107 | } \r | |
9108 | }\r | |
9109 | } // end of for(Int_t p=0;p<2;p++) // power of event weights is either 1 or 2\r | |
9110 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
9111 | } // end of for(Int_t t=0;t<2;t++) // type is RP or POI\r | |
9112 | // \r | |
9113 | TList *diffFlowSumOfProductOfEventWeightsHistList[2][2] = {{NULL}};\r | |
9114 | TString diffFlowSumOfProductOfEventWeightsName = "fDiffFlowSumOfProductOfEventWeights";\r | |
9115 | diffFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); \r | |
9116 | TH1D *diffFlowSumOfProductOfEventWeights[2][2][8][8] = {{{{NULL}}}};\r | |
9117 | for(Int_t t=0;t<2;t++) // type is RP or POI\r | |
9118 | { \r | |
9119 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
9120 | { \r | |
9121 | diffFlowSumOfProductOfEventWeightsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Sum of products of event weights (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())));\r | |
9122 | if(!diffFlowSumOfProductOfEventWeightsHistList[t][pe])\r | |
9123 | { \r | |
9124 | cout<<"WARNING: diffFlowSumOfProductOfEventWeightsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
9125 | cout<<"t = "<<t<<endl;\r | |
9126 | cout<<"pe = "<<pe<<endl;\r | |
9127 | exit(0);\r | |
9128 | }\r | |
9129 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index\r | |
9130 | {\r | |
9131 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index\r | |
9132 | {\r | |
9133 | diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] = dynamic_cast<TH1D*>(diffFlowSumOfProductOfEventWeightsHistList[t][pe]->FindObject(Form("%s, %s, %s, %s, %s",diffFlowSumOfProductOfEventWeightsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),mixedCorrelationIndex[mci1].Data(),mixedCorrelationIndex[mci2].Data()))); \r | |
9134 | if(diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2])\r | |
9135 | {\r | |
9136 | this->SetDiffFlowSumOfProductOfEventWeights(diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2],t,pe,mci1,mci2);\r | |
9137 | } else \r | |
9138 | {\r | |
9139 | cout<<"WARNING: diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] is NULL in AFAWQC::GPFDFH() !!!!"<<endl;\r | |
9140 | cout<<"t = "<<t<<endl;\r | |
9141 | cout<<"pe = "<<pe<<endl;\r | |
9142 | cout<<"mci1 = "<<mci1<<endl;\r | |
9143 | cout<<"mci2 = "<<mci2<<endl;\r | |
9144 | exit(0); \r | |
9145 | } \r | |
9146 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here\r | |
9147 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index\r | |
9148 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index\r | |
9149 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
9150 | } // end of for(Int_t t=0;t<2;t++) // type is RP or POI\r | |
9151 | \r | |
9152 | } // end void AliFlowAnalysisWithQCumulants::GetPointersForDiffFlowHistograms(TList *outputListHistos)\r | |
9153 | \r | |
9154 | \r | |
9155 | //================================================================================================================================\r | |
9156 | \r | |
9157 | \r | |
9158 | void AliFlowAnalysisWithQCumulants::BookEverythingForDifferentialFlow()\r | |
9159 | {\r | |
9160 | // Book all histograms and profiles needed for differential flow.\r | |
9161 | // a) Define flags locally (to be improved: should I promote flags to data members?);\r | |
9162 | // b) Book profile to hold all flags for differential flow;\r | |
9163 | // c) Book e-b-e quantities;\r | |
9164 | // d) Book profiles;\r | |
9165 | // e) Book histograms holding final results. \r | |
9166 | \r | |
9167 | // a) Define flags locally (to be improved: should I promote flags to data members?): \r | |
9168 | TString typeFlag[2] = {"RP","POI"}; \r | |
9169 | TString ptEtaFlag[2] = {"p_{T}","#eta"};\r | |
9170 | TString powerFlag[2] = {"linear","quadratic"};\r | |
9171 | TString differentialCumulantIndex[4] = {"QC{2'}","QC{4'}","QC{6'}","QC{8'}"}; \r | |
9172 | TString differentialFlowIndex[4] = {"v'{2}","v'{4}","v'{6}","v'{8}"}; \r | |
9173 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"};\r | |
9174 | TString mixedCorrelationIndex[8] = {"<2>","<2'>","<4>","<4'>","<6>","<6'>","<8>","<8'>"};\r | |
9175 | TString covarianceName[5] = {"Cov(<2>,<2'>)","Cov(<2>,<4'>)","Cov(<4>,<2'>)","Cov(<4>,<4'>)","Cov(<2'>,<4'>)"}; \r | |
9176 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta};\r | |
9177 | Double_t minPtEta[2] = {fPtMin,fEtaMin};\r | |
9178 | Double_t maxPtEta[2] = {fPtMax,fEtaMax};\r | |
9179 | \r | |
9180 | // b) Book profile to hold all flags for differential flow:\r | |
9181 | TString diffFlowFlagsName = "fDiffFlowFlags";\r | |
9182 | diffFlowFlagsName += fAnalysisLabel->Data();\r | |
9183 | fDiffFlowFlags = new TProfile(diffFlowFlagsName.Data(),"Flags for Differential Flow",4,0,4);\r | |
9184 | fDiffFlowFlags->SetTickLength(-0.01,"Y");\r | |
9185 | fDiffFlowFlags->SetMarkerStyle(25);\r | |
9186 | fDiffFlowFlags->SetLabelSize(0.05);\r | |
9187 | fDiffFlowFlags->SetLabelOffset(0.02,"Y");\r | |
9188 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(1,"Particle Weights");\r | |
9189 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(2,"Event Weights");\r | |
9190 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(3,"Corrected for NUA?");\r | |
9191 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(4,"Calculated 2D flow?");\r | |
9192 | fDiffFlowList->Add(fDiffFlowFlags);\r | |
9193 | \r | |
9194 | // c) Book e-b-e quantities:\r | |
9195 | // Event-by-event r_{m*n,k}(pt,eta), p_{m*n,k}(pt,eta) and q_{m*n,k}(pt,eta)\r | |
9196 | // Explanantion of notation:\r | |
9197 | // 1.) n is harmonic, m is multiple of harmonic;\r | |
9198 | // 2.) k is power of particle weight;\r | |
9199 | // 3.) r_{m*n,k}(pt,eta) = Q-vector evaluated in harmonic m*n for RPs in particular (pt,eta) bin (i-th RP is weighted with w_i^k); \r | |
9200 | // 4.) p_{m*n,k}(pt,eta) = Q-vector evaluated in harmonic m*n for POIs in particular (pt,eta) bin \r | |
9201 | // (if i-th POI is also RP, than it is weighted with w_i^k); \r | |
9202 | // 5.) q_{m*n,k}(pt,eta) = Q-vector evaluated in harmonic m*n for particles which are both RPs and POIs in particular (pt,eta) bin \r | |
9203 | // (i-th RP&&POI is weighted with w_i^k) \r | |
9204 | \r | |
9205 | // 1D:\r | |
9206 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP && POI )\r | |
9207 | { \r | |
9208 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
9209 | {\r | |
9210 | for(Int_t m=0;m<4;m++) // multiple of harmonic\r | |
9211 | {\r | |
9212 | for(Int_t k=0;k<9;k++) // power of particle weight\r | |
9213 | {\r | |
9214 | fReRPQ1dEBE[t][pe][m][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%dpower%dRe",t,pe,m,k),\r | |
9215 | Form("TypeFlag%dpteta%dmultiple%dpower%dRe",t,pe,m,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); \r | |
9216 | fImRPQ1dEBE[t][pe][m][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%dpower%dIm",t,pe,m,k),\r | |
9217 | Form("TypeFlag%dpteta%dmultiple%dpower%dIm",t,pe,m,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); \r | |
9218 | }\r | |
9219 | }\r | |
9220 | }\r | |
9221 | } \r | |
9222 | // to be improved (add explanation of fs1dEBE[t][pe][k]): \r | |
9223 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI )\r | |
9224 | { \r | |
9225 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
9226 | {\r | |
9227 | for(Int_t k=0;k<9;k++) // power of particle weight\r | |
9228 | {\r | |
9229 | fs1dEBE[t][pe][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%d",t,pe,k),\r | |
9230 | Form("TypeFlag%dpteta%dmultiple%d",t,pe,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); \r | |
9231 | }\r | |
9232 | }\r | |
9233 | } \r | |
9234 | // 2D:\r | |
9235 | TProfile2D styleRe("typeMultiplePowerRe","typeMultiplePowerRe",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax);\r | |
9236 | TProfile2D styleIm("typeMultiplePowerIm","typeMultiplePowerIm",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax);\r | |
9237 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI )\r | |
9238 | { \r | |
9239 | for(Int_t m=0;m<4;m++)\r | |
9240 | {\r | |
9241 | for(Int_t k=0;k<9;k++)\r | |
9242 | {\r | |
9243 | fReRPQ2dEBE[t][m][k] = (TProfile2D*)styleRe.Clone(Form("typeFlag%dmultiple%dpower%dRe",t,m,k)); \r | |
9244 | fImRPQ2dEBE[t][m][k] = (TProfile2D*)styleIm.Clone(Form("typeFlag%dmultiple%dpower%dIm",t,m,k));\r | |
9245 | }\r | |
9246 | } \r | |
9247 | } \r | |
9248 | TProfile2D styleS("typePower","typePower",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax);\r | |
9249 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI )\r | |
9250 | { \r | |
9251 | for(Int_t k=0;k<9;k++)\r | |
9252 | {\r | |
9253 | fs2dEBE[t][k] = (TProfile2D*)styleS.Clone(Form("typeFlag%dpower%d",t,k));\r | |
9254 | }\r | |
9255 | }\r | |
9256 | // reduced correlations e-b-e:\r | |
9257 | TString diffFlowCorrelationsEBEName = "fDiffFlowCorrelationsEBE";\r | |
9258 | diffFlowCorrelationsEBEName += fAnalysisLabel->Data();\r | |
9259 | for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
9260 | { \r | |
9261 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
9262 | {\r | |
9263 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index\r | |
9264 | {\r | |
9265 | fDiffFlowCorrelationsEBE[t][pe][rci] = new TH1D(Form("%s, %s, %s, %s",diffFlowCorrelationsEBEName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),Form("%s, %s, %s, %s",diffFlowCorrelationsEBEName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]);\r | |
9266 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index\r | |
9267 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta \r | |
9268 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
9269 | \r | |
9270 | // d) Book profiles;\r | |
9271 | // reduced correlations:\r | |
9272 | TString diffFlowCorrelationsProName = "fDiffFlowCorrelationsPro";\r | |
9273 | diffFlowCorrelationsProName += fAnalysisLabel->Data();\r | |
9274 | for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
9275 | { \r | |
9276 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
9277 | {\r | |
9278 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index\r | |
9279 | {\r | |
9280 | // reduced correlations:\r | |
9281 | fDiffFlowCorrelationsPro[t][pe][rci] = new TProfile(Form("%s, %s, %s, %s",diffFlowCorrelationsProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),Form("%s, %s, %s, %s",diffFlowCorrelationsProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe],"s");\r | |
9282 | fDiffFlowCorrelationsPro[t][pe][rci]->SetXTitle(ptEtaFlag[pe].Data());\r | |
9283 | fDiffFlowCorrelationsProList[t][pe]->Add(fDiffFlowCorrelationsPro[t][pe][rci]); // to be improved (add dedicated list to hold reduced correlations)\r | |
9284 | } // end of for(Int_t rci=0;rci<4;rci++) // correlation index\r | |
9285 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta \r | |
9286 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
9287 | \r | |
9288 | // e) Book histograms holding final results. \r | |
9289 | // reduced correlations:\r | |
9290 | TString diffFlowCorrelationsHistName = "fDiffFlowCorrelationsHist";\r | |
9291 | diffFlowCorrelationsHistName += fAnalysisLabel->Data();\r | |
9292 | // differential covariances:\r | |
9293 | TString diffFlowCovariancesName = "fDiffFlowCovariances";\r | |
9294 | diffFlowCovariancesName += fAnalysisLabel->Data();\r | |
9295 | // differential Q-cumulants:\r | |
9296 | TString diffFlowCumulantsName = "fDiffFlowCumulants";\r | |
9297 | diffFlowCumulantsName += fAnalysisLabel->Data();\r | |
9298 | // differential flow:\r | |
9299 | TString diffFlowName = "fDiffFlow";\r | |
9300 | diffFlowName += fAnalysisLabel->Data();\r | |
9301 | for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
9302 | { \r | |
9303 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
9304 | {\r | |
9305 | for(Int_t index=0;index<4;index++) \r | |
9306 | {\r | |
9307 | // reduced correlations:\r | |
9308 | fDiffFlowCorrelationsHist[t][pe][index] = new TH1D(Form("%s, %s, %s, %s",diffFlowCorrelationsHistName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[index].Data()),Form("%s, %s, %s, %s",diffFlowCorrelationsHistName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[index].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]);\r | |
9309 | fDiffFlowCorrelationsHist[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data());\r | |
9310 | fDiffFlowCorrelationsHistList[t][pe]->Add(fDiffFlowCorrelationsHist[t][pe][index]); \r | |
9311 | // differential Q-cumulants:\r | |
9312 | fDiffFlowCumulants[t][pe][index] = new TH1D(Form("%s, %s, %s, %s",diffFlowCumulantsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),differentialCumulantIndex[index].Data()),Form("%s, %s, %s, %s",diffFlowCumulantsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),differentialCumulantIndex[index].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]);\r | |
9313 | fDiffFlowCumulants[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data());\r | |
9314 | fDiffFlowCumulantsHistList[t][pe]->Add(fDiffFlowCumulants[t][pe][index]); \r | |
9315 | // differential flow estimates from Q-cumulants:\r | |
9316 | fDiffFlow[t][pe][index] = new TH1D(Form("%s, %s, %s, %s",diffFlowName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),differentialFlowIndex[index].Data()),Form("%s, %s, %s, %s",diffFlowName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),differentialFlowIndex[index].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]);\r | |
9317 | fDiffFlow[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data());\r | |
9318 | fDiffFlowHistList[t][pe]->Add(fDiffFlow[t][pe][index]); \r | |
9319 | } // end of for(Int_t index=0;index<4;index++) \r | |
9320 | for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index \r | |
9321 | {\r | |
9322 | // differential covariances:\r | |
9323 | fDiffFlowCovariances[t][pe][covIndex] = new TH1D(Form("%s, %s, %s, %s",diffFlowCovariancesName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),covarianceName[covIndex].Data()),Form("%s, %s, %s, %s",diffFlowCovariancesName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),covarianceName[covIndex].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]);\r | |
9324 | fDiffFlowCovariances[t][pe][covIndex]->SetXTitle(ptEtaFlag[pe].Data());\r | |
9325 | fDiffFlowCovariancesHistList[t][pe]->Add(fDiffFlowCovariances[t][pe][covIndex]); \r | |
9326 | } // end of for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index\r | |
9327 | // products of both types of correlations: \r | |
9328 | TString diffFlowProductOfCorrelationsProName = "fDiffFlowProductOfCorrelationsPro";\r | |
9329 | diffFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); \r | |
9330 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index\r | |
9331 | {\r | |
9332 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index\r | |
9333 | {\r | |
9334 | fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2] = new TProfile(Form("%s, %s, %s, %s, %s",diffFlowProductOfCorrelationsProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),mixedCorrelationIndex[mci1].Data(),mixedCorrelationIndex[mci2].Data()),Form("%s, %s, %s, %s #times %s",diffFlowProductOfCorrelationsProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),mixedCorrelationIndex[mci1].Data(),mixedCorrelationIndex[mci2].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); \r | |
9335 | fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]->SetXTitle(ptEtaFlag[pe].Data());\r | |
9336 | fDiffFlowProductOfCorrelationsProList[t][pe]->Add(fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]); \r | |
9337 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here\r | |
9338 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index\r | |
9339 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index \r | |
9340 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta \r | |
9341 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
9342 | // sums of event weights for reduced correlations: \r | |
9343 | TString diffFlowSumOfEventWeightsName = "fDiffFlowSumOfEventWeights";\r | |
9344 | diffFlowSumOfEventWeightsName += fAnalysisLabel->Data(); \r | |
9345 | for(Int_t t=0;t<2;t++) // type is RP or POI\r | |
9346 | { \r | |
9347 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
9348 | { \r | |
9349 | for(Int_t p=0;p<2;p++) // power of weights is either 1 or 2\r | |
9350 | {\r | |
9351 | for(Int_t ew=0;ew<4;ew++) // index of reduced correlation\r | |
9352 | {\r | |
9353 | fDiffFlowSumOfEventWeights[t][pe][p][ew] = new TH1D(Form("%s, %s, %s, %s, %s",diffFlowSumOfEventWeightsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),powerFlag[p].Data(),reducedCorrelationIndex[ew].Data()),Form("%s, %s, %s, power = %s, %s",diffFlowSumOfEventWeightsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),powerFlag[p].Data(),reducedCorrelationIndex[ew].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); \r | |
9354 | fDiffFlowSumOfEventWeights[t][pe][p][ew]->SetXTitle(ptEtaFlag[pe].Data());\r | |
9355 | fDiffFlowSumOfEventWeightsHistList[t][pe][p]->Add(fDiffFlowSumOfEventWeights[t][pe][p][ew]); // to be improved (add dedicated list to hold all this)\r | |
9356 | }\r | |
9357 | }\r | |
9358 | }\r | |
9359 | } \r | |
9360 | // sum of products of event weights for both types of correlations: \r | |
9361 | TString diffFlowSumOfProductOfEventWeightsName = "fDiffFlowSumOfProductOfEventWeights";\r | |
9362 | diffFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); \r | |
9363 | for(Int_t t=0;t<2;t++) // type is RP or POI\r | |
9364 | {\r | |
9365 | for(Int_t pe=0;pe<2;pe++) // pt or eta\r | |
9366 | { \r | |
9367 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index\r | |
9368 | {\r | |
9369 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index\r | |
9370 | {\r | |
9371 | fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] = new TH1D(Form("%s, %s, %s, %s, %s",diffFlowSumOfProductOfEventWeightsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),mixedCorrelationIndex[mci1].Data(),mixedCorrelationIndex[mci2].Data()),Form("%s, %s, %s, %s #times %s",diffFlowSumOfProductOfEventWeightsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),mixedCorrelationIndex[mci1].Data(),mixedCorrelationIndex[mci2].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); \r | |
9372 | fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]->SetXTitle(ptEtaFlag[pe].Data());\r | |
9373 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]->Add(fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]); \r | |
9374 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here\r | |
9375 | }\r | |
9376 | }\r | |
9377 | }\r | |
9378 | } \r | |
9379 | \r | |
9380 | \r | |
9381 | \r | |
9382 | /*\r | |
9383 | \r | |
9384 | \r | |
9385 | \r | |
9386 | \r | |
9387 | TString pWeightsFlag[2] = {"not used","used"}; // to be improved (do I need this here?)\r | |
9388 | TString eWeightsFlag[2] = {"exact","non-exact"}; // to be improved (do I need this here?)\r | |
9389 | //TString sinCosFlag[2] = {"sin","cos"}; // to be improved (do I need this here?)\r | |
9390 | TString nuaFlag[2] = {"not corrected","corrected"}; // nua = non-uniform acceptance // to be improved (do I need this here?)\r | |
9391 | \r | |
9392 | // book all 1D profiles:\r | |
9393 | // pt:\r | |
9394 | TProfile styleProfilePt("","",fnBinsPt,fPtMin,fPtMax);\r | |
9395 | styleProfilePt.SetXTitle("p_{t}");\r | |
9396 | // eta:\r | |
9397 | TProfile styleProfileEta("","",fnBinsEta,fEtaMin,fEtaMax);\r | |
9398 | styleProfileEta.SetXTitle("#eta");\r | |
9399 | \r | |
9400 | \r | |
9401 | \r | |
9402 | // book all 2D profiles and add to appropriate lists:\r | |
9403 | TProfile2D styleProfile("","",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax);\r | |
9404 | styleProfile.SetXTitle("p_{t}");\r | |
9405 | styleProfile.SetYTitle("#eta");\r | |
9406 | TString correlationName[4] = {"<2'>","<4'>","<6'>","<8'>"};\r | |
9407 | TString cumulantName[4] = {"QC{2'}","QC{4'}","QC{6'}","QC{8'}"};\r | |
9408 | TString productOfCorrelationsName[5] = {"<2><2'>","<2><4'>","<4><2'>","<4><4'>","<2'><4'>"};\r | |
9409 | TString correctionsSinTermsName[2] = {"sin(1)","sin(2)"};\r | |
9410 | TString correctionsCosTermsName[2] = {"cos(1)","cos(2)"};\r | |
9411 | TString correctionName[4] = {"corr. to QC{2'}","corr. to QC{4'}","corr. to QC{6'}","corr. to QC{8'}"};\r | |
9412 | TString covarianceName[5] = {"Cov(<2>,<2'>)","Cov(<2>,<4'>)","Cov(<4>,<2'>)","Cov(<4>,<4'>)","Cov(<2'>,<4'>)"}; \r | |
9413 | TString flowName[4] = {"v'{2}","v'{4}","v'{6}","v'{8}"}; \r | |
9414 | \r | |
9415 | // profile to hold flags for diffrential flow:\r | |
9416 | TString fFlagsForDiffFlowName = "fFlagsForDiffFlowQC";\r | |
9417 | fFlagsForDiffFlowName += fAnalysisLabel->Data();\r | |
9418 | fFlagsForDiffFlow = new TProfile(fFlagsForDiffFlowName.Data(),"Flags for differential flow",10,0,10);\r | |
9419 | fFlagsForDiffFlow->SetLabelSize(0.06);\r | |
9420 | (fFlagsForDiffFlow->GetXaxis())->SetBinLabel(1,"2D Flow");\r | |
9421 | fFlagsForDiffFlow->Fill(0.5,(Int_t)fCalculate2DFlow);\r | |
9422 | fDiffFlowList->Add(fFlagsForDiffFlow); \r | |
9423 | \r | |
9424 | for(Int_t t=0;t<2;t++) // type: RP or POI\r | |
9425 | { \r | |
9426 | for(Int_t pW=0;pW<1+(Int_t)(fUsePhiWeights||fUsePtWeights||fUseEtaWeights);pW++) // weights: not used or used \r | |
9427 | {\r | |
9428 | for(Int_t eW=0;eW<2;eW++)\r | |
9429 | {\r | |
9430 | // correlations:\r | |
9431 | for(Int_t correlIndex=0;correlIndex<4;correlIndex++)\r | |
9432 | {\r | |
9433 | fCorrelationsPro[t][pW][eW][correlIndex] = (TProfile2D*)styleProfile.Clone(correlationName[correlIndex].Data());\r | |
9434 | fCorrelationsPro[t][pW][eW][correlIndex]->SetTitle(correlationName[correlIndex].Data()); \r | |
9435 | fDiffFlowCorrelations[t][pW][eW]->Add(fCorrelationsPro[t][pW][eW][correlIndex]);\r | |
9436 | }\r | |
9437 | // products of correlations:\r | |
9438 | for(Int_t productOfCorrelationsIndex=0;productOfCorrelationsIndex<5;productOfCorrelationsIndex++)\r | |
9439 | {\r | |
9440 | fProductsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex] = (TProfile2D*)styleProfile.Clone(productOfCorrelationsName[productOfCorrelationsIndex].Data());\r | |
9441 | fProductsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex]->SetTitle(productOfCorrelationsName[productOfCorrelationsIndex].Data()); \r | |
9442 | fDiffFlowProductsOfCorrelations[t][pW][eW]->Add(fProductsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex]);\r | |
9443 | }\r | |
9444 | // correction terms:\r | |
9445 | for(Int_t sc=0;sc<2;sc++)\r | |
9446 | {\r | |
9447 | for(Int_t correctionsIndex=0;correctionsIndex<2;correctionsIndex++)\r | |
9448 | {\r | |
9449 | if(sc==0)\r | |
9450 | {\r | |
9451 | fCorrectionTermsPro[t][pW][eW][sc][correctionsIndex] = (TProfile2D*)styleProfile.Clone(correctionsSinTermsName[correctionsIndex].Data());\r | |
9452 | fCorrectionTermsPro[t][pW][eW][sc][correctionsIndex]->SetTitle(correctionsSinTermsName[correctionsIndex].Data());\r | |
9453 | fDiffFlowCorrectionTerms[t][pW][eW][sc]->Add(fCorrectionTermsPro[t][pW][eW][sc][correctionsIndex]);\r | |
9454 | }\r | |
9455 | if(sc==1)\r | |
9456 | {\r | |
9457 | fCorrectionTermsPro[t][pW][eW][sc][correctionsIndex] = (TProfile2D*)styleProfile.Clone(correctionsCosTermsName[correctionsIndex].Data());\r | |
9458 | fCorrectionTermsPro[t][pW][eW][sc][correctionsIndex]->SetTitle(correctionsCosTermsName[correctionsIndex].Data());\r | |
9459 | fDiffFlowCorrectionTerms[t][pW][eW][sc]->Add(fCorrectionTermsPro[t][pW][eW][sc][correctionsIndex]);\r | |
9460 | } \r | |
9461 | }\r | |
9462 | }\r | |
9463 | } \r | |
9464 | } \r | |
9465 | }\r | |
9466 | \r | |
9467 | // book all 2D and 1D histograms for final results and store them in appropriate lists:\r | |
9468 | TH2D styleHistPtEta("","",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax);\r | |
9469 | styleHistPtEta.SetXTitle("p_{t}");\r | |
9470 | styleHistPtEta.SetYTitle("#eta");\r | |
9471 | TH1D styleHistPt("","",fnBinsPt,fPtMin,fPtMax);\r | |
9472 | styleHistPt.SetXTitle("p_{t}");\r | |
9473 | TH1D styleHistEta("","",fnBinsEta,fEtaMin,fEtaMax);\r | |
9474 | styleHistEta.SetXTitle("#eta");\r | |
9475 | for(Int_t t=0;t<2;t++) // RP or POI\r | |
9476 | {\r | |
9477 | // 2D:\r | |
9478 | fNonEmptyBins2D[t] = (TH2D*)styleHistPtEta.Clone(Form("%s, (p_{t},#eta)",typeFlag[t].Data()));\r | |
9479 | fNonEmptyBins2D[t]->SetTitle(Form("Non-empty bins: %s (p_{t},#eta)",typeFlag[t].Data())); \r | |
9480 | fDFRType[t]->Add(fNonEmptyBins2D[t]); \r | |
9481 | // 1D:\r | |
9482 | fNonEmptyBins1D[t][0] = (TH1D*)styleHistPt.Clone(Form("%s, p_{t}",typeFlag[t].Data()));\r | |
9483 | fNonEmptyBins1D[t][0]->SetTitle(Form("Non-empty bins: %s (p_{t})",typeFlag[t].Data())); \r | |
9484 | fDFRType[t]->Add(fNonEmptyBins1D[t][0]); \r | |
9485 | fNonEmptyBins1D[t][1] = (TH1D*)styleHistEta.Clone(Form("%s, #eta",typeFlag[t].Data()));\r | |
9486 | fNonEmptyBins1D[t][1]->SetTitle(Form("Non-empty bins: %s (#eta)",typeFlag[t].Data())); \r | |
9487 | fDFRType[t]->Add(fNonEmptyBins1D[t][1]); \r | |
9488 | \r | |
9489 | for(Int_t pW=0;pW<1+(Int_t)(fUsePhiWeights||fUsePtWeights||fUseEtaWeights);pW++) // particle weights not used or used\r | |
9490 | {\r | |
9491 | for(Int_t eW=0;eW<2;eW++)\r | |
9492 | {\r | |
9493 | // correlations:\r | |
9494 | for(Int_t correlIndex=0;correlIndex<4;correlIndex++)\r | |
9495 | {\r | |
9496 | // 2D:\r | |
9497 | fFinalCorrelations2D[t][pW][eW][correlIndex] = (TH2D*)styleHistPtEta.Clone(Form("%s, (p_{t},#eta)",correlationName[correlIndex].Data()));\r | |
9498 | fFinalCorrelations2D[t][pW][eW][correlIndex]->SetTitle(Form("%s (p_{t},#eta): %s, pWeights %s, eWeights %s",correlationName[correlIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())); \r | |
9499 | fDiffFlowFinalCorrelations[t][pW][eW]->Add(fFinalCorrelations2D[t][pW][eW][correlIndex]); \r | |
9500 | // 1D:\r | |
9501 | for(Int_t pe=0;pe<2;pe++) // pt or eta:\r | |
9502 | {\r | |
9503 | if(pe==0) \r | |
9504 | { \r | |
9505 | fFinalCorrelations1D[t][pW][eW][pe][correlIndex] = (TH1D*)styleHistPt.Clone(Form("%s, (p_{t})",correlationName[correlIndex].Data()));\r | |
9506 | fFinalCorrelations1D[t][pW][eW][pe][correlIndex]->SetTitle(Form("%s (p_{t}): %s, pWeights %s, eWeights %s",correlationName[correlIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())); \r | |
9507 | fDiffFlowFinalCorrelations[t][pW][eW]->Add(fFinalCorrelations1D[t][pW][eW][pe][correlIndex]); \r | |
9508 | }\r | |
9509 | if(pe==1)\r | |
9510 | {\r | |
9511 | fFinalCorrelations1D[t][pW][eW][pe][correlIndex] = (TH1D*)styleHistEta.Clone(Form("%s, (#eta)",correlationName[correlIndex].Data()));\r | |
9512 | fFinalCorrelations1D[t][pW][eW][pe][correlIndex]->SetTitle(Form("%s (#eta): %s, pWeights %s, eWeights %s",correlationName[correlIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())); \r | |
9513 | fDiffFlowFinalCorrelations[t][pW][eW]->Add(fFinalCorrelations1D[t][pW][eW][pe][correlIndex]); \r | |
9514 | } \r | |
9515 | } \r | |
9516 | } \r | |
9517 | // corrections:\r | |
9518 | for(Int_t correctionIndex=0;correctionIndex<4;correctionIndex++)\r | |
9519 | {\r | |
9520 | // 2D:\r | |
9521 | fFinalCorrections2D[t][pW][eW][correctionIndex] = (TH2D*)styleHistPtEta.Clone(Form("%s, (p_{t},#eta)",correctionName[correctionIndex].Data()));\r | |
9522 | fFinalCorrections2D[t][pW][eW][correctionIndex]->SetTitle(Form("%s (p_{t},#eta): %s, pWeights %s, eWeights %s",correctionName[correctionIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())); \r | |
9523 | fDiffFlowFinalCorrections[t][pW][eW]->Add(fFinalCorrections2D[t][pW][eW][correctionIndex]); \r | |
9524 | // 1D:\r | |
9525 | for(Int_t pe=0;pe<2;pe++) // pt or eta:\r | |
9526 | {\r | |
9527 | if(pe==0) \r | |
9528 | { \r | |
9529 | fFinalCorrections1D[t][pW][eW][pe][correctionIndex] = (TH1D*)styleHistPt.Clone(Form("%s, (p_{t})",correctionName[correctionIndex].Data()));\r | |
9530 | fFinalCorrections1D[t][pW][eW][pe][correctionIndex]->SetTitle(Form("%s (p_{t}): %s, pWeights %s, eWeights %s",correctionName[correctionIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())); \r | |
9531 | fDiffFlowFinalCorrections[t][pW][eW]->Add(fFinalCorrections1D[t][pW][eW][pe][correctionIndex]); \r | |
9532 | }\r | |
9533 | if(pe==1)\r | |
9534 | {\r | |
9535 | fFinalCorrections1D[t][pW][eW][pe][correctionIndex] = (TH1D*)styleHistEta.Clone(Form("%s, (#eta)",correctionName[correctionIndex].Data()));\r | |
9536 | fFinalCorrections1D[t][pW][eW][pe][correctionIndex]->SetTitle(Form("%s (#eta): %s, pWeights %s, eWeights %s",correctionName[correctionIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())); \r | |
9537 | fDiffFlowFinalCorrections[t][pW][eW]->Add(fFinalCorrections1D[t][pW][eW][pe][correctionIndex]); \r | |
9538 | } \r | |
9539 | } \r | |
9540 | }\r | |
9541 | // covariances:\r | |
9542 | for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++)\r | |
9543 | {\r | |
9544 | // 2D:\r | |
9545 | fFinalCovariances2D[t][pW][eW][covarianceIndex] = (TH2D*)styleHistPtEta.Clone(Form("%s, (p_{t},#eta)",covarianceName[covarianceIndex].Data()));\r | |
9546 | fFinalCovariances2D[t][pW][eW][covarianceIndex]->SetTitle(Form("%s (p_{t},#eta): %s, pWeights %s, eWeights %s",covarianceName[covarianceIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())); \r | |
9547 | fDiffFlowFinalCovariances[t][pW][eW]->Add(fFinalCovariances2D[t][pW][eW][covarianceIndex]); \r | |
9548 | // 1D:\r | |
9549 | for(Int_t pe=0;pe<2;pe++) // pt or eta:\r | |
9550 | {\r | |
9551 | if(pe==0) \r | |
9552 | { \r | |
9553 | fFinalCovariances1D[t][pW][eW][pe][covarianceIndex] = (TH1D*)styleHistPt.Clone(Form("%s, (p_{t})",covarianceName[covarianceIndex].Data()));\r | |
9554 | fFinalCovariances1D[t][pW][eW][pe][covarianceIndex]->SetTitle(Form("%s (p_{t}): %s, pWeights %s, eWeights %s",covarianceName[covarianceIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())); \r | |
9555 | fDiffFlowFinalCovariances[t][pW][eW]->Add(fFinalCovariances1D[t][pW][eW][pe][covarianceIndex]); \r | |
9556 | }\r | |
9557 | if(pe==1)\r | |
9558 | {\r | |
9559 | fFinalCovariances1D[t][pW][eW][pe][covarianceIndex] = (TH1D*)styleHistEta.Clone(Form("%s, (#eta)",covarianceName[covarianceIndex].Data()));\r | |
9560 | fFinalCovariances1D[t][pW][eW][pe][covarianceIndex]->SetTitle(Form("%s (#eta): %s, pWeights %s, eWeights %s",covarianceName[covarianceIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data())); \r | |
9561 | fDiffFlowFinalCovariances[t][pW][eW]->Add(fFinalCovariances1D[t][pW][eW][pe][covarianceIndex]); \r | |
9562 | } \r | |
9563 | } \r | |
9564 | }\r | |
9565 | for(Int_t nua=0;nua<2;nua++) // corrected or not \r | |
9566 | {\r | |
9567 | // cumulants:\r | |
9568 | for(Int_t cumulantIndex=0;cumulantIndex<4;cumulantIndex++)\r | |
9569 | {\r | |
9570 | // 2D:\r | |
9571 | fFinalCumulants2D[t][pW][eW][nua][cumulantIndex] = (TH2D*)styleHistPtEta.Clone(Form("%s, (p_{t},#eta)",cumulantName[cumulantIndex].Data()));\r | |
9572 | fFinalCumulants2D[t][pW][eW][nua][cumulantIndex]->SetTitle(Form("%s (p_{t},#eta): %s, pWeights %s, eWeights %s, %s for NUA",cumulantName[cumulantIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data(),nuaFlag[nua].Data())); \r | |
9573 | fDiffFlowFinalCumulants[t][pW][eW][nua]->Add(fFinalCumulants2D[t][pW][eW][nua][cumulantIndex]); \r | |
9574 | // pt:\r | |
9575 | fFinalCumulantsPt[t][pW][eW][nua][cumulantIndex] = (TH1D*)styleHistPt.Clone(Form("%s, (p_{t})",cumulantName[cumulantIndex].Data()));\r | |
9576 | fFinalCumulantsPt[t][pW][eW][nua][cumulantIndex]->SetTitle(Form("%s (p_{t}): %s, pWeights %s, eWeights %s, %s for NUA",cumulantName[cumulantIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data(),nuaFlag[nua].Data())); \r | |
9577 | fDiffFlowFinalCumulants[t][pW][eW][nua]->Add(fFinalCumulantsPt[t][pW][eW][nua][cumulantIndex]); \r | |
9578 | // eta: \r | |
9579 | fFinalCumulantsEta[t][pW][eW][nua][cumulantIndex] = (TH1D*)styleHistEta.Clone(Form("%s, (#eta)",cumulantName[cumulantIndex].Data()));\r | |
9580 | fFinalCumulantsEta[t][pW][eW][nua][cumulantIndex]->SetTitle(Form("%s (#eta): %s, pWeights %s, eWeights %s, %s for NUA",cumulantName[cumulantIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data(),nuaFlag[nua].Data())); \r | |
9581 | fDiffFlowFinalCumulants[t][pW][eW][nua]->Add(fFinalCumulantsEta[t][pW][eW][nua][cumulantIndex]); \r | |
9582 | } \r | |
9583 | // flow:\r | |
9584 | for(Int_t flowIndex=0;flowIndex<4;flowIndex++)\r | |
9585 | {\r | |
9586 | // 2D:\r | |
9587 | fFinalFlow2D[t][pW][eW][nua][flowIndex] = (TH2D*)styleHistPtEta.Clone(Form("%s, (p_{t},#eta)",flowName[flowIndex].Data()));\r | |
9588 | fFinalFlow2D[t][pW][eW][nua][flowIndex]->SetTitle(Form("%s (p_{t},#eta): %s, pWeights %s, eWeights %s, %s for NUA",flowName[flowIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data(),nuaFlag[nua].Data())); \r | |
9589 | fDiffFlowFinalFlow[t][pW][eW][nua]->Add(fFinalFlow2D[t][pW][eW][nua][flowIndex]); \r | |
9590 | // pt: \r | |
9591 | fFinalFlowPt[t][pW][eW][nua][flowIndex] = (TH1D*)styleHistPt.Clone(Form("%s, (p_{t})",flowName[flowIndex].Data()));\r | |
9592 | fFinalFlowPt[t][pW][eW][nua][flowIndex]->SetTitle(Form("%s (p_{t}): %s, pWeights %s, eWeights %s, %s for NUA",flowName[flowIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data(),nuaFlag[nua].Data())); \r | |
9593 | fDiffFlowFinalFlow[t][pW][eW][nua]->Add(fFinalFlowPt[t][pW][eW][nua][flowIndex]); \r | |
9594 | // eta:\r | |
9595 | fFinalFlowEta[t][pW][eW][nua][flowIndex] = (TH1D*)styleHistEta.Clone(Form("%s, (#eta)",flowName[flowIndex].Data()));\r | |
9596 | fFinalFlowEta[t][pW][eW][nua][flowIndex]->SetTitle(Form("%s (#eta): %s, pWeights %s, eWeights %s, %s for NUA",flowName[flowIndex].Data(),typeFlag[t].Data(),pWeightsFlag[pW].Data(),eWeightsFlag[eW].Data(),nuaFlag[nua].Data())); \r | |
9597 | fDiffFlowFinalFlow[t][pW][eW][nua]->Add(fFinalFlowEta[t][pW][eW][nua][flowIndex]); \r | |
9598 | }\r | |
9599 | } \r | |
9600 | } \r | |
9601 | } \r | |
9602 | } \r | |
9603 | \r | |
9604 | \r | |
9605 | \r | |
9606 | */ \r | |
9607 | \r | |
9608 | \r | |
9609 | \r | |
9610 | \r | |
9611 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForDifferentialFlow()\r | |
9612 | \r | |
9613 | \r | |
9614 | //================================================================================================================================\r | |
9615 | \r | |
9616 | /*\r | |
9617 | void AliFlowAnalysisWithQCumulants::CalculateCorrectionsForNUAForIntQcumulants() // to be improved (do I really need this method?)\r | |
9618 | {\r | |
9619 | // Calculate final corrections for non-uniform acceptance for Q-cumulants.\r | |
9620 | \r | |
9621 | // Corrections for non-uniform acceptance are stored in histogram fCorrectionsForNUA,\r | |
9622 | // binning of fCorrectionsForNUA is organized as follows:\r | |
9623 | //\r | |
9624 | // 1st bin: correction to QC{2}\r | |
9625 | // 2nd bin: correction to QC{4}\r | |
9626 | // 3rd bin: correction to QC{6}\r | |
9627 | // 4th bin: correction to QC{8}\r | |
9628 | \r | |
9629 | // shortcuts flags:\r | |
9630 | Int_t pW = (Int_t)(useParticleWeights);\r | |
9631 | \r | |
9632 | Int_t eW = -1;\r | |
9633 | \r | |
9634 | if(eventWeights == "exact")\r | |
9635 | {\r | |
9636 | eW = 0;\r | |
9637 | }\r | |
9638 | \r | |
9639 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms flag\r | |
9640 | {\r | |
9641 | if(!(fQCorrelations[pW][eW] && fQCorrections[pW][eW][sc] && fCorrections[pW][eW]))\r | |
9642 | {\r | |
9643 | cout<<"WARNING: fQCorrelations[pW][eW] && fQCorrections[pW][eW][sc] && fCorrections[pW][eW] is NULL in AFAWQC::CFCFNUAFIF() !!!!"<<endl;\r | |
9644 | cout<<"pW = "<<pW<<endl;\r | |
9645 | cout<<"eW = "<<eW<<endl;\r | |
9646 | cout<<"sc = "<<sc<<endl;\r | |
9647 | exit(0);\r | |
9648 | }\r | |
9649 | } \r | |
9650 | \r | |
9651 | // measured 2-, 4-, 6- and 8-particle azimuthal correlations (biased with non-uniform acceptance!):\r | |
9652 | Double_t two = fQCorrelations[pW][eW]->GetBinContent(1); // <<2>>\r | |
9653 | //Double_t four = fQCorrelations[pW][eW]->GetBinContent(11); // <<4>>\r | |
9654 | //Double_t six = fQCorrelations[pW][eW]->GetBinContent(24); // <<6>>\r | |
9655 | //Double_t eight = fQCorrelations[pW][eW]->GetBinContent(31); // <<8>>\r | |
9656 | \r | |
9657 | // correction terms to QC{2}:\r | |
9658 | // <<cos(n*phi1)>>^2\r | |
9659 | Double_t two1stTerm = pow(fQCorrections[pW][eW][1]->GetBinContent(1),2); \r | |
9660 | // <<sin(n*phi1)>>^2\r | |
9661 | Double_t two2ndTerm = pow(fQCorrections[pW][eW][0]->GetBinContent(1),2); \r | |
9662 | // final corrections for non-uniform acceptance to QC{2}:\r | |
9663 | Double_t correctionQC2 = -1.*two1stTerm-1.*two2ndTerm;\r | |
9664 | fCorrections[pW][eW]->SetBinContent(1,correctionQC2); \r | |
9665 | \r | |
9666 | // correction terms to QC{4}:\r | |
9667 | // <<cos(n*phi1)>> <<cos(n*(phi1-phi2-phi3))>>\r | |
9668 | Double_t four1stTerm = fQCorrections[pW][eW][1]->GetBinContent(1)*fQCorrections[pW][eW][1]->GetBinContent(3); \r | |
9669 | // <<sin(n*phi1)>> <<sin(n*(phi1-phi2-phi3))>>\r | |
9670 | Double_t four2ndTerm = fQCorrections[pW][eW][0]->GetBinContent(1)*fQCorrections[pW][eW][0]->GetBinContent(3); \r | |
9671 | // <<cos(n*(phi1+phi2))>>^2\r | |
9672 | Double_t four3rdTerm = pow(fQCorrections[pW][eW][1]->GetBinContent(2),2); \r | |
9673 | // <<sin(n*(phi1+phi2))>>^2\r | |
9674 | Double_t four4thTerm = pow(fQCorrections[pW][eW][0]->GetBinContent(2),2); \r | |
9675 | // <<cos(n*(phi1+phi2))>> (<<cos(n*phi1)>>^2 - <<sin(n*phi1)>>^2)\r | |
9676 | Double_t four5thTerm = fQCorrections[pW][eW][1]->GetBinContent(2)\r | |
9677 | * (pow(fQCorrections[pW][eW][1]->GetBinContent(1),2)-pow(fQCorrections[pW][eW][0]->GetBinContent(1),2));\r | |
9678 | // <<sin(n*(phi1+phi2))>> <<cos(n*phi1)>> <<sin(n*phi1)>>\r | |
9679 | Double_t four6thTerm = fQCorrections[pW][eW][0]->GetBinContent(2)\r | |
9680 | * fQCorrections[pW][eW][1]->GetBinContent(1)\r | |
9681 | * fQCorrections[pW][eW][0]->GetBinContent(1); \r | |
9682 | // <<cos(n*(phi1-phi2))>> (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2)\r | |
9683 | Double_t four7thTerm = two*(pow(fQCorrections[pW][eW][1]->GetBinContent(1),2)+pow(fQCorrections[pW][eW][0]->GetBinContent(1),2)); \r | |
9684 | // (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2)^2\r | |
9685 | Double_t four8thTerm = pow(pow(fQCorrections[pW][eW][1]->GetBinContent(1),2)+pow(fQCorrections[pW][eW][0]->GetBinContent(1),2),2); \r | |
9686 | // final correction to QC{4}:\r | |
9687 | Double_t correctionQC4 = -4.*four1stTerm+4.*four2ndTerm-four3rdTerm-four4thTerm\r | |
9688 | + 4.*four5thTerm+8.*four6thTerm+8.*four7thTerm-6.*four8thTerm; \r | |
9689 | fCorrections[pW][eW]->SetBinContent(2,correctionQC4); \r | |
9690 | \r | |
9691 | // ... to be improved (continued for 6th and 8th order) \r | |
9692 | \r | |
9693 | \r | |
9694 | } // end of AliFlowAnalysisWithQCumulants::CalculateCorrectionsForNUAForIntQcumulants()\r | |
9695 | */\r | |
9696 | \r | |
9697 | //================================================================================================================================\r | |
9698 | \r | |
9699 | \r | |
9700 | void AliFlowAnalysisWithQCumulants::CalculateQcumulantsCorrectedForNUAIntFlow()\r | |
9701 | {\r | |
9702 | // Calculate generalized Q-cumulants (cumulants corrected for non-unifom acceptance).\r | |
9703 | \r | |
9704 | // measured 2-, 4-, 6- and 8-particle correlations (biased by non-uniform acceptance!):\r | |
9705 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>>\r | |
9706 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>>\r | |
9707 | //Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>>\r | |
9708 | //Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>>\r | |
9709 | \r | |
9710 | // statistical error of measured 2-, 4-, 6- and 8-particle correlations:\r | |
9711 | //Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <<2>>\r | |
9712 | //Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <<4>>\r | |
9713 | //Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <<6>>\r | |
9714 | //Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <<8>>\r | |
9715 | \r | |
9716 | // QC{2}:\r | |
9717 | // <<cos(n*phi1)>>^2\r | |
9718 | Double_t two1stTerm = pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2); \r | |
9719 | //Double_t two1stTermErrorSquared = pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(1),2); \r | |
9720 | // <<sin(n*phi1)>>^2\r | |
9721 | Double_t two2ndTerm = pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2); \r | |
9722 | //Double_t two2ndTermErrorSquared = pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(1),2); \r | |
9723 | // generalized QC{2}:\r | |
9724 | Double_t gQC2 = two - two1stTerm - two2ndTerm; // to be improved (terminology, notation)\r | |
9725 | fIntFlowQcumulants->SetBinContent(1,gQC2); \r | |
9726 | //fIntFlowQcumulants->SetBinError(1,0.); // to be improved (propagate error) \r | |
9727 | \r | |
9728 | // QC{4}:\r | |
9729 | // <<cos(n*phi1)>> <<cos(n*(phi1-phi2-phi3))>>\r | |
9730 | Double_t four1stTerm = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1)\r | |
9731 | * fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(3); \r | |
9732 | // <<sin(n*phi1)>> <<sin(n*(phi1-phi2-phi3))>>\r | |
9733 | Double_t four2ndTerm = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1)\r | |
9734 | * fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(3); \r | |
9735 | // <<cos(n*(phi1+phi2))>>^2\r | |
9736 | Double_t four3rdTerm = pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2),2); \r | |
9737 | // <<sin(n*(phi1+phi2))>>^2\r | |
9738 | Double_t four4thTerm = pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2),2); \r | |
9739 | // <<cos(n*(phi1+phi2))>> (<<cos(n*phi1)>>^2 - <<sin(n*phi1)>>^2)\r | |
9740 | Double_t four5thTerm = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2)\r | |
9741 | * (pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2)\r | |
9742 | - pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2));\r | |
9743 | // <<sin(n*(phi1+phi2))>> <<cos(n*phi1)>> <<sin(n*phi1)>>\r | |
9744 | Double_t four6thTerm = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2)\r | |
9745 | * fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1)\r | |
9746 | * fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1); \r | |
9747 | // <<cos(n*(phi1-phi2))>> (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2)\r | |
9748 | Double_t four7thTerm = two*(pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2)\r | |
9749 | + pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2)); \r | |
9750 | // (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2)^2\r | |
9751 | Double_t four8thTerm = pow(pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2)\r | |
9752 | + pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2),2); \r | |
9753 | // generalized QC{4}:\r | |
9754 | Double_t gQC4 = four-2.*pow(two,2.)-4.*four1stTerm+4.*four2ndTerm-four3rdTerm\r | |
9755 | - four4thTerm+4.*four5thTerm+8.*four6thTerm+8.*four7thTerm-6.*four8thTerm; \r | |
9756 | fIntFlowQcumulants->SetBinContent(2,gQC4); \r | |
9757 | //fIntFlowQcumulants->SetBinError(2,0.); // to be improved (propagate error) \r | |
9758 | \r | |
9759 | // ... to be improved (continued for 6th and 8th order) \r | |
9760 | \r | |
9761 | } // end of void AliFlowAnalysisWithQCumulants::CalculateQcumulantsCorrectedForNUAIntFlow()\r | |
9762 | \r | |
9763 | \r | |
9764 | //================================================================================================================================\r | |
9765 | \r | |
9766 | \r | |
9767 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectedForNUA()\r | |
9768 | {\r | |
9769 | // Calculate integrated flow from generalized Q-cumulants (corrected for non-uniform acceptance).\r | |
9770 | \r | |
9771 | // to be improved: add protection for NULL pointers, propagate statistical errors from \r | |
9772 | // measured correlations and correction terms\r | |
9773 | \r | |
9774 | // generalized Q-cumulants:\r | |
9775 | Double_t qc2 = fIntFlowQcumulants->GetBinContent(1); // QC{2} \r | |
9776 | Double_t qc4 = fIntFlowQcumulants->GetBinContent(2); // QC{4} \r | |
9777 | //Double_t qc6 = fIntFlowQcumulants->GetBinContent(3); // QC{6} \r | |
9778 | //Double_t qc8 = fIntFlowQcumulants->GetBinContent(4); // QC{8}\r | |
9779 | \r | |
9780 | // integrated flow estimates:\r | |
9781 | Double_t v2 = 0.; // v{2,QC} \r | |
9782 | Double_t v4 = 0.; // v{4,QC} \r | |
9783 | //Double_t v6 = 0.; // v{6,QC} \r | |
9784 | //Double_t v8 = 0.; // v{8,QC}\r | |
9785 | \r | |
9786 | // calculate integrated flow estimates from generalized Q-cumulants: \r | |
9787 | if(qc2>=0.) v2 = pow(qc2,1./2.); \r | |
9788 | if(qc4<=0.) v4 = pow(-1.*qc4,1./4.); \r | |
9789 | //if(qc6>=0.) v6 = pow((1./4.)*qc6,1./6.); \r | |
9790 | //if(qc8<=0.) v8 = pow((-1./33.)*qc8,1./8.); \r | |
9791 | \r | |
9792 | // store integrated flow estimates from generalized Q-cumulants:\r | |
9793 | fIntFlow->SetBinContent(1,v2);\r | |
9794 | fIntFlow->SetBinContent(2,v4);\r | |
9795 | //fIntFlow->SetBinContent(3,v6);\r | |
9796 | //fIntFlow->SetBinContent(4,v8);\r | |
9797 | \r | |
9798 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectedForNUA()\r | |
9799 | \r | |
9800 | \r | |
9801 | //================================================================================================================================\r | |
9802 | \r | |
9803 | \r | |
9804 | void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUAIntFlow() \r | |
9805 | {\r | |
9806 | // From profile fIntFlowCorrectionTermsForNUAPro[2] access measured corretion terms\r | |
9807 | // and their spread, correctly calculate the statistical errors and store the final \r | |
9808 | // results and statistical errors for correction terms in histogram fIntFlowCorrectionTermsForNUAHist[2].\r | |
9809 | //\r | |
9810 | // Remark: Statistical error of correction temrs is calculated as:\r | |
9811 | //\r | |
9812 | // statistical error = termA * spread * termB:\r | |
9813 | // termA = sqrt{sum_{i=1}^{N} w^2}/(sum_{i=1}^{N} w)\r | |
9814 | // termB = 1/sqrt(1-termA^2) \r | |
9815 | \r | |
9816 | /* // to be improved (implement protection here)\r | |
9817 | for(Int_t power=0;power<2;power++)\r | |
9818 | { \r | |
9819 | if(!(fIntFlowCorrelationsHist && fIntFlowCorrelationsPro && fIntFlowSumOfEventWeights[power])) \r | |
9820 | {\r | |
9821 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCorrelationsPro && fIntFlowSumOfEventWeights[power] is NULL in AFAWQC::FCIF() !!!!"<<endl;\r | |
9822 | cout<<"power = "<<power<<endl;\r | |
9823 | exit(0);\r | |
9824 | }\r | |
9825 | }\r | |
9826 | */\r | |
9827 | \r | |
9828 | for(Int_t sc=0;sc<2;sc++) // sin or cos correction terms \r | |
9829 | {\r | |
9830 | for(Int_t ci=1;ci<=10;ci++) // correction term index\r | |
9831 | {\r | |
9832 | Double_t correction = fIntFlowCorrectionTermsForNUAPro[sc]->GetBinContent(ci);\r | |
9833 | //Double_t spread = fIntFlowCorrectionTermsForNUAPro[sc]->GetBinError(ci);\r | |
9834 | //Double_t sumOfLinearEventWeights = fIntFlowSumOfEventWeights[0]->GetBinContent(ci);\r | |
9835 | //Double_t sumOfQuadraticEventWeights = fIntFlowSumOfEventWeights[1]->GetBinContent(ci);\r | |
9836 | //Double_t termA = 0.;\r | |
9837 | //Double_t termB = 0.;\r | |
9838 | //if(sumOfLinearEventWeights)\r | |
9839 | //{\r | |
9840 | // termA = pow(sumOfQuadraticEventWeights,0.5)/sumOfLinearEventWeights;\r | |
9841 | //} else\r | |
9842 | // {\r | |
9843 | // cout<<"WARNING: sumOfLinearEventWeights == 0 in AFAWQC::FCIF() !!!!"<<endl;\r | |
9844 | // cout<<" (for "<<2*ci<<"-particle correlation)"<<endl;\r | |
9845 | // }\r | |
9846 | /*\r | |
9847 | if(1.-pow(termA,2.) > 0.)\r | |
9848 | {\r | |
9849 | termB = 1./pow(1-pow(termA,2.),0.5);\r | |
9850 | } else\r | |
9851 | {\r | |
9852 | cout<<"WARNING: 1.-pow(termA,2.) <= 0 in AFAWQC::FCIF() !!!!"<<endl; \r | |
9853 | cout<<" (for "<<2*ci<<"-particle correlation)"<<endl;\r | |
9854 | } \r | |
9855 | Double_t statisticalError = termA * spread * termB;\r | |
9856 | */\r | |
9857 | fIntFlowCorrectionTermsForNUAHist[sc]->SetBinContent(ci,correction);\r | |
9858 | //fIntFlowCorrectionTermsForNUAHist[sc]->SetBinError(ci,statisticalError);\r | |
9859 | } // end of for(Int_t ci=1;ci<=10;ci++) // correction term index\r | |
9860 | } // end of for(Int sc=0;sc<2;sc++) // sin or cos correction terms \r | |
9861 | \r | |
9862 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUAIntFlow()\r | |
9863 | \r | |
9864 | \r | |
9865 | //================================================================================================================================\r | |
9866 | \r | |
9867 | \r | |
9868 | void AliFlowAnalysisWithQCumulants::GetPointersForNestedLoopsHistograms(TList *outputListHistos)\r | |
9869 | {\r | |
9870 | // Get pointers to all objects relevant for calculations with nested loops.\r | |
9871 | \r | |
9872 | // to be improved: harwired names for some objects here (fix this in paralel with method BookEverythingForNestedLoops())\r | |
9873 | \r | |
9874 | if(outputListHistos)\r | |
9875 | {\r | |
9876 | TList *nestedLoopsList = dynamic_cast<TList*>(outputListHistos->FindObject("Nested Loops"));\r | |
9877 | if(nestedLoopsList) \r | |
9878 | {\r | |
9879 | this->SetNestedLoopsList(nestedLoopsList);\r | |
9880 | } else\r | |
9881 | {\r | |
9882 | cout<<"WARNING: nestedLoopsList is NULL in AFAWQC::GPFNLH() !!!!"<<endl;\r | |
9883 | exit(0);\r | |
9884 | }\r | |
9885 | TString evaluateNestedLoopsName = "fEvaluateNestedLoops";\r | |
9886 | evaluateNestedLoopsName += fAnalysisLabel->Data(); \r | |
9887 | TProfile *evaluateNestedLoops = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(evaluateNestedLoopsName.Data()));\r | |
9888 | Bool_t bEvaluateNestedLoopsForIntFlow = kFALSE;\r | |
9889 | Bool_t bEvaluateNestedLoopsForDiffFlow = kFALSE;\r | |
9890 | if(evaluateNestedLoops)\r | |
9891 | {\r | |
9892 | this->SetEvaluateNestedLoops(evaluateNestedLoops);\r | |
9893 | bEvaluateNestedLoopsForIntFlow = (Int_t)evaluateNestedLoops->GetBinContent(1);\r | |
9894 | bEvaluateNestedLoopsForDiffFlow = (Int_t)evaluateNestedLoops->GetBinContent(2);\r | |
9895 | }\r | |
9896 | // nested loops relevant for integrated flow: \r | |
9897 | if(bEvaluateNestedLoopsForIntFlow)\r | |
9898 | {\r | |
9899 | TProfile *directCorrelations = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrelation"));\r | |
9900 | if(directCorrelations) this->SetDirectCorrelations(directCorrelations);\r | |
9901 | TProfile *directCorrectionsCos = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsCos"));\r | |
9902 | if(directCorrectionsCos) this->SetDirectCorrectionsCos(directCorrectionsCos);\r | |
9903 | TProfile *directCorrectionsSin = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsSin"));\r | |
9904 | if(directCorrectionsSin) this->SetDirectCorrectionsSin(directCorrectionsSin);\r | |
9905 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) // to be improved (this is a weak point, because now this method MUST be called after GPFWG where these booleans are set)\r | |
9906 | {\r | |
9907 | TProfile *directCorrelationsW = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrelationW"));\r | |
9908 | if(directCorrelationsW) this->SetDirectCorrelationsW(directCorrelationsW);\r | |
9909 | TProfile *directCorrectionsCosW = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsCosW"));\r | |
9910 | if(directCorrectionsCosW) this->SetDirectCorrectionsCosW(directCorrectionsCosW);\r | |
9911 | TProfile *directCorrectionsSinW = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsSinW")); \r | |
9912 | if(directCorrectionsSinW) this->SetDirectCorrectionsSinW(directCorrectionsSinW);\r | |
9913 | }\r | |
9914 | }\r | |
9915 | // nested loops relevant for differential flow: \r | |
9916 | if(bEvaluateNestedLoopsForDiffFlow)\r | |
9917 | {\r | |
9918 | TProfile *directCorrelationsDiffFlow = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrelationsDiffFlow"));\r | |
9919 | if(directCorrelationsDiffFlow) this->SetDirectCorrelationsDiffFlow(directCorrelationsDiffFlow);\r | |
9920 | TProfile *directCorrectionsDiffFlowCos = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsDiffFlowCos"));\r | |
9921 | if(directCorrectionsDiffFlowCos) this->SetDirectCorrectionsDiffFlowCos(directCorrectionsDiffFlowCos);\r | |
9922 | TProfile *directCorrectionsDiffFlowSin = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsDiffFlowSin"));\r | |
9923 | if(directCorrectionsDiffFlowSin) this->SetDirectCorrectionsDiffFlowSin(directCorrectionsDiffFlowSin);\r | |
9924 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) // to be improved (this is a weak point, because now this method MUST be called after GPFWG where these booleans are set)\r | |
9925 | {\r | |
9926 | TProfile *directCorrelationsDiffFlowW = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrelationsDiffFlowW")); \r | |
9927 | if(directCorrelationsDiffFlowW) this->SetDirectCorrelationsDiffFlowW(directCorrelationsDiffFlowW);\r | |
9928 | TProfile *directCorrectionsDiffFlowCosW = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsDiffFlowCosW"));\r | |
9929 | if(directCorrectionsDiffFlowCosW) this->SetDirectCorrectionsDiffFlowCosW(directCorrectionsDiffFlowCosW);\r | |
9930 | TProfile *directCorrectionsDiffFlowSinW = dynamic_cast<TProfile*>(nestedLoopsList->FindObject("fDirectCorrectionsDiffFlowSinW"));\r | |
9931 | if(directCorrectionsDiffFlowSinW) this->SetDirectCorrectionsDiffFlowSinW(directCorrectionsDiffFlowSinW);\r | |
9932 | }\r | |
9933 | } // end of if(bEvaluateNestedLoopsForDiffFlow)\r | |
9934 | } else\r | |
9935 | {\r | |
9936 | cout<<"WARNING: outputListHistos is NULL in AFAWQC::GPFNLH() !!!!"<<endl;\r | |
9937 | exit(0);\r | |
9938 | }\r | |
9939 | \r | |
9940 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForNestedLoopsHistograms(TList *outputListHistos)\r | |
9941 | \r | |
9942 | \r | |
9943 | //================================================================================================================================\r | |
9944 | \r | |
9945 | \r | |
9946 | void AliFlowAnalysisWithQCumulants::StoreHarmonic()\r | |
9947 | {\r | |
9948 | // Store flow harmonic in common control histograms.\r | |
9949 | \r | |
9950 | (fCommonHists->GetHarmonic())->Fill(0.5,fHarmonic);\r | |
9951 | (fCommonHists2nd->GetHarmonic())->Fill(0.5,fHarmonic);\r | |
9952 | (fCommonHists4th->GetHarmonic())->Fill(0.5,fHarmonic);\r | |
9953 | (fCommonHists6th->GetHarmonic())->Fill(0.5,fHarmonic);\r | |
9954 | (fCommonHists8th->GetHarmonic())->Fill(0.5,fHarmonic);\r | |
9955 | \r | |
9956 | } // end of void AliFlowAnalysisWithQCumulants::StoreHarmonic()\r | |
9957 | \r | |
9958 | \r | |
9959 | \r |