]>
Commit | Line | Data |
---|---|---|
489d5531 | 1 | /************************************************************************* |
2 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /********************************** | |
17 | * flow analysis with Q-cumulants * | |
18 | * * | |
ff70ca91 | 19 | * author: Ante Bilandzic * |
20 | * (abilandzic@gmail.com) * | |
489d5531 | 21 | *********************************/ |
22 | ||
23 | #define AliFlowAnalysisWithQCumulants_cxx | |
24 | ||
25 | #include "Riostream.h" | |
26 | #include "AliFlowCommonConstants.h" | |
27 | #include "AliFlowCommonHist.h" | |
28 | #include "AliFlowCommonHistResults.h" | |
29 | #include "TChain.h" | |
30 | ||
31 | #include "TFile.h" | |
32 | #include "TList.h" | |
33 | #include "TGraph.h" | |
34 | #include "TParticle.h" | |
35 | #include "TRandom3.h" | |
36 | #include "TStyle.h" | |
37 | #include "TProfile.h" | |
38 | #include "TProfile2D.h" | |
39 | #include "TProfile3D.h" | |
40 | #include "TMath.h" | |
41 | #include "TArrow.h" | |
42 | #include "TPaveLabel.h" | |
43 | #include "TCanvas.h" | |
44 | #include "AliFlowEventSimple.h" | |
45 | #include "AliFlowTrackSimple.h" | |
46 | #include "AliFlowAnalysisWithQCumulants.h" | |
47 | #include "TArrayD.h" | |
48 | #include "TRandom.h" | |
49 | #include "TF1.h" | |
50 | ||
51 | class TH1; | |
52 | class TH2; | |
53 | class TGraph; | |
54 | class TPave; | |
55 | class TLatex; | |
56 | class TMarker; | |
57 | class TRandom3; | |
58 | class TObjArray; | |
59 | class TList; | |
60 | class TCanvas; | |
61 | class TSystem; | |
62 | class TROOT; | |
63 | class AliFlowVector; | |
64 | class TVector; | |
65 | ||
66 | ||
67 | //================================================================================================================ | |
68 | ||
69 | ||
70 | ClassImp(AliFlowAnalysisWithQCumulants) | |
71 | ||
72 | AliFlowAnalysisWithQCumulants::AliFlowAnalysisWithQCumulants(): | |
73 | // 0.) base: | |
74 | fHistList(NULL), | |
75 | // 1.) common: | |
76 | fCommonHists(NULL), | |
77 | fCommonHists2nd(NULL), | |
78 | fCommonHists4th(NULL), | |
79 | fCommonHists6th(NULL), | |
80 | fCommonHists8th(NULL), | |
81 | fCommonHistsResults2nd(NULL), | |
82 | fCommonHistsResults4th(NULL), | |
83 | fCommonHistsResults6th(NULL), | |
84 | fCommonHistsResults8th(NULL), | |
85 | fnBinsPhi(0), | |
86 | fPhiMin(0), | |
87 | fPhiMax(0), | |
88 | fPhiBinWidth(0), | |
89 | fnBinsPt(0), | |
90 | fPtMin(0), | |
91 | fPtMax(0), | |
92 | fPtBinWidth(0), | |
93 | fnBinsEta(0), | |
94 | fEtaMin(0), | |
95 | fEtaMax(0), | |
96 | fEtaBinWidth(0), | |
97 | fHarmonic(2), | |
98 | fAnalysisLabel(NULL), | |
99 | // 2a.) particle weights: | |
100 | fWeightsList(NULL), | |
101 | fUsePhiWeights(kFALSE), | |
102 | fUsePtWeights(kFALSE), | |
103 | fUseEtaWeights(kFALSE), | |
104 | fUseParticleWeights(NULL), | |
105 | fPhiWeights(NULL), | |
106 | fPtWeights(NULL), | |
107 | fEtaWeights(NULL), | |
108 | // 2b.) event weights: | |
109 | fMultiplicityWeight(NULL), | |
110 | // 3.) integrated flow: | |
111 | fIntFlowList(NULL), | |
112 | fIntFlowProfiles(NULL), | |
113 | fIntFlowResults(NULL), | |
114 | fIntFlowFlags(NULL), | |
9da1a4f3 | 115 | fApplyCorrectionForNUA(kTRUE), |
2001bc3a | 116 | fApplyCorrectionForNUAVsM(kFALSE), |
9da1a4f3 | 117 | fnBinsMult(10000), |
067e9bc8 | 118 | fMinMult(0.), |
119 | fMaxMult(10000.), | |
489d5531 | 120 | fReQ(NULL), |
121 | fImQ(NULL), | |
122 | fSMpk(NULL), | |
123 | fIntFlowCorrelationsEBE(NULL), | |
124 | fIntFlowEventWeightsForCorrelationsEBE(NULL), | |
125 | fIntFlowCorrelationsAllEBE(NULL), | |
126 | fAvMultiplicity(NULL), | |
127 | fIntFlowCorrelationsPro(NULL), | |
128 | fIntFlowCorrelationsAllPro(NULL), | |
129 | fIntFlowExtraCorrelationsPro(NULL), | |
130 | fIntFlowProductOfCorrelationsPro(NULL), | |
0328db2d | 131 | fIntFlowProductOfCorrectionTermsForNUAPro(NULL), |
489d5531 | 132 | fIntFlowCorrelationsHist(NULL), |
133 | fIntFlowCorrelationsAllHist(NULL), | |
134 | fIntFlowCovariances(NULL), | |
135 | fIntFlowSumOfProductOfEventWeights(NULL), | |
0328db2d | 136 | fIntFlowCovariancesNUA(NULL), |
137 | fIntFlowSumOfProductOfEventWeightsNUA(NULL), | |
489d5531 | 138 | fIntFlowQcumulants(NULL), |
139 | fIntFlow(NULL), | |
2001bc3a | 140 | fIntFlowDetectorBias(NULL), |
489d5531 | 141 | // 4.) differential flow: |
142 | fDiffFlowList(NULL), | |
143 | fDiffFlowProfiles(NULL), | |
144 | fDiffFlowResults(NULL), | |
145 | fDiffFlowFlags(NULL), | |
146 | fCalculate2DFlow(kFALSE), | |
147 | // 5.) distributions: | |
57340a27 | 148 | fDistributionsList(NULL), |
149 | fDistributionsFlags(NULL), | |
489d5531 | 150 | fStoreDistributions(kFALSE), |
151 | // x.) debugging and cross-checking: | |
152 | fNestedLoopsList(NULL), | |
153 | fEvaluateIntFlowNestedLoops(kFALSE), | |
154 | fEvaluateDiffFlowNestedLoops(kFALSE), | |
155 | fMaxAllowedMultiplicity(10), | |
156 | fEvaluateNestedLoops(NULL), | |
157 | fIntFlowDirectCorrelations(NULL), | |
158 | fIntFlowExtraDirectCorrelations(NULL), | |
159 | fCrossCheckInPtBinNo(10), | |
3b552efe | 160 | fCrossCheckInEtaBinNo(20), |
489d5531 | 161 | fNoOfParticlesInBin(NULL) |
162 | { | |
163 | // constructor | |
164 | ||
165 | // base list to hold all output objects: | |
166 | fHistList = new TList(); | |
167 | fHistList->SetName("cobjQC"); | |
168 | fHistList->SetOwner(kTRUE); | |
169 | ||
170 | // list to hold histograms with phi, pt and eta weights: | |
171 | fWeightsList = new TList(); | |
172 | ||
173 | // multiplicity weight: | |
174 | fMultiplicityWeight = new TString("combinations"); | |
175 | ||
176 | // analysis label; | |
177 | fAnalysisLabel = new TString(); | |
178 | ||
179 | // initialize all arrays: | |
180 | this->InitializeArraysForIntFlow(); | |
181 | this->InitializeArraysForDiffFlow(); | |
182 | this->InitializeArraysForDistributions(); | |
183 | this->InitializeArraysForNestedLoops(); | |
184 | ||
185 | } // end of constructor | |
186 | ||
187 | ||
188 | //================================================================================================================ | |
189 | ||
190 | ||
191 | AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants() | |
192 | { | |
193 | // destructor | |
194 | ||
195 | delete fHistList; | |
196 | ||
197 | } // end of AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants() | |
198 | ||
199 | ||
200 | //================================================================================================================ | |
201 | ||
202 | ||
203 | void AliFlowAnalysisWithQCumulants::Init() | |
204 | { | |
3b552efe | 205 | // a) Cross check if the settings make sense before starting the QC adventure; |
489d5531 | 206 | // b) Access all common constants; |
207 | // c) Book all objects; | |
3b552efe | 208 | // d) Store flags for integrated and differential flow; |
489d5531 | 209 | // e) Store flags for distributions of corelations; |
210 | // f) Store harmonic which will be estimated. | |
3b552efe | 211 | |
489d5531 | 212 | //save old value and prevent histograms from being added to directory |
213 | //to avoid name clashes in case multiple analaysis objects are used | |
214 | //in an analysis | |
215 | Bool_t oldHistAddStatus = TH1::AddDirectoryStatus(); | |
216 | TH1::AddDirectory(kFALSE); | |
217 | ||
3b552efe | 218 | // a) Cross check if the settings make sense before starting the QC adventure; |
489d5531 | 219 | this->CrossCheckSettings(); |
220 | // b) Access all common constants: | |
221 | this->AccessConstants(); | |
222 | // c) Book all objects: | |
223 | this->BookAndFillWeightsHistograms(); | |
224 | this->BookAndNestAllLists(); | |
225 | this->BookCommonHistograms(); | |
226 | this->BookEverythingForIntegratedFlow(); | |
227 | this->BookEverythingForDifferentialFlow(); | |
228 | this->BookEverythingForDistributions(); | |
229 | this->BookEverythingForNestedLoops(); | |
230 | // d) Store flags for integrated and differential flow: | |
231 | this->StoreIntFlowFlags(); | |
3b552efe | 232 | this->StoreDiffFlowFlags(); |
489d5531 | 233 | // e) Store flags for distributions of corelations: |
234 | this->StoreFlagsForDistributions(); | |
235 | // f) Store harmonic which will be estimated: | |
236 | this->StoreHarmonic(); | |
237 | ||
238 | TH1::AddDirectory(oldHistAddStatus); | |
239 | } // end of void AliFlowAnalysisWithQCumulants::Init() | |
240 | ||
241 | ||
242 | //================================================================================================================ | |
243 | ||
244 | ||
245 | void AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent) | |
246 | { | |
247 | // Running over data only in this method. | |
248 | ||
249 | // a) Fill the common control histograms and call the method to fill fAvMultiplicity; | |
250 | // b) Loop over data and calculate e-b-e quantities; | |
251 | // c) Call all the methods; | |
252 | // d) Debugging and cross-checking (evaluate nested loops); | |
253 | // e) Reset all event by event quantities. | |
254 | ||
255 | Double_t dPhi = 0.; // azimuthal angle in the laboratory frame | |
256 | Double_t dPt = 0.; // transverse momentum | |
257 | Double_t dEta = 0.; // pseudorapidity | |
258 | ||
259 | Double_t wPhi = 1.; // phi weight | |
260 | Double_t wPt = 1.; // pt weight | |
261 | Double_t wEta = 1.; // eta weight | |
262 | ||
263 | Int_t nRP = anEvent->GetEventNSelTracksRP(); // number of RPs (i.e. number of particles used to determine the reaction plane) | |
9f33751d | 264 | |
489d5531 | 265 | // a) Fill the common control histograms and call the method to fill fAvMultiplicity: |
266 | this->FillCommonControlHistograms(anEvent); | |
267 | this->FillAverageMultiplicities(nRP); | |
268 | ||
269 | // b) Loop over data and calculate e-b-e quantities: | |
9f33751d | 270 | Int_t nPrim = anEvent->NumberOfTracks(); // nPrim = total number of primary tracks, i.e. nPrim = nRP + nPOI where: |
489d5531 | 271 | // nRP = # of particles used to determine the reaction plane; |
272 | // nPOI = # of particles of interest for a detailed flow analysis; | |
489d5531 | 273 | |
274 | AliFlowTrackSimple *aftsTrack = NULL; | |
275 | ||
276 | for(Int_t i=0;i<nPrim;i++) | |
277 | { | |
278 | aftsTrack=anEvent->GetTrack(i); | |
279 | if(aftsTrack) | |
280 | { | |
281 | if(!(aftsTrack->InRPSelection() || aftsTrack->InPOISelection())) continue; // consider only tracks which are RPs or POIs | |
282 | Int_t n = fHarmonic; // shortcut for the harmonic | |
283 | if(aftsTrack->InRPSelection()) // RP condition: | |
284 | { | |
285 | dPhi = aftsTrack->Phi(); | |
286 | dPt = aftsTrack->Pt(); | |
287 | dEta = aftsTrack->Eta(); | |
288 | if(fUsePhiWeights && fPhiWeights && fnBinsPhi) // determine phi weight for this particle: | |
289 | { | |
290 | wPhi = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*fnBinsPhi/TMath::TwoPi()))); | |
291 | } | |
292 | if(fUsePtWeights && fPtWeights && fnBinsPt) // determine pt weight for this particle: | |
293 | { | |
294 | wPt = fPtWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/fPtBinWidth))); | |
295 | } | |
296 | if(fUseEtaWeights && fEtaWeights && fEtaBinWidth) // determine eta weight for this particle: | |
297 | { | |
298 | wEta = fEtaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fEtaBinWidth))); | |
299 | } | |
300 | ||
301 | // integrated flow: | |
302 | // calculate Re[Q_{m*n,k}] and Im[Q_{m*n,k}], m = 1,2,3,4, for this event: | |
303 | for(Int_t m=0;m<4;m++) | |
304 | { | |
305 | for(Int_t k=0;k<9;k++) | |
306 | { | |
307 | (*fReQ)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1)*n*dPhi); | |
308 | (*fImQ)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1)*n*dPhi); | |
309 | } | |
310 | } | |
311 | // calculate S^{M}_{p,k} for this event | |
312 | // Remark: final calculation of S^{M}_{p,k} follows after the loop over data bellow: | |
313 | for(Int_t p=0;p<8;p++) | |
314 | { | |
315 | for(Int_t k=0;k<9;k++) | |
316 | { | |
317 | (*fSMpk)(p,k)+=pow(wPhi*wPt*wEta,k); | |
318 | } | |
319 | } | |
320 | ||
321 | // differential flow: | |
322 | // 1D (pt): | |
323 | // (r_{m*m,k}(pt)): | |
324 | for(Int_t m=0;m<4;m++) | |
325 | { | |
326 | for(Int_t k=0;k<9;k++) | |
327 | { | |
328 | fReRPQ1dEBE[0][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
329 | fImRPQ1dEBE[0][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
330 | } | |
331 | } | |
332 | ||
333 | // s_{k}(pt) for RPs // to be improved (clarified) | |
334 | // Remark: final calculation of s_{p,k}(pt) follows after the loop over data bellow: | |
335 | for(Int_t k=0;k<9;k++) | |
336 | { | |
337 | fs1dEBE[0][0][k]->Fill(dPt,pow(wPhi*wPt*wEta,k),1.); | |
338 | } | |
339 | // 1D (eta): | |
340 | // (r_{m*m,k}(eta)): | |
341 | for(Int_t m=0;m<4;m++) | |
342 | { | |
343 | for(Int_t k=0;k<9;k++) | |
344 | { | |
345 | fReRPQ1dEBE[0][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
346 | fImRPQ1dEBE[0][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
347 | } | |
348 | } | |
349 | // s_{k}(eta) for RPs // to be improved (clarified) | |
350 | // Remark: final calculation of s_{p,k}(eta) follows after the loop over data bellow: | |
351 | for(Int_t k=0;k<9;k++) | |
352 | { | |
353 | fs1dEBE[0][1][k]->Fill(dEta,pow(wPhi*wPt*wEta,k),1.); | |
354 | } | |
355 | ||
356 | ||
357 | ||
358 | /* | |
359 | // 2D (pt,eta): | |
360 | if(fCalculate2DFlow) | |
361 | { | |
362 | // (r_{m*m,k}(pt,eta)): | |
363 | for(Int_t m=0;m<4;m++) | |
364 | { | |
365 | for(Int_t k=0;k<9;k++) | |
366 | { | |
367 | fReRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
368 | fImRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
369 | } | |
370 | } | |
371 | // s_{k}(pt,eta) for RPs // to be improved (clarified) | |
372 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
373 | for(Int_t k=0;k<9;k++) | |
374 | { | |
375 | fs2dEBE[0][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k),1.); | |
376 | } | |
377 | } // end of if(fCalculate2DFlow) | |
378 | */ | |
379 | ||
380 | ||
381 | ||
382 | if(aftsTrack->InPOISelection()) | |
383 | { | |
384 | // 1D (pt): | |
385 | // (q_{m*m,k}(pt)): | |
386 | for(Int_t m=0;m<4;m++) | |
387 | { | |
388 | for(Int_t k=0;k<9;k++) | |
389 | { | |
390 | fReRPQ1dEBE[2][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
391 | fImRPQ1dEBE[2][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
392 | } | |
393 | } | |
394 | // s_{k}(pt) for RP&&POIs // to be improved (clarified) | |
395 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
396 | for(Int_t k=0;k<9;k++) | |
397 | { | |
398 | fs1dEBE[2][0][k]->Fill(dPt,pow(wPhi*wPt*wEta,k),1.); | |
399 | } | |
400 | // 1D (eta): | |
401 | // (q_{m*m,k}(eta)): | |
402 | for(Int_t m=0;m<4;m++) | |
403 | { | |
404 | for(Int_t k=0;k<9;k++) | |
405 | { | |
406 | fReRPQ1dEBE[2][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
407 | fImRPQ1dEBE[2][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
408 | } | |
409 | } | |
410 | // s_{k}(eta) for RP&&POIs // to be improved (clarified) | |
411 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
412 | for(Int_t k=0;k<9;k++) | |
413 | { | |
414 | fs1dEBE[2][1][k]->Fill(dEta,pow(wPhi*wPt*wEta,k),1.); | |
415 | } | |
416 | ||
417 | /* | |
418 | // 2D (pt,eta) | |
419 | if(fCalculate2DFlow) | |
420 | { | |
421 | // (q_{m*m,k}(pt,eta)): | |
422 | for(Int_t m=0;m<4;m++) | |
423 | { | |
424 | for(Int_t k=0;k<9;k++) | |
425 | { | |
426 | fReRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
427 | fImRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
428 | } | |
429 | } | |
430 | // s_{k}(pt,eta) for RP&&POIs // to be improved (clarified) | |
431 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
432 | for(Int_t k=0;k<9;k++) | |
433 | { | |
434 | fs2dEBE[2][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k),1.); | |
435 | } | |
436 | } // end of if(fCalculate2DFlow) | |
437 | */ | |
438 | ||
439 | } // end of if(aftsTrack->InPOISelection()) | |
440 | ||
441 | ||
442 | ||
443 | } // end of if(pTrack->InRPSelection()) | |
444 | ||
445 | ||
446 | ||
447 | if(aftsTrack->InPOISelection()) | |
448 | { | |
449 | dPhi = aftsTrack->Phi(); | |
450 | dPt = aftsTrack->Pt(); | |
451 | dEta = aftsTrack->Eta(); | |
452 | ||
453 | // 1D (pt) | |
454 | // p_n(m*n,0): | |
455 | for(Int_t m=0;m<4;m++) | |
456 | { | |
457 | fReRPQ1dEBE[1][0][m][0]->Fill(dPt,TMath::Cos((m+1.)*n*dPhi),1.); | |
458 | fImRPQ1dEBE[1][0][m][0]->Fill(dPt,TMath::Sin((m+1.)*n*dPhi),1.); | |
459 | } | |
460 | // 1D (eta) | |
461 | // p_n(m*n,0): | |
462 | for(Int_t m=0;m<4;m++) | |
463 | { | |
464 | fReRPQ1dEBE[1][1][m][0]->Fill(dEta,TMath::Cos((m+1.)*n*dPhi),1.); | |
465 | fImRPQ1dEBE[1][1][m][0]->Fill(dEta,TMath::Sin((m+1.)*n*dPhi),1.); | |
466 | } | |
467 | ||
468 | ||
469 | /* | |
470 | // 2D (pt,eta): | |
471 | if(fCalculate2DFlow) | |
472 | { | |
473 | // p_n(m*n,0): | |
474 | for(Int_t m=0;m<4;m++) | |
475 | { | |
476 | fReRPQ2dEBE[1][m][0]->Fill(dPt,dEta,TMath::Cos((m+1.)*n*dPhi),1.); | |
477 | fImRPQ2dEBE[1][m][0]->Fill(dPt,dEta,TMath::Sin((m+1.)*n*dPhi),1.); | |
478 | } | |
479 | } // end of if(fCalculate2DFlow) | |
480 | */ | |
481 | ||
482 | ||
483 | } // end of if(pTrack->InPOISelection() ) | |
484 | ||
485 | ||
486 | } else // to if(aftsTrack) | |
487 | { | |
488 | cout<<endl; | |
489 | cout<<" WARNING: no particle! (i.e. aftsTrack is a NULL pointer in AFAWQC::Make().)"<<endl; | |
490 | cout<<endl; | |
491 | } | |
492 | } // end of for(Int_t i=0;i<nPrim;i++) | |
493 | ||
494 | // calculate the final expressions for S^{M}_{p,k}: | |
495 | for(Int_t p=0;p<8;p++) | |
496 | { | |
497 | for(Int_t k=0;k<9;k++) | |
498 | { | |
499 | (*fSMpk)(p,k)=pow((*fSMpk)(p,k),p+1); | |
500 | } | |
501 | } | |
502 | ||
503 | // ***************************** | |
504 | // **** CALL THE METHODS ******* | |
505 | // ***************************** | |
506 | // integrated flow: | |
507 | if(!fEvaluateIntFlowNestedLoops) | |
508 | { | |
509 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
510 | { | |
511 | if(nRP>1) this->CalculateIntFlowCorrelations(); // without using particle weights | |
0328db2d | 512 | } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
489d5531 | 513 | { |
514 | if(nRP>1) this->CalculateIntFlowCorrelationsUsingParticleWeights(); // with using particle weights | |
515 | } | |
516 | ||
517 | if(nRP>3) this->CalculateIntFlowProductOfCorrelations(); | |
518 | if(nRP>1) this->CalculateIntFlowSumOfEventWeights(); | |
519 | if(nRP>1) this->CalculateIntFlowSumOfProductOfEventWeights(); | |
520 | if(fApplyCorrectionForNUA) | |
521 | { | |
57340a27 | 522 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
523 | { | |
489d5531 | 524 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUASinTerms(); |
525 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUACosTerms(); | |
57340a27 | 526 | } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
527 | { | |
489d5531 | 528 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights(); |
57340a27 | 529 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights(); |
530 | } | |
0328db2d | 531 | |
532 | if(nRP>0) this->CalculateIntFlowProductOfCorrectionTermsForNUA(); | |
533 | if(nRP>0) this->CalculateIntFlowSumOfEventWeightsNUA(); | |
534 | if(nRP>0) this->CalculateIntFlowSumOfProductOfEventWeightsNUA(); | |
489d5531 | 535 | } // end of if(fApplyCorrectionForNUA) |
536 | } // end of if(!fEvaluateIntFlowNestedLoops) | |
537 | ||
538 | // differential flow: | |
539 | if(!fEvaluateDiffFlowNestedLoops) | |
540 | { | |
541 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
542 | { | |
543 | // without using particle weights: | |
544 | this->CalculateDiffFlowCorrelations("RP","Pt"); | |
545 | this->CalculateDiffFlowCorrelations("RP","Eta"); | |
546 | this->CalculateDiffFlowCorrelations("POI","Pt"); | |
57340a27 | 547 | this->CalculateDiffFlowCorrelations("POI","Eta"); |
548 | if(fApplyCorrectionForNUA) | |
549 | { | |
489d5531 | 550 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Pt"); |
551 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Eta"); | |
552 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Pt"); | |
553 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Eta"); | |
554 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Pt"); | |
555 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Eta"); | |
556 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Pt"); | |
57340a27 | 557 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Eta"); |
489d5531 | 558 | } // end of if(fApplyCorrectionForNUA) |
559 | } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
560 | { | |
561 | // with using particle weights: | |
562 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Pt"); | |
563 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Eta"); | |
564 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Pt"); | |
565 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Eta"); | |
57340a27 | 566 | if(fApplyCorrectionForNUA) |
567 | { | |
489d5531 | 568 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("RP","Pt"); |
569 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("RP","Eta"); | |
570 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("POI","Pt"); | |
571 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("POI","Eta"); | |
572 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("RP","Pt"); | |
573 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("RP","Eta"); | |
574 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("POI","Pt"); | |
57340a27 | 575 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("POI","Eta"); |
489d5531 | 576 | } // end of if(fApplyCorrectionForNUA) |
577 | } | |
57340a27 | 578 | |
489d5531 | 579 | // whether or not using particle weights the following is calculated in the same way: |
580 | this->CalculateDiffFlowProductOfCorrelations("RP","Pt"); | |
581 | this->CalculateDiffFlowProductOfCorrelations("RP","Eta"); | |
582 | this->CalculateDiffFlowProductOfCorrelations("POI","Pt"); | |
583 | this->CalculateDiffFlowProductOfCorrelations("POI","Eta"); | |
584 | this->CalculateDiffFlowSumOfEventWeights("RP","Pt"); | |
585 | this->CalculateDiffFlowSumOfEventWeights("RP","Eta"); | |
586 | this->CalculateDiffFlowSumOfEventWeights("POI","Pt"); | |
587 | this->CalculateDiffFlowSumOfEventWeights("POI","Eta"); | |
588 | this->CalculateDiffFlowSumOfProductOfEventWeights("RP","Pt"); | |
589 | this->CalculateDiffFlowSumOfProductOfEventWeights("RP","Eta"); | |
590 | this->CalculateDiffFlowSumOfProductOfEventWeights("POI","Pt"); | |
591 | this->CalculateDiffFlowSumOfProductOfEventWeights("POI","Eta"); | |
592 | } // end of if(!fEvaluateDiffFlowNestedLoops) | |
593 | ||
594 | ||
595 | ||
596 | // with weights: | |
597 | // ... | |
598 | ||
599 | /* | |
600 | // 2D differential flow | |
601 | if(fCalculate2DFlow) | |
602 | { | |
603 | // without weights: | |
604 | if(nRP>1) this->CalculateCorrelationsForDifferentialFlow2D("RP"); | |
605 | if(nRP>1) this->CalculateCorrelationsForDifferentialFlow2D("POI"); | |
606 | ||
607 | // with weights: | |
608 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
609 | { | |
610 | if(nRP>1) this->CalculateWeightedCorrelationsForDifferentialFlow2D("RP"); | |
611 | if(nRP>1) this->CalculateWeightedCorrelationsForDifferentialFlow2D("POI"); | |
612 | } | |
613 | } // end of if(fCalculate2DFlow) | |
614 | */ | |
57340a27 | 615 | |
616 | // distributions of correlations: | |
617 | if(fStoreDistributions) | |
618 | { | |
619 | this->StoreDistributionsOfCorrelations(); | |
620 | } | |
489d5531 | 621 | |
622 | // d) Debugging and cross-checking (evaluate nested loops): | |
623 | // d1) cross-checking results for integrated flow: | |
624 | if(fEvaluateIntFlowNestedLoops) | |
625 | { | |
626 | if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10 | |
627 | { | |
628 | // without using particle weights: | |
629 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
630 | { | |
631 | // correlations: | |
632 | this->CalculateIntFlowCorrelations(); // from Q-vectors | |
633 | this->EvaluateIntFlowCorrelationsWithNestedLoops(anEvent); // from nested loops (to be improved: do I have to pass here anEvent or not?) | |
634 | // correction for non-uniform acceptance: | |
635 | this->CalculateIntFlowCorrectionsForNUASinTerms(); // from Q-vectors (sin terms) | |
636 | this->CalculateIntFlowCorrectionsForNUACosTerms(); // from Q-vectors (cos terms) | |
637 | this->EvaluateIntFlowCorrectionsForNUAWithNestedLoops(anEvent); // from nested loops (both sin and cos terms) | |
638 | } | |
639 | // using particle weights: | |
640 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
641 | { | |
642 | // correlations: | |
643 | this->CalculateIntFlowCorrelationsUsingParticleWeights(); // from Q-vectors | |
644 | this->EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent); // from nested loops (to be improved: do I have to pass here anEvent or not?) | |
645 | // correction for non-uniform acceptance: | |
646 | this->CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights(); // from Q-vectors (sin terms) | |
647 | this->CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights(); // from Q-vectors (cos terms) | |
57340a27 | 648 | this->EvaluateIntFlowCorrectionsForNUAWithNestedLoopsUsingParticleWeights(anEvent); // from nested loops (both sin and cos terms) |
489d5531 | 649 | } |
650 | } else if (nPrim>fMaxAllowedMultiplicity) // to if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) | |
651 | { | |
652 | cout<<endl; | |
653 | cout<<"Skipping the event because multiplicity is "<<nPrim<<". Too high to evaluate nested loops!"<<endl; | |
654 | } else | |
655 | { | |
656 | cout<<endl; | |
657 | cout<<"Skipping the event because multiplicity is "<<nPrim<<"."<<endl; | |
658 | } | |
659 | } // end of if(fEvaluateIntFlowNestedLoops) | |
660 | ||
661 | // d2) cross-checking results for differential flow: | |
662 | if(fEvaluateDiffFlowNestedLoops) | |
663 | { | |
664 | if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10 | |
665 | { | |
666 | // without using particle weights: | |
667 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
668 | { | |
669 | // reduced correlations: | |
670 | // Q-vectors: | |
671 | this->CalculateDiffFlowCorrelations("RP","Pt"); | |
672 | this->CalculateDiffFlowCorrelations("RP","Eta"); | |
673 | this->CalculateDiffFlowCorrelations("POI","Pt"); | |
674 | this->CalculateDiffFlowCorrelations("POI","Eta"); | |
675 | // nested loops: | |
676 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"RP","Pt"); | |
677 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"RP","Eta"); | |
678 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"POI","Pt"); | |
679 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"POI","Eta"); | |
680 | // reduced corrections for non-uniform acceptance: | |
681 | // Q-vectors: | |
682 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Pt"); | |
683 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Eta"); | |
684 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Pt"); | |
685 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Eta"); | |
686 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Pt"); | |
687 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Eta"); | |
688 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Pt"); | |
689 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Eta"); | |
690 | // nested loops: | |
691 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"RP","Pt"); | |
692 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"RP","Eta"); | |
693 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"POI","Pt"); | |
694 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"POI","Eta"); | |
695 | } // end of if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
696 | // using particle weights: | |
697 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
698 | { | |
699 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Pt"); | |
700 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Eta"); | |
701 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Pt"); | |
702 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Eta"); | |
703 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("RP","Pt"); | |
704 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("RP","Eta"); | |
705 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("POI","Pt"); | |
706 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("POI","Eta"); | |
707 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("RP","Pt"); | |
708 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("RP","Eta"); | |
709 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("POI","Pt"); | |
710 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("POI","Eta"); | |
711 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"RP","Pt"); | |
712 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"RP","Eta"); | |
713 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"POI","Pt"); | |
3b552efe | 714 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"POI","Eta"); |
489d5531 | 715 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(anEvent,"RP","Pt"); |
716 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(anEvent,"RP","Eta"); | |
717 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(anEvent,"POI","Pt"); | |
718 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(anEvent,"POI","Eta"); | |
719 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
720 | } // end of if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10 | |
721 | } // end of if(fEvaluateDiffFlowNestedLoops) | |
722 | ||
723 | // e) Reset all event by event quantities: | |
724 | this->ResetEventByEventQuantities(); | |
725 | ||
726 | } // end of AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent) | |
727 | ||
728 | ||
729 | //================================================================================================================================ | |
730 | ||
731 | ||
732 | void AliFlowAnalysisWithQCumulants::Finish() | |
733 | { | |
734 | // Calculate the final results. | |
735 | // a) acces the constants; | |
736 | // b) access the flags; | |
737 | // c) calculate the final results for integrated flow (without and with weights); | |
738 | // d) store in AliFlowCommonHistResults and print the final results for integrated flow; | |
739 | // e) calculate the final results for differential flow (without and with weights); | |
740 | // f) print the final results for integrated flow obtained from differential flow (to be improved (terminology)); | |
741 | // g) cross-check the results: results from Q-vectors vs results from nested loops | |
742 | ||
743 | // ****************************** | |
744 | // **** ACCESS THE CONSTANTS **** | |
745 | // ****************************** | |
746 | ||
747 | this->AccessConstants(); | |
748 | ||
749 | if(fCommonHists && fCommonHists->GetHarmonic()) | |
750 | { | |
751 | fHarmonic = (Int_t)(fCommonHists->GetHarmonic())->GetBinContent(1); // to be improved (moved somewhere else) | |
752 | } | |
753 | ||
754 | // ************************** | |
ff70ca91 | 755 | // **** ACCESS THE FLAGS **** // to be improved (moved somewhere else) |
489d5531 | 756 | // ************************** |
757 | fUsePhiWeights = (Int_t)fUseParticleWeights->GetBinContent(1); | |
758 | fUsePtWeights = (Int_t)fUseParticleWeights->GetBinContent(2); | |
759 | fUseEtaWeights = (Int_t)fUseParticleWeights->GetBinContent(3); | |
3b552efe | 760 | fApplyCorrectionForNUA = (Int_t)fIntFlowFlags->GetBinContent(3); |
489d5531 | 761 | fPrintFinalResults[0] = (Int_t)fIntFlowFlags->GetBinContent(4); |
762 | fPrintFinalResults[1] = (Int_t)fIntFlowFlags->GetBinContent(5); | |
763 | fPrintFinalResults[2] = (Int_t)fIntFlowFlags->GetBinContent(6); | |
2001bc3a | 764 | fApplyCorrectionForNUAVsM = (Int_t)fIntFlowFlags->GetBinContent(7); |
489d5531 | 765 | fEvaluateIntFlowNestedLoops = (Int_t)fEvaluateNestedLoops->GetBinContent(1); |
766 | fEvaluateDiffFlowNestedLoops = (Int_t)fEvaluateNestedLoops->GetBinContent(2); | |
767 | fCrossCheckInPtBinNo = (Int_t)fEvaluateNestedLoops->GetBinContent(3); | |
768 | fCrossCheckInEtaBinNo = (Int_t)fEvaluateNestedLoops->GetBinContent(4); | |
769 | ||
770 | // ********************************************************* | |
771 | // **** CALCULATE THE FINAL RESULTS FOR INTEGRATED FLOW **** | |
772 | // ********************************************************* | |
773 | ||
774 | this->FinalizeCorrelationsIntFlow(); | |
775 | this->CalculateCovariancesIntFlow(); | |
776 | this->CalculateCumulantsIntFlow(); | |
777 | this->CalculateIntFlow(); | |
778 | ||
779 | if(fApplyCorrectionForNUA) // to be improved (reorganized, etc) | |
780 | { | |
781 | this->FinalizeCorrectionTermsForNUAIntFlow(); | |
067e9bc8 | 782 | // this->CalculateCovariancesNUAIntFlow(); // to be improved (enabled eventually) |
489d5531 | 783 | this->CalculateQcumulantsCorrectedForNUAIntFlow(); |
784 | this->CalculateIntFlowCorrectedForNUA(); | |
2001bc3a | 785 | this->CalculateDetectorEffectsForTrueCorrelations(); |
489d5531 | 786 | } |
787 | ||
788 | // *************************************************************** | |
789 | // **** STORE AND PRINT THE FINAL RESULTS FOR INTEGRATED FLOW **** | |
790 | // *************************************************************** | |
791 | ||
792 | this->FillCommonHistResultsIntFlow(); | |
793 | ||
3b552efe | 794 | if(fPrintFinalResults[0]) |
795 | { | |
2001bc3a | 796 | this->PrintFinalResultsForIntegratedFlow("RF"); |
489d5531 | 797 | } |
798 | ||
799 | // *********************************************************** | |
800 | // **** CALCULATE THE FINAL RESULTS FOR DIFFERENTIAL FLOW **** | |
801 | // *********************************************************** | |
802 | ||
803 | this->FinalizeReducedCorrelations("RP","Pt"); | |
804 | this->FinalizeReducedCorrelations("RP","Eta"); | |
805 | this->FinalizeReducedCorrelations("POI","Pt"); | |
806 | this->FinalizeReducedCorrelations("POI","Eta"); | |
807 | this->CalculateDiffFlowCovariances("RP","Pt"); | |
808 | this->CalculateDiffFlowCovariances("RP","Eta"); | |
809 | this->CalculateDiffFlowCovariances("POI","Pt"); | |
810 | this->CalculateDiffFlowCovariances("POI","Eta"); | |
811 | this->CalculateDiffFlowCumulants("RP","Pt"); | |
812 | this->CalculateDiffFlowCumulants("RP","Eta"); | |
813 | this->CalculateDiffFlowCumulants("POI","Pt"); | |
814 | this->CalculateDiffFlowCumulants("POI","Eta"); | |
815 | this->CalculateDiffFlow("RP","Pt"); | |
816 | this->CalculateDiffFlow("RP","Eta"); | |
817 | this->CalculateDiffFlow("POI","Pt"); | |
818 | this->CalculateDiffFlow("POI","Eta"); | |
819 | ||
820 | if(fApplyCorrectionForNUA) // to be improved (reorganized, etc) | |
821 | { | |
822 | this->FinalizeCorrectionTermsForNUADiffFlow("RP","Pt"); | |
823 | this->FinalizeCorrectionTermsForNUADiffFlow("RP","Eta"); | |
824 | this->FinalizeCorrectionTermsForNUADiffFlow("POI","Pt"); | |
825 | this->FinalizeCorrectionTermsForNUADiffFlow("POI","Eta"); | |
826 | this->CalculateDiffFlowCumulantsCorrectedForNUA("RP","Pt"); | |
827 | this->CalculateDiffFlowCumulantsCorrectedForNUA("RP","Eta"); | |
828 | this->CalculateDiffFlowCumulantsCorrectedForNUA("POI","Pt"); | |
829 | this->CalculateDiffFlowCumulantsCorrectedForNUA("POI","Eta"); | |
830 | this->CalculateDiffFlowCorrectedForNUA("RP","Pt"); | |
831 | this->CalculateDiffFlowCorrectedForNUA("RP","Eta"); | |
832 | this->CalculateDiffFlowCorrectedForNUA("POI","Pt"); | |
833 | this->CalculateDiffFlowCorrectedForNUA("POI","Eta"); | |
3b552efe | 834 | } |
489d5531 | 835 | |
836 | this->CalculateFinalResultsForRPandPOIIntegratedFlow("RP"); | |
837 | this->CalculateFinalResultsForRPandPOIIntegratedFlow("POI"); | |
838 | ||
839 | // ***************************************************************** | |
840 | // **** STORE AND PRINT THE FINAL RESULTS FOR DIFFERENTIAL FLOW **** | |
841 | // ***************************************************************** | |
842 | this->FillCommonHistResultsDiffFlow("RP"); | |
843 | this->FillCommonHistResultsDiffFlow("POI"); | |
844 | ||
3b552efe | 845 | if(fPrintFinalResults[1]) |
846 | { | |
489d5531 | 847 | this->PrintFinalResultsForIntegratedFlow("RP"); |
3b552efe | 848 | } |
849 | if(fPrintFinalResults[2]) | |
850 | { | |
489d5531 | 851 | this->PrintFinalResultsForIntegratedFlow("POI"); |
852 | } | |
853 | // g) cross-check the results: results from Q-vectors vs results from nested loops | |
854 | ||
855 | // g1) integrated flow: | |
856 | if(fEvaluateIntFlowNestedLoops) | |
857 | { | |
858 | this->CrossCheckIntFlowCorrelations(); | |
859 | this->CrossCheckIntFlowCorrectionTermsForNUA(); | |
860 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) this->CrossCheckIntFlowExtraCorrelations(); | |
861 | } // end of if(fEvaluateIntFlowNestedLoops) | |
862 | ||
863 | // g2) differential flow: | |
864 | if(fEvaluateDiffFlowNestedLoops) | |
865 | { | |
3b552efe | 866 | // correlations: |
489d5531 | 867 | this->PrintNumberOfParticlesInSelectedBin(); |
868 | this->CrossCheckDiffFlowCorrelations("RP","Pt"); | |
869 | this->CrossCheckDiffFlowCorrelations("RP","Eta"); | |
870 | this->CrossCheckDiffFlowCorrelations("POI","Pt"); | |
871 | this->CrossCheckDiffFlowCorrelations("POI","Eta"); | |
872 | // correction terms for non-uniform acceptance: | |
873 | this->CrossCheckDiffFlowCorrectionTermsForNUA("RP","Pt"); | |
874 | this->CrossCheckDiffFlowCorrectionTermsForNUA("RP","Eta"); | |
875 | this->CrossCheckDiffFlowCorrectionTermsForNUA("POI","Pt"); | |
876 | this->CrossCheckDiffFlowCorrectionTermsForNUA("POI","Eta"); | |
877 | } // end of if(fEvaluateDiffFlowNestedLoops) | |
878 | ||
879 | } // end of AliFlowAnalysisWithQCumulants::Finish() | |
880 | ||
881 | ||
882 | //================================================================================================================================ | |
883 | ||
884 | ||
885 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTerms() | |
886 | { | |
887 | // calculate corrections for non-uniform acceptance of the detector for no-name integrated flow (cos terms) | |
888 | ||
889 | // multiplicity: | |
890 | Double_t dMult = (*fSMpk)(0,0); | |
891 | ||
892 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
893 | Double_t dReQ1n = (*fReQ)(0,0); | |
894 | Double_t dReQ2n = (*fReQ)(1,0); | |
895 | //Double_t dReQ3n = (*fReQ)(2,0); | |
896 | //Double_t dReQ4n = (*fReQ)(3,0); | |
897 | Double_t dImQ1n = (*fImQ)(0,0); | |
898 | Double_t dImQ2n = (*fImQ)(1,0); | |
899 | //Double_t dImQ3n = (*fImQ)(2,0); | |
900 | //Double_t dImQ4n = (*fImQ)(3,0); | |
901 | ||
902 | // ************************************************************* | |
903 | // **** corrections for non-uniform acceptance (cos terms): **** | |
904 | // ************************************************************* | |
905 | // | |
906 | // Remark 1: corrections for non-uniform acceptance (cos terms) calculated with non-weighted Q-vectors | |
907 | // are stored in 1D profile fQCorrectionsCos. | |
908 | // Remark 2: binning of fIntFlowCorrectionTermsForNUAPro[1] is organized as follows: | |
909 | // -------------------------------------------------------------------------------------------------------------------- | |
910 | // 1st bin: <<cos(n*(phi1))>> = cosP1n | |
911 | // 2nd bin: <<cos(n*(phi1+phi2))>> = cosP1nP1n | |
912 | // 3rd bin: <<cos(n*(phi1-phi2-phi3))>> = cosP1nM1nM1n | |
913 | // 4th bin: <<cos(n*(2phi1-phi2))>> = cosP2nM1n | |
914 | // -------------------------------------------------------------------------------------------------------------------- | |
915 | ||
916 | // 1-particle: | |
917 | Double_t cosP1n = 0.; // <<cos(n*(phi1))>> | |
918 | ||
919 | if(dMult>0) | |
920 | { | |
921 | cosP1n = dReQ1n/dMult; | |
922 | ||
923 | // average non-weighted 1-particle correction (cos terms) for non-uniform acceptance for single event: | |
924 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(1,cosP1n); | |
0328db2d | 925 | // event weights for NUA terms: |
926 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(1,dMult); | |
489d5531 | 927 | |
928 | // final average non-weighted 1-particle correction (cos terms) for non-uniform acceptance for all events: | |
929 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(0.5,cosP1n,dMult); | |
2001bc3a | 930 | fIntFlowCorrectionTermsForNUAVsMPro[1][0]->Fill(dMult+0.5,cosP1n,dMult); |
489d5531 | 931 | } |
932 | ||
933 | // 2-particle: | |
3b552efe | 934 | Double_t cosP1nP1n = 0.; // <<cos(n*(phi1+phi2))>> |
489d5531 | 935 | Double_t cosP2nM1n = 0.; // <<cos(n*(2phi1-phi2))>> |
936 | ||
937 | if(dMult>1) | |
938 | { | |
939 | cosP1nP1n = (pow(dReQ1n,2)-pow(dImQ1n,2)-dReQ2n)/(dMult*(dMult-1)); | |
940 | cosP2nM1n = (dReQ2n*dReQ1n+dImQ2n*dImQ1n-dReQ1n)/(dMult*(dMult-1)); | |
941 | ||
942 | // average non-weighted 2-particle correction (cos terms) for non-uniform acceptance for single event: | |
3b552efe | 943 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(2,cosP1nP1n); |
489d5531 | 944 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(4,cosP2nM1n); |
0328db2d | 945 | // event weights for NUA terms: |
946 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(2,dMult*(dMult-1)); | |
947 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(4,dMult*(dMult-1)); | |
948 | ||
489d5531 | 949 | // final average non-weighted 2-particle correction (cos terms) for non-uniform acceptance for all events: |
3b552efe | 950 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(1.5,cosP1nP1n,dMult*(dMult-1)); |
489d5531 | 951 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(3.5,cosP2nM1n,dMult*(dMult-1)); |
2001bc3a | 952 | fIntFlowCorrectionTermsForNUAVsMPro[1][1]->Fill(dMult+0.5,cosP1nP1n,dMult*(dMult-1)); |
953 | fIntFlowCorrectionTermsForNUAVsMPro[1][3]->Fill(dMult+0.5,cosP2nM1n,dMult*(dMult-1)); | |
489d5531 | 954 | } |
955 | ||
956 | // 3-particle: | |
957 | Double_t cosP1nM1nM1n = 0.; // <<cos(n*(phi1-phi2-phi3))>> | |
958 | ||
959 | if(dMult>2) | |
960 | { | |
961 | cosP1nM1nM1n = (dReQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))-dReQ1n*dReQ2n-dImQ1n*dImQ2n-2.*(dMult-1)*dReQ1n) | |
962 | / (dMult*(dMult-1)*(dMult-2)); | |
963 | ||
964 | // average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for single event: | |
965 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(3,cosP1nM1nM1n); | |
0328db2d | 966 | // event weights for NUA terms: |
967 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(3,dMult*(dMult-1)*(dMult-2)); | |
489d5531 | 968 | |
969 | // final average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for all events: | |
2001bc3a | 970 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(2.5,cosP1nM1nM1n,dMult*(dMult-1)*(dMult-2)); |
971 | fIntFlowCorrectionTermsForNUAVsMPro[1][2]->Fill(dMult+0.5,cosP1nM1nM1n,dMult*(dMult-1)*(dMult-2)); | |
489d5531 | 972 | } |
973 | ||
974 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTerms() | |
975 | ||
976 | ||
977 | //================================================================================================================================ | |
978 | ||
979 | ||
980 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTerms() | |
981 | { | |
982 | // calculate corrections for non-uniform acceptance of the detector for no-name integrated flow (sin terms) | |
983 | ||
984 | // multiplicity: | |
985 | Double_t dMult = (*fSMpk)(0,0); | |
986 | ||
987 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
988 | Double_t dReQ1n = (*fReQ)(0,0); | |
989 | Double_t dReQ2n = (*fReQ)(1,0); | |
990 | //Double_t dReQ3n = (*fReQ)(2,0); | |
991 | //Double_t dReQ4n = (*fReQ)(3,0); | |
992 | Double_t dImQ1n = (*fImQ)(0,0); | |
993 | Double_t dImQ2n = (*fImQ)(1,0); | |
994 | //Double_t dImQ3n = (*fImQ)(2,0); | |
995 | //Double_t dImQ4n = (*fImQ)(3,0); | |
996 | ||
997 | // ************************************************************* | |
998 | // **** corrections for non-uniform acceptance (sin terms): **** | |
999 | // ************************************************************* | |
1000 | // | |
1001 | // Remark 1: corrections for non-uniform acceptance (sin terms) calculated with non-weighted Q-vectors | |
1002 | // are stored in 1D profile fQCorrectionsSin. | |
1003 | // Remark 2: binning of fIntFlowCorrectionTermsForNUAPro[0] is organized as follows: | |
1004 | // -------------------------------------------------------------------------------------------------------------------- | |
1005 | // 1st bin: <<sin(n*(phi1))>> = sinP1n | |
1006 | // 2nd bin: <<sin(n*(phi1+phi2))>> = sinP1nP1n | |
1007 | // 3rd bin: <<sin(n*(phi1-phi2-phi3))>> = sinP1nM1nM1n | |
1008 | // 4th bin: <<sin(n*(2phi1-phi2))>> = sinP2nM1n | |
1009 | // -------------------------------------------------------------------------------------------------------------------- | |
1010 | ||
1011 | // 1-particle: | |
1012 | Double_t sinP1n = 0.; // <sin(n*(phi1))> | |
1013 | ||
1014 | if(dMult>0) | |
1015 | { | |
1016 | sinP1n = dImQ1n/dMult; | |
1017 | ||
1018 | // average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for single event: | |
0328db2d | 1019 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(1,sinP1n); |
1020 | // event weights for NUA terms: | |
1021 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(1,dMult); | |
489d5531 | 1022 | |
1023 | // final average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
1024 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(0.5,sinP1n,dMult); | |
2001bc3a | 1025 | fIntFlowCorrectionTermsForNUAVsMPro[0][0]->Fill(dMult+0.5,sinP1n,dMult); |
489d5531 | 1026 | } |
1027 | ||
1028 | // 2-particle: | |
1029 | Double_t sinP1nP1n = 0.; // <<sin(n*(phi1+phi2))>> | |
1030 | Double_t sinP2nM1n = 0.; // <<sin(n*(2phi1-phi2))>> | |
1031 | if(dMult>1) | |
1032 | { | |
3b552efe | 1033 | sinP1nP1n = (2.*dReQ1n*dImQ1n-dImQ2n)/(dMult*(dMult-1)); |
489d5531 | 1034 | sinP2nM1n = (dImQ2n*dReQ1n-dReQ2n*dImQ1n-dImQ1n)/(dMult*(dMult-1)); |
1035 | ||
1036 | // average non-weighted 2-particle correction (sin terms) for non-uniform acceptance for single event: | |
1037 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(2,sinP1nP1n); | |
3b552efe | 1038 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(4,sinP2nM1n); |
0328db2d | 1039 | // event weights for NUA terms: |
1040 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(2,dMult*(dMult-1)); | |
1041 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(4,dMult*(dMult-1)); | |
489d5531 | 1042 | |
1043 | // final average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
1044 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(1.5,sinP1nP1n,dMult*(dMult-1)); | |
1045 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(3.5,sinP2nM1n,dMult*(dMult-1)); | |
2001bc3a | 1046 | fIntFlowCorrectionTermsForNUAVsMPro[0][1]->Fill(dMult+0.5,sinP1nP1n,dMult*(dMult-1)); |
1047 | fIntFlowCorrectionTermsForNUAVsMPro[0][3]->Fill(dMult+0.5,sinP2nM1n,dMult*(dMult-1)); | |
489d5531 | 1048 | } |
1049 | ||
1050 | // 3-particle: | |
1051 | Double_t sinP1nM1nM1n = 0.; // <<sin(n*(phi1-phi2-phi3))>> | |
1052 | ||
1053 | if(dMult>2) | |
1054 | { | |
1055 | sinP1nM1nM1n = (-dImQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))+dReQ1n*dImQ2n-dImQ1n*dReQ2n+2.*(dMult-1)*dImQ1n) | |
1056 | / (dMult*(dMult-1)*(dMult-2)); | |
1057 | ||
1058 | // average non-weighted 3-particle correction (sin terms) for non-uniform acceptance for single event: | |
1059 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(3,sinP1nM1nM1n); | |
0328db2d | 1060 | // event weights for NUA terms: |
1061 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(3,dMult*(dMult-1)*(dMult-2)); | |
489d5531 | 1062 | |
1063 | // final average non-weighted 3-particle correction (sin terms) for non-uniform acceptance for all events: | |
2001bc3a | 1064 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(2.5,sinP1nM1nM1n,dMult*(dMult-1)*(dMult-2)); |
1065 | fIntFlowCorrectionTermsForNUAVsMPro[0][2]->Fill(dMult+0.5,sinP1nM1nM1n,dMult*(dMult-1)*(dMult-2)); | |
489d5531 | 1066 | } |
1067 | ||
1068 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTerms() | |
1069 | ||
1070 | ||
1071 | //================================================================================================================================ | |
1072 | ||
1073 | ||
1074 | void AliFlowAnalysisWithQCumulants::GetOutputHistograms(TList *outputListHistos) | |
1075 | { | |
1076 | // a) Get pointers for common control and common result histograms and profiles. | |
1077 | // b) Get pointers for histograms with particle weights. | |
1078 | // c) Get pointers for histograms and profiles relevant for integrated flow. | |
1079 | // d) Get pointers for histograms and profiles relevant for differental flow. | |
1080 | // e) Get pointers for histograms and profiles holding results obtained with nested loops. | |
1081 | ||
1082 | if(outputListHistos) | |
3b552efe | 1083 | { |
1084 | this->SetHistList(outputListHistos); | |
1085 | if(!fHistList) | |
1086 | { | |
1087 | cout<<endl; | |
1088 | cout<<" WARNING (QC): fHistList is NULL in AFAWQC::GOH() !!!!"<<endl; | |
1089 | cout<<endl; | |
1090 | exit(0); | |
489d5531 | 1091 | } |
1092 | this->GetPointersForCommonHistograms(); | |
1093 | this->GetPointersForParticleWeightsHistograms(); | |
1094 | this->GetPointersForIntFlowHistograms(); | |
1095 | this->GetPointersForDiffFlowHistograms(); | |
1096 | this->GetPointersForNestedLoopsHistograms(); | |
3b552efe | 1097 | } else |
1098 | { | |
1099 | cout<<endl; | |
1100 | cout<<" WARNING (QC): outputListHistos is NULL in AFAWQC::GOH() !!!!"<<endl; | |
1101 | cout<<endl; | |
1102 | exit(0); | |
489d5531 | 1103 | } |
1104 | ||
1105 | } // end of void AliFlowAnalysisWithQCumulants::GetOutputHistograms(TList *outputListHistos) | |
ad87ae62 | 1106 | |
1107 | ||
489d5531 | 1108 | //================================================================================================================================ |
1109 | ||
1110 | ||
1111 | TProfile* AliFlowAnalysisWithQCumulants::MakePtProjection(TProfile2D *profilePtEta) const | |
ad87ae62 | 1112 | { |
489d5531 | 1113 | // project 2D profile onto pt axis to get 1D profile |
1114 | ||
1115 | Int_t nBinsPt = profilePtEta->GetNbinsX(); | |
1116 | Double_t dPtMin = (profilePtEta->GetXaxis())->GetXmin(); | |
1117 | Double_t dPtMax = (profilePtEta->GetXaxis())->GetXmax(); | |
1118 | ||
1119 | Int_t nBinsEta = profilePtEta->GetNbinsY(); | |
1120 | ||
1121 | TProfile *profilePt = new TProfile("","",nBinsPt,dPtMin,dPtMax); | |
1122 | ||
1123 | for(Int_t p=1;p<=nBinsPt;p++) | |
1124 | { | |
1125 | Double_t contentPt = 0.; | |
1126 | Double_t entryPt = 0.; | |
1127 | Double_t spreadPt = 0.; | |
1128 | Double_t sum1 = 0.; | |
1129 | Double_t sum2 = 0.; | |
1130 | Double_t sum3 = 0.; | |
1131 | for(Int_t e=1;e<=nBinsEta;e++) | |
1132 | { | |
1133 | contentPt += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))) | |
1134 | * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1135 | entryPt += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1136 | ||
1137 | sum1 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))) | |
1138 | * (pow(profilePtEta->GetBinError(profilePtEta->GetBin(p,e)),2.) | |
1139 | + pow(profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)),2.)); | |
1140 | sum2 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1141 | sum3 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))) | |
1142 | * (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))); | |
1143 | } | |
1144 | if(sum2>0. && sum1/sum2-pow(sum3/sum2,2.) > 0.) | |
1145 | { | |
1146 | spreadPt = pow(sum1/sum2-pow(sum3/sum2,2.),0.5); | |
1147 | } | |
1148 | profilePt->SetBinContent(p,contentPt); | |
1149 | profilePt->SetBinEntries(p,entryPt); | |
1150 | { | |
1151 | profilePt->SetBinError(p,spreadPt); | |
1152 | } | |
1153 | ||
1154 | } | |
1155 | ||
1156 | return profilePt; | |
1157 | ||
1158 | } // end of TProfile* AliFlowAnalysisWithQCumulants::MakePtProjection(TProfile2D *profilePtEta) | |
1159 | ||
1160 | ||
1161 | //================================================================================================================================ | |
1162 | ||
1163 | ||
1164 | TProfile* AliFlowAnalysisWithQCumulants::MakeEtaProjection(TProfile2D *profilePtEta) const | |
1165 | { | |
1166 | // project 2D profile onto eta axis to get 1D profile | |
1167 | ||
1168 | Int_t nBinsEta = profilePtEta->GetNbinsY(); | |
1169 | Double_t dEtaMin = (profilePtEta->GetYaxis())->GetXmin(); | |
1170 | Double_t dEtaMax = (profilePtEta->GetYaxis())->GetXmax(); | |
1171 | ||
1172 | Int_t nBinsPt = profilePtEta->GetNbinsX(); | |
1173 | ||
1174 | TProfile *profileEta = new TProfile("","",nBinsEta,dEtaMin,dEtaMax); | |
1175 | ||
1176 | for(Int_t e=1;e<=nBinsEta;e++) | |
1177 | { | |
1178 | Double_t contentEta = 0.; | |
1179 | Double_t entryEta = 0.; | |
1180 | for(Int_t p=1;p<=nBinsPt;p++) | |
1181 | { | |
1182 | contentEta += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))) | |
1183 | * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1184 | entryEta += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1185 | } | |
1186 | profileEta->SetBinContent(e,contentEta); | |
1187 | profileEta->SetBinEntries(e,entryEta); | |
1188 | } | |
1189 | ||
1190 | return profileEta; | |
1191 | ||
1192 | } // end of TProfile* AliFlowAnalysisWithQCumulants::MakeEtaProjection(TProfile2D *profilePtEta) | |
1193 | ||
489d5531 | 1194 | //================================================================================================================================ |
1195 | ||
489d5531 | 1196 | void AliFlowAnalysisWithQCumulants::PrintFinalResultsForIntegratedFlow(TString type) |
1197 | { | |
2001bc3a | 1198 | // Printing on the screen the final results for integrated flow (RF, POI and RP). |
489d5531 | 1199 | |
1200 | Int_t n = fHarmonic; | |
1201 | ||
2001bc3a | 1202 | if(type == "RF" || type == "RP" || type == "POI") |
489d5531 | 1203 | { |
2001bc3a | 1204 | if(!(fCommonHists && fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th)) |
489d5531 | 1205 | { |
2001bc3a | 1206 | cout<<"WARNING: fCommonHistsResults && fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl; |
489d5531 | 1207 | cout<<" is NULL in AFAWQC::PFRFIF() !!!!"<<endl; |
1208 | } | |
1209 | } else | |
1210 | { | |
2001bc3a | 1211 | cout<<"WARNING: type is not from {RF, RP, POI} in AFAWQC::PFRFIF() !!!!"<<endl; |
489d5531 | 1212 | exit(0); |
1213 | } | |
1214 | ||
1215 | Double_t dVn[4] = {0.}; // array to hold Vn{2}, Vn{4}, Vn{6} and Vn{8} | |
1216 | Double_t dVnErr[4] = {0.}; // array to hold errors of Vn{2}, Vn{4}, Vn{6} and Vn{8} | |
1217 | ||
2001bc3a | 1218 | if(type == "RF") |
489d5531 | 1219 | { |
1220 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlow())->GetBinContent(1); | |
1221 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlow())->GetBinError(1); | |
1222 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlow())->GetBinContent(1); | |
1223 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlow())->GetBinError(1); | |
1224 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlow())->GetBinContent(1); | |
1225 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlow())->GetBinError(1); | |
1226 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlow())->GetBinContent(1); | |
1227 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlow())->GetBinError(1); | |
1228 | } else if(type == "RP") | |
1229 | { | |
1230 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlowRP())->GetBinContent(1); | |
1231 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlowRP())->GetBinError(1); | |
1232 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlowRP())->GetBinContent(1); | |
1233 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlowRP())->GetBinError(1); | |
1234 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlowRP())->GetBinContent(1); | |
1235 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlowRP())->GetBinError(1); | |
1236 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlowRP())->GetBinContent(1); | |
1237 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlowRP())->GetBinError(1); | |
1238 | } else if(type == "POI") | |
1239 | { | |
1240 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlowPOI())->GetBinContent(1); | |
1241 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlowPOI())->GetBinError(1); | |
1242 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlowPOI())->GetBinContent(1); | |
1243 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlowPOI())->GetBinError(1); | |
1244 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlowPOI())->GetBinContent(1); | |
1245 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlowPOI())->GetBinError(1); | |
1246 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlowPOI())->GetBinContent(1); | |
1247 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlowPOI())->GetBinError(1); | |
1248 | } | |
1249 | ||
1250 | TString title = " flow estimates from Q-cumulants"; | |
1251 | TString subtitle = " ("; | |
1252 | ||
1253 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
1254 | { | |
1255 | subtitle.Append(type); | |
1256 | subtitle.Append(", without weights)"); | |
1257 | } else | |
1258 | { | |
1259 | subtitle.Append(type); | |
1260 | subtitle.Append(", with weights)"); | |
1261 | } | |
1262 | ||
1263 | cout<<endl; | |
1264 | cout<<"*************************************"<<endl; | |
1265 | cout<<"*************************************"<<endl; | |
1266 | cout<<title.Data()<<endl; | |
1267 | cout<<subtitle.Data()<<endl; | |
1268 | cout<<endl; | |
1269 | ||
1270 | for(Int_t i=0;i<4;i++) | |
1271 | { | |
2001bc3a | 1272 | cout<<" v_"<<n<<"{"<<2*(i+1)<<"} = "<<dVn[i]<<" +/- "<<dVnErr[i]<<endl; |
489d5531 | 1273 | } |
2001bc3a | 1274 | |
489d5531 | 1275 | cout<<endl; |
2001bc3a | 1276 | |
1277 | if(type == "RF") | |
489d5531 | 1278 | { |
2001bc3a | 1279 | cout<<" nEvts = "<<(Int_t)fCommonHists->GetHistMultRP()->GetEntries()<<", <M> = "<<(Double_t)fCommonHists->GetHistMultRP()->GetMean()<<endl; |
489d5531 | 1280 | } |
1281 | else if (type == "RP") | |
1282 | { | |
2001bc3a | 1283 | cout<<" nEvts = "<<(Int_t)fCommonHists->GetHistMultRP()->GetEntries()<<", <M> = "<<(Double_t)fCommonHists->GetHistMultRP()->GetMean()<<endl; |
489d5531 | 1284 | } |
1285 | else if (type == "POI") | |
1286 | { | |
2001bc3a | 1287 | cout<<" nEvts = "<<(Int_t)fCommonHists->GetHistMultPOI()->GetEntries()<<", <M> = "<<(Double_t)fCommonHists->GetHistMultPOI()->GetMean()<<endl; |
1288 | } | |
1289 | ||
489d5531 | 1290 | cout<<"*************************************"<<endl; |
1291 | cout<<"*************************************"<<endl; | |
1292 | cout<<endl; | |
1293 | ||
2001bc3a | 1294 | }// end of AliFlowAnalysisWithQCumulants::PrintFinalResultsForIntegratedFlow(TString type="RF"); |
489d5531 | 1295 | |
1296 | //================================================================================================================================ | |
1297 | ||
489d5531 | 1298 | void AliFlowAnalysisWithQCumulants::WriteHistograms(TString outputFileName) |
1299 | { | |
1300 | //store the final results in output .root file | |
1301 | TFile *output = new TFile(outputFileName.Data(),"RECREATE"); | |
1302 | //output->WriteObject(fHistList, "cobjQC","SingleKey"); | |
1303 | fHistList->Write(fHistList->GetName(), TObject::kSingleKey); | |
1304 | delete output; | |
1305 | } | |
1306 | ||
1307 | ||
1308 | //================================================================================================================================ | |
1309 | ||
1310 | ||
1311 | void AliFlowAnalysisWithQCumulants::WriteHistograms(TDirectoryFile *outputFileName) | |
1312 | { | |
1313 | //store the final results in output .root file | |
1314 | fHistList->SetName("cobjQC"); | |
1315 | fHistList->SetOwner(kTRUE); | |
1316 | outputFileName->Add(fHistList); | |
1317 | outputFileName->Write(outputFileName->GetName(), TObject::kSingleKey); | |
1318 | } | |
1319 | ||
1320 | ||
1321 | //================================================================================================================================ | |
1322 | ||
1323 | ||
1324 | void AliFlowAnalysisWithQCumulants::BookCommonHistograms() | |
1325 | { | |
1326 | // Book common control histograms and common histograms for final results. | |
1327 | // common control histogram (ALL events) | |
1328 | TString commonHistsName = "AliFlowCommonHistQC"; | |
1329 | commonHistsName += fAnalysisLabel->Data(); | |
1330 | fCommonHists = new AliFlowCommonHist(commonHistsName.Data()); | |
1331 | fHistList->Add(fCommonHists); | |
1332 | // common control histogram (for events with 2 and more particles) | |
1333 | TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC"; | |
1334 | commonHists2ndOrderName += fAnalysisLabel->Data(); | |
1335 | fCommonHists2nd = new AliFlowCommonHist(commonHists2ndOrderName.Data()); | |
1336 | fHistList->Add(fCommonHists2nd); | |
1337 | // common control histogram (for events with 4 and more particles) | |
1338 | TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC"; | |
1339 | commonHists4thOrderName += fAnalysisLabel->Data(); | |
1340 | fCommonHists4th = new AliFlowCommonHist(commonHists4thOrderName.Data()); | |
1341 | fHistList->Add(fCommonHists4th); | |
1342 | // common control histogram (for events with 6 and more particles) | |
1343 | TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC"; | |
1344 | commonHists6thOrderName += fAnalysisLabel->Data(); | |
1345 | fCommonHists6th = new AliFlowCommonHist(commonHists6thOrderName.Data()); | |
1346 | fHistList->Add(fCommonHists6th); | |
1347 | // common control histogram (for events with 8 and more particles) | |
1348 | TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC"; | |
1349 | commonHists8thOrderName += fAnalysisLabel->Data(); | |
1350 | fCommonHists8th = new AliFlowCommonHist(commonHists8thOrderName.Data()); | |
1351 | fHistList->Add(fCommonHists8th); | |
1352 | // common histograms for final results (calculated for events with 2 and more particles) | |
1353 | TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC"; | |
1354 | commonHistResults2ndOrderName += fAnalysisLabel->Data(); | |
1355 | fCommonHistsResults2nd = new AliFlowCommonHistResults(commonHistResults2ndOrderName.Data()); | |
1356 | fHistList->Add(fCommonHistsResults2nd); | |
1357 | // common histograms for final results (calculated for events with 4 and more particles) | |
1358 | TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC"; | |
1359 | commonHistResults4thOrderName += fAnalysisLabel->Data(); | |
1360 | fCommonHistsResults4th = new AliFlowCommonHistResults(commonHistResults4thOrderName.Data()); | |
1361 | fHistList->Add(fCommonHistsResults4th); | |
1362 | // common histograms for final results (calculated for events with 6 and more particles) | |
1363 | TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC"; | |
1364 | commonHistResults6thOrderName += fAnalysisLabel->Data(); | |
1365 | fCommonHistsResults6th = new AliFlowCommonHistResults(commonHistResults6thOrderName.Data()); | |
1366 | fHistList->Add(fCommonHistsResults6th); | |
1367 | // common histograms for final results (calculated for events with 8 and more particles) | |
1368 | TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC"; | |
1369 | commonHistResults8thOrderName += fAnalysisLabel->Data(); | |
1370 | fCommonHistsResults8th = new AliFlowCommonHistResults(commonHistResults8thOrderName.Data()); | |
1371 | fHistList->Add(fCommonHistsResults8th); | |
1372 | ||
1373 | } // end of void AliFlowAnalysisWithQCumulants::BookCommonHistograms() | |
1374 | ||
1375 | ||
1376 | //================================================================================================================================ | |
1377 | ||
1378 | ||
1379 | void AliFlowAnalysisWithQCumulants::BookAndFillWeightsHistograms() | |
1380 | { | |
1381 | // book and fill histograms which hold phi, pt and eta weights | |
1382 | ||
1383 | if(!fWeightsList) | |
1384 | { | |
1385 | cout<<"WARNING: fWeightsList is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1386 | exit(0); | |
1387 | } | |
1388 | ||
1389 | TString fUseParticleWeightsName = "fUseParticleWeightsQC"; | |
1390 | fUseParticleWeightsName += fAnalysisLabel->Data(); | |
1391 | fUseParticleWeights = new TProfile(fUseParticleWeightsName.Data(),"0 = particle weight not used, 1 = particle weight used ",3,0,3); | |
1392 | fUseParticleWeights->SetLabelSize(0.06); | |
1393 | (fUseParticleWeights->GetXaxis())->SetBinLabel(1,"w_{#phi}"); | |
1394 | (fUseParticleWeights->GetXaxis())->SetBinLabel(2,"w_{p_{T}}"); | |
1395 | (fUseParticleWeights->GetXaxis())->SetBinLabel(3,"w_{#eta}"); | |
1396 | fUseParticleWeights->Fill(0.5,(Int_t)fUsePhiWeights); | |
1397 | fUseParticleWeights->Fill(1.5,(Int_t)fUsePtWeights); | |
1398 | fUseParticleWeights->Fill(2.5,(Int_t)fUseEtaWeights); | |
1399 | fWeightsList->Add(fUseParticleWeights); | |
1400 | ||
1401 | if(fUsePhiWeights) | |
1402 | { | |
1403 | if(fWeightsList->FindObject("phi_weights")) | |
1404 | { | |
1405 | fPhiWeights = dynamic_cast<TH1F*>(fWeightsList->FindObject("phi_weights")); | |
1406 | if(TMath::Abs(fPhiWeights->GetBinWidth(1)-fPhiBinWidth)>pow(10.,-6.)) | |
1407 | { | |
1408 | cout<<endl; | |
1409 | cout<<"WARNING (QC): Inconsistent binning in histograms for phi-weights throughout the code."<<endl; | |
1410 | cout<<endl; | |
1411 | exit(0); | |
1412 | } | |
1413 | } else | |
1414 | { | |
1415 | cout<<"WARNING: fWeightsList->FindObject(\"phi_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1416 | exit(0); | |
1417 | } | |
1418 | } // end of if(fUsePhiWeights) | |
1419 | ||
1420 | if(fUsePtWeights) | |
1421 | { | |
1422 | if(fWeightsList->FindObject("pt_weights")) | |
1423 | { | |
1424 | fPtWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("pt_weights")); | |
1425 | if(TMath::Abs(fPtWeights->GetBinWidth(1)-fPtBinWidth)>pow(10.,-6.)) | |
1426 | { | |
1427 | cout<<endl; | |
1428 | cout<<"WARNING (QC): Inconsistent binning in histograms for pt-weights throughout the code."<<endl; | |
1429 | cout<<endl; | |
1430 | exit(0); | |
1431 | } | |
1432 | } else | |
1433 | { | |
1434 | cout<<"WARNING: fWeightsList->FindObject(\"pt_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1435 | exit(0); | |
1436 | } | |
1437 | } // end of if(fUsePtWeights) | |
1438 | ||
1439 | if(fUseEtaWeights) | |
1440 | { | |
1441 | if(fWeightsList->FindObject("eta_weights")) | |
1442 | { | |
1443 | fEtaWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("eta_weights")); | |
1444 | if(TMath::Abs(fEtaWeights->GetBinWidth(1)-fEtaBinWidth)>pow(10.,-6.)) | |
1445 | { | |
1446 | cout<<endl; | |
1447 | cout<<"WARNING (QC): Inconsistent binning in histograms for eta-weights throughout the code."<<endl; | |
1448 | cout<<endl; | |
1449 | exit(0); | |
1450 | } | |
1451 | } else | |
1452 | { | |
1453 | cout<<"WARNING: fUseEtaWeights && fWeightsList->FindObject(\"eta_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1454 | exit(0); | |
1455 | } | |
1456 | } // end of if(fUseEtaWeights) | |
1457 | ||
1458 | } // end of AliFlowAnalysisWithQCumulants::BookAndFillWeightsHistograms() | |
1459 | ||
1460 | ||
1461 | //================================================================================================================================ | |
1462 | ||
1463 | ||
1464 | void AliFlowAnalysisWithQCumulants::BookEverythingForIntegratedFlow() | |
1465 | { | |
1466 | // Book all objects for integrated flow: | |
1467 | // a) Book profile to hold all flags for integrated flow. | |
1468 | // b) Book event-by-event quantities. | |
1469 | // c) Book profiles. // to be improved (comment) | |
1470 | // d) Book histograms holding the final results. | |
1471 | ||
1472 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?) | |
1473 | TString powerFlag[2] = {"linear","quadratic"}; // to be improved (should I promote this to data members?) | |
1474 | ||
1475 | // a) Book profile to hold all flags for integrated flow: | |
1476 | TString intFlowFlagsName = "fIntFlowFlags"; | |
1477 | intFlowFlagsName += fAnalysisLabel->Data(); | |
2001bc3a | 1478 | fIntFlowFlags = new TProfile(intFlowFlagsName.Data(),"Flags for Integrated Flow",7,0,7); |
489d5531 | 1479 | fIntFlowFlags->SetTickLength(-0.01,"Y"); |
1480 | fIntFlowFlags->SetMarkerStyle(25); | |
1481 | fIntFlowFlags->SetLabelSize(0.05); | |
1482 | fIntFlowFlags->SetLabelOffset(0.02,"Y"); | |
1483 | fIntFlowFlags->GetXaxis()->SetBinLabel(1,"Particle Weights"); | |
1484 | fIntFlowFlags->GetXaxis()->SetBinLabel(2,"Event Weights"); | |
1485 | fIntFlowFlags->GetXaxis()->SetBinLabel(3,"Corrected for NUA?"); | |
1486 | fIntFlowFlags->GetXaxis()->SetBinLabel(4,"Print NONAME results"); | |
1487 | fIntFlowFlags->GetXaxis()->SetBinLabel(5,"Print RP results"); | |
3b552efe | 1488 | fIntFlowFlags->GetXaxis()->SetBinLabel(6,"Print POI results"); |
2001bc3a | 1489 | fIntFlowFlags->GetXaxis()->SetBinLabel(7,"Corrected for NUA vs M?"); |
489d5531 | 1490 | fIntFlowList->Add(fIntFlowFlags); |
1491 | ||
1492 | // b) Book event-by-event quantities: | |
1493 | // Re[Q_{m*n,k}], Im[Q_{m*n,k}] and S_{p,k}^M: | |
1494 | fReQ = new TMatrixD(4,9); | |
1495 | fImQ = new TMatrixD(4,9); | |
1496 | fSMpk = new TMatrixD(8,9); | |
1497 | // average correlations <2>, <4>, <6> and <8> for single event (bining is the same as in fIntFlowCorrelationsPro and fIntFlowCorrelationsHist): | |
1498 | TString intFlowCorrelationsEBEName = "fIntFlowCorrelationsEBE"; | |
1499 | intFlowCorrelationsEBEName += fAnalysisLabel->Data(); | |
1500 | fIntFlowCorrelationsEBE = new TH1D(intFlowCorrelationsEBEName.Data(),intFlowCorrelationsEBEName.Data(),4,0,4); | |
1501 | // weights for average correlations <2>, <4>, <6> and <8> for single event: | |
1502 | TString intFlowEventWeightsForCorrelationsEBEName = "fIntFlowEventWeightsForCorrelationsEBE"; | |
1503 | intFlowEventWeightsForCorrelationsEBEName += fAnalysisLabel->Data(); | |
1504 | fIntFlowEventWeightsForCorrelationsEBE = new TH1D(intFlowEventWeightsForCorrelationsEBEName.Data(),intFlowEventWeightsForCorrelationsEBEName.Data(),4,0,4); | |
1505 | // average all correlations for single event (bining is the same as in fIntFlowCorrelationsAllPro and fIntFlowCorrelationsAllHist): | |
1506 | TString intFlowCorrelationsAllEBEName = "fIntFlowCorrelationsAllEBE"; | |
1507 | intFlowCorrelationsAllEBEName += fAnalysisLabel->Data(); | |
1508 | fIntFlowCorrelationsAllEBE = new TH1D(intFlowCorrelationsAllEBEName.Data(),intFlowCorrelationsAllEBEName.Data(),32,0,32); | |
1509 | // average correction terms for non-uniform acceptance for single event | |
1510 | // (binning is the same as in fIntFlowCorrectionTermsForNUAPro[2] and fIntFlowCorrectionTermsForNUAHist[2]): | |
1511 | TString fIntFlowCorrectionTermsForNUAEBEName = "fIntFlowCorrectionTermsForNUAEBE"; | |
1512 | fIntFlowCorrectionTermsForNUAEBEName += fAnalysisLabel->Data(); | |
1513 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1514 | { | |
1515 | 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); | |
1516 | } | |
0328db2d | 1517 | // event weights for terms for non-uniform acceptance: |
1518 | TString fIntFlowEventWeightForCorrectionTermsForNUAEBEName = "fIntFlowEventWeightForCorrectionTermsForNUAEBE"; | |
1519 | fIntFlowEventWeightForCorrectionTermsForNUAEBEName += fAnalysisLabel->Data(); | |
1520 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1521 | { | |
1522 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[sc] = new TH1D(Form("%s: %s terms",fIntFlowEventWeightForCorrectionTermsForNUAEBEName.Data(),sinCosFlag[sc].Data()),Form("Event weights for terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),10,0,10); | |
1523 | } | |
489d5531 | 1524 | // c) Book profiles: // to be improved (comment) |
1525 | // profile to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8: | |
1526 | TString avMultiplicityName = "fAvMultiplicity"; | |
1527 | avMultiplicityName += fAnalysisLabel->Data(); | |
1528 | fAvMultiplicity = new TProfile(avMultiplicityName.Data(),"Average Multiplicities of RPs",9,0,9); | |
1529 | fAvMultiplicity->SetTickLength(-0.01,"Y"); | |
1530 | fAvMultiplicity->SetMarkerStyle(25); | |
1531 | fAvMultiplicity->SetLabelSize(0.05); | |
1532 | fAvMultiplicity->SetLabelOffset(0.02,"Y"); | |
1533 | fAvMultiplicity->SetYTitle("Average Multiplicity"); | |
1534 | (fAvMultiplicity->GetXaxis())->SetBinLabel(1,"all evts"); | |
1535 | (fAvMultiplicity->GetXaxis())->SetBinLabel(2,"n_{RP} #geq 1"); | |
1536 | (fAvMultiplicity->GetXaxis())->SetBinLabel(3,"n_{RP} #geq 2"); | |
1537 | (fAvMultiplicity->GetXaxis())->SetBinLabel(4,"n_{RP} #geq 3"); | |
1538 | (fAvMultiplicity->GetXaxis())->SetBinLabel(5,"n_{RP} #geq 4"); | |
1539 | (fAvMultiplicity->GetXaxis())->SetBinLabel(6,"n_{RP} #geq 5"); | |
1540 | (fAvMultiplicity->GetXaxis())->SetBinLabel(7,"n_{RP} #geq 6"); | |
1541 | (fAvMultiplicity->GetXaxis())->SetBinLabel(8,"n_{RP} #geq 7"); | |
1542 | (fAvMultiplicity->GetXaxis())->SetBinLabel(9,"n_{RP} #geq 8"); | |
1543 | fIntFlowProfiles->Add(fAvMultiplicity); | |
1544 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with wrong errors!): | |
1545 | TString intFlowCorrelationsProName = "fIntFlowCorrelationsPro"; | |
1546 | intFlowCorrelationsProName += fAnalysisLabel->Data(); | |
1547 | fIntFlowCorrelationsPro = new TProfile(intFlowCorrelationsProName.Data(),"Average correlations for all events",4,0,4,"s"); | |
1548 | fIntFlowCorrelationsPro->SetTickLength(-0.01,"Y"); | |
1549 | fIntFlowCorrelationsPro->SetMarkerStyle(25); | |
1550 | fIntFlowCorrelationsPro->SetLabelSize(0.06); | |
1551 | fIntFlowCorrelationsPro->SetLabelOffset(0.01,"Y"); | |
1552 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<2>>"); | |
1553 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<4>>"); | |
1554 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(3,"<<6>>"); | |
1555 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(4,"<<8>>"); | |
1556 | fIntFlowProfiles->Add(fIntFlowCorrelationsPro); | |
ff70ca91 | 1557 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> versus multiplicity for all events (error is biased estimator): |
1558 | TString correlationFlag[4] = {"<<2>>","<<4>>","<<6>>","<<8>>"}; | |
ff70ca91 | 1559 | for(Int_t ci=0;ci<4;ci++) // correlation index |
1560 | { | |
1561 | TString intFlowCorrelationsVsMProName = "fIntFlowCorrelationsVsMPro"; | |
1562 | intFlowCorrelationsVsMProName += fAnalysisLabel->Data(); | |
1563 | fIntFlowCorrelationsVsMPro[ci] = new TProfile(Form("%s, %s",intFlowCorrelationsVsMProName.Data(),correlationFlag[ci].Data()), | |
1564 | Form("%s vs multiplicity",correlationFlag[ci].Data()), | |
9da1a4f3 | 1565 | fnBinsMult,fMinMult,fMaxMult,"s"); |
ff70ca91 | 1566 | fIntFlowCorrelationsVsMPro[ci]->GetYaxis()->SetTitle(correlationFlag[ci].Data()); |
1567 | fIntFlowCorrelationsVsMPro[ci]->GetXaxis()->SetTitle("M"); | |
1568 | fIntFlowProfiles->Add(fIntFlowCorrelationsVsMPro[ci]); | |
1569 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
489d5531 | 1570 | // averaged all correlations for all events (with wrong errors!): |
1571 | TString intFlowCorrelationsAllProName = "fIntFlowCorrelationsAllPro"; | |
1572 | intFlowCorrelationsAllProName += fAnalysisLabel->Data(); | |
1573 | fIntFlowCorrelationsAllPro = new TProfile(intFlowCorrelationsAllProName.Data(),"Average correlations for all events",32,0,32,"s"); | |
1574 | fIntFlowCorrelationsAllPro->SetTickLength(-0.01,"Y"); | |
1575 | fIntFlowCorrelationsAllPro->SetMarkerStyle(25); | |
1576 | fIntFlowCorrelationsAllPro->SetLabelSize(0.03); | |
1577 | fIntFlowCorrelationsAllPro->SetLabelOffset(0.01,"Y"); | |
1578 | // 2-p correlations: | |
1579 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}"); | |
1580 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}"); | |
1581 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}"); | |
1582 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}"); | |
1583 | // 3-p correlations: | |
1584 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}"); | |
1585 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}"); | |
1586 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}"); | |
1587 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}"); | |
1588 | // 4-p correlations: | |
1589 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}"); | |
1590 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}"); | |
1591 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}"); | |
1592 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}"); | |
1593 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}"); | |
1594 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}"); | |
1595 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}"); | |
1596 | // 5-p correlations: | |
1597 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}"); | |
1598 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}"); | |
1599 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}"); | |
1600 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}"); | |
1601 | // 6-p correlations: | |
1602 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}"); | |
1603 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}"); | |
1604 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}"); | |
1605 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}"); | |
1606 | // 7-p correlations: | |
1607 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}"); | |
1608 | // 8-p correlations: | |
1609 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}"); | |
1610 | fIntFlowProfiles->Add(fIntFlowCorrelationsAllPro); | |
1611 | // when particle weights are used some extra correlations appear: | |
1612 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
1613 | { | |
1614 | TString intFlowExtraCorrelationsProName = "fIntFlowExtraCorrelationsPro"; | |
1615 | intFlowExtraCorrelationsProName += fAnalysisLabel->Data(); | |
1616 | fIntFlowExtraCorrelationsPro = new TProfile(intFlowExtraCorrelationsProName.Data(),"Average extra correlations for all events",100,0,100,"s"); | |
1617 | fIntFlowExtraCorrelationsPro->SetTickLength(-0.01,"Y"); | |
1618 | fIntFlowExtraCorrelationsPro->SetMarkerStyle(25); | |
1619 | fIntFlowExtraCorrelationsPro->SetLabelSize(0.03); | |
1620 | fIntFlowExtraCorrelationsPro->SetLabelOffset(0.01,"Y"); | |
1621 | // extra 2-p correlations: | |
1622 | (fIntFlowExtraCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<w1^3 w2 cos(n*(phi1-phi2))>>"); | |
1623 | (fIntFlowExtraCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<w1 w2 w3^2 cos(n*(phi1-phi2))>>"); | |
1624 | fIntFlowProfiles->Add(fIntFlowExtraCorrelationsPro); | |
1625 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
1626 | // average product of correlations <2>, <4>, <6> and <8>: | |
1627 | TString intFlowProductOfCorrelationsProName = "fIntFlowProductOfCorrelationsPro"; | |
1628 | intFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
1629 | fIntFlowProductOfCorrelationsPro = new TProfile(intFlowProductOfCorrelationsProName.Data(),"Average products of correlations",6,0,6); | |
1630 | fIntFlowProductOfCorrelationsPro->SetTickLength(-0.01,"Y"); | |
1631 | fIntFlowProductOfCorrelationsPro->SetMarkerStyle(25); | |
1632 | fIntFlowProductOfCorrelationsPro->SetLabelSize(0.05); | |
1633 | fIntFlowProductOfCorrelationsPro->SetLabelOffset(0.01,"Y"); | |
1634 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<2><4>>"); | |
1635 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<2><6>>"); | |
1636 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(3,"<<2><8>>"); | |
1637 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(4,"<<4><6>>"); | |
1638 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(5,"<<4><8>>"); | |
1639 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(6,"<<6><8>>"); | |
1640 | fIntFlowProfiles->Add(fIntFlowProductOfCorrelationsPro); | |
ff70ca91 | 1641 | // average product of correlations <2>, <4>, <6> and <8> versus multiplicity |
1642 | // [0=<<2><4>>,1=<<2><6>>,2=<<2><8>>,3=<<4><6>>,4=<<4><8>>,5=<<6><8>>] | |
1643 | TString intFlowProductOfCorrelationsVsMProName = "fIntFlowProductOfCorrelationsVsMPro"; | |
1644 | intFlowProductOfCorrelationsVsMProName += fAnalysisLabel->Data(); | |
1645 | TString productFlag[6] = {"<<2><4>>","<<2><6>>","<<2><8>>","<<4><6>>","<<4><8>>","<<6><8>>"}; | |
1646 | for(Int_t pi=0;pi<6;pi++) | |
1647 | { | |
1648 | fIntFlowProductOfCorrelationsVsMPro[pi] = new TProfile(Form("%s, %s",intFlowProductOfCorrelationsVsMProName.Data(),productFlag[pi].Data()), | |
1649 | Form("%s versus multiplicity",productFlag[pi].Data()), | |
9da1a4f3 | 1650 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 1651 | fIntFlowProductOfCorrelationsVsMPro[pi]->GetXaxis()->SetTitle("M"); |
1652 | fIntFlowProfiles->Add(fIntFlowProductOfCorrelationsVsMPro[pi]); | |
1653 | } // end of for(Int_t pi=0;pi<6;pi++) | |
0328db2d | 1654 | // average product of correction terms for NUA: |
1655 | TString intFlowProductOfCorrectionTermsForNUAProName = "fIntFlowProductOfCorrectionTermsForNUAPro"; | |
1656 | intFlowProductOfCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
1657 | fIntFlowProductOfCorrectionTermsForNUAPro = new TProfile(intFlowProductOfCorrectionTermsForNUAProName.Data(),"Average products of correction terms for NUA",27,0,27); | |
1658 | fIntFlowProductOfCorrectionTermsForNUAPro->SetTickLength(-0.01,"Y"); | |
1659 | fIntFlowProductOfCorrectionTermsForNUAPro->SetMarkerStyle(25); | |
1660 | fIntFlowProductOfCorrectionTermsForNUAPro->SetLabelSize(0.05); | |
1661 | fIntFlowProductOfCorrectionTermsForNUAPro->SetLabelOffset(0.01,"Y"); | |
1662 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(1,"<<2><cos(#phi)>>"); | |
1663 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(2,"<<2><sin(#phi)>>"); | |
1664 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(3,"<<cos(#phi)><sin(#phi)>>"); | |
1665 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(4,"Cov(<2>,<cos(#phi_{1}+#phi_{2})>)"); | |
1666 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(5,"Cov(<2>,<sin(#phi_{1}+#phi_{2})>)"); | |
1667 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(6,"Cov(<2>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1668 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(7,"Cov(<2>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1669 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(8,"Cov(<4>,<cos(#phi)>)"); | |
1670 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(9,"Cov(<4>,<sin(#phi)>)"); | |
1671 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(10,"Cov(<4>,<cos(#phi_{1}+#phi_{2})>)"); | |
1672 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(11,"Cov(<4>,<sin(#phi_{1}+#phi_{2})>)"); | |
1673 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(12,"Cov(<4>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>>)"); | |
1674 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(13,"Cov(<4>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>>)"); | |
1675 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(14,"Cov(<cos(#phi)>,<cos(#phi_{1}+#phi_{2})>)"); | |
1676 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(15,"Cov(<cos(#phi)>,<sin(#phi_{1}+#phi_{2})>)"); | |
1677 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(16,"Cov(<cos(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1678 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(17,"Cov(<cos(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1679 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(18,"Cov(<sin(#phi)>,<cos(#phi_{1}+#phi_{2})>)"); | |
1680 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(19,"Cov(<sin(#phi)>,<sin(#phi_{1}+#phi_{2})>)"); | |
1681 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(20,"Cov(<sin(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1682 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(21,"Cov(<sin(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1683 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(22,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}+#phi_{2})>)"); | |
1684 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(23,"Cov(<cos(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1685 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(24,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1686 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(25,"Cov(<sin(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1687 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(26,"Cov(<sin(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1688 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(27,"Cov(<cos(#phi_{1}-#phi_{2}-#phi_{3}>,<sin(#phi_{1}-#phi_{2}-#phi_{3}>)"); | |
1689 | fIntFlowProfiles->Add(fIntFlowProductOfCorrectionTermsForNUAPro); | |
489d5531 | 1690 | // average correction terms for non-uniform acceptance (with wrong errors!): |
1691 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1692 | { | |
1693 | TString intFlowCorrectionTermsForNUAProName = "fIntFlowCorrectionTermsForNUAPro"; | |
1694 | intFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
1695 | 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"); | |
1696 | fIntFlowCorrectionTermsForNUAPro[sc]->SetTickLength(-0.01,"Y"); | |
1697 | fIntFlowCorrectionTermsForNUAPro[sc]->SetMarkerStyle(25); | |
1698 | fIntFlowCorrectionTermsForNUAPro[sc]->SetLabelSize(0.03); | |
1699 | fIntFlowCorrectionTermsForNUAPro[sc]->SetLabelOffset(0.01,"Y"); | |
1700 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(1,Form("<<%s(n(phi1))>>",sinCosFlag[sc].Data())); | |
1701 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(2,Form("<<%s(n(phi1+phi2))>>",sinCosFlag[sc].Data())); | |
1702 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(3,Form("<<%s(n(phi1-phi2-phi3))>>",sinCosFlag[sc].Data())); | |
1703 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(4,Form("<<%s(n(2phi1-phi2))>>",sinCosFlag[sc].Data())); | |
1704 | fIntFlowProfiles->Add(fIntFlowCorrectionTermsForNUAPro[sc]); | |
2001bc3a | 1705 | // versus multiplicity: |
1706 | TString correctionTermFlag[4] = {"(n(phi1))","(n(phi1+phi2))","(n(phi1-phi2-phi3))","(n(2phi1-phi2))"}; // to be improved - hardwired 4 | |
1707 | for(Int_t ci=0;ci<4;ci++) // correction term index (to be improved - hardwired 4) | |
1708 | { | |
1709 | TString intFlowCorrectionTermsForNUAVsMProName = "fIntFlowCorrectionTermsForNUAVsMPro"; | |
1710 | intFlowCorrectionTermsForNUAVsMProName += fAnalysisLabel->Data(); | |
1711 | fIntFlowCorrectionTermsForNUAVsMPro[sc][ci] = new TProfile(Form("%s: #LT#LT%s%s#GT#GT",intFlowCorrectionTermsForNUAVsMProName.Data(),sinCosFlag[sc].Data(),correctionTermFlag[ci].Data()),Form("#LT#LT%s%s#GT#GT vs M",sinCosFlag[sc].Data(),correctionTermFlag[ci].Data()),fnBinsMult,fMinMult,fMaxMult); // to be improved - added on purpose option "" instead of "s" only here | |
1712 | fIntFlowCorrectionTermsForNUAVsMPro[sc][ci]->SetDefaultSumw2(); | |
1713 | fIntFlowProfiles->Add(fIntFlowCorrectionTermsForNUAVsMPro[sc][ci]); | |
1714 | } | |
489d5531 | 1715 | } // end of for(Int_t sc=0;sc<2;sc++) |
1716 | ||
1717 | // d) Book histograms holding the final results: | |
1718 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with correct errors!): | |
1719 | TString intFlowCorrelationsHistName = "fIntFlowCorrelationsHist"; | |
1720 | intFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
1721 | fIntFlowCorrelationsHist = new TH1D(intFlowCorrelationsHistName.Data(),"Average correlations for all events",4,0,4); | |
1722 | fIntFlowCorrelationsHist->SetTickLength(-0.01,"Y"); | |
1723 | fIntFlowCorrelationsHist->SetMarkerStyle(25); | |
1724 | fIntFlowCorrelationsHist->SetLabelSize(0.06); | |
1725 | fIntFlowCorrelationsHist->SetLabelOffset(0.01,"Y"); | |
1726 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(1,"<<2>>"); | |
1727 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(2,"<<4>>"); | |
1728 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(3,"<<6>>"); | |
1729 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(4,"<<8>>"); | |
1730 | fIntFlowResults->Add(fIntFlowCorrelationsHist); | |
ff70ca91 | 1731 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with correct errors!) vs M: |
1732 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
1733 | { | |
1734 | TString intFlowCorrelationsVsMHistName = "fIntFlowCorrelationsVsMHist"; | |
1735 | intFlowCorrelationsVsMHistName += fAnalysisLabel->Data(); | |
1736 | fIntFlowCorrelationsVsMHist[ci] = new TH1D(Form("%s, %s",intFlowCorrelationsVsMHistName.Data(),correlationFlag[ci].Data()), | |
1737 | Form("%s vs multiplicity",correlationFlag[ci].Data()), | |
9da1a4f3 | 1738 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 1739 | fIntFlowCorrelationsVsMHist[ci]->GetYaxis()->SetTitle(correlationFlag[ci].Data()); |
1740 | fIntFlowCorrelationsVsMHist[ci]->GetXaxis()->SetTitle("M"); | |
1741 | fIntFlowResults->Add(fIntFlowCorrelationsVsMHist[ci]); | |
1742 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
489d5531 | 1743 | // average all correlations for all events (with correct errors!): |
1744 | TString intFlowCorrelationsAllHistName = "fIntFlowCorrelationsAllHist"; | |
1745 | intFlowCorrelationsAllHistName += fAnalysisLabel->Data(); | |
1746 | fIntFlowCorrelationsAllHist = new TH1D(intFlowCorrelationsAllHistName.Data(),"Average correlations for all events",32,0,32); | |
1747 | fIntFlowCorrelationsAllHist->SetTickLength(-0.01,"Y"); | |
1748 | fIntFlowCorrelationsAllHist->SetMarkerStyle(25); | |
1749 | fIntFlowCorrelationsAllHist->SetLabelSize(0.03); | |
1750 | fIntFlowCorrelationsAllHist->SetLabelOffset(0.01,"Y"); | |
1751 | // 2-p correlations: | |
1752 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}"); | |
1753 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}"); | |
1754 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}"); | |
1755 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}"); | |
1756 | // 3-p correlations: | |
1757 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}"); | |
1758 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}"); | |
1759 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}"); | |
1760 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}"); | |
1761 | // 4-p correlations: | |
1762 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}"); | |
1763 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}"); | |
1764 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}"); | |
1765 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}"); | |
1766 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}"); | |
1767 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}"); | |
1768 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}"); | |
1769 | // 5-p correlations: | |
1770 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}"); | |
1771 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}"); | |
1772 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}"); | |
1773 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}"); | |
1774 | // 6-p correlations: | |
1775 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}"); | |
1776 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}"); | |
1777 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}"); | |
1778 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}"); | |
1779 | // 7-p correlations: | |
1780 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}"); | |
1781 | // 8-p correlations: | |
1782 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}"); | |
1783 | fIntFlowResults->Add(fIntFlowCorrelationsAllHist); | |
1784 | // average correction terms for non-uniform acceptance (with correct errors!): | |
1785 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1786 | { | |
1787 | TString intFlowCorrectionTermsForNUAHistName = "fIntFlowCorrectionTermsForNUAHist"; | |
1788 | intFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
1789 | 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); | |
1790 | fIntFlowCorrectionTermsForNUAHist[sc]->SetTickLength(-0.01,"Y"); | |
1791 | fIntFlowCorrectionTermsForNUAHist[sc]->SetMarkerStyle(25); | |
1792 | fIntFlowCorrectionTermsForNUAHist[sc]->SetLabelSize(0.03); | |
1793 | fIntFlowCorrectionTermsForNUAHist[sc]->SetLabelOffset(0.01,"Y"); | |
1794 | // ......................................................................... | |
1795 | // 1-p terms: | |
1796 | (fIntFlowCorrectionTermsForNUAHist[sc]->GetXaxis())->SetBinLabel(1,Form("%s(n(#phi_{1}))>",sinCosFlag[sc].Data())); | |
1797 | // 2-p terms: | |
1798 | // 3-p terms: | |
1799 | // ... | |
1800 | // ......................................................................... | |
1801 | fIntFlowResults->Add(fIntFlowCorrectionTermsForNUAHist[sc]); | |
1802 | } // end of for(Int_t sc=0;sc<2;sc++) | |
1803 | // covariances (multiplied with weight dependent prefactor): | |
1804 | TString intFlowCovariancesName = "fIntFlowCovariances"; | |
1805 | intFlowCovariancesName += fAnalysisLabel->Data(); | |
1806 | fIntFlowCovariances = new TH1D(intFlowCovariancesName.Data(),"Covariances (multiplied with weight dependent prefactor)",6,0,6); | |
1807 | fIntFlowCovariances->SetLabelSize(0.04); | |
1808 | fIntFlowCovariances->SetMarkerStyle(25); | |
1809 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(1,"Cov(<2>,<4>)"); | |
1810 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(2,"Cov(<2>,<6>)"); | |
1811 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(3,"Cov(<2>,<8>)"); | |
1812 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(4,"Cov(<4>,<6>)"); | |
1813 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(5,"Cov(<4>,<8>)"); | |
1814 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(6,"Cov(<6>,<8>)"); | |
1815 | fIntFlowResults->Add(fIntFlowCovariances); | |
1816 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>: | |
1817 | TString intFlowSumOfEventWeightsName = "fIntFlowSumOfEventWeights"; | |
1818 | intFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
1819 | for(Int_t power=0;power<2;power++) | |
1820 | { | |
1821 | 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); | |
1822 | fIntFlowSumOfEventWeights[power]->SetLabelSize(0.05); | |
1823 | fIntFlowSumOfEventWeights[power]->SetMarkerStyle(25); | |
1824 | if(power == 0) | |
1825 | { | |
1826 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>}"); | |
1827 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<4>}"); | |
1828 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<6>}"); | |
1829 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<8>}"); | |
1830 | } else if (power == 1) | |
1831 | { | |
1832 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>}^{2}"); | |
1833 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<4>}^{2}"); | |
1834 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<6>}^{2}"); | |
1835 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<8>}^{2}"); | |
1836 | } | |
1837 | fIntFlowResults->Add(fIntFlowSumOfEventWeights[power]); | |
1838 | } | |
1839 | // sum of products of event weights for correlations <2>, <4>, <6> and <8>: | |
1840 | TString intFlowSumOfProductOfEventWeightsName = "fIntFlowSumOfProductOfEventWeights"; | |
1841 | intFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
1842 | fIntFlowSumOfProductOfEventWeights = new TH1D(intFlowSumOfProductOfEventWeightsName.Data(),"Sum of product of event weights for correlations",6,0,6); | |
1843 | fIntFlowSumOfProductOfEventWeights->SetLabelSize(0.05); | |
1844 | fIntFlowSumOfProductOfEventWeights->SetMarkerStyle(25); | |
1845 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>} w_{<4>}"); | |
1846 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<2>} w_{<6>}"); | |
1847 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<2>} w_{<8>}"); | |
1848 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<4>} w_{<6>}"); | |
1849 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(5,"#sum_{i=1}^{N} w_{<4>} w_{<8>}"); | |
1850 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(6,"#sum_{i=1}^{N} w_{<6>} w_{<8>}"); | |
1851 | fIntFlowResults->Add(fIntFlowSumOfProductOfEventWeights); | |
ff70ca91 | 1852 | // final result for covariances of correlations (multiplied with weight dependent prefactor) versus M |
1853 | // [0=Cov(2,4),1=Cov(2,6),2=Cov(2,8),3=Cov(4,6),4=Cov(4,8),5=Cov(6,8)]: | |
1854 | TString intFlowCovariancesVsMName = "fIntFlowCovariancesVsM"; | |
1855 | intFlowCovariancesVsMName += fAnalysisLabel->Data(); | |
1856 | TString covarianceFlag[6] = {"Cov(<2>,<4>)","Cov(<2>,<6>)","Cov(<2>,<8>)","Cov(<4>,<6>)","Cov(<4>,<8>)","Cov(<6>,<8>)"}; | |
1857 | for(Int_t ci=0;ci<6;ci++) | |
1858 | { | |
1859 | fIntFlowCovariancesVsM[ci] = new TH1D(Form("%s, %s",intFlowCovariancesVsMName.Data(),covarianceFlag[ci].Data()), | |
1860 | Form("%s vs multiplicity",covarianceFlag[ci].Data()), | |
9da1a4f3 | 1861 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 1862 | fIntFlowCovariancesVsM[ci]->GetYaxis()->SetTitle(covarianceFlag[ci].Data()); |
1863 | fIntFlowCovariancesVsM[ci]->GetXaxis()->SetTitle("M"); | |
1864 | fIntFlowResults->Add(fIntFlowCovariancesVsM[ci]); | |
1865 | } | |
1866 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8> versus multiplicity | |
1867 | // [0=sum{w_{<2>}},1=sum{w_{<4>}},2=sum{w_{<6>}},3=sum{w_{<8>}}][0=linear 1,1=quadratic]: | |
1868 | TString intFlowSumOfEventWeightsVsMName = "fIntFlowSumOfEventWeightsVsM"; | |
1869 | intFlowSumOfEventWeightsVsMName += fAnalysisLabel->Data(); | |
1870 | TString sumFlag[2][4] = {{"#sum_{i=1}^{N} w_{<2>}","#sum_{i=1}^{N} w_{<4>}","#sum_{i=1}^{N} w_{<6>}","#sum_{i=1}^{N} w_{<8>}"}, | |
1871 | {"#sum_{i=1}^{N} w_{<2>}^{2}","#sum_{i=1}^{N} w_{<4>}^{2}","#sum_{i=1}^{N} w_{<6>}^{2}","#sum_{i=1}^{N} w_{<8>}^{2}"}}; | |
1872 | for(Int_t si=0;si<4;si++) | |
1873 | { | |
1874 | for(Int_t power=0;power<2;power++) | |
1875 | { | |
1876 | fIntFlowSumOfEventWeightsVsM[si][power] = new TH1D(Form("%s, %s",intFlowSumOfEventWeightsVsMName.Data(),sumFlag[power][si].Data()), | |
1877 | Form("%s vs multiplicity",sumFlag[power][si].Data()), | |
9da1a4f3 | 1878 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 1879 | fIntFlowSumOfEventWeightsVsM[si][power]->GetYaxis()->SetTitle(sumFlag[power][si].Data()); |
1880 | fIntFlowSumOfEventWeightsVsM[si][power]->GetXaxis()->SetTitle("M"); | |
1881 | fIntFlowResults->Add(fIntFlowSumOfEventWeightsVsM[si][power]); | |
1882 | } // end of for(Int_t power=0;power<2;power++) | |
1883 | } // end of for(Int_t si=0;si<4;si++) | |
1884 | // sum of products of event weights for correlations <2>, <4>, <6> and <8> vs M | |
1885 | // [0=sum{w_{<2>}w_{<4>}},1=sum{w_{<2>}w_{<6>}},2=sum{w_{<2>}w_{<8>}}, | |
1886 | // 3=sum{w_{<4>}w_{<6>}},4=sum{w_{<4>}w_{<8>}},5=sum{w_{<6>}w_{<8>}}]: | |
1887 | TString intFlowSumOfProductOfEventWeightsVsMName = "fIntFlowSumOfProductOfEventWeightsVsM"; | |
1888 | intFlowSumOfProductOfEventWeightsVsMName += fAnalysisLabel->Data(); | |
1889 | TString sopowFlag[6] = {"#sum_{i=1}^{N} w_{<2>} w_{<4>}","#sum_{i=1}^{N} w_{<2>} w_{<6>}","#sum_{i=1}^{N} w_{<2>} w_{<8>}", | |
1890 | "#sum_{i=1}^{N} w_{<4>} w_{<6>}","#sum_{i=1}^{N} w_{<4>} w_{<8>}","#sum_{i=1}^{N} w_{<6>} w_{<8>}"}; | |
1891 | for(Int_t pi=0;pi<6;pi++) | |
1892 | { | |
1893 | fIntFlowSumOfProductOfEventWeightsVsM[pi] = new TH1D(Form("%s, %s",intFlowSumOfProductOfEventWeightsVsMName.Data(),sopowFlag[pi].Data()), | |
1894 | Form("%s versus multiplicity",sopowFlag[pi].Data()), | |
9da1a4f3 | 1895 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 1896 | fIntFlowSumOfProductOfEventWeightsVsM[pi]->GetXaxis()->SetTitle("M"); |
1897 | fIntFlowSumOfProductOfEventWeightsVsM[pi]->GetYaxis()->SetTitle(sopowFlag[pi].Data()); | |
1898 | fIntFlowResults->Add(fIntFlowSumOfProductOfEventWeightsVsM[pi]); | |
1899 | } // end of for(Int_t pi=0;pi<6;pi++) | |
0328db2d | 1900 | // covariances of NUA terms (multiplied with weight dependent prefactor): |
1901 | TString intFlowCovariancesNUAName = "fIntFlowCovariancesNUA"; | |
1902 | intFlowCovariancesNUAName += fAnalysisLabel->Data(); | |
1903 | fIntFlowCovariancesNUA = new TH1D(intFlowCovariancesNUAName.Data(),"Covariances for NUA (multiplied with weight dependent prefactor)",27,0,27); | |
1904 | fIntFlowCovariancesNUA->SetLabelSize(0.04); | |
1905 | fIntFlowCovariancesNUA->SetMarkerStyle(25); | |
1906 | fIntFlowCovariancesNUA->GetXaxis()->SetLabelSize(0.02); | |
1907 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(1,"Cov(<2>,<cos(#phi)>"); | |
1908 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(2,"Cov(<2>,<sin(#phi)>)"); | |
1909 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(3,"Cov(<cos(#phi)>,<sin(#phi)>)"); | |
1910 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(4,"Cov(<2>,<cos(#phi_{1}+#phi_{2})>)"); | |
1911 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(5,"Cov(<2>,<sin(#phi_{1}+#phi_{2})>)"); | |
1912 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(6,"Cov(<2>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1913 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(7,"Cov(<2>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1914 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(8,"Cov(<4>,<cos(#phi)>)"); | |
1915 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(9,"Cov(<4>,<sin(#phi)>)"); | |
1916 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(10,"Cov(<4>,<cos(#phi_{1}+#phi_{2})>)"); | |
1917 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(11,"Cov(<4>,<sin(#phi_{1}+#phi_{2})>)"); | |
1918 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(12,"Cov(<4>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>>)"); | |
1919 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(13,"Cov(<4>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>>)"); | |
1920 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(14,"Cov(<cos(#phi)>,<cos(#phi_{1}+#phi_{2})>)"); | |
1921 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(15,"Cov(<cos(#phi)>,<sin(#phi_{1}+#phi_{2})>)"); | |
1922 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(16,"Cov(<cos(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1923 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(17,"Cov(<cos(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1924 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(18,"Cov(<sin(#phi)>,<cos(#phi_{1}+#phi_{2})>)"); | |
1925 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(19,"Cov(<sin(#phi)>,<sin(#phi_{1}+#phi_{2})>)"); | |
1926 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(20,"Cov(<sin(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1927 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(21,"Cov(<sin(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1928 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(22,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}+#phi_{2})>)"); | |
1929 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(23,"Cov(<cos(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1930 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(24,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1931 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(25,"Cov(<sin(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1932 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(26,"Cov(<sin(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1933 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(27,"Cov(<cos(#phi_{1}-#phi_{2}-#phi_{3}>,<sin(#phi_{1}-#phi_{2}-#phi_{3}>)"); | |
1934 | fIntFlowResults->Add(fIntFlowCovariancesNUA); | |
1935 | // sum of linear and quadratic event weights for NUA terms: | |
1936 | TString intFlowSumOfEventWeightsNUAName = "fIntFlowSumOfEventWeightsNUA"; | |
1937 | intFlowSumOfEventWeightsNUAName += fAnalysisLabel->Data(); | |
1938 | for(Int_t sc=0;sc<2;sc++) | |
1939 | { | |
1940 | for(Int_t power=0;power<2;power++) | |
1941 | { | |
1942 | fIntFlowSumOfEventWeightsNUA[sc][power] = new TH1D(Form("%s: %s, %s",intFlowSumOfEventWeightsNUAName.Data(),powerFlag[power].Data(),sinCosFlag[sc].Data()),Form("Sum of %s event weights for NUA %s terms",powerFlag[power].Data(),sinCosFlag[sc].Data()),3,0,3); | |
1943 | fIntFlowSumOfEventWeightsNUA[sc][power]->SetLabelSize(0.05); | |
1944 | fIntFlowSumOfEventWeightsNUA[sc][power]->SetMarkerStyle(25); | |
1945 | if(power == 0) | |
1946 | { | |
1947 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(1,Form("#sum_{i=1}^{N} w_{<%s(#phi)>}",sinCosFlag[sc].Data())); | |
1948 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(2,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}+#phi_{2})>}",sinCosFlag[sc].Data())); | |
1949 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(3,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}-#phi_{2}-#phi_{3})>}",sinCosFlag[sc].Data())); | |
1950 | } else if(power == 1) | |
1951 | { | |
1952 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(1,Form("#sum_{i=1}^{N} w_{<%s(#phi)>}^{2}",sinCosFlag[sc].Data())); | |
1953 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(2,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}+#phi_{2})>}^{2}",sinCosFlag[sc].Data())); | |
1954 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(3,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}-#phi_{2}-#phi_{3})>}^{2}",sinCosFlag[sc].Data())); | |
1955 | } | |
1956 | fIntFlowResults->Add(fIntFlowSumOfEventWeightsNUA[sc][power]); | |
1957 | } | |
1958 | } | |
1959 | // sum of products of event weights for NUA terms: | |
1960 | TString intFlowSumOfProductOfEventWeightsNUAName = "fIntFlowSumOfProductOfEventWeightsNUA"; | |
1961 | intFlowSumOfProductOfEventWeightsNUAName += fAnalysisLabel->Data(); | |
1962 | fIntFlowSumOfProductOfEventWeightsNUA = new TH1D(intFlowSumOfProductOfEventWeightsNUAName.Data(),"Sum of product of event weights for NUA terms",27,0,27); | |
1963 | fIntFlowSumOfProductOfEventWeightsNUA->SetLabelSize(0.05); | |
1964 | fIntFlowSumOfProductOfEventWeightsNUA->SetMarkerStyle(25); | |
1965 | (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>} w_{<cos(#phi)>}"); | |
1966 | (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<2>} w_{<sin(#phi)>}"); | |
1967 | (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<cos(#phi)>} w_{<sin(#phi)>}"); | |
1968 | // .... | |
1969 | // to be improved - add labels for remaining bins | |
1970 | // .... | |
1971 | fIntFlowResults->Add(fIntFlowSumOfProductOfEventWeightsNUA); | |
489d5531 | 1972 | // final results for integrated Q-cumulants: |
1973 | TString intFlowQcumulantsName = "fIntFlowQcumulants"; | |
1974 | intFlowQcumulantsName += fAnalysisLabel->Data(); | |
1975 | fIntFlowQcumulants = new TH1D(intFlowQcumulantsName.Data(),"Integrated Q-cumulants",4,0,4); | |
1976 | fIntFlowQcumulants->SetLabelSize(0.05); | |
1977 | fIntFlowQcumulants->SetMarkerStyle(25); | |
1978 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(1,"QC{2}"); | |
1979 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(2,"QC{4}"); | |
1980 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(3,"QC{6}"); | |
1981 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(4,"QC{8}"); | |
1982 | fIntFlowResults->Add(fIntFlowQcumulants); | |
ff70ca91 | 1983 | // final results for integrated Q-cumulants versus multiplicity: |
1984 | TString intFlowQcumulantsVsMName = "fIntFlowQcumulantsVsM"; | |
1985 | intFlowQcumulantsVsMName += fAnalysisLabel->Data(); | |
1986 | TString cumulantFlag[4] = {"QC{2}","QC{4}","QC{6}","QC{8}"}; | |
1987 | for(Int_t co=0;co<4;co++) // cumulant order | |
1988 | { | |
1989 | fIntFlowQcumulantsVsM[co] = new TH1D(Form("%s, %s",intFlowQcumulantsVsMName.Data(),cumulantFlag[co].Data()), | |
1990 | Form("%s vs multipicity",cumulantFlag[co].Data()), | |
9da1a4f3 | 1991 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 1992 | fIntFlowQcumulantsVsM[co]->GetXaxis()->SetTitle("M"); |
1993 | fIntFlowQcumulantsVsM[co]->GetYaxis()->SetTitle(cumulantFlag[co].Data()); | |
1994 | fIntFlowResults->Add(fIntFlowQcumulantsVsM[co]); | |
1995 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
489d5531 | 1996 | // final integrated flow estimates from Q-cumulants: |
1997 | TString intFlowName = "fIntFlow"; | |
1998 | intFlowName += fAnalysisLabel->Data(); | |
1999 | // integrated flow from Q-cumulants: | |
2000 | fIntFlow = new TH1D(intFlowName.Data(),"Integrated flow estimates from Q-cumulants",4,0,4); | |
2001 | fIntFlow->SetLabelSize(0.05); | |
2002 | fIntFlow->SetMarkerStyle(25); | |
ff70ca91 | 2003 | (fIntFlow->GetXaxis())->SetBinLabel(1,"v_{2}{2,QC}"); // to be improved (harwired harmonic) |
2004 | (fIntFlow->GetXaxis())->SetBinLabel(2,"v_{2}{4,QC}"); // to be improved (harwired harmonic) | |
2005 | (fIntFlow->GetXaxis())->SetBinLabel(3,"v_{2}{6,QC}"); // to be improved (harwired harmonic) | |
2006 | (fIntFlow->GetXaxis())->SetBinLabel(4,"v_{2}{8,QC}"); // to be improved (harwired harmonic) | |
2007 | fIntFlowResults->Add(fIntFlow); | |
2008 | // integrated flow from Q-cumulants: versus multiplicity: | |
2009 | TString intFlowVsMName = "fIntFlowVsM"; | |
2010 | intFlowVsMName += fAnalysisLabel->Data(); | |
2011 | TString flowFlag[4] = {"v_{2}{2,QC}","v_{2}{4,QC}","v_{2}{6,QC}","v_{2}{8,QC}"}; // to be improved (harwired harmonic) | |
2012 | for(Int_t co=0;co<4;co++) // cumulant order | |
2013 | { | |
2014 | fIntFlowVsM[co] = new TH1D(Form("%s, %s",intFlowVsMName.Data(),flowFlag[co].Data()), | |
2015 | Form("%s vs multipicity",flowFlag[co].Data()), | |
9da1a4f3 | 2016 | fnBinsMult,fMinMult,fMaxMult); |
ff70ca91 | 2017 | fIntFlowVsM[co]->GetXaxis()->SetTitle("M"); |
2018 | fIntFlowVsM[co]->GetYaxis()->SetTitle(flowFlag[co].Data()); | |
2019 | fIntFlowResults->Add(fIntFlowVsM[co]); | |
2020 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
2001bc3a | 2021 | // quantifying detector effects effects to correlations: |
2022 | TString intFlowDetectorBiasName = "fIntFlowDetectorBias"; | |
2023 | intFlowDetectorBiasName += fAnalysisLabel->Data(); | |
2024 | fIntFlowDetectorBias = new TH1D(intFlowDetectorBiasName.Data(),"Quantifying detector bias",4,0,4); | |
2025 | fIntFlowDetectorBias->SetLabelSize(0.05); | |
2026 | fIntFlowDetectorBias->SetMarkerStyle(25); | |
2027 | for(Int_t ci=0;ci<4;ci++) | |
2028 | { | |
2029 | (fIntFlowDetectorBias->GetXaxis())->SetBinLabel(ci+1,Form("#frac{corrected}{measured} %s",cumulantFlag[ci].Data())); | |
2030 | } | |
2031 | fIntFlowResults->Add(fIntFlowDetectorBias); | |
2032 | // quantifying detector effects to correlations versus multiplicity: | |
2033 | TString intFlowDetectorBiasVsMName = "fIntFlowDetectorBiasVsM"; | |
2034 | intFlowDetectorBiasVsMName += fAnalysisLabel->Data(); | |
2035 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
2036 | { | |
2037 | fIntFlowDetectorBiasVsM[ci] = new TH1D(Form("%s for %s",intFlowDetectorBiasVsMName.Data(),cumulantFlag[ci].Data()), | |
2038 | Form("Quantifying detector bias for %s vs multipicity",cumulantFlag[ci].Data()), | |
2039 | fnBinsMult,fMinMult,fMaxMult); | |
2040 | fIntFlowDetectorBiasVsM[ci]->GetXaxis()->SetTitle("M"); | |
2041 | fIntFlowDetectorBiasVsM[ci]->GetYaxis()->SetTitle("#frac{corrected}{measured}"); | |
2042 | if(fApplyCorrectionForNUAVsM){fIntFlowResults->Add(fIntFlowDetectorBiasVsM[ci]);} | |
2043 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
489d5531 | 2044 | |
2045 | /* // to be improved (removed): | |
2046 | // final average weighted multi-particle correlations for all events calculated from Q-vectors | |
2047 | fQCorrelations[1] = new TProfile("Weighted correlations","final average multi-particle correlations from weighted Q-vectors",200,0,200,"s"); | |
2048 | fQCorrelations[1]->SetTickLength(-0.01,"Y"); | |
2049 | fQCorrelations[1]->SetMarkerStyle(25); | |
2050 | fQCorrelations[1]->SetLabelSize(0.03); | |
2051 | fQCorrelations[1]->SetLabelOffset(0.01,"Y"); | |
2052 | // 2-particle correlations: | |
2053 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(1,"<w_{1}w_{2}cos(n(#phi_{1}-#phi_{2}))>"); | |
2054 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(2,"<w_{1}^{2}w_{2}^{2}cos(2n(#phi_{1}-#phi_{2}))>"); | |
2055 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(3,"<w_{1}^{3}w_{2}^{3}cos(3n(#phi_{1}-#phi_{2}))>"); | |
2056 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(4,"<w_{1}^{4}w_{2}^{4}cos(4n(#phi_{1}-#phi_{2}))>"); | |
2057 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(5,"<w_{1}^{3}w_{2}cos(n(#phi_{1}-#phi_{2}))>"); | |
2058 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(6,"<w_{1}^{2}w_{2}w_{3}cos(n(#phi_{1}-#phi_{2}))>"); | |
2059 | // 3-particle correlations: | |
2060 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(21,"<w_{1}w_{2}w_{3}^{2}cos(n(2#phi_{1}-#phi_{2}-#phi_{3}))>"); | |
2061 | // 4-particle correlations: | |
2062 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(41,"<w_{1}w_{2}w_{3}w_{4}cos(n(#phi_{1}+#phi_{2}-#phi_{3}-#phi_{4}))>"); | |
2063 | // add fQCorrelations[1] to the list fIntFlowList: | |
2064 | fIntFlowList->Add(fQCorrelations[1]); | |
2065 | */ | |
2066 | ||
2067 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForIntegratedFlow() | |
2068 | ||
2069 | ||
2070 | //================================================================================================================================ | |
2071 | ||
2072 | ||
2073 | void AliFlowAnalysisWithQCumulants::InitializeArraysForNestedLoops() | |
2074 | { | |
2075 | // Initialize arrays of all objects relevant for calculations with nested loops. | |
2076 | ||
2077 | // integrated flow: | |
2078 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
2079 | { | |
2080 | fIntFlowDirectCorrectionTermsForNUA[sc] = NULL; | |
2081 | } | |
2082 | ||
2083 | // differential flow: | |
2084 | // correlations: | |
2085 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
2086 | { | |
2087 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2088 | { | |
2089 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
2090 | { | |
2091 | fDiffFlowDirectCorrelations[t][pe][ci] = NULL; | |
2092 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
2093 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2094 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
2095 | // correction terms for non-uniform acceptance: | |
2096 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
2097 | { | |
2098 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2099 | { | |
2100 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
2101 | { | |
2102 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
2103 | { | |
2104 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti] = NULL; | |
2105 | } | |
2106 | } | |
2107 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2108 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
2109 | ||
2110 | ||
2111 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForNestedLoops() | |
2112 | ||
2113 | ||
2114 | //================================================================================================================================ | |
2115 | ||
2116 | ||
2117 | void AliFlowAnalysisWithQCumulants::BookEverythingForNestedLoops() | |
2118 | { | |
2119 | // Book all objects relevant for calculations with nested loops. | |
2120 | ||
2121 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?) | |
2122 | TString typeFlag[2] = {"RP","POI"}; // to be improved (should I promote this to data members?) | |
2123 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; // to be improved (should I promote this to data members?) | |
2124 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; // to be improved (should I promote this to data members?) | |
2125 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
2126 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
2127 | ||
2128 | TString evaluateNestedLoopsName = "fEvaluateNestedLoops"; | |
2129 | evaluateNestedLoopsName += fAnalysisLabel->Data(); | |
2130 | fEvaluateNestedLoops = new TProfile(evaluateNestedLoopsName.Data(),"Flags for nested loops",4,0,4); | |
2131 | fEvaluateNestedLoops->SetLabelSize(0.03); | |
2132 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(1,"fEvaluateIntFlowNestedLoops"); | |
2133 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(2,"fEvaluateDiffFlowNestedLoops"); | |
2134 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(3,"fCrossCheckInPtBinNo"); | |
2135 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(4,"fCrossCheckInEtaBinNo"); | |
2136 | fEvaluateNestedLoops->Fill(0.5,(Int_t)fEvaluateIntFlowNestedLoops); | |
2137 | fEvaluateNestedLoops->Fill(1.5,(Int_t)fEvaluateDiffFlowNestedLoops); | |
2138 | fEvaluateNestedLoops->Fill(2.5,fCrossCheckInPtBinNo); | |
2139 | fEvaluateNestedLoops->Fill(3.5,fCrossCheckInEtaBinNo); | |
2140 | fNestedLoopsList->Add(fEvaluateNestedLoops); | |
2141 | // nested loops for integrated flow: | |
2142 | if(fEvaluateIntFlowNestedLoops) | |
2143 | { | |
2144 | // correlations: | |
2145 | TString intFlowDirectCorrelationsName = "fIntFlowDirectCorrelations"; | |
2146 | intFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
2147 | fIntFlowDirectCorrelations = new TProfile(intFlowDirectCorrelationsName.Data(),"Multiparticle correlations calculated with nested loops (for int. flow)",32,0,32,"s"); | |
2148 | fNestedLoopsList->Add(fIntFlowDirectCorrelations); | |
2149 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
2150 | { | |
2151 | TString intFlowExtraDirectCorrelationsName = "fIntFlowExtraDirectCorrelations"; | |
2152 | intFlowExtraDirectCorrelationsName += fAnalysisLabel->Data(); | |
2153 | fIntFlowExtraDirectCorrelations = new TProfile(intFlowExtraDirectCorrelationsName.Data(),"Extra multiparticle correlations calculated with nested loops (for int. flow)",100,0,100,"s"); | |
2154 | fNestedLoopsList->Add(fIntFlowExtraDirectCorrelations); | |
2155 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
2156 | // correction terms for non-uniform acceptance: | |
2157 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
2158 | { | |
2159 | TString intFlowDirectCorrectionTermsForNUAName = "fIntFlowDirectCorrectionTermsForNUA"; | |
2160 | intFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
2161 | fIntFlowDirectCorrectionTermsForNUA[sc] = new TProfile(Form("%s: %s terms",intFlowDirectCorrectionTermsForNUAName.Data(),sinCosFlag[sc].Data()),Form("Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].Data()),10,0,10,"s"); | |
2162 | fNestedLoopsList->Add(fIntFlowDirectCorrectionTermsForNUA[sc]); | |
2163 | } // end of for(Int_t sc=0;sc<2;sc++) | |
2164 | } // end of if(fEvaluateIntFlowNestedLoops) | |
2165 | ||
2166 | // nested loops for differential flow: | |
2167 | if(fEvaluateDiffFlowNestedLoops) | |
2168 | { | |
2169 | // reduced correlations: | |
2170 | TString diffFlowDirectCorrelationsName = "fDiffFlowDirectCorrelations"; | |
2171 | diffFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
2172 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
2173 | { | |
2174 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2175 | { | |
2176 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
2177 | { | |
2178 | // reduced correlations: | |
2179 | fDiffFlowDirectCorrelations[t][pe][rci] = new TProfile(Form("%s, %s, %s, %s",diffFlowDirectCorrelationsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),Form("%s, %s, %s, %s",diffFlowDirectCorrelationsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),1,lowerPtEtaEdge[pe],upperPtEtaEdge[pe],"s"); | |
2180 | fDiffFlowDirectCorrelations[t][pe][rci]->SetXTitle(ptEtaFlag[pe].Data()); | |
2181 | fNestedLoopsList->Add(fDiffFlowDirectCorrelations[t][pe][rci]); // to be improved (add dedicated list to hold reduced correlations) | |
2182 | } // end of for(Int_t rci=0;rci<4;rci++) // correlation index | |
2183 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2184 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
2185 | // correction terms for non-uniform acceptance: | |
2186 | TString diffFlowDirectCorrectionTermsForNUAName = "fDiffFlowDirectCorrectionTermsForNUA"; | |
2187 | diffFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
2188 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
2189 | { | |
2190 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2191 | { | |
2192 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
2193 | { | |
2194 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
2195 | { | |
2196 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti] = new TProfile(Form("%s, %s, %s, %s, cti = %d",diffFlowDirectCorrectionTermsForNUAName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1),Form("%s, %s, %s, %s, cti = %d",diffFlowDirectCorrectionTermsForNUAName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1),1,lowerPtEtaEdge[pe],upperPtEtaEdge[pe],"s"); | |
2197 | fNestedLoopsList->Add(fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti]); | |
2198 | } | |
2199 | } | |
2200 | } | |
3b552efe | 2201 | } |
2202 | // number of RPs and POIs in selected pt and eta bins for cross-checkings: | |
2203 | TString noOfParticlesInBinName = "fNoOfParticlesInBin"; | |
2204 | fNoOfParticlesInBin = new TH1D(noOfParticlesInBinName.Data(),"Number of RPs and POIs in selected p_{T} and #eta bin",4,0,4); | |
489d5531 | 2205 | fNoOfParticlesInBin->GetXaxis()->SetBinLabel(1,"# of RPs in p_{T} bin"); |
2206 | fNoOfParticlesInBin->GetXaxis()->SetBinLabel(2,"# of RPs in #eta bin"); | |
2207 | fNoOfParticlesInBin->GetXaxis()->SetBinLabel(3,"# of POIs in p_{T} bin"); | |
3b552efe | 2208 | fNoOfParticlesInBin->GetXaxis()->SetBinLabel(4,"# of POIs in #eta bin"); |
489d5531 | 2209 | fNestedLoopsList->Add(fNoOfParticlesInBin); |
2210 | } // end of if(fEvaluateDiffFlowNestedLoops) | |
2211 | ||
2212 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForNestedLoops() | |
2213 | ||
2214 | ||
2215 | //================================================================================================================================ | |
2216 | ||
2217 | ||
2218 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations() | |
2219 | { | |
2220 | // calculate all correlations needed for integrated flow | |
57340a27 | 2221 | |
489d5531 | 2222 | // multiplicity: |
2223 | Double_t dMult = (*fSMpk)(0,0); | |
57340a27 | 2224 | |
489d5531 | 2225 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: |
2226 | Double_t dReQ1n = (*fReQ)(0,0); | |
2227 | Double_t dReQ2n = (*fReQ)(1,0); | |
2228 | Double_t dReQ3n = (*fReQ)(2,0); | |
2229 | Double_t dReQ4n = (*fReQ)(3,0); | |
2230 | Double_t dImQ1n = (*fImQ)(0,0); | |
2231 | Double_t dImQ2n = (*fImQ)(1,0); | |
2232 | Double_t dImQ3n = (*fImQ)(2,0); | |
2233 | Double_t dImQ4n = (*fImQ)(3,0); | |
2234 | ||
2235 | // real and imaginary parts of some expressions involving various combinations of Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
2236 | // (these expression appear in the Eqs. for the multi-particle correlations bellow) | |
2237 | ||
2238 | // Re[Q_{2n} Q_{n}^* Q_{n}^*] | |
2239 | Double_t reQ2nQ1nstarQ1nstar = pow(dReQ1n,2.)*dReQ2n + 2.*dReQ1n*dImQ1n*dImQ2n - pow(dImQ1n,2.)*dReQ2n; | |
2240 | ||
2241 | // Im[Q_{2n} Q_{n}^* Q_{n}^*] | |
2242 | //Double_t imQ2nQ1nstarQ1nstar = pow(dReQ1n,2.)*dImQ2n-2.*dReQ1n*dImQ1n*dReQ2n-pow(dImQ1n,2.)*dImQ2n; | |
2243 | ||
2244 | // Re[Q_{n} Q_{n} Q_{2n}^*] = Re[Q_{2n} Q_{n}^* Q_{n}^*] | |
2245 | Double_t reQ1nQ1nQ2nstar = reQ2nQ1nstarQ1nstar; | |
2246 | ||
2247 | // Re[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] | |
2248 | Double_t reQ3nQ1nQ2nstarQ2nstar = (pow(dReQ2n,2.)-pow(dImQ2n,2.))*(dReQ3n*dReQ1n-dImQ3n*dImQ1n) | |
2249 | + 2.*dReQ2n*dImQ2n*(dReQ3n*dImQ1n+dImQ3n*dReQ1n); | |
2250 | ||
2251 | // Im[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] | |
2252 | //Double_t imQ3nQ1nQ2nstarQ2nstar = calculate and implement this (deleteMe) | |
2253 | ||
2254 | // Re[Q_{2n} Q_{2n} Q_{3n}^* Q_{1n}^*] = Re[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] | |
2255 | Double_t reQ2nQ2nQ3nstarQ1nstar = reQ3nQ1nQ2nstarQ2nstar; | |
2256 | ||
2257 | // Re[Q_{4n} Q_{2n}^* Q_{2n}^*] | |
2258 | Double_t reQ4nQ2nstarQ2nstar = pow(dReQ2n,2.)*dReQ4n+2.*dReQ2n*dImQ2n*dImQ4n-pow(dImQ2n,2.)*dReQ4n; | |
2259 | ||
2260 | // Im[Q_{4n} Q_{2n}^* Q_{2n}^*] | |
2261 | //Double_t imQ4nQ2nstarQ2nstar = calculate and implement this (deleteMe) | |
2262 | ||
2263 | // Re[Q_{2n} Q_{2n} Q_{4n}^*] = Re[Q_{4n} Q_{2n}^* Q_{2n}^*] | |
2264 | Double_t reQ2nQ2nQ4nstar = reQ4nQ2nstarQ2nstar; | |
2265 | ||
2266 | // Re[Q_{4n} Q_{3n}^* Q_{n}^*] | |
2267 | Double_t reQ4nQ3nstarQ1nstar = dReQ4n*(dReQ3n*dReQ1n-dImQ3n*dImQ1n)+dImQ4n*(dReQ3n*dImQ1n+dImQ3n*dReQ1n); | |
2268 | ||
2269 | // Re[Q_{3n} Q_{n} Q_{4n}^*] = Re[Q_{4n} Q_{3n}^* Q_{n}^*] | |
2270 | Double_t reQ3nQ1nQ4nstar = reQ4nQ3nstarQ1nstar; | |
2271 | ||
2272 | // Im[Q_{4n} Q_{3n}^* Q_{n}^*] | |
2273 | //Double_t imQ4nQ3nstarQ1nstar = calculate and implement this (deleteMe) | |
2274 | ||
2275 | // Re[Q_{3n} Q_{2n}^* Q_{n}^*] | |
2276 | Double_t reQ3nQ2nstarQ1nstar = dReQ3n*dReQ2n*dReQ1n-dReQ3n*dImQ2n*dImQ1n+dImQ3n*dReQ2n*dImQ1n | |
2277 | + dImQ3n*dImQ2n*dReQ1n; | |
2278 | ||
2279 | // Re[Q_{2n} Q_{n} Q_{3n}^*] = Re[Q_{3n} Q_{2n}^* Q_{n}^*] | |
2280 | Double_t reQ2nQ1nQ3nstar = reQ3nQ2nstarQ1nstar; | |
2281 | ||
2282 | // Im[Q_{3n} Q_{2n}^* Q_{n}^*] | |
2283 | //Double_t imQ3nQ2nstarQ1nstar; //calculate and implement this (deleteMe) | |
2284 | ||
2285 | // Re[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
2286 | Double_t reQ3nQ1nstarQ1nstarQ1nstar = dReQ3n*pow(dReQ1n,3)-3.*dReQ1n*dReQ3n*pow(dImQ1n,2) | |
2287 | + 3.*dImQ1n*dImQ3n*pow(dReQ1n,2)-dImQ3n*pow(dImQ1n,3); | |
2288 | ||
2289 | // Im[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
2290 | //Double_t imQ3nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe) | |
2291 | ||
2292 | // |Q_{2n}|^2 |Q_{n}|^2 | |
2293 | Double_t dQ2nQ1nQ2nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)); | |
2294 | ||
2295 | // Re[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2296 | Double_t reQ4nQ2nstarQ1nstarQ1nstar = (dReQ4n*dReQ2n+dImQ4n*dImQ2n)*(pow(dReQ1n,2)-pow(dImQ1n,2)) | |
2297 | + 2.*dReQ1n*dImQ1n*(dImQ4n*dReQ2n-dReQ4n*dImQ2n); | |
2298 | ||
2299 | // Im[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2300 | //Double_t imQ4nQ2nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe) | |
2301 | ||
2302 | // Re[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
2303 | Double_t reQ2nQ1nQ1nstarQ1nstarQ1nstar = (dReQ2n*dReQ1n-dImQ2n*dImQ1n)*(pow(dReQ1n,3)-3.*dReQ1n*pow(dImQ1n,2)) | |
2304 | + (dReQ2n*dImQ1n+dReQ1n*dImQ2n)*(3.*dImQ1n*pow(dReQ1n,2)-pow(dImQ1n,3)); | |
2305 | ||
2306 | // Im[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
2307 | //Double_t imQ2nQ1nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe) | |
2308 | ||
2309 | // Re[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2310 | Double_t reQ2nQ2nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2311 | * (dReQ2n*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) + 2.*dImQ2n*dReQ1n*dImQ1n); | |
2312 | ||
2313 | // Im[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2314 | //Double_t imQ2nQ2nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2315 | // * (dImQ2n*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) - 2.*dReQ2n*dReQ1n*dImQ1n); | |
2316 | ||
2317 | // Re[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2318 | Double_t reQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(dReQ1n,4.)*dReQ4n-6.*pow(dReQ1n,2.)*dReQ4n*pow(dImQ1n,2.) | |
2319 | + pow(dImQ1n,4.)*dReQ4n+4.*pow(dReQ1n,3.)*dImQ1n*dImQ4n | |
2320 | - 4.*pow(dImQ1n,3.)*dReQ1n*dImQ4n; | |
2321 | ||
2322 | // Im[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2323 | //Double_t imQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(dReQ1n,4.)*dImQ4n-6.*pow(dReQ1n,2.)*dImQ4n*pow(dImQ1n,2.) | |
2324 | // + pow(dImQ1n,4.)*dImQ4n+4.*pow(dImQ1n,3.)*dReQ1n*dReQ4n | |
2325 | // - 4.*pow(dReQ1n,3.)*dImQ1n*dReQ4n; | |
2326 | ||
2327 | // Re[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2328 | Double_t reQ3nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2329 | * (dReQ1n*dReQ2n*dReQ3n-dReQ3n*dImQ1n*dImQ2n+dReQ2n*dImQ1n*dImQ3n+dReQ1n*dImQ2n*dImQ3n); | |
2330 | ||
2331 | // Im[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2332 | //Double_t imQ3nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2333 | // * (-dReQ2n*dReQ3n*dImQ1n-dReQ1n*dReQ3n*dImQ2n+dReQ1n*dReQ2n*dImQ3n-dImQ1n*dImQ2n*dImQ3n); | |
2334 | ||
2335 | ||
2336 | // Re[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2337 | Double_t reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)*dReQ2n-2.*dReQ1n*dReQ2n*dImQ1n-dReQ2n*pow(dImQ1n,2.) | |
2338 | + dImQ2n*pow(dReQ1n,2.)+2.*dReQ1n*dImQ1n*dImQ2n-pow(dImQ1n,2.)*dImQ2n) | |
2339 | * (pow(dReQ1n,2.)*dReQ2n+2.*dReQ1n*dReQ2n*dImQ1n-dReQ2n*pow(dImQ1n,2.) | |
2340 | - dImQ2n*pow(dReQ1n,2.)+2.*dReQ1n*dImQ1n*dImQ2n+pow(dImQ1n,2.)*dImQ2n); | |
2341 | ||
2342 | // Im[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2343 | //Double_t imQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = 2.*(pow(dReQ1n,2.)*dReQ2n-dReQ2n*pow(dImQ1n,2.) | |
2344 | // + 2.*dReQ1n*dImQ1n*dImQ2n)*(pow(dReQ1n,2.)*dImQ2n | |
2345 | // - 2.*dReQ1n*dImQ1n*dReQ2n-pow(dImQ1n,2.)*dImQ2n); | |
2346 | ||
2347 | // Re[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2348 | Double_t reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2349 | * (pow(dReQ1n,3.)*dReQ3n-3.*dReQ1n*dReQ3n*pow(dImQ1n,2.) | |
2350 | + 3.*pow(dReQ1n,2.)*dImQ1n*dImQ3n-pow(dImQ1n,3.)*dImQ3n); | |
2351 | ||
2352 | // Im[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2353 | //Double_t imQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2354 | // * (pow(dImQ1n,3.)*dReQ3n-3.*dImQ1n*dReQ3n*pow(dReQ1n,2.) | |
2355 | // - 3.*pow(dImQ1n,2.)*dReQ1n*dImQ3n+pow(dReQ1n,3.)*dImQ3n); | |
2356 | ||
2357 | // |Q_{2n}|^2 |Q_{n}|^4 | |
2358 | Double_t dQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.))*pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.); | |
2359 | ||
2360 | // Re[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2361 | Double_t reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2362 | * (pow(dReQ1n,2.)*dReQ2n-dReQ2n*pow(dImQ1n,2.) | |
2363 | + 2.*dReQ1n*dImQ1n*dImQ2n); | |
2364 | ||
2365 | // Im[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2366 | //Double_t imQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2367 | // * (pow(dReQ1n,2.)*dImQ2n-dImQ2n*pow(dImQ1n,2.) | |
2368 | // - 2.*dReQ1n*dReQ2n*dImQ1n); | |
2369 | ||
2370 | ||
2371 | ||
2372 | ||
2373 | // ************************************** | |
2374 | // **** multi-particle correlations: **** | |
2375 | // ************************************** | |
2376 | // | |
2377 | // Remark 1: multi-particle correlations calculated with non-weighted Q-vectors are stored in 1D profile fQCorrelations[0]. // to be improved (wrong profiles) | |
2378 | // Remark 2: binning of fQCorrelations[0] is organized as follows: // to be improved (wrong profiles) | |
2379 | // -------------------------------------------------------------------------------------------------------------------- | |
2380 | // 1st bin: <2>_{1n|1n} = two1n1n = cos(n*(phi1-phi2))> | |
2381 | // 2nd bin: <2>_{2n|2n} = two2n2n = cos(2n*(phi1-phi2))> | |
2382 | // 3rd bin: <2>_{3n|3n} = two3n3n = cos(3n*(phi1-phi2))> | |
2383 | // 4th bin: <2>_{4n|4n} = two4n4n = cos(4n*(phi1-phi2))> | |
2384 | // 5th bin: ---- EMPTY ---- | |
2385 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1n = <cos(n*(2.*phi1-phi2-phi3))> | |
2386 | // 7th bin: <3>_{3n|2n,1n} = three3n2n1n = <cos(n*(3.*phi1-2.*phi2-phi3))> | |
2387 | // 8th bin: <3>_{4n|2n,2n} = three4n2n2n = <cos(n*(4.*phi1-2.*phi2-2.*phi3))> | |
2388 | // 9th bin: <3>_{4n|3n,1n} = three4n3n1n = <cos(n*(4.*phi1-3.*phi2-phi3))> | |
2389 | // 10th bin: ---- EMPTY ---- | |
2390 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1n = <cos(n*(phi1+phi2-phi3-phi4))> | |
2391 | // 12th bin: <4>_{2n,1n|2n,1n} = four2n1n2n1n = <cos(2.*n*(phi1+phi2-phi3-phi4))> | |
2392 | // 13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n = <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> | |
2393 | // 14th bin: <4>_{3n|1n,1n,1n} = four3n1n1n1n = <cos(n*(3.*phi1-phi2-phi3-phi4))> | |
2394 | // 15th bin: <4>_{3n,1n|3n,1n} = four3n1n3n1n = <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> | |
2395 | // 16th bin: <4>_{3n,1n|2n,2n} = four3n1n2n2n = <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> | |
2396 | // 17th bin: <4>_{4n|2n,1n,1n} = four4n2n1n1n = <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> | |
2397 | // 18th bin: ---- EMPTY ---- | |
2398 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = five2n1n1n1n1n = <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))> | |
2399 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = five2n2n2n1n1n = <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))> | |
2400 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = five3n1n2n1n1n = <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))> | |
2401 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = five4n1n1n1n1n = <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))> | |
2402 | // 23rd bin: ---- EMPTY ---- | |
2403 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = six1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
2404 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = six2n1n1n2n1n1n = <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))> | |
2405 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = six2n2n1n1n1n1n = <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))> | |
2406 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = six3n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))> | |
2407 | // 28th bin: ---- EMPTY ---- | |
2408 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = seven2n1n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))> | |
2409 | // 30th bin: ---- EMPTY ---- | |
2410 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = eight1n1n1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
2411 | // -------------------------------------------------------------------------------------------------------------------- | |
2412 | ||
2413 | // 2-particle: | |
2414 | Double_t two1n1n = 0.; // <cos(n*(phi1-phi2))> | |
2415 | Double_t two2n2n = 0.; // <cos(2n*(phi1-phi2))> | |
2416 | Double_t two3n3n = 0.; // <cos(3n*(phi1-phi2))> | |
2417 | Double_t two4n4n = 0.; // <cos(4n*(phi1-phi2))> | |
2418 | ||
2419 | if(dMult>1) | |
2420 | { | |
2421 | two1n1n = (pow(dReQ1n,2.)+pow(dImQ1n,2.)-dMult)/(dMult*(dMult-1.)); | |
2422 | two2n2n = (pow(dReQ2n,2.)+pow(dImQ2n,2.)-dMult)/(dMult*(dMult-1.)); | |
2423 | two3n3n = (pow(dReQ3n,2.)+pow(dImQ3n,2.)-dMult)/(dMult*(dMult-1.)); | |
2424 | two4n4n = (pow(dReQ4n,2.)+pow(dImQ4n,2.)-dMult)/(dMult*(dMult-1.)); | |
2425 | ||
2426 | // average 2-particle correlations for single event: | |
2427 | fIntFlowCorrelationsAllEBE->SetBinContent(1,two1n1n); | |
2428 | fIntFlowCorrelationsAllEBE->SetBinContent(2,two2n2n); | |
2429 | fIntFlowCorrelationsAllEBE->SetBinContent(3,two3n3n); | |
2430 | fIntFlowCorrelationsAllEBE->SetBinContent(4,two4n4n); | |
2431 | ||
2432 | // average 2-particle correlations for all events: | |
2433 | fIntFlowCorrelationsAllPro->Fill(0.5,two1n1n,dMult*(dMult-1.)); | |
2434 | fIntFlowCorrelationsAllPro->Fill(1.5,two2n2n,dMult*(dMult-1.)); | |
2435 | fIntFlowCorrelationsAllPro->Fill(2.5,two3n3n,dMult*(dMult-1.)); | |
2436 | fIntFlowCorrelationsAllPro->Fill(3.5,two4n4n,dMult*(dMult-1.)); | |
2437 | ||
2438 | // store separetately <2> (to be improved: do I really need this?) | |
2439 | fIntFlowCorrelationsEBE->SetBinContent(1,two1n1n); // <2> | |
2440 | ||
2441 | // to be improved (this can be implemented better): | |
2442 | Double_t mWeight2p = 0.; | |
2443 | if(!strcmp(fMultiplicityWeight->Data(),"combinations")) | |
2444 | { | |
2445 | mWeight2p = dMult*(dMult-1.); | |
2446 | } else if(!strcmp(fMultiplicityWeight->Data(),"unit")) | |
2447 | { | |
2448 | mWeight2p = 1.; | |
2449 | } else if(!strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
2450 | { | |
2451 | mWeight2p = dMult; | |
2452 | } | |
2453 | ||
2454 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(1,mWeight2p); // eW_<2> | |
2455 | fIntFlowCorrelationsPro->Fill(0.5,two1n1n,mWeight2p); | |
2001bc3a | 2456 | fIntFlowCorrelationsVsMPro[0]->Fill(dMult+0.5,two1n1n,mWeight2p); |
489d5531 | 2457 | |
2458 | // distribution of <cos(n*(phi1-phi2))>: | |
2459 | //f2pDistribution->Fill(two1n1n,dMult*(dMult-1.)); | |
2460 | } // end of if(dMult>1) | |
2461 | ||
2462 | // 3-particle: | |
2463 | Double_t three2n1n1n = 0.; // <cos(n*(2.*phi1-phi2-phi3))> | |
2464 | Double_t three3n2n1n = 0.; // <cos(n*(3.*phi1-2.*phi2-phi3))> | |
2465 | Double_t three4n2n2n = 0.; // <cos(n*(4.*phi1-2.*phi2-2.*phi3))> | |
2466 | Double_t three4n3n1n = 0.; // <cos(n*(4.*phi1-3.*phi2-phi3))> | |
2467 | ||
2468 | if(dMult>2) | |
2469 | { | |
2470 | three2n1n1n = (reQ2nQ1nstarQ1nstar-2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2471 | - (pow(dReQ2n,2.)+pow(dImQ2n,2.))+2.*dMult) | |
2472 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2473 | three3n2n1n = (reQ3nQ2nstarQ1nstar-(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2474 | - (pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2475 | - (pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult) | |
2476 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2477 | three4n2n2n = (reQ4nQ2nstarQ2nstar-2.*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2478 | - (pow(dReQ4n,2.)+pow(dImQ4n,2.))+2.*dMult) | |
2479 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2480 | three4n3n1n = (reQ4nQ3nstarQ1nstar-(pow(dReQ4n,2.)+pow(dImQ4n,2.)) | |
2481 | - (pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2482 | - (pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult) | |
2483 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2484 | ||
2485 | // average 3-particle correlations for single event: | |
2486 | fIntFlowCorrelationsAllEBE->SetBinContent(6,three2n1n1n); | |
2487 | fIntFlowCorrelationsAllEBE->SetBinContent(7,three3n2n1n); | |
2488 | fIntFlowCorrelationsAllEBE->SetBinContent(8,three4n2n2n); | |
2489 | fIntFlowCorrelationsAllEBE->SetBinContent(9,three4n3n1n); | |
2490 | ||
2491 | // average 3-particle correlations for all events: | |
2492 | fIntFlowCorrelationsAllPro->Fill(5.5,three2n1n1n,dMult*(dMult-1.)*(dMult-2.)); | |
2493 | fIntFlowCorrelationsAllPro->Fill(6.5,three3n2n1n,dMult*(dMult-1.)*(dMult-2.)); | |
2494 | fIntFlowCorrelationsAllPro->Fill(7.5,three4n2n2n,dMult*(dMult-1.)*(dMult-2.)); | |
2495 | fIntFlowCorrelationsAllPro->Fill(8.5,three4n3n1n,dMult*(dMult-1.)*(dMult-2.)); | |
2496 | } // end of if(dMult>2) | |
2497 | ||
2498 | // 4-particle: | |
2499 | Double_t four1n1n1n1n = 0.; // <cos(n*(phi1+phi2-phi3-phi4))> | |
2500 | Double_t four2n2n2n2n = 0.; // <cos(2.*n*(phi1+phi2-phi3-phi4))> | |
2501 | Double_t four2n1n2n1n = 0.; // <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> | |
2502 | Double_t four3n1n1n1n = 0.; // <cos(n*(3.*phi1-phi2-phi3-phi4))> | |
2503 | Double_t four4n2n1n1n = 0.; // <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> | |
2504 | Double_t four3n1n2n2n = 0.; // <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> | |
2505 | Double_t four3n1n3n1n = 0.; // <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> | |
2506 | ||
2507 | if(dMult>3) | |
2508 | { | |
2509 | four1n1n1n1n = (2.*dMult*(dMult-3.)+pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)-4.*(dMult-2.)*(pow(dReQ1n,2.) | |
2510 | + pow(dImQ1n,2.))-2.*reQ2nQ1nstarQ1nstar+(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2511 | / (dMult*(dMult-1)*(dMult-2.)*(dMult-3.)); | |
2512 | four2n2n2n2n = (2.*dMult*(dMult-3.)+pow((pow(dReQ2n,2.)+pow(dImQ2n,2.)),2.)-4.*(dMult-2.)*(pow(dReQ2n,2.) | |
2513 | + pow(dImQ2n,2.))-2.*reQ4nQ2nstarQ2nstar+(pow(dReQ4n,2.)+pow(dImQ4n,2.))) | |
2514 | / (dMult*(dMult-1)*(dMult-2.)*(dMult-3.)); | |
2515 | four2n1n2n1n = (dQ2nQ1nQ2nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar-2.*reQ2nQ1nstarQ1nstar) | |
2516 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2517 | - ((dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2518 | + (dMult-4.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-(pow(dReQ3n,2.)+pow(dImQ3n,2.))) | |
2519 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2520 | + (dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2521 | four3n1n1n1n = (reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar-3.*reQ2nQ1nstarQ1nstar) | |
2522 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2523 | + (2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))+3.*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2524 | + 6.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))-6.*dMult) | |
2525 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2526 | four4n2n1n1n = (reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar-2.*reQ3nQ2nstarQ1nstar) | |
2527 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2528 | - (reQ2nQ1nstarQ1nstar-2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))-2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2529 | - 3.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2530 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2531 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2532 | four3n1n2n2n = (reQ3nQ1nQ2nstarQ2nstar-reQ4nQ2nstarQ2nstar-reQ3nQ1nQ4nstar-2.*reQ3nQ2nstarQ1nstar) | |
2533 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2534 | - (2.*reQ1nQ1nQ2nstar-(pow(dReQ4n,2.)+pow(dImQ4n,2.))-2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2535 | - 4.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2536 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2537 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2538 | four3n1n3n1n = ((pow(dReQ3n,2.)+pow(dImQ3n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2539 | - 2.*reQ4nQ3nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar) | |
2540 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2541 | + ((pow(dReQ4n,2.)+pow(dImQ4n,2.))-(dMult-4.)*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2542 | + (pow(dReQ2n,2.)+pow(dImQ2n,2.))-(dMult-4.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2543 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2544 | + (dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2545 | ||
2546 | // average 4-particle correlations for single event: | |
2547 | fIntFlowCorrelationsAllEBE->SetBinContent(11,four1n1n1n1n); | |
2548 | fIntFlowCorrelationsAllEBE->SetBinContent(12,four2n1n2n1n); | |
2549 | fIntFlowCorrelationsAllEBE->SetBinContent(13,four2n2n2n2n); | |
2550 | fIntFlowCorrelationsAllEBE->SetBinContent(14,four3n1n1n1n); | |
2551 | fIntFlowCorrelationsAllEBE->SetBinContent(15,four3n1n3n1n); | |
2552 | fIntFlowCorrelationsAllEBE->SetBinContent(16,four3n1n2n2n); | |
2553 | fIntFlowCorrelationsAllEBE->SetBinContent(17,four4n2n1n1n); | |
2554 | ||
2555 | // average 4-particle correlations for all events: | |
2556 | fIntFlowCorrelationsAllPro->Fill(10.5,four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2557 | fIntFlowCorrelationsAllPro->Fill(11.5,four2n1n2n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2558 | fIntFlowCorrelationsAllPro->Fill(12.5,four2n2n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2559 | fIntFlowCorrelationsAllPro->Fill(13.5,four3n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2560 | fIntFlowCorrelationsAllPro->Fill(14.5,four3n1n3n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2561 | fIntFlowCorrelationsAllPro->Fill(15.5,four3n1n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2562 | fIntFlowCorrelationsAllPro->Fill(16.5,four4n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2563 | ||
2564 | // store separetately <4> (to be improved: do I really need this?) | |
2565 | fIntFlowCorrelationsEBE->SetBinContent(2,four1n1n1n1n); // <4> | |
2566 | ||
2567 | // to be improved (this can be implemented better): | |
2568 | Double_t mWeight4p = 0.; | |
2569 | if(!strcmp(fMultiplicityWeight->Data(),"combinations")) | |
2570 | { | |
2571 | mWeight4p = dMult*(dMult-1.)*(dMult-2.)*(dMult-3.); | |
2572 | } else if(!strcmp(fMultiplicityWeight->Data(),"unit")) | |
2573 | { | |
2574 | mWeight4p = 1.; | |
2575 | } else if(!strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
2576 | { | |
2577 | mWeight4p = dMult; | |
2578 | } | |
2579 | ||
2580 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(2,mWeight4p); // eW_<4> | |
2581 | fIntFlowCorrelationsPro->Fill(1.5,four1n1n1n1n,mWeight4p); | |
2001bc3a | 2582 | fIntFlowCorrelationsVsMPro[1]->Fill(dMult+0.5,four1n1n1n1n,mWeight4p); |
489d5531 | 2583 | |
2584 | // distribution of <cos(n*(phi1+phi2-phi3-phi4))> | |
2585 | //f4pDistribution->Fill(four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2586 | ||
2587 | } // end of if(dMult>3) | |
2588 | ||
2589 | // 5-particle: | |
2590 | Double_t five2n1n1n1n1n = 0.; // <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))> | |
2591 | Double_t five2n2n2n1n1n = 0.; // <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))> | |
2592 | Double_t five3n1n2n1n1n = 0.; // <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))> | |
2593 | Double_t five4n1n1n1n1n = 0.; // <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))> | |
2594 | ||
2595 | if(dMult>4) | |
2596 | { | |
2597 | five2n1n1n1n1n = (reQ2nQ1nQ1nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar+6.*reQ3nQ2nstarQ1nstar) | |
2598 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2599 | - (reQ2nQ1nQ3nstar+3.*(dMult-6.)*reQ2nQ1nstarQ1nstar+3.*reQ1nQ1nQ2nstar) | |
2600 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2601 | - (2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2602 | + 3.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2603 | - 3.*(dMult-4.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2604 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2605 | - 3.*(pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2606 | - 2.*(2*dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult*(dMult-4.)) | |
2607 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2608 | ||
2609 | five2n2n2n1n1n = (reQ2nQ2nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ2nQ2nQ3nstarQ1nstar) | |
2610 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2611 | + 2.*(reQ4nQ2nstarQ2nstar+4.*reQ3nQ2nstarQ1nstar+reQ3nQ1nQ4nstar) | |
2612 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2613 | + (reQ2nQ2nQ4nstar-2.*(dMult-5.)*reQ2nQ1nstarQ1nstar+2.*reQ1nQ1nQ2nstar) | |
2614 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2615 | - (2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))+4.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2616 | + 1.*pow((pow(dReQ2n,2.)+pow(dImQ2n,2.)),2.) | |
2617 | - 2.*(3.*dMult-10.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2618 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2619 | - (4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2620 | - 4.*(dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))+4.*dMult*(dMult-6.)) | |
2621 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2622 | ||
2623 | five4n1n1n1n1n = (reQ4nQ1nstarQ1nstarQ1nstarQ1nstar-6.*reQ4nQ2nstarQ1nstarQ1nstar-4.*reQ3nQ1nstarQ1nstarQ1nstar) | |
2624 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2625 | + (8.*reQ4nQ3nstarQ1nstar+3.*reQ4nQ2nstarQ2nstar+12.*reQ3nQ2nstarQ1nstar+12.*reQ2nQ1nstarQ1nstar) | |
2626 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2627 | - (6.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))+8.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2628 | + 12.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))+24.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))-24.*dMult) | |
2629 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2630 | ||
2631 | five3n1n2n1n1n = (reQ3nQ1nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar) | |
2632 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2633 | - (reQ3nQ1nQ2nstarQ2nstar-3.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar) | |
2634 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2635 | - ((2.*dMult-13.)*reQ3nQ2nstarQ1nstar-reQ3nQ1nQ4nstar-9.*reQ2nQ1nstarQ1nstar) | |
2636 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2637 | - (2.*reQ1nQ1nQ2nstar+2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.)) | |
2638 | - 2.*(dMult-5.)*(pow(dReQ3n,2.)+pow(dImQ3n,2.))+2.*(pow(dReQ3n,2.) | |
2639 | + pow(dImQ3n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2640 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2641 | + (2.*(dMult-6.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2642 | - 2.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2643 | - pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2644 | + 2.*(3.*dMult-11.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2645 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2646 | - 4.*(dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2647 | ||
2648 | // average 5-particle correlations for single event: | |
2649 | fIntFlowCorrelationsAllEBE->SetBinContent(19,five2n1n1n1n1n); | |
2650 | fIntFlowCorrelationsAllEBE->SetBinContent(20,five2n2n2n1n1n); | |
2651 | fIntFlowCorrelationsAllEBE->SetBinContent(21,five3n1n2n1n1n); | |
2652 | fIntFlowCorrelationsAllEBE->SetBinContent(22,five4n1n1n1n1n); | |
2653 | ||
2654 | // average 5-particle correlations for all events: | |
2655 | fIntFlowCorrelationsAllPro->Fill(18.5,five2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2656 | fIntFlowCorrelationsAllPro->Fill(19.5,five2n2n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2657 | fIntFlowCorrelationsAllPro->Fill(20.5,five3n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2658 | fIntFlowCorrelationsAllPro->Fill(21.5,five4n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2659 | } // end of if(dMult>4) | |
2660 | ||
2661 | // 6-particle: | |
2662 | Double_t six1n1n1n1n1n1n = 0.; // <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
2663 | Double_t six2n2n1n1n1n1n = 0.; // <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))> | |
2664 | Double_t six3n1n1n1n1n1n = 0.; // <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))> | |
2665 | Double_t six2n1n1n2n1n1n = 0.; // <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))> | |
2666 | ||
2667 | if(dMult>5) | |
2668 | { | |
2669 | six1n1n1n1n1n1n = (pow(pow(dReQ1n,2.)+pow(dImQ1n,2.),3.)+9.*dQ2nQ1nQ2nstarQ1nstar-6.*reQ2nQ1nQ1nstarQ1nstarQ1nstar) | |
2670 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)) | |
2671 | + 4.*(reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar) | |
2672 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)) | |
2673 | + 2.*(9.*(dMult-4.)*reQ2nQ1nstarQ1nstar+2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))) | |
2674 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)) | |
2675 | - 9.*(pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)+(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2676 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-5.)) | |
2677 | + (18.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2678 | / (dMult*(dMult-1)*(dMult-3)*(dMult-4)) | |
2679 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2680 | ||
2681 | six2n1n1n2n1n1n = (dQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.) | |
2682 | * (2.*five2n2n2n1n1n+4.*five2n1n1n1n1n+4.*five3n1n2n1n1n+4.*four2n1n2n1n+1.*four1n1n1n1n) | |
2683 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four1n1n1n1n+4.*two1n1n | |
2684 | + 2.*three2n1n1n+2.*three2n1n1n+4.*four3n1n1n1n+8.*three2n1n1n+2.*four4n2n1n1n | |
2685 | + 4.*four2n1n2n1n+2.*two2n2n+8.*four2n1n2n1n+4.*four3n1n3n1n+8.*three3n2n1n | |
2686 | + 4.*four3n1n2n2n+4.*four1n1n1n1n+4.*four2n1n2n1n+1.*four2n2n2n2n) | |
2687 | - dMult*(dMult-1.)*(dMult-2.)*(2.*three2n1n1n+8.*two1n1n+4.*two1n1n+2. | |
2688 | + 4.*two1n1n+4.*three2n1n1n+2.*two2n2n+4.*three2n1n1n+8.*three3n2n1n | |
2689 | + 8.*two2n2n+4.*three4n3n1n+4.*two3n3n+4.*three3n2n1n+4.*two1n1n | |
2690 | + 8.*three2n1n1n+4.*two1n1n+4.*three3n2n1n+4.*three2n1n1n+2.*two2n2n | |
2691 | + 4.*three3n2n1n+2.*three4n2n2n)-dMult*(dMult-1.) | |
2692 | * (4.*two1n1n+4.+4.*two1n1n+2.*two2n2n+1.+4.*two1n1n+4.*two2n2n+4.*two3n3n | |
2693 | + 1.+2.*two2n2n+1.*two4n4n)-dMult) | |
2694 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed) | |
2695 | ||
2696 | six2n2n1n1n1n1n = (reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.) | |
2697 | * (five4n1n1n1n1n+8.*five2n1n1n1n1n+6.*five2n2n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.) | |
2698 | * (4.*four3n1n1n1n+6.*four4n2n1n1n+12.*three2n1n1n+12.*four1n1n1n1n+24.*four2n1n2n1n | |
2699 | + 4.*four3n1n2n2n+3.*four2n2n2n2n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n | |
2700 | + 4.*three4n3n1n+3.*three4n2n2n+8.*three2n1n1n+24.*two1n1n+12.*two2n2n+12.*three2n1n1n+8.*three3n2n1n | |
2701 | + 1.*three4n2n2n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+2.*two2n2n+8.*two1n1n+6.)-dMult) | |
2702 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed) | |
2703 | ||
2704 | six3n1n1n1n1n1n = (reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.) | |
2705 | * (five4n1n1n1n1n+4.*five2n1n1n1n1n+6.*five3n1n2n1n1n+4.*four3n1n1n1n) | |
2706 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+6.*four1n1n1n1n | |
2707 | + 12.*three2n1n1n+12.*four2n1n2n1n+6.*four3n1n1n1n+12.*three3n2n1n+4.*four3n1n3n1n+3.*four3n1n2n2n) | |
2708 | - dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n+4.*three4n3n1n+3.*three4n2n2n+4.*two1n1n | |
2709 | + 12.*two1n1n+6.*three2n1n1n+12.*three2n1n1n+4.*three3n2n1n+12.*two2n2n+4.*three3n2n1n+4.*two3n3n+1.*three4n3n1n | |
2710 | + 6.*three3n2n1n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+1.*two1n1n+4.+6.*two1n1n+4.*two2n2n | |
2711 | + 1.*two3n3n)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed) | |
2712 | ||
2713 | // average 6-particle correlations for single event: | |
2714 | fIntFlowCorrelationsAllEBE->SetBinContent(24,six1n1n1n1n1n1n); | |
2715 | fIntFlowCorrelationsAllEBE->SetBinContent(25,six2n1n1n2n1n1n); | |
2716 | fIntFlowCorrelationsAllEBE->SetBinContent(26,six2n2n1n1n1n1n); | |
2717 | fIntFlowCorrelationsAllEBE->SetBinContent(27,six3n1n1n1n1n1n); | |
2718 | ||
2719 | // average 6-particle correlations for all events: | |
2720 | fIntFlowCorrelationsAllPro->Fill(23.5,six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2721 | fIntFlowCorrelationsAllPro->Fill(24.5,six2n1n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2722 | fIntFlowCorrelationsAllPro->Fill(25.5,six2n2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2723 | fIntFlowCorrelationsAllPro->Fill(26.5,six3n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2724 | ||
2725 | // store separetately <6> (to be improved: do I really need this?) | |
2726 | fIntFlowCorrelationsEBE->SetBinContent(3,six1n1n1n1n1n1n); // <6> | |
2727 | ||
2728 | // to be improved (this can be implemented better): | |
2729 | Double_t mWeight6p = 0.; | |
2730 | if(!strcmp(fMultiplicityWeight->Data(),"combinations")) | |
2731 | { | |
2732 | mWeight6p = dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.); | |
2733 | } else if(!strcmp(fMultiplicityWeight->Data(),"unit")) | |
2734 | { | |
2735 | mWeight6p = 1.; | |
2736 | } else if(!strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
2737 | { | |
2738 | mWeight6p = dMult; | |
2739 | } | |
2740 | ||
2741 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(3,mWeight6p); // eW_<6> | |
2742 | fIntFlowCorrelationsPro->Fill(2.5,six1n1n1n1n1n1n,mWeight6p); | |
2001bc3a | 2743 | fIntFlowCorrelationsVsMPro[2]->Fill(dMult+0.5,six1n1n1n1n1n1n,mWeight6p); |
489d5531 | 2744 | |
2745 | // distribution of <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
2746 | //f6pDistribution->Fill(six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2747 | } // end of if(dMult>5) | |
2748 | ||
2749 | // 7-particle: | |
2750 | Double_t seven2n1n1n1n1n1n1n = 0.; // <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))> | |
2751 | ||
2752 | if(dMult>6) | |
2753 | { | |
2754 | seven2n1n1n1n1n1n1n = (reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.) | |
2755 | * (2.*six3n1n1n1n1n1n+4.*six1n1n1n1n1n1n+1.*six2n2n1n1n1n1n+6.*six2n1n1n2n1n1n+8.*five2n1n1n1n1n) | |
2756 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(1.*five4n1n1n1n1n +8.*five2n1n1n1n1n+8.*four3n1n1n1n | |
2757 | + 12.*five3n1n2n1n1n+4.*five2n1n1n1n1n+3.*five2n2n2n1n1n+6.*five2n2n2n1n1n+6.*four1n1n1n1n+24.*four1n1n1n1n | |
2758 | + 12.*five2n1n1n1n1n+12.*five2n1n1n1n1n+12.*three2n1n1n+24.*four2n1n2n1n+4.*five3n1n2n1n1n+4.*five2n1n1n1n1n) | |
2759 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+12.*four1n1n1n1n+24.*three2n1n1n | |
2760 | + 24.*four2n1n2n1n+12.*four3n1n1n1n+24.*three3n2n1n+8.*four3n1n3n1n+6.*four3n1n2n2n+6.*three2n1n1n+12.*four1n1n1n1n | |
2761 | + 12.*four2n1n2n1n+6.*three2n1n1n+12.*four2n1n2n1n+4.*four3n1n2n2n+3.*four2n2n2n2n+4.*four1n1n1n1n+6.*three2n1n1n | |
2762 | + 24.*two1n1n+24.*four1n1n1n1n+4.*four3n1n1n1n+24.*two1n1n+24.*three2n1n1n+12.*two2n2n+24.*three2n1n1n+12.*four2n1n2n1n | |
2763 | + 8.*three3n2n1n+8.*four2n1n2n1n+1.*four4n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+1.*three2n1n1n+8.*two1n1n | |
2764 | + 12.*three3n2n1n+24.*two1n1n+12.*three2n1n1n+4.*three2n1n1n+8.*two1n1n+4.*three4n3n1n+24.*three2n1n1n+8.*three3n2n1n | |
2765 | + 12.*two1n1n+12.*two1n1n+3.*three4n2n2n+24.*two2n2n+6.*two2n2n+12.+12.*three3n2n1n+8.*two3n3n+12.*three2n1n1n+24.*two1n1n | |
2766 | + 4.*three3n2n1n+8.*three3n2n1n+2.*three4n3n1n+12.*two1n1n+8.*three2n1n1n+4.*three2n1n1n+2.*three3n2n1n+6.*two2n2n+8.*two2n2n | |
2767 | + 1.*three4n2n2n+4.*three3n2n1n+6.*three2n1n1n)-dMult*(dMult-1.)*(4.*two1n1n+2.*two1n1n+6.*two2n2n+8.+1.*two2n2n+4.*two3n3n | |
2768 | + 12.*two1n1n+4.*two1n1n+1.*two4n4n+8.*two2n2n+6.+2.*two3n3n+4.*two1n1n+1.*two2n2n)-dMult) | |
2769 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)); // to be improved (direct formula needed) | |
2770 | ||
2771 | // average 7-particle correlations for single event: | |
2772 | fIntFlowCorrelationsAllEBE->SetBinContent(29,seven2n1n1n1n1n1n1n); | |
2773 | ||
2774 | // average 7-particle correlations for all events: | |
2775 | fIntFlowCorrelationsAllPro->Fill(28.5,seven2n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)); | |
2776 | } // end of if(dMult>6) | |
2777 | ||
2778 | // 8-particle: | |
2779 | Double_t eight1n1n1n1n1n1n1n1n = 0.; // <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
2780 | if(dMult>7) | |
2781 | { | |
2782 | eight1n1n1n1n1n1n1n1n = (pow(pow(dReQ1n,2.)+pow(dImQ1n,2.),4.)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.) | |
2783 | * (12.*seven2n1n1n1n1n1n1n+16.*six1n1n1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.) | |
2784 | * (8.*six3n1n1n1n1n1n+48.*six1n1n1n1n1n1n+6.*six2n2n1n1n1n1n+96.*five2n1n1n1n1n+72.*four1n1n1n1n+36.*six2n1n1n2n1n1n) | |
2785 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(2.*five4n1n1n1n1n+32.*five2n1n1n1n1n+36.*four1n1n1n1n | |
2786 | + 32.*four3n1n1n1n+48.*five2n1n1n1n1n+48.*five3n1n2n1n1n+144.*five2n1n1n1n1n+288.*four1n1n1n1n+36.*five2n2n2n1n1n | |
2787 | + 144.*three2n1n1n+96.*two1n1n+144.*four2n1n2n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.) | |
2788 | * (8.*four3n1n1n1n+48.*four1n1n1n1n+12.*four4n2n1n1n+96.*four2n1n2n1n+96.*three2n1n1n+72.*three2n1n1n+144.*two1n1n | |
2789 | + 16.*four3n1n3n1n+48.*four3n1n1n1n+144.*four1n1n1n1n+72.*four1n1n1n1n+96.*three3n2n1n+24.*four3n1n2n2n+144.*four2n1n2n1n | |
2790 | + 288.*two1n1n+288.*three2n1n1n+9.*four2n2n2n2n+72.*two2n2n+24.)-dMult*(dMult-1.)*(dMult-2.)*(12.*three2n1n1n+16.*two1n1n | |
2791 | + 24.*three3n2n1n+48.*three2n1n1n+96.*two1n1n+8.*three4n3n1n+32.*three3n2n1n+96.*three2n1n1n+144.*two1n1n+6.*three4n2n2n | |
2792 | + 96.*two2n2n+36.*two2n2n+72.+48.*three3n2n1n+16.*two3n3n+72.*three2n1n1n+144.*two1n1n)-dMult*(dMult-1.)*(8.*two1n1n | |
2793 | + 12.*two2n2n+16.+8.*two3n3n+48.*two1n1n+1.*two4n4n+16.*two2n2n+18.)-dMult) | |
2794 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); // to be improved (direct formula needed) | |
2795 | ||
2796 | // average 8-particle correlations for single event: | |
2797 | fIntFlowCorrelationsAllEBE->SetBinContent(31,eight1n1n1n1n1n1n1n1n); | |
2798 | ||
2799 | // average 8-particle correlations for all events: | |
2800 | fIntFlowCorrelationsAllPro->Fill(30.5,eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); | |
2801 | ||
2802 | // store separetately <8> (to be improved: do I really need this?) | |
2803 | fIntFlowCorrelationsEBE->SetBinContent(4,eight1n1n1n1n1n1n1n1n); // <8> | |
2804 | ||
2805 | // to be improved (this can be implemented better): | |
2806 | Double_t mWeight8p = 0.; | |
2807 | if(!strcmp(fMultiplicityWeight->Data(),"combinations")) | |
2808 | { | |
2809 | mWeight8p = dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.); | |
2810 | } else if(!strcmp(fMultiplicityWeight->Data(),"unit")) | |
2811 | { | |
2812 | mWeight8p = 1.; | |
2813 | } else if(!strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
2814 | { | |
2815 | mWeight8p = dMult; | |
2816 | } | |
2817 | ||
2818 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(4,mWeight8p); // eW_<8> | |
2819 | fIntFlowCorrelationsPro->Fill(3.5,eight1n1n1n1n1n1n1n1n,mWeight8p); | |
2001bc3a | 2820 | fIntFlowCorrelationsVsMPro[3]->Fill(dMult+0.5,eight1n1n1n1n1n1n1n1n,mWeight8p); |
489d5531 | 2821 | |
2822 | // distribution of <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
2823 | //f8pDistribution->Fill(eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); | |
2824 | } // end of if(dMult>7) | |
2825 | ||
2826 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations() | |
2827 | ||
2828 | ||
2829 | //================================================================================================================================ | |
2830 | ||
2831 | ||
2832 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrelations() | |
2833 | { | |
0328db2d | 2834 | // Calculate averages of products of correlations for integrated flow. |
489d5531 | 2835 | |
2001bc3a | 2836 | // multiplicity: |
2837 | Double_t dMult = (*fSMpk)(0,0); | |
2838 | ||
489d5531 | 2839 | Int_t counter = 0; |
2840 | ||
2841 | for(Int_t ci1=1;ci1<4;ci1++) | |
2842 | { | |
2843 | for(Int_t ci2=ci1+1;ci2<=4;ci2++) | |
2844 | { | |
ff70ca91 | 2845 | fIntFlowProductOfCorrelationsPro->Fill(0.5+counter, |
2846 | fIntFlowCorrelationsEBE->GetBinContent(ci1)* | |
2847 | fIntFlowCorrelationsEBE->GetBinContent(ci2), | |
2848 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)* | |
2849 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
2850 | // products versus multiplicity: // [0=<<2><4>>,1=<<2><6>>,2=<<2><8>>,3=<<4><6>>,4=<<4><8>>,5=<<6><8>>] | |
2001bc3a | 2851 | fIntFlowProductOfCorrelationsVsMPro[counter]->Fill(dMult+0.5, |
ff70ca91 | 2852 | fIntFlowCorrelationsEBE->GetBinContent(ci1)* |
2853 | fIntFlowCorrelationsEBE->GetBinContent(ci2), | |
2854 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)* | |
2855 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
2856 | counter++; | |
489d5531 | 2857 | } |
2858 | } | |
2859 | ||
2860 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrelations() | |
2861 | ||
2862 | ||
2863 | //================================================================================================================================ | |
2864 | ||
2865 | ||
0328db2d | 2866 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrectionTermsForNUA() |
2867 | { | |
2868 | // Calculate averages of products of correction terms for NUA. | |
2869 | ||
2870 | // a) Binning of fIntFlowProductOfCorrectionTermsForNUAPro is organized as follows: | |
2871 | // 1st bin: <<2><cos(phi)>> | |
2872 | // 2nd bin: <<2><sin(phi)>> | |
2873 | // 3rd bin: <<cos(phi)><sin(phi)>> | |
2874 | // 4th bin: <<2><cos(phi1+phi2)>> | |
2875 | // 5th bin: <<2><sin(phi1+phi2)>> | |
2876 | // 6th bin: <<2><cos(phi1-phi2-phi3)>> | |
2877 | // 7th bin: <<2><sin(phi1-phi2-phi3)>> | |
2878 | // 8th bin: <<4><cos(phi1)>> | |
2879 | // 9th bin: <<4><sin(phi1)>> | |
2880 | // 10th bin: <<4><cos(phi1+phi2)>> | |
2881 | // 11th bin: <<4><sin(phi1+phi2)>> | |
2882 | // 12th bin: <<4><cos(phi1-phi2-phi3)>> | |
2883 | // 13th bin: <<4><sin(phi1-phi2-phi3)>> | |
2884 | // 14th bin: <<cos(phi1)><cos(phi1+phi2)>> | |
2885 | // 15th bin: <<cos(phi1)><sin(phi1+phi2)>> | |
2886 | // 16th bin: <<cos(phi1)><cos(phi1-phi2-phi3)>> | |
2887 | // 17th bin: <<cos(phi1)><sin(phi1-phi2-phi3)>> | |
2888 | // 18th bin: <<sin(phi1)><cos(phi1+phi2)>> | |
2889 | // 19th bin: <<sin(phi1)><sin(phi1+phi2)>> | |
2890 | // 20th bin: <<sin(phi1)><cos(phi1-phi2-phi3)>> | |
2891 | // 21st bin: <<sin(phi1)><sin(phi1-phi2-phi3)>> | |
2892 | // 22nd bin: <<cos(phi1+phi2)><sin(phi1+phi2)>> | |
2893 | // 23rd bin: <<cos(phi1+phi2)><cos(phi1-phi2-phi3)>> | |
2894 | // 24th bin: <<cos(phi1+phi2)><sin(phi1-phi2-phi3)>> | |
2895 | // 25th bin: <<sin(phi1+phi2)><cos(phi1-phi2-phi3)>> | |
2896 | // 26th bin: <<sin(phi1+phi2)><sin(phi1-phi2-phi3)>> | |
2897 | // 27th bin: <<cos(phi1-phi2-phi3)><sin(phi1-phi2-phi3)>> | |
2898 | ||
2899 | // <<2><cos(phi)>>: | |
2900 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(0.5, | |
2901 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1), | |
2902 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2903 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)); | |
2904 | // <<2><sin(phi)>>: | |
2905 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(1.5, | |
2906 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1), | |
2907 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2908 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
2909 | // <<cos(phi)><sin(phi)>>: | |
2910 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(2.5, | |
2911 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1), | |
2912 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
2913 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
2914 | // <<2><cos(phi1+phi2)>>: | |
2915 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(3.5, | |
2916 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2), | |
2917 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2918 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
2919 | // <<2><sin(phi1+phi2)>>: | |
2920 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(4.5, | |
2921 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
2922 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2923 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
2924 | // <<2><cos(phi1-phi2-phi3)>>: | |
2925 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(5.5, | |
2926 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
2927 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2928 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
2929 | // <<2><sin(phi1-phi2-phi3)>>: | |
2930 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(6.5, | |
2931 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
2932 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2933 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
2934 | // <<4><cos(phi1)>>: | |
2935 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(7.5, | |
2936 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1), | |
2937 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
2938 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)); | |
2939 | // <<4><sin(phi1)>>: | |
2940 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(8.5, | |
2941 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1), | |
2942 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
2943 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
2944 | // <<4><cos(phi1+phi2)>>: | |
2945 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(9.5, | |
2946 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2), | |
2947 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
2948 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
2949 | // <<4><sin(phi1+phi2)>>: | |
2950 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(10.5, | |
2951 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
2952 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
2953 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
2954 | // <<4><cos(phi1-phi2-phi3)>>: | |
2955 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(11.5, | |
2956 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
2957 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
2958 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
2959 | // <<4><sin(phi1-phi2-phi3)>>: | |
2960 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(12.5, | |
2961 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
2962 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
2963 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
2964 | // <<cos(phi1)><cos(phi1+phi2)>>: | |
2965 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(13.5, | |
2966 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2), | |
2967 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
2968 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
2969 | // <<cos(phi1)><sin(phi1+phi2)>>: | |
2970 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(14.5, | |
2971 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
2972 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
2973 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
2974 | // <<cos(phi1)><cos(phi1-phi2-phi3)>>: | |
2975 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(15.5, | |
2976 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
2977 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
2978 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
2979 | // <<cos(phi1)><sin(phi1-phi2-phi3)>>: | |
2980 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(16.5, | |
2981 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
2982 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
2983 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
2984 | // <<sin(phi1)><cos(phi1+phi2)>>: | |
2985 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(17.5, | |
2986 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2), | |
2987 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1) | |
2988 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
2989 | // <<sin(phi1)><sin(phi1+phi2)>>: | |
2990 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(18.5, | |
2991 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
2992 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1) | |
2993 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
2994 | // <<sin(phi1)><cos(phi1-phi2-phi3)>>: | |
2995 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(19.5, | |
2996 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
2997 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1) | |
2998 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
2999 | // <<sin(phi1)><sin(phi1-phi2-phi3)>>: | |
3000 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(20.5, | |
3001 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
3002 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1) | |
3003 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
3004 | // <<cos(phi1+phi2)><sin(phi1+phi2)>>: | |
3005 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(21.5, | |
3006 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
3007 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2) | |
3008 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
3009 | // <<cos(phi1+phi2)><cos(phi1-phi2-phi3)>>: | |
3010 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(22.5, | |
3011 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
3012 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2) | |
3013 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
3014 | // <<cos(phi1+phi2)><sin(phi1-phi2-phi3)>>: | |
3015 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(23.5, | |
3016 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
3017 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2) | |
3018 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
3019 | // <<sin(phi1+phi2)><cos(phi1-phi2-phi3)>>: | |
3020 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(24.5, | |
3021 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
3022 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2) | |
3023 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
3024 | // <<sin(phi1+phi2)><sin(phi1-phi2-phi3)>>: | |
3025 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(25.5, | |
3026 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
3027 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2) | |
3028 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
3029 | // <<cos(phi1-phi2-phi3)><sin(phi1-phi2-phi3)>>: | |
3030 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(26.5, | |
3031 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
3032 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3) | |
3033 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
3034 | ||
3035 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrectionTermsForNUA() | |
3036 | ||
3037 | ||
3038 | //================================================================================================================================ | |
3039 | ||
3040 | ||
489d5531 | 3041 | void AliFlowAnalysisWithQCumulants::CalculateCovariancesIntFlow() |
3042 | { | |
3043 | // a) Calculate unbiased estimators Cov(<2>,<4>), Cov(<2>,<6>), Cov(<2>,<8>), Cov(<4>,<6>), Cov(<4>,<8>) and Cov(<6>,<8>) | |
3044 | // for covariances V_(<2>,<4>), V_(<2>,<6>), V_(<2>,<8>), V_(<4>,<6>), V_(<4>,<8>) and V_(<6>,<8>). | |
3045 | // b) Store in histogram fIntFlowCovariances for instance the following: | |
3046 | // | |
3047 | // 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)] | |
3048 | // | |
3049 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<4>} is event weight for <4>. | |
3050 | // c) Binning of fIntFlowCovariances is organized as follows: | |
3051 | // | |
3052 | // 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)] | |
3053 | // 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)] | |
3054 | // 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)] | |
3055 | // 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)] | |
3056 | // 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)] | |
3057 | // 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)] | |
3058 | ||
3059 | for(Int_t power=0;power<2;power++) | |
3060 | { | |
3061 | if(!(fIntFlowCorrelationsPro && fIntFlowProductOfCorrelationsPro | |
3062 | && fIntFlowSumOfEventWeights[power] && fIntFlowSumOfProductOfEventWeights | |
3063 | && fIntFlowCovariances)) | |
3064 | { | |
3065 | cout<<"WARNING: fIntFlowCorrelationsPro && fIntFlowProductOfCorrelationsPro "<<endl; | |
3066 | cout<<" && fIntFlowSumOfEventWeights[power] && fIntFlowSumOfProductOfEventWeights"<<endl; | |
3067 | cout<<" && fIntFlowCovariances is NULL in AFAWQC::FCIF() !!!!"<<endl; | |
3068 | cout<<"power = "<<power<<endl; | |
3069 | exit(0); | |
3070 | } | |
3071 | } | |
3072 | ||
3073 | // average 2-, 4-, 6- and 8-particle correlations for all events: | |
3074 | Double_t correlation[4] = {0.}; | |
3075 | for(Int_t ci=0;ci<4;ci++) | |
3076 | { | |
3077 | correlation[ci] = fIntFlowCorrelationsPro->GetBinContent(ci+1); | |
3078 | } | |
3079 | // average products of 2-, 4-, 6- and 8-particle correlations: | |
3080 | Double_t productOfCorrelations[4][4] = {{0.}}; | |
3081 | Int_t productOfCorrelationsLabel = 1; | |
3082 | // denominators in the expressions for the unbiased estimator for covariance: | |
3083 | Double_t denominator[4][4] = {{0.}}; | |
3084 | Int_t sumOfProductOfEventWeightsLabel1 = 1; | |
3085 | // weight dependent prefactor which multiply unbiased estimators for covariances: | |
3086 | Double_t wPrefactor[4][4] = {{0.}}; | |
3087 | Int_t sumOfProductOfEventWeightsLabel2 = 1; | |
3088 | for(Int_t c1=0;c1<4;c1++) | |
3089 | { | |
3090 | for(Int_t c2=c1+1;c2<4;c2++) | |
3091 | { | |
3092 | productOfCorrelations[c1][c2] = fIntFlowProductOfCorrelationsPro->GetBinContent(productOfCorrelationsLabel); | |
3093 | if(fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) && fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1)) | |
3094 | { | |
3095 | denominator[c1][c2] = 1.-(fIntFlowSumOfProductOfEventWeights->GetBinContent(sumOfProductOfEventWeightsLabel1))/ | |
3096 | (fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) | |
3097 | * fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1)); | |
3098 | ||
3099 | wPrefactor[c1][c2] = fIntFlowSumOfProductOfEventWeights->GetBinContent(sumOfProductOfEventWeightsLabel2)/ | |
3100 | (fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) | |
3101 | * fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1)); | |
3102 | ||
3103 | ||
3104 | } | |
3105 | productOfCorrelationsLabel++; | |
3106 | sumOfProductOfEventWeightsLabel1++; | |
3107 | sumOfProductOfEventWeightsLabel2++; | |
3108 | } | |
3109 | } | |
3110 | ||
3111 | // covariance label: | |
3112 | Int_t covarianceLabel = 1; | |
3113 | for(Int_t c1=0;c1<4;c1++) | |
3114 | { | |
3115 | for(Int_t c2=c1+1;c2<4;c2++) | |
3116 | { | |
3117 | if(denominator[c1][c2]) | |
3118 | { | |
3119 | // covariances: | |
3120 | Double_t cov = (productOfCorrelations[c1][c2]-correlation[c1]*correlation[c2])/denominator[c1][c2]; | |
3121 | // covarianced multiplied with weight dependent prefactor: | |
3122 | Double_t wCov = cov * wPrefactor[c1][c2]; | |
3123 | fIntFlowCovariances->SetBinContent(covarianceLabel,wCov); | |
3124 | } | |
3125 | covarianceLabel++; | |
3126 | } | |
3127 | } | |
3128 | ||
9da1a4f3 | 3129 | // versus multiplicity: |
3130 | Int_t nBins = fIntFlowCorrelationsVsMPro[0]->GetNbinsX(); // to be improved (hardwired 0) | |
3131 | for(Int_t b=1;b<=nBins;b++) | |
3132 | { | |
3133 | // average 2-, 4-, 6- and 8-particle correlations for all events: | |
3134 | Double_t correlationVsM[4] = {0.}; | |
3135 | for(Int_t ci=0;ci<4;ci++) | |
3136 | { | |
3137 | correlationVsM[ci] = fIntFlowCorrelationsVsMPro[ci]->GetBinContent(b); | |
3138 | } // end of for(Int_t ci=0;ci<4;ci++) | |
3139 | // average products of 2-, 4-, 6- and 8-particle correlations: | |
3140 | Double_t productOfCorrelationsVsM[4][4] = {{0.}}; | |
3141 | Int_t productOfCorrelationsLabelVsM = 1; | |
3142 | // denominators in the expressions for the unbiased estimator for covariance: | |
3143 | Double_t denominatorVsM[4][4] = {{0.}}; | |
3144 | Int_t sumOfProductOfEventWeightsLabel1VsM = 1; | |
3145 | // weight dependent prefactor which multiply unbiased estimators for covariances: | |
3146 | Double_t wPrefactorVsM[4][4] = {{0.}}; | |
3147 | Int_t sumOfProductOfEventWeightsLabel2VsM = 1; | |
3148 | for(Int_t c1=0;c1<4;c1++) | |
3149 | { | |
3150 | for(Int_t c2=c1+1;c2<4;c2++) | |
3151 | { | |
3152 | productOfCorrelationsVsM[c1][c2] = fIntFlowProductOfCorrelationsVsMPro[productOfCorrelationsLabelVsM-1]->GetBinContent(b); | |
3153 | if(fIntFlowSumOfEventWeightsVsM[c1][0]->GetBinContent(b) && fIntFlowSumOfEventWeightsVsM[c2][0]->GetBinContent(b)) | |
3154 | { | |
3155 | denominatorVsM[c1][c2] = 1.-(fIntFlowSumOfProductOfEventWeightsVsM[sumOfProductOfEventWeightsLabel1VsM-1]->GetBinContent(b))/ | |
3156 | (fIntFlowSumOfEventWeightsVsM[c1][0]->GetBinContent(b) | |
3157 | * fIntFlowSumOfEventWeightsVsM[c2][0]->GetBinContent(b)); | |
3158 | ||
3159 | wPrefactorVsM[c1][c2] = fIntFlowSumOfProductOfEventWeightsVsM[sumOfProductOfEventWeightsLabel2VsM-1]->GetBinContent(b)/ | |
3160 | (fIntFlowSumOfEventWeightsVsM[c1][0]->GetBinContent(b) | |
3161 | * fIntFlowSumOfEventWeightsVsM[c2][0]->GetBinContent(b)); | |
3162 | ||
3163 | ||
3164 | } | |
3165 | productOfCorrelationsLabelVsM++; | |
3166 | sumOfProductOfEventWeightsLabel1VsM++; | |
3167 | sumOfProductOfEventWeightsLabel2VsM++; | |
3168 | } // end of for(Int_t c1=0;c1<4;c1++) | |
3169 | } // end of for(Int_t c2=c1+1;c2<4;c2++) | |
3170 | // covariance label: | |
3171 | Int_t covarianceLabelVsM = 1; | |
3172 | for(Int_t c1=0;c1<4;c1++) | |
3173 | { | |
3174 | for(Int_t c2=c1+1;c2<4;c2++) | |
3175 | { | |
3176 | if(denominatorVsM[c1][c2]) | |
3177 | { | |
3178 | // covariances: | |
3179 | Double_t covVsM = (productOfCorrelationsVsM[c1][c2]-correlationVsM[c1]*correlationVsM[c2])/denominatorVsM[c1][c2]; | |
3180 | // covarianced multiplied with weight dependent prefactor: | |
3181 | Double_t wCovVsM = covVsM * wPrefactorVsM[c1][c2]; | |
3182 | fIntFlowCovariancesVsM[covarianceLabelVsM-1]->SetBinContent(b,wCovVsM); | |
3183 | } | |
3184 | covarianceLabelVsM++; | |
3185 | } | |
3186 | } | |
3187 | } // end of for(Int_t b=1;b<=nBins;b++) | |
3188 | ||
489d5531 | 3189 | } // end of AliFlowAnalysisWithQCumulants::CalculateCovariancesIntFlow() |
3190 | ||
489d5531 | 3191 | //================================================================================================================================ |
3192 | ||
0328db2d | 3193 | void AliFlowAnalysisWithQCumulants::CalculateCovariancesNUAIntFlow() |
3194 | { | |
3195 | // a) Calculate unbiased estimators Cov(*,*) for true covariances V_(*,*) for NUA terms. | |
3196 | // b) Store in histogram fIntFlowCovariancesNUA for instance the following: | |
3197 | // | |
3198 | // Cov(<2>,<cos(phi)>) * (sum_{i=1}^{N} w_{<2>}_i w_{<cos(phi)>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<cos(phi)>}_j)] | |
3199 | // | |
3200 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<cos(phi)>} is event weight for <cos(phi)>. | |
3201 | // c) Binning of fIntFlowCovariancesNUA is organized as follows: | |
3202 | // | |
3203 | // 1st bin: Cov(<2>,<cos(phi)>) * (sum_{i=1}^{N} w_{<2>}_i w_{<cos(phi)>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<cos(phi)>}_j)] | |
3204 | // 2nd bin: Cov(<2>,<sin(phi)>) * (sum_{i=1}^{N} w_{<2>}_i w_{<sin(phi)>}_i )/[(sum_{i=1}^{N} w_{<2>}_i) * (sum_{j=1}^{N} w_{<sin(phi)>}_j)] | |
3205 | // 3rd bin: Cov(<cos(phi)>,<sin(phi)>) * (sum_{i=1}^{N} w_{<cos(phi)>}_i w_{<sin(phi)>}_i )/[(sum_{i=1}^{N} w_{<cos(phi)>}_i) * (sum_{j=1}^{N} w_{<sin(phi)>}_j)] | |
3206 | // ... | |
3207 | ||
3208 | // Cov(<2>,<cos(phi)>): | |
3209 | Double_t product1 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(1); // <<2><cos(phi)>> | |
3210 | Double_t term1st1 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3211 | Double_t term2nd1 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi)>> | |
3212 | Double_t sumOfW1st1 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3213 | Double_t sumOfW2nd1 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi)>} | |
3214 | Double_t sumOfWW1 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(1); // W_{<2>} * W_{<cos(phi)>} | |
3215 | // numerator in the expression for the the unbiased estimator for covariance: | |
3216 | Double_t numerator1 = product1 - term1st1*term2nd1; | |
3217 | // denominator in the expression for the the unbiased estimator for covariance: | |
3218 | Double_t denominator1 = 1.-sumOfWW1/(sumOfW1st1*sumOfW2nd1); | |
3219 | // covariance: | |
3220 | Double_t covariance1 = numerator1/denominator1; | |
3221 | // weight dependent prefactor for covariance: | |
3222 | Double_t wPrefactor1 = sumOfWW1/(sumOfW1st1*sumOfW2nd1); | |
3223 | // finally, store "weighted" covariance: | |
3224 | fIntFlowCovariancesNUA->SetBinContent(1,wPrefactor1*covariance1); | |
3225 | ||
3226 | // Cov(<2>,<sin(phi)>): | |
3227 | Double_t product2 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(2); // <<2><sin(phi)>> | |
3228 | Double_t term1st2 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3229 | Double_t term2nd2 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi)>> | |
3230 | Double_t sumOfW1st2 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3231 | Double_t sumOfW2nd2 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi)>} | |
3232 | Double_t sumOfWW2 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(2); // W_{<2>} * W_{<sin(phi)>} | |
3233 | // numerator in the expression for the the unbiased estimator for covariance: | |
3234 | Double_t numerator2 = product2 - term1st2*term2nd2; | |
3235 | // denominator in the expression for the the unbiased estimator for covariance: | |
3236 | Double_t denominator2 = 1.-sumOfWW2/(sumOfW1st2*sumOfW2nd2); | |
3237 | // covariance: | |
3238 | Double_t covariance2 = numerator2/denominator2; | |
3239 | // weight dependent prefactor for covariance: | |
3240 | Double_t wPrefactor2 = sumOfWW2/(sumOfW1st2*sumOfW2nd2); | |
3241 | // finally, store "weighted" covariance: | |
3242 | fIntFlowCovariancesNUA->SetBinContent(2,wPrefactor2*covariance2); | |
3243 | ||
3244 | // Cov(<cos(phi)>,<sin(phi)>): | |
3245 | Double_t product3 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(3); // <<cos(phi)><sin(phi)>> | |
3246 | Double_t term1st3 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi)>> | |
3247 | Double_t term2nd3 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi)>> | |
3248 | Double_t sumOfW1st3 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi)>} | |
3249 | Double_t sumOfW2nd3 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi)>} | |
3250 | Double_t sumOfWW3 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(3); // W_{<cos(phi)>} * W_{<sin(phi)>} | |
3251 | // numerator in the expression for the the unbiased estimator for covariance: | |
3252 | Double_t numerator3 = product3 - term1st3*term2nd3; | |
3253 | // denominator in the expression for the the unbiased estimator for covariance: | |
3254 | Double_t denominator3 = 1.-sumOfWW3/(sumOfW1st3*sumOfW2nd3); | |
3255 | // covariance: | |
3256 | Double_t covariance3 = numerator3/denominator3; | |
3257 | // weight dependent prefactor for covariance: | |
3258 | Double_t wPrefactor3 = sumOfWW3/(sumOfW1st3*sumOfW2nd3); | |
3259 | // finally, store "weighted" covariance: | |
3260 | fIntFlowCovariancesNUA->SetBinContent(3,wPrefactor3*covariance3); | |
3261 | ||
3262 | // Cov(<2>,<cos(phi1+phi2)>): | |
3263 | Double_t product4 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(4); // <<2><cos(phi1+phi2)>> | |
3264 | Double_t term1st4 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3265 | Double_t term2nd4 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3266 | Double_t sumOfW1st4 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3267 | Double_t sumOfW2nd4 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3268 | Double_t sumOfWW4 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(4); // W_{<2>} * W_{<cos(phi1+phi2)>} | |
3269 | // numerator in the expression for the the unbiased estimator for covariance: | |
3270 | Double_t numerator4 = product4 - term1st4*term2nd4; | |
3271 | // denominator in the expression for the the unbiased estimator for covariance: | |
3272 | Double_t denominator4 = 1.-sumOfWW4/(sumOfW1st4*sumOfW2nd4); | |
3273 | // covariance: | |
3274 | Double_t covariance4 = numerator4/denominator4; | |
3275 | // weight dependent prefactor for covariance: | |
3276 | Double_t wPrefactor4 = sumOfWW4/(sumOfW1st4*sumOfW2nd4); | |
3277 | // finally, store "weighted" covariance: | |
3278 | fIntFlowCovariancesNUA->SetBinContent(4,wPrefactor4*covariance4); | |
3279 | ||
3280 | // Cov(<2>,<sin(phi1+phi2)>): | |
3281 | Double_t product5 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(5); // <<2><sin(phi1+phi2)>> | |
3282 | Double_t term1st5 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3283 | Double_t term2nd5 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3284 | Double_t sumOfW1st5 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3285 | Double_t sumOfW2nd5 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3286 | Double_t sumOfWW5 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(5); // W_{<2>} * W_{<sin(phi1+phi2)>} | |
3287 | // numerator in the expression for the the unbiased estimator for covariance: | |
3288 | Double_t numerator5 = product5 - term1st5*term2nd5; | |
3289 | // denominator in the expression for the the unbiased estimator for covariance: | |
3290 | Double_t denominator5 = 1.-sumOfWW5/(sumOfW1st5*sumOfW2nd5); | |
3291 | // covariance: | |
3292 | Double_t covariance5 = numerator5/denominator5; | |
3293 | // weight dependent prefactor for covariance: | |
3294 | Double_t wPrefactor5 = sumOfWW5/(sumOfW1st5*sumOfW2nd5); | |
3295 | // finally, store "weighted" covariance: | |
3296 | fIntFlowCovariancesNUA->SetBinContent(5,wPrefactor5*covariance5); | |
3297 | ||
3298 | // Cov(<2>,<cos(phi1-phi2-phi3)>): | |
3299 | Double_t product6 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(6); // <<2><cos(phi1-phi2-phi3)>> | |
3300 | Double_t term1st6 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3301 | Double_t term2nd6 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3302 | Double_t sumOfW1st6 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3303 | Double_t sumOfW2nd6 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3304 | Double_t sumOfWW6 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(6); // W_{<2>} * W_{<cos(phi1-phi2-phi3)>} | |
3305 | // numerator in the expression for the the unbiased estimator for covariance: | |
3306 | Double_t numerator6 = product6 - term1st6*term2nd6; | |
3307 | // denominator in the expression for the the unbiased estimator for covariance: | |
3308 | Double_t denominator6 = 1.-sumOfWW6/(sumOfW1st6*sumOfW2nd6); | |
3309 | // covariance: | |
3310 | Double_t covariance6 = numerator6/denominator6; | |
3311 | // weight dependent prefactor for covariance: | |
3312 | Double_t wPrefactor6 = sumOfWW6/(sumOfW1st6*sumOfW2nd6); | |
3313 | // finally, store "weighted" covariance: | |
3314 | fIntFlowCovariancesNUA->SetBinContent(6,wPrefactor6*covariance6); | |
3315 | ||
3316 | // Cov(<2>,<sin(phi1-phi2-phi3)>): | |
3317 | Double_t product7 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(7); // <<2><sin(phi1-phi2-phi3)>> | |
3318 | Double_t term1st7 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3319 | Double_t term2nd7 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3320 | Double_t sumOfW1st7 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3321 | Double_t sumOfW2nd7 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3322 | Double_t sumOfWW7 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(7); // W_{<2>} * W_{<sin(phi1-phi2-phi3)>} | |
3323 | // numerator in the expression for the the unbiased estimator for covariance: | |
3324 | Double_t numerator7 = product7 - term1st7*term2nd7; | |
3325 | // denominator in the expression for the the unbiased estimator for covariance: | |
3326 | Double_t denominator7 = 1.-sumOfWW7/(sumOfW1st7*sumOfW2nd7); | |
3327 | // covariance: | |
3328 | Double_t covariance7 = numerator7/denominator7; | |
3329 | // weight dependent prefactor for covariance: | |
3330 | Double_t wPrefactor7 = sumOfWW7/(sumOfW1st7*sumOfW2nd7); | |
3331 | // finally, store "weighted" covariance: | |
3332 | fIntFlowCovariancesNUA->SetBinContent(7,wPrefactor7*covariance7); | |
3333 | ||
3334 | // Cov(<4>,<cos(phi1>): | |
3335 | Double_t product8 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(8); // <<4><cos(phi1)>> | |
3336 | Double_t term1st8 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3337 | Double_t term2nd8 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3338 | Double_t sumOfW1st8 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3339 | Double_t sumOfW2nd8 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3340 | Double_t sumOfWW8 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(8); // W_{<4>} * W_{<cos(phi1)>} | |
3341 | // numerator in the expression for the the unbiased estimator for covariance: | |
3342 | Double_t numerator8 = product8 - term1st8*term2nd8; | |
3343 | // denominator in the expression for the the unbiased estimator for covariance: | |
3344 | Double_t denominator8 = 1.-sumOfWW8/(sumOfW1st8*sumOfW2nd8); | |
3345 | // covariance: | |
3346 | Double_t covariance8 = numerator8/denominator8; | |
3347 | // weight dependent prefactor for covariance: | |
3348 | Double_t wPrefactor8 = sumOfWW8/(sumOfW1st8*sumOfW2nd8); | |
3349 | // finally, store "weighted" covariance: | |
3350 | fIntFlowCovariancesNUA->SetBinContent(8,wPrefactor8*covariance8); | |
3351 | ||
3352 | // Cov(<4>,<sin(phi1)>): | |
3353 | Double_t product9 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(9); // <<4><sin(phi1)>> | |
3354 | Double_t term1st9 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3355 | Double_t term2nd9 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3356 | Double_t sumOfW1st9 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3357 | Double_t sumOfW2nd9 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3358 | Double_t sumOfWW9 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(9); // W_{<4>} * W_{<sin(phi1)>} | |
3359 | // numerator in the expression for the the unbiased estimator for covariance: | |
3360 | Double_t numerator9 = product9 - term1st9*term2nd9; | |
3361 | // denominator in the expression for the the unbiased estimator for covariance: | |
3362 | Double_t denominator9 = 1.-sumOfWW9/(sumOfW1st9*sumOfW2nd9); | |
3363 | // covariance: | |
3364 | Double_t covariance9 = numerator9/denominator9; | |
3365 | // weight dependent prefactor for covariance: | |
3366 | Double_t wPrefactor9 = sumOfWW9/(sumOfW1st9*sumOfW2nd9); | |
3367 | // finally, store "weighted" covariance: | |
3368 | fIntFlowCovariancesNUA->SetBinContent(9,wPrefactor9*covariance9); | |
3369 | ||
3370 | // Cov(<4>,<cos(phi1+phi2)>): | |
3371 | Double_t product10 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(10); // <<4><cos(phi1+phi2)>> | |
3372 | Double_t term1st10 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3373 | Double_t term2nd10 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3374 | Double_t sumOfW1st10 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3375 | Double_t sumOfW2nd10 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3376 | Double_t sumOfWW10 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(10); // W_{<4>} * W_{<cos(phi1+phi2)>} | |
3377 | // numerator in the expression for the the unbiased estimator for covariance: | |
3378 | Double_t numerator10 = product10 - term1st10*term2nd10; | |
3379 | // denominator in the expression for the the unbiased estimator for covariance: | |
3380 | Double_t denominator10 = 1.-sumOfWW10/(sumOfW1st10*sumOfW2nd10); | |
3381 | // covariance: | |
3382 | Double_t covariance10 = numerator10/denominator10; | |
3383 | // weight dependent prefactor for covariance: | |
3384 | Double_t wPrefactor10 = sumOfWW10/(sumOfW1st10*sumOfW2nd10); | |
3385 | // finally, store "weighted" covariance: | |
3386 | fIntFlowCovariancesNUA->SetBinContent(10,wPrefactor10*covariance10); | |
3387 | ||
3388 | // Cov(<4>,<sin(phi1+phi2)>): | |
3389 | Double_t product11 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(11); // <<4><sin(phi1+phi2)>> | |
3390 | Double_t term1st11 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3391 | Double_t term2nd11 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3392 | Double_t sumOfW1st11 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3393 | Double_t sumOfW2nd11 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3394 | Double_t sumOfWW11 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(11); // W_{<4>} * W_{<sin(phi1+phi2)>} | |
3395 | // numerator in the expression for the the unbiased estimator for covariance: | |
3396 | Double_t numerator11 = product11 - term1st11*term2nd11; | |
3397 | // denominator in the expression for the the unbiased estimator for covariance: | |
3398 | Double_t denominator11 = 1.-sumOfWW11/(sumOfW1st11*sumOfW2nd11); | |
3399 | // covariance: | |
3400 | Double_t covariance11 = numerator11/denominator11; | |
3401 | // weight dependent prefactor for covariance: | |
3402 | Double_t wPrefactor11 = sumOfWW11/(sumOfW1st11*sumOfW2nd11); | |
3403 | // finally, store "weighted" covariance: | |
3404 | fIntFlowCovariancesNUA->SetBinContent(11,wPrefactor11*covariance11); | |
3405 | ||
3406 | // Cov(<4>,<cos(phi1-phi2-phi3)>): | |
3407 | Double_t product12 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(12); // <<4><cos(phi1-phi2-phi3)>> | |
3408 | Double_t term1st12 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3409 | Double_t term2nd12 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3410 | Double_t sumOfW1st12 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3411 | Double_t sumOfW2nd12 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3412 | Double_t sumOfWW12 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(12); // W_{<4>} * W_{<cos(phi1-phi2-phi3)>} | |
3413 | // numerator in the expression for the the unbiased estimator for covariance: | |
3414 | Double_t numerator12 = product12 - term1st12*term2nd12; | |
3415 | // denominator in the expression for the the unbiased estimator for covariance: | |
3416 | Double_t denominator12 = 1.-sumOfWW12/(sumOfW1st12*sumOfW2nd12); | |
3417 | // covariance: | |
3418 | Double_t covariance12 = numerator12/denominator12; | |
3419 | // weight dependent prefactor for covariance: | |
3420 | Double_t wPrefactor12 = sumOfWW12/(sumOfW1st12*sumOfW2nd12); | |
3421 | // finally, store "weighted" covariance: | |
3422 | fIntFlowCovariancesNUA->SetBinContent(12,wPrefactor12*covariance12); | |
3423 | ||
3424 | // Cov(<4>,<sin(phi1-phi2-phi3)>): | |
3425 | Double_t product13 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(13); // <<4><sin(phi1-phi2-phi3)>> | |
3426 | Double_t term1st13 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3427 | Double_t term2nd13 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3428 | Double_t sumOfW1st13 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3429 | Double_t sumOfW2nd13 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3430 | Double_t sumOfWW13 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(13); // W_{<4>} * W_{<sin(phi1-phi2-phi3)>} | |
3431 | // numerator in the expression for the the unbiased estimator for covariance: | |
3432 | Double_t numerator13 = product13 - term1st13*term2nd13; | |
3433 | // denominator in the expression for the the unbiased estimator for covariance: | |
3434 | Double_t denominator13 = 1.-sumOfWW13/(sumOfW1st13*sumOfW2nd13); | |
3435 | // covariance: | |
3436 | Double_t covariance13 = numerator13/denominator13; | |
3437 | // weight dependent prefactor for covariance: | |
3438 | Double_t wPrefactor13 = sumOfWW13/(sumOfW1st13*sumOfW2nd13); | |
3439 | // finally, store "weighted" covariance: | |
3440 | fIntFlowCovariancesNUA->SetBinContent(13,wPrefactor13*covariance13); | |
3441 | ||
3442 | // Cov(<cos(phi1)>,<cos(phi1+phi2)>): | |
3443 | Double_t product14 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(14); // <<cos(phi1)><cos(phi1+phi2)>> | |
3444 | Double_t term1st14 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3445 | Double_t term2nd14 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3446 | Double_t sumOfW1st14 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3447 | Double_t sumOfW2nd14 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3448 | Double_t sumOfWW14 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(14); // W_{<cos(phi1)>} * W_{<cos(phi1+phi2)>} | |
3449 | // numerator in the expression for the the unbiased estimator for covariance: | |
3450 | Double_t numerator14 = product14 - term1st14*term2nd14; | |
3451 | // denominator in the expression for the the unbiased estimator for covariance: | |
3452 | Double_t denominator14 = 1.-sumOfWW14/(sumOfW1st14*sumOfW2nd14); | |
3453 | // covariance: | |
3454 | Double_t covariance14 = numerator14/denominator14; | |
3455 | // weight dependent prefactor for covariance: | |
3456 | Double_t wPrefactor14 = sumOfWW14/(sumOfW1st14*sumOfW2nd14); | |
3457 | // finally, store "weighted" covariance: | |
3458 | fIntFlowCovariancesNUA->SetBinContent(14,wPrefactor14*covariance14); | |
3459 | ||
3460 | // Cov(<cos(phi1)>,<sin(phi1+phi2)>): | |
3461 | Double_t product15 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(15); // <<cos(phi1)><sin(phi1+phi2)>> | |
3462 | Double_t term1st15 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3463 | Double_t term2nd15 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3464 | Double_t sumOfW1st15 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3465 | Double_t sumOfW2nd15 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3466 | Double_t sumOfWW15 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(15); // W_{<cos(phi1)>} * W_{<sin(phi1+phi2)>} | |
3467 | // numerator in the expression for the the unbiased estimator for covariance: | |
3468 | Double_t numerator15 = product15 - term1st15*term2nd15; | |
3469 | // denominator in the expression for the the unbiased estimator for covariance: | |
3470 | Double_t denominator15 = 1.-sumOfWW15/(sumOfW1st15*sumOfW2nd15); | |
3471 | // covariance: | |
3472 | Double_t covariance15 = numerator15/denominator15; | |
3473 | // weight dependent prefactor for covariance: | |
3474 | Double_t wPrefactor15 = sumOfWW15/(sumOfW1st15*sumOfW2nd15); | |
3475 | // finally, store "weighted" covariance: | |
3476 | fIntFlowCovariancesNUA->SetBinContent(15,wPrefactor15*covariance15); | |
3477 | ||
3478 | // Cov(<cos(phi1)>,<cos(phi1-phi2-phi3)>): | |
3479 | Double_t product16 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(16); // <<cos(phi1)><cos(phi1-phi2-phi3)>> | |
3480 | Double_t term1st16 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3481 | Double_t term2nd16 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3482 | Double_t sumOfW1st16 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3483 | Double_t sumOfW2nd16 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3484 | Double_t sumOfWW16 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(16); // W_{<cos(phi1)>} * W_{<cos(phi1-phi2-phi3)>} | |
3485 | // numerator in the expression for the the unbiased estimator for covariance: | |
3486 | Double_t numerator16 = product16 - term1st16*term2nd16; | |
3487 | // denominator in the expression for the the unbiased estimator for covariance: | |
3488 | Double_t denominator16 = 1.-sumOfWW16/(sumOfW1st16*sumOfW2nd16); | |
3489 | // covariance: | |
3490 | Double_t covariance16 = numerator16/denominator16; | |
3491 | // weight dependent prefactor for covariance: | |
3492 | Double_t wPrefactor16 = sumOfWW16/(sumOfW1st16*sumOfW2nd16); | |
3493 | // finally, store "weighted" covariance: | |
3494 | fIntFlowCovariancesNUA->SetBinContent(16,wPrefactor16*covariance16); | |
3495 | ||
3496 | // Cov(<cos(phi1)>,<sin(phi1-phi2-phi3)>): | |
3497 | Double_t product17 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(17); // <<cos(phi1)><sin(phi1-phi2-phi3)>> | |
3498 | Double_t term1st17 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3499 | Double_t term2nd17 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3500 | Double_t sumOfW1st17 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3501 | Double_t sumOfW2nd17 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3502 | Double_t sumOfWW17 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(17); // W_{<cos(phi1)>} * W_{<sin(phi1-phi2-phi3)>} | |
3503 | // numerator in the expression for the the unbiased estimator for covariance: | |
3504 | Double_t numerator17 = product17 - term1st17*term2nd17; | |
3505 | // denominator in the expression for the the unbiased estimator for covariance: | |
3506 | Double_t denominator17 = 1.-sumOfWW17/(sumOfW1st17*sumOfW2nd17); | |
3507 | // covariance: | |
3508 | Double_t covariance17 = numerator17/denominator17; | |
3509 | // weight dependent prefactor for covariance: | |
3510 | Double_t wPrefactor17 = sumOfWW17/(sumOfW1st17*sumOfW2nd17); | |
3511 | // finally, store "weighted" covariance: | |
3512 | fIntFlowCovariancesNUA->SetBinContent(17,wPrefactor17*covariance17); | |
3513 | ||
3514 | // Cov(<sin(phi1)>,<cos(phi1+phi2)>): | |
3515 | Double_t product18 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(18); // <<sin(phi1)><cos(phi1+phi2)>> | |
3516 | Double_t term1st18 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3517 | Double_t term2nd18 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3518 | Double_t sumOfW1st18 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3519 | Double_t sumOfW2nd18 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3520 | Double_t sumOfWW18 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(18); // W_{<sin(phi1)>} * W_{<cos(phi1+phi2)>} | |
3521 | // numerator in the expression for the the unbiased estimator for covariance: | |
3522 | Double_t numerator18 = product18 - term1st18*term2nd18; | |
3523 | // denominator in the expression for the the unbiased estimator for covariance: | |
3524 | Double_t denominator18 = 1.-sumOfWW18/(sumOfW1st18*sumOfW2nd18); | |
3525 | // covariance: | |
3526 | Double_t covariance18 = numerator18/denominator18; | |
3527 | // weight dependent prefactor for covariance: | |
3528 | Double_t wPrefactor18 = sumOfWW18/(sumOfW1st18*sumOfW2nd18); | |
3529 | // finally, store "weighted" covariance: | |
3530 | fIntFlowCovariancesNUA->SetBinContent(18,wPrefactor18*covariance18); | |
3531 | ||
3532 | // Cov(<sin(phi1)>,<sin(phi1+phi2)>): | |
3533 | Double_t product19 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(19); // <<sin(phi1)><sin(phi1+phi2)>> | |
3534 | Double_t term1st19 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3535 | Double_t term2nd19 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3536 | Double_t sumOfW1st19 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3537 | Double_t sumOfW2nd19 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3538 | Double_t sumOfWW19 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(19); // W_{<sin(phi1)>} * W_{<sin(phi1+phi2)>} | |
3539 | // numerator in the expression for the the unbiased estimator for covariance: | |
3540 | Double_t numerator19 = product19 - term1st19*term2nd19; | |
3541 | // denominator in the expression for the the unbiased estimator for covariance: | |
3542 | Double_t denominator19 = 1.-sumOfWW19/(sumOfW1st19*sumOfW2nd19); | |
3543 | // covariance: | |
3544 | Double_t covariance19 = numerator19/denominator19; | |
3545 | // weight dependent prefactor for covariance: | |
3546 | Double_t wPrefactor19 = sumOfWW19/(sumOfW1st19*sumOfW2nd19); | |
3547 | // finally, store "weighted" covariance: | |
3548 | fIntFlowCovariancesNUA->SetBinContent(19,wPrefactor19*covariance19); | |
3549 | ||
3550 | // Cov(<sin(phi1)>,<cos(phi1-phi2-phi3)>): | |
3551 | Double_t product20 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(20); // <<sin(phi1)><cos(phi1-phi2-phi3)>> | |
3552 | Double_t term1st20 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3553 | Double_t term2nd20 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3554 | Double_t sumOfW1st20 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3555 | Double_t sumOfW2nd20 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3556 | Double_t sumOfWW20 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(20); // W_{<sin(phi1)>} * W_{<cos(phi1-phi2-phi3)>} | |
3557 | // numerator in the expression for the the unbiased estimator for covariance: | |
3558 | Double_t numerator20 = product20 - term1st20*term2nd20; | |
3559 | // denominator in the expression for the the unbiased estimator for covariance: | |
3560 | Double_t denominator20 = 1.-sumOfWW20/(sumOfW1st20*sumOfW2nd20); | |
3561 | // covariance: | |
3562 | Double_t covariance20 = numerator20/denominator20; | |
3563 | // weight dependent prefactor for covariance: | |
3564 | Double_t wPrefactor20 = sumOfWW20/(sumOfW1st20*sumOfW2nd20); | |
3565 | // finally, store "weighted" covariance: | |
3566 | fIntFlowCovariancesNUA->SetBinContent(20,wPrefactor20*covariance20); | |
3567 | ||
3568 | // Cov(<sin(phi1)>,<sin(phi1-phi2-phi3)>): | |
3569 | Double_t product21 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(21); // <<sin(phi1)><sin(phi1-phi2-phi3)>> | |
3570 | Double_t term1st21 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3571 | Double_t term2nd21 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3572 | Double_t sumOfW1st21 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3573 | Double_t sumOfW2nd21 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3574 | Double_t sumOfWW21 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(21); // W_{<sin(phi1)>} * W_{<sin(phi1-phi2-phi3)>} | |
3575 | // numerator in the expression for the the unbiased estimator for covariance: | |
3576 | Double_t numerator21 = product21 - term1st21*term2nd21; | |
3577 | // denominator in the expression for the the unbiased estimator for covariance: | |
3578 | Double_t denominator21 = 1.-sumOfWW21/(sumOfW1st21*sumOfW2nd21); | |
3579 | // covariance: | |
3580 | Double_t covariance21 = numerator21/denominator21; | |
3581 | // weight dependent prefactor for covariance: | |
3582 | Double_t wPrefactor21 = sumOfWW21/(sumOfW1st21*sumOfW2nd21); | |
3583 | // finally, store "weighted" covariance: | |
3584 | fIntFlowCovariancesNUA->SetBinContent(21,wPrefactor21*covariance21); | |
3585 | ||
3586 | // Cov(<cos(phi1+phi2)>,<sin(phi1+phi2)>): | |
3587 | Double_t product22 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(22); // <<cos(phi1+phi2)><sin(phi1+phi2)>> | |
3588 | Double_t term1st22 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3589 | Double_t term2nd22 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3590 | Double_t sumOfW1st22 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3591 | Double_t sumOfW2nd22 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3592 | Double_t sumOfWW22 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(22); // W_{<cos(phi1+phi2)>} * W_{<sin(phi1+phi2)>} | |
3593 | // numerator in the expression for the the unbiased estimator for covariance: | |
3594 | Double_t numerator22 = product22 - term1st22*term2nd22; | |
3595 | // denominator in the expression for the the unbiased estimator for covariance: | |
3596 | Double_t denominator22 = 1.-sumOfWW22/(sumOfW1st22*sumOfW2nd22); | |
3597 | // covariance: | |
3598 | Double_t covariance22 = numerator22/denominator22; | |
3599 | // weight dependent prefactor for covariance: | |
3600 | Double_t wPrefactor22 = sumOfWW22/(sumOfW1st22*sumOfW2nd22); | |
3601 | // finally, store "weighted" covariance: | |
3602 | fIntFlowCovariancesNUA->SetBinContent(22,wPrefactor22*covariance22); | |
3603 | ||
3604 | // Cov(<cos(phi1+phi2)>,<cos(phi1-phi2-phi3)>): | |
3605 | Double_t product23 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(23); // <<cos(phi1+phi2)><cos(phi1-phi2-phi3)>> | |
3606 | Double_t term1st23 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3607 | Double_t term2nd23 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3608 | Double_t sumOfW1st23 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3609 | Double_t sumOfW2nd23 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3610 | Double_t sumOfWW23 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(23); // W_{<cos(phi1+phi2)>} * W_{<cos(phi1-phi2-phi3)>} | |
3611 | // numerator in the expression for the the unbiased estimator for covariance: | |
3612 | Double_t numerator23 = product23 - term1st23*term2nd23; | |
3613 | // denominator in the expression for the the unbiased estimator for covariance: | |
3614 | Double_t denominator23 = 1.-sumOfWW23/(sumOfW1st23*sumOfW2nd23); | |
3615 | // covariance: | |
3616 | Double_t covariance23 = numerator23/denominator23; | |
3617 | // weight dependent prefactor for covariance: | |
3618 | Double_t wPrefactor23 = sumOfWW23/(sumOfW1st23*sumOfW2nd23); | |
3619 | // finally, store "weighted" covariance: | |
3620 | fIntFlowCovariancesNUA->SetBinContent(23,wPrefactor23*covariance23); | |
3621 | ||
3622 | // Cov(<cos(phi1+phi2)>,<sin(phi1-phi2-phi3)>): | |
3623 | Double_t product24 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(24); // <<cos(phi1+phi2)><sin(phi1-phi2-phi3)>> | |
3624 | Double_t term1st24 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3625 | Double_t term2nd24 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3626 | Double_t sumOfW1st24 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3627 | Double_t sumOfW2nd24 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3628 | Double_t sumOfWW24 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(24); // W_{<cos(phi1+phi2)>} * W_{<sin(phi1-phi2-phi3)>} | |
3629 | // numerator in the expression for the the unbiased estimator for covariance: | |
3630 | Double_t numerator24 = product24 - term1st24*term2nd24; | |
3631 | // denominator in the expression for the the unbiased estimator for covariance: | |
3632 | Double_t denominator24 = 1.-sumOfWW24/(sumOfW1st24*sumOfW2nd24); | |
3633 | // covariance: | |
3634 | Double_t covariance24 = numerator24/denominator24; | |
3635 | // weight dependent prefactor for covariance: | |
3636 | Double_t wPrefactor24 = sumOfWW24/(sumOfW1st24*sumOfW2nd24); | |
3637 | // finally, store "weighted" covariance: | |
3638 | fIntFlowCovariancesNUA->SetBinContent(24,wPrefactor24*covariance24); | |
3639 | ||
3640 | // Cov(<sin(phi1+phi2)>,<cos(phi1-phi2-phi3)>): | |
3641 | Double_t product25 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(25); // <<sin(phi1+phi2)><cos(phi1-phi2-phi3)>> | |
3642 | Double_t term1st25 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3643 | Double_t term2nd25 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3644 | Double_t sumOfW1st25 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3645 | Double_t sumOfW2nd25 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3646 | Double_t sumOfWW25 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(25); // W_{<sin(phi1+phi2)>} * W_{<cos(phi1-phi2-phi3)>} | |
3647 | // numerator in the expression for the the unbiased estimator for covariance: | |
3648 | Double_t numerator25 = product25 - term1st25*term2nd25; | |
3649 | // denominator in the expression for the the unbiased estimator for covariance: | |
3650 | Double_t denominator25 = 1.-sumOfWW25/(sumOfW1st25*sumOfW2nd25); | |
3651 | // covariance: | |
3652 | Double_t covariance25 = numerator25/denominator25; | |
3653 | // weight dependent prefactor for covariance: | |
3654 | Double_t wPrefactor25 = sumOfWW25/(sumOfW1st25*sumOfW2nd25); | |
3655 | // finally, store "weighted" covariance: | |
3656 | fIntFlowCovariancesNUA->SetBinContent(25,wPrefactor25*covariance25); | |
3657 | ||
3658 | // Cov(<sin(phi1+phi2)>,<sin(phi1-phi2-phi3)>): | |
3659 | Double_t product26 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(26); // <<sin(phi1+phi2)><sin(phi1-phi2-phi3)>> | |
3660 | Double_t term1st26 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3661 | Double_t term2nd26 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3662 | Double_t sumOfW1st26 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3663 | Double_t sumOfW2nd26 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3664 | Double_t sumOfWW26 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(26); // W_{<sin(phi1+phi2)>} * W_{<sin(phi1-phi2-phi3)>} | |
3665 | // numerator in the expression for the the unbiased estimator for covariance: | |
3666 | Double_t numerator26 = product26 - term1st26*term2nd26; | |
3667 | // denominator in the expression for the the unbiased estimator for covariance: | |
3668 | Double_t denominator26 = 1.-sumOfWW26/(sumOfW1st26*sumOfW2nd26); | |
3669 | // covariance: | |
3670 | Double_t covariance26 = numerator26/denominator26; | |
3671 | // weight dependent prefactor for covariance: | |
3672 | Double_t wPrefactor26 = sumOfWW26/(sumOfW1st26*sumOfW2nd26); | |
3673 | // finally, store "weighted" covariance: | |
3674 | fIntFlowCovariancesNUA->SetBinContent(26,wPrefactor26*covariance26); | |
3675 | ||
3676 | // Cov(<cos(phi1-phi2-phi3)>,<sin(phi1-phi2-phi3)>): | |
3677 | Double_t product27 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(27); // <<cos(phi1-phi2-phi3)><sin(phi1-phi2-phi3)>> | |
3678 | Double_t term1st27 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1-phi2-phi3)>> | |
3679 | Double_t term2nd27 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3680 | Double_t sumOfW1st27 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1-phi2-phi3)>} | |
3681 | Double_t sumOfW2nd27 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3682 | Double_t sumOfWW27 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(27); // W_{<cos(phi1-phi2-phi3)>} * W_{<sin(phi1-phi2-phi3)>} | |
3683 | // numerator in the expression for the the unbiased estimator for covariance: | |
3684 | Double_t numerator27 = product27 - term1st27*term2nd27; | |
3685 | // denominator in the expression for the the unbiased estimator for covariance: | |
3686 | Double_t denominator27 = 1.-sumOfWW27/(sumOfW1st27*sumOfW2nd27); | |
3687 | // covariance: | |
3688 | Double_t covariance27 = numerator27/denominator27; | |
3689 | // weight dependent prefactor for covariance: | |
3690 | Double_t wPrefactor27 = sumOfWW27/(sumOfW1st27*sumOfW2nd27); | |
3691 | // finally, store "weighted" covariance: | |
3692 | fIntFlowCovariancesNUA->SetBinContent(27,wPrefactor27*covariance27); | |
3693 | ||
3694 | } // end of AliFlowAnalysisWithQCumulants::CalculateCovariancesNUAIntFlow() | |
3695 | ||
3696 | ||
3697 | //================================================================================================================================ | |
3698 | ||
3699 | ||
489d5531 | 3700 | void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsIntFlow() |
3701 | { | |
3702 | // From profile fIntFlowCorrelationsPro access measured correlations and spread, | |
3703 | // correctly calculate the statistical errors and store the final results and | |
3704 | // statistical errors for correlations in histogram fIntFlowCorrelationsHist. | |
3705 | // | |
3706 | // Remark: Statistical error of correlation is calculated as: | |
3707 | // | |
3708 | // statistical error = termA * spread * termB: | |
3709 | // termA = sqrt{sum_{i=1}^{N} w^2}/(sum_{i=1}^{N} w) | |
3710 | // termB = 1/sqrt(1-termA^2) | |
3711 | ||
3712 | for(Int_t power=0;power<2;power++) | |
3713 | { | |
3714 | if(!(fIntFlowCorrelationsHist && fIntFlowCorrelationsPro && fIntFlowSumOfEventWeights[power])) | |
3715 | { | |
3716 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCorrelationsPro && fIntFlowSumOfEventWeights[power] is NULL in AFAWQC::FCIF() !!!!"<<endl; | |
3717 | cout<<"power = "<<power<<endl; | |
3718 | exit(0); | |
3719 | } | |
3720 | } | |
3721 | ||
3722 | for(Int_t ci=1;ci<=4;ci++) // correlation index | |
3723 | { | |
3724 | Double_t correlation = fIntFlowCorrelationsPro->GetBinContent(ci); | |
3725 | Double_t spread = fIntFlowCorrelationsPro->GetBinError(ci); | |
3726 | Double_t sumOfLinearEventWeights = fIntFlowSumOfEventWeights[0]->GetBinContent(ci); | |
3727 | Double_t sumOfQuadraticEventWeights = fIntFlowSumOfEventWeights[1]->GetBinContent(ci); | |
3728 | Double_t termA = 0.; | |
3729 | Double_t termB = 0.; | |
3730 | if(sumOfLinearEventWeights) | |
3731 | { | |
3732 | termA = pow(sumOfQuadraticEventWeights,0.5)/sumOfLinearEventWeights; | |
3733 | } else | |
3734 | { | |
3735 | cout<<"WARNING: sumOfLinearEventWeights == 0 in AFAWQC::FCIF() !!!!"<<endl; | |
3736 | cout<<" (for "<<2*ci<<"-particle correlation)"<<endl; | |
3737 | } | |
3738 | if(1.-pow(termA,2.) > 0.) | |
3739 | { | |
3740 | termB = 1./pow(1-pow(termA,2.),0.5); | |
3741 | } else | |
3742 | { | |
3743 | cout<<"WARNING: 1.-pow(termA,2.) <= 0 in AFAWQC::FCIF() !!!!"<<endl; | |
3744 | cout<<" (for "<<2*ci<<"-particle correlation)"<<endl; | |
3745 | } | |
3746 | Double_t statisticalError = termA * spread * termB; | |
3747 | fIntFlowCorrelationsHist->SetBinContent(ci,correlation); | |
3748 | fIntFlowCorrelationsHist->SetBinError(ci,statisticalError); | |
ff70ca91 | 3749 | } // end of for(Int_t ci=1;ci<=4;ci++) // correlation index |
3750 | ||
3751 | // versus multiplicity: | |
3752 | for(Int_t ci=0;ci<=3;ci++) // correlation index | |
3753 | { | |
3754 | Int_t nBins = fIntFlowCorrelationsVsMPro[ci]->GetNbinsX(); | |
3755 | for(Int_t b=1;b<=nBins;b++) // looping over multiplicity bins | |
3756 | { | |
3757 | Double_t correlationVsM = fIntFlowCorrelationsVsMPro[ci]->GetBinContent(b); | |
3758 | Double_t spreadVsM = fIntFlowCorrelationsVsMPro[ci]->GetBinError(b); | |
3759 | Double_t sumOfLinearEventWeightsVsM = fIntFlowSumOfEventWeightsVsM[ci][0]->GetBinContent(b); | |
3760 | Double_t sumOfQuadraticEventWeightsVsM = fIntFlowSumOfEventWeightsVsM[ci][1]->GetBinContent(b); | |
3761 | Double_t termAVsM = 0.; | |
3762 | Double_t termBVsM = 0.; | |
3763 | if(sumOfLinearEventWeightsVsM) | |
3764 | { | |
3765 | termAVsM = pow(sumOfQuadraticEventWeightsVsM,0.5)/sumOfLinearEventWeightsVsM; | |
3766 | } else | |
3767 | { | |
9da1a4f3 | 3768 | //cout<<"WARNING: sumOfLinearEventWeightsVsM == 0 in AFAWQC::FCIF() !!!!"<<endl; |
3769 | //cout<<" (for "<<2*(ci+1)<<"-particle correlation versus multiplicity)"<<endl; | |
ff70ca91 | 3770 | } |
3771 | if(1.-pow(termAVsM,2.) > 0.) | |
3772 | { | |
3773 | termBVsM = 1./pow(1-pow(termAVsM,2.),0.5); | |
3774 | } else | |
3775 | { | |
9da1a4f3 | 3776 | //cout<<"WARNING: 1.-pow(termAVsM,2.) <= 0 in AFAWQC::FCIF() !!!!"<<endl; |
3777 | //cout<<" (for "<<2*(ci+1)<<"-particle correlation versus multiplicity)"<<endl; | |
ff70ca91 | 3778 | } |
3779 | Double_t statisticalErrorVsM = termAVsM * spreadVsM * termBVsM; | |
3780 | fIntFlowCorrelationsVsMHist[ci]->SetBinContent(b,correlationVsM); | |
3781 | fIntFlowCorrelationsVsMHist[ci]->SetBinError(b,statisticalErrorVsM); | |
3782 | } // end of for(Int_t b=1;b<=nBins;b++) | |
3783 | } // end of for(Int_t ci=1;ci<=4;ci++) // correlation index | |
3784 | ||
489d5531 | 3785 | } // end of AliFlowAnalysisWithQCumulants::FinalizeCorrelationsIntFlow() |
3786 | ||
489d5531 | 3787 | //================================================================================================================================ |
3788 | ||
489d5531 | 3789 | void AliFlowAnalysisWithQCumulants::FillAverageMultiplicities(Int_t nRP) |
3790 | { | |
3791 | // Fill profile fAverageMultiplicity to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8 | |
3792 | ||
3793 | // Binning of fAverageMultiplicity is organized as follows: | |
3794 | // 1st bin: all events (including the empty ones) | |
3795 | // 2nd bin: event with # of RPs greater or equal to 1 | |
3796 | // 3rd bin: event with # of RPs greater or equal to 2 | |
3797 | // 4th bin: event with # of RPs greater or equal to 3 | |
3798 | // 5th bin: event with # of RPs greater or equal to 4 | |
3799 | // 6th bin: event with # of RPs greater or equal to 5 | |
3800 | // 7th bin: event with # of RPs greater or equal to 6 | |
3801 | // 8th bin: event with # of RPs greater or equal to 7 | |
3802 | // 9th bin: event with # of RPs greater or equal to 8 | |
3803 | ||
3804 | if(!fAvMultiplicity) | |
3805 | { | |
3806 | cout<<"WARNING: fAvMultiplicity is NULL in AFAWQC::FAM() !!!!"<<endl; | |
3807 | exit(0); | |
3808 | } | |
3809 | ||
3810 | if(nRP<0) | |
3811 | { | |
3812 | cout<<"WARNING: nRP<0 in in AFAWQC::FAM() !!!!"<<endl; | |
3813 | exit(0); | |
3814 | } | |
3815 | ||
3816 | for(Int_t i=0;i<9;i++) | |
3817 | { | |
3818 | if(nRP>=i) fAvMultiplicity->Fill(i+0.5,nRP,1); | |
3819 | } | |
3820 | ||
3821 | } // end of AliFlowAnalysisWithQCumulants::FillAverageMultiplicities(nRP) | |
3822 | ||
3823 | ||
3824 | //================================================================================================================================ | |
3825 | ||
3826 | ||
3827 | void AliFlowAnalysisWithQCumulants::CalculateCumulantsIntFlow() | |
3828 | { | |
3829 | // a) Calculate Q-cumulants from the measured multiparticle correlations. | |
3830 | // b) Propagate the statistical errors of measured multiparticle correlations to statistical errors of Q-cumulants. | |
3831 | // c) REMARK: Q-cumulants calculated in this method are biased by non-uniform acceptance of detector !!!! | |
3832 | // Method ApplyCorrectionForNonUniformAcceptance* (to be improved: finalize the name here) | |
3833 | // is called afterwards to correct for this bias. | |
3834 | // d) Store the results and statistical error of Q-cumulants in histogram fCumulants. | |
3835 | // Binning of fCumulants is organized as follows: | |
3836 | // | |
3837 | // 1st bin: QC{2} | |
3838 | // 2nd bin: QC{4} | |
3839 | // 3rd bin: QC{6} | |
3840 | // 4th bin: QC{8} | |
3841 | ||
3842 | if(!(fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants)) | |
3843 | { | |
3844 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants is NULL in AFAWQC::CCIF() !!!!"<<endl; | |
3845 | exit(0); | |
3846 | } | |
3847 | ||
3848 | // correlations: | |
3849 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
3850 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
3851 | Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
3852 | Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
3853 | ||
3854 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: | |
3855 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <2> | |
3856 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <4> | |
3857 | Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <6> | |
3858 | Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <8> | |
3859 | ||
3860 | // covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()): | |
3861 | Double_t wCov24 = fIntFlowCovariances->GetBinContent(1); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) | |
3862 | Double_t wCov26 = fIntFlowCovariances->GetBinContent(2); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>) | |
3863 | Double_t wCov28 = fIntFlowCovariances->GetBinContent(3); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>) | |
3864 | Double_t wCov46 = fIntFlowCovariances->GetBinContent(4); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>) | |
3865 | Double_t wCov48 = fIntFlowCovariances->GetBinContent(5); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>) | |
3866 | Double_t wCov68 = fIntFlowCovariances->GetBinContent(6); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>) | |
3867 | ||
3868 | // Q-cumulants: | |
3869 | Double_t qc2 = 0.; // QC{2} | |
3870 | Double_t qc4 = 0.; // QC{4} | |
3871 | Double_t qc6 = 0.; // QC{6} | |
3872 | Double_t qc8 = 0.; // QC{8} | |
3873 | if(two) qc2 = two; | |
3874 | if(four) qc4 = four-2.*pow(two,2.); | |
3875 | if(six) qc6 = six-9.*two*four+12.*pow(two,3.); | |
3876 | if(eight) qc8 = eight-16.*two*six-18.*pow(four,2.)+144.*pow(two,2.)*four-144.*pow(two,4.); | |
3877 | ||
3878 | // statistical errors of Q-cumulants: | |
3879 | Double_t qc2Error = 0.; | |
3880 | Double_t qc4Error = 0.; | |
3881 | Double_t qc6Error = 0.; | |
3882 | Double_t qc8Error = 0.; | |
3883 | ||
3884 | // squared statistical errors of Q-cumulants: | |
3885 | //Double_t qc2ErrorSquared = 0.; | |
3886 | Double_t qc4ErrorSquared = 0.; | |
3887 | Double_t qc6ErrorSquared = 0.; | |
3888 | Double_t qc8ErrorSquared = 0.; | |
3889 | ||
3890 | // statistical error of QC{2}: | |
3891 | qc2Error = twoError; | |
3892 | ||
3893 | // statistical error of QC{4}: | |
3894 | qc4ErrorSquared = 16.*pow(two,2.)*pow(twoError,2)+pow(fourError,2.) | |
3895 | - 8.*two*wCov24; | |
3896 | if(qc4ErrorSquared>0.) | |
3897 | { | |
3898 | qc4Error = pow(qc4ErrorSquared,0.5); | |
3899 | } else | |
3900 | { | |
3901 | cout<<"WARNING: Statistical error of QC{4} is imaginary !!!!"<<endl; | |
3902 | } | |
3903 | ||
3904 | // statistical error of QC{6}: | |
3905 | qc6ErrorSquared = 81.*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) | |
3906 | + 81.*pow(two,2.)*pow(fourError,2.) | |
3907 | + pow(sixError,2.) | |
3908 | - 162.*two*(4.*pow(two,2.)-four)*wCov24 | |
3909 | + 18.*(4.*pow(two,2.)-four)*wCov26 | |
3910 | - 18.*two*wCov46; | |
3911 | ||
3912 | if(qc6ErrorSquared>0.) | |
3913 | { | |
3914 | qc6Error = pow(qc6ErrorSquared,0.5); | |
3915 | } else | |
3916 | { | |
3917 | cout<<"WARNING: Statistical error of QC{6} is imaginary !!!!"<<endl; | |
3918 | } | |
3919 | ||
3920 | // statistical error of QC{8}: | |
3921 | qc8ErrorSquared = 256.*pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.) | |
3922 | + 1296.*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.) | |
3923 | + 256.*pow(two,2.)*pow(sixError,2.) | |
3924 | + pow(eightError,2.) | |
3925 | - 1152.*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24 | |
3926 | + 512.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26 | |
3927 | - 32.*(36.*pow(two,3.)-18.*four*two+six)*wCov28 | |
3928 | - 1152.*two*(4.*pow(two,2.)-four)*wCov46 | |
3929 | + 72.*(4.*pow(two,2.)-four)*wCov48 | |
3930 | - 32.*two*wCov68; | |
3931 | if(qc8ErrorSquared>0.) | |
3932 | { | |
3933 | qc8Error = pow(qc8ErrorSquared,0.5); | |
3934 | } else | |
3935 | { | |
3936 | cout<<"WARNING: Statistical error of QC{8} is imaginary !!!!"<<endl; | |
3937 | } | |
3938 | ||
3939 | // store the results and statistical errors for Q-cumulants: | |
3940 | fIntFlowQcumulants->SetBinContent(1,qc2); | |
9f33751d | 3941 | if(TMath::Abs(qc2)>1.e-44){fIntFlowQcumulants->SetBinError(1,qc2Error);} |
489d5531 | 3942 | fIntFlowQcumulants->SetBinContent(2,qc4); |
9f33751d | 3943 | if(TMath::Abs(qc4)>1.e-44){fIntFlowQcumulants->SetBinError(2,qc4Error);} |
489d5531 | 3944 | fIntFlowQcumulants->SetBinContent(3,qc6); |
9f33751d | 3945 | if(TMath::Abs(qc6)>1.e-44){fIntFlowQcumulants->SetBinError(3,qc6Error);} |
489d5531 | 3946 | fIntFlowQcumulants->SetBinContent(4,qc8); |
9f33751d | 3947 | if(TMath::Abs(qc8)>1.e-44){fIntFlowQcumulants->SetBinError(4,qc8Error);} |
9da1a4f3 | 3948 | |
3949 | // versus multiplicity: | |
3950 | Int_t nBins = fIntFlowCorrelationsVsMPro[0]->GetNbinsX(); // to be improved (hardwired 0) | |
3951 | for(Int_t b=1;b<=nBins;b++) | |
3952 | { | |
3953 | // correlations: | |
3954 | two = fIntFlowCorrelationsVsMHist[0]->GetBinContent(b); // <<2>> | |
3955 | four = fIntFlowCorrelationsVsMHist[1]->GetBinContent(b); // <<4>> | |
3956 | six = fIntFlowCorrelationsVsMHist[2]->GetBinContent(b); // <<6>> | |
3957 | eight = fIntFlowCorrelationsVsMHist[3]->GetBinContent(b); // <<8>> | |
3958 | ||
3959 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: | |
3960 | twoError = fIntFlowCorrelationsVsMHist[0]->GetBinError(b); // statistical error of <2> | |
3961 | fourError = fIntFlowCorrelationsVsMHist[1]->GetBinError(b); // statistical error of <4> | |
3962 | sixError = fIntFlowCorrelationsVsMHist[2]->GetBinError(b); // statistical error of <6> | |
3963 | eightError = fIntFlowCorrelationsVsMHist[3]->GetBinError(b); // statistical error of <8> | |
3964 | ||
3965 | // covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()): | |
3966 | wCov24 = fIntFlowCovariancesVsM[0]->GetBinContent(b); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) | |
3967 | wCov26 = fIntFlowCovariancesVsM[1]->GetBinContent(b); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>) | |
3968 | wCov28 = fIntFlowCovariancesVsM[2]->GetBinContent(b); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>) | |
3969 | wCov46 = fIntFlowCovariancesVsM[3]->GetBinContent(b); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>) | |
3970 | wCov48 = fIntFlowCovariancesVsM[4]->GetBinContent(b); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>) | |
3971 | wCov68 = fIntFlowCovariancesVsM[5]->GetBinContent(b); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>) | |
3972 | ||
3973 | // Q-cumulants: | |
3974 | qc2 = 0.; // QC{2} | |
3975 | qc4 = 0.; // QC{4} | |
3976 | qc6 = 0.; // QC{6} | |
3977 | qc8 = 0.; // QC{8} | |
3978 | if(two) qc2 = two; | |
3979 | if(four) qc4 = four-2.*pow(two,2.); | |
3980 | if(six) qc6 = six-9.*two*four+12.*pow(two,3.); | |
3981 | if(eight) qc8 = eight-16.*two*six-18.*pow(four,2.)+144.*pow(two,2.)*four-144.*pow(two,4.); | |
3982 | ||
3983 | // statistical errors of Q-cumulants: | |
3984 | qc2Error = 0.; | |
3985 | qc4Error = 0.; | |
3986 | qc6Error = 0.; | |
3987 | qc8Error = 0.; | |
3988 | ||
3989 | // squared statistical errors of Q-cumulants: | |
3990 | //Double_t qc2ErrorSquared = 0.; | |
3991 | qc4ErrorSquared = 0.; | |
3992 | qc6ErrorSquared = 0.; | |
3993 | qc8ErrorSquared = 0.; | |
3994 | ||
3995 | // statistical error of QC{2}: | |
3996 | qc2Error = twoError; | |
3997 | ||
3998 | // statistical error of QC{4}: | |
3999 | qc4ErrorSquared = 16.*pow(two,2.)*pow(twoError,2)+pow(fourError,2.) | |
4000 | - 8.*two*wCov24; | |
4001 | if(qc4ErrorSquared>0.) | |
4002 | { | |
4003 | qc4Error = pow(qc4ErrorSquared,0.5); | |
4004 | } else | |
4005 | { | |
4006 | // cout<<"WARNING: Statistical error of QC{4} is imaginary in multiplicity bin "<<b<<" !!!!"<<endl; | |
4007 | } | |
4008 | ||
4009 | // statistical error of QC{6}: | |
4010 | qc6ErrorSquared = 81.*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) | |
4011 | + 81.*pow(two,2.)*pow(fourError,2.) | |
4012 | + pow(sixError,2.) | |
4013 | - 162.*two*(4.*pow(two,2.)-four)*wCov24 | |
4014 | + 18.*(4.*pow(two,2.)-four)*wCov26 | |
4015 | - 18.*two*wCov46; | |
4016 | ||
4017 | if(qc6ErrorSquared>0.) | |
4018 | { | |
4019 | qc6Error = pow(qc6ErrorSquared,0.5); | |
4020 | } else | |
4021 | { | |
4022 | // cout<<"WARNING: Statistical error of QC{6} is imaginary in multiplicity bin "<<b<<" !!!!"<<endl; | |
4023 | } | |
4024 | ||
4025 | // statistical error of QC{8}: | |
4026 | qc8ErrorSquared = 256.*pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.) | |
4027 | + 1296.*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.) | |
4028 | + 256.*pow(two,2.)*pow(sixError,2.) | |
4029 | + pow(eightError,2.) | |
4030 | - 1152.*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24 | |
4031 | + 512.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26 | |
4032 | - 32.*(36.*pow(two,3.)-18.*four*two+six)*wCov28 | |
4033 | - 1152.*two*(4.*pow(two,2.)-four)*wCov46 | |
4034 | + 72.*(4.*pow(two,2.)-four)*wCov48 | |
4035 | - 32.*two*wCov68; | |
4036 | if(qc8ErrorSquared>0.) | |
4037 | { | |
4038 | qc8Error = pow(qc8ErrorSquared,0.5); | |
4039 | } else | |
4040 | { | |
4041 | // cout<<"WARNING: Statistical error of QC{8} is imaginary in multiplicity bin "<<b<<" !!!!"<<endl; | |
4042 | } | |
4043 | ||
4044 | // store the results and statistical errors for Q-cumulants: | |
4045 | fIntFlowQcumulantsVsM[0]->SetBinContent(b,qc2); | |
9f33751d | 4046 | if(TMath::Abs(qc2)>1.e-44){fIntFlowQcumulantsVsM[0]->SetBinError(b,qc2Error);} |
9da1a4f3 | 4047 | fIntFlowQcumulantsVsM[1]->SetBinContent(b,qc4); |
9f33751d | 4048 | if(TMath::Abs(qc4)>1.e-44){fIntFlowQcumulantsVsM[1]->SetBinError(b,qc4Error);} |
9da1a4f3 | 4049 | fIntFlowQcumulantsVsM[2]->SetBinContent(b,qc6); |
9f33751d | 4050 | if(TMath::Abs(qc6)>1.e-44){fIntFlowQcumulantsVsM[2]->SetBinError(b,qc6Error);} |
9da1a4f3 | 4051 | fIntFlowQcumulantsVsM[3]->SetBinContent(b,qc8); |
9f33751d | 4052 | if(TMath::Abs(qc8)>1.e-44){fIntFlowQcumulantsVsM[3]->SetBinError(b,qc8Error);} |
9da1a4f3 | 4053 | } // end of for(Int_t b=1;b<=nBins;b++) |
489d5531 | 4054 | |
4055 | } // end of AliFlowAnalysisWithQCumulants::CalculateCumulantsIntFlow() | |
4056 | ||
489d5531 | 4057 | //================================================================================================================================ |
4058 | ||
489d5531 | 4059 | void AliFlowAnalysisWithQCumulants::CalculateIntFlow() |
4060 | { | |
0328db2d | 4061 | // a) Calculate the final results for reference flow estimates from Q-cumulants. |
4062 | // b) Propagate the statistical errors of measured multiparticle correlations to statistical errors of reference flow estimates. | |
4063 | // c) Store the results and statistical errors of reference flow estimates in histogram fIntFlow. | |
489d5531 | 4064 | // Binning of fIntFlow is organized as follows: |
4065 | // | |
4066 | // 1st bin: v{2,QC} | |
4067 | // 2nd bin: v{4,QC} | |
4068 | // 3rd bin: v{6,QC} | |
4069 | // 4th bin: v{8,QC} | |
4070 | ||
4071 | if(!(fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants && fIntFlow)) | |
4072 | { | |
4073 | cout<<"WARNING: fIntFlowCorrelationsHist && fIntFlowCovariances && fIntFlowQcumulants && fIntFlow is NULL in AFAWQC::CCIF() !!!!"<<endl; | |
4074 | exit(0); | |
4075 | } | |
4076 | ||
4077 | // Q-cumulants: | |
4078 | Double_t qc2 = fIntFlowQcumulants->GetBinContent(1); // QC{2} | |
4079 | Double_t qc4 = fIntFlowQcumulants->GetBinContent(2); // QC{4} | |
4080 | Double_t qc6 = fIntFlowQcumulants->GetBinContent(3); // QC{6} | |
4081 | Double_t qc8 = fIntFlowQcumulants->GetBinContent(4); // QC{8} | |
4082 | ||
4083 | // correlations: | |
4084 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
4085 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
4086 | Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
4087 | Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
4088 | ||
4089 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: | |
4090 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <2> | |
4091 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <4> | |
4092 | Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <6> | |
4093 | Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <8> | |
4094 | ||
4095 | // covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()): | |
4096 | Double_t wCov24 = fIntFlowCovariances->GetBinContent(1); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) | |
4097 | Double_t wCov26 = fIntFlowCovariances->GetBinContent(2); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>) | |
4098 | Double_t wCov28 = fIntFlowCovariances->GetBinContent(3); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>) | |
4099 | Double_t wCov46 = fIntFlowCovariances->GetBinContent(4); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>) | |
4100 | Double_t wCov48 = fIntFlowCovariances->GetBinContent(5); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>) | |
4101 | Double_t wCov68 = fIntFlowCovariances->GetBinContent(6); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>) | |
4102 | ||
4103 | // integrated flow estimates: | |
4104 | Double_t v2 = 0.; // v{2,QC} | |
4105 | Double_t v4 = 0.; // v{4,QC} | |
4106 | Double_t v6 = 0.; // v{6,QC} | |
4107 | Double_t v8 = 0.; // v{8,QC} | |
4108 | ||
4109 | // calculate integrated flow estimates from Q-cumulants: | |
4110 | if(qc2>=0.) v2 = pow(qc2,1./2.); | |
4111 | if(qc4<=0.) v4 = pow(-1.*qc4,1./4.); | |
4112 | if(qc6>=0.) v6 = pow((1./4.)*qc6,1./6.); | |
4113 | if(qc8<=0.) v8 = pow((-1./33.)*qc8,1./8.); | |
4114 | ||
4115 | // statistical errors of integrated flow estimates: | |
4116 | Double_t v2Error = 0.; // statistical error of v{2,QC} | |
4117 | Double_t v4Error = 0.; // statistical error of v{4,QC} | |
4118 | Double_t v6Error = 0.; // statistical error of v{6,QC} | |
4119 | Double_t v8Error = 0.; // statistical error of v{8,QC} | |
4120 | ||
4121 | // squares of statistical errors of integrated flow estimates: | |
4122 | Double_t v2ErrorSquared = 0.; // squared statistical error of v{2,QC} | |
4123 | Double_t v4ErrorSquared = 0.; // squared statistical error of v{4,QC} | |
4124 | Double_t v6ErrorSquared = 0.; // squared statistical error of v{6,QC} | |
4125 | Double_t v8ErrorSquared = 0.; // squared statistical error of v{8,QC} | |
4126 | ||
4127 | // calculate squared statistical errors of integrated flow estimates: | |
4128 | if(two > 0.) | |
4129 | { | |
4130 | v2ErrorSquared = (1./(4.*two))*pow(twoError,2.); | |
4131 | } | |
4132 | if(2.*pow(two,2.)-four > 0.) | |
4133 | { | |
4134 | v4ErrorSquared = (1./pow(2.*pow(two,2.)-four,3./2.))* | |
4135 | (pow(two,2.)*pow(twoError,2.)+(1./16.)*pow(fourError,2.)-(1./2.)*two*wCov24); | |
4136 | } | |
4137 | if(six-9.*four*two+12.*pow(two,3.) > 0.) | |
4138 | { | |
4139 | v6ErrorSquared = ((1./2.)*(1./pow(2.,2./3.))*(1./pow(six-9.*four*two+12.*pow(two,3.),5./3.)))* | |
4140 | ((9./2.)*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) | |
4141 | + (9./2.)*pow(two,2.)*pow(fourError,2.)+(1./18.)*pow(sixError,2.) | |
4142 | - 9.*two*(4.*pow(two,2.)-four)*wCov24+(4.*pow(two,2.)-four)*wCov26-two*wCov46); | |
4143 | } | |
4144 | if(-1.*eight+16.*six*two+18.*pow(four,2.)-144.*four*pow(two,2.)+144.*pow(two,4.) > 0.) | |
4145 | { | |
4146 | 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.))* | |
4147 | (pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.) | |
4148 | + (81./16.)*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.) | |
4149 | + pow(two,2.)*pow(sixError,2.) | |
4150 | + (1./256.)*pow(eightError,2.) | |
4151 | - (9./2.)*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24 | |
4152 | + 2.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26 | |
4153 | - (1./8.)*(36.*pow(two,3.)-18.*four*two+six)*wCov28 | |
4154 | - (9./2.)*two*(4.*pow(two,2.)-four)*wCov46 | |
4155 | + (9./32.)*(4.*pow(two,2.)-four)*wCov48 | |
4156 | - (1./8.)*two*wCov68); | |
4157 | } | |
4158 | ||
4159 | // calculate statistical errors of integrated flow estimates: | |
4160 | if(v2ErrorSquared > 0.) | |
4161 | { | |
4162 | v2Error = pow(v2ErrorSquared,0.5); | |
4163 | } else | |
4164 | { | |
4165 | cout<<"WARNING: Statistical error of v{2,QC} is imaginary !!!!"<<endl; | |
4166 | } | |
4167 | if(v4ErrorSquared > 0.) | |
4168 | { | |
4169 | v4Error = pow(v4ErrorSquared,0.5); | |
4170 | } else | |
4171 | { | |
4172 | cout<<"WARNING: Statistical error of v{4,QC} is imaginary !!!!"<<endl; | |
4173 | } | |
4174 | if(v6ErrorSquared > 0.) | |
4175 | { | |
4176 | v6Error = pow(v6ErrorSquared,0.5); | |
4177 | } else | |
4178 | { | |
4179 | cout<<"WARNING: Statistical error of v{6,QC} is imaginary !!!!"<<endl; | |
4180 | } | |
4181 | if(v8ErrorSquared > 0.) | |
4182 | { | |
4183 | v8Error = pow(v8ErrorSquared,0.5); | |
4184 | } else | |
4185 | { | |
4186 | cout<<"WARNING: Statistical error of v{8,QC} is imaginary !!!!"<<endl; | |
4187 | } | |
4188 | ||
4189 | // store the results and statistical errors of integrated flow estimates: | |
4190 | fIntFlow->SetBinContent(1,v2); | |
4191 | fIntFlow->SetBinError(1,v2Error); | |
4192 | fIntFlow->SetBinContent(2,v4); | |
4193 | fIntFlow->SetBinError(2,v4Error); | |
4194 | fIntFlow->SetBinContent(3,v6); | |
4195 | fIntFlow->SetBinError(3,v6Error); | |
4196 | fIntFlow->SetBinContent(4,v8); | |
4197 | fIntFlow->SetBinError(4,v8Error); | |
9da1a4f3 | 4198 | |
4199 | // versus multiplicity: | |
4200 | Int_t nBins = fIntFlowCorrelationsVsMPro[0]->GetNbinsX(); // to be improved (hardwired 0) | |
4201 | for(Int_t b=1;b<=nBins;b++) | |
4202 | { | |
4203 | // Q-cumulants: | |
4204 | qc2 = fIntFlowQcumulantsVsM[0]->GetBinContent(b); // QC{2} | |
4205 | qc4 = fIntFlowQcumulantsVsM[1]->GetBinContent(b); // QC{4} | |
4206 | qc6 = fIntFlowQcumulantsVsM[2]->GetBinContent(b); // QC{6} | |
4207 | qc8 = fIntFlowQcumulantsVsM[3]->GetBinContent(b); // QC{8} | |
4208 | ||
4209 | // correlations: | |
4210 | two = fIntFlowCorrelationsVsMHist[0]->GetBinContent(b); // <<2>> | |
4211 | four = fIntFlowCorrelationsVsMHist[1]->GetBinContent(b); // <<4>> | |
4212 | six = fIntFlowCorrelationsVsMHist[2]->GetBinContent(b); // <<6>> | |
4213 | eight = fIntFlowCorrelationsVsMHist[3]->GetBinContent(b); // <<8>> | |
4214 | ||
4215 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: | |
4216 | twoError = fIntFlowCorrelationsVsMHist[0]->GetBinError(b); // statistical error of <2> | |
4217 | fourError = fIntFlowCorrelationsVsMHist[1]->GetBinError(b); // statistical error of <4> | |
4218 | sixError = fIntFlowCorrelationsVsMHist[2]->GetBinError(b); // statistical error of <6> | |
4219 | eightError = fIntFlowCorrelationsVsMHist[3]->GetBinError(b); // statistical error of <8> | |
4220 | ||
4221 | // covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()): | |
4222 | wCov24 = fIntFlowCovariancesVsM[0]->GetBinContent(b); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) | |
4223 | wCov26 = fIntFlowCovariancesVsM[1]->GetBinContent(b); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>) | |
4224 | wCov28 = fIntFlowCovariancesVsM[2]->GetBinContent(b); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>) | |
4225 | wCov46 = fIntFlowCovariancesVsM[3]->GetBinContent(b); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>) | |
4226 | wCov48 = fIntFlowCovariancesVsM[4]->GetBinContent(b); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>) | |
4227 | wCov68 = fIntFlowCovariancesVsM[5]->GetBinContent(b); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>) | |
4228 | ||
4229 | // integrated flow estimates: | |
4230 | v2 = 0.; // v{2,QC} | |
4231 | v4 = 0.; // v{4,QC} | |
4232 | v6 = 0.; // v{6,QC} | |
4233 | v8 = 0.; // v{8,QC} | |
4234 | ||
4235 | // calculate integrated flow estimates from Q-cumulants: | |
4236 | if(qc2>=0.) v2 = pow(qc2,1./2.); | |
4237 | if(qc4<=0.) v4 = pow(-1.*qc4,1./4.); | |
4238 | if(qc6>=0.) v6 = pow((1./4.)*qc6,1./6.); | |
4239 | if(qc8<=0.) v8 = pow((-1./33.)*qc8,1./8.); | |
4240 | ||
4241 | // statistical errors of integrated flow estimates: | |
4242 | v2Error = 0.; // statistical error of v{2,QC} | |
4243 | v4Error = 0.; // statistical error of v{4,QC} | |
4244 | v6Error = 0.; // statistical error of v{6,QC} | |
4245 | v8Error = 0.; // statistical error of v{8,QC} | |
4246 | ||
4247 | // squares of statistical errors of integrated flow estimates: | |
4248 | v2ErrorSquared = 0.; // squared statistical error of v{2,QC} | |
4249 | v4ErrorSquared = 0.; // squared statistical error of v{4,QC} | |
4250 | v6ErrorSquared = 0.; // squared statistical error of v{6,QC} | |
4251 | v8ErrorSquared = 0.; // squared statistical error of v{8,QC} | |
4252 | ||
4253 | // calculate squared statistical errors of integrated flow estimates: | |
4254 | if(two > 0.) | |
4255 | { | |
4256 | v2ErrorSquared = (1./(4.*two))*pow(twoError,2.); | |
4257 | } | |
4258 | if(2.*pow(two,2.)-four > 0.) | |
4259 | { | |
4260 | v4ErrorSquared = (1./pow(2.*pow(two,2.)-four,3./2.))* | |
4261 | (pow(two,2.)*pow(twoError,2.)+(1./16.)*pow(fourError,2.)-(1./2.)*two*wCov24); | |
4262 | } | |
4263 | if(six-9.*four*two+12.*pow(two,3.) > 0.) | |
4264 | { | |
4265 | v6ErrorSquared = ((1./2.)*(1./pow(2.,2./3.))*(1./pow(six-9.*four*two+12.*pow(two,3.),5./3.)))* | |
4266 | ((9./2.)*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) | |
4267 | + (9./2.)*pow(two,2.)*pow(fourError,2.)+(1./18.)*pow(sixError,2.) | |
4268 | - 9.*two*(4.*pow(two,2.)-four)*wCov24+(4.*pow(two,2.)-four)*wCov26-two*wCov46); | |
4269 | } | |
4270 | if(-1.*eight+16.*six*two+18.*pow(four,2.)-144.*four*pow(two,2.)+144.*pow(two,4.) > 0.) | |
4271 | { | |
4272 | 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.))* | |
4273 | (pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.) | |
4274 | + (81./16.)*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.) | |
4275 | + pow(two,2.)*pow(sixError,2.) | |
4276 | + (1./256.)*pow(eightError,2.) | |
4277 | - (9./2.)*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24 | |
4278 | + 2.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26 | |
4279 | - (1./8.)*(36.*pow(two,3.)-18.*four*two+six)*wCov28 | |
4280 | - (9./2.)*two*(4.*pow(two,2.)-four)*wCov46 | |
4281 | + (9./32.)*(4.*pow(two,2.)-four)*wCov48 | |
4282 | - (1./8.)*two*wCov68); | |
4283 | } | |
4284 | ||
4285 | // calculate statistical errors of integrated flow estimates: | |
4286 | if(v2ErrorSquared > 0.) | |
4287 | { | |
4288 | v2Error = pow(v2ErrorSquared,0.5); | |
4289 | } else | |
4290 | { | |
4291 | // cout<<"WARNING: Statistical error of v{2,QC} is imaginary !!!!"<<endl; | |
4292 | } | |
4293 | if(v4ErrorSquared > 0.) | |
4294 | { | |
4295 | v4Error = pow(v4ErrorSquared,0.5); | |
4296 | } else | |
4297 | { | |
4298 | // cout<<"WARNING: Statistical error of v{4,QC} is imaginary !!!!"<<endl; | |
4299 | } | |
4300 | if(v6ErrorSquared > 0.) | |
4301 | { | |
4302 | v6Error = pow(v6ErrorSquared,0.5); | |
4303 | } else | |
4304 | { | |
4305 | // cout<<"WARNING: Statistical error of v{6,QC} is imaginary !!!!"<<endl; | |
4306 | } | |
4307 | if(v8ErrorSquared > 0.) | |
4308 | { | |
4309 | v8Error = pow(v8ErrorSquared,0.5); | |
4310 | } else | |
4311 | { | |
4312 | // cout<<"WARNING: Statistical error of v{8,QC} is imaginary !!!!"<<endl; | |
4313 | } | |
4314 | ||
4315 | // store the results and statistical errors of integrated flow estimates: | |
4316 | fIntFlowVsM[0]->SetBinContent(b,v2); | |
4317 | fIntFlowVsM[0]->SetBinError(b,v2Error); | |
4318 | fIntFlowVsM[1]->SetBinContent(b,v4); | |
4319 | fIntFlowVsM[1]->SetBinError(b,v4Error); | |
4320 | fIntFlowVsM[2]->SetBinContent(b,v6); | |
4321 | fIntFlowVsM[2]->SetBinError(b,v6Error); | |
4322 | fIntFlowVsM[3]->SetBinContent(b,v8); | |
4323 | fIntFlowVsM[3]->SetBinError(b,v8Error); | |
4324 | } // end of for(Int_t b=1;b<=nBins;b++) | |
489d5531 | 4325 | |
4326 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlow() | |
4327 | ||
489d5531 | 4328 | //================================================================================================================================ |
4329 | ||
489d5531 | 4330 | void AliFlowAnalysisWithQCumulants::FillCommonHistResultsIntFlow() |
4331 | { | |
4332 | // Fill in AliFlowCommonHistResults histograms relevant for 'NONAME' integrated flow (to be improved (name)) | |
4333 | ||
4334 | if(!fIntFlow) | |
4335 | { | |
4336 | cout<<"WARNING: fIntFlow is NULL in AFAWQC::FCHRIF() !!!!"<<endl; | |
4337 | exit(0); | |
4338 | } | |
4339 | ||
4340 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th)) | |
4341 | { | |
4342 | cout<<"WARNING: fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl; | |
4343 | cout<<" is NULL in AFAWQC::FCHRIF() !!!!"<<endl; | |
4344 | exit(0); | |
4345 | } | |
4346 | ||
4347 | Double_t v2 = fIntFlow->GetBinContent(1); | |
4348 | Double_t v4 = fIntFlow->GetBinContent(2); | |
4349 | Double_t v6 = fIntFlow->GetBinContent(3); | |
4350 | Double_t v8 = fIntFlow->GetBinContent(4); | |
4351 | ||
4352 | Double_t v2Error = fIntFlow->GetBinError(1); | |
4353 | Double_t v4Error = fIntFlow->GetBinError(2); | |
4354 | Double_t v6Error = fIntFlow->GetBinError(3); | |
4355 | Double_t v8Error = fIntFlow->GetBinError(4); | |
4356 | ||
4357 | fCommonHistsResults2nd->FillIntegratedFlow(v2,v2Error); // to be improved (hardwired 2nd in the name) | |
4358 | fCommonHistsResults4th->FillIntegratedFlow(v4,v4Error); // to be improved (hardwired 4th in the name) | |
4359 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) // to be improved (calculate also 6th and 8th order) | |
4360 | { | |
4361 | fCommonHistsResults6th->FillIntegratedFlow(v6,v6Error); // to be improved (hardwired 6th in the name) | |
4362 | fCommonHistsResults8th->FillIntegratedFlow(v8,v8Error); // to be improved (hardwired 8th in the name) | |
4363 | } | |
4364 | ||
4365 | } // end of AliFlowAnalysisWithQCumulants::FillCommonHistResultsIntFlow() | |
4366 | ||
4367 | ||
4368 | //================================================================================================================================ | |
4369 | ||
4370 | ||
4371 | /* | |
4372 | void AliFlowAnalysisWithQCumulants::ApplyCorrectionForNonUniformAcceptanceToCumulantsForIntFlow(Bool_t useParticleWeights, TString eventWeights) | |
4373 | { | |
4374 | // apply correction for non-uniform acceptance to cumulants for integrated flow | |
4375 | // (Remark: non-corrected cumulants are accessed from fCumulants[pW][0], corrected cumulants are stored in fCumulants[pW][1]) | |
4376 | ||
4377 | // shortcuts for the flags: | |
4378 | Int_t pW = (Int_t)(useParticleWeights); // 0=pWeights not used, 1=pWeights used | |
4379 | Int_t eW = -1; | |
4380 | ||
4381 | if(eventWeights == "exact") | |
4382 | { | |
4383 | eW = 0; | |
4384 | } | |
4385 | ||
4386 | if(!(fCumulants[pW][eW][0] && fCumulants[pW][eW][1] && fCorrections[pW][eW])) | |
4387 | { | |
4388 | cout<<"WARNING: fCumulants[pW][eW][0] && fCumulants[pW][eW][1] && fCorrections[pW][eW] is NULL in AFAWQC::ACFNUATCFIF() !!!!"<<endl; | |
4389 | cout<<"pW = "<<pW<<endl; | |
4390 | cout<<"eW = "<<eW<<endl; | |
4391 | exit(0); | |
4392 | } | |
4393 | ||
4394 | // non-corrected cumulants: | |
4395 | Double_t qc2 = fCumulants[pW][eW][0]->GetBinContent(1); | |
4396 | Double_t qc4 = fCumulants[pW][eW][0]->GetBinContent(2); | |
4397 | Double_t qc6 = fCumulants[pW][eW][0]->GetBinContent(3); | |
4398 | Double_t qc8 = fCumulants[pW][eW][0]->GetBinContent(4); | |
4399 | // statistical error of non-corrected cumulants: | |
4400 | Double_t qc2Error = fCumulants[pW][eW][0]->GetBinError(1); | |
4401 | Double_t qc4Error = fCumulants[pW][eW][0]->GetBinError(2); | |
4402 | Double_t qc6Error = fCumulants[pW][eW][0]->GetBinError(3); | |
4403 | Double_t qc8Error = fCumulants[pW][eW][0]->GetBinError(4); | |
4404 | // corrections for non-uniform acceptance: | |
4405 | Double_t qc2Correction = fCorrections[pW][eW]->GetBinContent(1); | |
4406 | Double_t qc4Correction = fCorrections[pW][eW]->GetBinContent(2); | |
4407 | Double_t qc6Correction = fCorrections[pW][eW]->GetBinContent(3); | |
4408 | Double_t qc8Correction = fCorrections[pW][eW]->GetBinContent(4); | |
4409 | // corrected cumulants: | |
4410 | Double_t qc2Corrected = qc2 + qc2Correction; | |
4411 | Double_t qc4Corrected = qc4 + qc4Correction; | |
4412 | Double_t qc6Corrected = qc6 + qc6Correction; | |
4413 | Double_t qc8Corrected = qc8 + qc8Correction; | |
4414 | ||
4415 | // ... to be improved (I need here also to correct error of QCs for NUA. | |
4416 | // For simplicity sake I assume at the moment that this correction is negliglible, but it will be added eventually...) | |
4417 | ||
4418 | // store corrected results and statistical errors for cumulants: | |
4419 | fCumulants[pW][eW][1]->SetBinContent(1,qc2Corrected); | |
4420 | fCumulants[pW][eW][1]->SetBinContent(2,qc4Corrected); | |
4421 | fCumulants[pW][eW][1]->SetBinContent(3,qc6Corrected); | |
4422 | fCumulants[pW][eW][1]->SetBinContent(4,qc8Corrected); | |
4423 | fCumulants[pW][eW][1]->SetBinError(1,qc2Error); // to be improved (correct also qc2Error for NUA) | |
4424 | fCumulants[pW][eW][1]->SetBinError(2,qc4Error); // to be improved (correct also qc4Error for NUA) | |
4425 | fCumulants[pW][eW][1]->SetBinError(3,qc6Error); // to be improved (correct also qc6Error for NUA) | |
4426 | fCumulants[pW][eW][1]->SetBinError(4,qc8Error); // to be improved (correct also qc8Error for NUA) | |
4427 | ||
4428 | } // end of AliFlowAnalysisWithQCumulants::ApplyCorrectionForNonUniformAcceptanceToCumulantsForIntFlow(Bool_t useParticleWeights, TString eventWeights) | |
4429 | */ | |
4430 | ||
4431 | ||
4432 | //================================================================================================================================ | |
4433 | ||
4434 | ||
4435 | /* | |
4436 | void AliFlowAnalysisWithQCumulants::PrintQuantifyingCorrectionsForNonUniformAcceptance(Bool_t useParticleWeights, TString eventWeights) | |
4437 | { | |
4438 | // print on the screen QC{n,biased}/QC{n,corrected} | |
4439 | ||
4440 | // shortcuts for the flags: | |
4441 | Int_t pW = (Int_t)(useParticleWeights); // 0=pWeights not used, 1=pWeights used | |
4442 | ||
4443 | Int_t eW = -1; | |
4444 | ||
4445 | if(eventWeights == "exact") | |
4446 | { | |
4447 | eW = 0; | |
4448 | } | |
4449 | ||
4450 | if(!(fCumulants[pW][eW][0] && fCumulants[pW][eW][1])) | |
4451 | { | |
4452 | cout<<"WARNING: fCumulants[pW][eW][0] && fCumulants[pW][eW][1] is NULL in AFAWQC::PQCFNUA() !!!!"<<endl; | |
4453 | cout<<"pW = "<<pW<<endl; | |
4454 | cout<<"eW = "<<eW<<endl; | |
4455 | exit(0); | |
4456 | } | |
4457 | ||
4458 | cout<<endl; | |
4459 | cout<<" Quantifying the bias to Q-cumulants from"<<endl; | |
4460 | cout<<" non-uniform acceptance of the detector:"<<endl; | |
4461 | cout<<endl; | |
4462 | ||
4463 | if(fCumulants[pW][eW][1]->GetBinContent(1)) | |
4464 | { | |
4465 | cout<<" QC{2,biased}/QC{2,corrected} = "<<(fCumulants[pW][eW][0]->GetBinContent(1))/(fCumulants[pW][eW][1]->GetBinContent(1))<<endl; | |
4466 | } | |
4467 | if(fCumulants[pW][eW][1]->GetBinContent(2)) | |
4468 | { | |
4469 | cout<<" QC{4,biased}/QC{4,corrected} = "<<fCumulants[pW][eW][0]->GetBinContent(2)/fCumulants[pW][eW][1]->GetBinContent(2)<<endl; | |
4470 | } | |
4471 | ||
4472 | cout<<endl; | |
4473 | ||
4474 | } // end of AliFlowAnalysisWithQCumulants::PrintQuantifyingCorrectionsForNonUniformAcceptance(Bool_t useParticleWeights, TString eventWeights) | |
4475 | */ | |
4476 | ||
4477 | ||
4478 | //================================================================================================================================ | |
4479 | ||
4480 | ||
4481 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelationsUsingParticleWeights() | |
4482 | { | |
4483 | // Calculate all correlations needed for integrated flow using particle weights. | |
4484 | ||
4485 | // Remark 1: When particle weights are used the binning of fIntFlowCorrelationAllPro is organized as follows: | |
4486 | // | |
4487 | // 1st bin: <2>_{1n|1n} = two1n1nW1W1 = <w1 w2 cos(n*(phi1-phi2))> | |
4488 | // 2nd bin: <2>_{2n|2n} = two2n2nW2W2 = <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
4489 | // 3rd bin: <2>_{3n|3n} = two3n3nW3W3 = <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
4490 | // 4th bin: <2>_{4n|4n} = two4n4nW4W4 = <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
4491 | // 5th bin: ---- EMPTY ---- | |
4492 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1nW2W1W1 = <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
4493 | // 7th bin: <3>_{3n|2n,1n} = ... | |
4494 | // 8th bin: <3>_{4n|2n,2n} = ... | |
4495 | // 9th bin: <3>_{4n|3n,1n} = ... | |
4496 | // 10th bin: ---- EMPTY ---- | |
4497 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1nW1W1W1W1 = <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> | |
4498 | // 12th bin: <4>_{2n,1n|2n,1n} = ... | |
4499 | // 13th bin: <4>_{2n,2n|2n,2n} = ... | |
4500 | // 14th bin: <4>_{3n|1n,1n,1n} = ... | |
4501 | // 15th bin: <4>_{3n,1n|3n,1n} = ... | |
4502 | // 16th bin: <4>_{3n,1n|2n,2n} = ... | |
4503 | // 17th bin: <4>_{4n|2n,1n,1n} = ... | |
4504 | // 18th bin: ---- EMPTY ---- | |
4505 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = ... | |
4506 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = ... | |
4507 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = ... | |
4508 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = ... | |
4509 | // 23rd bin: ---- EMPTY ---- | |
4510 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = ... | |
4511 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = ... | |
4512 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = ... | |
4513 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = ... | |
4514 | // 28th bin: ---- EMPTY ---- | |
4515 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = ... | |
4516 | // 30th bin: ---- EMPTY ---- | |
4517 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = ... | |
4518 | ||
4519 | // Remark 2: When particle weights are used there are some extra correlations. They are stored in | |
4520 | // fIntFlowExtraCorrelationsPro binning of which is organized as follows: | |
4521 | ||
4522 | // 1st bin: two1n1nW3W1 = <w1^3 w2 cos(n*(phi1-phi2))> | |
4523 | // 2nd bin: two1n1nW1W1W2 = <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
4524 | ||
4525 | // multiplicity (number of particles used to determine the reaction plane) | |
4526 | Double_t dMult = (*fSMpk)(0,0); | |
4527 | ||
4528 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
4529 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
4530 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
4531 | Double_t dReQ3n3k = (*fReQ)(2,3); | |
4532 | Double_t dReQ4n4k = (*fReQ)(3,4); | |
4533 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
4534 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
4535 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
4536 | Double_t dImQ3n3k = (*fImQ)(2,3); | |
4537 | Double_t dImQ4n4k = (*fImQ)(3,4); | |
4538 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
4539 | ||
4540 | // dMs are variables introduced in order to simplify some Eqs. bellow: | |
4541 | //.............................................................................................. | |
4542 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
4543 | Double_t dM22 = (*fSMpk)(1,2)-(*fSMpk)(0,4); // dM22 = sum_{i,j=1,i!=j}^M w_i^2 w_j^2 | |
4544 | Double_t dM33 = (*fSMpk)(1,3)-(*fSMpk)(0,6); // dM33 = sum_{i,j=1,i!=j}^M w_i^3 w_j^3 | |
4545 | Double_t dM44 = (*fSMpk)(1,4)-(*fSMpk)(0,8); // dM44 = sum_{i,j=1,i!=j}^M w_i^4 w_j^4 | |
4546 | 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 | |
4547 | Double_t dM211 = (*fSMpk)(0,2)*(*fSMpk)(1,1)-2.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
4548 | - (*fSMpk)(1,2)+2.*(*fSMpk)(0,4); // dM211 = sum_{i,j,k=1,i!=j!=k}^M w_i^2 w_j w_k | |
4549 | Double_t dM1111 = (*fSMpk)(3,1)-6.*(*fSMpk)(0,2)*(*fSMpk)(1,1) | |
4550 | + 8.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
4551 | + 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 | |
4552 | //.............................................................................................. | |
4553 | ||
4554 | // 2-particle correlations: | |
4555 | Double_t two1n1nW1W1 = 0.; // <w1 w2 cos(n*(phi1-phi2))> | |
4556 | Double_t two2n2nW2W2 = 0.; // <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
4557 | Double_t two3n3nW3W3 = 0.; // <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
4558 | Double_t two4n4nW4W4 = 0.; // <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
4559 | if(dMult>1) | |
4560 | { | |
4561 | if(dM11) | |
4562 | { | |
4563 | two1n1nW1W1 = (pow(dReQ1n1k,2)+pow(dImQ1n1k,2)-(*fSMpk)(0,2))/dM11; | |
4564 | // average correlation <w1 w2 cos(n*(phi1-phi2))> for single event: | |
4565 | fIntFlowCorrelationsEBE->SetBinContent(1,two1n1nW1W1); | |
4566 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(1,dM11); | |
4567 | // average correlation <w1 w2 cos(n*(phi1-phi2))> for all events: | |
4568 | fIntFlowCorrelationsPro->Fill(0.5,two1n1nW1W1,dM11); | |
4569 | fIntFlowCorrelationsAllPro->Fill(0.5,two1n1nW1W1,dM11); | |
4570 | } | |
4571 | if(dM22) | |
4572 | { | |
4573 | two2n2nW2W2 = (pow(dReQ2n2k,2)+pow(dImQ2n2k,2)-(*fSMpk)(0,4))/dM22; | |
4574 | // ... | |
4575 | // average correlation <w1^2 w2^2 cos(2n*(phi1-phi2))> for all events: | |
4576 | fIntFlowCorrelationsAllPro->Fill(1.5,two2n2nW2W2,dM22); | |
4577 | } | |
4578 | if(dM33) | |
4579 | { | |
4580 | two3n3nW3W3 = (pow(dReQ3n3k,2)+pow(dImQ3n3k,2)-(*fSMpk)(0,6))/dM33; | |
4581 | // ... | |
4582 | // average correlation <w1^3 w2^3 cos(3n*(phi1-phi2))> for all events: | |
4583 | fIntFlowCorrelationsAllPro->Fill(2.5,two3n3nW3W3,dM33); | |
4584 | } | |
4585 | if(dM44) | |
4586 | { | |
4587 | two4n4nW4W4 = (pow(dReQ4n4k,2)+pow(dImQ4n4k,2)-(*fSMpk)(0,8))/dM44; | |
4588 | // ... | |
4589 | // average correlation <w1^4 w2^4 cos(4n*(phi1-phi2))> for all events: | |
4590 | fIntFlowCorrelationsAllPro->Fill(3.5,two4n4nW4W4,dM44); | |
4591 | } | |
4592 | } // end of if(dMult>1) | |
4593 | ||
4594 | // extra 2-particle correlations: | |
4595 | Double_t two1n1nW3W1 = 0.; // <w1^3 w2 cos(n*(phi1-phi2))> | |
4596 | Double_t two1n1nW1W1W2 = 0.; // <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
4597 | if(dMult>1) | |
4598 | { | |
4599 | if(dM31) | |
4600 | { | |
4601 | two1n1nW3W1 = (dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k-(*fSMpk)(0,4))/dM31; | |
4602 | fIntFlowExtraCorrelationsPro->Fill(0.5,two1n1nW3W1,dM31); | |
4603 | } | |
4604 | if(dM211) | |
4605 | { | |
4606 | two1n1nW1W1W2 = ((*fSMpk)(0,2)*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)-(*fSMpk)(0,2)) | |
4607 | - 2.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k | |
4608 | - (*fSMpk)(0,4)))/dM211; | |
4609 | fIntFlowExtraCorrelationsPro->Fill(1.5,two1n1nW1W1W2,dM211); | |
4610 | } | |
4611 | } // end of if(dMult>1) | |
4612 | //.............................................................................................. | |
4613 | ||
4614 | //.............................................................................................. | |
4615 | // 3-particle correlations: | |
4616 | Double_t three2n1n1nW2W1W1 = 0.; // <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
4617 | ||
4618 | if(dMult>2) | |
4619 | { | |
4620 | if(dM211) | |
4621 | { | |
4622 | three2n1n1nW2W1W1 = (pow(dReQ1n1k,2.)*dReQ2n2k+2.*dReQ1n1k*dImQ1n1k*dImQ2n2k-pow(dImQ1n1k,2.)*dReQ2n2k | |
4623 | - 2.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k) | |
4624 | - pow(dReQ2n2k,2)-pow(dImQ2n2k,2) | |
4625 | + 2.*(*fSMpk)(0,4))/dM211; | |
4626 | fIntFlowCorrelationsAllPro->Fill(5.5,three2n1n1nW2W1W1,dM211); | |
4627 | } | |
4628 | } // end of if(dMult>2) | |
4629 | //.............................................................................................. | |
4630 | ||
4631 | //.............................................................................................. | |
4632 | // 4-particle correlations: | |
4633 | Double_t four1n1n1n1nW1W1W1W1 = 0.; // <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> | |
4634 | if(dMult>3) | |
4635 | { | |
4636 | if(dM1111) | |
4637 | { | |
4638 | four1n1n1n1nW1W1W1W1 = (pow(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.),2) | |
4639 | - 2.*(pow(dReQ1n1k,2.)*dReQ2n2k+2.*dReQ1n1k*dImQ1n1k*dImQ2n2k-pow(dImQ1n1k,2.)*dReQ2n2k) | |
4640 | + 8.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k) | |
4641 | + (pow(dReQ2n2k,2)+pow(dImQ2n2k,2)) | |
4642 | - 4.*(*fSMpk)(0,2)*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)) | |
4643 | - 6.*(*fSMpk)(0,4)+2.*(*fSMpk)(1,2))/dM1111; | |
4644 | ||
4645 | // average correlation <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> for single event: | |
4646 | fIntFlowCorrelationsEBE->SetBinContent(2,four1n1n1n1nW1W1W1W1); | |
4647 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(2,dM1111); | |
4648 | // average correlation <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> for all events: | |
4649 | fIntFlowCorrelationsPro->Fill(1.5,four1n1n1n1nW1W1W1W1,dM1111); | |
4650 | fIntFlowCorrelationsAllPro->Fill(10.5,four1n1n1n1nW1W1W1W1,dM1111); | |
4651 | } | |
4652 | } // end of if(dMult>3) | |
4653 | //.............................................................................................. | |
4654 | ||
4655 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelationsUsingParticleWeights() | |
4656 | ||
4657 | ||
4658 | //================================================================================================================================ | |
4659 | ||
4660 | ||
4661 | void AliFlowAnalysisWithQCumulants::CalculateWeightedQProductsForIntFlow() // to be improved (completed) | |
4662 | { | |
4663 | // calculate averages like <<2><4>>, <<2><6>>, <<4><6>>, etc. which are needed to calculate covariances | |
4664 | // Remark: here we take weighted correlations! | |
4665 | ||
4666 | /* | |
4667 | ||
4668 | // binning of fQProductsW is organized as follows: | |
4669 | // | |
4670 | // 1st bin: <2><4> | |
4671 | // 2nd bin: <2><6> | |
4672 | // 3rd bin: <2><8> | |
4673 | // 4th bin: <4><6> | |
4674 | // 5th bin: <4><8> | |
4675 | // 6th bin: <6><8> | |
4676 | ||
4677 | Double_t dMult = (*fSMpk)(0,0); // multiplicity (number of particles used to determine the reaction plane) | |
4678 | ||
4679 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
4680 | Double_t dM1111 = (*fSMpk)(3,1)-6.*(*fSMpk)(0,2)*(*fSMpk)(1,1) | |
4681 | + 8.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
4682 | + 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 | |
4683 | ||
4684 | Double_t twoEBEW = 0.; // <2> | |
4685 | Double_t fourEBEW = 0.; // <4> | |
4686 | ||
4687 | twoEBEW = fQCorrelationsEBE[1]->GetBinContent(1); | |
4688 | fourEBEW = fQCorrelationsEBE[1]->GetBinContent(11); | |
4689 | ||
4690 | // <2><4> | |
4691 | if(dMult>3) | |
4692 | { | |
4693 | fQProducts[1][0]->Fill(0.5,twoEBEW*fourEBEW,dM11*dM1111); | |
4694 | } | |
4695 | ||
4696 | */ | |
4697 | ||
4698 | } // end of AliFlowAnalysisWithQCumulants::CalculateWeightedQProductsForIntFlow() | |
4699 | ||
4700 | ||
4701 | //================================================================================================================================ | |
4702 | ||
4703 | ||
4704 | void AliFlowAnalysisWithQCumulants::InitializeArraysForIntFlow() | |
4705 | { | |
4706 | // Initialize all arrays used to calculate integrated flow. | |
4707 | ||
4708 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
4709 | { | |
4710 | fIntFlowCorrectionTermsForNUAEBE[sc] = NULL; | |
0328db2d | 4711 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[sc] = NULL; |
489d5531 | 4712 | fIntFlowCorrectionTermsForNUAPro[sc] = NULL; |
4713 | fIntFlowCorrectionTermsForNUAHist[sc] = NULL; | |
2001bc3a | 4714 | for(Int_t ci=0;ci<4;ci++) // correction term index |
4715 | { | |
4716 | fIntFlowCorrectionTermsForNUAVsMPro[sc][ci] = NULL; | |
4717 | } | |
0328db2d | 4718 | for(Int_t power=0;power<2;power++) // linear or quadratic |
4719 | { | |
4720 | fIntFlowSumOfEventWeightsNUA[sc][power] = NULL; | |
4721 | } | |
489d5531 | 4722 | } |
4723 | for(Int_t power=0;power<2;power++) // linear or quadratic | |
4724 | { | |
4725 | fIntFlowSumOfEventWeights[power] = NULL; | |
4726 | } | |
4727 | for(Int_t i=0;i<3;i++) // print on the screen the final results (0=NONAME, 1=RP, 2=POI) | |
4728 | { | |
4729 | fPrintFinalResults[i] = kTRUE; | |
4730 | } | |
ff70ca91 | 4731 | for(Int_t ci=0;ci<4;ci++) // correlation index or cumulant order |
4732 | { | |
4733 | fIntFlowCorrelationsVsMPro[ci] = NULL; | |
4734 | fIntFlowCorrelationsVsMHist[ci] = NULL; | |
4735 | fIntFlowQcumulantsVsM[ci] = NULL; | |
4736 | fIntFlowVsM[ci] = NULL; | |
2001bc3a | 4737 | fIntFlowDetectorBiasVsM[ci] = NULL; |
ff70ca91 | 4738 | for(Int_t lc=0;lc<2;lc++) |
4739 | { | |
4740 | fIntFlowSumOfEventWeightsVsM[ci][lc] = NULL; | |
4741 | } | |
4742 | } | |
4743 | for(Int_t pi=0;pi<6;pi++) // product or covariance index | |
4744 | { | |
4745 | fIntFlowProductOfCorrelationsVsMPro[pi] = NULL; | |
4746 | fIntFlowCovariancesVsM[pi] = NULL; | |
4747 | fIntFlowSumOfProductOfEventWeightsVsM[pi] = NULL; | |
4748 | } | |
4749 | ||
489d5531 | 4750 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForIntFlow() |
4751 | ||
489d5531 | 4752 | //================================================================================================================================ |
4753 | ||
489d5531 | 4754 | void AliFlowAnalysisWithQCumulants::InitializeArraysForDiffFlow() |
4755 | { | |
4756 | // Initialize all arrays needed to calculate differential flow. | |
4757 | // a) Initialize lists holding profiles; | |
4758 | // b) Initialize lists holding histograms; | |
4759 | // c) Initialize event-by-event quantities; | |
4760 | // d) Initialize profiles; | |
4761 | // e) Initialize histograms holding final results. | |
4762 | ||
4763 | // a) Initialize lists holding profiles; | |
4764 | for(Int_t t=0;t<2;t++) // type (RP, POI) | |
4765 | { | |
4766 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4767 | { | |
4768 | fDiffFlowCorrelationsProList[t][pe] = NULL; | |
4769 | fDiffFlowProductOfCorrelationsProList[t][pe] = NULL; | |
4770 | fDiffFlowCorrectionsProList[t][pe] = NULL; | |
4771 | } | |
4772 | } | |
4773 | ||
4774 | // b) Initialize lists holding histograms; | |
4775 | for(Int_t t=0;t<2;t++) // type (RP, POI) | |
4776 | { | |
4777 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4778 | { | |
4779 | fDiffFlowCorrelationsHistList[t][pe] = NULL; | |
4780 | for(Int_t power=0;power<2;power++) | |
4781 | { | |
4782 | fDiffFlowSumOfEventWeightsHistList[t][pe][power] = NULL; | |
4783 | } // end of for(Int_t power=0;power<2;power++) | |
4784 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe] = NULL; | |
4785 | fDiffFlowCorrectionsHistList[t][pe] = NULL; | |
4786 | fDiffFlowCovariancesHistList[t][pe] = NULL; | |
4787 | fDiffFlowCumulantsHistList[t][pe] = NULL; | |
4788 | fDiffFlowHistList[t][pe] = NULL; | |
4789 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4790 | } // enf of for(Int_t t=0;t<2;t++) // type (RP, POI) | |
4791 | ||
4792 | // c) Initialize event-by-event quantities: | |
4793 | // 1D: | |
4794 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
4795 | { | |
4796 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4797 | { | |
4798 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
4799 | { | |
4800 | for(Int_t k=0;k<9;k++) // power of weight | |
4801 | { | |
4802 | fReRPQ1dEBE[t][pe][m][k] = NULL; | |
4803 | fImRPQ1dEBE[t][pe][m][k] = NULL; | |
4804 | fs1dEBE[t][pe][k] = NULL; // to be improved (this doesn't need to be within loop over m) | |
4805 | } | |
4806 | } | |
4807 | } | |
4808 | } | |
4809 | // 1D: | |
4810 | for(Int_t t=0;t<2;t++) // type (RP or POI) | |
4811 | { | |
4812 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4813 | { | |
4814 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
4815 | { | |
4816 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
4817 | { | |
4818 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][sc][cti] = NULL; | |
4819 | } | |
4820 | } | |
4821 | } | |
4822 | } | |
4823 | // 2D: | |
4824 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
4825 | { | |
4826 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
4827 | { | |
4828 | for(Int_t k=0;k<9;k++) // power of weight | |
4829 | { | |
4830 | fReRPQ2dEBE[t][m][k] = NULL; | |
4831 | fImRPQ2dEBE[t][m][k] = NULL; | |
4832 | fs2dEBE[t][k] = NULL; // to be improved (this doesn't need to be within loop over m) | |
4833 | } | |
4834 | } | |
4835 | } | |
4836 | ||
4837 | // d) Initialize profiles: | |
4838 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
4839 | { | |
4840 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4841 | { | |
4842 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
4843 | { | |
4844 | fDiffFlowCorrelationsPro[t][pe][ci] = NULL; | |
4845 | } // end of for(Int_t ci=0;ci<4;ci++) | |
4846 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
4847 | { | |
4848 | for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index | |
4849 | { | |
4850 | fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2] = NULL; | |
4851 | } // end of for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index | |
4852 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
4853 | // correction terms for nua: | |
4854 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
4855 | { | |
4856 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
4857 | { | |
4858 | fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti] = NULL; | |
4859 | } | |
4860 | } | |
4861 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4862 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
4863 | ||
4864 | // e) Initialize histograms holding final results. | |
4865 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
4866 | { | |
4867 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4868 | { | |
4869 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
4870 | { | |
4871 | fDiffFlowCorrelationsHist[t][pe][ci] = NULL; | |
4872 | fDiffFlowCumulants[t][pe][ci] = NULL; | |
4873 | fDiffFlow[t][pe][ci] = NULL; | |
4874 | } // end of for(Int_t ci=0;ci<4;ci++) | |
4875 | for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++) | |
4876 | { | |
4877 | fDiffFlowCovariances[t][pe][covarianceIndex] = NULL; | |
4878 | } // end of for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++) | |
4879 | // correction terms for nua: | |
4880 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
4881 | { | |
4882 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
4883 | { | |
4884 | fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti] = NULL; | |
4885 | } | |
4886 | } | |
4887 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4888 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
4889 | ||
4890 | // sum of event weights for reduced correlations: | |
4891 | for(Int_t t=0;t<2;t++) // type = RP or POI | |
4892 | { | |
4893 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4894 | { | |
4895 | for(Int_t p=0;p<2;p++) // power of weight is 1 or 2 | |
4896 | { | |
4897 | for(Int_t ew=0;ew<4;ew++) // event weight index for reduced correlations | |
4898 | { | |
4899 | fDiffFlowSumOfEventWeights[t][pe][p][ew] = NULL; | |
4900 | } | |
4901 | } | |
4902 | } | |
4903 | } | |
4904 | // product of event weights for both types of correlations: | |
4905 | for(Int_t t=0;t<2;t++) // type = RP or POI | |
4906 | { | |
4907 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4908 | { | |
4909 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
4910 | { | |
4911 | for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index | |
4912 | { | |
4913 | fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] = NULL; | |
4914 | } | |
4915 | } | |
4916 | } | |
4917 | } | |
4918 | ||
4919 | ||
4920 | ||
4921 | ||
4922 | /* | |
4923 | ||
4924 | // nested lists in fDiffFlowProfiles: | |
4925 | for(Int_t t=0;t<2;t++) | |
4926 | { | |
4927 | fDFPType[t] = NULL; | |
4928 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1) | |
4929 | { | |
4930 | fDFPParticleWeights[t][pW] = NULL; | |
4931 | for(Int_t eW=0;eW<2;eW++) | |
4932 | { | |
4933 | fDFPEventWeights[t][pW][eW] = NULL; | |
4934 | fDiffFlowCorrelations[t][pW][eW] = NULL; | |
4935 | fDiffFlowProductsOfCorrelations[t][pW][eW] = NULL; | |
4936 | for(Int_t sc=0;sc<2;sc++) | |
4937 | { | |
4938 | fDiffFlowCorrectionTerms[t][pW][eW][sc] = NULL; | |
4939 | } | |
4940 | } | |
4941 | } | |
4942 | } | |
4943 | ||
4944 | ||
4945 | */ | |
4946 | ||
4947 | ||
4948 | ||
4949 | /* | |
4950 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1) | |
4951 | { | |
4952 | for(Int_t eW=0;eW<2;eW++) | |
4953 | { | |
4954 | // correlations: | |
4955 | for(Int_t correlationIndex=0;correlationIndex<4;correlationIndex++) | |
4956 | { | |
4957 | fCorrelationsPro[t][pW][eW][correlationIndex] = NULL; | |
4958 | } | |
4959 | // products of correlations: | |
4960 | for(Int_t productOfCorrelationsIndex=0;productOfCorrelationsIndex<6;productOfCorrelationsIndex++) | |
4961 | { | |
4962 | fProductsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex] = NULL; | |
4963 | } | |
4964 | // correction terms: | |
4965 | for(Int_t sc=0;sc<2;sc++) | |
4966 | { | |
4967 | for(Int_t correctionsIndex=0;correctionsIndex<2;correctionsIndex++) | |
4968 | { | |
4969 | fCorrectionTermsPro[t][pW][eW][sc][correctionsIndex] = NULL; | |
4970 | } | |
4971 | } | |
4972 | } | |
4973 | } | |
4974 | */ | |
4975 | ||
4976 | } // end of AliFlowAnalysisWithQCumulants::InitializeArraysForDiffFlow() | |
4977 | ||
4978 | ||
4979 | //================================================================================================================================ | |
4980 | /* | |
4981 | ||
4982 | ||
4983 | void AliFlowAnalysisWithQCumulants::CalculateCorrelationsForDifferentialFlow2D(TString type) | |
4984 | { | |
4985 | // calculate all reduced correlations needed for differential flow for each (pt,eta) bin: | |
4986 | ||
4987 | if(type == "RP") // to be improved (removed) | |
4988 | { | |
4989 | cout<<endl; | |
4990 | } | |
4991 | // ... | |
4992 | ||
4993 | ||
4994 | Int_t typeFlag = -1; | |
4995 | ||
4996 | // reduced correlations ares stored in fCorrelationsPro[t][pW][index] and are indexed as follows: | |
4997 | // index: | |
4998 | // 0: <2'> | |
4999 | // 1: <4'> | |
5000 | ||
5001 | // multiplicity: | |
5002 | Double_t dMult = (*fSMpk)(0,0); | |
5003 | ||
5004 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
5005 | Double_t dReQ1n = (*fReQ)(0,0); | |
5006 | Double_t dReQ2n = (*fReQ)(1,0); | |
5007 | //Double_t dReQ3n = (*fReQ)(2,0); | |
5008 | //Double_t dReQ4n = (*fReQ)(3,0); | |
5009 | Double_t dImQ1n = (*fImQ)(0,0); | |
5010 | Double_t dImQ2n = (*fImQ)(1,0); | |
5011 | //Double_t dImQ3n = (*fImQ)(2,0); | |
5012 | //Double_t dImQ4n = (*fImQ)(3,0); | |
5013 | ||
5014 | // looping over all (pt,eta) bins and calculating correlations needed for differential flow: | |
5015 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5016 | { | |
5017 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5018 | { | |
5019 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): | |
5020 | Double_t p1n0kRe = 0.; | |
5021 | Double_t p1n0kIm = 0.; | |
5022 | ||
5023 | // number of POIs in particular (pt,eta) bin: | |
5024 | Double_t mp = 0.; | |
5025 | ||
5026 | // 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): | |
5027 | Double_t q1n0kRe = 0.; | |
5028 | Double_t q1n0kIm = 0.; | |
5029 | Double_t q2n0kRe = 0.; | |
5030 | Double_t q2n0kIm = 0.; | |
5031 | ||
5032 | // number of particles which are both RPs and POIs in particular (pt,eta) bin: | |
5033 | Double_t mq = 0.; | |
5034 | ||
5035 | // q_{m*n,0}: | |
5036 | q1n0kRe = fReEBE2D[2][0][0]->GetBinContent(fReEBE2D[2][0][0]->GetBin(p,e)) | |
5037 | * fReEBE2D[2][0][0]->GetBinEntries(fReEBE2D[2][0][0]->GetBin(p,e)); | |
5038 | q1n0kIm = fImEBE2D[2][0][0]->GetBinContent(fImEBE2D[2][0][0]->GetBin(p,e)) | |
5039 | * fImEBE2D[2][0][0]->GetBinEntries(fImEBE2D[2][0][0]->GetBin(p,e)); | |
5040 | q2n0kRe = fReEBE2D[2][1][0]->GetBinContent(fReEBE2D[2][1][0]->GetBin(p,e)) | |
5041 | * fReEBE2D[2][1][0]->GetBinEntries(fReEBE2D[2][1][0]->GetBin(p,e)); | |
5042 | q2n0kIm = fImEBE2D[2][1][0]->GetBinContent(fImEBE2D[2][1][0]->GetBin(p,e)) | |
5043 | * fImEBE2D[2][1][0]->GetBinEntries(fImEBE2D[2][1][0]->GetBin(p,e)); | |
5044 | ||
5045 | mq = fReEBE2D[2][0][0]->GetBinEntries(fReEBE2D[2][0][0]->GetBin(p,e)); // to be improved (cross-checked by accessing other profiles here) | |
5046 | ||
5047 | if(type == "POI") | |
5048 | { | |
5049 | // p_{m*n,0}: | |
5050 | p1n0kRe = fReEBE2D[1][0][0]->GetBinContent(fReEBE2D[1][0][0]->GetBin(p,e)) | |
5051 | * fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); | |
5052 | p1n0kIm = fImEBE2D[1][0][0]->GetBinContent(fImEBE2D[1][0][0]->GetBin(p,e)) | |
5053 | * fImEBE2D[1][0][0]->GetBinEntries(fImEBE2D[1][0][0]->GetBin(p,e)); | |
5054 | ||
5055 | mp = fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); // to be improved (cross-checked by accessing other profiles here) | |
5056 | ||
5057 | typeFlag = 1; | |
5058 | } | |
5059 | else if(type == "RP") | |
5060 | { | |
5061 | // p_{m*n,0} = q_{m*n,0}: | |
5062 | p1n0kRe = q1n0kRe; | |
5063 | p1n0kIm = q1n0kIm; | |
5064 | mp = mq; | |
5065 | ||
5066 | typeFlag = 0; | |
5067 | } | |
5068 | ||
5069 | // count events with non-empty (pt,eta) bin: | |
5070 | if(mp>0) | |
5071 | { | |
5072 | fNonEmptyBins2D[typeFlag]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,1); | |
5073 | } | |
5074 | ||
5075 | // 2'-particle correlation for particular (pt,eta) bin: | |
5076 | Double_t two1n1nPtEta = 0.; | |
5077 | if(mp*dMult-mq) | |
5078 | { | |
5079 | two1n1nPtEta = (p1n0kRe*dReQ1n+p1n0kIm*dImQ1n-mq) | |
5080 | / (mp*dMult-mq); | |
5081 | ||
5082 | // fill the 2D profile to get the average correlation for each (pt,eta) bin: | |
5083 | if(type == "POI") | |
5084 | { | |
5085 | //f2pPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
5086 | ||
5087 | fCorrelationsPro[1][0][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
5088 | } | |
5089 | else if(type == "RP") | |
5090 | { | |
5091 | //f2pPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
5092 | fCorrelationsPro[0][0][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
5093 | } | |
5094 | } // end of if(mp*dMult-mq) | |
5095 | ||
5096 | // 4'-particle correlation: | |
5097 | Double_t four1n1n1n1nPtEta = 0.; | |
5098 | if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5099 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) // to be improved (introduce a new variable for this expression) | |
5100 | { | |
5101 | four1n1n1n1nPtEta = ((pow(dReQ1n,2.)+pow(dImQ1n,2.))*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
5102 | - q2n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) | |
5103 | - 2.*q2n0kIm*dReQ1n*dImQ1n | |
5104 | - p1n0kRe*(dReQ1n*dReQ2n+dImQ1n*dImQ2n) | |
5105 | + p1n0kIm*(dImQ1n*dReQ2n-dReQ1n*dImQ2n) | |
5106 | - 2.*dMult*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
5107 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*mq | |
5108 | + 6.*(q1n0kRe*dReQ1n+q1n0kIm*dImQ1n) | |
5109 | + 1.*(q2n0kRe*dReQ2n+q2n0kIm*dImQ2n) | |
5110 | + 2.*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
5111 | + 2.*mq*dMult | |
5112 | - 6.*mq) | |
5113 | / ((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5114 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5115 | ||
5116 | // fill the 2D profile to get the average correlation for each (pt, eta) bin: | |
5117 | if(type == "POI") | |
5118 | { | |
5119 | //f4pPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
5120 | // (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5121 | // + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5122 | ||
5123 | fCorrelationsPro[1][0][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
5124 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5125 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5126 | } | |
5127 | else if(type == "RP") | |
5128 | { | |
5129 | //f4pPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
5130 | // (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5131 | // + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5132 | ||
5133 | fCorrelationsPro[0][0][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
5134 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5135 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5136 | } | |
5137 | } // end of if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5138 | // +mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
5139 | ||
5140 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5141 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5142 | ||
5143 | ||
5144 | ||
5145 | ||
5146 | ||
5147 | } // end of AliFlowAnalysisWithQCumulants::CalculateCorrelationsForDifferentialFlow2D() | |
5148 | ||
5149 | ||
5150 | ||
5151 | ||
5152 | ||
5153 | ||
5154 | //================================================================================================================================ | |
5155 | ||
5156 | ||
5157 | void AliFlowAnalysisWithQCumulants::CalculateWeightedCorrelationsForDifferentialFlow2D(TString type) | |
5158 | { | |
5159 | // calculate all weighted correlations needed for differential flow | |
5160 | ||
5161 | if(type == "RP") // to be improved (removed) | |
5162 | { | |
5163 | cout<<endl; | |
5164 | } | |
5165 | // ... | |
5166 | ||
5167 | ||
5168 | ||
5169 | ||
5170 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
5171 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
5172 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
5173 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
5174 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
5175 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
5176 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
5177 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
5178 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
5179 | ||
5180 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
5181 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
5182 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
5183 | Double_t dSM1p3k = (*fSMpk)(0,3); | |
5184 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
5185 | Double_t dSM3p1k = (*fSMpk)(2,1); | |
5186 | ||
5187 | // looping over all (pt,eta) bins and calculating weighted correlations needed for differential flow: | |
5188 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5189 | { | |
5190 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5191 | { | |
5192 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): | |
5193 | Double_t p1n0kRe = 0.; | |
5194 | Double_t p1n0kIm = 0.; | |
5195 | ||
5196 | // number of POIs in particular (pt,eta) bin): | |
5197 | Double_t mp = 0.; | |
5198 | ||
5199 | // real and imaginary parts of q_{m*n,k}: | |
5200 | // (weighted Q-vector evaluated for particles which are both RPs and POIs in particular (pt,eta) bin) | |
5201 | Double_t q1n2kRe = 0.; | |
5202 | Double_t q1n2kIm = 0.; | |
5203 | Double_t q2n1kRe = 0.; | |
5204 | Double_t q2n1kIm = 0.; | |
5205 | ||
5206 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
5207 | Double_t s1p1k = 0.; | |
5208 | Double_t s1p2k = 0.; | |
5209 | Double_t s1p3k = 0.; | |
5210 | ||
5211 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
5212 | Double_t dM0111 = 0.; | |
5213 | ||
5214 | if(type == "POI") | |
5215 | { | |
5216 | // p_{m*n,0}: | |
5217 | p1n0kRe = fReEBE2D[1][0][0]->GetBinContent(fReEBE2D[1][0][0]->GetBin(p,e)) | |
5218 | * fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); | |
5219 | p1n0kIm = fImEBE2D[1][0][0]->GetBinContent(fImEBE2D[1][0][0]->GetBin(p,e)) | |
5220 | * fImEBE2D[1][0][0]->GetBinEntries(fImEBE2D[1][0][0]->GetBin(p,e)); | |
5221 | ||
5222 | mp = fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); | |
5223 | ||
5224 | // q_{m*n,k}: | |
5225 | q1n2kRe = fReEBE2D[2][0][2]->GetBinContent(fReEBE2D[2][0][2]->GetBin(p,e)) | |
5226 | * fReEBE2D[2][0][2]->GetBinEntries(fReEBE2D[2][0][2]->GetBin(p,e)); | |
5227 | q1n2kIm = fImEBE2D[2][0][2]->GetBinContent(fImEBE2D[2][0][2]->GetBin(p,e)) | |
5228 | * fImEBE2D[2][0][2]->GetBinEntries(fImEBE2D[2][0][2]->GetBin(p,e)); | |
5229 | q2n1kRe = fReEBE2D[2][1][1]->GetBinContent(fReEBE2D[2][1][1]->GetBin(p,e)) | |
5230 | * fReEBE2D[2][1][1]->GetBinEntries(fReEBE2D[2][1][1]->GetBin(p,e)); | |
5231 | q2n1kIm = fImEBE2D[2][1][1]->GetBinContent(fImEBE2D[2][1][1]->GetBin(p,e)) | |
5232 | * fImEBE2D[2][1][1]->GetBinEntries(fImEBE2D[2][1][1]->GetBin(p,e)); | |
5233 | ||
5234 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
5235 | s1p1k = pow(fs2D[2][1]->GetBinContent(fs2D[2][1]->GetBin(p,e)),1.); | |
5236 | s1p2k = pow(fs2D[2][2]->GetBinContent(fs2D[2][2]->GetBin(p,e)),1.); | |
5237 | s1p3k = pow(fs2D[2][3]->GetBinContent(fs2D[2][3]->GetBin(p,e)),1.); | |
5238 | ||
5239 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
5240 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
5241 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
5242 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
5243 | } | |
5244 | else if(type == "RP") | |
5245 | { | |
5246 | p1n0kRe = fReEBE2D[0][0][0]->GetBinContent(fReEBE2D[0][0][0]->GetBin(p,e)) | |
5247 | * fReEBE2D[0][0][0]->GetBinEntries(fReEBE2D[0][0][0]->GetBin(p,e)); | |
5248 | p1n0kIm = fImEBE2D[0][0][0]->GetBinContent(fImEBE2D[0][0][0]->GetBin(p,e)) | |
5249 | * fImEBE2D[0][0][0]->GetBinEntries(fImEBE2D[0][0][0]->GetBin(p,e)); | |
5250 | ||
5251 | mp = fReEBE2D[0][0][0]->GetBinEntries(fReEBE2D[0][0][0]->GetBin(p,e)); | |
5252 | ||
5253 | // q_{m*n,k}: | |
5254 | q1n2kRe = fReEBE2D[0][0][2]->GetBinContent(fReEBE2D[0][0][2]->GetBin(p,e)) | |
5255 | * fReEBE2D[0][0][2]->GetBinEntries(fReEBE2D[0][0][2]->GetBin(p,e)); | |
5256 | q1n2kIm = fImEBE2D[0][0][2]->GetBinContent(fImEBE2D[0][0][2]->GetBin(p,e)) | |
5257 | * fImEBE2D[0][0][2]->GetBinEntries(fImEBE2D[0][0][2]->GetBin(p,e)); | |
5258 | q2n1kRe = fReEBE2D[0][1][1]->GetBinContent(fReEBE2D[0][1][1]->GetBin(p,e)) | |
5259 | * fReEBE2D[0][1][1]->GetBinEntries(fReEBE2D[0][1][1]->GetBin(p,e)); | |
5260 | q2n1kIm = fImEBE2D[0][1][1]->GetBinContent(fImEBE2D[0][1][1]->GetBin(p,e)) | |
5261 | * fImEBE2D[0][1][1]->GetBinEntries(fImEBE2D[0][1][1]->GetBin(p,e)); | |
5262 | ||
5263 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
5264 | s1p1k = pow(fs2D[0][1]->GetBinContent(fs2D[0][1]->GetBin(p,e)),1.); | |
5265 | s1p2k = pow(fs2D[0][2]->GetBinContent(fs2D[0][2]->GetBin(p,e)),1.); | |
5266 | s1p3k = pow(fs2D[0][3]->GetBinContent(fs2D[0][3]->GetBin(p,e)),1.); | |
5267 | ||
5268 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
5269 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
5270 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
5271 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
5272 | //............................................................................................... | |
5273 | } | |
5274 | ||
5275 | // 2'-particle correlation: | |
5276 | Double_t two1n1nW0W1PtEta = 0.; | |
5277 | if(mp*dSM1p1k-s1p1k) | |
5278 | { | |
5279 | two1n1nW0W1PtEta = (p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k-s1p1k) | |
5280 | / (mp*dSM1p1k-s1p1k); | |
5281 | ||
5282 | // fill the 2D profile to get the average correlation for each (pt, eta) bin: | |
5283 | if(type == "POI") | |
5284 | { | |
5285 | //f2pPtEtaPOIW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta, | |
5286 | // mp*dSM1p1k-s1p1k); | |
5287 | fCorrelationsPro[1][1][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta,mp*dSM1p1k-s1p1k); | |
5288 | } | |
5289 | else if(type == "RP") | |
5290 | { | |
5291 | //f2pPtEtaRPW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta, | |
5292 | // mp*dSM1p1k-s1p1k); | |
5293 | fCorrelationsPro[0][1][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta,mp*dSM1p1k-s1p1k); | |
5294 | } | |
5295 | } // end of if(mp*dMult-dmPrimePrimePtEta) | |
5296 | ||
5297 | // 4'-particle correlation: | |
5298 | Double_t four1n1n1n1nW0W1W1W1PtEta = 0.; | |
5299 | if(dM0111) | |
5300 | { | |
5301 | four1n1n1n1nW0W1W1W1PtEta = ((pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
5302 | - q2n1kRe*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.)) | |
5303 | - 2.*q2n1kIm*dReQ1n1k*dImQ1n1k | |
5304 | - p1n0kRe*(dReQ1n1k*dReQ2n2k+dImQ1n1k*dImQ2n2k) | |
5305 | + p1n0kIm*(dImQ1n1k*dReQ2n2k-dReQ1n1k*dImQ2n2k) | |
5306 | - 2.*dSM1p2k*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
5307 | - 2.*(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*s1p1k | |
5308 | + 6.*(q1n2kRe*dReQ1n1k+q1n2kIm*dImQ1n1k) | |
5309 | + 1.*(q2n1kRe*dReQ2n2k+q2n1kIm*dImQ2n2k) | |
5310 | + 2.*(p1n0kRe*dReQ1n3k+p1n0kIm*dImQ1n3k) | |
5311 | + 2.*s1p1k*dSM1p2k | |
5312 | - 6.*s1p3k) | |
5313 | / dM0111; // to be imropoved (notation of dM0111) | |
5314 | ||
5315 | // fill the 2D profile to get the average correlation for each (pt, eta) bin: | |
5316 | if(type == "POI") | |
5317 | { | |
5318 | //f4pPtEtaPOIW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
5319 | fCorrelationsPro[1][1][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
5320 | } | |
5321 | else if(type == "RP") | |
5322 | { | |
5323 | //f4pPtEtaRPW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
5324 | fCorrelationsPro[0][1][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
5325 | } | |
5326 | } // end of if(dM0111) | |
5327 | ||
5328 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5329 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5330 | ||
5331 | ||
5332 | ||
5333 | ||
5334 | } // end of AliFlowAnalysisWithQCumulants::CalculateWeightedCorrelationsForDifferentialFlow2D(TString type) | |
5335 | ||
5336 | ||
5337 | //================================================================================================================================ | |
5338 | ||
5339 | */ | |
5340 | ||
5341 | /* | |
5342 | void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsForDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights) | |
5343 | { | |
5344 | // 1.) Access average for 2D correlations from profiles and store them in 2D final results histograms; | |
5345 | // 2.) Access spread for 2D correlations from profiles, calculate error and store it in 2D final results histograms; | |
5346 | // 3.) Make projections along pt and eta axis and store results and errors in 1D final results histograms. | |
5347 | ||
5348 | Int_t typeFlag = -1; | |
5349 | Int_t pWeightsFlag = -1; | |
5350 | Int_t eWeightsFlag = -1; | |
5351 | ||
5352 | if(type == "RP") | |
5353 | { | |
5354 | typeFlag = 0; | |
5355 | } else if(type == "POI") | |
5356 | { | |
5357 | typeFlag = 1; | |
5358 | } else | |
5359 | { | |
5360 | cout<<"WARNING: type must be either RP or POI in AFAWQC::FCFDF() !!!!"<<endl; | |
5361 | exit(0); | |
5362 | } | |
5363 | ||
5364 | if(!useParticleWeights) | |
5365 | { | |
5366 | pWeightsFlag = 0; | |
5367 | } else | |
5368 | { | |
5369 | pWeightsFlag = 1; | |
5370 | } | |
5371 | ||
5372 | if(eventWeights == "exact") | |
5373 | { | |
5374 | eWeightsFlag = 0; | |
5375 | } | |
5376 | ||
5377 | // shortcuts: | |
5378 | Int_t t = typeFlag; | |
5379 | Int_t pW = pWeightsFlag; | |
5380 | Int_t eW = eWeightsFlag; | |
5381 | ||
5382 | // from 2D histogram fNonEmptyBins2D make two 1D histograms fNonEmptyBins1D in pt and eta (to be improved (i.e. moved somewhere else)) | |
5383 | // pt: | |
5384 | for(Int_t p=1;p<fnBinsPt;p++) | |
5385 | { | |
5386 | Double_t contentPt = 0.; | |
5387 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5388 | { | |
5389 | contentPt += (fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e))); | |
5390 | } | |
5391 | fNonEmptyBins1D[t][0]->SetBinContent(p,contentPt); | |
5392 | } | |
5393 | // eta: | |
5394 | for(Int_t e=1;e<fnBinsEta;e++) | |
5395 | { | |
5396 | Double_t contentEta = 0.; | |
5397 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5398 | { | |
5399 | contentEta += (fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e))); | |
5400 | } | |
5401 | fNonEmptyBins1D[t][1]->SetBinContent(e,contentEta); | |
5402 | } | |
5403 | ||
5404 | // from 2D profile in (pt,eta) make two 1D profiles in (pt) and (eta): | |
5405 | TProfile *profile[2][4]; // [0=pt,1=eta][correlation index] // to be improved (do not hardwire the correlation index) | |
5406 | ||
5407 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5408 | { | |
5409 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
5410 | { | |
5411 | if(pe==0) profile[pe][ci] = this->MakePtProjection(fCorrelationsPro[t][pW][eW][ci]); | |
5412 | if(pe==1) profile[pe][ci] = this->MakeEtaProjection(fCorrelationsPro[t][pW][eW][ci]); | |
5413 | } | |
5414 | } | |
5415 | ||
5416 | // transfer 2D profile into 2D histogram: | |
5417 | // to be improved (see in documentation if there is a method to transfer values from 2D profile into 2D histogram) | |
5418 | for(Int_t ci=0;ci<4;ci++) | |
5419 | { | |
5420 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5421 | { | |
5422 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5423 | { | |
5424 | Double_t correlation = fCorrelationsPro[t][pW][eW][ci]->GetBinContent(fCorrelationsPro[t][pW][eW][ci]->GetBin(p,e)); | |
5425 | Double_t spread = fCorrelationsPro[t][pW][eW][ci]->GetBinError(fCorrelationsPro[t][pW][eW][ci]->GetBin(p,e)); | |
5426 | Double_t nEvts = fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e)); | |
5427 | Double_t error = 0.; | |
5428 | fFinalCorrelations2D[t][pW][eW][ci]->SetBinContent(fFinalCorrelations2D[t][pW][eW][ci]->GetBin(p,e),correlation); | |
5429 | if(nEvts>0) | |
5430 | { | |
5431 | error = spread/pow(nEvts,0.5); | |
5432 | fFinalCorrelations2D[t][pW][eW][ci]->SetBinError(fFinalCorrelations2D[t][pW][eW][ci]->GetBin(p,e),error); | |
5433 | } | |
5434 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5435 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5436 | } // end of for(Int_t ci=0;ci<4;ci++) | |
5437 | ||
5438 | // transfer 1D profile into 1D histogram (pt): | |
5439 | // to be improved (see in documentation if there is a method to transfer values from 1D profile into 1D histogram) | |
5440 | for(Int_t ci=0;ci<4;ci++) | |
5441 | { | |
5442 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5443 | { | |
5444 | if(profile[0][ci]) | |
5445 | { | |
5446 | Double_t correlation = profile[0][ci]->GetBinContent(p); | |
5447 | Double_t spread = profile[0][ci]->GetBinError(p); | |
5448 | Double_t nEvts = fNonEmptyBins1D[t][0]->GetBinContent(p); | |
5449 | Double_t error = 0.; | |
5450 | fFinalCorrelations1D[t][pW][eW][0][ci]->SetBinContent(p,correlation); | |
5451 | if(nEvts>0) | |
5452 | { | |
5453 | error = spread/pow(nEvts,0.5); | |
5454 | fFinalCorrelations1D[t][pW][eW][0][ci]->SetBinError(p,error); | |
5455 | } | |
5456 | } | |
5457 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5458 | } // end of for(Int_t ci=0;ci<4;ci++) | |
5459 | ||
5460 | // transfer 1D profile into 1D histogram (eta): | |
5461 | // to be improved (see in documentation if there is a method to transfer values from 1D profile into 1D histogram) | |
5462 | for(Int_t ci=0;ci<4;ci++) | |
5463 | { | |
5464 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5465 | { | |
5466 | if(profile[1][ci]) | |
5467 | { | |
5468 | Double_t correlation = profile[1][ci]->GetBinContent(e); | |
5469 | fFinalCorrelations1D[t][pW][eW][1][ci]->SetBinContent(e,correlation); | |
5470 | } | |
5471 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5472 | } // end of for(Int_t ci=0;ci<4;ci++) | |
5473 | ||
5474 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsForDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights) | |
5475 | */ | |
5476 | ||
5477 | ||
5478 | //================================================================================================================================ | |
5479 | ||
5480 | ||
5481 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulants(TString type, TString ptOrEta) | |
5482 | { | |
5483 | // calcualate cumulants for differential flow from measured correlations | |
5484 | // Remark: cumulants calculated here are NOT corrected for non-uniform acceptance. This correction is applied in the method ... | |
5485 | // to be improved (description) | |
5486 | ||
5487 | Int_t typeFlag = -1; | |
5488 | Int_t ptEtaFlag = -1; | |
5489 | ||
5490 | if(type == "RP") | |
5491 | { | |
5492 | typeFlag = 0; | |
5493 | } else if(type == "POI") | |
5494 | { | |
5495 | typeFlag = 1; | |
5496 | } | |
5497 | ||
5498 | if(ptOrEta == "Pt") | |
5499 | { | |
5500 | ptEtaFlag = 0; | |
5501 | } else if(ptOrEta == "Eta") | |
5502 | { | |
5503 | ptEtaFlag = 1; | |
5504 | } | |
5505 | ||
5506 | // shortcuts: | |
5507 | Int_t t = typeFlag; | |
5508 | Int_t pe = ptEtaFlag; | |
5509 | ||
5510 | // common: | |
5511 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
5512 | ||
5513 | // correlation <<2>>: | |
5514 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); | |
5515 | ||
5516 | // 1D: | |
5517 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
5518 | { | |
5519 | // reduced correlations: | |
5520 | Double_t twoPrime = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); // <<2'>>(pt) | |
5521 | Double_t fourPrime = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); // <<4'>>(pt) | |
5522 | // final statistical error of reduced correlations: | |
5523 | //Double_t twoPrimeError = fFinalCorrelations1D[t][pW][eW][0][0]->GetBinError(p); | |
5524 | // QC{2'}: | |
5525 | Double_t qc2Prime = twoPrime; // QC{2'} | |
5526 | //Double_t qc2PrimeError = twoPrimeError; // final stat. error of QC{2'} | |
5527 | fDiffFlowCumulants[t][pe][0]->SetBinContent(b,qc2Prime); | |
5528 | //fFinalCumulantsPt[t][pW][eW][nua][0]->SetBinError(p,qc2PrimeError); | |
5529 | // QC{4'}: | |
5530 | Double_t qc4Prime = fourPrime - 2.*twoPrime*two; // QC{4'} = <<4'>> - 2*<<2'>><<2>> | |
5531 | fDiffFlowCumulants[t][pe][1]->SetBinContent(b,qc4Prime); | |
5532 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5533 | ||
5534 | ||
5535 | /* | |
5536 | // 2D (pt,eta): | |
5537 | // to be improved (see documentation if I can do all this without looping) | |
5538 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5539 | { | |
5540 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5541 | { | |
5542 | // reduced correlations: | |
5543 | Double_t twoPrime = fFinalCorrelations2D[t][pW][eW][0]->GetBinContent(fFinalCorrelations2D[t][pW][eW][0]->GetBin(p,e)); // <<2'>>(pt,eta) | |
5544 | Double_t fourPrime = fFinalCorrelations2D[t][pW][eW][1]->GetBinContent(fFinalCorrelations2D[t][pW][eW][1]->GetBin(p,e)); // <<4'>>(pt,eta) | |
5545 | for(Int_t nua=0;nua<2;nua++) | |
5546 | { | |
5547 | // QC{2'}: | |
5548 | Double_t qc2Prime = twoPrime; // QC{2'} = <<2'>> | |
5549 | fFinalCumulants2D[t][pW][eW][nua][0]->SetBinContent(fFinalCumulants2D[t][pW][eW][nua][0]->GetBin(p,e),qc2Prime); | |
5550 | // QC{4'}: | |
5551 | Double_t qc4Prime = fourPrime - 2.*twoPrime*two; // QC{4'} = <<4'>> - 2*<<2'>><<2>> | |
5552 | fFinalCumulants2D[t][pW][eW][nua][1]->SetBinContent(fFinalCumulants2D[t][pW][eW][nua][1]->GetBin(p,e),qc4Prime); | |
5553 | } // end of for(Int_t nua=0;nua<2;nua++) | |
5554 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5555 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5556 | */ | |
5557 | ||
5558 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulants(TString type, Bool_t useParticleWeights, TString eventWeights); | |
5559 | ||
5560 | ||
5561 | //================================================================================================================================ | |
5562 | ||
5563 | ||
5564 | void AliFlowAnalysisWithQCumulants::CalculateFinalResultsForRPandPOIIntegratedFlow(TString type) | |
5565 | { | |
5566 | // calculate final results for integrated flow of RPs and POIs | |
5567 | ||
5568 | Int_t typeFlag = -1; | |
5569 | ||
5570 | if(type == "RP") | |
5571 | { | |
5572 | typeFlag = 0; | |
5573 | } else if(type == "POI") | |
5574 | { | |
5575 | typeFlag = 1; | |
5576 | } else | |
5577 | { | |
5578 | cout<<"WARNING: type must be either RP or POI in AFAWQC::CDF() !!!!"<<endl; | |
5579 | exit(0); | |
5580 | } | |
5581 | ||
5582 | // shortcuts: | |
5583 | Int_t t = typeFlag; | |
5584 | ||
5585 | // pt yield: | |
5586 | TH1F *yield2ndPt = NULL; | |
5587 | TH1F *yield4thPt = NULL; | |
5588 | TH1F *yield6thPt = NULL; | |
5589 | TH1F *yield8thPt = NULL; | |
5590 | ||
5591 | if(type == "POI") | |
5592 | { | |
5593 | yield2ndPt = (TH1F*)(fCommonHists2nd->GetHistPtPOI())->Clone(); | |
5594 | yield4thPt = (TH1F*)(fCommonHists4th->GetHistPtPOI())->Clone(); | |
5595 | yield6thPt = (TH1F*)(fCommonHists6th->GetHistPtPOI())->Clone(); | |
5596 | yield8thPt = (TH1F*)(fCommonHists8th->GetHistPtPOI())->Clone(); | |
5597 | } | |
5598 | else if(type == "RP") | |
5599 | { | |
5600 | yield2ndPt = (TH1F*)(fCommonHists2nd->GetHistPtRP())->Clone(); | |
5601 | yield4thPt = (TH1F*)(fCommonHists4th->GetHistPtRP())->Clone(); | |
5602 | yield6thPt = (TH1F*)(fCommonHists6th->GetHistPtRP())->Clone(); | |
5603 | yield8thPt = (TH1F*)(fCommonHists8th->GetHistPtRP())->Clone(); | |
5604 | } | |
5605 | ||
5606 | Int_t nBinsPt = yield2ndPt->GetNbinsX(); | |
5607 | ||
5608 | TH1D *flow2ndPt = NULL; | |
5609 | TH1D *flow4thPt = NULL; | |
5610 | TH1D *flow6thPt = NULL; | |
5611 | TH1D *flow8thPt = NULL; | |
5612 | ||
5613 | // to be improved (hardwired pt index) | |
5614 | flow2ndPt = (TH1D*)fDiffFlow[t][0][0]->Clone(); | |
5615 | flow4thPt = (TH1D*)fDiffFlow[t][0][1]->Clone(); | |
5616 | flow6thPt = (TH1D*)fDiffFlow[t][0][2]->Clone(); | |
5617 | flow8thPt = (TH1D*)fDiffFlow[t][0][3]->Clone(); | |
5618 | ||
5619 | Double_t dvn2nd = 0., dvn4th = 0., dvn6th = 0., dvn8th = 0.; // differential flow | |
5620 | Double_t dErrvn2nd = 0., dErrvn4th = 0., dErrvn6th = 0., dErrvn8th = 0.; // error on differential flow | |
5621 | ||
5622 | Double_t dVn2nd = 0., dVn4th = 0., dVn6th = 0., dVn8th = 0.; // integrated flow | |
5623 | Double_t dErrVn2nd = 0., dErrVn4th = 0., dErrVn6th = 0., dErrVn8th = 0.; // error on integrated flow | |
5624 | ||
5625 | Double_t dYield2nd = 0., dYield4th = 0., dYield6th = 0., dYield8th = 0.; // pt yield | |
5626 | Double_t dSum2nd = 0., dSum4th = 0., dSum6th = 0., dSum8th = 0.; // needed for normalizing integrated flow | |
5627 | ||
5628 | // looping over pt bins: | |
5629 | for(Int_t p=1;p<nBinsPt+1;p++) | |
5630 | { | |
5631 | dvn2nd = flow2ndPt->GetBinContent(p); | |
5632 | dvn4th = flow4thPt->GetBinContent(p); | |
5633 | dvn6th = flow6thPt->GetBinContent(p); | |
5634 | dvn8th = flow8thPt->GetBinContent(p); | |
5635 | ||
5636 | dErrvn2nd = flow2ndPt->GetBinError(p); | |
5637 | dErrvn4th = flow4thPt->GetBinError(p); | |
5638 | dErrvn6th = flow6thPt->GetBinError(p); | |
5639 | dErrvn8th = flow8thPt->GetBinError(p); | |
5640 | ||
5641 | dYield2nd = yield2ndPt->GetBinContent(p); | |
5642 | dYield4th = yield4thPt->GetBinContent(p); | |
5643 | dYield6th = yield6thPt->GetBinContent(p); | |
5644 | dYield8th = yield8thPt->GetBinContent(p); | |
5645 | ||
5646 | dVn2nd += dvn2nd*dYield2nd; | |
5647 | dVn4th += dvn4th*dYield4th; | |
5648 | dVn6th += dvn6th*dYield6th; | |
5649 | dVn8th += dvn8th*dYield8th; | |
5650 | ||
5651 | dSum2nd += dYield2nd; | |
5652 | dSum4th += dYield4th; | |
5653 | dSum6th += dYield6th; | |
5654 | dSum8th += dYield8th; | |
5655 | ||
5656 | dErrVn2nd += dYield2nd*dYield2nd*dErrvn2nd*dErrvn2nd; // ro be improved (check this relation) | |
5657 | dErrVn4th += dYield4th*dYield4th*dErrvn4th*dErrvn4th; | |
5658 | dErrVn6th += dYield6th*dYield6th*dErrvn6th*dErrvn6th; | |
5659 | dErrVn8th += dYield8th*dYield8th*dErrvn8th*dErrvn8th; | |
5660 | ||
5661 | } // end of for(Int_t p=1;p<nBinsPt+1;p++) | |
5662 | ||
5663 | // normalizing the results for integrated flow: | |
5664 | if(dSum2nd) | |
5665 | { | |
5666 | dVn2nd /= dSum2nd; | |
5667 | dErrVn2nd /= (dSum2nd*dSum2nd); | |
5668 | dErrVn2nd = TMath::Sqrt(dErrVn2nd); | |
5669 | } | |
5670 | if(dSum4th) | |
5671 | { | |
5672 | dVn4th /= dSum4th; | |
5673 | dErrVn4th /= (dSum4th*dSum4th); | |
5674 | dErrVn4th = TMath::Sqrt(dErrVn4th); | |
5675 | } | |
5676 | //if(dSum6th) dVn6th/=dSum6th; | |
5677 | //if(dSum8th) dVn8th/=dSum8th; | |
5678 | ||
5679 | // storing the results for integrated flow in common histos: (to be improved: new method for this?) | |
5680 | if(type == "POI") | |
5681 | { | |
5682 | fCommonHistsResults2nd->FillIntegratedFlowPOI(dVn2nd,dErrVn2nd); | |
5683 | fCommonHistsResults4th->FillIntegratedFlowPOI(dVn4th,dErrVn4th); | |
5684 | fCommonHistsResults6th->FillIntegratedFlowPOI(dVn6th,0.); // to be improved (errors) | |
5685 | fCommonHistsResults8th->FillIntegratedFlowPOI(dVn8th,0.); // to be improved (errors) | |
5686 | } | |
5687 | else if (type == "RP") | |
5688 | { | |
5689 | fCommonHistsResults2nd->FillIntegratedFlowRP(dVn2nd,dErrVn2nd); | |
5690 | fCommonHistsResults4th->FillIntegratedFlowRP(dVn4th,dErrVn4th); | |
5691 | fCommonHistsResults6th->FillIntegratedFlowRP(dVn6th,0.); // to be improved (errors) | |
5692 | fCommonHistsResults8th->FillIntegratedFlowRP(dVn8th,0.); // to be improved (errors) | |
5693 | } | |
5694 | ||
5695 | delete flow2ndPt; | |
5696 | delete flow4thPt; | |
5697 | //delete flow6thPt; | |
5698 | //delete flow8thPt; | |
5699 | ||
5700 | delete yield2ndPt; | |
5701 | delete yield4thPt; | |
5702 | delete yield6thPt; | |
5703 | delete yield8thPt; | |
5704 | ||
5705 | } // end of AliFlowAnalysisWithQCumulants::CalculateFinalResultsForRPandPOIIntegratedFlow(TString type) | |
5706 | ||
5707 | ||
5708 | //================================================================================================================================ | |
5709 | ||
5710 | ||
5711 | void AliFlowAnalysisWithQCumulants::InitializeArraysForDistributions() | |
5712 | { | |
5713 | // Initialize all arrays used for distributions. | |
5714 | ||
5715 | // a) Initialize arrays of histograms used to hold distributions of correlations; | |
5716 | // b) Initialize array to hold min and max values of correlations. | |
5717 | ||
5718 | // a) Initialize arrays of histograms used to hold distributions of correlations: | |
5719 | for(Int_t di=0;di<4;di++) // distribution index | |
5720 | { | |
5721 | fDistributions[di] = NULL; | |
5722 | } | |
5723 | ||
5724 | // b) Initialize default min and max values of correlations: | |
5725 | // (Remark: The default values bellow were chosen for v2=5% and M=500) | |
5726 | fMinValueOfCorrelation[0] = -0.01; // <2>_min | |
5727 | fMaxValueOfCorrelation[0] = 0.04; // <2>_max | |
5728 | fMinValueOfCorrelation[1] = -0.00002; // <4>_min | |
5729 | fMaxValueOfCorrelation[1] = 0.00015; // <4>_max | |
5730 | fMinValueOfCorrelation[2] = -0.0000003; // <6>_min | |
5731 | fMaxValueOfCorrelation[2] = 0.0000006; // <6>_max | |
5732 | fMinValueOfCorrelation[3] = -0.000000006; // <8>_min | |
5733 | fMaxValueOfCorrelation[3] = 0.000000003; // <8>_max | |
5734 | ||
5735 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForDistributions() | |
5736 | ||
5737 | ||
5738 | //================================================================================================================================ | |
5739 | ||
5740 | ||
5741 | void AliFlowAnalysisWithQCumulants::BookEverythingForDistributions() | |
5742 | { | |
5743 | // a) Book profile to hold all flags for distributions of correlations; | |
5744 | // b) Book all histograms to hold distributions of correlations. | |
5745 | ||
5746 | TString correlationIndex[4] = {"<2>","<4>","<6>","<8>"}; // to be improved (should I promote this to data members?) | |
5747 | ||
5748 | // a) Book profile to hold all flags for distributions of correlations: | |
5749 | TString distributionsFlagsName = "fDistributionsFlags"; | |
5750 | distributionsFlagsName += fAnalysisLabel->Data(); | |
5751 | fDistributionsFlags = new TProfile(distributionsFlagsName.Data(),"Flags for Distributions of Correlations",9,0,9); | |
5752 | fDistributionsFlags->SetTickLength(-0.01,"Y"); | |
5753 | fDistributionsFlags->SetMarkerStyle(25); | |
5754 | fDistributionsFlags->SetLabelSize(0.05); | |
5755 | fDistributionsFlags->SetLabelOffset(0.02,"Y"); | |
5756 | fDistributionsFlags->GetXaxis()->SetBinLabel(1,"Store or not?"); | |
5757 | fDistributionsFlags->GetXaxis()->SetBinLabel(2,"<2>_{min}"); | |
5758 | fDistributionsFlags->GetXaxis()->SetBinLabel(3,"<2>_{max}"); | |
5759 | fDistributionsFlags->GetXaxis()->SetBinLabel(4,"<4>_{min}"); | |
5760 | fDistributionsFlags->GetXaxis()->SetBinLabel(5,"<4>_{max}"); | |
5761 | fDistributionsFlags->GetXaxis()->SetBinLabel(6,"<6>_{min}"); | |
5762 | fDistributionsFlags->GetXaxis()->SetBinLabel(7,"<6>_{max}"); | |
5763 | fDistributionsFlags->GetXaxis()->SetBinLabel(8,"<8>_{min}"); | |
5764 | fDistributionsFlags->GetXaxis()->SetBinLabel(9,"<8>_{max}"); | |
5765 | fDistributionsList->Add(fDistributionsFlags); | |
5766 | ||
5767 | // b) Book all histograms to hold distributions of correlations. | |
5768 | if(fStoreDistributions) | |
5769 | { | |
5770 | TString distributionsName = "fDistributions"; | |
5771 | distributionsName += fAnalysisLabel->Data(); | |
5772 | for(Int_t di=0;di<4;di++) // distribution index | |
5773 | { | |
5774 | fDistributions[di] = new TH1D(Form("Distribution of %s",correlationIndex[di].Data()),Form("Distribution of %s",correlationIndex[di].Data()),10000,fMinValueOfCorrelation[di],fMaxValueOfCorrelation[di]); | |
5775 | fDistributions[di]->SetXTitle(correlationIndex[di].Data()); | |
5776 | fDistributionsList->Add(fDistributions[di]); | |
5777 | } // end of for(Int_t di=0;di<4;di++) // distribution index | |
5778 | } // end of if(fStoreDistributions) | |
5779 | ||
5780 | } // end of void AliFlowAnalysisWithQCumulants::BookEverythingForDistributions() | |
5781 | ||
5782 | ||
5783 | //================================================================================================================================ | |
5784 | ||
5785 | ||
5786 | void AliFlowAnalysisWithQCumulants::StoreFlagsForDistributions() | |
5787 | { | |
5788 | // Store all flags for distributiuons of correlations in profile fDistributionsFlags. | |
5789 | ||
5790 | if(!fDistributionsFlags) | |
5791 | { | |
5792 | cout<<"WARNING: fDistributionsFlags is NULL in AFAWQC::SDF() !!!!"<<endl; | |
5793 | exit(0); | |
5794 | } | |
5795 | ||
5796 | fDistributionsFlags->Fill(0.5,(Int_t)fStoreDistributions); // histos with distributions of correlations stored or not in the output file | |
5797 | // store min and max values of correlations: | |
5798 | for(Int_t di=0;di<4;di++) // distribution index | |
5799 | { | |
5800 | fDistributionsFlags->Fill(1.5+2.*(Double_t)di,fMinValueOfCorrelation[di]); | |
5801 | fDistributionsFlags->Fill(2.5+2.*(Double_t)di,fMaxValueOfCorrelation[di]); | |
5802 | } | |
5803 | ||
5804 | } // end of void AliFlowAnalysisWithQCumulants::StoreFlagsForDistributions() | |
5805 | ||
5806 | ||
5807 | //================================================================================================================================ | |
5808 | ||
5809 | ||
5810 | void AliFlowAnalysisWithQCumulants::StoreDistributionsOfCorrelations() | |
5811 | { | |
5812 | // Store distributions of correlations. | |
5813 | ||
5814 | if(!(fIntFlowCorrelationsEBE && fIntFlowEventWeightsForCorrelationsEBE)) | |
5815 | { | |
5816 | cout<<"WARNING: fIntFlowCorrelationsEBE && fIntFlowEventWeightsForCorrelationsEBE"<<endl; | |
5817 | cout<<" is NULL in AFAWQC::SDOC() !!!!"<<endl; | |
5818 | exit(0); | |
5819 | } | |
5820 | ||
5821 | for(Int_t di=0;di<4;di++) // distribution index | |
5822 | { | |
5823 | if(!fDistributions[di]) | |
5824 | { | |
5825 | cout<<"WARNING: fDistributions[di] is NULL in AFAWQC::SDOC() !!!!"<<endl; | |
5826 | cout<<"di = "<<di<<endl; | |
5827 | exit(0); | |
5828 | } else | |
5829 | { | |
5830 | fDistributions[di]->Fill(fIntFlowCorrelationsEBE->GetBinContent(di+1),fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(di+1)); | |
5831 | } | |
5832 | } // end of for(Int_t di=0;di<4;di++) // distribution index | |
5833 | ||
5834 | } // end of void AliFlowAnalysisWithQCumulants::StoreDistributionsOfCorrelations() | |
5835 | ||
5836 | ||
5837 | //================================================================================================================================ | |
5838 | ||
5839 | ||
5840 | void AliFlowAnalysisWithQCumulants::BookAndNestAllLists() | |
5841 | { | |
5842 | // Book and nest all lists nested in the base list fHistList. | |
5843 | // a) Book and nest lists for integrated flow; | |
5844 | // b) Book and nest lists for differential flow; | |
5845 | // c) Book and nest list for particle weights; | |
5846 | // d) Book and nest list for distributions; | |
5847 | // e) Book and nest list for nested loops; | |
5848 | ||
5849 | // a) Book and nest all lists for integrated flow: | |
5850 | // base list for integrated flow: | |
5851 | fIntFlowList = new TList(); | |
5852 | fIntFlowList->SetName("Integrated Flow"); | |
5853 | fIntFlowList->SetOwner(kTRUE); | |
5854 | fHistList->Add(fIntFlowList); | |
5855 | // list holding profiles: | |
5856 | fIntFlowProfiles = new TList(); | |
5857 | fIntFlowProfiles->SetName("Profiles"); | |
5858 | fIntFlowProfiles->SetOwner(kTRUE); | |
5859 | fIntFlowList->Add(fIntFlowProfiles); | |
5860 | // list holding histograms with results: | |
5861 | fIntFlowResults = new TList(); | |
5862 | fIntFlowResults->SetName("Results"); | |
5863 | fIntFlowResults->SetOwner(kTRUE); | |
5864 | fIntFlowList->Add(fIntFlowResults); | |
5865 | ||
5866 | // b) Book and nest lists for differential flow; | |
5867 | fDiffFlowList = new TList(); | |
5868 | fDiffFlowList->SetName("Differential Flow"); | |
5869 | fDiffFlowList->SetOwner(kTRUE); | |
5870 | fHistList->Add(fDiffFlowList); | |
5871 | // list holding profiles: | |
5872 | fDiffFlowProfiles = new TList(); | |
5873 | fDiffFlowProfiles->SetName("Profiles"); | |
5874 | fDiffFlowProfiles->SetOwner(kTRUE); | |
5875 | fDiffFlowList->Add(fDiffFlowProfiles); | |
5876 | // list holding histograms with results: | |
5877 | fDiffFlowResults = new TList(); | |
5878 | fDiffFlowResults->SetName("Results"); | |
5879 | fDiffFlowResults->SetOwner(kTRUE); | |
5880 | fDiffFlowList->Add(fDiffFlowResults); | |
5881 | // flags used for naming nested lists in list fDiffFlowProfiles and fDiffFlowResults: | |
5882 | TList list; | |
5883 | list.SetOwner(kTRUE); | |
5884 | TString typeFlag[2] = {"RP","POI"}; | |
5885 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; | |
5886 | TString powerFlag[2] = {"linear","quadratic"}; | |
5887 | // nested lists in fDiffFlowProfiles (~/Differential Flow/Profiles): | |
5888 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
5889 | { | |
5890 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5891 | { | |
5892 | // list holding profiles with correlations: | |
5893 | fDiffFlowCorrelationsProList[t][pe] = (TList*)list.Clone(); | |
5894 | fDiffFlowCorrelationsProList[t][pe]->SetName(Form("Profiles with correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5895 | fDiffFlowProfiles->Add(fDiffFlowCorrelationsProList[t][pe]); | |
5896 | // list holding profiles with products of correlations: | |
5897 | fDiffFlowProductOfCorrelationsProList[t][pe] = (TList*)list.Clone(); | |
5898 | fDiffFlowProductOfCorrelationsProList[t][pe]->SetName(Form("Profiles with products of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5899 | fDiffFlowProfiles->Add(fDiffFlowProductOfCorrelationsProList[t][pe]); | |
5900 | // list holding profiles with corrections: | |
5901 | fDiffFlowCorrectionsProList[t][pe] = (TList*)list.Clone(); | |
5902 | fDiffFlowCorrectionsProList[t][pe]->SetName(Form("Profiles with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5903 | fDiffFlowProfiles->Add(fDiffFlowCorrectionsProList[t][pe]); | |
5904 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5905 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
5906 | // nested lists in fDiffFlowResults (~/Differential Flow/Results): | |
5907 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
5908 | { | |
5909 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5910 | { | |
5911 | // list holding histograms with correlations: | |
5912 | fDiffFlowCorrelationsHistList[t][pe] = (TList*)list.Clone(); | |
5913 | fDiffFlowCorrelationsHistList[t][pe]->SetName(Form("Correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5914 | fDiffFlowResults->Add(fDiffFlowCorrelationsHistList[t][pe]); | |
5915 | // list holding histograms with corrections: | |
5916 | fDiffFlowCorrectionsHistList[t][pe] = (TList*)list.Clone(); | |
5917 | fDiffFlowCorrectionsHistList[t][pe]->SetName(Form("Histograms with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5918 | fDiffFlowResults->Add(fDiffFlowCorrectionsHistList[t][pe]); | |
5919 | for(Int_t power=0;power<2;power++) | |
5920 | { | |
5921 | // list holding histograms with sums of event weights: | |
5922 | fDiffFlowSumOfEventWeightsHistList[t][pe][power] = (TList*)list.Clone(); | |
5923 | fDiffFlowSumOfEventWeightsHistList[t][pe][power]->SetName(Form("Sum of %s event weights (%s, %s)",powerFlag[power].Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5924 | fDiffFlowResults->Add(fDiffFlowSumOfEventWeightsHistList[t][pe][power]); | |
5925 | } // end of for(Int_t power=0;power<2;power++) | |
5926 | // list holding histograms with sums of products of event weights: | |
5927 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe] = (TList*)list.Clone(); | |
5928 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]->SetName(Form("Sum of products of event weights (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5929 | fDiffFlowResults->Add(fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]); | |
5930 | // list holding histograms with covariances of correlations: | |
5931 | fDiffFlowCovariancesHistList[t][pe] = (TList*)list.Clone(); | |
5932 | fDiffFlowCovariancesHistList[t][pe]->SetName(Form("Covariances of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5933 | fDiffFlowResults->Add(fDiffFlowCovariancesHistList[t][pe]); | |
5934 | // list holding histograms with differential Q-cumulants: | |
5935 | fDiffFlowCumulantsHistList[t][pe] = (TList*)list.Clone(); | |
5936 | fDiffFlowCumulantsHistList[t][pe]->SetName(Form("Differential Q-cumulants (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5937 | fDiffFlowResults->Add(fDiffFlowCumulantsHistList[t][pe]); | |
5938 | // list holding histograms with differential flow estimates from Q-cumulants: | |
5939 | fDiffFlowHistList[t][pe] = (TList*)list.Clone(); | |
5940 | fDiffFlowHistList[t][pe]->SetName(Form("Differential flow (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5941 | fDiffFlowResults->Add(fDiffFlowHistList[t][pe]); | |
5942 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5943 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
5944 | ||
5945 | // c) Book and nest list for particle weights: | |
5946 | fWeightsList->SetName("Weights"); | |
5947 | fWeightsList->SetOwner(kTRUE); | |
5948 | fHistList->Add(fWeightsList); | |
5949 | ||
5950 | // d) Book and nest list for distributions: | |
5951 | fDistributionsList = new TList(); | |
5952 | fDistributionsList->SetName("Distributions"); | |
5953 | fDistributionsList->SetOwner(kTRUE); | |
5954 | fHistList->Add(fDistributionsList); | |
5955 | ||
5956 | // e) Book and nest list for nested loops: | |
5957 | fNestedLoopsList = new TList(); | |
5958 | fNestedLoopsList->SetName("Nested Loops"); | |
5959 | fNestedLoopsList->SetOwner(kTRUE); | |
5960 | fHistList->Add(fNestedLoopsList); | |
5961 | ||
5962 | } // end of void AliFlowAnalysisWithQCumulants::BookAndNestAllLists() | |
5963 | ||
5964 | ||
5965 | //================================================================================================================================ | |
5966 | ||
5967 | ||
5968 | void AliFlowAnalysisWithQCumulants::FillCommonHistResultsDiffFlow(TString type) | |
5969 | { | |
5970 | // fill common result histograms for differential flow | |
5971 | ||
5972 | Int_t typeFlag = -1; | |
5973 | //Int_t ptEtaFlag = -1; | |
5974 | ||
5975 | if(type == "RP") | |
5976 | { | |
5977 | typeFlag = 0; | |
5978 | } else if(type == "POI") | |
5979 | { | |
5980 | typeFlag = 1; | |
5981 | } | |
5982 | ||
5983 | // shortcuts: | |
5984 | Int_t t = typeFlag; | |
5985 | //Int_t pe = ptEtaFlag; | |
5986 | ||
5987 | // to be improved (implement protection here) | |
5988 | ||
5989 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th)) | |
5990 | { | |
5991 | cout<<"WARNING: fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl; | |
5992 | cout<<" is NULL in AFAWQC::FCHRIF() !!!!"<<endl; | |
5993 | exit(0); | |
5994 | } | |
5995 | ||
5996 | // pt: | |
5997 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5998 | { | |
5999 | Double_t v2 = fDiffFlow[t][0][0]->GetBinContent(p); | |
6000 | Double_t v4 = fDiffFlow[t][0][1]->GetBinContent(p); | |
6001 | Double_t v6 = fDiffFlow[t][0][2]->GetBinContent(p); | |
6002 | Double_t v8 = fDiffFlow[t][0][3]->GetBinContent(p); | |
6003 | ||
6004 | Double_t v2Error = fDiffFlow[t][0][0]->GetBinError(p); | |
6005 | Double_t v4Error = fDiffFlow[t][0][1]->GetBinError(p); | |
6006 | //Double_t v6Error = fFinalFlow1D[t][pW][nua][0][2]->GetBinError(p); | |
6007 | //Double_t v8Error = fFinalFlow1D[t][pW][nua][0][3]->GetBinError(p); | |
6008 | ||
6009 | if(type == "RP") | |
6010 | { | |
6011 | fCommonHistsResults2nd->FillDifferentialFlowPtRP(p,v2,v2Error); | |
6012 | fCommonHistsResults4th->FillDifferentialFlowPtRP(p,v4,v4Error); | |
6013 | fCommonHistsResults6th->FillDifferentialFlowPtRP(p,v6,0.); | |
6014 | fCommonHistsResults8th->FillDifferentialFlowPtRP(p,v8,0.); | |
6015 | } else if(type == "POI") | |
6016 | { | |
6017 | fCommonHistsResults2nd->FillDifferentialFlowPtPOI(p,v2,v2Error); | |
6018 | fCommonHistsResults4th->FillDifferentialFlowPtPOI(p,v4,v4Error); | |
6019 | fCommonHistsResults6th->FillDifferentialFlowPtPOI(p,v6,0.); | |
6020 | fCommonHistsResults8th->FillDifferentialFlowPtPOI(p,v8,0.); | |
6021 | } | |
6022 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
6023 | ||
6024 | // eta: | |
6025 | for(Int_t e=1;e<=fnBinsEta;e++) | |
6026 | { | |
6027 | Double_t v2 = fDiffFlow[t][1][0]->GetBinContent(e); | |
6028 | Double_t v4 = fDiffFlow[t][1][1]->GetBinContent(e); | |
6029 | Double_t v6 = fDiffFlow[t][1][2]->GetBinContent(e); | |
6030 | Double_t v8 = fDiffFlow[t][1][3]->GetBinContent(e); | |
6031 | ||
6032 | Double_t v2Error = fDiffFlow[t][1][0]->GetBinError(e); | |
6033 | Double_t v4Error = fDiffFlow[t][1][1]->GetBinError(e); | |
6034 | //Double_t v6Error = fDiffFlow[t][1][2]->GetBinError(e); | |
6035 | //Double_t v8Error = fDiffFlow[t][1][3]->GetBinError(e); | |
6036 | ||
6037 | if(type == "RP") | |
6038 | { | |
6039 | fCommonHistsResults2nd->FillDifferentialFlowEtaRP(e,v2,v2Error); | |
6040 | fCommonHistsResults4th->FillDifferentialFlowEtaRP(e,v4,v4Error); | |
6041 | fCommonHistsResults6th->FillDifferentialFlowEtaRP(e,v6,0.); | |
6042 | fCommonHistsResults8th->FillDifferentialFlowEtaRP(e,v8,0.); | |
6043 | } else if(type == "POI") | |
6044 | { | |
6045 | fCommonHistsResults2nd->FillDifferentialFlowEtaPOI(e,v2,v2Error); | |
6046 | fCommonHistsResults4th->FillDifferentialFlowEtaPOI(e,v4,v4Error); | |
6047 | fCommonHistsResults6th->FillDifferentialFlowEtaPOI(e,v6,0.); | |
6048 | fCommonHistsResults8th->FillDifferentialFlowEtaPOI(e,v8,0.); | |
6049 | } | |
6050 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
6051 | ||
6052 | } // end of void AliFlowAnalysisWithQCumulants::FillCommonHistResultsDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights, Bool_t correctedForNUA) | |
6053 | ||
6054 | ||
6055 | //================================================================================================================================ | |
6056 | ||
6057 | ||
6058 | void AliFlowAnalysisWithQCumulants::AccessConstants() | |
6059 | { | |
6060 | // Access needed common constants from AliFlowCommonConstants | |
6061 | ||
6062 | fnBinsPhi = AliFlowCommonConstants::GetMaster()->GetNbinsPhi(); | |
6063 | fPhiMin = AliFlowCommonConstants::GetMaster()->GetPhiMin(); | |
6064 | fPhiMax = AliFlowCommonConstants::GetMaster()->GetPhiMax(); | |
6065 | if(fnBinsPhi) fPhiBinWidth = (fPhiMax-fPhiMin)/fnBinsPhi; | |
6066 | fnBinsPt = AliFlowCommonConstants::GetMaster()->GetNbinsPt(); | |
6067 | fPtMin = AliFlowCommonConstants::GetMaster()->GetPtMin(); | |
6068 | fPtMax = AliFlowCommonConstants::GetMaster()->GetPtMax(); | |
6069 | if(fnBinsPt) fPtBinWidth = (fPtMax-fPtMin)/fnBinsPt; | |
6070 | fnBinsEta = AliFlowCommonConstants::GetMaster()->GetNbinsEta(); | |
6071 | fEtaMin = AliFlowCommonConstants::GetMaster()->GetEtaMin(); | |
6072 | fEtaMax = AliFlowCommonConstants::GetMaster()->GetEtaMax(); | |
6073 | if(fnBinsEta) fEtaBinWidth = (fEtaMax-fEtaMin)/fnBinsEta; | |
6074 | ||
6075 | } // end of void AliFlowAnalysisWithQCumulants::AccessConstants() | |
6076 | ||
6077 | ||
6078 | //================================================================================================================================ | |
6079 | ||
6080 | ||
6081 | void AliFlowAnalysisWithQCumulants::CrossCheckSettings() | |
6082 | { | |
6083 | // a) Cross check if the choice for multiplicity weights make sense; | |
6084 | ||
6085 | // a) Cross check if the choice for multiplicity weights make sense: | |
6086 | if(strcmp(fMultiplicityWeight->Data(),"combinations") && | |
6087 | strcmp(fMultiplicityWeight->Data(),"unit") && | |
6088 | strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
6089 | { | |
6090 | cout<<"WARNING (QC): Multiplicity weight can be either \"combinations\", \"unit\""<<endl; | |
6091 | cout<<" or \"multiplicity\". Certainly not \""<<fMultiplicityWeight->Data()<<"\"."<<endl; | |
6092 | exit(0); | |
6093 | } | |
6094 | ||
6095 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckSettings() | |
6096 | ||
489d5531 | 6097 | //================================================================================================================================ |
6098 | ||
489d5531 | 6099 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeights() |
6100 | { | |
0328db2d | 6101 | // Calculate sum of linear and quadratic event weights for correlations. |
2001bc3a | 6102 | |
6103 | // multiplicity: | |
6104 | Double_t dMult = (*fSMpk)(0,0); | |
9f33751d | 6105 | |
489d5531 | 6106 | for(Int_t p=0;p<2;p++) // power-1 |
6107 | { | |
6108 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
6109 | { | |
6110 | fIntFlowSumOfEventWeights[p]->Fill(ci+0.5,pow(fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci+1),p+1)); | |
2001bc3a | 6111 | fIntFlowSumOfEventWeightsVsM[ci][p]->Fill(dMult+0.5,pow(fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci+1),p+1)); |
489d5531 | 6112 | } |
6113 | } | |
6114 | ||
6115 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeights() | |
6116 | ||
489d5531 | 6117 | //================================================================================================================================ |
6118 | ||
0328db2d | 6119 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeightsNUA() |
489d5531 | 6120 | { |
0328db2d | 6121 | // Calculate sum of linear and quadratic event weights for NUA terms. |
6122 | ||
6123 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
489d5531 | 6124 | { |
0328db2d | 6125 | for(Int_t p=0;p<2;p++) // power-1 |
6126 | { | |
6127 | for(Int_t ci=0;ci<3;ci++) // nua term index | |
6128 | { | |
6129 | fIntFlowSumOfEventWeightsNUA[sc][p]->Fill(ci+0.5,pow(fIntFlowEventWeightForCorrectionTermsForNUAEBE[sc]->GetBinContent(ci+1),p+1)); | |
489d5531 | 6130 | } |
0328db2d | 6131 | } |
6132 | } | |
6133 | ||
6134 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeightsNUA() | |
489d5531 | 6135 | |
0328db2d | 6136 | //================================================================================================================================ |
6137 | ||
0328db2d | 6138 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfProductOfEventWeights() |
6139 | { | |
ff70ca91 | 6140 | // Calculate sum of product of event weights for correlations. |
2001bc3a | 6141 | |
6142 | // multiplicity: | |
6143 | Double_t dMult = (*fSMpk)(0,0); | |
6144 | ||
489d5531 | 6145 | Int_t counter = 0; |
6146 | ||
6147 | for(Int_t ci1=1;ci1<4;ci1++) | |
6148 | { | |
6149 | for(Int_t ci2=ci1+1;ci2<=4;ci2++) | |
6150 | { | |
ff70ca91 | 6151 | fIntFlowSumOfProductOfEventWeights->Fill(0.5+counter, |
6152 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)* | |
6153 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
2001bc3a | 6154 | fIntFlowSumOfProductOfEventWeightsVsM[counter]->Fill(dMult+0.5, |
ff70ca91 | 6155 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)* |
6156 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
6157 | counter++; | |
489d5531 | 6158 | } |
6159 | } | |
6160 | ||
0328db2d | 6161 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfProductOfEventWeights() |
6162 | ||
0328db2d | 6163 | //================================================================================================================================ |
6164 | ||
0328db2d | 6165 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfProductOfEventWeightsNUA() |
6166 | { | |
6167 | // Calculate sum of product of event weights for NUA terms. | |
6168 | ||
6169 | // w_{<2>} * w_{<cos(#phi)>}: | |
6170 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(0.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6171 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)); | |
6172 | // w_{<2>} * w_{<sin(#phi)>}: | |
6173 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(1.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6174 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
6175 | // w_{<cos(#phi)> * w_{<sin(#phi)>}: | |
6176 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(2.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6177 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
6178 | // w_{<2>} * w{<cos(phi1+phi2)>} | |
6179 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(3.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6180 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
6181 | // w_{<2>} * w{<sin(phi1+phi2)>} | |
6182 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(4.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6183 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6184 | // w_{<2>} * w{<cos(phi1-phi2-phi3)>} | |
6185 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(5.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6186 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6187 | // w_{<2>} * w{<sin(phi1-phi2-phi3)>} | |
6188 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(6.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6189 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6190 | // w_{<4>} * w{<cos(phi1)>} | |
6191 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(7.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6192 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)); | |
6193 | // w_{<4>} * w{<sin(phi1)>} | |
6194 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(8.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6195 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
6196 | // w_{<4>} * w{<cos(phi1+phi2)>} | |
6197 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(9.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6198 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
6199 | // w_{<4>} * w{<sin(phi1+phi2)>} | |
6200 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(10.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6201 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6202 | // w_{<4>} * w{<cos(phi1-phi2-phi3)>} | |
6203 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(11.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6204 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6205 | // w_{<4>} * w{<sin(phi1-phi2-phi3)>} | |
6206 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(12.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6207 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6208 | // w_{<cos(phi1)>} * w{<cos(phi1+phi2)>} | |
6209 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(13.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6210 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
6211 | // w_{<cos(phi1)>} * w{<sin(phi1+phi2)>} | |
6212 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(14.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6213 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6214 | // w_{<cos(phi1)>} * w{<cos(phi1-phi2-phi3)>} | |
6215 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(15.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6216 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6217 | // w_{<cos(phi1)>} * w{<sin(phi1-phi2-phi3)>} | |
6218 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(16.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6219 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6220 | // w_{<sin(phi1)>} * w{<cos(phi1+phi2)>} | |
6221 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(17.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)* | |
6222 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
6223 | // w_{<sin(phi1)>} * w{<sin(phi1+phi2)>} | |
6224 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(18.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)* | |
6225 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6226 | // w_{<sin(phi1)>} * w{<cos(phi1-phi2-phi3)>} | |
6227 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(19.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)* | |
6228 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6229 | // w_{<sin(phi1)>} * w{<sin(phi1-phi2-phi3)>} | |
6230 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(20.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)* | |
6231 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6232 | // w_{<cos(phi1+phi2)>} * w{<sin(phi1+phi2))>} | |
6233 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(21.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)* | |
6234 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6235 | // w_{<cos(phi1+phi2)>} * w{<cos(phi1-phi2-phi3)>} | |
6236 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(22.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)* | |
6237 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6238 | // w_{<cos(phi1+phi2)>} * w{<sin(phi1-phi2-phi3)>} | |
6239 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(23.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)* | |
6240 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6241 | // w_{<sin(phi1+phi2)>} * w{<cos(phi1-phi2-phi3)>} | |
6242 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(24.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)* | |
6243 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6244 | // w_{<sin(phi1+phi2)>} * w{<sin(phi1-phi2-phi3)>} | |
6245 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(25.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)* | |
6246 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6247 | // w_{<cos(phi1-phi2-phi3)>} * w{<sin(phi1-phi2-phi3)>} | |
6248 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(26.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)* | |
6249 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6250 | ||
6251 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowIntFlowSumOfProductOfEventWeightsNUA() | |
489d5531 | 6252 | |
6253 | ||
6254 | //================================================================================================================================ | |
6255 | ||
6256 | ||
6257 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelations(TString type, TString ptOrEta) | |
6258 | { | |
6259 | // calculate reduced correlations for RPs or POIs in pt or eta bins | |
6260 | ||
6261 | // multiplicity: | |
6262 | Double_t dMult = (*fSMpk)(0,0); | |
6263 | ||
6264 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
6265 | Double_t dReQ1n = (*fReQ)(0,0); | |
6266 | Double_t dReQ2n = (*fReQ)(1,0); | |
6267 | //Double_t dReQ3n = (*fReQ)(2,0); | |
6268 | //Double_t dReQ4n = (*fReQ)(3,0); | |
6269 | Double_t dImQ1n = (*fImQ)(0,0); | |
6270 | Double_t dImQ2n = (*fImQ)(1,0); | |
6271 | //Double_t dImQ3n = (*fImQ)(2,0); | |
6272 | //Double_t dImQ4n = (*fImQ)(3,0); | |
6273 | ||
6274 | // reduced correlations are stored in fDiffFlowCorrelationsPro[0=RP,1=POI][0=pt,1=eta][correlation index]. Correlation index runs as follows: | |
6275 | // | |
6276 | // 0: <<2'>> | |
6277 | // 1: <<4'>> | |
6278 | // 2: <<6'>> | |
6279 | // 3: <<8'>> | |
6280 | ||
6281 | Int_t t = -1; // type flag | |
6282 | Int_t pe = -1; // ptEta flag | |
6283 | ||
6284 | if(type == "RP") | |
6285 | { | |
6286 | t = 0; | |
6287 | } else if(type == "POI") | |
6288 | { | |
6289 | t = 1; | |
6290 | } | |
6291 | ||
6292 | if(ptOrEta == "Pt") | |
6293 | { | |
6294 | pe = 0; | |
6295 | } else if(ptOrEta == "Eta") | |
6296 | { | |
6297 | pe = 1; | |
6298 | } | |
6299 | ||
6300 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6301 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6302 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6303 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6304 | ||
6305 | // looping over all bins and calculating reduced correlations: | |
6306 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6307 | { | |
6308 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
6309 | Double_t p1n0kRe = 0.; | |
6310 | Double_t p1n0kIm = 0.; | |
6311 | ||
6312 | // number of POIs in particular pt or eta bin: | |
6313 | Double_t mp = 0.; | |
6314 | ||
6315 | // 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): | |
6316 | Double_t q1n0kRe = 0.; | |
6317 | Double_t q1n0kIm = 0.; | |
6318 | Double_t q2n0kRe = 0.; | |
6319 | Double_t q2n0kIm = 0.; | |
6320 | ||
6321 | // number of particles which are both RPs and POIs in particular pt or eta bin: | |
6322 | Double_t mq = 0.; | |
6323 | ||
6324 | if(type == "POI") | |
6325 | { | |
6326 | // q_{m*n,0}: | |
6327 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
6328 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
6329 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
6330 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
6331 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
6332 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
6333 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
6334 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
6335 | ||
6336 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
6337 | } | |
6338 | else if(type == "RP") | |
6339 | { | |
6340 | // q_{m*n,0}: | |
6341 | q1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
6342 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
6343 | q1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
6344 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
6345 | q2n0kRe = fReRPQ1dEBE[0][pe][1][0]->GetBinContent(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
6346 | * fReRPQ1dEBE[0][pe][1][0]->GetBinEntries(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
6347 | q2n0kIm = fImRPQ1dEBE[0][pe][1][0]->GetBinContent(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
6348 | * fImRPQ1dEBE[0][pe][1][0]->GetBinEntries(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
6349 | ||
6350 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
6351 | } | |
6352 | ||
6353 | if(type == "POI") | |
6354 | { | |
6355 | // p_{m*n,0}: | |
6356 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
6357 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
6358 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
6359 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
6360 | ||
6361 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
6362 | ||
6363 | t = 1; // typeFlag = RP or POI | |
6364 | } | |
6365 | else if(type == "RP") | |
6366 | { | |
6367 | // p_{m*n,0} = q_{m*n,0}: | |
6368 | p1n0kRe = q1n0kRe; | |
6369 | p1n0kIm = q1n0kIm; | |
6370 | ||
6371 | mp = mq; | |
6372 | ||
6373 | t = 0; // typeFlag = RP or POI | |
6374 | } | |
6375 | ||
6376 | // 2'-particle correlation for particular (pt,eta) bin: | |
6377 | Double_t two1n1nPtEta = 0.; | |
6378 | if(mp*dMult-mq) | |
6379 | { | |
6380 | two1n1nPtEta = (p1n0kRe*dReQ1n+p1n0kIm*dImQ1n-mq) | |
6381 | / (mp*dMult-mq); | |
6382 | ||
6383 | if(type == "POI") // to be improved (I do not this if) | |
6384 | { | |
6385 | // fill profile to get <<2'>> for POIs | |
6386 | fDiffFlowCorrelationsPro[1][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nPtEta,mp*dMult-mq); | |
6387 | // histogram to store <2'> for POIs e-b-e (needed in some other methods): | |
6388 | fDiffFlowCorrelationsEBE[1][pe][0]->SetBinContent(b,two1n1nPtEta); | |
6389 | fDiffFlowEventWeightsForCorrelationsEBE[1][pe][0]->SetBinContent(b,mp*dMult-mq); | |
6390 | } | |
6391 | else if(type == "RP") // to be improved (I do not this if) | |
6392 | { | |
6393 | // profile to get <<2'>> for RPs: | |
6394 | fDiffFlowCorrelationsPro[0][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nPtEta,mp*dMult-mq); | |
6395 | // histogram to store <2'> for RPs e-b-e (needed in some other methods): | |
6396 | fDiffFlowCorrelationsEBE[0][pe][0]->SetBinContent(b,two1n1nPtEta); | |
6397 | fDiffFlowEventWeightsForCorrelationsEBE[0][pe][0]->SetBinContent(b,mp*dMult-mq); | |
6398 | } | |
6399 | } // end of if(mp*dMult-mq) | |
6400 | ||
6401 | // 4'-particle correlation: | |
6402 | Double_t four1n1n1n1nPtEta = 0.; | |
6403 | if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6404 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) // to be improved (introduce a new variable for this expression) | |
6405 | { | |
6406 | four1n1n1n1nPtEta = ((pow(dReQ1n,2.)+pow(dImQ1n,2.))*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
6407 | - q2n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) | |
6408 | - 2.*q2n0kIm*dReQ1n*dImQ1n | |
6409 | - p1n0kRe*(dReQ1n*dReQ2n+dImQ1n*dImQ2n) | |
6410 | + p1n0kIm*(dImQ1n*dReQ2n-dReQ1n*dImQ2n) | |
6411 | - 2.*dMult*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
6412 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*mq | |
6413 | + 6.*(q1n0kRe*dReQ1n+q1n0kIm*dImQ1n) | |
6414 | + 1.*(q2n0kRe*dReQ2n+q2n0kIm*dImQ2n) | |
6415 | + 2.*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
6416 | + 2.*mq*dMult | |
6417 | - 6.*mq) | |
6418 | / ((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6419 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6420 | ||
6421 | if(type == "POI") | |
6422 | { | |
6423 | // profile to get <<4'>> for POIs: | |
6424 | fDiffFlowCorrelationsPro[1][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nPtEta, | |
6425 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6426 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6427 | // histogram to store <4'> for POIs e-b-e (needed in some other methods): | |
6428 | fDiffFlowCorrelationsEBE[1][pe][1]->SetBinContent(b,four1n1n1n1nPtEta); | |
6429 | fDiffFlowEventWeightsForCorrelationsEBE[1][pe][1]->SetBinContent(b,(mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6430 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6431 | } | |
6432 | else if(type == "RP") | |
6433 | { | |
6434 | // profile to get <<4'>> for RPs: | |
6435 | fDiffFlowCorrelationsPro[0][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nPtEta, | |
6436 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6437 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6438 | // histogram to store <4'> for RPs e-b-e (needed in some other methods): | |
6439 | fDiffFlowCorrelationsEBE[0][pe][1]->SetBinContent(b,four1n1n1n1nPtEta); | |
6440 | fDiffFlowEventWeightsForCorrelationsEBE[0][pe][1]->SetBinContent(b,(mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6441 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6442 | } | |
6443 | } // end of if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6444 | // +mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
6445 | ||
6446 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6447 | ||
6448 | ||
6449 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelations(TString type, TString ptOrEta); | |
6450 | ||
6451 | ||
6452 | //================================================================================================================================ | |
6453 | ||
6454 | ||
6455 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfEventWeights(TString type, TString ptOrEta) | |
6456 | { | |
6457 | // Calculate sums of various event weights for reduced correlations. | |
6458 | // (These quantitites are needed in expressions for unbiased estimators relevant for the statistical errors.) | |
6459 | ||
6460 | Int_t typeFlag = -1; | |
6461 | Int_t ptEtaFlag = -1; | |
6462 | ||
6463 | if(type == "RP") | |
6464 | { | |
6465 | typeFlag = 0; | |
6466 | } else if(type == "POI") | |
6467 | { | |
6468 | typeFlag = 1; | |
6469 | } | |
6470 | ||
6471 | if(ptOrEta == "Pt") | |
6472 | { | |
6473 | ptEtaFlag = 0; | |
6474 | } else if(ptOrEta == "Eta") | |
6475 | { | |
6476 | ptEtaFlag = 1; | |
6477 | } | |
6478 | ||
6479 | // shortcuts: | |
6480 | Int_t t = typeFlag; | |
6481 | Int_t pe = ptEtaFlag; | |
6482 | ||
6483 | // binning: | |
6484 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6485 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6486 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6487 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6488 | ||
6489 | for(Int_t rpq=0;rpq<3;rpq++) | |
6490 | { | |
6491 | for(Int_t m=0;m<4;m++) | |
6492 | { | |
6493 | for(Int_t k=0;k<9;k++) | |
6494 | { | |
6495 | if(!fReRPQ1dEBE[rpq][pe][m][k]) | |
6496 | { | |
6497 | cout<<"WARNING: fReRPQ1dEBE[rpq][pe][m][k] is NULL in AFAWQC::CSAPOEWFDF() !!!!"<<endl; | |
6498 | cout<<"pe = "<<pe<<endl; | |
6499 | cout<<"rpq = "<<rpq<<endl; | |
6500 | cout<<"m = "<<m<<endl; | |
6501 | cout<<"k = "<<k<<endl; | |
6502 | exit(0); | |
6503 | } | |
6504 | } | |
6505 | } | |
6506 | } | |
6507 | ||
6508 | // multiplicities: | |
6509 | Double_t dMult = (*fSMpk)(0,0); // total event multiplicity | |
6510 | //Double_t mr = 0.; // number of RPs in particular pt or eta bin | |
6511 | Double_t mp = 0.; // number of POIs in particular pt or eta bin | |
6512 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin | |
6513 | ||
6514 | // event weights for reduced correlations: | |
6515 | Double_t dw2 = 0.; // event weight for <2'> | |
6516 | Double_t dw4 = 0.; // event weight for <4'> | |
6517 | //Double_t dw6 = 0.; // event weight for <6'> | |
6518 | //Double_t dw8 = 0.; // event weight for <8'> | |
6519 | ||
6520 | // looping over bins: | |
6521 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6522 | { | |
6523 | if(type == "RP") | |
6524 | { | |
6525 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b); | |
6526 | mp = mq; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow | |
6527 | } else if(type == "POI") | |
6528 | { | |
6529 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b); | |
6530 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); | |
6531 | } | |
6532 | ||
6533 | // event weight for <2'>: | |
6534 | dw2 = mp*dMult-mq; | |
6535 | fDiffFlowSumOfEventWeights[t][pe][0][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2); | |
6536 | fDiffFlowSumOfEventWeights[t][pe][1][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw2,2.)); | |
6537 | ||
6538 | // event weight for <4'>: | |
6539 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6540 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); | |
6541 | fDiffFlowSumOfEventWeights[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4); | |
6542 | fDiffFlowSumOfEventWeights[t][pe][1][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw4,2.)); | |
6543 | ||
6544 | // event weight for <6'>: | |
6545 | //dw6 = ...; | |
6546 | //fDiffFlowSumOfEventWeights[t][pe][0][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6); | |
6547 | //fDiffFlowSumOfEventWeights[t][pe][t][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw6,2.)); | |
6548 | ||
6549 | // event weight for <8'>: | |
6550 | //dw8 = ...; | |
6551 | //fDiffFlowSumOfEventWeights[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw8); | |
6552 | //fDiffFlowSumOfEventWeights[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw8,2.)); | |
6553 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6554 | ||
6555 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfEventWeights() | |
6556 | ||
6557 | ||
6558 | //================================================================================================================================ | |
6559 | ||
6560 | ||
6561 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta) | |
6562 | { | |
6563 | // Calculate sum of products of various event weights for both types of correlations (the ones for int. and diff. flow). | |
6564 | // (These quantitites are needed in expressions for unbiased estimators relevant for the statistical errors.) | |
6565 | // | |
6566 | // Important: To fill fDiffFlowSumOfProductOfEventWeights[][][][] use bellow table (i,j) with following constraints: | |
6567 | // 1.) i<j | |
6568 | // 2.) do not store terms which DO NOT include reduced correlations; | |
6569 | // Table: | |
6570 | // [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'>] | |
6571 | ||
6572 | Int_t typeFlag = -1; | |
6573 | Int_t ptEtaFlag = -1; | |
6574 | ||
6575 | if(type == "RP") | |
6576 | { | |
6577 | typeFlag = 0; | |
6578 | } else if(type == "POI") | |
6579 | { | |
6580 | typeFlag = 1; | |
6581 | } | |
6582 | ||
6583 | if(ptOrEta == "Pt") | |
6584 | { | |
6585 | ptEtaFlag = 0; | |
6586 | } else if(ptOrEta == "Eta") | |
6587 | { | |
6588 | ptEtaFlag = 1; | |
6589 | } | |
6590 | ||
6591 | // shortcuts: | |
6592 | Int_t t = typeFlag; | |
6593 | Int_t pe = ptEtaFlag; | |
6594 | ||
6595 | // binning: | |
6596 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6597 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6598 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6599 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6600 | ||
6601 | // protection: | |
6602 | for(Int_t rpq=0;rpq<3;rpq++) | |
6603 | { | |
6604 | for(Int_t m=0;m<4;m++) | |
6605 | { | |
6606 | for(Int_t k=0;k<9;k++) | |
6607 | { | |
6608 | if(!fReRPQ1dEBE[rpq][pe][m][k]) | |
6609 | { | |
6610 | cout<<"WARNING: fReRPQ1dEBE[rpq][pe][m][k] is NULL in AFAWQC::CSAPOEWFDF() !!!!"<<endl; | |
6611 | cout<<"pe = "<<pe<<endl; | |
6612 | cout<<"rpq = "<<rpq<<endl; | |
6613 | cout<<"m = "<<m<<endl; | |
6614 | cout<<"k = "<<k<<endl; | |
6615 | exit(0); | |
6616 | } | |
6617 | } | |
6618 | } | |
6619 | } | |
6620 | ||
6621 | // multiplicities: | |
6622 | Double_t dMult = (*fSMpk)(0,0); // total event multiplicity | |
6623 | //Double_t mr = 0.; // number of RPs in particular pt or eta bin | |
6624 | Double_t mp = 0.; // number of POIs in particular pt or eta bin | |
6625 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin | |
6626 | ||
6627 | // event weights for correlations: | |
6628 | Double_t dW2 = dMult*(dMult-1); // event weight for <2> | |
6629 | Double_t dW4 = dMult*(dMult-1)*(dMult-2)*(dMult-3); // event weight for <4> | |
6630 | Double_t dW6 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5); // event weight for <6> | |
6631 | Double_t dW8 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7); // event weight for <8> | |
6632 | ||
6633 | // event weights for reduced correlations: | |
6634 | Double_t dw2 = 0.; // event weight for <2'> | |
6635 | Double_t dw4 = 0.; // event weight for <4'> | |
6636 | //Double_t dw6 = 0.; // event weight for <6'> | |
6637 | //Double_t dw8 = 0.; // event weight for <8'> | |
6638 | ||
6639 | // looping over bins: | |
6640 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6641 | { | |
6642 | if(type == "RP") | |
6643 | { | |
6644 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b); | |
6645 | mp = mq; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow | |
6646 | } else if(type == "POI") | |
6647 | { | |
6648 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b); | |
6649 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); | |
6650 | } | |
6651 | ||
6652 | // event weight for <2'>: | |
6653 | dw2 = mp*dMult-mq; | |
6654 | fDiffFlowSumOfProductOfEventWeights[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw2); // storing product of even weights for <2> and <2'> | |
6655 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW4); // storing product of even weights for <4> and <2'> | |
6656 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW6); // storing product of even weights for <6> and <2'> | |
6657 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW8); // storing product of even weights for <8> and <2'> | |
6658 | ||
6659 | // event weight for <4'>: | |
6660 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6661 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); | |
6662 | fDiffFlowSumOfProductOfEventWeights[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw4); // storing product of even weights for <2> and <4'> | |
6663 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw4); // storing product of even weights for <2'> and <4'> | |
6664 | fDiffFlowSumOfProductOfEventWeights[t][pe][2][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw4); // storing product of even weights for <4> and <4'> | |
6665 | fDiffFlowSumOfProductOfEventWeights[t][pe][3][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dW6); // storing product of even weights for <6> and <4'> | |
6666 | fDiffFlowSumOfProductOfEventWeights[t][pe][3][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dW8); // storing product of even weights for <8> and <4'> | |
6667 | ||
6668 | // event weight for <6'>: | |
6669 | //dw6 = ...; | |
6670 | //fDiffFlowSumOfProductOfEventWeights[t][pe][0][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw6); // storing product of even weights for <2> and <6'> | |
6671 | //fDiffFlowSumOfProductOfEventWeights[t][pe][1][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw6); // storing product of even weights for <2'> and <6'> | |
6672 | //fDiffFlowSumOfProductOfEventWeights[t][pe][2][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw6); // storing product of even weights for <4> and <6'> | |
6673 | //fDiffFlowSumOfProductOfEventWeights[t][pe][3][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dw6); // storing product of even weights for <4'> and <6'> | |
6674 | //fDiffFlowSumOfProductOfEventWeights[t][pe][4][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW6*dw6); // storing product of even weights for <6> and <6'> | |
6675 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dW8); // storing product of even weights for <6'> and <8> | |
6676 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dw8); // storing product of even weights for <6'> and <8'> | |
6677 | ||
6678 | // event weight for <8'>: | |
6679 | //dw8 = ...; | |
6680 | //fDiffFlowSumOfProductOfEventWeights[t][pe][0][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw8); // storing product of even weights for <2> and <8'> | |
6681 | //fDiffFlowSumOfProductOfEventWeights[t][pe][1][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw8); // storing product of even weights for <2'> and <8'> | |
6682 | //fDiffFlowSumOfProductOfEventWeights[t][pe][2][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw8); // storing product of even weights for <4> and <8'> | |
6683 | //fDiffFlowSumOfProductOfEventWeights[t][pe][3][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dw8); // storing product of even weights for <4'> and <8'> | |
6684 | //fDiffFlowSumOfProductOfEventWeights[t][pe][4][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW6*dw8); // storing product of even weights for <6> and <8'> | |
6685 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dw8); // storing product of even weights for <6'> and <8'> | |
6686 | //fDiffFlowSumOfProductOfEventWeights[t][pe][6][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW8*dw8); // storing product of even weights for <8> and <8'> | |
6687 | ||
6688 | // Table: | |
6689 | // [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'>] | |
6690 | ||
6691 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6692 | ||
6693 | ||
6694 | ||
6695 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta) | |
6696 | ||
6697 | ||
6698 | //================================================================================================================================ | |
6699 | ||
6700 | ||
6701 | void AliFlowAnalysisWithQCumulants::FinalizeReducedCorrelations(TString type, TString ptOrEta) | |
6702 | { | |
6703 | // Transfer profiles into histograms and calculate statistical errors correctly. | |
6704 | ||
6705 | Int_t typeFlag = -1; | |
6706 | Int_t ptEtaFlag = -1; | |
6707 | ||
6708 | if(type == "RP") | |
6709 | { | |
6710 | typeFlag = 0; | |
6711 | } else if(type == "POI") | |
6712 | { | |
6713 | typeFlag = 1; | |
6714 | } | |
6715 | ||
6716 | if(ptOrEta == "Pt") | |
6717 | { | |
6718 | ptEtaFlag = 0; | |
6719 | } else if(ptOrEta == "Eta") | |
6720 | { | |
6721 | ptEtaFlag = 1; | |
6722 | } | |
6723 | ||
6724 | // shortcuts: | |
6725 | Int_t t = typeFlag; | |
6726 | Int_t pe = ptEtaFlag; | |
6727 | ||
6728 | for(Int_t rci=0;rci<4;rci++) | |
6729 | { | |
6730 | if(!fDiffFlowCorrelationsPro[t][pe][rci]) | |
6731 | { | |
6732 | cout<<"WARNING: fDiffFlowCorrelationsPro[t][pe][rci] is NULL in AFAWQC::FRC() !!!!"<<endl; | |
6733 | cout<<"t = "<<t<<endl; | |
6734 | cout<<"pe = "<<pe<<endl; | |
6735 | cout<<"rci = "<<rci<<endl; | |
6736 | exit(0); | |
6737 | } | |
6738 | for(Int_t power=0;power<2;power++) | |
6739 | { | |
6740 | if(!fDiffFlowSumOfEventWeights[t][pe][power][rci]) | |
6741 | { | |
6742 | cout<<"WARNING: fDiffFlowSumOfEventWeights[t][pe][power][rci] is NULL in AFAWQC::FRC() !!!!"<<endl; | |
6743 | cout<<"t = "<<t<<endl; | |
6744 | cout<<"pe = "<<pe<<endl; | |
6745 | cout<<"power = "<<power<<endl; | |
6746 | cout<<"rci = "<<rci<<endl; | |
6747 | exit(0); | |
6748 | } | |
6749 | } // end of for(Int_t power=0;power<2;power++) | |
6750 | } // end of for(Int_t rci=0;rci<4;rci++) | |
6751 | ||
6752 | // common: | |
6753 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6754 | ||
6755 | // transfer 1D profile into 1D histogram: | |
6756 | Double_t correlation = 0.; | |
6757 | Double_t spread = 0.; | |
6758 | Double_t sumOfWeights = 0.; // sum of weights for particular reduced correlations for particular pt or eta bin | |
6759 | Double_t sumOfSquaredWeights = 0.; // sum of squared weights for particular reduced correlations for particular pt or eta bin | |
6760 | Double_t error = 0.; // error = termA * spread * termB | |
6761 | // termA = (sqrt(sumOfSquaredWeights)/sumOfWeights) | |
6762 | // termB = 1/pow(1-termA^2,0.5) | |
6763 | Double_t termA = 0.; | |
6764 | Double_t termB = 0.; | |
6765 | for(Int_t rci=0;rci<4;rci++) // index of reduced correlation | |
6766 | { | |
6767 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) // number of pt or eta bins | |
6768 | { | |
6769 | correlation = fDiffFlowCorrelationsPro[t][pe][rci]->GetBinContent(b); | |
6770 | spread = fDiffFlowCorrelationsPro[t][pe][rci]->GetBinError(b); | |
6771 | sumOfWeights = fDiffFlowSumOfEventWeights[t][pe][0][rci]->GetBinContent(b); | |
6772 | sumOfSquaredWeights = fDiffFlowSumOfEventWeights[t][pe][1][rci]->GetBinContent(b); | |
6773 | if(sumOfWeights) termA = (pow(sumOfSquaredWeights,0.5)/sumOfWeights); | |
6774 | if(1.-pow(termA,2.)>0.) termB = 1./pow(1.-pow(termA,2.),0.5); | |
6775 | error = termA*spread*termB; // final error (unbiased estimator for standard deviation) | |
6776 | fDiffFlowCorrelationsHist[t][pe][rci]->SetBinContent(b,correlation); | |
6777 | fDiffFlowCorrelationsHist[t][pe][rci]->SetBinError(b,error); | |
6778 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6779 | } // end of for(Int_t rci=0;rci<4;rci++) | |
6780 | ||
6781 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeReducedCorrelations(TString type, TString ptOrEta) | |
6782 | ||
6783 | ||
6784 | //================================================================================================================================ | |
6785 | ||
6786 | ||
6787 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta) | |
6788 | { | |
6789 | // store products: <2><2'>, <2><4'>, <2><6'>, <2><8'>, <2'><4>, | |
6790 | // <2'><4'>, <2'><6>, <2'><6'>, <2'><8>, <2'><8'>, | |
6791 | // <4><4'>, <4><6'>, <4><8'>, <4'><6>, <4'><6'>, | |
6792 | // <4'><8>, <4'><8'>, <6><6'>, <6><8'>, <6'><8>, | |
6793 | // <6'><8'>, <8><8'>. | |
6794 | ||
6795 | Int_t typeFlag = -1; | |
6796 | Int_t ptEtaFlag = -1; | |
6797 | ||
6798 | if(type == "RP") | |
6799 | { | |
6800 | typeFlag = 0; | |
6801 | } else if(type == "POI") | |
6802 | { | |
6803 | typeFlag = 1; | |
6804 | } | |
6805 | ||
6806 | if(ptOrEta == "Pt") | |
6807 | { | |
6808 | ptEtaFlag = 0; | |
6809 | } else if(ptOrEta == "Eta") | |
6810 | { | |
6811 | ptEtaFlag = 1; | |
6812 | } | |
6813 | ||
6814 | // shortcuts: | |
6815 | Int_t t = typeFlag; | |
6816 | Int_t pe = ptEtaFlag; | |
6817 | ||
6818 | // common: | |
6819 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6820 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6821 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6822 | ||
6823 | // protections // to be improved (add protection for all pointers in this method) | |
6824 | if(!fIntFlowCorrelationsEBE) | |
6825 | { | |
6826 | cout<<"WARNING: fIntFlowCorrelationsEBE is NULL in AFAWQC::CDFPOC() !!!!"<<endl; | |
6827 | exit(0); | |
6828 | } | |
6829 | ||
6830 | /* | |
6831 | Double_t dMult = (*fSMpk)(0,0); // multiplicity (number of particles used to determine the reaction plane) | |
6832 | //Double_t mr = 0.; // number of RPs in particular pt or eta bin | |
6833 | Double_t mp = 0.; // number of POIs in particular pt or eta bin | |
6834 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin | |
6835 | */ | |
6836 | ||
6837 | // e-b-e correlations: | |
6838 | Double_t twoEBE = fIntFlowCorrelationsEBE->GetBinContent(1); // <2> | |
6839 | Double_t fourEBE = fIntFlowCorrelationsEBE->GetBinContent(2); // <4> | |
6840 | Double_t sixEBE = fIntFlowCorrelationsEBE->GetBinContent(3); // <6> | |
6841 | Double_t eightEBE = fIntFlowCorrelationsEBE->GetBinContent(4); // <8> | |
6842 | ||
6843 | // event weights for correlations: | |
6844 | Double_t dW2 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1); // event weight for <2> | |
6845 | Double_t dW4 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2); // event weight for <4> | |
6846 | Double_t dW6 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(3); // event weight for <6> | |
6847 | Double_t dW8 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(4); // event weight for <8> | |
6848 | ||
6849 | // e-b-e reduced correlations: | |
6850 | Double_t twoReducedEBE = 0.; // <2'> | |
6851 | Double_t fourReducedEBE = 0.; // <4'> | |
6852 | Double_t sixReducedEBE = 0.; // <6'> | |
6853 | Double_t eightReducedEBE = 0.; // <8'> | |
6854 | ||
6855 | // event weights for reduced correlations: | |
6856 | Double_t dw2 = 0.; // event weight for <2'> | |
6857 | Double_t dw4 = 0.; // event weight for <4'> | |
6858 | //Double_t dw6 = 0.; // event weight for <6'> | |
6859 | //Double_t dw8 = 0.; // event weight for <8'> | |
6860 | ||
6861 | // looping over bins: | |
6862 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6863 | { | |
6864 | // e-b-e reduced correlations: | |
6865 | twoReducedEBE = fDiffFlowCorrelationsEBE[t][pe][0]->GetBinContent(b); | |
6866 | fourReducedEBE = fDiffFlowCorrelationsEBE[t][pe][1]->GetBinContent(b); | |
6867 | sixReducedEBE = fDiffFlowCorrelationsEBE[t][pe][2]->GetBinContent(b); | |
6868 | eightReducedEBE = fDiffFlowCorrelationsEBE[t][pe][3]->GetBinContent(b); | |
6869 | ||
6870 | /* | |
6871 | // to be improved (I should not do this here again) | |
6872 | if(type == "RP") | |
6873 | { | |
6874 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b); | |
6875 | mp = mq; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow | |
6876 | } else if(type == "POI") | |
6877 | { | |
6878 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b); | |
6879 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); | |
6880 | } | |
6881 | ||
6882 | // event weights for reduced correlations: | |
6883 | dw2 = mp*dMult-mq; // weight for <2'> | |
6884 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6885 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); // weight for <4'> | |
6886 | //dw6 = ... | |
6887 | //dw8 = ... | |
6888 | ||
6889 | */ | |
6890 | ||
6891 | dw2 = fDiffFlowEventWeightsForCorrelationsEBE[t][pe][0]->GetBinContent(b); | |
6892 | dw4 = fDiffFlowEventWeightsForCorrelationsEBE[t][pe][1]->GetBinContent(b); | |
6893 | ||
6894 | // storing all products: | |
6895 | fDiffFlowProductOfCorrelationsPro[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*twoReducedEBE,dW2*dw2); // storing <2><2'> | |
6896 | fDiffFlowProductOfCorrelationsPro[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*twoReducedEBE,dW4*dw2); // storing <4><2'> | |
6897 | fDiffFlowProductOfCorrelationsPro[t][pe][1][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*twoReducedEBE,dW6*dw2); // storing <6><2'> | |
6898 | fDiffFlowProductOfCorrelationsPro[t][pe][1][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*twoReducedEBE,dW8*dw2); // storing <8><2'> | |
6899 | ||
6900 | // event weight for <4'>: | |
6901 | fDiffFlowProductOfCorrelationsPro[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*fourReducedEBE,dW2*dw4); // storing <2><4'> | |
6902 | fDiffFlowProductOfCorrelationsPro[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*fourReducedEBE,dw2*dw4); // storing <2'><4'> | |
6903 | fDiffFlowProductOfCorrelationsPro[t][pe][2][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*fourReducedEBE,dW4*dw4); // storing <4><4'> | |
6904 | fDiffFlowProductOfCorrelationsPro[t][pe][3][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*fourReducedEBE,dW6*dw4); // storing <6><4'> | |
6905 | fDiffFlowProductOfCorrelationsPro[t][pe][3][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*fourReducedEBE,dW8*dw4); // storing <8><4'> | |
6906 | ||
6907 | // event weight for <6'>: | |
6908 | //dw6 = ...; | |
6909 | //fDiffFlowProductOfCorrelationsPro[t][pe][0][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*sixReducedEBE,dW2*dw6); // storing <2><6'> | |
6910 | //fDiffFlowProductOfCorrelationsPro[t][pe][1][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*sixReducedEBE,dw2*dw6); // storing <2'><6'> | |
6911 | //fDiffFlowProductOfCorrelationsPro[t][pe][2][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*sixReducedEBE,dW4*dw6); // storing <4><6'> | |
6912 | //fDiffFlowProductOfCorrelationsPro[t][pe][3][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourReducedEBE*sixReducedEBE,dw4*dw6); // storing <4'><6'> | |
6913 | //fDiffFlowProductOfCorrelationsPro[t][pe][4][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*sixReducedEBE,dW6*dw6); // storing <6><6'> | |
6914 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightEBE,dw6*dW8); // storing <6'><8> | |
6915 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightReducedEBE,dw6*dw8); // storing <6'><8'> | |
6916 | ||
6917 | // event weight for <8'>: | |
6918 | //dw8 = ...; | |
6919 | //fDiffFlowProductOfCorrelationsPro[t][pe][0][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*eightReducedEBE,dW2*dw8); // storing <2><8'> | |
6920 | //fDiffFlowProductOfCorrelationsPro[t][pe][1][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*eightReducedEBE,dw2*dw8); // storing <2'><8'> | |
6921 | //fDiffFlowProductOfCorrelationsPro[t][pe][2][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*eightReducedEBE,dW4*dw8); // storing <4><8'> | |
6922 | //fDiffFlowProductOfCorrelationsPro[t][pe][3][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourReducedEBE*eightReducedEBE,dw4*dw8); // storing <4'><8'> | |
6923 | //fDiffFlowProductOfCorrelationsPro[t][pe][4][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*eightReducedEBE,dW6*dw8); // storing <6><8'> | |
6924 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightReducedEBE,dw6*dw8); // storing <6'><8'> | |
6925 | //fDiffFlowProductOfCorrelationsPro[t][pe][6][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*eightReducedEBE,dW8*dw8); // storing <8><8'> | |
6926 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++ | |
6927 | ||
6928 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta) | |
6929 | ||
6930 | ||
6931 | //================================================================================================================================ | |
6932 | ||
6933 | ||
6934 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCovariances(TString type, TString ptOrEta) // to be improved (reimplemented) | |
6935 | { | |
6936 | // a) Calculate unbiased estimators Cov(<2>,<2'>), Cov(<2>,<4'>), Cov(<4>,<2'>), Cov(<4>,<4'>) and Cov(<2'>,<4'>) | |
6937 | // for covariances V(<2>,<2'>), V(<2>,<4'>), V(<4>,<2'>), V(<4>,<4'>) and V(<2'>,<4'>). | |
6938 | // b) Store in histogram fDiffFlowCovariances[t][pe][index] for instance the following: | |
6939 | // | |
6940 | // 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)] | |
6941 | // | |
6942 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<2'>} is event weight for <2'>. | |
6943 | // c) Binning of fDiffFlowCovariances[t][pe][index] is organized as follows: | |
6944 | // | |
6945 | // 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)] | |
6946 | // 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)] | |
6947 | // 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)] | |
6948 | // 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)] | |
6949 | // 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)] | |
6950 | // ... | |
6951 | ||
6952 | Int_t typeFlag = -1; | |
6953 | Int_t ptEtaFlag = -1; | |
6954 | ||
6955 | if(type == "RP") | |
6956 | { | |
6957 | typeFlag = 0; | |
6958 | } else if(type == "POI") | |
6959 | { | |
6960 | typeFlag = 1; | |
6961 | } | |
6962 | ||
6963 | if(ptOrEta == "Pt") | |
6964 | { | |
6965 | ptEtaFlag = 0; | |
6966 | } else if(ptOrEta == "Eta") | |
6967 | { | |
6968 | ptEtaFlag = 1; | |
6969 | } | |
6970 | ||
6971 | // shortcuts: | |
6972 | Int_t t = typeFlag; | |
6973 | Int_t pe = ptEtaFlag; | |
6974 | ||
6975 | // common: | |
6976 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6977 | //Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6978 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6979 | //Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6980 | ||
6981 | // average correlations: | |
6982 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
6983 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
6984 | //Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
6985 | //Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
6986 | ||
6987 | // sum of weights for correlation: | |
6988 | Double_t sumOfWeightsForTwo = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // sum_{i=1}^{N} w_{<2>} | |
6989 | Double_t sumOfWeightsForFour = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // sum_{i=1}^{N} w_{<4>} | |
6990 | //Double_t sumOfWeightsForSix = fIntFlowSumOfEventWeights[0]->GetBinContent(3); // sum_{i=1}^{N} w_{<6>} | |
6991 | //Double_t sumOfWeightsForEight = fIntFlowSumOfEventWeights[0]->GetBinContent(4); // sum_{i=1}^{N} w_{<8>} | |
6992 | ||
6993 | // average reduced correlations: | |
6994 | Double_t twoReduced = 0.; // <<2'>> | |
6995 | Double_t fourReduced = 0.; // <<4'>> | |
6996 | //Double_t sixReduced = 0.; // <<6'>> | |
6997 | //Double_t eightReduced = 0.; // <<8'>> | |
6998 | ||
6999 | // sum of weights for reduced correlation: | |
7000 | Double_t sumOfWeightsForTwoReduced = 0.; // sum_{i=1}^{N} w_{<2'>} | |
7001 | Double_t sumOfWeightsForFourReduced = 0.; // sum_{i=1}^{N} w_{<4'>} | |
7002 | //Double_t sumOfWeightsForSixReduced = 0.; // sum_{i=1}^{N} w_{<6'>} | |
7003 | //Double_t sumOfWeightsForEightReduced = 0.; // sum_{i=1}^{N} w_{<8'>} | |
7004 | ||
7005 | // product of weights for reduced correlation: | |
7006 | Double_t productOfWeightsForTwoTwoReduced = 0.; // sum_{i=1}^{N} w_{<2>}w_{<2'>} | |
7007 | Double_t productOfWeightsForTwoFourReduced = 0.; // sum_{i=1}^{N} w_{<2>}w_{<4'>} | |
7008 | Double_t productOfWeightsForFourTwoReduced = 0.; // sum_{i=1}^{N} w_{<4>}w_{<2'>} | |
7009 | Double_t productOfWeightsForFourFourReduced = 0.; // sum_{i=1}^{N} w_{<4>}w_{<4'>} | |
7010 | Double_t productOfWeightsForTwoReducedFourReduced = 0.; // sum_{i=1}^{N} w_{<2'>}w_{<4'>} | |
7011 | // ... | |
7012 | ||
7013 | // products for differential flow: | |
7014 | Double_t twoTwoReduced = 0; // <<2><2'>> | |
7015 | Double_t twoFourReduced = 0; // <<2><4'>> | |
7016 | Double_t fourTwoReduced = 0; // <<4><2'>> | |
7017 | Double_t fourFourReduced = 0; // <<4><4'>> | |
7018 | Double_t twoReducedFourReduced = 0; // <<2'><4'>> | |
7019 | ||
7020 | // denominators in the expressions for the unbiased estimators for covariances: | |
7021 | // denominator = 1 - term1/(term2*term3) | |
7022 | // prefactor = term1/(term2*term3) | |
7023 | Double_t denominator = 0.; | |
7024 | Double_t prefactor = 0.; | |
7025 | Double_t term1 = 0.; | |
7026 | Double_t term2 = 0.; | |
7027 | Double_t term3 = 0.; | |
7028 | ||
7029 | // unbiased estimators for covariances for differential flow: | |
7030 | Double_t covTwoTwoReduced = 0.; // Cov(<2>,<2'>) | |
7031 | Double_t wCovTwoTwoReduced = 0.; // Cov(<2>,<2'>) * prefactor(w_{<2>},w_{<2'>}) | |
7032 | Double_t covTwoFourReduced = 0.; // Cov(<2>,<4'>) | |
7033 | Double_t wCovTwoFourReduced = 0.; // Cov(<2>,<4'>) * prefactor(w_{<2>},w_{<4'>}) | |
7034 | Double_t covFourTwoReduced = 0.; // Cov(<4>,<2'>) | |
7035 | Double_t wCovFourTwoReduced = 0.; // Cov(<4>,<2'>) * prefactor(w_{<4>},w_{<2'>}) | |
7036 | Double_t covFourFourReduced = 0.; // Cov(<4>,<4'>) | |
7037 | Double_t wCovFourFourReduced = 0.; // Cov(<4>,<4'>) * prefactor(w_{<4>},w_{<4'>}) | |
7038 | Double_t covTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) | |
7039 | Double_t wCovTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) * prefactor(w_{<2'>},w_{<4'>}) | |
7040 | ||
7041 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7042 | { | |
7043 | // average reduced corelations: | |
7044 | twoReduced = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); | |
7045 | fourReduced = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); | |
7046 | // average products: | |
7047 | twoTwoReduced = fDiffFlowProductOfCorrelationsPro[t][pe][0][1]->GetBinContent(b); | |
7048 | twoFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][0][3]->GetBinContent(b); | |
7049 | fourTwoReduced = fDiffFlowProductOfCorrelationsPro[t][pe][1][2]->GetBinContent(b); | |
7050 | fourFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][2][3]->GetBinContent(b); | |
7051 | twoReducedFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][1][3]->GetBinContent(b); | |
7052 | // sum of weights for reduced correlations: | |
7053 | sumOfWeightsForTwoReduced = fDiffFlowSumOfEventWeights[t][pe][0][0]->GetBinContent(b); | |
7054 | sumOfWeightsForFourReduced = fDiffFlowSumOfEventWeights[t][pe][0][1]->GetBinContent(b); | |
7055 | // products of weights for correlations: | |
7056 | productOfWeightsForTwoTwoReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][0][1]->GetBinContent(b); | |
7057 | productOfWeightsForTwoFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][0][3]->GetBinContent(b); | |
7058 | productOfWeightsForFourTwoReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][1][2]->GetBinContent(b); | |
7059 | productOfWeightsForFourFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][2][3]->GetBinContent(b); | |
7060 | productOfWeightsForTwoReducedFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][1][3]->GetBinContent(b); | |
7061 | // denominator for the unbiased estimator for covariances: 1 - term1/(term2*term3) | |
7062 | // prefactor (multiplies Cov's) = term1/(term2*term3) | |
7063 | // <2>,<2'>: | |
7064 | term1 = productOfWeightsForTwoTwoReduced; | |
7065 | term2 = sumOfWeightsForTwo; | |
7066 | term3 = sumOfWeightsForTwoReduced; | |
7067 | if(term2*term3>0.) | |
7068 | { | |
7069 | denominator = 1.-term1/(term2*term3); | |
7070 | prefactor = term1/(term2*term3); | |
0328db2d | 7071 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7072 | { |
7073 | covTwoTwoReduced = (twoTwoReduced-two*twoReduced)/denominator; | |
7074 | wCovTwoTwoReduced = covTwoTwoReduced*prefactor; | |
7075 | fDiffFlowCovariances[t][pe][0]->SetBinContent(b,wCovTwoTwoReduced); | |
7076 | } | |
7077 | } | |
7078 | // <2>,<4'>: | |
7079 | term1 = productOfWeightsForTwoFourReduced; | |
7080 | term2 = sumOfWeightsForTwo; | |
7081 | term3 = sumOfWeightsForFourReduced; | |
7082 | if(term2*term3>0.) | |
7083 | { | |
7084 | denominator = 1.-term1/(term2*term3); | |
7085 | prefactor = term1/(term2*term3); | |
0328db2d | 7086 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7087 | { |
7088 | covTwoFourReduced = (twoFourReduced-two*fourReduced)/denominator; | |
7089 | wCovTwoFourReduced = covTwoFourReduced*prefactor; | |
7090 | fDiffFlowCovariances[t][pe][1]->SetBinContent(b,wCovTwoFourReduced); | |
7091 | } | |
7092 | } | |
7093 | // <4>,<2'>: | |
7094 | term1 = productOfWeightsForFourTwoReduced; | |
7095 | term2 = sumOfWeightsForFour; | |
7096 | term3 = sumOfWeightsForTwoReduced; | |
7097 | if(term2*term3>0.) | |
7098 | { | |
7099 | denominator = 1.-term1/(term2*term3); | |
7100 | prefactor = term1/(term2*term3); | |
0328db2d | 7101 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7102 | { |
7103 | covFourTwoReduced = (fourTwoReduced-four*twoReduced)/denominator; | |
7104 | wCovFourTwoReduced = covFourTwoReduced*prefactor; | |
7105 | fDiffFlowCovariances[t][pe][2]->SetBinContent(b,wCovFourTwoReduced); | |
7106 | } | |
7107 | } | |
7108 | // <4>,<4'>: | |
7109 | term1 = productOfWeightsForFourFourReduced; | |
7110 | term2 = sumOfWeightsForFour; | |
7111 | term3 = sumOfWeightsForFourReduced; | |
7112 | if(term2*term3>0.) | |
7113 | { | |
7114 | denominator = 1.-term1/(term2*term3); | |
7115 | prefactor = term1/(term2*term3); | |
0328db2d | 7116 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7117 | { |
7118 | covFourFourReduced = (fourFourReduced-four*fourReduced)/denominator; | |
7119 | wCovFourFourReduced = covFourFourReduced*prefactor; | |
7120 | fDiffFlowCovariances[t][pe][3]->SetBinContent(b,wCovFourFourReduced); | |
7121 | } | |
7122 | } | |
7123 | // <2'>,<4'>: | |
7124 | term1 = productOfWeightsForTwoReducedFourReduced; | |
7125 | term2 = sumOfWeightsForTwoReduced; | |
7126 | term3 = sumOfWeightsForFourReduced; | |
7127 | if(term2*term3>0.) | |
7128 | { | |
7129 | denominator = 1.-term1/(term2*term3); | |
7130 | prefactor = term1/(term2*term3); | |
0328db2d | 7131 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7132 | { |
7133 | covTwoReducedFourReduced = (twoReducedFourReduced-twoReduced*fourReduced)/denominator; | |
7134 | wCovTwoReducedFourReduced = covTwoReducedFourReduced*prefactor; | |
7135 | fDiffFlowCovariances[t][pe][4]->SetBinContent(b,wCovTwoReducedFourReduced); | |
7136 | } | |
7137 | } | |
7138 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7139 | ||
7140 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCovariances(TString type, TString ptOrEta) | |
7141 | ||
7142 | ||
7143 | //================================================================================================================================ | |
7144 | ||
7145 | ||
7146 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlow(TString type, TString ptOrEta) | |
7147 | { | |
7148 | // calculate differential flow from differential cumulants and previously obtained integrated flow: (to be improved: description) | |
7149 | ||
7150 | Int_t typeFlag = -1; | |
7151 | Int_t ptEtaFlag = -1; | |
7152 | ||
7153 | if(type == "RP") | |
7154 | { | |
7155 | typeFlag = 0; | |
7156 | } else if(type == "POI") | |
7157 | { | |
7158 | typeFlag = 1; | |
7159 | } | |
7160 | ||
7161 | if(ptOrEta == "Pt") | |
7162 | { | |
7163 | ptEtaFlag = 0; | |
7164 | } else if(ptOrEta == "Eta") | |
7165 | { | |
7166 | ptEtaFlag = 1; | |
7167 | } | |
7168 | ||
7169 | // shortcuts: | |
7170 | Int_t t = typeFlag; | |
7171 | Int_t pe = ptEtaFlag; | |
7172 | ||
7173 | // common: | |
7174 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
7175 | ||
7176 | // correlations: | |
7177 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
7178 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
7179 | ||
7180 | // statistical errors of correlations: | |
7181 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); | |
7182 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); | |
7183 | ||
7184 | // reduced correlations: | |
7185 | Double_t twoReduced = 0.; // <<2'>> | |
7186 | Double_t fourReduced = 0.; // <<4'>> | |
7187 | ||
7188 | // statistical errors of reduced correlations: | |
7189 | Double_t twoReducedError = 0.; | |
7190 | Double_t fourReducedError = 0.; | |
7191 | ||
7192 | // covariances: | |
7193 | Double_t wCovTwoFour = fIntFlowCovariances->GetBinContent(1);// // Cov(<2>,<4>) * prefactor(<2>,<4>) | |
7194 | Double_t wCovTwoTwoReduced = 0.; // Cov(<2>,<2'>) * prefactor(<2>,<2'>) | |
7195 | Double_t wCovTwoFourReduced = 0.; // Cov(<2>,<4'>) * prefactor(<2>,<4'>) | |
7196 | Double_t wCovFourTwoReduced = 0.; // Cov(<4>,<2'>) * prefactor(<4>,<2'>) | |
7197 | Double_t wCovFourFourReduced = 0.; // Cov(<4>,<4'>) * prefactor(<4>,<4'>) | |
7198 | Double_t wCovTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) * prefactor(<2'>,<4'>) | |
7199 | ||
7200 | // differential flow: | |
7201 | Double_t v2Prime = 0.; // v'{2} | |
7202 | Double_t v4Prime = 0.; // v'{4} | |
7203 | ||
7204 | // statistical error of differential flow: | |
7205 | Double_t v2PrimeError = 0.; | |
7206 | Double_t v4PrimeError = 0.; | |
7207 | ||
7208 | // squared statistical error of differential flow: | |
7209 | Double_t v2PrimeErrorSquared = 0.; | |
7210 | Double_t v4PrimeErrorSquared = 0.; | |
7211 | ||
7212 | // loop over pt or eta bins: | |
7213 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7214 | { | |
7215 | // reduced correlations and statistical errors: | |
7216 | twoReduced = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); | |
7217 | twoReducedError = fDiffFlowCorrelationsHist[t][pe][0]->GetBinError(b); | |
7218 | fourReduced = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); | |
7219 | fourReducedError = fDiffFlowCorrelationsHist[t][pe][1]->GetBinError(b); | |
7220 | // covariances: | |
7221 | wCovTwoTwoReduced = fDiffFlowCovariances[t][pe][0]->GetBinContent(b); | |
7222 | wCovTwoFourReduced = fDiffFlowCovariances[t][pe][1]->GetBinContent(b); | |
7223 | wCovFourTwoReduced = fDiffFlowCovariances[t][pe][2]->GetBinContent(b); | |
7224 | wCovFourFourReduced = fDiffFlowCovariances[t][pe][3]->GetBinContent(b); | |
7225 | wCovTwoReducedFourReduced = fDiffFlowCovariances[t][pe][4]->GetBinContent(b); | |
7226 | // differential flow: | |
7227 | // v'{2}: | |
7228 | if(two>0.) | |
7229 | { | |
7230 | v2Prime = twoReduced/pow(two,0.5); | |
7231 | v2PrimeErrorSquared = (1./4.)*pow(two,-3.)* | |
7232 | (pow(twoReduced,2.)*pow(twoError,2.) | |
7233 | + 4.*pow(two,2.)*pow(twoReducedError,2.) | |
7234 | - 4.*two*twoReduced*wCovTwoTwoReduced); | |
7235 | ||
7236 | ||
7237 | if(v2PrimeErrorSquared>0.) v2PrimeError = pow(v2PrimeErrorSquared,0.5); | |
7238 | fDiffFlow[t][pe][0]->SetBinContent(b,v2Prime); | |
60694576 | 7239 | if(TMath::Abs(v2Prime)>1.e-44)fDiffFlow[t][pe][0]->SetBinError(b,v2PrimeError); |
489d5531 | 7240 | } |
7241 | // differential flow: | |
7242 | // v'{4} | |
7243 | if(2.*pow(two,2.)-four > 0.) | |
7244 | { | |
7245 | v4Prime = (2.*two*twoReduced-fourReduced)/pow(2.*pow(two,2.)-four,3./4.); | |
7246 | v4PrimeErrorSquared = pow(2.*pow(two,2.)-four,-7./2.)* | |
7247 | (pow(2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced,2.)*pow(twoError,2.) | |
7248 | + (9./16.)*pow(2.*two*twoReduced-fourReduced,2.)*pow(fourError,2.) | |
7249 | + 4.*pow(two,2.)*pow(2.*pow(two,2.)-four,2.)*pow(twoReducedError,2.) | |
7250 | + pow(2.*pow(two,2.)-four,2.)*pow(fourReducedError,2.) | |
7251 | - (3./2.)*(2.*two*twoReduced-fourReduced) | |
7252 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoFour | |
7253 | - 4.*two*(2.*pow(two,2.)-four) | |
7254 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoTwoReduced | |
7255 | + 2.*(2.*pow(two,2.)-four) | |
7256 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoFourReduced | |
7257 | + 3.*two*(2.*pow(two,2.)-four)*(2.*two*twoReduced-fourReduced)*wCovFourTwoReduced | |
7258 | - (3./2.)*(2.*pow(two,2.)-four)*(2.*two*twoReduced-fourReduced)*wCovFourFourReduced | |
7259 | - 4.*two*pow(2.*pow(two,2.)-four,2.)*wCovTwoReducedFourReduced); | |
7260 | if(v4PrimeErrorSquared>0.) v4PrimeError = pow(v4PrimeErrorSquared,0.5); | |
7261 | fDiffFlow[t][pe][1]->SetBinContent(b,v4Prime); | |
60694576 | 7262 | if(TMath::Abs(v4Prime)>1.e-44)fDiffFlow[t][pe][1]->SetBinError(b,v4PrimeError); |
489d5531 | 7263 | } |
7264 | ||
7265 | } // end of for(Int_t b=1;b<=fnBinsPtEta[pe];b++) | |
7266 | ||
7267 | ||
7268 | ||
7269 | ||
7270 | /* | |
7271 | // 2D: | |
7272 | for(Int_t nua=0;nua<2;nua++) | |
7273 | { | |
7274 | for(Int_t p=1;p<=fnBinsPt;p++) | |
7275 | { | |
7276 | for(Int_t e=1;e<=fnBinsEta;e++) | |
7277 | { | |
7278 | // differential cumulants: | |
7279 | Double_t qc2Prime = fFinalCumulants2D[t][pW][eW][nua][0]->GetBinContent(fFinalCumulants2D[t][pW][eW][nua][0]->GetBin(p,e)); // QC{2'} | |
7280 | Double_t qc4Prime = fFinalCumulants2D[t][pW][eW][nua][1]->GetBinContent(fFinalCumulants2D[t][pW][eW][nua][1]->GetBin(p,e)); // QC{4'} | |
7281 | // differential flow: | |
7282 | Double_t v2Prime = 0.; | |
7283 | Double_t v4Prime = 0.; | |
7284 | if(v2) | |
7285 | { | |
7286 | v2Prime = qc2Prime/v2; | |
7287 | fFinalFlow2D[t][pW][eW][nua][0]->SetBinContent(fFinalFlow2D[t][pW][eW][nua][0]->GetBin(p,e),v2Prime); | |
7288 | } | |
7289 | if(v4) | |
7290 | { | |
7291 | v4Prime = -qc4Prime/pow(v4,3.); | |
7292 | fFinalFlow2D[t][pW][eW][nua][1]->SetBinContent(fFinalFlow2D[t][pW][eW][nua][1]->GetBin(p,e),v4Prime); | |
7293 | } | |
7294 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
7295 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
7296 | } // end of for(Int_t nua=0;nua<2;nua++) | |
7297 | */ | |
7298 | ||
7299 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlow(TString type, Bool_t useParticleWeights) | |
7300 | ||
7301 | ||
7302 | //================================================================================================================================ | |
7303 | ||
7304 | ||
7305 | void AliFlowAnalysisWithQCumulants::StoreIntFlowFlags() | |
7306 | { | |
7307 | // a) Store all flags for integrated flow in profile fIntFlowFlags. | |
7308 | ||
7309 | if(!fIntFlowFlags) | |
7310 | { | |
7311 | cout<<"WARNING: fIntFlowFlags is NULL in AFAWQC::SFFIF() !!!!"<<endl; | |
7312 | exit(0); | |
7313 | } | |
7314 | ||
7315 | // particle weights used or not: | |
7316 | fIntFlowFlags->Fill(0.5,(Int_t)fUsePhiWeights||fUsePtWeights||fUseEtaWeights); | |
7317 | // which event weights were used: | |
7318 | if(strcmp(fMultiplicityWeight->Data(),"combinations")) | |
7319 | { | |
7320 | fIntFlowFlags->Fill(1.5,0); // 0 = "combinations" (default) | |
7321 | } else if(strcmp(fMultiplicityWeight->Data(),"unit")) | |
7322 | { | |
7323 | fIntFlowFlags->Fill(1.5,1); // 1 = "unit" | |
7324 | } else if(strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
7325 | { | |
7326 | fIntFlowFlags->Fill(1.5,2); // 2 = "multiplicity" | |
7327 | } | |
7328 | // corrected for non-uniform acceptance or not: | |
7329 | fIntFlowFlags->Fill(2.5,(Int_t)fApplyCorrectionForNUA); | |
7330 | fIntFlowFlags->Fill(3.5,(Int_t)fPrintFinalResults[0]); | |
7331 | fIntFlowFlags->Fill(4.5,(Int_t)fPrintFinalResults[1]); | |
7332 | fIntFlowFlags->Fill(5.5,(Int_t)fPrintFinalResults[2]); | |
2001bc3a | 7333 | fIntFlowFlags->Fill(6.5,(Int_t)fApplyCorrectionForNUAVsM); |
7334 | ||
489d5531 | 7335 | } // end of void AliFlowAnalysisWithQCumulants::StoreIntFlowFlags() |
7336 | ||
7337 | ||
7338 | //================================================================================================================================ | |
7339 | ||
7340 | ||
7341 | void AliFlowAnalysisWithQCumulants::StoreDiffFlowFlags() | |
7342 | { | |
7343 | // Store all flags for differential flow in the profile fDiffFlowFlags. | |
7344 | ||
7345 | if(!fDiffFlowFlags) | |
7346 | { | |
7347 | cout<<"WARNING: fDiffFlowFlags is NULL in AFAWQC::SFFDF() !!!!"<<endl; | |
7348 | exit(0); | |
7349 | } | |
7350 | ||
7351 | fDiffFlowFlags->Fill(0.5,fUsePhiWeights||fUsePtWeights||fUseEtaWeights); // particle weights used or not | |
7352 | //fDiffFlowFlags->Fill(1.5,""); // which event weight was used? // to be improved | |
7353 | fDiffFlowFlags->Fill(2.5,fApplyCorrectionForNUA); // corrected for non-uniform acceptance or not | |
7354 | fDiffFlowFlags->Fill(3.5,fCalculate2DFlow); // calculate also 2D differential flow in (pt,eta) or not | |
7355 | ||
7356 | } // end of void AliFlowAnalysisWithQCumulants::StoreDiffFlowFlags() | |
7357 | ||
7358 | ||
7359 | //================================================================================================================================ | |
7360 | ||
7361 | ||
7362 | void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms() | |
7363 | { | |
7364 | // Access all pointers to common control and common result histograms and profiles. | |
7365 | ||
7366 | TString commonHistsName = "AliFlowCommonHistQC"; | |
7367 | commonHistsName += fAnalysisLabel->Data(); | |
7368 | AliFlowCommonHist *commonHist = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHistsName.Data())); | |
7369 | if(commonHist) this->SetCommonHists(commonHist); | |
7370 | TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC"; | |
7371 | commonHists2ndOrderName += fAnalysisLabel->Data(); | |
7372 | AliFlowCommonHist *commonHist2nd = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHists2ndOrderName.Data())); | |
7373 | if(commonHist2nd) this->SetCommonHists2nd(commonHist2nd); | |
7374 | TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC"; | |
7375 | commonHists4thOrderName += fAnalysisLabel->Data(); | |
7376 | AliFlowCommonHist *commonHist4th = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHists4thOrderName.Data())); | |
7377 | if(commonHist4th) this->SetCommonHists4th(commonHist4th); | |
7378 | TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC"; | |
7379 | commonHists6thOrderName += fAnalysisLabel->Data(); | |
7380 | AliFlowCommonHist *commonHist6th = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHists6thOrderName.Data())); | |
7381 | if(commonHist6th) this->SetCommonHists6th(commonHist6th); | |
7382 | TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC"; | |
7383 | commonHists8thOrderName += fAnalysisLabel->Data(); | |
7384 | AliFlowCommonHist *commonHist8th = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHists8thOrderName.Data())); | |
7385 | if(commonHist8th) this->SetCommonHists8th(commonHist8th); | |
7386 | TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC"; | |
7387 | commonHistResults2ndOrderName += fAnalysisLabel->Data(); | |
ecac11c2 | 7388 | AliFlowCommonHistResults *commonHistRes2nd = dynamic_cast<AliFlowCommonHistResults*> (fHistList->FindObject(commonHistResults2ndOrderName.Data())); |
489d5531 | 7389 | if(commonHistRes2nd) this->SetCommonHistsResults2nd(commonHistRes2nd); |
7390 | TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC"; | |
7391 | commonHistResults4thOrderName += fAnalysisLabel->Data(); | |
7392 | AliFlowCommonHistResults *commonHistRes4th = dynamic_cast<AliFlowCommonHistResults*> | |
7393 | (fHistList->FindObject(commonHistResults4thOrderName.Data())); | |
7394 | if(commonHistRes4th) this->SetCommonHistsResults4th(commonHistRes4th); | |
7395 | TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC"; | |
7396 | commonHistResults6thOrderName += fAnalysisLabel->Data(); | |
7397 | AliFlowCommonHistResults *commonHistRes6th = dynamic_cast<AliFlowCommonHistResults*> | |
7398 | (fHistList->FindObject(commonHistResults6thOrderName.Data())); | |
7399 | if(commonHistRes6th) this->SetCommonHistsResults6th(commonHistRes6th); | |
7400 | TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC"; | |
7401 | commonHistResults8thOrderName += fAnalysisLabel->Data(); | |
7402 | AliFlowCommonHistResults *commonHistRes8th = dynamic_cast<AliFlowCommonHistResults*> | |
7403 | (fHistList->FindObject(commonHistResults8thOrderName.Data())); | |
7404 | if(commonHistRes8th) this->SetCommonHistsResults8th(commonHistRes8th); | |
7405 | ||
7406 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms() | |
7407 | ||
7408 | ||
7409 | //================================================================================================================================ | |
7410 | ||
7411 | ||
7412 | void AliFlowAnalysisWithQCumulants::GetPointersForParticleWeightsHistograms() | |
7413 | { | |
7414 | // Get pointers for histograms with particle weights. | |
7415 | ||
7416 | TList *weightsList = dynamic_cast<TList*>(fHistList->FindObject("Weights")); | |
7417 | if(weightsList) this->SetWeightsList(weightsList); | |
7418 | TString fUseParticleWeightsName = "fUseParticleWeightsQC"; // to be improved (hirdwired label QC) | |
7419 | fUseParticleWeightsName += fAnalysisLabel->Data(); | |
7420 | TProfile *useParticleWeights = dynamic_cast<TProfile*>(weightsList->FindObject(fUseParticleWeightsName.Data())); | |
7421 | if(useParticleWeights) | |
7422 | { | |
7423 | this->SetUseParticleWeights(useParticleWeights); | |
7424 | fUsePhiWeights = (Int_t)fUseParticleWeights->GetBinContent(1); | |
7425 | fUsePtWeights = (Int_t)fUseParticleWeights->GetBinContent(2); | |
7426 | fUseEtaWeights = (Int_t)fUseParticleWeights->GetBinContent(3); | |
7427 | } | |
7428 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForParticleWeightsHistograms(); | |
7429 | ||
7430 | ||
7431 | //================================================================================================================================ | |
7432 | ||
7433 | ||
7434 | void AliFlowAnalysisWithQCumulants::GetPointersForIntFlowHistograms() | |
7435 | { | |
7436 | // Get pointers for histograms and profiles relevant for integrated flow: | |
7437 | // a) Get pointer to base list for integrated flow holding profile fIntFlowFlags and lists fIntFlowProfiles and fIntFlowResults. | |
7438 | // b) Get pointer to profile fIntFlowFlags holding all flags for integrated flow. | |
7439 | // c) Get pointer to list fIntFlowProfiles and pointers to all objects that she holds. | |
7440 | // d) Get pointer to list fIntFlowResults and pointers to all objects that she holds. | |
7441 | ||
7442 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data member?) | |
7443 | TString powerFlag[2] = {"linear","quadratic"}; // to be improved (should I promote this to data member?) | |
ff70ca91 | 7444 | TString correlationFlag[4] = {"<<2>>","<<4>>","<<6>>","<<8>>"}; // to be improved (should I promote this to data member?) |
489d5531 | 7445 | |
7446 | // a) Get pointer to base list for integrated flow holding profile fIntFlowFlags and lists fIntFlowProfiles and fIntFlowResults: | |
7447 | TList *intFlowList = NULL; | |
7448 | intFlowList = dynamic_cast<TList*>(fHistList->FindObject("Integrated Flow")); | |
7449 | if(!intFlowList) | |
7450 | { | |
7451 | cout<<"WARNING: intFlowList is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7452 | exit(0); | |
7453 | } | |
7454 | ||
7455 | // b) Get pointer to profile fIntFlowFlags holding all flags for integrated flow: | |
7456 | TString intFlowFlagsName = "fIntFlowFlags"; | |
7457 | intFlowFlagsName += fAnalysisLabel->Data(); | |
7458 | TProfile *intFlowFlags = dynamic_cast<TProfile*>(intFlowList->FindObject(intFlowFlagsName.Data())); | |
7459 | Bool_t bApplyCorrectionForNUA = kFALSE; | |
7460 | if(intFlowFlags) | |
7461 | { | |
7462 | this->SetIntFlowFlags(intFlowFlags); | |
7463 | bApplyCorrectionForNUA = (Int_t)intFlowFlags->GetBinContent(3); | |
7464 | this->SetApplyCorrectionForNUA(bApplyCorrectionForNUA); | |
7465 | } else | |
7466 | { | |
7467 | cout<<"WARNING: intFlowFlags is NULL in FAWQC::GPFIFH() !!!!"<<endl; | |
7468 | } | |
7469 | ||
7470 | // c) Get pointer to list fIntFlowProfiles and pointers to all objects that she holds: | |
7471 | TList *intFlowProfiles = NULL; | |
7472 | intFlowProfiles = dynamic_cast<TList*>(intFlowList->FindObject("Profiles")); | |
7473 | if(intFlowProfiles) | |
7474 | { | |
7475 | // average multiplicities: | |
7476 | TString avMultiplicityName = "fAvMultiplicity"; | |
7477 | avMultiplicityName += fAnalysisLabel->Data(); | |
7478 | TProfile *avMultiplicity = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(avMultiplicityName.Data())); | |
7479 | if(avMultiplicity) | |
7480 | { | |
7481 | this->SetAvMultiplicity(avMultiplicity); | |
7482 | } else | |
7483 | { | |
7484 | cout<<"WARNING: avMultiplicity is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7485 | } | |
7486 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with wrong errors!): | |
7487 | TString intFlowCorrelationsProName = "fIntFlowCorrelationsPro"; | |
7488 | intFlowCorrelationsProName += fAnalysisLabel->Data(); | |
7489 | TProfile *intFlowCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowCorrelationsProName.Data())); | |
7490 | if(intFlowCorrelationsPro) | |
7491 | { | |
7492 | this->SetIntFlowCorrelationsPro(intFlowCorrelationsPro); | |
7493 | } else | |
7494 | { | |
7495 | cout<<"WARNING: intFlowCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
ff70ca91 | 7496 | } |
7497 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> versus multiplicity for all events (error is wrong here): | |
7498 | TString intFlowCorrelationsVsMProName = "fIntFlowCorrelationsVsMPro"; | |
7499 | intFlowCorrelationsVsMProName += fAnalysisLabel->Data(); | |
7500 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
7501 | { | |
7502 | TProfile *intFlowCorrelationsVsMPro = dynamic_cast<TProfile*> | |
7503 | (intFlowProfiles->FindObject(Form("%s, %s",intFlowCorrelationsVsMProName.Data(),correlationFlag[ci].Data()))); | |
7504 | if(intFlowCorrelationsVsMPro) | |
7505 | { | |
7506 | this->SetIntFlowCorrelationsVsMPro(intFlowCorrelationsVsMPro,ci); | |
7507 | } else | |
7508 | { | |
7509 | cout<<"WARNING: "<<Form("intFlowCorrelationsVsMPro[%d]",ci)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7510 | } | |
7511 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
489d5531 | 7512 | // average all correlations for integrated flow (with wrong errors!): |
7513 | TString intFlowCorrelationsAllProName = "fIntFlowCorrelationsAllPro"; | |
7514 | intFlowCorrelationsAllProName += fAnalysisLabel->Data(); | |
7515 | TProfile *intFlowCorrelationsAllPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowCorrelationsAllProName.Data())); | |
7516 | if(intFlowCorrelationsAllPro) | |
7517 | { | |
7518 | this->SetIntFlowCorrelationsAllPro(intFlowCorrelationsAllPro); | |
7519 | } else | |
7520 | { | |
7521 | cout<<"WARNING: intFlowCorrelationsAllPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7522 | } | |
7523 | // average extra correlations for integrated flow (which appear only when particle weights are used): | |
7524 | // (to be improved: Weak point in implementation, I am assuming here that method GetPointersForParticleWeightsHistograms() was called) | |
7525 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
7526 | { | |
7527 | TString intFlowExtraCorrelationsProName = "fIntFlowExtraCorrelationsPro"; | |
7528 | intFlowExtraCorrelationsProName += fAnalysisLabel->Data(); | |
7529 | TProfile *intFlowExtraCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowExtraCorrelationsProName.Data())); | |
7530 | if(intFlowExtraCorrelationsPro) | |
7531 | { | |
7532 | this->SetIntFlowExtraCorrelationsPro(intFlowExtraCorrelationsPro); | |
7533 | } else | |
7534 | { | |
7535 | cout<<"WARNING: intFlowExtraCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7536 | } | |
7537 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
7538 | // average products of correlations <2>, <4>, <6> and <8>: | |
7539 | TString intFlowProductOfCorrelationsProName = "fIntFlowProductOfCorrelationsPro"; | |
7540 | intFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
7541 | TProfile *intFlowProductOfCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowProductOfCorrelationsProName.Data())); | |
7542 | if(intFlowProductOfCorrelationsPro) | |
7543 | { | |
7544 | this->SetIntFlowProductOfCorrelationsPro(intFlowProductOfCorrelationsPro); | |
7545 | } else | |
7546 | { | |
7547 | cout<<"WARNING: intFlowProductOfCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
ff70ca91 | 7548 | } |
7549 | // average product of correlations <2>, <4>, <6> and <8> versus multiplicity | |
7550 | // [0=<<2><4>>,1=<<2><6>>,2=<<2><8>>,3=<<4><6>>,4=<<4><8>>,5=<<6><8>>] | |
7551 | TString intFlowProductOfCorrelationsVsMProName = "fIntFlowProductOfCorrelationsVsMPro"; | |
7552 | intFlowProductOfCorrelationsVsMProName += fAnalysisLabel->Data(); | |
7553 | TString productFlag[6] = {"<<2><4>>","<<2><6>>","<<2><8>>","<<4><6>>","<<4><8>>","<<6><8>>"}; | |
7554 | for(Int_t pi=0;pi<6;pi++) | |
7555 | { | |
7556 | TProfile *intFlowProductOfCorrelationsVsMPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(Form("%s, %s",intFlowProductOfCorrelationsVsMProName.Data(),productFlag[pi].Data()))); | |
7557 | if(intFlowProductOfCorrelationsVsMPro) | |
7558 | { | |
7559 | this->SetIntFlowProductOfCorrelationsVsMPro(intFlowProductOfCorrelationsVsMPro,pi); | |
7560 | } else | |
7561 | { | |
7562 | cout<<"WARNING: "<<Form("intFlowProductOfCorrelationsVsMPro[%d]",pi)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7563 | } | |
7564 | } // end of for(Int_t pi=0;pi<6;pi++) | |
489d5531 | 7565 | // average correction terms for non-uniform acceptance (with wrong errors!): |
7566 | for(Int_t sc=0;sc<2;sc++) | |
7567 | { | |
7568 | TString intFlowCorrectionTermsForNUAProName = "fIntFlowCorrectionTermsForNUAPro"; | |
7569 | intFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
7570 | TProfile *intFlowCorrectionTermsForNUAPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject((Form("%s: %s terms",intFlowCorrectionTermsForNUAProName.Data(),sinCosFlag[sc].Data())))); | |
7571 | if(intFlowCorrectionTermsForNUAPro) | |
7572 | { | |
7573 | this->SetIntFlowCorrectionTermsForNUAPro(intFlowCorrectionTermsForNUAPro,sc); | |
7574 | } else | |
7575 | { | |
7576 | cout<<"WARNING: intFlowCorrectionTermsForNUAPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7577 | cout<<"sc = "<<sc<<endl; | |
7578 | } | |
2001bc3a | 7579 | // versus multiplicity: |
7580 | TString correctionTermFlag[4] = {"(n(phi1))","(n(phi1+phi2))","(n(phi1-phi2-phi3))","(n(2phi1-phi2))"}; // to be improved - hardwired 4 | |
7581 | TString intFlowCorrectionTermsForNUAVsMProName = "fIntFlowCorrectionTermsForNUAVsMPro"; | |
7582 | intFlowCorrectionTermsForNUAVsMProName += fAnalysisLabel->Data(); | |
7583 | for(Int_t ci=0;ci<4;ci++) // correction term index (to be improved - hardwired 4) | |
7584 | { | |
7585 | TProfile *intFlowCorrectionTermsForNUAVsMPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(Form("%s: #LT#LT%s%s#GT#GT",intFlowCorrectionTermsForNUAVsMProName.Data(),sinCosFlag[sc].Data(),correctionTermFlag[ci].Data()))); | |
7586 | if(intFlowCorrectionTermsForNUAVsMPro) | |
7587 | { | |
7588 | this->SetIntFlowCorrectionTermsForNUAVsMPro(intFlowCorrectionTermsForNUAVsMPro,sc,ci); | |
7589 | } else | |
7590 | { | |
7591 | cout<<"WARNING: intFlowCorrectionTermsForNUAVsMPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7592 | cout<<"sc = "<<sc<<endl; | |
7593 | cout<<"ci = "<<ci<<endl; | |
7594 | } | |
7595 | } // end of for(Int_t ci=0;ci<4;ci++) // correction term index (to be improved - hardwired 4) | |
489d5531 | 7596 | } // end of for(Int_t sc=0;sc<2;sc++) |
0328db2d | 7597 | // average products of correction terms for NUA: |
7598 | TString intFlowProductOfCorrectionTermsForNUAProName = "fIntFlowProductOfCorrectionTermsForNUAPro"; | |
7599 | intFlowProductOfCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
7600 | TProfile *intFlowProductOfCorrectionTermsForNUAPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowProductOfCorrectionTermsForNUAProName.Data())); | |
7601 | if(intFlowProductOfCorrectionTermsForNUAPro) | |
7602 | { | |
7603 | this->SetIntFlowProductOfCorrectionTermsForNUAPro(intFlowProductOfCorrectionTermsForNUAPro); | |
7604 | } else | |
7605 | { | |
7606 | cout<<"WARNING: intFlowProductOfCorrectionTermsForNUAPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7607 | } | |
489d5531 | 7608 | } else // to if(intFlowProfiles) |
7609 | { | |
7610 | cout<<"WARNING: intFlowProfiles is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7611 | } | |
7612 | ||
7613 | // d) Get pointer to list fIntFlowResults and pointers to all objects that she holds. | |
7614 | TList *intFlowResults = NULL; | |
7615 | intFlowResults = dynamic_cast<TList*>(intFlowList->FindObject("Results")); | |
7616 | if(intFlowResults) | |
7617 | { | |
7618 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with correct errors!): | |
7619 | TString intFlowCorrelationsHistName = "fIntFlowCorrelationsHist"; | |
7620 | intFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
7621 | TH1D *intFlowCorrelationsHist = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCorrelationsHistName.Data())); | |
7622 | if(intFlowCorrelationsHist) | |
7623 | { | |
7624 | this->SetIntFlowCorrelationsHist(intFlowCorrelationsHist); | |
7625 | } else | |
7626 | { | |
7627 | cout<<"WARNING: intFlowCorrelationsHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7628 | } | |
ff70ca91 | 7629 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with correct errors!) vs M: |
7630 | TString intFlowCorrelationsVsMHistName = "fIntFlowCorrelationsVsMHist"; | |
7631 | intFlowCorrelationsVsMHistName += fAnalysisLabel->Data(); | |
7632 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
7633 | { | |
7634 | TH1D *intFlowCorrelationsVsMHist = dynamic_cast<TH1D*> | |
7635 | (intFlowResults->FindObject(Form("%s, %s",intFlowCorrelationsVsMHistName.Data(),correlationFlag[ci].Data()))); | |
7636 | if(intFlowCorrelationsVsMHist) | |
7637 | { | |
7638 | this->SetIntFlowCorrelationsVsMHist(intFlowCorrelationsVsMHist,ci); | |
7639 | } else | |
7640 | { | |
7641 | cout<<"WARNING: "<<Form("intFlowCorrelationsVsMHist[%d]",ci)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7642 | } | |
7643 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
489d5531 | 7644 | // average all correlations for integrated flow (with correct errors!): |
7645 | TString intFlowCorrelationsAllHistName = "fIntFlowCorrelationsAllHist"; | |
7646 | intFlowCorrelationsAllHistName += fAnalysisLabel->Data(); | |
7647 | TH1D *intFlowCorrelationsAllHist = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCorrelationsAllHistName.Data())); | |
7648 | if(intFlowCorrelationsAllHist) | |
7649 | { | |
7650 | this->SetIntFlowCorrelationsAllHist(intFlowCorrelationsAllHist); | |
7651 | } else | |
7652 | { | |
7653 | cout<<"WARNING: intFlowCorrelationsAllHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7654 | } | |
7655 | // average correction terms for non-uniform acceptance (with correct errors!): | |
7656 | TString intFlowCorrectionTermsForNUAHistName = "fIntFlowCorrectionTermsForNUAHist"; | |
7657 | intFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
7658 | for(Int_t sc=0;sc<2;sc++) | |
7659 | { | |
7660 | TH1D *intFlowCorrectionTermsForNUAHist = dynamic_cast<TH1D*>(intFlowResults->FindObject((Form("%s: %s terms",intFlowCorrectionTermsForNUAHistName.Data(),sinCosFlag[sc].Data())))); | |
7661 | if(intFlowCorrectionTermsForNUAHist) | |
7662 | { | |
7663 | this->SetIntFlowCorrectionTermsForNUAHist(intFlowCorrectionTermsForNUAHist,sc); | |
7664 | } else | |
7665 | { | |
7666 | cout<<"WARNING: intFlowCorrectionTermsForNUAHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7667 | cout<<"sc = "<<sc<<endl; | |
7668 | } | |
7669 | } // end of for(Int_t sc=0;sc<2;sc++) | |
7670 | // covariances (multiplied with weight dependent prefactor): | |
7671 | TString intFlowCovariancesName = "fIntFlowCovariances"; | |
7672 | intFlowCovariancesName += fAnalysisLabel->Data(); | |
7673 | TH1D *intFlowCovariances = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCovariancesName.Data())); | |
7674 | if(intFlowCovariances) | |
7675 | { | |
7676 | this->SetIntFlowCovariances(intFlowCovariances); | |
7677 | } else | |
7678 | { | |
7679 | cout<<"WARNING: intFlowCovariances is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7680 | } | |
7681 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>: | |
7682 | TString intFlowSumOfEventWeightsName = "fIntFlowSumOfEventWeights"; | |
7683 | intFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
7684 | for(Int_t power=0;power<2;power++) | |
7685 | { | |
7686 | TH1D *intFlowSumOfEventWeights = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s: %s",intFlowSumOfEventWeightsName.Data(),powerFlag[power].Data()))); | |
7687 | if(intFlowSumOfEventWeights) | |
7688 | { | |
7689 | this->SetIntFlowSumOfEventWeights(intFlowSumOfEventWeights,power); | |
7690 | } else | |
7691 | { | |
7692 | cout<<"WARNING: intFlowSumOfEventWeights is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7693 | cout<<"power = "<<power<<endl; | |
7694 | } | |
7695 | } // end of for(Int_t power=0;power<2;power++) | |
7696 | // sum of products of event weights for correlations <2>, <4>, <6> and <8>: | |
7697 | TString intFlowSumOfProductOfEventWeightsName = "fIntFlowSumOfProductOfEventWeights"; | |
7698 | intFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
7699 | TH1D *intFlowSumOfProductOfEventWeights = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowSumOfProductOfEventWeightsName.Data())); | |
7700 | if(intFlowSumOfProductOfEventWeights) | |
7701 | { | |
7702 | this->SetIntFlowSumOfProductOfEventWeights(intFlowSumOfProductOfEventWeights); | |
7703 | } else | |
7704 | { | |
7705 | cout<<"WARNING: intFlowSumOfProductOfEventWeights is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7706 | } | |
ff70ca91 | 7707 | // final result for covariances of correlations (multiplied with weight dependent prefactor) versus M |
7708 | // [0=Cov(2,4),1=Cov(2,6),2=Cov(2,8),3=Cov(4,6),4=Cov(4,8),5=Cov(6,8)]: | |
7709 | TString intFlowCovariancesVsMName = "fIntFlowCovariancesVsM"; | |
7710 | intFlowCovariancesVsMName += fAnalysisLabel->Data(); | |
7711 | TString covarianceFlag[6] = {"Cov(<2>,<4>)","Cov(<2>,<6>)","Cov(<2>,<8>)","Cov(<4>,<6>)","Cov(<4>,<8>)","Cov(<6>,<8>)"}; | |
7712 | for(Int_t ci=0;ci<6;ci++) | |
7713 | { | |
7714 | TH1D *intFlowCovariancesVsM = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s, %s",intFlowCovariancesVsMName.Data(),covarianceFlag[ci].Data()))); | |
7715 | if(intFlowCovariancesVsM) | |
7716 | { | |
7717 | this->SetIntFlowCovariancesVsM(intFlowCovariancesVsM,ci); | |
7718 | } else | |
7719 | { | |
7720 | cout<<"WARNING: "<<Form("intFlowCovariancesVsM[%d]",ci)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7721 | } | |
7722 | } // end of for(Int_t ci=0;ci<6;ci++) | |
7723 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8> versus multiplicity | |
7724 | // [0=sum{w_{<2>}},1=sum{w_{<4>}},2=sum{w_{<6>}},3=sum{w_{<8>}}][0=linear 1,1=quadratic]: | |
7725 | TString intFlowSumOfEventWeightsVsMName = "fIntFlowSumOfEventWeightsVsM"; | |
7726 | intFlowSumOfEventWeightsVsMName += fAnalysisLabel->Data(); | |
7727 | TString sumFlag[2][4] = {{"#sum_{i=1}^{N} w_{<2>}","#sum_{i=1}^{N} w_{<4>}","#sum_{i=1}^{N} w_{<6>}","#sum_{i=1}^{N} w_{<8>}"}, | |
7728 | {"#sum_{i=1}^{N} w_{<2>}^{2}","#sum_{i=1}^{N} w_{<4>}^{2}","#sum_{i=1}^{N} w_{<6>}^{2}","#sum_{i=1}^{N} w_{<8>}^{2}"}}; | |
7729 | for(Int_t si=0;si<4;si++) | |
7730 | { | |
7731 | for(Int_t power=0;power<2;power++) | |
7732 | { | |
7733 | TH1D *intFlowSumOfEventWeightsVsM = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s, %s",intFlowSumOfEventWeightsVsMName.Data(),sumFlag[power][si].Data()))); | |
7734 | if(intFlowSumOfEventWeightsVsM) | |
7735 | { | |
7736 | this->SetIntFlowSumOfEventWeightsVsM(intFlowSumOfEventWeightsVsM,si,power); | |
7737 | } else | |
7738 | { | |
7739 | cout<<"WARNING: "<<Form("intFlowSumOfEventWeightsVsM[%d][%d]",si,power)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7740 | } | |
7741 | } // end of for(Int_t power=0;power<2;power++) | |
7742 | } // end of for(Int_t si=0;si<4;si++) | |
7743 | // sum of products of event weights for correlations <2>, <4>, <6> and <8> vs M | |
7744 | // [0=sum{w_{<2>}w_{<4>}},1=sum{w_{<2>}w_{<6>}},2=sum{w_{<2>}w_{<8>}}, | |
7745 | // 3=sum{w_{<4>}w_{<6>}},4=sum{w_{<4>}w_{<8>}},5=sum{w_{<6>}w_{<8>}}]: | |
7746 | TString intFlowSumOfProductOfEventWeightsVsMName = "fIntFlowSumOfProductOfEventWeightsVsM"; | |
7747 | intFlowSumOfProductOfEventWeightsVsMName += fAnalysisLabel->Data(); | |
7748 | TString sopowFlag[6] = {"#sum_{i=1}^{N} w_{<2>} w_{<4>}","#sum_{i=1}^{N} w_{<2>} w_{<6>}","#sum_{i=1}^{N} w_{<2>} w_{<8>}", | |
7749 | "#sum_{i=1}^{N} w_{<4>} w_{<6>}","#sum_{i=1}^{N} w_{<4>} w_{<8>}","#sum_{i=1}^{N} w_{<6>} w_{<8>}"}; | |
7750 | for(Int_t pi=0;pi<6;pi++) | |
7751 | { | |
7752 | TH1D *intFlowSumOfProductOfEventWeightsVsM = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s, %s",intFlowSumOfProductOfEventWeightsVsMName.Data(),sopowFlag[pi].Data()))); | |
7753 | if(intFlowSumOfProductOfEventWeightsVsM) | |
7754 | { | |
7755 | this->SetIntFlowSumOfProductOfEventWeightsVsM(intFlowSumOfProductOfEventWeightsVsM,pi); | |
7756 | } else | |
7757 | { | |
7758 | cout<<"WARNING: "<<Form("intFlowSumOfProductOfEventWeightsVsM[%d]",pi)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7759 | } | |
7760 | } // end of for(Int_t pi=0;pi<6;pi++) | |
0328db2d | 7761 | // covariances for NUA (multiplied with weight dependent prefactor): |
7762 | TString intFlowCovariancesNUAName = "fIntFlowCovariancesNUA"; | |
7763 | intFlowCovariancesNUAName += fAnalysisLabel->Data(); | |
7764 | TH1D *intFlowCovariancesNUA = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCovariancesNUAName.Data())); | |
7765 | if(intFlowCovariancesNUA) | |
7766 | { | |
7767 | this->SetIntFlowCovariancesNUA(intFlowCovariancesNUA); | |
7768 | } else | |
7769 | { | |
7770 | cout<<"WARNING: intFlowCovariancesNUA is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7771 | } | |
7772 | // sum of linear and quadratic event weights NUA terms: | |
7773 | TString intFlowSumOfEventWeightsNUAName = "fIntFlowSumOfEventWeightsNUA"; | |
7774 | intFlowSumOfEventWeightsNUAName += fAnalysisLabel->Data(); | |
7775 | for(Int_t sc=0;sc<2;sc++) | |
7776 | { | |
7777 | for(Int_t power=0;power<2;power++) | |
7778 | { | |
7779 | TH1D *intFlowSumOfEventWeightsNUA = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s: %s, %s",intFlowSumOfEventWeightsNUAName.Data(),powerFlag[power].Data(),sinCosFlag[sc].Data()))); | |
7780 | if(intFlowSumOfEventWeightsNUA) | |
7781 | { | |
7782 | this->SetIntFlowSumOfEventWeightsNUA(intFlowSumOfEventWeightsNUA,sc,power); | |
7783 | } else | |
7784 | { | |
7785 | cout<<"WARNING: intFlowSumOfEventWeightsNUA is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7786 | cout<<"sc = "<<sc<<endl; | |
7787 | cout<<"power = "<<power<<endl; | |
7788 | } | |
7789 | } // end of for(Int_t power=0;power<2;power++) | |
7790 | } // end of for(Int_t sc=0;sc<2;sc++) | |
7791 | // sum of products of event weights for NUA terms: | |
7792 | TString intFlowSumOfProductOfEventWeightsNUAName = "fIntFlowSumOfProductOfEventWeightsNUA"; | |
7793 | intFlowSumOfProductOfEventWeightsNUAName += fAnalysisLabel->Data(); | |
7794 | TH1D *intFlowSumOfProductOfEventWeightsNUA = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowSumOfProductOfEventWeightsNUAName.Data())); | |
7795 | if(intFlowSumOfProductOfEventWeightsNUA) | |
7796 | { | |
7797 | this->SetIntFlowSumOfProductOfEventWeightsNUA(intFlowSumOfProductOfEventWeightsNUA); | |
7798 | } else | |
7799 | { | |
7800 | cout<<"WARNING: intFlowSumOfProductOfEventWeightsNUA is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7801 | } | |
489d5531 | 7802 | // final results for integrated Q-cumulants: |
7803 | TString intFlowQcumulantsName = "fIntFlowQcumulants"; | |
7804 | intFlowQcumulantsName += fAnalysisLabel->Data(); | |
7805 | TH1D *intFlowQcumulants = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowQcumulantsName.Data())); | |
7806 | if(intFlowQcumulants) | |
7807 | { | |
7808 | this->SetIntFlowQcumulants(intFlowQcumulants); | |
7809 | } else | |
7810 | { | |
7811 | cout<<"WARNING: intFlowQcumulants is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7812 | } | |
ff70ca91 | 7813 | // final results for integrated Q-cumulants versus multiplicity: |
7814 | TString intFlowQcumulantsVsMName = "fIntFlowQcumulantsVsM"; | |
7815 | intFlowQcumulantsVsMName += fAnalysisLabel->Data(); | |
7816 | TString cumulantFlag[4] = {"QC{2}","QC{4}","QC{6}","QC{8}"}; | |
7817 | for(Int_t co=0;co<4;co++) // cumulant order | |
7818 | { | |
7819 | TH1D *intFlowQcumulantsVsM = dynamic_cast<TH1D*> | |
7820 | (intFlowResults->FindObject(Form("%s, %s",intFlowQcumulantsVsMName.Data(),cumulantFlag[co].Data()))); | |
7821 | if(intFlowQcumulantsVsM) | |
7822 | { | |
7823 | this->SetIntFlowQcumulantsVsM(intFlowQcumulantsVsM,co); | |
7824 | } else | |
7825 | { | |
7826 | cout<<"WARNING: "<<Form("intFlowQcumulantsVsM[%d]",co)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7827 | } | |
7828 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
489d5531 | 7829 | // final integrated flow estimates from Q-cumulants: |
7830 | TString intFlowName = "fIntFlow"; | |
7831 | intFlowName += fAnalysisLabel->Data(); | |
7832 | TH1D *intFlow = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowName.Data())); | |
7833 | if(intFlow) | |
7834 | { | |
7835 | this->SetIntFlow(intFlow); | |
7836 | } else | |
7837 | { | |
7838 | cout<<"WARNING: intFlow is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
ff70ca91 | 7839 | } |
7840 | // integrated flow from Q-cumulants versus multiplicity: | |
7841 | TString intFlowVsMName = "fIntFlowVsM"; | |
7842 | intFlowVsMName += fAnalysisLabel->Data(); | |
7843 | TString flowFlag[4] = {"v_{2}{2,QC}","v_{2}{4,QC}","v_{2}{6,QC}","v_{2}{8,QC}"}; // to be improved (harwired harmonic) | |
7844 | for(Int_t co=0;co<4;co++) // cumulant order | |
7845 | { | |
7846 | TH1D *intFlowVsM = dynamic_cast<TH1D*> | |
7847 | (intFlowResults->FindObject(Form("%s, %s",intFlowVsMName.Data(),flowFlag[co].Data()))); | |
7848 | if(intFlowVsM) | |
7849 | { | |
7850 | this->SetIntFlowVsM(intFlowVsM,co); | |
7851 | } else | |
7852 | { | |
7853 | cout<<"WARNING: "<<Form("intFlowVsM[%d]",co)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7854 | } | |
7855 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
2001bc3a | 7856 | // quantifying detector effects effects to correlations: |
7857 | TString intFlowDetectorBiasName = "fIntFlowDetectorBias"; | |
7858 | intFlowDetectorBiasName += fAnalysisLabel->Data(); | |
7859 | TH1D *intFlowDetectorBias = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowDetectorBiasName.Data())); | |
7860 | if(intFlowDetectorBias) | |
7861 | { | |
7862 | this->SetIntFlowDetectorBias(intFlowDetectorBias); | |
7863 | } else | |
7864 | { | |
7865 | cout<<"WARNING: intFlowDetectorBias is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7866 | } | |
7867 | // quantifying detector effects effects to correlations vs multiplicity: | |
7868 | TString intFlowDetectorBiasVsMName = "fIntFlowDetectorBiasVsM"; | |
7869 | intFlowDetectorBiasVsMName += fAnalysisLabel->Data(); | |
7870 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
7871 | { | |
7872 | TH1D *intFlowDetectorBiasVsM = dynamic_cast<TH1D*> | |
7873 | (intFlowResults->FindObject(Form("%s for %s",intFlowDetectorBiasVsMName.Data(),cumulantFlag[ci].Data()))); | |
7874 | if(intFlowDetectorBiasVsM) | |
7875 | { | |
7876 | this->SetIntFlowDetectorBiasVsM(intFlowDetectorBiasVsM,ci); | |
7877 | } else | |
7878 | { | |
7879 | cout<<"WARNING: "<<Form("intFlowDetectorBiasVsM[%d]",ci)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7880 | } | |
7881 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
489d5531 | 7882 | } else // to if(intFlowResults) |
7883 | { | |
7884 | cout<<"WARNING: intFlowResults is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7885 | } | |
ff70ca91 | 7886 | |
489d5531 | 7887 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForIntFlowHistograms() |
7888 | ||
489d5531 | 7889 | //================================================================================================================================ |
7890 | ||
489d5531 | 7891 | void AliFlowAnalysisWithQCumulants::GetPointersForDiffFlowHistograms() |
7892 | { | |
7893 | // Get pointer to all objects relevant for differential flow. | |
7894 | // a) Define flags locally (to be improved: should I promote flags to data members?); | |
7895 | // b) Get pointer to base list for differential flow fDiffFlowList and nested lists fDiffFlowListProfiles and fDiffFlowListResults; | |
7896 | // c) Get pointer to profile fDiffFlowFlags holding all flags for differential flow; | |
7897 | // d) Get pointers to all nested lists in fDiffFlowListProfiles and to profiles which they hold; | |
7898 | // e) Get pointers to all nested lists in fDiffFlowListResults and to histograms which they hold. | |
7899 | ||
7900 | // a) Define flags locally (to be improved: should I promote flags to data members?): | |
7901 | TString typeFlag[2] = {"RP","POI"}; | |
7902 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; | |
7903 | TString powerFlag[2] = {"linear","quadratic"}; | |
7904 | TString sinCosFlag[2] = {"sin","cos"}; | |
7905 | TString differentialCumulantIndex[4] = {"QC{2'}","QC{4'}","QC{6'}","QC{8'}"}; | |
7906 | TString differentialFlowIndex[4] = {"v'{2}","v'{4}","v'{6}","v'{8}"}; | |
7907 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; | |
7908 | TString mixedCorrelationIndex[8] = {"<2>","<2'>","<4>","<4'>","<6>","<6'>","<8>","<8'>"}; | |
7909 | TString covarianceName[5] = {"Cov(<2>,<2'>)","Cov(<2>,<4'>)","Cov(<4>,<2'>)","Cov(<4>,<4'>)","Cov(<2'>,<4'>)"}; | |
7910 | ||
7911 | // b) Get pointer to base list for differential flow fDiffFlowList and nested lists fDiffFlowListProfiles and fDiffFlowListResults: | |
7912 | TList *diffFlowList = NULL; | |
7913 | diffFlowList = dynamic_cast<TList*>(fHistList->FindObject("Differential Flow")); | |
7914 | if(!diffFlowList) | |
7915 | { | |
7916 | cout<<"WARNING: diffFlowList is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7917 | exit(0); | |
7918 | } | |
7919 | // list holding nested lists containing profiles: | |
7920 | TList *diffFlowListProfiles = NULL; | |
7921 | diffFlowListProfiles = dynamic_cast<TList*>(diffFlowList->FindObject("Profiles")); | |
7922 | if(!diffFlowListProfiles) | |
7923 | { | |
7924 | cout<<"WARNING: diffFlowListProfiles is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7925 | exit(0); | |
7926 | } | |
7927 | // list holding nested lists containing 2D and 1D histograms with final results: | |
7928 | TList *diffFlowListResults = NULL; | |
7929 | diffFlowListResults = dynamic_cast<TList*>(diffFlowList->FindObject("Results")); | |
7930 | if(!diffFlowListResults) | |
7931 | { | |
7932 | cout<<"WARNING: diffFlowListResults is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7933 | exit(0); | |
7934 | } | |
7935 | ||
7936 | // c) Get pointer to profile holding all flags for differential flow; | |
7937 | TString diffFlowFlagsName = "fDiffFlowFlags"; | |
7938 | diffFlowFlagsName += fAnalysisLabel->Data(); | |
7939 | TProfile *diffFlowFlags = dynamic_cast<TProfile*>(diffFlowList->FindObject(diffFlowFlagsName.Data())); | |
7940 | Bool_t bCalculate2DFlow = kFALSE; | |
7941 | if(diffFlowFlags) | |
7942 | { | |
7943 | this->SetDiffFlowFlags(diffFlowFlags); | |
7944 | bCalculate2DFlow = (Int_t)diffFlowFlags->GetBinContent(4); | |
7945 | this->SetCalculate2DFlow(bCalculate2DFlow); // to be improved (shoul I call this setter somewhere else?) | |
7946 | } | |
7947 | ||
7948 | // d) Get pointers to all nested lists in fDiffFlowListProfiles and to profiles which they hold; | |
7949 | // correlations: | |
7950 | TList *diffFlowCorrelationsProList[2][2] = {{NULL}}; | |
7951 | TString diffFlowCorrelationsProName = "fDiffFlowCorrelationsPro"; | |
7952 | diffFlowCorrelationsProName += fAnalysisLabel->Data(); | |
7953 | TProfile *diffFlowCorrelationsPro[2][2][4] = {{{NULL}}}; | |
7954 | // products of correlations: | |
7955 | TList *diffFlowProductOfCorrelationsProList[2][2] = {{NULL}}; | |
7956 | TString diffFlowProductOfCorrelationsProName = "fDiffFlowProductOfCorrelationsPro"; | |
7957 | diffFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
7958 | TProfile *diffFlowProductOfCorrelationsPro[2][2][8][8] = {{{{NULL}}}}; | |
7959 | // corrections: | |
7960 | TList *diffFlowCorrectionsProList[2][2] = {{NULL}}; | |
7961 | TString diffFlowCorrectionTermsForNUAProName = "fDiffFlowCorrectionTermsForNUAPro"; | |
7962 | diffFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
7963 | TProfile *diffFlowCorrectionTermsForNUAPro[2][2][2][10] = {{{{NULL}}}}; | |
7964 | for(Int_t t=0;t<2;t++) | |
7965 | { | |
7966 | for(Int_t pe=0;pe<2;pe++) | |
7967 | { | |
7968 | diffFlowCorrelationsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
7969 | if(!diffFlowCorrelationsProList[t][pe]) | |
7970 | { | |
7971 | cout<<"WARNING: diffFlowCorrelationsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7972 | cout<<"t = "<<t<<endl; | |
7973 | cout<<"pe = "<<pe<<endl; | |
7974 | exit(0); | |
7975 | } | |
7976 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
7977 | { | |
7978 | 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()))); | |
7979 | if(diffFlowCorrelationsPro[t][pe][ci]) | |
7980 | { | |
7981 | this->SetDiffFlowCorrelationsPro(diffFlowCorrelationsPro[t][pe][ci],t,pe,ci); | |
7982 | } else | |
7983 | { | |
7984 | cout<<"WARNING: diffFlowCorrelationsPro[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7985 | cout<<"t = "<<t<<endl; | |
7986 | cout<<"pe = "<<pe<<endl; | |
7987 | cout<<"ci = "<<ci<<endl; | |
7988 | } | |
7989 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
7990 | // products of correlations: | |
7991 | diffFlowProductOfCorrelationsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with products of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
7992 | if(!diffFlowProductOfCorrelationsProList[t][pe]) | |
7993 | { | |
7994 | cout<<"WARNING: ddiffFlowProductOfCorrelationsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
7995 | cout<<"t = "<<t<<endl; | |
7996 | cout<<"pe = "<<pe<<endl; | |
7997 | exit(0); | |
7998 | } | |
7999 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8000 | { | |
8001 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8002 | { | |
8003 | 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()))); | |
8004 | if(diffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]) | |
8005 | { | |
8006 | this->SetDiffFlowProductOfCorrelationsPro(diffFlowProductOfCorrelationsPro[t][pe][mci1][mci2],t,pe,mci1,mci2); | |
8007 | } else | |
8008 | { | |
8009 | cout<<"WARNING: diffFlowCorrelationsPro[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8010 | cout<<"t = "<<t<<endl; | |
8011 | cout<<"pe = "<<pe<<endl; | |
8012 | cout<<"mci1 = "<<mci1<<endl; | |
8013 | cout<<"mci2 = "<<mci2<<endl; | |
8014 | } | |
8015 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
8016 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8017 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8018 | // corrections: | |
8019 | diffFlowCorrectionsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8020 | if(!diffFlowCorrectionsProList[t][pe]) | |
8021 | { | |
8022 | cout<<"WARNING: diffFlowCorrectionsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8023 | cout<<"t = "<<t<<endl; | |
8024 | cout<<"pe = "<<pe<<endl; | |
8025 | exit(0); | |
8026 | } | |
8027 | // correction terms for NUA: | |
8028 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8029 | { | |
8030 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8031 | { | |
8032 | diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti] = dynamic_cast<TProfile*>(diffFlowCorrectionsProList[t][pe]->FindObject(Form("%s, %s, %s, %s, cti = %d",diffFlowCorrectionTermsForNUAProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1))); | |
8033 | if(diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]) | |
8034 | { | |
8035 | this->SetDiffFlowCorrectionTermsForNUAPro(diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti],t,pe,sc,cti); | |
8036 | } else | |
8037 | { | |
8038 | cout<<"WARNING: diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8039 | cout<<"t = "<<t<<endl; | |
8040 | cout<<"pe = "<<pe<<endl; | |
8041 | cout<<"sc = "<<sc<<endl; | |
8042 | cout<<"cti = "<<cti<<endl; | |
8043 | } | |
8044 | } // end of for(Int_t cti=0;cti<9;cti++) // correction term index | |
8045 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8046 | // ... | |
8047 | } // end of for(Int_t pe=0;pe<2;pe++) | |
8048 | } // end of for(Int_t t=0;t<2;t++) | |
8049 | ||
8050 | // e) Get pointers to all nested lists in fDiffFlowListResults and to histograms which they hold. | |
8051 | // reduced correlations: | |
8052 | TList *diffFlowCorrelationsHistList[2][2] = {{NULL}}; | |
8053 | TString diffFlowCorrelationsHistName = "fDiffFlowCorrelationsHist"; | |
8054 | diffFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
8055 | TH1D *diffFlowCorrelationsHist[2][2][4] = {{{NULL}}}; | |
8056 | // corrections for NUA: | |
8057 | TList *diffFlowCorrectionsHistList[2][2] = {{NULL}}; | |
8058 | TString diffFlowCorrectionTermsForNUAHistName = "fDiffFlowCorrectionTermsForNUAHist"; | |
8059 | diffFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
8060 | TH1D *diffFlowCorrectionTermsForNUAHist[2][2][2][10] = {{{{NULL}}}}; | |
8061 | // differential Q-cumulants: | |
8062 | TList *diffFlowCumulantsHistList[2][2] = {{NULL}}; | |
8063 | TString diffFlowCumulantsName = "fDiffFlowCumulants"; | |
8064 | diffFlowCumulantsName += fAnalysisLabel->Data(); | |
8065 | TH1D *diffFlowCumulants[2][2][4] = {{{NULL}}}; | |
8066 | // differential flow estimates from Q-cumulants: | |
8067 | TList *diffFlowHistList[2][2] = {{NULL}}; | |
8068 | TString diffFlowName = "fDiffFlow"; | |
8069 | diffFlowName += fAnalysisLabel->Data(); | |
8070 | TH1D *diffFlow[2][2][4] = {{{NULL}}}; | |
8071 | // differential covariances: | |
8072 | TList *diffFlowCovariancesHistList[2][2] = {{NULL}}; | |
8073 | TString diffFlowCovariancesName = "fDiffFlowCovariances"; | |
8074 | diffFlowCovariancesName += fAnalysisLabel->Data(); | |
8075 | TH1D *diffFlowCovariances[2][2][5] = {{{NULL}}}; | |
8076 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8077 | { | |
8078 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8079 | { | |
8080 | // reduced correlations: | |
8081 | diffFlowCorrelationsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8082 | if(!diffFlowCorrelationsHistList[t][pe]) | |
8083 | { | |
8084 | cout<<"WARNING: diffFlowCorrelationsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8085 | cout<<"t = "<<t<<endl; | |
8086 | cout<<"pe = "<<pe<<endl; | |
8087 | exit(0); | |
8088 | } | |
8089 | for(Int_t index=0;index<4;index++) | |
8090 | { | |
8091 | 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()))); | |
8092 | if(diffFlowCorrelationsHist[t][pe][index]) | |
8093 | { | |
8094 | this->SetDiffFlowCorrelationsHist(diffFlowCorrelationsHist[t][pe][index],t,pe,index); | |
8095 | } else | |
8096 | { | |
8097 | cout<<"WARNING: diffFlowCorrelationsHist[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8098 | cout<<"t = "<<t<<endl; | |
8099 | cout<<"pe = "<<pe<<endl; | |
8100 | cout<<"index = "<<index<<endl; | |
8101 | exit(0); | |
8102 | } | |
8103 | } // end of for(Int_t index=0;index<4;index++) | |
8104 | // corrections: | |
8105 | diffFlowCorrectionsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Histograms with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8106 | if(!diffFlowCorrectionsHistList[t][pe]) | |
8107 | { | |
8108 | cout<<"WARNING: diffFlowCorrectionsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8109 | cout<<"t = "<<t<<endl; | |
8110 | cout<<"pe = "<<pe<<endl; | |
8111 | exit(0); | |
8112 | } | |
8113 | // correction terms for NUA: | |
8114 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8115 | { | |
8116 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8117 | { | |
8118 | diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti] = dynamic_cast<TH1D*>(diffFlowCorrectionsHistList[t][pe]->FindObject(Form("%s, %s, %s, %s, cti = %d",diffFlowCorrectionTermsForNUAHistName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1))); | |
8119 | if(diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti]) | |
8120 | { | |
8121 | this->SetDiffFlowCorrectionTermsForNUAHist(diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti],t,pe,sc,cti); | |
8122 | } else | |
8123 | { | |
8124 | cout<<"WARNING: diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8125 | cout<<"t = "<<t<<endl; | |
8126 | cout<<"pe = "<<pe<<endl; | |
8127 | cout<<"sc = "<<sc<<endl; | |
8128 | cout<<"cti = "<<cti<<endl; | |
8129 | } | |
8130 | } // end of for(Int_t cti=0;cti<9;cti++) // correction term index | |
8131 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8132 | // ... | |
8133 | // differential Q-cumulants: | |
8134 | diffFlowCumulantsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Differential Q-cumulants (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8135 | if(!diffFlowCumulantsHistList[t][pe]) | |
8136 | { | |
8137 | cout<<"WARNING: diffFlowCumulantsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8138 | cout<<"t = "<<t<<endl; | |
8139 | cout<<"pe = "<<pe<<endl; | |
8140 | exit(0); | |
8141 | } | |
8142 | for(Int_t index=0;index<4;index++) | |
8143 | { | |
8144 | 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()))); | |
8145 | if(diffFlowCumulants[t][pe][index]) | |
8146 | { | |
8147 | this->SetDiffFlowCumulants(diffFlowCumulants[t][pe][index],t,pe,index); | |
8148 | } else | |
8149 | { | |
8150 | cout<<"WARNING: diffFlowCumulants[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8151 | cout<<"t = "<<t<<endl; | |
8152 | cout<<"pe = "<<pe<<endl; | |
8153 | cout<<"index = "<<index<<endl; | |
8154 | exit(0); | |
8155 | } | |
8156 | } // end of for(Int_t index=0;index<4;index++) | |
8157 | // differential flow estimates from Q-cumulants: | |
8158 | diffFlowHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Differential flow (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8159 | if(!diffFlowHistList[t][pe]) | |
8160 | { | |
8161 | cout<<"WARNING: diffFlowHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8162 | cout<<"t = "<<t<<endl; | |
8163 | cout<<"pe = "<<pe<<endl; | |
8164 | exit(0); | |
8165 | } | |
8166 | for(Int_t index=0;index<4;index++) | |
8167 | { | |
8168 | 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()))); | |
8169 | if(diffFlow[t][pe][index]) | |
8170 | { | |
8171 | this->SetDiffFlow(diffFlow[t][pe][index],t,pe,index); | |
8172 | } else | |
8173 | { | |
8174 | cout<<"WARNING: diffFlow[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8175 | cout<<"t = "<<t<<endl; | |
8176 | cout<<"pe = "<<pe<<endl; | |
8177 | cout<<"index = "<<index<<endl; | |
8178 | exit(0); | |
8179 | } | |
8180 | } // end of for(Int_t index=0;index<4;index++) | |
8181 | // differential covariances: | |
8182 | diffFlowCovariancesHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Covariances of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8183 | if(!diffFlowCovariancesHistList[t][pe]) | |
8184 | { | |
8185 | cout<<"WARNING: diffFlowCovariancesHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8186 | cout<<"t = "<<t<<endl; | |
8187 | cout<<"pe = "<<pe<<endl; | |
8188 | exit(0); | |
8189 | } | |
8190 | for(Int_t covIndex=0;covIndex<5;covIndex++) | |
8191 | { | |
8192 | 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()))); | |
8193 | if(diffFlowCovariances[t][pe][covIndex]) | |
8194 | { | |
8195 | this->SetDiffFlowCovariances(diffFlowCovariances[t][pe][covIndex],t,pe,covIndex); | |
8196 | } else | |
8197 | { | |
8198 | cout<<"WARNING: diffFlowCovariances[t][pe][covIndex] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8199 | cout<<"t = "<<t<<endl; | |
8200 | cout<<"pe = "<<pe<<endl; | |
8201 | cout<<"covIndex = "<<covIndex<<endl; | |
8202 | exit(0); | |
8203 | } | |
8204 | } // end of for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index | |
8205 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8206 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8207 | // sum of event weights for reduced correlations: | |
8208 | TList *diffFlowSumOfEventWeightsHistList[2][2][2] = {{{NULL}}}; | |
8209 | TString diffFlowSumOfEventWeightsName = "fDiffFlowSumOfEventWeights"; | |
8210 | diffFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
8211 | TH1D *diffFlowSumOfEventWeights[2][2][2][4] = {{{{NULL}}}}; | |
8212 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
8213 | { | |
8214 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8215 | { | |
8216 | for(Int_t p=0;p<2;p++) // power of event weights is either 1 or 2 | |
8217 | { | |
8218 | 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()))); | |
8219 | if(!diffFlowSumOfEventWeightsHistList[t][pe][p]) | |
8220 | { | |
8221 | cout<<"WARNING: diffFlowSumOfEventWeightsHistList[t][pe][p] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8222 | cout<<"t = "<<t<<endl; | |
8223 | cout<<"pe = "<<pe<<endl; | |
8224 | cout<<"power = "<<p<<endl; | |
8225 | exit(0); | |
8226 | } | |
8227 | for(Int_t ew=0;ew<4;ew++) // index of reduced correlation | |
8228 | { | |
8229 | 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()))); | |
8230 | if(diffFlowSumOfEventWeights[t][pe][p][ew]) | |
8231 | { | |
8232 | this->SetDiffFlowSumOfEventWeights(diffFlowSumOfEventWeights[t][pe][p][ew],t,pe,p,ew); | |
8233 | } else | |
8234 | { | |
8235 | cout<<"WARNING: diffFlowSumOfEventWeights[t][pe][p][ew] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8236 | cout<<"t = "<<t<<endl; | |
8237 | cout<<"pe = "<<pe<<endl; | |
8238 | cout<<"power = "<<p<<endl; | |
8239 | cout<<"ew = "<<ew<<endl; | |
8240 | exit(0); | |
8241 | } | |
8242 | } | |
8243 | } // end of for(Int_t p=0;p<2;p++) // power of event weights is either 1 or 2 | |
8244 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8245 | } // end of for(Int_t t=0;t<2;t++) // type is RP or POI | |
8246 | // | |
8247 | TList *diffFlowSumOfProductOfEventWeightsHistList[2][2] = {{NULL}}; | |
8248 | TString diffFlowSumOfProductOfEventWeightsName = "fDiffFlowSumOfProductOfEventWeights"; | |
8249 | diffFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
8250 | TH1D *diffFlowSumOfProductOfEventWeights[2][2][8][8] = {{{{NULL}}}}; | |
8251 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
8252 | { | |
8253 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8254 | { | |
8255 | diffFlowSumOfProductOfEventWeightsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Sum of products of event weights (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8256 | if(!diffFlowSumOfProductOfEventWeightsHistList[t][pe]) | |
8257 | { | |
8258 | cout<<"WARNING: diffFlowSumOfProductOfEventWeightsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8259 | cout<<"t = "<<t<<endl; | |
8260 | cout<<"pe = "<<pe<<endl; | |
8261 | exit(0); | |
8262 | } | |
8263 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8264 | { | |
8265 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8266 | { | |
8267 | 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()))); | |
8268 | if(diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]) | |
8269 | { | |
8270 | this->SetDiffFlowSumOfProductOfEventWeights(diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2],t,pe,mci1,mci2); | |
8271 | } else | |
8272 | { | |
8273 | cout<<"WARNING: diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8274 | cout<<"t = "<<t<<endl; | |
8275 | cout<<"pe = "<<pe<<endl; | |
8276 | cout<<"mci1 = "<<mci1<<endl; | |
8277 | cout<<"mci2 = "<<mci2<<endl; | |
8278 | exit(0); | |
8279 | } | |
8280 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
8281 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8282 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8283 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8284 | } // end of for(Int_t t=0;t<2;t++) // type is RP or POI | |
8285 | ||
8286 | } // end void AliFlowAnalysisWithQCumulants::GetPointersForDiffFlowHistograms() | |
8287 | ||
8288 | ||
8289 | //================================================================================================================================ | |
8290 | ||
8291 | ||
8292 | void AliFlowAnalysisWithQCumulants::BookEverythingForDifferentialFlow() | |
8293 | { | |
8294 | // Book all histograms and profiles needed for differential flow. | |
8295 | // a) Define flags locally (to be improved: should I promote flags to data members?); | |
8296 | // b) Book profile to hold all flags for differential flow; | |
8297 | // c) Book e-b-e quantities; | |
8298 | // d) Book profiles; | |
8299 | // e) Book histograms holding final results. | |
8300 | ||
8301 | // a) Define flags locally (to be improved: should I promote flags to data members?): | |
8302 | TString typeFlag[2] = {"RP","POI"}; | |
8303 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; | |
8304 | TString powerFlag[2] = {"linear","quadratic"}; | |
8305 | TString sinCosFlag[2] = {"sin","cos"}; | |
8306 | TString differentialCumulantIndex[4] = {"QC{2'}","QC{4'}","QC{6'}","QC{8'}"}; | |
8307 | TString differentialFlowIndex[4] = {"v'{2}","v'{4}","v'{6}","v'{8}"}; | |
8308 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; | |
8309 | TString mixedCorrelationIndex[8] = {"<2>","<2'>","<4>","<4'>","<6>","<6'>","<8>","<8'>"}; | |
8310 | TString covarianceName[5] = {"Cov(<2>,<2'>)","Cov(<2>,<4'>)","Cov(<4>,<2'>)","Cov(<4>,<4'>)","Cov(<2'>,<4'>)"}; | |
8311 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
8312 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
8313 | Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
8314 | ||
8315 | // b) Book profile to hold all flags for differential flow: | |
8316 | TString diffFlowFlagsName = "fDiffFlowFlags"; | |
8317 | diffFlowFlagsName += fAnalysisLabel->Data(); | |
8318 | fDiffFlowFlags = new TProfile(diffFlowFlagsName.Data(),"Flags for Differential Flow",4,0,4); | |
8319 | fDiffFlowFlags->SetTickLength(-0.01,"Y"); | |
8320 | fDiffFlowFlags->SetMarkerStyle(25); | |
8321 | fDiffFlowFlags->SetLabelSize(0.05); | |
8322 | fDiffFlowFlags->SetLabelOffset(0.02,"Y"); | |
8323 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(1,"Particle Weights"); | |
8324 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(2,"Event Weights"); | |
8325 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(3,"Corrected for NUA?"); | |
8326 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(4,"Calculated 2D flow?"); | |
8327 | fDiffFlowList->Add(fDiffFlowFlags); | |
8328 | ||
8329 | // c) Book e-b-e quantities: | |
8330 | // Event-by-event r_{m*n,k}(pt,eta), p_{m*n,k}(pt,eta) and q_{m*n,k}(pt,eta) | |
8331 | // Explanantion of notation: | |
8332 | // 1.) n is harmonic, m is multiple of harmonic; | |
8333 | // 2.) k is power of particle weight; | |
8334 | // 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); | |
8335 | // 4.) p_{m*n,k}(pt,eta) = Q-vector evaluated in harmonic m*n for POIs in particular (pt,eta) bin | |
8336 | // (if i-th POI is also RP, than it is weighted with w_i^k); | |
8337 | // 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 | |
8338 | // (i-th RP&&POI is weighted with w_i^k) | |
8339 | ||
8340 | // 1D: | |
8341 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP && POI ) | |
8342 | { | |
8343 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8344 | { | |
8345 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
8346 | { | |
8347 | for(Int_t k=0;k<9;k++) // power of particle weight | |
8348 | { | |
8349 | fReRPQ1dEBE[t][pe][m][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%dpower%dRe",t,pe,m,k), | |
8350 | Form("TypeFlag%dpteta%dmultiple%dpower%dRe",t,pe,m,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8351 | fImRPQ1dEBE[t][pe][m][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%dpower%dIm",t,pe,m,k), | |
8352 | Form("TypeFlag%dpteta%dmultiple%dpower%dIm",t,pe,m,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8353 | } | |
8354 | } | |
8355 | } | |
8356 | } | |
8357 | // to be improved (add explanation of fs1dEBE[t][pe][k]): | |
8358 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI ) | |
8359 | { | |
8360 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8361 | { | |
8362 | for(Int_t k=0;k<9;k++) // power of particle weight | |
8363 | { | |
8364 | fs1dEBE[t][pe][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%d",t,pe,k), | |
8365 | Form("TypeFlag%dpteta%dmultiple%d",t,pe,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8366 | } | |
8367 | } | |
8368 | } | |
8369 | // correction terms for nua: | |
8370 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
8371 | { | |
8372 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8373 | { | |
8374 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8375 | { | |
8376 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8377 | { | |
8378 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][sc][cti] = new TH1D(Form("typeFlag%d pteta%d sincos%d cti%d",t,pe,sc,cti), | |
8379 | Form("typeFlag%d pteta%d sincos%d cti%d",t,pe,sc,cti),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8380 | } | |
8381 | } | |
8382 | } | |
8383 | } | |
8384 | // 2D: | |
8385 | TProfile2D styleRe("typeMultiplePowerRe","typeMultiplePowerRe",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax); | |
8386 | TProfile2D styleIm("typeMultiplePowerIm","typeMultiplePowerIm",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax); | |
8387 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI ) | |
8388 | { | |
8389 | for(Int_t m=0;m<4;m++) | |
8390 | { | |
8391 | for(Int_t k=0;k<9;k++) | |
8392 | { | |
8393 | fReRPQ2dEBE[t][m][k] = (TProfile2D*)styleRe.Clone(Form("typeFlag%dmultiple%dpower%dRe",t,m,k)); | |
8394 | fImRPQ2dEBE[t][m][k] = (TProfile2D*)styleIm.Clone(Form("typeFlag%dmultiple%dpower%dIm",t,m,k)); | |
8395 | } | |
8396 | } | |
8397 | } | |
8398 | TProfile2D styleS("typePower","typePower",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax); | |
8399 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI ) | |
8400 | { | |
8401 | for(Int_t k=0;k<9;k++) | |
8402 | { | |
8403 | fs2dEBE[t][k] = (TProfile2D*)styleS.Clone(Form("typeFlag%dpower%d",t,k)); | |
8404 | } | |
8405 | } | |
8406 | // reduced correlations e-b-e: | |
8407 | TString diffFlowCorrelationsEBEName = "fDiffFlowCorrelationsEBE"; | |
8408 | diffFlowCorrelationsEBEName += fAnalysisLabel->Data(); | |
8409 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8410 | { | |
8411 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8412 | { | |
8413 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
8414 | { | |
8415 | 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]); | |
8416 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
8417 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8418 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8419 | // event weights for reduced correlations e-b-e: | |
8420 | TString diffFlowEventWeightsForCorrelationsEBEName = "fDiffFlowEventWeightsForCorrelationsEBE"; | |
8421 | diffFlowEventWeightsForCorrelationsEBEName += fAnalysisLabel->Data(); | |
8422 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8423 | { | |
8424 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8425 | { | |
8426 | for(Int_t rci=0;rci<4;rci++) // event weight for reduced correlation index | |
8427 | { | |
8428 | fDiffFlowEventWeightsForCorrelationsEBE[t][pe][rci] = new TH1D(Form("%s, %s, %s, eW for %s",diffFlowEventWeightsForCorrelationsEBEName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),Form("%s, %s, %s, eW for %s",diffFlowEventWeightsForCorrelationsEBEName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[rci].Data()),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8429 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
8430 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8431 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8432 | ||
8433 | // d) Book profiles; | |
8434 | // reduced correlations: | |
8435 | TString diffFlowCorrelationsProName = "fDiffFlowCorrelationsPro"; | |
8436 | diffFlowCorrelationsProName += fAnalysisLabel->Data(); | |
8437 | // corrections terms: | |
8438 | TString diffFlowCorrectionTermsForNUAProName = "fDiffFlowCorrectionTermsForNUAPro"; | |
8439 | diffFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
8440 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8441 | { | |
8442 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8443 | { | |
8444 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
8445 | { | |
8446 | // reduced correlations: | |
8447 | 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"); | |
8448 | fDiffFlowCorrelationsPro[t][pe][rci]->SetXTitle(ptEtaFlag[pe].Data()); | |
8449 | fDiffFlowCorrelationsProList[t][pe]->Add(fDiffFlowCorrelationsPro[t][pe][rci]); // to be improved (add dedicated list to hold reduced correlations) | |
8450 | } // end of for(Int_t rci=0;rci<4;rci++) // correlation index | |
8451 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8452 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8453 | // correction terms for nua: | |
8454 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
8455 | { | |
8456 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8457 | { | |
8458 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8459 | { | |
8460 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8461 | { | |
8462 | fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti] = new TProfile(Form("%s, %s, %s, %s, cti = %d",diffFlowCorrectionTermsForNUAProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1),Form("%s, %s, %s, %s, cti = %d",diffFlowCorrectionTermsForNUAProName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8463 | fDiffFlowCorrectionsProList[t][pe]->Add(fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]); | |
8464 | } | |
8465 | } | |
8466 | } | |
8467 | } | |
8468 | // e) Book histograms holding final results. | |
8469 | // reduced correlations: | |
8470 | TString diffFlowCorrelationsHistName = "fDiffFlowCorrelationsHist"; | |
8471 | diffFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
8472 | // corrections terms: | |
8473 | TString diffFlowCorrectionTermsForNUAHistName = "fDiffFlowCorrectionTermsForNUAHist"; | |
8474 | diffFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
8475 | // differential covariances: | |
8476 | TString diffFlowCovariancesName = "fDiffFlowCovariances"; | |
8477 | diffFlowCovariancesName += fAnalysisLabel->Data(); | |
8478 | // differential Q-cumulants: | |
8479 | TString diffFlowCumulantsName = "fDiffFlowCumulants"; | |
8480 | diffFlowCumulantsName += fAnalysisLabel->Data(); | |
8481 | // differential flow: | |
8482 | TString diffFlowName = "fDiffFlow"; | |
8483 | diffFlowName += fAnalysisLabel->Data(); | |
8484 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8485 | { | |
8486 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8487 | { | |
8488 | for(Int_t index=0;index<4;index++) | |
8489 | { | |
8490 | // reduced correlations: | |
8491 | 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]); | |
8492 | fDiffFlowCorrelationsHist[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data()); | |
8493 | fDiffFlowCorrelationsHistList[t][pe]->Add(fDiffFlowCorrelationsHist[t][pe][index]); | |
8494 | // differential Q-cumulants: | |
8495 | 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]); | |
8496 | fDiffFlowCumulants[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data()); | |
8497 | fDiffFlowCumulantsHistList[t][pe]->Add(fDiffFlowCumulants[t][pe][index]); | |
8498 | // differential flow estimates from Q-cumulants: | |
8499 | 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]); | |
8500 | fDiffFlow[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data()); | |
8501 | fDiffFlowHistList[t][pe]->Add(fDiffFlow[t][pe][index]); | |
8502 | } // end of for(Int_t index=0;index<4;index++) | |
8503 | for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index | |
8504 | { | |
8505 | // differential covariances: | |
8506 | 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]); | |
8507 | fDiffFlowCovariances[t][pe][covIndex]->SetXTitle(ptEtaFlag[pe].Data()); | |
8508 | fDiffFlowCovariancesHistList[t][pe]->Add(fDiffFlowCovariances[t][pe][covIndex]); | |
8509 | } // end of for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index | |
8510 | // products of both types of correlations: | |
8511 | TString diffFlowProductOfCorrelationsProName = "fDiffFlowProductOfCorrelationsPro"; | |
8512 | diffFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
8513 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8514 | { | |
8515 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8516 | { | |
8517 | 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]); | |
8518 | fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]->SetXTitle(ptEtaFlag[pe].Data()); | |
8519 | fDiffFlowProductOfCorrelationsProList[t][pe]->Add(fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]); | |
8520 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
8521 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8522 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8523 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8524 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8525 | // sums of event weights for reduced correlations: | |
8526 | TString diffFlowSumOfEventWeightsName = "fDiffFlowSumOfEventWeights"; | |
8527 | diffFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
8528 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
8529 | { | |
8530 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8531 | { | |
8532 | for(Int_t p=0;p<2;p++) // power of weights is either 1 or 2 | |
8533 | { | |
8534 | for(Int_t ew=0;ew<4;ew++) // index of reduced correlation | |
8535 | { | |
8536 | 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]); | |
8537 | fDiffFlowSumOfEventWeights[t][pe][p][ew]->SetXTitle(ptEtaFlag[pe].Data()); | |
8538 | fDiffFlowSumOfEventWeightsHistList[t][pe][p]->Add(fDiffFlowSumOfEventWeights[t][pe][p][ew]); // to be improved (add dedicated list to hold all this) | |
8539 | } | |
8540 | } | |
8541 | } | |
8542 | } | |
8543 | // sum of products of event weights for both types of correlations: | |
8544 | TString diffFlowSumOfProductOfEventWeightsName = "fDiffFlowSumOfProductOfEventWeights"; | |
8545 | diffFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
8546 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
8547 | { | |
8548 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8549 | { | |
8550 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8551 | { | |
8552 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8553 | { | |
8554 | 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]); | |
8555 | fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]->SetXTitle(ptEtaFlag[pe].Data()); | |
8556 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]->Add(fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]); | |
8557 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
8558 | } | |
8559 | } | |
8560 | } | |
8561 | } | |
8562 | // correction terms for nua: | |
8563 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
8564 | { | |
8565 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8566 | { | |
8567 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8568 | { | |
8569 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8570 | { | |
8571 | fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti] = new TH1D(Form("%s, %s, %s, %s, cti = %d",diffFlowCorrectionTermsForNUAHistName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1),Form("%s, %s, %s, %s, cti = %d",diffFlowCorrectionTermsForNUAHistName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8572 | fDiffFlowCorrectionsHistList[t][pe]->Add(fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti]); | |
8573 | } | |
8574 | } | |
8575 | } | |
8576 | } | |
8577 | ||
8578 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForDifferentialFlow() | |
8579 | ||
8580 | ||
8581 | //================================================================================================================================ | |
8582 | ||
8583 | /* | |
8584 | void AliFlowAnalysisWithQCumulants::CalculateCorrectionsForNUAForIntQcumulants() // to be improved (do I really need this method?) | |
8585 | { | |
8586 | // Calculate final corrections for non-uniform acceptance for Q-cumulants. | |
8587 | ||
8588 | // Corrections for non-uniform acceptance are stored in histogram fCorrectionsForNUA, | |
8589 | // binning of fCorrectionsForNUA is organized as follows: | |
8590 | // | |
8591 | // 1st bin: correction to QC{2} | |
8592 | // 2nd bin: correction to QC{4} | |
8593 | // 3rd bin: correction to QC{6} | |
8594 | // 4th bin: correction to QC{8} | |
8595 | ||
8596 | // shortcuts flags: | |
8597 | Int_t pW = (Int_t)(useParticleWeights); | |
8598 | ||
8599 | Int_t eW = -1; | |
8600 | ||
8601 | if(eventWeights == "exact") | |
8602 | { | |
8603 | eW = 0; | |
8604 | } | |
8605 | ||
8606 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms flag | |
8607 | { | |
8608 | if(!(fQCorrelations[pW][eW] && fQCorrections[pW][eW][sc] && fCorrections[pW][eW])) | |
8609 | { | |
8610 | cout<<"WARNING: fQCorrelations[pW][eW] && fQCorrections[pW][eW][sc] && fCorrections[pW][eW] is NULL in AFAWQC::CFCFNUAFIF() !!!!"<<endl; | |
8611 | cout<<"pW = "<<pW<<endl; | |
8612 | cout<<"eW = "<<eW<<endl; | |
8613 | cout<<"sc = "<<sc<<endl; | |
8614 | exit(0); | |
8615 | } | |
8616 | } | |
8617 | ||
8618 | // measured 2-, 4-, 6- and 8-particle azimuthal correlations (biased with non-uniform acceptance!): | |
8619 | Double_t two = fQCorrelations[pW][eW]->GetBinContent(1); // <<2>> | |
8620 | //Double_t four = fQCorrelations[pW][eW]->GetBinContent(11); // <<4>> | |
8621 | //Double_t six = fQCorrelations[pW][eW]->GetBinContent(24); // <<6>> | |
8622 | //Double_t eight = fQCorrelations[pW][eW]->GetBinContent(31); // <<8>> | |
8623 | ||
8624 | // correction terms to QC{2}: | |
8625 | // <<cos(n*phi1)>>^2 | |
8626 | Double_t two1stTerm = pow(fQCorrections[pW][eW][1]->GetBinContent(1),2); | |
8627 | // <<sin(n*phi1)>>^2 | |
8628 | Double_t two2ndTerm = pow(fQCorrections[pW][eW][0]->GetBinContent(1),2); | |
8629 | // final corrections for non-uniform acceptance to QC{2}: | |
8630 | Double_t correctionQC2 = -1.*two1stTerm-1.*two2ndTerm; | |
8631 | fCorrections[pW][eW]->SetBinContent(1,correctionQC2); | |
8632 | ||
8633 | // correction terms to QC{4}: | |
8634 | // <<cos(n*phi1)>> <<cos(n*(phi1-phi2-phi3))>> | |
8635 | Double_t four1stTerm = fQCorrections[pW][eW][1]->GetBinContent(1)*fQCorrections[pW][eW][1]->GetBinContent(3); | |
8636 | // <<sin(n*phi1)>> <<sin(n*(phi1-phi2-phi3))>> | |
8637 | Double_t four2ndTerm = fQCorrections[pW][eW][0]->GetBinContent(1)*fQCorrections[pW][eW][0]->GetBinContent(3); | |
8638 | // <<cos(n*(phi1+phi2))>>^2 | |
8639 | Double_t four3rdTerm = pow(fQCorrections[pW][eW][1]->GetBinContent(2),2); | |
8640 | // <<sin(n*(phi1+phi2))>>^2 | |
8641 | Double_t four4thTerm = pow(fQCorrections[pW][eW][0]->GetBinContent(2),2); | |
8642 | // <<cos(n*(phi1+phi2))>> (<<cos(n*phi1)>>^2 - <<sin(n*phi1)>>^2) | |
8643 | Double_t four5thTerm = fQCorrections[pW][eW][1]->GetBinContent(2) | |
8644 | * (pow(fQCorrections[pW][eW][1]->GetBinContent(1),2)-pow(fQCorrections[pW][eW][0]->GetBinContent(1),2)); | |
8645 | // <<sin(n*(phi1+phi2))>> <<cos(n*phi1)>> <<sin(n*phi1)>> | |
8646 | Double_t four6thTerm = fQCorrections[pW][eW][0]->GetBinContent(2) | |
8647 | * fQCorrections[pW][eW][1]->GetBinContent(1) | |
8648 | * fQCorrections[pW][eW][0]->GetBinContent(1); | |
8649 | // <<cos(n*(phi1-phi2))>> (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2) | |
8650 | Double_t four7thTerm = two*(pow(fQCorrections[pW][eW][1]->GetBinContent(1),2)+pow(fQCorrections[pW][eW][0]->GetBinContent(1),2)); | |
8651 | // (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2)^2 | |
8652 | Double_t four8thTerm = pow(pow(fQCorrections[pW][eW][1]->GetBinContent(1),2)+pow(fQCorrections[pW][eW][0]->GetBinContent(1),2),2); | |
8653 | // final correction to QC{4}: | |
8654 | Double_t correctionQC4 = -4.*four1stTerm+4.*four2ndTerm-four3rdTerm-four4thTerm | |
8655 | + 4.*four5thTerm+8.*four6thTerm+8.*four7thTerm-6.*four8thTerm; | |
8656 | fCorrections[pW][eW]->SetBinContent(2,correctionQC4); | |
8657 | ||
8658 | // ... to be improved (continued for 6th and 8th order) | |
8659 | ||
8660 | ||
8661 | } // end of AliFlowAnalysisWithQCumulants::CalculateCorrectionsForNUAForIntQcumulants() | |
8662 | */ | |
8663 | ||
8664 | //================================================================================================================================ | |
8665 | ||
8666 | ||
8667 | void AliFlowAnalysisWithQCumulants::CalculateQcumulantsCorrectedForNUAIntFlow() | |
8668 | { | |
8669 | // Calculate generalized Q-cumulants (cumulants corrected for non-unifom acceptance). | |
8670 | ||
8671 | // measured 2-, 4-, 6- and 8-particle correlations (biased by non-uniform acceptance!): | |
8672 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
8673 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
8674 | //Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
8675 | //Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
8676 | ||
8677 | // statistical error of measured 2-, 4-, 6- and 8-particle correlations: | |
8678 | //Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <<2>> | |
8679 | //Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <<4>> | |
8680 | //Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <<6>> | |
8681 | //Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <<8>> | |
8682 | ||
8683 | // QC{2}: | |
8684 | // <<cos(n*phi1)>>^2 | |
8685 | Double_t two1stTerm = pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2); | |
8686 | //Double_t two1stTermErrorSquared = pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(1),2); | |
8687 | // <<sin(n*phi1)>>^2 | |
8688 | Double_t two2ndTerm = pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2); | |
8689 | //Double_t two2ndTermErrorSquared = pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(1),2); | |
8690 | // generalized QC{2}: | |
8691 | Double_t gQC2 = two - two1stTerm - two2ndTerm; // to be improved (terminology, notation) | |
8692 | fIntFlowQcumulants->SetBinContent(1,gQC2); | |
8693 | //fIntFlowQcumulants->SetBinError(1,0.); // to be improved (propagate error) | |
8694 | ||
8695 | // QC{4}: | |
8696 | // <<cos(n*phi1)>> <<cos(n*(phi1-phi2-phi3))>> | |
8697 | Double_t four1stTerm = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1) | |
8698 | * fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(3); | |
8699 | // <<sin(n*phi1)>> <<sin(n*(phi1-phi2-phi3))>> | |
8700 | Double_t four2ndTerm = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1) | |
8701 | * fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(3); | |
8702 | // <<cos(n*(phi1+phi2))>>^2 | |
8703 | Double_t four3rdTerm = pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2),2); | |
8704 | // <<sin(n*(phi1+phi2))>>^2 | |
8705 | Double_t four4thTerm = pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2),2); | |
8706 | // <<cos(n*(phi1+phi2))>> (<<cos(n*phi1)>>^2 - <<sin(n*phi1)>>^2) | |
8707 | Double_t four5thTerm = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2) | |
8708 | * (pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2) | |
8709 | - pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2)); | |
8710 | // <<sin(n*(phi1+phi2))>> <<cos(n*phi1)>> <<sin(n*phi1)>> | |
8711 | Double_t four6thTerm = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2) | |
8712 | * fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1) | |
8713 | * fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1); | |
8714 | // <<cos(n*(phi1-phi2))>> (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2) | |
8715 | Double_t four7thTerm = two*(pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2) | |
8716 | + pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2)); | |
8717 | // (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2)^2 | |
8718 | Double_t four8thTerm = pow(pow(fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1),2) | |
8719 | + pow(fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1),2),2); | |
8720 | // generalized QC{4}: | |
8721 | Double_t gQC4 = four-2.*pow(two,2.)-4.*four1stTerm+4.*four2ndTerm-four3rdTerm | |
8722 | - four4thTerm+4.*four5thTerm+8.*four6thTerm+8.*four7thTerm-6.*four8thTerm; | |
8723 | fIntFlowQcumulants->SetBinContent(2,gQC4); | |
8724 | //fIntFlowQcumulants->SetBinError(2,0.); // to be improved (propagate error) | |
8725 | ||
8726 | // ... to be improved (continued for 6th and 8th order) | |
8727 | ||
2001bc3a | 8728 | // versus multiplicity: |
8729 | if(fApplyCorrectionForNUAVsM) | |
8730 | { | |
8731 | Int_t nBins = fIntFlowCorrelationsVsMPro[0]->GetNbinsX(); // to be improved (hardwired 0) | |
8732 | for(Int_t b=1;b<=nBins;b++) | |
8733 | { | |
8734 | two = fIntFlowCorrelationsVsMHist[0]->GetBinContent(b); // <<2>> vs M | |
8735 | four = fIntFlowCorrelationsVsMHist[1]->GetBinContent(b); // <<4>> vs M | |
8736 | // generalized QC{2} vs M: | |
8737 | two1stTerm = pow(fIntFlowCorrectionTermsForNUAVsMPro[1][0]->GetBinContent(b),2); // <<cos(n*phi1)>>^2 vs M | |
8738 | two2ndTerm = pow(fIntFlowCorrectionTermsForNUAVsMPro[0][0]->GetBinContent(b),2); // <<sin(n*phi1)>>^2 vs M | |
8739 | gQC2 = two - two1stTerm - two2ndTerm; | |
8740 | fIntFlowQcumulantsVsM[0]->SetBinContent(b,gQC2); | |
8741 | // generalized QC{4} vs M: | |
8742 | four1stTerm = fIntFlowCorrectionTermsForNUAVsMPro[1][0]->GetBinContent(b) | |
8743 | * fIntFlowCorrectionTermsForNUAVsMPro[1][2]->GetBinContent(b); // <<cos(n*phi1)>> <<cos(n*(phi1-phi2-phi3))>> vs M | |
8744 | four2ndTerm = fIntFlowCorrectionTermsForNUAVsMPro[0][0]->GetBinContent(b) | |
8745 | * fIntFlowCorrectionTermsForNUAVsMPro[0][2]->GetBinContent(b); // <<sin(n*phi1)>> <<sin(n*(phi1-phi2-phi3))>> vs M | |
8746 | four3rdTerm = pow(fIntFlowCorrectionTermsForNUAVsMPro[1][1]->GetBinContent(b),2); // <<cos(n*(phi1+phi2))>>^2 vs M | |
8747 | four4thTerm = pow(fIntFlowCorrectionTermsForNUAVsMPro[0][1]->GetBinContent(b),2); // <<sin(n*(phi1+phi2))>>^2 vs M | |
8748 | four5thTerm = fIntFlowCorrectionTermsForNUAVsMPro[1][1]->GetBinContent(b) | |
8749 | * (pow(fIntFlowCorrectionTermsForNUAVsMPro[1][0]->GetBinContent(b),2) | |
8750 | - pow(fIntFlowCorrectionTermsForNUAVsMPro[0][0]->GetBinContent(b),2)); //<<cos(n*(phi1+phi2))>> (<<cos(n*phi1)>>^2-<<sin(n*phi1)>>^2) vs M | |
8751 | four6thTerm = fIntFlowCorrectionTermsForNUAVsMPro[0][1]->GetBinContent(b) | |
8752 | * fIntFlowCorrectionTermsForNUAVsMPro[1][0]->GetBinContent(b) | |
8753 | * fIntFlowCorrectionTermsForNUAVsMPro[0][0]->GetBinContent(b); // <<sin(n*(phi1+phi2))>> <<cos(n*phi1)>> <<sin(n*phi1)>> vs M | |
8754 | four7thTerm = two*(pow(fIntFlowCorrectionTermsForNUAVsMPro[1][0]->GetBinContent(b),2) | |
8755 | + pow(fIntFlowCorrectionTermsForNUAVsMPro[0][0]->GetBinContent(b),2)); // <<cos(n*(phi1-phi2))>> (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2) vs M | |
8756 | four8thTerm = pow(pow(fIntFlowCorrectionTermsForNUAVsMPro[1][0]->GetBinContent(b),2) | |
8757 | + pow(fIntFlowCorrectionTermsForNUAVsMPro[0][0]->GetBinContent(b),2),2); // (<<cos(n*phi1)>>^2 + <<sin(n*phi1)>>^2)^2 | |
8758 | gQC4 = four-2.*pow(two,2.)-4.*four1stTerm+4.*four2ndTerm-four3rdTerm | |
8759 | - four4thTerm+4.*four5thTerm+8.*four6thTerm+8.*four7thTerm-6.*four8thTerm; | |
8760 | fIntFlowQcumulantsVsM[1]->SetBinContent(b,gQC4); | |
8761 | } // end of for(Int_t b=1;b<=nBins;b++) | |
8762 | } // end of if(fApplyCorrectionForNUAVsM) | |
8763 | ||
489d5531 | 8764 | } // end of void AliFlowAnalysisWithQCumulants::CalculateQcumulantsCorrectedForNUAIntFlow() |
8765 | ||
489d5531 | 8766 | //================================================================================================================================ |
8767 | ||
489d5531 | 8768 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectedForNUA() |
8769 | { | |
8770 | // Calculate integrated flow from generalized Q-cumulants (corrected for non-uniform acceptance). | |
8771 | ||
8772 | // to be improved: add protection for NULL pointers, propagate statistical errors from | |
8773 | // measured correlations and correction terms | |
8774 | ||
8775 | // generalized Q-cumulants: | |
8776 | Double_t qc2 = fIntFlowQcumulants->GetBinContent(1); // QC{2} | |
8777 | Double_t qc4 = fIntFlowQcumulants->GetBinContent(2); // QC{4} | |
8778 | //Double_t qc6 = fIntFlowQcumulants->GetBinContent(3); // QC{6} | |
8779 | //Double_t qc8 = fIntFlowQcumulants->GetBinContent(4); // QC{8} | |
8780 | ||
8781 | // integrated flow estimates: | |
8782 | Double_t v2 = 0.; // v{2,QC} | |
8783 | Double_t v4 = 0.; // v{4,QC} | |
8784 | //Double_t v6 = 0.; // v{6,QC} | |
8785 | //Double_t v8 = 0.; // v{8,QC} | |
8786 | ||
8787 | // calculate integrated flow estimates from generalized Q-cumulants: | |
8788 | if(qc2>=0.) v2 = pow(qc2,1./2.); | |
8789 | if(qc4<=0.) v4 = pow(-1.*qc4,1./4.); | |
8790 | //if(qc6>=0.) v6 = pow((1./4.)*qc6,1./6.); | |
8791 | //if(qc8<=0.) v8 = pow((-1./33.)*qc8,1./8.); | |
8792 | ||
8793 | // store integrated flow estimates from generalized Q-cumulants: | |
8794 | fIntFlow->SetBinContent(1,v2); | |
8795 | fIntFlow->SetBinContent(2,v4); | |
8796 | //fIntFlow->SetBinContent(3,v6); | |
8797 | //fIntFlow->SetBinContent(4,v8); | |
0328db2d | 8798 | |
8799 | /* | |
8800 | // propagate correctly error by including non-isotropic terms (to be improved - moved somewhere else): | |
8801 | // correlations: | |
8802 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
8803 | //Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
8804 | //Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
8805 | //Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
8806 | // statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: | |
8807 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <2> | |
8808 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <4> | |
8809 | //Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <6> | |
8810 | //Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <8> | |
8811 | // nua terms: | |
8812 | Double_t c1 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1); // <<cos(phi1)>> | |
8813 | Double_t c2 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
8814 | Double_t c3 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
8815 | Double_t s1 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1); // <<sin(phi1)>> | |
8816 | Double_t s2 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
8817 | Double_t s3 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
8818 | // statistical errors of nua terms: | |
8819 | Double_t c1Error = fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(1); // statistical error of <cos(phi1)> | |
8820 | Double_t c2Error = fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(2); // statistical error of <cos(phi1+phi2)> | |
8821 | Double_t c3Error = fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(3); // statistical error of <cos(phi1-phi2-phi3)> | |
8822 | Double_t s1Error = fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(1); // statistical error of <sin(phi1)> | |
8823 | Double_t s2Error = fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(2); // statistical error of <sin(phi1+phi2)> | |
8824 | Double_t s3Error = fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(3); // statistical error of <sin(phi1-phi2-phi3)> | |
8825 | ||
8826 | // covariances for nua: | |
8827 | Double_t wCov24 = fIntFlowCovariances->GetBinContent(1); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) | |
8828 | Double_t wCov2c1 = fIntFlowCovariancesNUA->GetBinContent(1); | |
8829 | Double_t wCov2s1 = fIntFlowCovariancesNUA->GetBinContent(2); | |
8830 | Double_t wCovc1s1 = fIntFlowCovariancesNUA->GetBinContent(3); | |
8831 | Double_t wCov2c2 = fIntFlowCovariancesNUA->GetBinContent(4); | |
8832 | Double_t wCov2s2 = fIntFlowCovariancesNUA->GetBinContent(5); | |
8833 | Double_t wCov2c3 = fIntFlowCovariancesNUA->GetBinContent(6); | |
8834 | Double_t wCov2s3 = fIntFlowCovariancesNUA->GetBinContent(7); | |
8835 | Double_t wCov4c1 = fIntFlowCovariancesNUA->GetBinContent(8); | |
8836 | Double_t wCov4s1 = fIntFlowCovariancesNUA->GetBinContent(9); | |
8837 | Double_t wCov4c2 = fIntFlowCovariancesNUA->GetBinContent(10); | |
8838 | Double_t wCov4s2 = fIntFlowCovariancesNUA->GetBinContent(11); | |
8839 | Double_t wCov4c3 = fIntFlowCovariancesNUA->GetBinContent(12); | |
8840 | Double_t wCov4s3 = fIntFlowCovariancesNUA->GetBinContent(13); | |
8841 | Double_t wCovc1c2 = fIntFlowCovariancesNUA->GetBinContent(14); | |
8842 | Double_t wCovc1s2 = fIntFlowCovariancesNUA->GetBinContent(15); | |
8843 | Double_t wCovc1c3 = fIntFlowCovariancesNUA->GetBinContent(16); | |
8844 | Double_t wCovc1s3 = fIntFlowCovariancesNUA->GetBinContent(17); | |
8845 | Double_t wCovs1c2 = fIntFlowCovariancesNUA->GetBinContent(18); | |
8846 | Double_t wCovs1s2 = fIntFlowCovariancesNUA->GetBinContent(19); | |
8847 | Double_t wCovs1c3 = fIntFlowCovariancesNUA->GetBinContent(20); | |
8848 | Double_t wCovs1s3 = fIntFlowCovariancesNUA->GetBinContent(21); | |
8849 | Double_t wCovc2s2 = fIntFlowCovariancesNUA->GetBinContent(22); | |
8850 | Double_t wCovc2c3 = fIntFlowCovariancesNUA->GetBinContent(23); | |
8851 | Double_t wCovc2s3 = fIntFlowCovariancesNUA->GetBinContent(24); | |
8852 | Double_t wCovs2c3 = fIntFlowCovariancesNUA->GetBinContent(25); | |
8853 | Double_t wCovs2s3 = fIntFlowCovariancesNUA->GetBinContent(26); | |
8854 | Double_t wCovc3s3 = fIntFlowCovariancesNUA->GetBinContent(27); | |
8855 | */ | |
8856 | ||
8857 | /* | |
8858 | // 2nd order: | |
8859 | Double_t err2ndSquared = (1./(4.*pow(v2,2.))) | |
8860 | * (pow(twoError,2.)+4.*pow(s1*s1Error,2.)+4.*pow(c1*c1Error,2.) | |
8861 | // to be improved (add eventually also covariance terms) | |
8862 | //- 4.*c1*wCov2c1-4.*s1*wCov2s1+8.*c1*s1*wCovc1s1 | |
8863 | ); | |
8864 | if(err2ndSquared>=0.) | |
8865 | { | |
8866 | fIntFlow->SetBinError(1,pow(err2ndSquared,0.5)); // to be improved (enabled eventually) | |
8867 | } else | |
8868 | { | |
8869 | cout<<"WARNING: Statistical error of v{2,QC} (with non-isotropic terms included) is imaginary !!!! "<<endl; | |
8870 | } | |
8871 | // 4th order: | |
8872 | Double_t err4thSquared = (1./(16.*pow(v4,6.))) | |
8873 | * (pow(4.*pow(two,2.)-8.*(pow(c1,2.)+pow(s1,2.)),2.)*pow(twoError,2.) | |
8874 | + pow(fourError,2.) | |
8875 | + 16.*pow(6.*pow(c1,3.)-2.*c1*c2+c3+6.*c1*pow(s1,2.)-2.*s1*s2-4.*c1*two,2.)*pow(c1Error,2.) | |
8876 | + 16.*pow(6.*pow(c1,2.)*s1+2.*c2*s1+6.*pow(s1,3.)-2.*c1*s2-s3-4.*s1*two,2.)*pow(s1Error,2.) | |
8877 | + 4.*pow(c2-2.*(pow(c1,2.)-pow(s1,2.)),2.)*pow(c2Error,2.) | |
8878 | + 4.*pow(4*c1*s1-s2,2.)*pow(s2Error,2.) | |
8879 | + 16.*pow(c1,2.)*pow(c3Error,2.) | |
8880 | + 16.*pow(s1,2.)*pow(s3Error,2.) | |
8881 | // to be improved (add eventually also covariance terms) | |
8882 | // ... | |
8883 | ); | |
8884 | if(err4thSquared>=0.) | |
8885 | { | |
8886 | fIntFlow->SetBinError(2,pow(err4thSquared,0.5)); // to be improved (enabled eventually) | |
8887 | } else | |
8888 | { | |
8889 | cout<<"WARNING: Statistical error of v{4,QC} (with non-isotropic terms included) is imaginary !!!! "<<endl; | |
8890 | } | |
8891 | */ | |
8892 | ||
489d5531 | 8893 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectedForNUA() |
8894 | ||
8895 | ||
8896 | //================================================================================================================================ | |
8897 | ||
8898 | ||
8899 | void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUAIntFlow() | |
8900 | { | |
0328db2d | 8901 | // From profile fIntFlowCorrectionTermsForNUAPro[sc] access measured correction terms for NUA |
489d5531 | 8902 | // and their spread, correctly calculate the statistical errors and store the final |
0328db2d | 8903 | // results and statistical errors for correction terms for NUA in histogram fIntFlowCorrectionTermsForNUAHist[sc]. |
489d5531 | 8904 | // |
8905 | // Remark: Statistical error of correction temrs is calculated as: | |
8906 | // | |
8907 | // statistical error = termA * spread * termB: | |
8908 | // termA = sqrt{sum_{i=1}^{N} w^2}/(sum_{i=1}^{N} w) | |
8909 | // termB = 1/sqrt(1-termA^2) | |
8910 | ||
489d5531 | 8911 | for(Int_t sc=0;sc<2;sc++) // sin or cos correction terms |
8912 | { | |
0328db2d | 8913 | for(Int_t ci=1;ci<=3;ci++) // correction term index |
489d5531 | 8914 | { |
8915 | Double_t correction = fIntFlowCorrectionTermsForNUAPro[sc]->GetBinContent(ci); | |
0328db2d | 8916 | Double_t spread = fIntFlowCorrectionTermsForNUAPro[sc]->GetBinError(ci); |
8917 | Double_t sumOfLinearEventWeights = fIntFlowSumOfEventWeightsNUA[sc][0]->GetBinContent(ci); | |
8918 | Double_t sumOfQuadraticEventWeights = fIntFlowSumOfEventWeightsNUA[sc][1]->GetBinContent(ci); | |
8919 | Double_t termA = 0.; | |
8920 | Double_t termB = 0.; | |
8921 | if(sumOfLinearEventWeights) | |
8922 | { | |
8923 | termA = pow(sumOfQuadraticEventWeights,0.5)/sumOfLinearEventWeights; | |
8924 | } else | |
8925 | { | |
8926 | cout<<"WARNING: sumOfLinearEventWeights == 0 in AFAWQC::FCTFNIF() !!!!"<<endl; | |
8927 | cout<<" (for "<<ci<<"-th correction term)"<<endl; | |
8928 | } | |
489d5531 | 8929 | if(1.-pow(termA,2.) > 0.) |
8930 | { | |
8931 | termB = 1./pow(1-pow(termA,2.),0.5); | |
8932 | } else | |
8933 | { | |
0328db2d | 8934 | cout<<"WARNING: 1.-pow(termA,2.) <= 0 in AFAWQC::FCTFNIF() !!!!"<<endl; |
8935 | cout<<" (for "<<ci<<"-th correction term)"<<endl; | |
489d5531 | 8936 | } |
8937 | Double_t statisticalError = termA * spread * termB; | |
489d5531 | 8938 | fIntFlowCorrectionTermsForNUAHist[sc]->SetBinContent(ci,correction); |
0328db2d | 8939 | fIntFlowCorrectionTermsForNUAHist[sc]->SetBinError(ci,statisticalError); |
489d5531 | 8940 | } // end of for(Int_t ci=1;ci<=10;ci++) // correction term index |
8941 | } // end of for(Int sc=0;sc<2;sc++) // sin or cos correction terms | |
8942 | ||
8943 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUAIntFlow() | |
8944 | ||
8945 | ||
8946 | //================================================================================================================================ | |
8947 | ||
8948 | ||
8949 | void AliFlowAnalysisWithQCumulants::GetPointersForNestedLoopsHistograms() | |
8950 | { | |
8951 | // Get pointers to all objects relevant for calculations with nested loops. | |
8952 | ||
8953 | TList *nestedLoopsList = dynamic_cast<TList*>(fHistList->FindObject("Nested Loops")); | |
8954 | if(nestedLoopsList) | |
8955 | { | |
8956 | this->SetNestedLoopsList(nestedLoopsList); | |
8957 | } else | |
8958 | { | |
8959 | cout<<"WARNING: nestedLoopsList is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
8960 | exit(0); | |
8961 | } | |
8962 | ||
8963 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?) | |
8964 | TString typeFlag[2] = {"RP","POI"}; // to be improved (should I promote this to data members?) | |
8965 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; // to be improved (should I promote this to data members?) | |
8966 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; // to be improved (should I promote this to data members?) | |
8967 | ||
8968 | TString evaluateNestedLoopsName = "fEvaluateNestedLoops"; | |
8969 | evaluateNestedLoopsName += fAnalysisLabel->Data(); | |
8970 | TProfile *evaluateNestedLoops = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(evaluateNestedLoopsName.Data())); | |
8971 | Bool_t bEvaluateIntFlowNestedLoops = kFALSE; | |
8972 | Bool_t bEvaluateDiffFlowNestedLoops = kFALSE; | |
8973 | if(evaluateNestedLoops) | |
8974 | { | |
8975 | this->SetEvaluateNestedLoops(evaluateNestedLoops); | |
8976 | bEvaluateIntFlowNestedLoops = (Int_t)evaluateNestedLoops->GetBinContent(1); | |
8977 | bEvaluateDiffFlowNestedLoops = (Int_t)evaluateNestedLoops->GetBinContent(2); | |
8978 | } | |
8979 | // nested loops relevant for integrated flow: | |
8980 | if(bEvaluateIntFlowNestedLoops) | |
8981 | { | |
8982 | // correlations: | |
8983 | TString intFlowDirectCorrelationsName = "fIntFlowDirectCorrelations"; | |
8984 | intFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
8985 | TProfile *intFlowDirectCorrelations = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(intFlowDirectCorrelationsName.Data())); | |
8986 | if(intFlowDirectCorrelations) | |
8987 | { | |
8988 | this->SetIntFlowDirectCorrelations(intFlowDirectCorrelations); | |
8989 | } else | |
8990 | { | |
8991 | cout<<"WARNING: intFlowDirectCorrelations is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
8992 | exit(0); | |
8993 | } | |
8994 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
8995 | { | |
8996 | TString intFlowExtraDirectCorrelationsName = "fIntFlowExtraDirectCorrelations"; | |
8997 | intFlowExtraDirectCorrelationsName += fAnalysisLabel->Data(); | |
8998 | TProfile *intFlowExtraDirectCorrelations = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(intFlowExtraDirectCorrelationsName.Data())); | |
8999 | if(intFlowExtraDirectCorrelations) | |
9000 | { | |
9001 | this->SetIntFlowExtraDirectCorrelations(intFlowExtraDirectCorrelations); | |
9002 | } else | |
9003 | { | |
9004 | cout<<"WARNING: intFlowExtraDirectCorrelations is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
9005 | exit(0); | |
9006 | } | |
9007 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
9008 | // correction terms for non-uniform acceptance: | |
9009 | TString intFlowDirectCorrectionTermsForNUAName = "fIntFlowDirectCorrectionTermsForNUA"; | |
9010 | intFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
9011 | TProfile *intFlowDirectCorrectionTermsForNUA[2] = {NULL}; | |
9012 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
9013 | { | |
9014 | intFlowDirectCorrectionTermsForNUA[sc] = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(Form("%s: %s terms",intFlowDirectCorrectionTermsForNUAName.Data(),sinCosFlag[sc].Data()))); | |
9015 | if(intFlowDirectCorrectionTermsForNUA[sc]) | |
9016 | { | |
9017 | this->SetIntFlowDirectCorrectionTermsForNUA(intFlowDirectCorrectionTermsForNUA[sc],sc); | |
9018 | } else | |
9019 | { | |
9020 | cout<<"WARNING: intFlowDirectCorrectionTermsForNUA[sc] is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
9021 | cout<<"sc = "<<sc<<endl; | |
9022 | exit(0); | |
9023 | } | |
9024 | } // end of for(Int_t sc=0;sc<2;sc++) | |
9025 | } // end of if(bEvaluateIntFlowNestedLoops) | |
9026 | ||
9027 | // nested loops relevant for differential flow: | |
9028 | if(bEvaluateDiffFlowNestedLoops) | |
9029 | { | |
9030 | // correlations: | |
9031 | TString diffFlowDirectCorrelationsName = "fDiffFlowDirectCorrelations"; | |
9032 | diffFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
9033 | TProfile *diffFlowDirectCorrelations[2][2][4] = {{{NULL}}}; | |
9034 | for(Int_t t=0;t<2;t++) | |
9035 | { | |
9036 | for(Int_t pe=0;pe<2;pe++) | |
9037 | { | |
9038 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
9039 | { | |
9040 | diffFlowDirectCorrelations[t][pe][ci] = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(Form("%s, %s, %s, %s",diffFlowDirectCorrelationsName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),reducedCorrelationIndex[ci].Data()))); | |
9041 | if(diffFlowDirectCorrelations[t][pe][ci]) | |
9042 | { | |
9043 | this->SetDiffFlowDirectCorrelations(diffFlowDirectCorrelations[t][pe][ci],t,pe,ci); | |
9044 | } else | |
9045 | { | |
9046 | cout<<"WARNING: diffFlowDirectCorrelations[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
9047 | cout<<"t = "<<t<<endl; | |
9048 | cout<<"pe = "<<pe<<endl; | |
9049 | cout<<"ci = "<<ci<<endl; | |
9050 | } | |
9051 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
9052 | } // end of for(Int_t pe=0;pe<2;pe++) | |
9053 | } // end of for(Int_t t=0;t<2;t++) | |
9054 | // correction terms for non-uniform acceptance: | |
9055 | TString diffFlowDirectCorrectionTermsForNUAName = "fDiffFlowDirectCorrectionTermsForNUA"; | |
9056 | diffFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
9057 | TProfile *diffFlowDirectCorrectionTermsForNUA[2][2][2][10] = {{{{NULL}}}}; | |
9058 | for(Int_t t=0;t<2;t++) | |
9059 | { | |
9060 | for(Int_t pe=0;pe<2;pe++) | |
9061 | { | |
9062 | // correction terms for NUA: | |
9063 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9064 | { | |
9065 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
9066 | { | |
9067 | diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti] = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(Form("%s, %s, %s, %s, cti = %d",diffFlowDirectCorrectionTermsForNUAName.Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data(),sinCosFlag[sc].Data(),cti+1))); | |
9068 | if(diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti]) | |
9069 | { | |
9070 | this->SetDiffFlowDirectCorrectionTermsForNUA(diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti],t,pe,sc,cti); | |
9071 | } else | |
9072 | { | |
9073 | cout<<"WARNING: diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
9074 | cout<<"t = "<<t<<endl; | |
9075 | cout<<"pe = "<<pe<<endl; | |
9076 | cout<<"sc = "<<sc<<endl; | |
9077 | cout<<"cti = "<<cti<<endl; | |
9078 | } | |
9079 | } // end of for(Int_t cti=0;cti<9;cti++) // correction term index | |
9080 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9081 | } // end of for(Int_t pe=0;pe<2;pe++) | |
9082 | } // end of for(Int_t t=0;t<2;t++) | |
9083 | // number of RPs and POIs in selected pt and eta bins for cross-checkings: | |
9084 | TString noOfParticlesInBinName = "fNoOfParticlesInBin"; | |
9085 | TH1D *noOfParticlesInBin = NULL; | |
9086 | noOfParticlesInBin = dynamic_cast<TH1D*>(nestedLoopsList->FindObject(noOfParticlesInBinName.Data())); | |
9087 | if(noOfParticlesInBin) | |
9088 | { | |
9089 | this->SetNoOfParticlesInBin(noOfParticlesInBin); | |
9090 | } else | |
9091 | { | |
9092 | cout<<endl; | |
9093 | cout<<" WARNING (QC): noOfParticlesInBin is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
9094 | cout<<endl; | |
9095 | } | |
9096 | } // end of if(bEvaluateDiffFlowNestedLoops) | |
9097 | ||
9098 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForNestedLoopsHistograms() | |
9099 | ||
9100 | ||
9101 | //================================================================================================================================ | |
9102 | ||
9103 | ||
9104 | void AliFlowAnalysisWithQCumulants::StoreHarmonic() | |
9105 | { | |
9106 | // Store flow harmonic in common control histograms. | |
9107 | ||
9108 | (fCommonHists->GetHarmonic())->Fill(0.5,fHarmonic); | |
9109 | (fCommonHists2nd->GetHarmonic())->Fill(0.5,fHarmonic); | |
9110 | (fCommonHists4th->GetHarmonic())->Fill(0.5,fHarmonic); | |
9111 | (fCommonHists6th->GetHarmonic())->Fill(0.5,fHarmonic); | |
9112 | (fCommonHists8th->GetHarmonic())->Fill(0.5,fHarmonic); | |
9113 | ||
9114 | } // end of void AliFlowAnalysisWithQCumulants::StoreHarmonic() | |
9115 | ||
9116 | ||
9117 | //================================================================================================================================ | |
9118 | ||
9119 | ||
9120 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelationsUsingParticleWeights(TString type, TString ptOrEta) // type = RP or POI | |
9121 | { | |
9122 | // Calculate all correlations needed for differential flow using particle weights. | |
9123 | ||
9124 | Int_t t = -1; // type flag | |
9125 | Int_t pe = -1; // ptEta flag | |
9126 | ||
9127 | if(type == "RP") | |
9128 | { | |
9129 | t = 0; | |
9130 | } else if(type == "POI") | |
9131 | { | |
9132 | t = 1; | |
9133 | } | |
9134 | ||
9135 | if(ptOrEta == "Pt") | |
9136 | { | |
9137 | pe = 0; | |
9138 | } else if(ptOrEta == "Eta") | |
9139 | { | |
9140 | pe = 1; | |
9141 | } | |
9142 | ||
9143 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9144 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
9145 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
9146 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9147 | ||
9148 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
9149 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
9150 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
9151 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
9152 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
9153 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
9154 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
9155 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
9156 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
9157 | ||
9158 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
9159 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
9160 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
9161 | Double_t dSM1p3k = (*fSMpk)(0,3); | |
9162 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
9163 | Double_t dSM3p1k = (*fSMpk)(2,1); | |
9164 | ||
9165 | // looping over all bins and calculating reduced correlations: | |
9166 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9167 | { | |
9168 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): | |
9169 | Double_t p1n0kRe = 0.; | |
9170 | Double_t p1n0kIm = 0.; | |
9171 | ||
9172 | // number of POIs in particular (pt,eta) bin): | |
9173 | Double_t mp = 0.; | |
9174 | ||
9175 | // real and imaginary parts of q_{m*n,k}: | |
9176 | // (weighted Q-vector evaluated for particles which are both RPs and POIs in particular (pt,eta) bin) | |
9177 | Double_t q1n2kRe = 0.; | |
9178 | Double_t q1n2kIm = 0.; | |
9179 | Double_t q2n1kRe = 0.; | |
9180 | Double_t q2n1kIm = 0.; | |
9181 | ||
9182 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
9183 | Double_t s1p1k = 0.; | |
9184 | Double_t s1p2k = 0.; | |
9185 | Double_t s1p3k = 0.; | |
9186 | ||
9187 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
9188 | Double_t dM0111 = 0.; | |
9189 | ||
9190 | if(type == "POI") | |
9191 | { | |
9192 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9193 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9194 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9195 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9196 | ||
9197 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9198 | ||
9199 | t = 1; // typeFlag = RP or POI | |
9200 | ||
9201 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
9202 | q1n2kRe = fReRPQ1dEBE[2][pe][0][2]->GetBinContent(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
9203 | * fReRPQ1dEBE[2][pe][0][2]->GetBinEntries(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
9204 | q1n2kIm = fImRPQ1dEBE[2][pe][0][2]->GetBinContent(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
9205 | * fImRPQ1dEBE[2][pe][0][2]->GetBinEntries(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
9206 | q2n1kRe = fReRPQ1dEBE[2][pe][1][1]->GetBinContent(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
9207 | * fReRPQ1dEBE[2][pe][1][1]->GetBinEntries(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
9208 | q2n1kIm = fImRPQ1dEBE[2][pe][1][1]->GetBinContent(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
9209 | * fImRPQ1dEBE[2][pe][1][1]->GetBinEntries(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
9210 | ||
9211 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
9212 | s1p1k = pow(fs1dEBE[2][pe][1]->GetBinContent(b)*fs1dEBE[2][pe][1]->GetBinEntries(b),1.); | |
9213 | s1p2k = pow(fs1dEBE[2][pe][2]->GetBinContent(b)*fs1dEBE[2][pe][2]->GetBinEntries(b),1.); | |
9214 | s1p3k = pow(fs1dEBE[2][pe][3]->GetBinContent(b)*fs1dEBE[2][pe][3]->GetBinEntries(b),1.); | |
9215 | ||
9216 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
9217 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
9218 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
9219 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
9220 | } | |
9221 | else if(type == "RP") | |
9222 | { | |
9223 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
9224 | q1n2kRe = fReRPQ1dEBE[0][pe][0][2]->GetBinContent(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
9225 | * fReRPQ1dEBE[0][pe][0][2]->GetBinEntries(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
9226 | q1n2kIm = fImRPQ1dEBE[0][pe][0][2]->GetBinContent(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
9227 | * fImRPQ1dEBE[0][pe][0][2]->GetBinEntries(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
9228 | q2n1kRe = fReRPQ1dEBE[0][pe][1][1]->GetBinContent(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
9229 | * fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
9230 | q2n1kIm = fImRPQ1dEBE[0][pe][1][1]->GetBinContent(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
9231 | * fImRPQ1dEBE[0][pe][1][1]->GetBinEntries(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
9232 | ||
9233 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
9234 | s1p1k = pow(fs1dEBE[0][pe][1]->GetBinContent(b)*fs1dEBE[0][pe][1]->GetBinEntries(b),1.); | |
9235 | s1p2k = pow(fs1dEBE[0][pe][2]->GetBinContent(b)*fs1dEBE[0][pe][2]->GetBinEntries(b),1.); | |
9236 | s1p3k = pow(fs1dEBE[0][pe][3]->GetBinContent(b)*fs1dEBE[0][pe][3]->GetBinEntries(b),1.); | |
9237 | ||
9238 | // to be improved (cross-checked): | |
9239 | p1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9240 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9241 | p1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9242 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9243 | ||
9244 | mp = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9245 | ||
9246 | t = 0; // typeFlag = RP or POI | |
9247 | ||
9248 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
9249 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
9250 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
9251 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
9252 | //............................................................................................... | |
9253 | } | |
9254 | ||
9255 | // 2'-particle correlation: | |
9256 | Double_t two1n1nW0W1 = 0.; | |
9257 | if(mp*dSM1p1k-s1p1k) | |
9258 | { | |
9259 | two1n1nW0W1 = (p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k-s1p1k) | |
9260 | / (mp*dSM1p1k-s1p1k); | |
9261 | ||
9262 | // fill profile to get <<2'>> | |
9263 | fDiffFlowCorrelationsPro[t][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nW0W1,mp*dSM1p1k-s1p1k); | |
9264 | // histogram to store <2'> e-b-e (needed in some other methods): | |
9265 | fDiffFlowCorrelationsEBE[t][pe][0]->SetBinContent(b,two1n1nW0W1); | |
9266 | fDiffFlowEventWeightsForCorrelationsEBE[t][pe][0]->SetBinContent(b,mp*dSM1p1k-s1p1k); | |
9267 | } // end of if(mp*dSM1p1k-s1p1k) | |
9268 | ||
9269 | // 4'-particle correlation: | |
9270 | Double_t four1n1n1n1nW0W1W1W1 = 0.; | |
9271 | if(dM0111) | |
9272 | { | |
9273 | four1n1n1n1nW0W1W1W1 = ((pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
9274 | - q2n1kRe*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.)) | |
9275 | - 2.*q2n1kIm*dReQ1n1k*dImQ1n1k | |
9276 | - p1n0kRe*(dReQ1n1k*dReQ2n2k+dImQ1n1k*dImQ2n2k) | |
9277 | + p1n0kIm*(dImQ1n1k*dReQ2n2k-dReQ1n1k*dImQ2n2k) | |
9278 | - 2.*dSM1p2k*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
9279 | - 2.*(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*s1p1k | |
9280 | + 6.*(q1n2kRe*dReQ1n1k+q1n2kIm*dImQ1n1k) | |
9281 | + 1.*(q2n1kRe*dReQ2n2k+q2n1kIm*dImQ2n2k) | |
9282 | + 2.*(p1n0kRe*dReQ1n3k+p1n0kIm*dImQ1n3k) | |
9283 | + 2.*s1p1k*dSM1p2k | |
9284 | - 6.*s1p3k) | |
9285 | / dM0111; // to be improved (notation of dM0111) | |
9286 | ||
9287 | // fill profile to get <<4'>> | |
9288 | fDiffFlowCorrelationsPro[t][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nW0W1W1W1,dM0111); | |
9289 | // histogram to store <4'> e-b-e (needed in some other methods): | |
9290 | fDiffFlowCorrelationsEBE[t][pe][1]->SetBinContent(b,four1n1n1n1nW0W1W1W1); | |
9291 | fDiffFlowEventWeightsForCorrelationsEBE[t][pe][1]->SetBinContent(b,dM0111); | |
9292 | } // end of if(dM0111) | |
9293 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9294 | ||
9295 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelationsUsingParticleWeights(TString type, TString ptOrEta); // type = RP or POI | |
9296 | ||
9297 | ||
9298 | //================================================================================================================================ | |
9299 | ||
9300 | ||
9301 | void AliFlowAnalysisWithQCumulants::FillCommonControlHistograms(AliFlowEventSimple *anEvent) | |
9302 | { | |
9303 | // Fill common control histograms. | |
9304 | ||
9305 | Int_t nRP = anEvent->GetEventNSelTracksRP(); // number of RPs (i.e. number of particles used to determine the reaction plane) | |
9306 | fCommonHists->FillControlHistograms(anEvent); | |
9307 | if(nRP>1) | |
9308 | { | |
9309 | fCommonHists2nd->FillControlHistograms(anEvent); | |
9310 | if(nRP>3) | |
9311 | { | |
9312 | fCommonHists4th->FillControlHistograms(anEvent); | |
9313 | if(nRP>5) | |
9314 | { | |
9315 | fCommonHists6th->FillControlHistograms(anEvent); | |
9316 | if(nRP>7) | |
9317 | { | |
9318 | fCommonHists8th->FillControlHistograms(anEvent); | |
9319 | } // end of if(nRP>7) | |
9320 | } // end of if(nRP>5) | |
9321 | } // end of if(nRP>3) | |
9322 | } // end of if(nRP>1) | |
9323 | ||
9324 | } // end of void AliFlowAnalysisWithQCumulants::FillCommonControlHistograms(AliFlowEventSimple *anEvent) | |
9325 | ||
9326 | ||
9327 | //================================================================================================================================ | |
9328 | ||
9329 | ||
9330 | void AliFlowAnalysisWithQCumulants::ResetEventByEventQuantities() | |
9331 | { | |
9332 | // Reset all event by event quantities. | |
9333 | ||
9334 | // integrated flow: | |
9335 | fReQ->Zero(); | |
9336 | fImQ->Zero(); | |
9337 | fSMpk->Zero(); | |
9338 | fIntFlowCorrelationsEBE->Reset(); | |
9339 | fIntFlowEventWeightsForCorrelationsEBE->Reset(); | |
9340 | fIntFlowCorrelationsAllEBE->Reset(); | |
9341 | ||
9342 | if(fApplyCorrectionForNUA) | |
9343 | { | |
9344 | for(Int_t sc=0;sc<2;sc++) | |
9345 | { | |
9346 | fIntFlowCorrectionTermsForNUAEBE[sc]->Reset(); | |
0328db2d | 9347 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[sc]->Reset(); |
489d5531 | 9348 | } |
9349 | } | |
9350 | ||
9351 | // differential flow: | |
9352 | // 1D: | |
9353 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
9354 | { | |
9355 | for(Int_t pe=0;pe<2;pe++) // 1D in pt or eta | |
9356 | { | |
9357 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
9358 | { | |
9359 | for(Int_t k=0;k<9;k++) // power of weight | |
9360 | { | |
9361 | if(fReRPQ1dEBE[t][pe][m][k]) fReRPQ1dEBE[t][pe][m][k]->Reset(); | |
9362 | if(fImRPQ1dEBE[t][pe][m][k]) fImRPQ1dEBE[t][pe][m][k]->Reset(); | |
9363 | } | |
9364 | } | |
9365 | } | |
9366 | } | |
9367 | ||
9368 | for(Int_t t=0;t<3;t++) // type (0 = RP, 1 = POI, 2 = RP&&POI ) | |
9369 | { | |
9370 | for(Int_t pe=0;pe<2;pe++) // 1D in pt or eta | |
9371 | { | |
9372 | for(Int_t k=0;k<9;k++) | |
9373 | { | |
9374 | if(fs1dEBE[t][pe][k]) fs1dEBE[t][pe][k]->Reset(); | |
9375 | } | |
9376 | } | |
9377 | } | |
9378 | ||
9379 | // e-b-e reduced correlations: | |
9380 | for(Int_t t=0;t<2;t++) // type (0 = RP, 1 = POI) | |
9381 | { | |
9382 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
9383 | { | |
9384 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
9385 | { | |
9386 | if(fDiffFlowCorrelationsEBE[t][pe][rci]) fDiffFlowCorrelationsEBE[t][pe][rci]->Reset(); | |
9387 | if(fDiffFlowEventWeightsForCorrelationsEBE[t][pe][rci]) fDiffFlowEventWeightsForCorrelationsEBE[t][pe][rci]->Reset(); | |
9388 | } | |
9389 | } | |
9390 | } | |
9391 | ||
9392 | // correction terms for NUA: | |
9393 | for(Int_t t=0;t<2;t++) // type (0 = RP, 1 = POI) | |
9394 | { | |
9395 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
9396 | { | |
9397 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9398 | { | |
9399 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
9400 | { | |
9401 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][sc][cti]->Reset(); | |
9402 | } | |
9403 | } | |
9404 | } | |
9405 | } | |
9406 | ||
9407 | // 2D (pt,eta) | |
9408 | if(fCalculate2DFlow) | |
9409 | { | |
9410 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
9411 | { | |
9412 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
9413 | { | |
9414 | for(Int_t k=0;k<9;k++) // power of weight | |
9415 | { | |
9416 | if(fReRPQ2dEBE[t][m][k]) fReRPQ2dEBE[t][m][k]->Reset(); | |
9417 | if(fImRPQ2dEBE[t][m][k]) fImRPQ2dEBE[t][m][k]->Reset(); | |
9418 | } | |
9419 | } | |
9420 | } | |
9421 | for(Int_t t=0;t<3;t++) // type (0 = RP, 1 = POI, 2 = RP&&POI ) | |
9422 | { | |
9423 | for(Int_t k=0;k<9;k++) | |
9424 | { | |
9425 | if(fs2dEBE[t][k]) fs2dEBE[t][k]->Reset(); | |
9426 | } | |
9427 | } | |
9428 | } // end of if(fCalculate2DFlow) | |
9429 | ||
9430 | } // end of void AliFlowAnalysisWithQCumulants::ResetEventByEventQuantities(); | |
9431 | ||
9432 | ||
9433 | //================================================================================================================================ | |
9434 | ||
9435 | ||
9436 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTerms(TString type, TString ptOrEta) | |
9437 | { | |
9438 | // Calculate correction terms for non-uniform acceptance for differential flow (sin terms). | |
9439 | ||
9440 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][0][cti], where cti runs as follows: | |
9441 | // 0: <<sin n(psi1)>> | |
9442 | // 1: <<sin n(psi1+phi2)>> | |
9443 | // 2: <<sin n(psi1+phi2-phi3)>> | |
9444 | // 3: <<sin n(psi1-phi2-phi3)>>: | |
9445 | // 4: | |
9446 | // 5: | |
9447 | // 6: | |
9448 | ||
9449 | // multiplicity: | |
9450 | Double_t dMult = (*fSMpk)(0,0); | |
9451 | ||
9452 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
9453 | Double_t dReQ1n = (*fReQ)(0,0); | |
9454 | Double_t dReQ2n = (*fReQ)(1,0); | |
9455 | //Double_t dReQ3n = (*fReQ)(2,0); | |
9456 | //Double_t dReQ4n = (*fReQ)(3,0); | |
9457 | Double_t dImQ1n = (*fImQ)(0,0); | |
9458 | Double_t dImQ2n = (*fImQ)(1,0); | |
9459 | //Double_t dImQ3n = (*fImQ)(2,0); | |
9460 | //Double_t dImQ4n = (*fImQ)(3,0); | |
9461 | ||
9462 | Int_t t = -1; // type flag | |
9463 | Int_t pe = -1; // ptEta flag | |
9464 | ||
9465 | if(type == "RP") | |
9466 | { | |
9467 | t = 0; | |
9468 | } else if(type == "POI") | |
9469 | { | |
9470 | t = 1; | |
9471 | } | |
9472 | ||
9473 | if(ptOrEta == "Pt") | |
9474 | { | |
9475 | pe = 0; | |
9476 | } else if(ptOrEta == "Eta") | |
9477 | { | |
9478 | pe = 1; | |
9479 | } | |
9480 | ||
9481 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9482 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
9483 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
9484 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9485 | ||
9486 | // looping over all bins and calculating correction terms: | |
9487 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9488 | { | |
9489 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
9490 | Double_t p1n0kRe = 0.; | |
9491 | Double_t p1n0kIm = 0.; | |
9492 | ||
9493 | // number of POIs in particular pt or eta bin: | |
9494 | Double_t mp = 0.; | |
9495 | ||
9496 | // 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): | |
9497 | Double_t q1n0kRe = 0.; | |
9498 | Double_t q1n0kIm = 0.; | |
9499 | Double_t q2n0kRe = 0.; | |
9500 | Double_t q2n0kIm = 0.; | |
9501 | ||
9502 | // number of particles which are both RPs and POIs in particular pt or eta bin: | |
9503 | Double_t mq = 0.; | |
9504 | ||
9505 | if(type == "POI") | |
9506 | { | |
9507 | // q_{m*n,0}: | |
9508 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
9509 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
9510 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
9511 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
9512 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
9513 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
9514 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
9515 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
9516 | ||
9517 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9518 | } | |
9519 | else if(type == "RP") | |
9520 | { | |
9521 | // q_{m*n,0}: | |
9522 | q1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9523 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9524 | q1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9525 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9526 | q2n0kRe = fReRPQ1dEBE[0][pe][1][0]->GetBinContent(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
9527 | * fReRPQ1dEBE[0][pe][1][0]->GetBinEntries(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
9528 | q2n0kIm = fImRPQ1dEBE[0][pe][1][0]->GetBinContent(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
9529 | * fImRPQ1dEBE[0][pe][1][0]->GetBinEntries(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
9530 | ||
9531 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9532 | } | |
9533 | if(type == "POI") | |
9534 | { | |
9535 | // p_{m*n,0}: | |
9536 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9537 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9538 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9539 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9540 | ||
9541 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9542 | ||
9543 | t = 1; // typeFlag = RP or POI | |
9544 | } | |
9545 | else if(type == "RP") | |
9546 | { | |
9547 | // p_{m*n,0} = q_{m*n,0}: | |
9548 | p1n0kRe = q1n0kRe; | |
9549 | p1n0kIm = q1n0kIm; | |
9550 | ||
9551 | mp = mq; | |
9552 | ||
9553 | t = 0; // typeFlag = RP or POI | |
9554 | } | |
9555 | ||
9556 | // <<sin n(psi1)>>: | |
9557 | Double_t sinP1nPsi = 0.; | |
9558 | if(mp) | |
9559 | { | |
9560 | sinP1nPsi = p1n0kIm/mp; | |
9561 | // fill profile for <<sin n(psi1)>>: | |
9562 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi,mp); | |
9563 | // histogram to store <sin n(psi1)> e-b-e (needed in some other methods): | |
9564 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][0]->SetBinContent(b,sinP1nPsi); | |
9565 | } // end of if(mp) | |
9566 | ||
9567 | // <<sin n(psi1+phi2)>>: | |
9568 | Double_t sinP1nPsiP1nPhi = 0.; | |
9569 | if(mp*dMult-mq) | |
9570 | { | |
9571 | sinP1nPsiP1nPhi = (p1n0kRe*dImQ1n+p1n0kIm*dReQ1n-q2n0kIm)/(mp*dMult-mq); | |
9572 | // fill profile for <<sin n(psi1+phi2)>>: | |
9573 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsiP1nPhi,mp*dMult-mq); | |
9574 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9575 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][1]->SetBinContent(b,sinP1nPsiP1nPhi); | |
9576 | } // end of if(mp*dMult-mq) | |
9577 | ||
9578 | // <<sin n(psi1+phi2-phi3)>>: | |
9579 | Double_t sinP1nPsi1P1nPhi2MPhi3 = 0.; | |
9580 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9581 | { | |
9582 | sinP1nPsi1P1nPhi2MPhi3 = (p1n0kIm*(pow(dImQ1n,2.)+pow(dReQ1n,2.)-dMult) | |
9583 | - 1.*(q2n0kIm*dReQ1n-q2n0kRe*dImQ1n) | |
9584 | - mq*dImQ1n+2.*q1n0kIm) | |
9585 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9586 | // fill profile for <<sin n(psi1+phi2)>>: | |
9587 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1P1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9588 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9589 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][2]->SetBinContent(b,sinP1nPsi1P1nPhi2MPhi3); | |
9590 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9591 | ||
9592 | // <<sin n(psi1-phi2-phi3)>>: | |
9593 | Double_t sinP1nPsi1M1nPhi2MPhi3 = 0.; | |
9594 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9595 | { | |
9596 | sinP1nPsi1M1nPhi2MPhi3 = (p1n0kIm*(pow(dReQ1n,2.)-pow(dImQ1n,2.))-2.*p1n0kRe*dReQ1n*dImQ1n | |
9597 | - 1.*(p1n0kIm*dReQ2n-p1n0kRe*dImQ2n) | |
9598 | + 2.*mq*dImQ1n-2.*q1n0kIm) | |
9599 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9600 | // fill profile for <<sin n(psi1+phi2)>>: | |
9601 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1M1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9602 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9603 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][3]->SetBinContent(b,sinP1nPsi1M1nPhi2MPhi3); | |
9604 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9605 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9606 | ||
9607 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTerms(TString type, TString ptOrEta) | |
9608 | ||
9609 | ||
9610 | //================================================================================================================================ | |
9611 | ||
9612 | ||
9613 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTerms(TString type, TString ptOrEta) | |
9614 | { | |
9615 | // Calculate correction terms for non-uniform acceptance for differential flow (cos terms). | |
9616 | ||
9617 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][1][cti], where cti runs as follows: | |
9618 | // 0: <<cos n(psi)>> | |
9619 | // 1: <<cos n(psi1+phi2)>> | |
9620 | // 2: <<cos n(psi1+phi2-phi3)>> | |
9621 | // 3: <<cos n(psi1-phi2-phi3)>> | |
9622 | // 4: | |
9623 | // 5: | |
9624 | // 6: | |
9625 | ||
9626 | // multiplicity: | |
9627 | Double_t dMult = (*fSMpk)(0,0); | |
9628 | ||
9629 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
9630 | Double_t dReQ1n = (*fReQ)(0,0); | |
9631 | Double_t dReQ2n = (*fReQ)(1,0); | |
9632 | //Double_t dReQ3n = (*fReQ)(2,0); | |
9633 | //Double_t dReQ4n = (*fReQ)(3,0); | |
9634 | Double_t dImQ1n = (*fImQ)(0,0); | |
9635 | Double_t dImQ2n = (*fImQ)(1,0); | |
9636 | //Double_t dImQ3n = (*fImQ)(2,0); | |
9637 | //Double_t dImQ4n = (*fImQ)(3,0); | |
9638 | ||
9639 | Int_t t = -1; // type flag | |
9640 | Int_t pe = -1; // ptEta flag | |
9641 | ||
9642 | if(type == "RP") | |
9643 | { | |
9644 | t = 0; | |
9645 | } else if(type == "POI") | |
9646 | { | |
9647 | t = 1; | |
9648 | } | |
9649 | ||
9650 | if(ptOrEta == "Pt") | |
9651 | { | |
9652 | pe = 0; | |
9653 | } else if(ptOrEta == "Eta") | |
9654 | { | |
9655 | pe = 1; | |
9656 | } | |
9657 | ||
9658 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9659 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
9660 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
9661 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9662 | ||
9663 | // looping over all bins and calculating correction terms: | |
9664 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9665 | { | |
9666 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
9667 | Double_t p1n0kRe = 0.; | |
9668 | Double_t p1n0kIm = 0.; | |
9669 | ||
9670 | // number of POIs in particular pt or eta bin: | |
9671 | Double_t mp = 0.; | |
9672 | ||
9673 | // 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): | |
9674 | Double_t q1n0kRe = 0.; | |
9675 | Double_t q1n0kIm = 0.; | |
9676 | Double_t q2n0kRe = 0.; | |
9677 | Double_t q2n0kIm = 0.; | |
9678 | ||
9679 | // number of particles which are both RPs and POIs in particular pt or eta bin: | |
9680 | Double_t mq = 0.; | |
9681 | ||
9682 | if(type == "POI") | |
9683 | { | |
9684 | // q_{m*n,0}: | |
9685 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
9686 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
9687 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
9688 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
9689 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
9690 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
9691 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
9692 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
9693 | ||
9694 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9695 | } | |
9696 | else if(type == "RP") | |
9697 | { | |
9698 | // q_{m*n,0}: | |
9699 | q1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9700 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9701 | q1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9702 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9703 | q2n0kRe = fReRPQ1dEBE[0][pe][1][0]->GetBinContent(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
9704 | * fReRPQ1dEBE[0][pe][1][0]->GetBinEntries(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
9705 | q2n0kIm = fImRPQ1dEBE[0][pe][1][0]->GetBinContent(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
9706 | * fImRPQ1dEBE[0][pe][1][0]->GetBinEntries(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
9707 | ||
9708 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9709 | } | |
9710 | if(type == "POI") | |
9711 | { | |
9712 | // p_{m*n,0}: | |
9713 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9714 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9715 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9716 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9717 | ||
9718 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9719 | ||
9720 | t = 1; // typeFlag = RP or POI | |
9721 | } | |
9722 | else if(type == "RP") | |
9723 | { | |
9724 | // p_{m*n,0} = q_{m*n,0}: | |
9725 | p1n0kRe = q1n0kRe; | |
9726 | p1n0kIm = q1n0kIm; | |
9727 | ||
9728 | mp = mq; | |
9729 | ||
9730 | t = 0; // typeFlag = RP or POI | |
9731 | } | |
9732 | ||
9733 | // <<cos n(psi1)>>: | |
9734 | Double_t cosP1nPsi = 0.; | |
9735 | if(mp) | |
9736 | { | |
9737 | cosP1nPsi = p1n0kRe/mp; | |
9738 | ||
9739 | // fill profile for <<cos n(psi1)>>: | |
9740 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi,mp); | |
9741 | // histogram to store <cos n(psi1)> e-b-e (needed in some other methods): | |
9742 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][0]->SetBinContent(b,cosP1nPsi); | |
9743 | } // end of if(mp) | |
9744 | ||
9745 | // <<cos n(psi1+phi2)>>: | |
9746 | Double_t cosP1nPsiP1nPhi = 0.; | |
9747 | if(mp*dMult-mq) | |
9748 | { | |
9749 | cosP1nPsiP1nPhi = (p1n0kRe*dReQ1n-p1n0kIm*dImQ1n-q2n0kRe)/(mp*dMult-mq); | |
9750 | // fill profile for <<sin n(psi1+phi2)>>: | |
9751 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsiP1nPhi,mp*dMult-mq); | |
9752 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9753 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][1]->SetBinContent(b,cosP1nPsiP1nPhi); | |
9754 | } // end of if(mp*dMult-mq) | |
9755 | ||
9756 | // <<cos n(psi1+phi2-phi3)>>: | |
9757 | Double_t cosP1nPsi1P1nPhi2MPhi3 = 0.; | |
9758 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9759 | { | |
9760 | cosP1nPsi1P1nPhi2MPhi3 = (p1n0kRe*(pow(dImQ1n,2.)+pow(dReQ1n,2.)-dMult) | |
9761 | - 1.*(q2n0kRe*dReQ1n+q2n0kIm*dImQ1n) | |
9762 | - mq*dReQ1n+2.*q1n0kRe) | |
9763 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9764 | // fill profile for <<sin n(psi1+phi2)>>: | |
9765 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1P1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9766 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9767 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][2]->SetBinContent(b,cosP1nPsi1P1nPhi2MPhi3); | |
9768 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9769 | ||
9770 | // <<cos n(psi1-phi2-phi3)>>: | |
9771 | Double_t cosP1nPsi1M1nPhi2MPhi3 = 0.; | |
9772 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9773 | { | |
9774 | cosP1nPsi1M1nPhi2MPhi3 = (p1n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.))+2.*p1n0kIm*dReQ1n*dImQ1n | |
9775 | - 1.*(p1n0kRe*dReQ2n+p1n0kIm*dImQ2n) | |
9776 | - 2.*mq*dReQ1n+2.*q1n0kRe) | |
9777 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9778 | // fill profile for <<sin n(psi1+phi2)>>: | |
9779 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1M1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9780 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9781 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][3]->SetBinContent(b,cosP1nPsi1M1nPhi2MPhi3); | |
9782 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9783 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9784 | ||
9785 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTerms(TString type, TString ptOrEta) | |
9786 | ||
9787 | ||
9788 | //================================================================================================================================== | |
9789 | ||
9790 | ||
9791 | void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUADiffFlow(TString type, TString ptOrEta) | |
9792 | { | |
9793 | // Transfer prolfiles into histogams and correctly propagate the error (to be improved: description) | |
9794 | ||
9795 | // to be improved: debugged - I do not correctly transfer all profiles into histos (bug appears only after merging) | |
9796 | ||
9797 | Int_t t = -1; // type flag | |
9798 | Int_t pe = -1; // ptEta flag | |
9799 | ||
9800 | if(type == "RP") | |
9801 | { | |
9802 | t = 0; | |
9803 | } else if(type == "POI") | |
9804 | { | |
9805 | t = 1; | |
9806 | } | |
9807 | ||
9808 | if(ptOrEta == "Pt") | |
9809 | { | |
9810 | pe = 0; | |
9811 | } else if(ptOrEta == "Eta") | |
9812 | { | |
9813 | pe = 1; | |
9814 | } | |
9815 | ||
9816 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9817 | //Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
9818 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
9819 | //Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9820 | ||
9821 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9822 | { | |
9823 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
9824 | { | |
9825 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9826 | { | |
9827 | Double_t correctionTerm = fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]->GetBinContent(b); | |
9828 | fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti]->SetBinContent(b,correctionTerm); | |
9829 | // to be improved (propagate error correctly) | |
9830 | // ... | |
9831 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9832 | } // correction term index | |
9833 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9834 | ||
9835 | }// end of void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUADiffFlow(TString type, TString ptOrEta) | |
9836 | ||
9837 | ||
9838 | //================================================================================================================================== | |
9839 | ||
9840 | ||
9841 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulantsCorrectedForNUA(TString type, TString ptOrEta) | |
9842 | { | |
9843 | // Calculate generalized differential flow Q-cumulants (corrected for non-uniform acceptance) | |
9844 | ||
9845 | Int_t typeFlag = -1; | |
9846 | Int_t ptEtaFlag = -1; | |
9847 | ||
9848 | if(type == "RP") | |
9849 | { | |
9850 | typeFlag = 0; | |
9851 | } else if(type == "POI") | |
9852 | { | |
9853 | typeFlag = 1; | |
9854 | } | |
9855 | ||
9856 | if(ptOrEta == "Pt") | |
9857 | { | |
9858 | ptEtaFlag = 0; | |
9859 | } else if(ptOrEta == "Eta") | |
9860 | { | |
9861 | ptEtaFlag = 1; | |
9862 | } | |
9863 | ||
9864 | // shortcuts: | |
9865 | Int_t t = typeFlag; | |
9866 | Int_t pe = ptEtaFlag; | |
9867 | ||
9868 | // common: | |
9869 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9870 | ||
9871 | // 2-particle correlation: | |
9872 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
9873 | // sin term coming from integrated flow: | |
9874 | Double_t sinP1nPhi = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1); // <<sin(n*phi1)>> | |
9875 | Double_t sinP1nPhi1P1nPhi2 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2); // <<sin(n*(phi1+phi2))>> | |
9876 | Double_t sinP1nPhi1M1nPhi2M1nPhi3 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(3); // <<sin(n*(phi1-phi2-phi3))>> | |
9877 | // cos term coming from integrated flow: | |
9878 | Double_t cosP1nPhi = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1); // <<cos(n*phi1)>> | |
9879 | Double_t cosP1nPhi1P1nPhi2 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2); // <<cos(n*(phi1+phi2))>> | |
9880 | Double_t cosP1nPhi1M1nPhi2M1nPhi3 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(3); // <<cos(n*(phi1-phi2-phi3))>> | |
9881 | ||
9882 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9883 | { | |
9884 | Double_t twoPrime = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); // <<2'>> | |
9885 | Double_t fourPrime = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); // <<4'>> | |
9886 | Double_t sinP1nPsi = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][0]->GetBinContent(b); // <<sin n(Psi)>> | |
9887 | Double_t cosP1nPsi = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][0]->GetBinContent(b); // <<cos n(Psi)>> | |
9888 | Double_t sinP1nPsi1P1nPhi2 = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][1]->GetBinContent(b); // <<sin n(psi1+phi2)>> | |
9889 | Double_t cosP1nPsi1P1nPhi2 = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][1]->GetBinContent(b); // <<cos n(psi1+phi2)>> | |
9890 | Double_t sinP1nPsi1P1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][2]->GetBinContent(b); // <<sin n(psi1+phi2-phi3)>> | |
9891 | Double_t cosP1nPsi1P1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][2]->GetBinContent(b); // <<cos n(psi1+phi2-phi3)>> | |
9892 | Double_t sinP1nPsi1M1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][3]->GetBinContent(b); // <<sin n(psi1-phi2-phi3)>> | |
9893 | Double_t cosP1nPsi1M1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][3]->GetBinContent(b); // <<cos n(psi1-phi2-phi3)>> | |
9894 | // generalized QC{2'}: | |
9895 | Double_t qc2Prime = twoPrime - sinP1nPsi*sinP1nPhi - cosP1nPsi*cosP1nPhi; | |
9896 | fDiffFlowCumulants[t][pe][0]->SetBinContent(b,qc2Prime); | |
9897 | // generalized QC{4'}: | |
9898 | Double_t qc4Prime = fourPrime-2.*twoPrime*two | |
9899 | - cosP1nPsi*cosP1nPhi1M1nPhi2M1nPhi3 | |
9900 | + sinP1nPsi*sinP1nPhi1M1nPhi2M1nPhi3 | |
9901 | - cosP1nPhi*cosP1nPsi1M1nPhi2M1nPhi3 | |
9902 | + sinP1nPhi*sinP1nPsi1M1nPhi2M1nPhi3 | |
9903 | - 2.*cosP1nPhi*cosP1nPsi1P1nPhi2M1nPhi3 | |
9904 | - 2.*sinP1nPhi*sinP1nPsi1P1nPhi2M1nPhi3 | |
9905 | - cosP1nPsi1P1nPhi2*cosP1nPhi1P1nPhi2 | |
9906 | - sinP1nPsi1P1nPhi2*sinP1nPhi1P1nPhi2 | |
9907 | + 2.*cosP1nPhi1P1nPhi2*(cosP1nPsi*cosP1nPhi-sinP1nPsi*sinP1nPhi) | |
9908 | + 2.*sinP1nPhi1P1nPhi2*(cosP1nPsi*sinP1nPhi+sinP1nPsi*cosP1nPhi) | |
9909 | + 4.*two*(cosP1nPsi*cosP1nPhi+sinP1nPsi*sinP1nPhi) | |
9910 | + 2.*cosP1nPsi1P1nPhi2*(pow(cosP1nPhi,2.)-pow(sinP1nPhi,2.)) | |
9911 | + 4.*sinP1nPsi1P1nPhi2*cosP1nPhi*sinP1nPhi | |
9912 | + 4.*twoPrime*(pow(cosP1nPhi,2.)+pow(sinP1nPhi,2.)) | |
9913 | - 6.*(pow(cosP1nPhi,2.)-pow(sinP1nPhi,2.)) | |
9914 | * (cosP1nPsi*cosP1nPhi-sinP1nPsi*sinP1nPhi) | |
9915 | - 12.*cosP1nPhi*sinP1nPhi | |
9916 | * (sinP1nPsi*cosP1nPhi+cosP1nPsi*sinP1nPhi); | |
9917 | fDiffFlowCumulants[t][pe][1]->SetBinContent(b,qc4Prime); | |
9918 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
9919 | ||
9920 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulantsCorrectedForNUA(TString type, TString ptOrEta) | |
9921 | ||
9922 | ||
9923 | //================================================================================================================================== | |
9924 | ||
9925 | ||
9926 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectedForNUA(TString type, TString ptOrEta) | |
9927 | { | |
9928 | // Calculate differential flow corrected for non-uniform acceptance. | |
9929 | ||
9930 | // to be improved (rewritten completely) | |
9931 | ||
9932 | Int_t typeFlag = -1; | |
9933 | Int_t ptEtaFlag = -1; | |
9934 | ||
9935 | if(type == "RP") | |
9936 | { | |
9937 | typeFlag = 0; | |
9938 | } else if(type == "POI") | |
9939 | { | |
9940 | typeFlag = 1; | |
9941 | } | |
9942 | ||
9943 | if(ptOrEta == "Pt") | |
9944 | { | |
9945 | ptEtaFlag = 0; | |
9946 | } else if(ptOrEta == "Eta") | |
9947 | { | |
9948 | ptEtaFlag = 1; | |
9949 | } | |
9950 | ||
9951 | // shortcuts: | |
9952 | Int_t t = typeFlag; | |
9953 | Int_t pe = ptEtaFlag; | |
9954 | ||
9955 | // common: | |
9956 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9957 | ||
9958 | // to be improved: access here generalized QC{2} and QC{4} instead: | |
9959 | Double_t dV2 = fIntFlow->GetBinContent(1); | |
9960 | Double_t dV4 = fIntFlow->GetBinContent(2); | |
9961 | ||
9962 | // loop over pt or eta bins: | |
9963 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9964 | { | |
9965 | // generalized QC{2'}: | |
9966 | Double_t gQC2Prime = fDiffFlowCumulants[t][pe][0]->GetBinContent(b); | |
9967 | // v'{2}: | |
9968 | if(dV2>0) | |
9969 | { | |
9970 | Double_t v2Prime = gQC2Prime/dV2; | |
9971 | fDiffFlow[t][pe][0]->SetBinContent(b,v2Prime); | |
9972 | } | |
9973 | // generalized QC{4'}: | |
9974 | Double_t gQC4Prime = fDiffFlowCumulants[t][pe][1]->GetBinContent(b); | |
9975 | // v'{4}: | |
9976 | if(dV4>0) | |
9977 | { | |
9978 | Double_t v4Prime = -gQC4Prime/pow(dV4,3.); | |
9979 | fDiffFlow[t][pe][1]->SetBinContent(b,v4Prime); | |
9980 | } | |
9981 | } // end of for(Int_t b=1;b<=fnBinsPtEta[pe];b++) | |
9982 | ||
9983 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectedForNUA(TString type, TString ptOrEta); | |
9984 | ||
9985 | ||
9986 | //================================================================================================================================== | |
9987 | ||
9988 | ||
0328db2d | 9989 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoops(AliFlowEventSimple * const anEvent) |
489d5531 | 9990 | { |
9991 | // Evaluate with nested loops multiparticle correlations for integrated flow (without using the particle weights). | |
9992 | ||
9993 | // Remark: Results are stored in profile fIntFlowDirectCorrelations whose binning is organized as follows: | |
9994 | // | |
9995 | // 1st bin: <2>_{1n|1n} = two1n1n = cos(n*(phi1-phi2))> | |
9996 | // 2nd bin: <2>_{2n|2n} = two2n2n = cos(2n*(phi1-phi2))> | |
9997 | // 3rd bin: <2>_{3n|3n} = two3n3n = cos(3n*(phi1-phi2))> | |
9998 | // 4th bin: <2>_{4n|4n} = two4n4n = cos(4n*(phi1-phi2))> | |
9999 | // 5th bin: ---- EMPTY ---- | |
10000 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1n = <cos(n*(2.*phi1-phi2-phi3))> | |
10001 | // 7th bin: <3>_{3n|2n,1n} = three3n2n1n = <cos(n*(3.*phi1-2.*phi2-phi3))> | |
10002 | // 8th bin: <3>_{4n|2n,2n} = three4n2n2n = <cos(n*(4.*phi1-2.*phi2-2.*phi3))> | |
10003 | // 9th bin: <3>_{4n|3n,1n} = three4n3n1n = <cos(n*(4.*phi1-3.*phi2-phi3))> | |
10004 | // 10th bin: ---- EMPTY ---- | |
10005 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1n = <cos(n*(phi1+phi2-phi3-phi4))> | |
10006 | // 12th bin: <4>_{2n,1n|2n,1n} = four2n1n2n1n = <cos(2.*n*(phi1+phi2-phi3-phi4))> | |
10007 | // 13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n = <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> | |
10008 | // 14th bin: <4>_{3n|1n,1n,1n} = four3n1n1n1n = <cos(n*(3.*phi1-phi2-phi3-phi4))> | |
10009 | // 15th bin: <4>_{3n,1n|3n,1n} = four3n1n3n1n = <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> | |
10010 | // 16th bin: <4>_{3n,1n|2n,2n} = four3n1n2n2n = <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> | |
10011 | // 17th bin: <4>_{4n|2n,1n,1n} = four4n2n1n1n = <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> | |
10012 | // 18th bin: ---- EMPTY ---- | |
10013 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = five2n1n1n1n1n = <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))> | |
10014 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = five2n2n2n1n1n = <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))> | |
10015 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = five3n1n2n1n1n = <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))> | |
10016 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = five4n1n1n1n1n = <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))> | |
10017 | // 23rd bin: ---- EMPTY ---- | |
10018 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = six1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
10019 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = six2n1n1n2n1n1n = <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))> | |
10020 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = six2n2n1n1n1n1n = <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))> | |
10021 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = six3n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))> | |
10022 | // 28th bin: ---- EMPTY ---- | |
10023 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = seven2n1n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))> | |
10024 | // 30th bin: ---- EMPTY ---- | |
10025 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = eight1n1n1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
10026 | ||
10027 | Int_t nPrim = anEvent->NumberOfTracks(); | |
10028 | AliFlowTrackSimple *aftsTrack = NULL; | |
10029 | Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.; | |
10030 | Int_t n = fHarmonic; | |
10031 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
10032 | Double_t dMult = (*fSMpk)(0,0); | |
10033 | cout<<endl; | |
10034 | cout<<"Multiparticle correlations: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
10035 | if(dMult<2) | |
10036 | { | |
10037 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; | |
10038 | } else if (dMult>fMaxAllowedMultiplicity) | |
10039 | { | |
10040 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; | |
10041 | } else | |
10042 | { | |
10043 | cout<<"... evaluating nested loops (without using particle weights)..."<<endl; | |
10044 | } | |
10045 | ||
10046 | // 2-particle correlations: | |
10047 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
10048 | { | |
10049 | for(Int_t i1=0;i1<nPrim;i1++) | |
10050 | { | |
10051 | aftsTrack=anEvent->GetTrack(i1); | |
10052 | if(!(aftsTrack->InRPSelection())) continue; | |
10053 | phi1=aftsTrack->Phi(); | |
10054 | for(Int_t i2=0;i2<nPrim;i2++) | |
10055 | { | |
10056 | if(i2==i1)continue; | |
10057 | aftsTrack=anEvent->GetTrack(i2); | |
10058 | if(!(aftsTrack->InRPSelection())) continue; | |
10059 | phi2=aftsTrack->Phi(); | |
10060 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
10061 | // fill the profile with 2-p correlations: | |
10062 | fIntFlowDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),1.); // <cos(n*(phi1-phi2))> | |
10063 | fIntFlowDirectCorrelations->Fill(1.5,cos(2.*n*(phi1-phi2)),1.); // <cos(2n*(phi1-phi2))> | |
10064 | fIntFlowDirectCorrelations->Fill(2.5,cos(3.*n*(phi1-phi2)),1.); // <cos(3n*(phi1-phi2))> | |
10065 | fIntFlowDirectCorrelations->Fill(3.5,cos(4.*n*(phi1-phi2)),1.); // <cos(4n*(phi1-phi2))> | |
10066 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10067 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10068 | } // end of if(nPrim>=2) | |
10069 | ||
10070 | // 3-particle correlations: | |
10071 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
10072 | { | |
10073 | for(Int_t i1=0;i1<nPrim;i1++) | |
10074 | { | |
10075 | aftsTrack=anEvent->GetTrack(i1); | |
10076 | if(!(aftsTrack->InRPSelection())) continue; | |
10077 | phi1=aftsTrack->Phi(); | |
10078 | for(Int_t i2=0;i2<nPrim;i2++) | |
10079 | { | |
10080 | if(i2==i1)continue; | |
10081 | aftsTrack=anEvent->GetTrack(i2); | |
10082 | if(!(aftsTrack->InRPSelection())) continue; | |
10083 | phi2=aftsTrack->Phi(); | |
10084 | for(Int_t i3=0;i3<nPrim;i3++) | |
10085 | { | |
10086 | if(i3==i1||i3==i2)continue; | |
10087 | aftsTrack=anEvent->GetTrack(i3); | |
10088 | if(!(aftsTrack->InRPSelection())) continue; | |
10089 | phi3=aftsTrack->Phi(); | |
10090 | if(nPrim==3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; | |
10091 | // fill the profile with 3-p correlations: | |
10092 | fIntFlowDirectCorrelations->Fill(5.,cos(2.*n*phi1-n*(phi2+phi3)),1.); //<3>_{2n|nn,n} | |
10093 | fIntFlowDirectCorrelations->Fill(6.,cos(3.*n*phi1-2.*n*phi2-n*phi3),1.); //<3>_{3n|2n,n} | |
10094 | fIntFlowDirectCorrelations->Fill(7.,cos(4.*n*phi1-2.*n*phi2-2.*n*phi3),1.); //<3>_{4n|2n,2n} | |
10095 | fIntFlowDirectCorrelations->Fill(8.,cos(4.*n*phi1-3.*n*phi2-n*phi3),1.); //<3>_{4n|3n,n} | |
10096 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10097 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10098 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10099 | } // end of if(nPrim>=3) | |
10100 | ||
10101 | // 4-particle correlations: | |
10102 | if(nPrim>=4 && nPrim<=fMaxAllowedMultiplicity) | |
10103 | { | |
10104 | for(Int_t i1=0;i1<nPrim;i1++) | |
10105 | { | |
10106 | aftsTrack=anEvent->GetTrack(i1); | |
10107 | if(!(aftsTrack->InRPSelection())) continue; | |
10108 | phi1=aftsTrack->Phi(); | |
10109 | for(Int_t i2=0;i2<nPrim;i2++) | |
10110 | { | |
10111 | if(i2==i1)continue; | |
10112 | aftsTrack=anEvent->GetTrack(i2); | |
10113 | if(!(aftsTrack->InRPSelection())) continue; | |
10114 | phi2=aftsTrack->Phi(); | |
10115 | for(Int_t i3=0;i3<nPrim;i3++) | |
10116 | { | |
10117 | if(i3==i1||i3==i2)continue; | |
10118 | aftsTrack=anEvent->GetTrack(i3); | |
10119 | if(!(aftsTrack->InRPSelection())) continue; | |
10120 | phi3=aftsTrack->Phi(); | |
10121 | for(Int_t i4=0;i4<nPrim;i4++) | |
10122 | { | |
10123 | if(i4==i1||i4==i2||i4==i3)continue; | |
10124 | aftsTrack=anEvent->GetTrack(i4); | |
10125 | if(!(aftsTrack->InRPSelection())) continue; | |
10126 | phi4=aftsTrack->Phi(); | |
10127 | if(nPrim==4) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<"\r"<<flush; | |
10128 | // fill the profile with 4-p correlations: | |
10129 | fIntFlowDirectCorrelations->Fill(10.,cos(n*phi1+n*phi2-n*phi3-n*phi4),1.); // <4>_{n,n|n,n} | |
10130 | fIntFlowDirectCorrelations->Fill(11.,cos(2.*n*phi1+n*phi2-2.*n*phi3-n*phi4),1.); // <4>_{2n,n|2n,n} | |
10131 | fIntFlowDirectCorrelations->Fill(12.,cos(2.*n*phi1+2*n*phi2-2.*n*phi3-2.*n*phi4),1.); // <4>_{2n,2n|2n,2n} | |
10132 | fIntFlowDirectCorrelations->Fill(13.,cos(3.*n*phi1-n*phi2-n*phi3-n*phi4),1.); // <4>_{3n|n,n,n} | |
10133 | fIntFlowDirectCorrelations->Fill(14.,cos(3.*n*phi1+n*phi2-3.*n*phi3-n*phi4),1.); // <4>_{3n,n|3n,n} | |
10134 | fIntFlowDirectCorrelations->Fill(15.,cos(3.*n*phi1+n*phi2-2.*n*phi3-2.*n*phi4),1.); // <4>_{3n,n|2n,2n} | |
10135 | fIntFlowDirectCorrelations->Fill(16.,cos(4.*n*phi1-2.*n*phi2-n*phi3-n*phi4),1.); // <4>_{4n|2n,n,n} | |
10136 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10137 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10138 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10139 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10140 | } // end of if(nPrim>=) | |
10141 | ||
10142 | // 5-particle correlations: | |
10143 | if(nPrim>=5 && nPrim<=fMaxAllowedMultiplicity) | |
10144 | { | |
10145 | for(Int_t i1=0;i1<nPrim;i1++) | |
10146 | { | |
10147 | aftsTrack=anEvent->GetTrack(i1); | |
10148 | if(!(aftsTrack->InRPSelection())) continue; | |
10149 | phi1=aftsTrack->Phi(); | |
10150 | for(Int_t i2=0;i2<nPrim;i2++) | |
10151 | { | |
10152 | if(i2==i1)continue; | |
10153 | aftsTrack=anEvent->GetTrack(i2); | |
10154 | if(!(aftsTrack->InRPSelection())) continue; | |
10155 | phi2=aftsTrack->Phi(); | |
10156 | for(Int_t i3=0;i3<nPrim;i3++) | |
10157 | { | |
10158 | if(i3==i1||i3==i2)continue; | |
10159 | aftsTrack=anEvent->GetTrack(i3); | |
10160 | if(!(aftsTrack->InRPSelection())) continue; | |
10161 | phi3=aftsTrack->Phi(); | |
10162 | for(Int_t i4=0;i4<nPrim;i4++) | |
10163 | { | |
10164 | if(i4==i1||i4==i2||i4==i3)continue; | |
10165 | aftsTrack=anEvent->GetTrack(i4); | |
10166 | if(!(aftsTrack->InRPSelection())) continue; | |
10167 | phi4=aftsTrack->Phi(); | |
10168 | for(Int_t i5=0;i5<nPrim;i5++) | |
10169 | { | |
10170 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
10171 | aftsTrack=anEvent->GetTrack(i5); | |
10172 | if(!(aftsTrack->InRPSelection())) continue; | |
10173 | phi5=aftsTrack->Phi(); | |
10174 | if(nPrim==5) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<"\r"<<flush; | |
10175 | // fill the profile with 5-p correlations: | |
10176 | fIntFlowDirectCorrelations->Fill(18.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),1.); //<5>_{2n,n|n,n,n} | |
10177 | fIntFlowDirectCorrelations->Fill(19.,cos(2.*n*phi1+2.*n*phi2-2.*n*phi3-n*phi4-n*phi5),1.); //<5>_{2n,2n|2n,n,n} | |
10178 | fIntFlowDirectCorrelations->Fill(20.,cos(3.*n*phi1+n*phi2-2.*n*phi3-n*phi4-n*phi5),1.); //<5>_{3n,n|2n,n,n} | |
10179 | fIntFlowDirectCorrelations->Fill(21.,cos(4.*n*phi1-n*phi2-n*phi3-n*phi4-n*phi5),1.); //<5>_{4n|n,n,n,n} | |
10180 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
10181 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10182 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10183 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10184 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10185 | } // end of if(nPrim>=5) | |
10186 | ||
10187 | // 6-particle correlations: | |
10188 | if(nPrim>=6 && nPrim<=fMaxAllowedMultiplicity) | |
10189 | { | |
10190 | for(Int_t i1=0;i1<nPrim;i1++) | |
10191 | { | |
10192 | aftsTrack=anEvent->GetTrack(i1); | |
10193 | if(!(aftsTrack->InRPSelection())) continue; | |
10194 | phi1=aftsTrack->Phi(); | |
10195 | for(Int_t i2=0;i2<nPrim;i2++) | |
10196 | { | |
10197 | if(i2==i1)continue; | |
10198 | aftsTrack=anEvent->GetTrack(i2); | |
10199 | if(!(aftsTrack->InRPSelection())) continue; | |
10200 | phi2=aftsTrack->Phi(); | |
10201 | for(Int_t i3=0;i3<nPrim;i3++) | |
10202 | { | |
10203 | if(i3==i1||i3==i2)continue; | |
10204 | aftsTrack=anEvent->GetTrack(i3); | |
10205 | if(!(aftsTrack->InRPSelection())) continue; | |
10206 | phi3=aftsTrack->Phi(); | |
10207 | for(Int_t i4=0;i4<nPrim;i4++) | |
10208 | { | |
10209 | if(i4==i1||i4==i2||i4==i3)continue; | |
10210 | aftsTrack=anEvent->GetTrack(i4); | |
10211 | if(!(aftsTrack->InRPSelection())) continue; | |
10212 | phi4=aftsTrack->Phi(); | |
10213 | for(Int_t i5=0;i5<nPrim;i5++) | |
10214 | { | |
10215 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
10216 | aftsTrack=anEvent->GetTrack(i5); | |
10217 | if(!(aftsTrack->InRPSelection())) continue; | |
10218 | phi5=aftsTrack->Phi(); | |
10219 | for(Int_t i6=0;i6<nPrim;i6++) | |
10220 | { | |
10221 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue; | |
10222 | aftsTrack=anEvent->GetTrack(i6); | |
10223 | if(!(aftsTrack->InRPSelection())) continue; | |
10224 | phi6=aftsTrack->Phi(); | |
10225 | if(nPrim==6) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<" "<<i6<<"\r"<<flush; | |
10226 | // fill the profile with 6-p correlations: | |
10227 | fIntFlowDirectCorrelations->Fill(23.,cos(n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6),1.); //<6>_{n,n,n|n,n,n} | |
10228 | fIntFlowDirectCorrelations->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} | |
10229 | fIntFlowDirectCorrelations->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} | |
10230 | fIntFlowDirectCorrelations->Fill(26.,cos(3.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5-n*phi6),1.); //<6>_{3n,n|n,n,n,n} | |
10231 | } // end of for(Int_t i6=0;i6<nPrim;i6++) | |
10232 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
10233 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10234 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10235 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10236 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10237 | } // end of if(nPrim>=6) | |
10238 | ||
10239 | // 7-particle correlations: | |
10240 | if(nPrim>=7 && nPrim<=fMaxAllowedMultiplicity) | |
10241 | { | |
10242 | for(Int_t i1=0;i1<nPrim;i1++) | |
10243 | { | |
10244 | aftsTrack=anEvent->GetTrack(i1); | |
10245 | if(!(aftsTrack->InRPSelection())) continue; | |
10246 | phi1=aftsTrack->Phi(); | |
10247 | for(Int_t i2=0;i2<nPrim;i2++) | |
10248 | { | |
10249 | if(i2==i1)continue; | |
10250 | aftsTrack=anEvent->GetTrack(i2); | |
10251 | if(!(aftsTrack->InRPSelection())) continue; | |
10252 | phi2=aftsTrack->Phi(); | |
10253 | for(Int_t i3=0;i3<nPrim;i3++) | |
10254 | { | |
10255 | if(i3==i1||i3==i2)continue; | |
10256 | aftsTrack=anEvent->GetTrack(i3); | |
10257 | if(!(aftsTrack->InRPSelection())) continue; | |
10258 | phi3=aftsTrack->Phi(); | |
10259 | for(Int_t i4=0;i4<nPrim;i4++) | |
10260 | { | |
10261 | if(i4==i1||i4==i2||i4==i3)continue; | |
10262 | aftsTrack=anEvent->GetTrack(i4); | |
10263 | if(!(aftsTrack->InRPSelection())) continue; | |
10264 | phi4=aftsTrack->Phi(); | |
10265 | for(Int_t i5=0;i5<nPrim;i5++) | |
10266 | { | |
10267 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
10268 | aftsTrack=anEvent->GetTrack(i5); | |
10269 | if(!(aftsTrack->InRPSelection())) continue; | |
10270 | phi5=aftsTrack->Phi(); | |
10271 | for(Int_t i6=0;i6<nPrim;i6++) | |
10272 | { | |
10273 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue; | |
10274 | aftsTrack=anEvent->GetTrack(i6); | |
10275 | if(!(aftsTrack->InRPSelection())) continue; | |
10276 | phi6=aftsTrack->Phi(); | |
10277 | for(Int_t i7=0;i7<nPrim;i7++) | |
10278 | { | |
10279 | if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue; | |
10280 | aftsTrack=anEvent->GetTrack(i7); | |
10281 | if(!(aftsTrack->InRPSelection())) continue; | |
10282 | phi7=aftsTrack->Phi(); | |
10283 | if(nPrim==7) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<" "<<i6<<" "<<i7<<"\r"<<flush; | |
10284 | // fill the profile with 7-p correlation: | |
10285 | fIntFlowDirectCorrelations->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} | |
10286 | } // end of for(Int_t i7=0;i7<nPrim;i7++) | |
10287 | } // end of for(Int_t i6=0;i6<nPrim;i6++) | |
10288 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
10289 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10290 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10291 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10292 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10293 | } // end of if(nPrim>=7) | |
10294 | ||
10295 | // 8-particle correlations: | |
10296 | if(nPrim>=8 && nPrim<=fMaxAllowedMultiplicity) | |
10297 | { | |
10298 | for(Int_t i1=0;i1<nPrim;i1++) | |
10299 | { | |
10300 | aftsTrack=anEvent->GetTrack(i1); | |
10301 | if(!(aftsTrack->InRPSelection())) continue; | |
10302 | phi1=aftsTrack->Phi(); | |
10303 | for(Int_t i2=0;i2<nPrim;i2++) | |
10304 | { | |
10305 | if(i2==i1)continue; | |
10306 | aftsTrack=anEvent->GetTrack(i2); | |
10307 | if(!(aftsTrack->InRPSelection())) continue; | |
10308 | phi2=aftsTrack->Phi(); | |
10309 | for(Int_t i3=0;i3<nPrim;i3++) | |
10310 | { | |
10311 | if(i3==i1||i3==i2)continue; | |
10312 | aftsTrack=anEvent->GetTrack(i3); | |
10313 | if(!(aftsTrack->InRPSelection())) continue; | |
10314 | phi3=aftsTrack->Phi(); | |
10315 | for(Int_t i4=0;i4<nPrim;i4++) | |
10316 | { | |
10317 | if(i4==i1||i4==i2||i4==i3)continue; | |
10318 | aftsTrack=anEvent->GetTrack(i4); | |
10319 | if(!(aftsTrack->InRPSelection())) continue; | |
10320 | phi4=aftsTrack->Phi(); | |
10321 | for(Int_t i5=0;i5<nPrim;i5++) | |
10322 | { | |
10323 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
10324 | aftsTrack=anEvent->GetTrack(i5); | |
10325 | if(!(aftsTrack->InRPSelection())) continue; | |
10326 | phi5=aftsTrack->Phi(); | |
10327 | for(Int_t i6=0;i6<nPrim;i6++) | |
10328 | { | |
10329 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue; | |
10330 | aftsTrack=anEvent->GetTrack(i6); | |
10331 | if(!(aftsTrack->InRPSelection())) continue; | |
10332 | phi6=aftsTrack->Phi(); | |
10333 | for(Int_t i7=0;i7<nPrim;i7++) | |
10334 | { | |
10335 | if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue; | |
10336 | aftsTrack=anEvent->GetTrack(i7); | |
10337 | if(!(aftsTrack->InRPSelection())) continue; | |
10338 | phi7=aftsTrack->Phi(); | |
10339 | for(Int_t i8=0;i8<nPrim;i8++) | |
10340 | { | |
10341 | if(i8==i1||i8==i2||i8==i3||i8==i4||i8==i5||i8==i6||i8==i7)continue; | |
10342 | aftsTrack=anEvent->GetTrack(i8); | |
10343 | if(!(aftsTrack->InRPSelection())) continue; | |
10344 | phi8=aftsTrack->Phi(); | |
10345 | cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<" "<<i6<<" "<<i7<<" "<<i8<<"\r"<<flush; | |
10346 | // fill the profile with 8-p correlation: | |
10347 | fIntFlowDirectCorrelations->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} | |
10348 | } // end of for(Int_t i8=0;i8<nPrim;i8++) | |
10349 | } // end of for(Int_t i7=0;i7<nPrim;i7++) | |
10350 | } // end of for(Int_t i6=0;i6<nPrim;i6++) | |
10351 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
10352 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10353 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10354 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10355 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10356 | } // end of if(nPrim>=8) | |
10357 | ||
10358 | cout<<endl; | |
10359 | ||
10360 | } // end of AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoops(AliFlowEventSimple* anEvent) | |
10361 | ||
10362 | ||
10363 | //================================================================================================================================== | |
10364 | ||
10365 | ||
10366 | void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrelations() | |
10367 | { | |
10368 | // Cross-check results for multiparticle correlations needed for int. flow: results from Q-vectors vs results from nested loops. | |
10369 | ||
10370 | cout<<endl; | |
10371 | cout<<endl; | |
10372 | cout<<" *****************************************"<<endl; | |
10373 | cout<<" **** cross-checking the correlations ****"<<endl; | |
10374 | cout<<" **** for integrated flow ****"<<endl; | |
10375 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
10376 | { | |
10377 | cout<<" **** (particle weights not used) ****"<<endl; | |
10378 | } else | |
10379 | { | |
10380 | cout<<" **** (particle weights used) ****"<<endl; | |
10381 | } | |
10382 | cout<<" *****************************************"<<endl; | |
10383 | cout<<endl; | |
10384 | cout<<endl; | |
10385 | ||
10386 | Int_t ciMax = 32; // to be improved (removed eventually when I calculate 6th and 8th order with particle weights) | |
10387 | ||
10388 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
10389 | { | |
10390 | ciMax = 11; | |
10391 | } | |
10392 | ||
10393 | for(Int_t ci=1;ci<=ciMax;ci++) | |
10394 | { | |
10395 | if(strcmp((fIntFlowCorrelationsAllPro->GetXaxis())->GetBinLabel(ci), "") == 0) continue; // to be improved (access finalized histogram here) | |
10396 | cout<<(fIntFlowCorrelationsAllPro->GetXaxis())->GetBinLabel(ci)<<":"<<endl; // to be improved (access finalized histogram here) | |
10397 | cout<<"from Q-vectors = "<<fIntFlowCorrelationsAllPro->GetBinContent(ci)<<endl; // to be improved (access finalized histogram here) | |
10398 | cout<<"from nested loops = "<<fIntFlowDirectCorrelations->GetBinContent(ci)<<endl; | |
10399 | cout<<endl; | |
10400 | } | |
10401 | ||
10402 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrelations() | |
10403 | ||
10404 | ||
10405 | //================================================================================================================================ | |
10406 | ||
10407 | ||
10408 | void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrectionTermsForNUA() | |
10409 | { | |
10410 | // Cross-check results for corrections terms for non-uniform acceptance needed for int. flow: results from Q-vectors vs results from nested loops. | |
10411 | ||
10412 | cout<<endl; | |
10413 | cout<<endl; | |
10414 | cout<<" *********************************************"<<endl; | |
10415 | cout<<" **** cross-checking the correction terms ****"<<endl; | |
10416 | cout<<" **** for non-uniform acceptance relevant ****"<<endl; | |
10417 | cout<<" **** for integrated flow ****"<<endl; | |
10418 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
10419 | { | |
10420 | cout<<" **** (particle weights not used) ****"<<endl; | |
10421 | } else | |
10422 | { | |
10423 | cout<<" **** (particle weights used) ****"<<endl; | |
10424 | } | |
10425 | cout<<" *********************************************"<<endl; | |
10426 | cout<<endl; | |
10427 | cout<<endl; | |
10428 | ||
10429 | for(Int_t ci=1;ci<=10;ci++) // correction term index | |
10430 | { | |
10431 | for(Int_t sc=0;sc<2;sc++) // sin or cos term | |
10432 | { | |
10433 | if(strcmp((fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->GetBinLabel(ci), "") == 0) continue; // to be improved (access finalized histogram here) | |
10434 | cout<<(fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->GetBinLabel(ci)<<":"<<endl; // to be improved (access finalized histogram here) | |
10435 | cout<<"from Q-vectors = "<<fIntFlowCorrectionTermsForNUAPro[sc]->GetBinContent(ci)<<endl; // to be improved (access finalized histogram here) | |
10436 | cout<<"from nested loops = "<<fIntFlowDirectCorrectionTermsForNUA[sc]->GetBinContent(ci)<<endl; | |
10437 | cout<<endl; | |
10438 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos term | |
10439 | } // end of for(Int_t ci=1;ci<=10;ci++) // correction term index | |
10440 | ||
10441 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrectionTermsForNUA() | |
10442 | ||
10443 | ||
10444 | //================================================================================================================================ | |
10445 | ||
10446 | ||
0328db2d | 10447 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple * const anEvent) |
489d5531 | 10448 | { |
10449 | // Evaluate with nested loops multiparticle correlations for integrated flow (using the particle weights). | |
10450 | ||
10451 | // Results are stored in profile fIntFlowDirectCorrelations. | |
10452 | // Remark 1: When particle weights are used the binning of fIntFlowDirectCorrelations is organized as follows: | |
10453 | // | |
10454 | // 1st bin: <2>_{1n|1n} = two1n1nW1W1 = <w1 w2 cos(n*(phi1-phi2))> | |
10455 | // 2nd bin: <2>_{2n|2n} = two2n2nW2W2 = <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
10456 | // 3rd bin: <2>_{3n|3n} = two3n3nW3W3 = <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
10457 | // 4th bin: <2>_{4n|4n} = two4n4nW4W4 = <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
10458 | // 5th bin: ---- EMPTY ---- | |
10459 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1nW2W1W1 = <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
10460 | // 7th bin: <3>_{3n|2n,1n} = ... | |
10461 | // 8th bin: <3>_{4n|2n,2n} = ... | |
10462 | // 9th bin: <3>_{4n|3n,1n} = ... | |
10463 | // 10th bin: ---- EMPTY ---- | |
10464 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1nW1W1W1W1 = <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> | |
10465 | // 12th bin: <4>_{2n,1n|2n,1n} = ... | |
10466 | // 13th bin: <4>_{2n,2n|2n,2n} = ... | |
10467 | // 14th bin: <4>_{3n|1n,1n,1n} = ... | |
10468 | // 15th bin: <4>_{3n,1n|3n,1n} = ... | |
10469 | // 16th bin: <4>_{3n,1n|2n,2n} = ... | |
10470 | // 17th bin: <4>_{4n|2n,1n,1n} = ... | |
10471 | // 18th bin: ---- EMPTY ---- | |
10472 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = ... | |
10473 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = ... | |
10474 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = ... | |
10475 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = ... | |
10476 | // 23rd bin: ---- EMPTY ---- | |
10477 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = ... | |
10478 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = ... | |
10479 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = ... | |
10480 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = ... | |
10481 | // 28th bin: ---- EMPTY ---- | |
10482 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = ... | |
10483 | // 30th bin: ---- EMPTY ---- | |
10484 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = ... | |
57340a27 | 10485 | |
489d5531 | 10486 | // Remark 2: When particle weights are used there are some extra correlations. They are stored in |
10487 | // fIntFlowExtraDirectCorrelations binning of which is organized as follows: | |
57340a27 | 10488 | |
489d5531 | 10489 | // 1st bin: two1n1nW3W1 = <w1^3 w2 cos(n*(phi1-phi2))> |
10490 | // 2nd bin: two1n1nW1W1W2 = <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
10491 | // ... | |
57340a27 | 10492 | |
489d5531 | 10493 | Int_t nPrim = anEvent->NumberOfTracks(); |
10494 | AliFlowTrackSimple *aftsTrack = NULL; | |
10495 | //Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.; | |
10496 | //Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1., wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.; | |
10497 | Double_t phi1=0., phi2=0., phi3=0., phi4=0.; | |
10498 | Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1.; | |
10499 | Int_t n = fHarmonic; | |
10500 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
10501 | Double_t dMult = (*fSMpk)(0,0); | |
10502 | cout<<endl; | |
10503 | cout<<"Multiparticle correlations: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
10504 | if(dMult<2) | |
10505 | { | |
10506 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; | |
10507 | } else if (dMult>fMaxAllowedMultiplicity) | |
10508 | { | |
10509 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; | |
10510 | } else | |
10511 | { | |
10512 | cout<<"... evaluating nested loops (using particle weights) ..."<<endl; | |
10513 | } | |
10514 | ||
10515 | // 2-particle correlations: | |
10516 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
10517 | { | |
10518 | // 2 nested loops multiparticle correlations using particle weights: | |
10519 | for(Int_t i1=0;i1<nPrim;i1++) | |
10520 | { | |
10521 | aftsTrack=anEvent->GetTrack(i1); | |
10522 | if(!(aftsTrack->InRPSelection())) continue; | |
10523 | phi1=aftsTrack->Phi(); | |
10524 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
10525 | for(Int_t i2=0;i2<nPrim;i2++) | |
10526 | { | |
10527 | if(i2==i1)continue; | |
10528 | aftsTrack=anEvent->GetTrack(i2); | |
10529 | if(!(aftsTrack->InRPSelection())) continue; | |
10530 | phi2=aftsTrack->Phi(); | |
10531 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
10532 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
10533 | // 2-p correlations using particle weights: | |
10534 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),wPhi1*wPhi2); // <w1 w2 cos( n*(phi1-phi2))> | |
10535 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(1.5,cos(2.*n*(phi1-phi2)),pow(wPhi1,2)*pow(wPhi2,2)); // <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
10536 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(2.5,cos(3.*n*(phi1-phi2)),pow(wPhi1,3)*pow(wPhi2,3)); // <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
10537 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(3.5,cos(4.*n*(phi1-phi2)),pow(wPhi1,4)*pow(wPhi2,4)); // <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
10538 | // extra correlations: | |
10539 | // 2-p extra correlations (do not appear if particle weights are not used): | |
10540 | if(fUsePhiWeights) fIntFlowExtraDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),pow(wPhi1,3)*wPhi2); // <w1^3 w2 cos(n*(phi1-phi2))> | |
10541 | // ... | |
10542 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10543 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10544 | } // end of if(nPrim>=2) | |
10545 | ||
10546 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
57340a27 | 10547 | { |
489d5531 | 10548 | // 3 nested loops multiparticle correlations using particle weights: |
10549 | for(Int_t i1=0;i1<nPrim;i1++) | |
57340a27 | 10550 | { |
489d5531 | 10551 | aftsTrack=anEvent->GetTrack(i1); |
10552 | if(!(aftsTrack->InRPSelection())) continue; | |
10553 | phi1=aftsTrack->Phi(); | |
10554 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
10555 | for(Int_t i2=0;i2<nPrim;i2++) | |
10556 | { | |
10557 | if(i2==i1)continue; | |
10558 | aftsTrack=anEvent->GetTrack(i2); | |
10559 | if(!(aftsTrack->InRPSelection())) continue; | |
10560 | phi2=aftsTrack->Phi(); | |
10561 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
10562 | for(Int_t i3=0;i3<nPrim;i3++) | |
10563 | { | |
10564 | if(i3==i1||i3==i2)continue; | |
10565 | aftsTrack=anEvent->GetTrack(i3); | |
10566 | if(!(aftsTrack->InRPSelection())) continue; | |
10567 | phi3=aftsTrack->Phi(); | |
10568 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
10569 | if(nPrim==3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; | |
10570 | // 3-p correlations using particle weights: | |
10571 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(5.5,cos(2.*n*phi1-n*(phi2+phi3)),pow(wPhi1,2)*wPhi2*wPhi3); // <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
10572 | // ... | |
10573 | // extra correlations: | |
10574 | // 2-p extra correlations (do not appear if particle weights are not used): | |
10575 | if(fUsePhiWeights) fIntFlowExtraDirectCorrelations->Fill(1.5,cos(n*(phi1-phi2)),wPhi1*wPhi2*pow(wPhi3,2)); // <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
10576 | // ... | |
10577 | // 3-p extra correlations (do not appear if particle weights are not used): | |
10578 | // ... | |
10579 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10580 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10581 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10582 | } // end of if(nPrim>=3) | |
57340a27 | 10583 | |
489d5531 | 10584 | if(nPrim>=4 && nPrim<=fMaxAllowedMultiplicity) |
10585 | { | |
10586 | // 4 nested loops multiparticle correlations using particle weights: | |
10587 | for(Int_t i1=0;i1<nPrim;i1++) | |
10588 | { | |
10589 | aftsTrack=anEvent->GetTrack(i1); | |
10590 | if(!(aftsTrack->InRPSelection())) continue; | |
10591 | phi1=aftsTrack->Phi(); | |
10592 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
10593 | for(Int_t i2=0;i2<nPrim;i2++) | |
10594 | { | |
10595 | if(i2==i1)continue; | |
10596 | aftsTrack=anEvent->GetTrack(i2); | |
10597 | if(!(aftsTrack->InRPSelection())) continue; | |
10598 | phi2=aftsTrack->Phi(); | |
10599 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
10600 | for(Int_t i3=0;i3<nPrim;i3++) | |
10601 | { | |
10602 | if(i3==i1||i3==i2)continue; | |
10603 | aftsTrack=anEvent->GetTrack(i3); | |
10604 | if(!(aftsTrack->InRPSelection())) continue; | |
10605 | phi3=aftsTrack->Phi(); | |
10606 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
10607 | for(Int_t i4=0;i4<nPrim;i4++) | |
10608 | { | |
10609 | if(i4==i1||i4==i2||i4==i3)continue; | |
10610 | aftsTrack=anEvent->GetTrack(i4); | |
10611 | if(!(aftsTrack->InRPSelection())) continue; | |
10612 | phi4=aftsTrack->Phi(); | |
10613 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi()))); | |
10614 | if(nPrim>=4) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<"\r"<<flush; // to be improved (replace eventually this if statement with if(nPrim==4)) | |
10615 | // 4-p correlations using particle weights: | |
10616 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(10.5,cos(n*phi1+n*phi2-n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); | |
10617 | // extra correlations: | |
10618 | // 2-p extra correlations (do not appear if particle weights are not used): | |
10619 | // ... | |
10620 | // 3-p extra correlations (do not appear if particle weights are not used): | |
10621 | // ... | |
10622 | // 4-p extra correlations (do not appear if particle weights are not used): | |
10623 | // ... | |
10624 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10625 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10626 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10627 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10628 | } // end of if(nPrim>=4) | |
57340a27 | 10629 | |
489d5531 | 10630 | cout<<endl; |
57340a27 | 10631 | |
489d5531 | 10632 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent) |
57340a27 | 10633 | |
489d5531 | 10634 | |
10635 | //================================================================================================================================ | |
10636 | ||
10637 | ||
10638 | void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowExtraCorrelations() | |
57340a27 | 10639 | { |
489d5531 | 10640 | // Cross-check results for extra multiparticle correlations needed for int. flow |
10641 | // which appear only when particle weights are used: results from Q-vectors vs results from nested loops. | |
57340a27 | 10642 | |
489d5531 | 10643 | cout<<endl; |
10644 | cout<<endl; | |
10645 | cout<<" ***********************************************"<<endl; | |
10646 | cout<<" **** cross-checking the extra correlations ****"<<endl; | |
10647 | cout<<" **** for integrated flow ****"<<endl; | |
10648 | cout<<" ***********************************************"<<endl; | |
10649 | cout<<endl; | |
10650 | cout<<endl; | |
10651 | ||
10652 | for(Int_t eci=1;eci<=2;eci++) // to be improved (increased eciMax eventually when I calculate 6th and 8th) | |
57340a27 | 10653 | { |
489d5531 | 10654 | if(strcmp((fIntFlowExtraCorrelationsPro->GetXaxis())->GetBinLabel(eci), "") == 0) continue; |
10655 | cout<<(fIntFlowExtraCorrelationsPro->GetXaxis())->GetBinLabel(eci)<<":"<<endl; | |
10656 | cout<<"from Q-vectors = "<<fIntFlowExtraCorrelationsPro->GetBinContent(eci)<<endl; | |
10657 | cout<<"from nested loops = "<<fIntFlowExtraDirectCorrelations->GetBinContent(eci)<<endl; | |
10658 | cout<<endl; | |
10659 | } | |
57340a27 | 10660 | |
489d5531 | 10661 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowExtraCorrelations() |
57340a27 | 10662 | |
10663 | ||
489d5531 | 10664 | //================================================================================================================================ |
3b552efe | 10665 | |
10666 | ||
0328db2d | 10667 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrectionsForNUAWithNestedLoops(AliFlowEventSimple * const anEvent) |
489d5531 | 10668 | { |
10669 | // Evaluate with nested loops correction terms for non-uniform acceptance relevant for NONAME integrated flow (to be improved (name)). | |
10670 | // | |
10671 | // Remark: Both sin and cos correction terms are calculated in this method. Sin terms are stored in fIntFlowDirectCorrectionTermsForNUA[0], | |
10672 | // and cos terms in fIntFlowDirectCorrectionTermsForNUA[1]. Binning of fIntFlowDirectCorrectionTermsForNUA[sc] is organized as follows | |
10673 | // (sc stands for either sin or cos): | |
10674 | ||
10675 | // 1st bin: <<sc(n*(phi1))>> | |
10676 | // 2nd bin: <<sc(n*(phi1+phi2))>> | |
10677 | // 3rd bin: <<sc(n*(phi1-phi2-phi3))>> | |
10678 | // 4th bin: <<sc(n*(2phi1-phi2))>> | |
10679 | ||
10680 | Int_t nPrim = anEvent->NumberOfTracks(); | |
10681 | AliFlowTrackSimple *aftsTrack = NULL; | |
10682 | Double_t phi1=0., phi2=0., phi3=0.; | |
10683 | Int_t n = fHarmonic; | |
10684 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
10685 | Double_t dMult = (*fSMpk)(0,0); | |
10686 | cout<<endl; | |
10687 | cout<<"Correction terms for non-uniform acceptance: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
10688 | if(dMult<1) | |
3b552efe | 10689 | { |
489d5531 | 10690 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; |
10691 | } else if (dMult>fMaxAllowedMultiplicity) | |
3b552efe | 10692 | { |
489d5531 | 10693 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; |
10694 | } else | |
10695 | { | |
10696 | cout<<"... evaluating nested loops (without using particle weights)..."<<endl; | |
10697 | } | |
10698 | ||
10699 | if(nPrim>=1 && nPrim<=fMaxAllowedMultiplicity) | |
10700 | { | |
10701 | // 1-particle correction terms for non-uniform acceptance: | |
10702 | for(Int_t i1=0;i1<nPrim;i1++) | |
10703 | { | |
10704 | aftsTrack=anEvent->GetTrack(i1); | |
10705 | if(!(aftsTrack->InRPSelection())) continue; | |
10706 | phi1=aftsTrack->Phi(); | |
10707 | if(nPrim==1) cout<<i1<<"\r"<<flush; | |
10708 | // sin terms: | |
10709 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(0.5,sin(n*phi1),1.); // <sin(n*phi1)> | |
10710 | // cos terms: | |
10711 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(0.5,cos(n*phi1),1.); // <cos(n*phi1)> | |
10712 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10713 | } // end of if(nPrim>=1) | |
10714 | ||
10715 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
10716 | { | |
10717 | // 2-particle correction terms for non-uniform acceptance: | |
10718 | for(Int_t i1=0;i1<nPrim;i1++) | |
10719 | { | |
10720 | aftsTrack=anEvent->GetTrack(i1); | |
10721 | if(!(aftsTrack->InRPSelection())) continue; | |
10722 | phi1=aftsTrack->Phi(); | |
10723 | for(Int_t i2=0;i2<nPrim;i2++) | |
3b552efe | 10724 | { |
489d5531 | 10725 | if(i2==i1)continue; |
10726 | aftsTrack=anEvent->GetTrack(i2); | |
10727 | if(!(aftsTrack->InRPSelection())) continue; | |
10728 | phi2=aftsTrack->Phi(); | |
10729 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
10730 | // sin terms: | |
3b552efe | 10731 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(1.5,sin(n*(phi1+phi2)),1.); // <<sin(n*(phi1+phi2))>> |
489d5531 | 10732 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(3.5,sin(n*(2*phi1-phi2)),1.); // <<sin(n*(2*phi1-phi2))>> |
10733 | // cos terms: | |
3b552efe | 10734 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(1.5,cos(n*(phi1+phi2)),1.); // <<cos(n*(phi1+phi2))>> |
489d5531 | 10735 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(3.5,cos(n*(2*phi1-phi2)),1.); // <<cos(n*(2*phi1-phi2))>> |
10736 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10737 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10738 | } // end of if(nPrim>=2) | |
10739 | ||
10740 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
10741 | { | |
10742 | // 3-particle correction terms for non-uniform acceptance: | |
10743 | for(Int_t i1=0;i1<nPrim;i1++) | |
10744 | { | |
10745 | aftsTrack=anEvent->GetTrack(i1); | |
10746 | if(!(aftsTrack->InRPSelection())) continue; | |
10747 | phi1=aftsTrack->Phi(); | |
10748 | for(Int_t i2=0;i2<nPrim;i2++) | |
10749 | { | |
10750 | if(i2==i1)continue; | |
10751 | aftsTrack=anEvent->GetTrack(i2); | |
10752 | if(!(aftsTrack->InRPSelection())) continue; | |
10753 | phi2=aftsTrack->Phi(); | |
10754 | for(Int_t i3=0;i3<nPrim;i3++) | |
10755 | { | |
10756 | if(i3==i1||i3==i2)continue; | |
10757 | aftsTrack=anEvent->GetTrack(i3); | |
10758 | if(!(aftsTrack->InRPSelection())) continue; | |
10759 | phi3=aftsTrack->Phi(); | |
10760 | if(nPrim>=3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; // to be improved (eventually I will change this if statement) | |
10761 | // sin terms: | |
10762 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(2.5,sin(n*(phi1-phi2-phi3)),1.); // <<sin(n*(phi1-phi2-phi3))>> | |
10763 | // cos terms: | |
10764 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(2.5,cos(n*(phi1-phi2-phi3)),1.); // <<cos(n*(phi1-phi2-phi3))>> | |
10765 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10766 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10767 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10768 | } // end of if(nPrim>=3) | |
10769 | ||
10770 | cout<<endl; | |
10771 | } | |
10772 | //================================================================================================================================ | |
0328db2d | 10773 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoops(AliFlowEventSimple * const anEvent, TString type, TString ptOrEta) |
489d5531 | 10774 | { |
10775 | // Evaluate reduced correlations with nested loops without using the particle weights. | |
10776 | ||
10777 | // Remark 1: Reduced correlations are evaluated in pt bin number fCrossCheckInPtBinNo and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
10778 | // Remark 2: Results are stored in 1 bin profiles fDiffFlowDirectCorrelations[t][pe][ci], where indices runs as follows: | |
10779 | // [0=RP,1=POI][0=Pt,1=Eta][0=<2'>,1=<4'>,2=<6'>,3=<8'>] | |
10780 | // Remark 3: <2'> = <cos(n*(psi1-phi2))> | |
10781 | // <4'> = <cos(n*(psi1+phi2-phi3-phi4))> | |
10782 | // ... | |
10783 | ||
10784 | Int_t typeFlag = -1; | |
10785 | Int_t ptEtaFlag = -1; | |
10786 | if(type == "RP") | |
10787 | { | |
10788 | typeFlag = 0; | |
10789 | } else if(type == "POI") | |
10790 | { | |
10791 | typeFlag = 1; | |
10792 | } | |
10793 | if(ptOrEta == "Pt") | |
10794 | { | |
10795 | ptEtaFlag = 0; | |
10796 | } else if(ptOrEta == "Eta") | |
10797 | { | |
10798 | ptEtaFlag = 1; | |
10799 | } | |
10800 | // shortcuts: | |
10801 | Int_t t = typeFlag; | |
10802 | Int_t pe = ptEtaFlag; | |
10803 | ||
10804 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
10805 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
10806 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
10807 | ||
10808 | Int_t nPrim = anEvent->NumberOfTracks(); | |
10809 | AliFlowTrackSimple *aftsTrack = NULL; | |
10810 | ||
10811 | Double_t psi1=0., phi2=0., phi3=0., phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
10812 | ||
3b552efe | 10813 | Int_t n = fHarmonic; |
489d5531 | 10814 | |
10815 | // 2'-particle correlations: | |
10816 | for(Int_t i1=0;i1<nPrim;i1++) | |
10817 | { | |
10818 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 10819 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
10820 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 10821 | { |
10822 | if(ptOrEta == "Pt") | |
10823 | { | |
10824 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10825 | } else if (ptOrEta == "Eta") | |
10826 | { | |
10827 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 10828 | } |
10829 | } else // this is diff flow of RPs | |
10830 | { | |
489d5531 | 10831 | if(ptOrEta == "Pt") |
10832 | { | |
10833 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
10834 | } else if (ptOrEta == "Eta") | |
10835 | { | |
10836 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 10837 | } |
10838 | } | |
489d5531 | 10839 | |
10840 | psi1=aftsTrack->Phi(); | |
10841 | for(Int_t i2=0;i2<nPrim;i2++) | |
10842 | { | |
10843 | if(i2==i1)continue; | |
10844 | aftsTrack=anEvent->GetTrack(i2); | |
10845 | // RP condition (!(first) particle in the correlator must be RP): | |
10846 | if(!(aftsTrack->InRPSelection()))continue; | |
10847 | phi2=aftsTrack->Phi(); | |
10848 | // 2'-particle correlations: | |
10849 | fDiffFlowDirectCorrelations[t][pe][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(1.*n*(psi1-phi2)),1.); // <cos(n*(psi1-phi2)) | |
10850 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
10851 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
10852 | ||
10853 | /* | |
10854 | ||
10855 | // 3'-particle correlations: | |
10856 | for(Int_t i1=0;i1<nPrim;i1++) | |
10857 | { | |
10858 | aftsTrack=anEvent->GetTrack(i1); | |
10859 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) | |
10860 | if(ptOrEta == "Pt") | |
10861 | { | |
10862 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10863 | } else if (ptOrEta == "Eta") | |
10864 | { | |
10865 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10866 | } | |
10867 | psi1=aftsTrack->Phi(); | |
10868 | for(Int_t i2=0;i2<nPrim;i2++) | |
10869 | { | |
10870 | if(i2==i1)continue; | |
10871 | aftsTrack=anEvent->GetTrack(i2); | |
10872 | // RP condition (!(first) particle in the correlator must be RP): | |
10873 | if(!(aftsTrack->InRPSelection())) continue; | |
10874 | phi2=aftsTrack->Phi(); | |
10875 | for(Int_t i3=0;i3<nPrim;i3++) | |
10876 | { | |
10877 | if(i3==i1||i3==i2)continue; | |
10878 | aftsTrack=anEvent->GetTrack(i3); | |
10879 | // RP condition (!(first) particle in the correlator must be RP): | |
10880 | if(!(aftsTrack->InRPSelection())) continue; | |
10881 | phi3=aftsTrack->Phi(); | |
10882 | // to be improved : where to store it? ->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(2.*phi1-phi2-phi3)),1.); // <w1 w2 w3 cos(n(2psi1-phi2-phi3))> | |
10883 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
10884 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
10885 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
10886 | ||
10887 | */ | |
10888 | ||
10889 | // 4'-particle correlations: | |
10890 | for(Int_t i1=0;i1<nPrim;i1++) | |
10891 | { | |
10892 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 10893 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
10894 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 10895 | { |
10896 | if(ptOrEta == "Pt") | |
10897 | { | |
10898 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10899 | } else if (ptOrEta == "Eta") | |
10900 | { | |
10901 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 10902 | } |
10903 | } else // this is diff flow of RPs | |
10904 | { | |
489d5531 | 10905 | if(ptOrEta == "Pt") |
10906 | { | |
10907 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
10908 | } else if (ptOrEta == "Eta") | |
10909 | { | |
10910 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 10911 | } |
10912 | } | |
489d5531 | 10913 | |
10914 | psi1=aftsTrack->Phi(); | |
10915 | for(Int_t i2=0;i2<nPrim;i2++) | |
10916 | { | |
10917 | if(i2==i1) continue; | |
10918 | aftsTrack=anEvent->GetTrack(i2); | |
10919 | // RP condition (!(first) particle in the correlator must be RP): | |
10920 | if(!(aftsTrack->InRPSelection())) continue; | |
10921 | phi2=aftsTrack->Phi(); | |
10922 | for(Int_t i3=0;i3<nPrim;i3++) | |
10923 | { | |
10924 | if(i3==i1||i3==i2) continue; | |
10925 | aftsTrack=anEvent->GetTrack(i3); | |
10926 | // RP condition (!(first) particle in the correlator must be RP): | |
10927 | if(!(aftsTrack->InRPSelection())) continue; | |
10928 | phi3=aftsTrack->Phi(); | |
10929 | for(Int_t i4=0;i4<nPrim;i4++) | |
10930 | { | |
10931 | if(i4==i1||i4==i2||i4==i3) continue; | |
10932 | aftsTrack=anEvent->GetTrack(i4); | |
10933 | // RP condition (!(first) particle in the correlator must be RP): | |
10934 | if(!(aftsTrack->InRPSelection())) continue; | |
10935 | phi4=aftsTrack->Phi(); | |
10936 | // 4'-particle correlations: | |
10937 | fDiffFlowDirectCorrelations[t][pe][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3-phi4)),1.); // <cos(n(psi1+phi2-phi3-phi4))> | |
10938 | }//end of for(Int_t i4=0;i4<nPrim;i4++) | |
10939 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
10940 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
10941 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
10942 | ||
10943 | // count # of RPs and POIs in selected pt and eta bins for cross-checkings: | |
3b552efe | 10944 | for(Int_t i=0;i<nPrim;i++) |
10945 | { | |
10946 | aftsTrack=anEvent->GetTrack(i); | |
10947 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) | |
10948 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 10949 | { |
10950 | if(ptOrEta == "Pt") | |
10951 | { | |
10952 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10953 | } else if (ptOrEta == "Eta") | |
10954 | { | |
10955 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 10956 | } |
10957 | } else // this is diff flow of RPs | |
10958 | { | |
489d5531 | 10959 | if(ptOrEta == "Pt") |
10960 | { | |
10961 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
10962 | } else if (ptOrEta == "Eta") | |
10963 | { | |
10964 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 10965 | } |
10966 | } | |
10967 | if(t==1)t++; | |
10968 | fNoOfParticlesInBin->Fill(t+pe+0.5); | |
489d5531 | 10969 | } |
10970 | ||
10971 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoops(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
10972 | ||
10973 | ||
10974 | //================================================================================================================================ | |
10975 | ||
10976 | ||
10977 | void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrelations(TString type, TString ptOrEta) | |
10978 | { | |
10979 | // Compare correlations needed for diff. flow calculated with nested loops and those calculated from Q-vectors | |
10980 | ||
10981 | Int_t typeFlag = -1; | |
10982 | Int_t ptEtaFlag = -1; | |
10983 | if(type == "RP") | |
10984 | { | |
10985 | typeFlag = 0; | |
10986 | } else if(type == "POI") | |
10987 | { | |
10988 | typeFlag = 1; | |
10989 | } | |
10990 | if(ptOrEta == "Pt") | |
10991 | { | |
10992 | ptEtaFlag = 0; | |
10993 | } else if(ptOrEta == "Eta") | |
10994 | { | |
10995 | ptEtaFlag = 1; | |
10996 | } | |
10997 | // shortcuts: | |
10998 | Int_t t = typeFlag; | |
10999 | Int_t pe = ptEtaFlag; | |
11000 | ||
11001 | TString rpORpoiString[2] = {"RP ","POI"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
11002 | TString ptORetaString[2] = {"pt","eta"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
11003 | TString reducedCorrelations[4] = {"<<cos(n(psi1-phi2))>>","<<cos(n(psi1+phi2-phi3-phi4))>>","",""}; // to be improved (access this from pro or hist) | |
11004 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
11005 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
11006 | ||
11007 | Int_t crossCheckInPtEtaBinNo[2] = {fCrossCheckInPtBinNo,fCrossCheckInEtaBinNo}; | |
11008 | ||
11009 | ||
11010 | cout<<endl; | |
11011 | cout<<" *****************************************"<<endl; | |
11012 | cout<<" **** cross-checking the correlations ****"<<endl; | |
11013 | cout<<" **** for differential flow ("<<rpORpoiString[t]<<") ****"<<endl; | |
11014 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
11015 | { | |
11016 | cout<<" **** (particle weights not used) ****"<<endl; | |
11017 | } else | |
11018 | { | |
11019 | cout<<" **** (particle weights used) ****"<<endl; | |
11020 | } | |
11021 | cout<<" *****************************************"<<endl; | |
11022 | cout<<endl; | |
11023 | cout<<" "<<ptORetaString[pe]<<" bin: "<<lowerPtEtaEdge[pe]<<" <= "<<ptORetaString[pe]<<" < "<<upperPtEtaEdge[pe]<<endl; | |
11024 | cout<<endl; | |
11025 | ||
11026 | for(Int_t rci=0;rci<2;rci++) // to be improved (calculate 6th and 8th order) | |
11027 | { | |
11028 | cout<<" "<<reducedCorrelations[rci].Data()<<":"<<endl; | |
11029 | cout<<" from Q-vectors = "<<fDiffFlowCorrelationsPro[t][pe][rci]->GetBinContent(crossCheckInPtEtaBinNo[pe])<<endl; | |
11030 | cout<<" from nested loops = "<<fDiffFlowDirectCorrelations[t][pe][rci]->GetBinContent(1)<<endl; | |
11031 | cout<<endl; | |
11032 | } // end of for(Int_t rci=0;rci<4;rci++) | |
11033 | ||
11034 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrelations(TString type, TString ptOrEta) | |
11035 | ||
3b552efe | 11036 | //================================================================================================================================ |
11037 | ||
489d5531 | 11038 | void AliFlowAnalysisWithQCumulants::PrintNumberOfParticlesInSelectedBin() |
3b552efe | 11039 | { |
11040 | // Print on the screen number of RPs and POIs in selected pt and eta bin for cross checkings. | |
11041 | ||
11042 | cout<<endl; | |
11043 | cout<<"Number of RPs in selected pt bin = "<<fNoOfParticlesInBin->GetBinContent(1)<<endl; | |
11044 | cout<<"Number of RPs in selected eta bin = "<<fNoOfParticlesInBin->GetBinContent(2)<<endl; | |
11045 | cout<<"Number of POIs in selected pt bin = "<<fNoOfParticlesInBin->GetBinContent(3)<<endl; | |
11046 | cout<<"Number of POIs in selected eta bin = "<<fNoOfParticlesInBin->GetBinContent(4)<<endl; | |
11047 | ||
489d5531 | 11048 | } // end of void AliFlowAnalysisWithQCumulants::PrintNumberOfParticlesInSelectedBin() |
11049 | ||
3b552efe | 11050 | //================================================================================================================================ |
11051 | ||
0328db2d | 11052 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple * const anEvent, TString type, TString ptOrEta) |
489d5531 | 11053 | { |
11054 | // Evaluate reduced correlations with nested loops without using the particle weights. | |
11055 | ||
11056 | // Remark 1: Reduced correlations are evaluated in pt bin number fCrossCheckInPtBinNo and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
11057 | // Remark 2: Results are stored in 1 bin profiles fDiffFlowDirectCorrelations[t][pe][ci], where indices runs as follows: | |
11058 | // [0=RP,1=POI][0=Pt,1=Eta][0=<2'>,1=<4'>,2=<6'>,3=<8'>] | |
11059 | // Remark 3: <2'> = <w2 cos(n*(psi1-phi2))> | |
11060 | // <4'> = <w2 w3 w4 cos(n*(psi1+phi2-phi3-phi4))> | |
11061 | // ... | |
11062 | ||
11063 | Int_t typeFlag = -1; | |
11064 | Int_t ptEtaFlag = -1; | |
11065 | if(type == "RP") | |
11066 | { | |
11067 | typeFlag = 0; | |
11068 | } else if(type == "POI") | |
11069 | { | |
11070 | typeFlag = 1; | |
11071 | } | |
11072 | if(ptOrEta == "Pt") | |
11073 | { | |
11074 | ptEtaFlag = 0; | |
11075 | } else if(ptOrEta == "Eta") | |
11076 | { | |
11077 | ptEtaFlag = 1; | |
11078 | } | |
11079 | // shortcuts: | |
11080 | Int_t t = typeFlag; | |
11081 | Int_t pe = ptEtaFlag; | |
11082 | ||
11083 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
11084 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
11085 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
11086 | ||
11087 | Int_t nPrim = anEvent->NumberOfTracks(); | |
11088 | AliFlowTrackSimple *aftsTrack = NULL; | |
11089 | ||
11090 | Double_t psi1=0., phi2=0., phi3=0., phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
11091 | Double_t wPhi2=1., wPhi3=1., wPhi4=1.;// wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.; | |
11092 | ||
11093 | Int_t n = fHarmonic; | |
11094 | ||
11095 | // 2'-particle correlations: | |
11096 | for(Int_t i1=0;i1<nPrim;i1++) | |
11097 | { | |
11098 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11099 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11100 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11101 | { |
11102 | if(ptOrEta == "Pt") | |
11103 | { | |
11104 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11105 | } else if (ptOrEta == "Eta") | |
11106 | { | |
11107 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11108 | } |
11109 | } else // this is diff flow of RPs | |
11110 | { | |
489d5531 | 11111 | if(ptOrEta == "Pt") |
11112 | { | |
11113 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11114 | } else if (ptOrEta == "Eta") | |
11115 | { | |
11116 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11117 | } |
489d5531 | 11118 | } |
11119 | psi1=aftsTrack->Phi(); | |
11120 | for(Int_t i2=0;i2<nPrim;i2++) | |
11121 | { | |
11122 | if(i2==i1) continue; | |
11123 | aftsTrack=anEvent->GetTrack(i2); | |
11124 | // RP condition (!(first) particle in the correlator must be RP): | |
11125 | if(!(aftsTrack->InRPSelection())) continue; | |
11126 | phi2=aftsTrack->Phi(); | |
11127 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11128 | // 2'-particle correlations: | |
11129 | fDiffFlowDirectCorrelations[t][pe][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(1.*n*(psi1-phi2)),wPhi2); // <w2 cos(n*(psi1-phi2)) | |
11130 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
11131 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11132 | ||
11133 | // 4'-particle correlations: | |
11134 | for(Int_t i1=0;i1<nPrim;i1++) | |
11135 | { | |
11136 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11137 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11138 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11139 | { |
11140 | if(ptOrEta == "Pt") | |
11141 | { | |
11142 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11143 | } else if (ptOrEta == "Eta") | |
11144 | { | |
11145 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11146 | } |
11147 | } else // this is diff flow of RPs | |
11148 | { | |
489d5531 | 11149 | if(ptOrEta == "Pt") |
11150 | { | |
11151 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11152 | } else if (ptOrEta == "Eta") | |
11153 | { | |
11154 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11155 | } |
489d5531 | 11156 | } |
11157 | psi1=aftsTrack->Phi(); | |
11158 | for(Int_t i2=0;i2<nPrim;i2++) | |
11159 | { | |
11160 | if(i2==i1) continue; | |
11161 | aftsTrack=anEvent->GetTrack(i2); | |
11162 | // RP condition (!(first) particle in the correlator must be RP): | |
11163 | if(!(aftsTrack->InRPSelection())) continue; | |
11164 | phi2=aftsTrack->Phi(); | |
11165 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11166 | for(Int_t i3=0;i3<nPrim;i3++) | |
11167 | { | |
11168 | if(i3==i1||i3==i2) continue; | |
11169 | aftsTrack=anEvent->GetTrack(i3); | |
11170 | // RP condition (!(first) particle in the correlator must be RP): | |
11171 | if(!(aftsTrack->InRPSelection())) continue; | |
11172 | phi3=aftsTrack->Phi(); | |
11173 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
11174 | for(Int_t i4=0;i4<nPrim;i4++) | |
11175 | { | |
11176 | if(i4==i1||i4==i2||i4==i3) continue; | |
11177 | aftsTrack=anEvent->GetTrack(i4); | |
11178 | // RP condition (!(first) particle in the correlator must be RP): | |
11179 | if(!(aftsTrack->InRPSelection())) continue; | |
11180 | phi4=aftsTrack->Phi(); | |
11181 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi()))); | |
11182 | // 4'-particle correlations <w2 w3 w4 cos(n(psi1+phi2-phi3-phi4))>: | |
11183 | fDiffFlowDirectCorrelations[t][pe][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3-phi4)),wPhi2*wPhi3*wPhi4); | |
11184 | }//end of for(Int_t i4=0;i4<nPrim;i4++) | |
11185 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
11186 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
11187 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11188 | ||
11189 | // count # of RPs and POIs in selected pt and eta bins for cross-checkings: (to be improved - moved to dedicated method) | |
3b552efe | 11190 | for(Int_t i=0;i<nPrim;i++) |
11191 | { | |
489d5531 | 11192 | aftsTrack=anEvent->GetTrack(i); |
11193 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) | |
11194 | if(typeFlag==1) // this is diff flow of POIs | |
11195 | { | |
11196 | if(ptOrEta == "Pt") | |
11197 | { | |
11198 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11199 | } else if (ptOrEta == "Eta") | |
11200 | { | |
11201 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11202 | } | |
11203 | } else // this is diff flow of RPs | |
11204 | { | |
11205 | if(ptOrEta == "Pt") | |
11206 | { | |
11207 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11208 | } else if (ptOrEta == "Eta") | |
11209 | { | |
11210 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11211 | } | |
11212 | } | |
11213 | if(t==1)t++; | |
11214 | fNoOfParticlesInBin->Fill(t+pe+0.5); | |
11215 | } | |
11216 | ||
11217 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
11218 | ||
11219 | ||
11220 | //================================================================================================================================ | |
11221 | ||
11222 | ||
0328db2d | 11223 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(AliFlowEventSimple * const anEvent, TString type, TString ptOrEta) |
489d5531 | 11224 | { |
11225 | // Evaluate with nested loops correction terms for non-uniform acceptance (both sin and cos terms) relevant for differential flow. | |
11226 | ||
11227 | // Remark 1: Reduced correction terms for non-uniform acceptance are evaluated in pt bin number fCrossCheckInPtBinNo | |
11228 | // and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
11229 | // Remark 2: Results are stored in 1 bin profiles fDiffFlowDirectCorrections[t][pe][sc][cti], where first three indices runs as: | |
11230 | // [0=RP,1=POI][0=Pt,1=Eta][0=sin terms,1=cos terms], whilst the cti (correction term index) runs as follows: | |
11231 | // cti: | |
11232 | // 0: <<sc n(psi1)>> | |
11233 | // 1: <<sc n(psi1+phi2)>> | |
11234 | // 2: <<sc n(psi1+phi2-phi3)>> | |
11235 | // 3: <<sc n(psi1-phi2-phi3)>> | |
11236 | // 4: | |
11237 | // 5: | |
11238 | // 6: | |
11239 | ||
11240 | Int_t typeFlag = -1; | |
11241 | Int_t ptEtaFlag = -1; | |
11242 | if(type == "RP") | |
11243 | { | |
11244 | typeFlag = 0; | |
11245 | } else if(type == "POI") | |
11246 | { | |
11247 | typeFlag = 1; | |
11248 | } | |
11249 | if(ptOrEta == "Pt") | |
11250 | { | |
11251 | ptEtaFlag = 0; | |
11252 | } else if(ptOrEta == "Eta") | |
11253 | { | |
11254 | ptEtaFlag = 1; | |
11255 | } | |
11256 | // shortcuts: | |
11257 | Int_t t = typeFlag; | |
11258 | Int_t pe = ptEtaFlag; | |
11259 | ||
11260 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
11261 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
11262 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
11263 | ||
11264 | Int_t nPrim = anEvent->NumberOfTracks(); | |
11265 | AliFlowTrackSimple *aftsTrack = NULL; | |
11266 | ||
11267 | Double_t psi1=0., phi2=0., phi3=0.;// phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
11268 | ||
11269 | Int_t n = fHarmonic; | |
11270 | ||
11271 | // 1-particle correction terms: | |
11272 | for(Int_t i1=0;i1<nPrim;i1++) | |
11273 | { | |
11274 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11275 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11276 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11277 | { |
11278 | if(ptOrEta == "Pt") | |
11279 | { | |
11280 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11281 | } else if (ptOrEta == "Eta") | |
11282 | { | |
11283 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11284 | } |
11285 | } else // this is diff flow of RPs | |
11286 | { | |
489d5531 | 11287 | if(ptOrEta == "Pt") |
11288 | { | |
11289 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11290 | } else if (ptOrEta == "Eta") | |
11291 | { | |
11292 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11293 | } |
11294 | } | |
489d5531 | 11295 | psi1=aftsTrack->Phi(); |
11296 | // sin terms: | |
11297 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*psi1),1.); // <<sin(n*(psi1))>> | |
11298 | // cos terms: | |
11299 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*psi1),1.); // <<cos(n*(psi1))>> | |
11300 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11301 | ||
11302 | // 2-particle correction terms: | |
11303 | for(Int_t i1=0;i1<nPrim;i1++) | |
11304 | { | |
11305 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11306 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11307 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11308 | { |
11309 | if(ptOrEta == "Pt") | |
11310 | { | |
11311 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11312 | } else if (ptOrEta == "Eta") | |
11313 | { | |
11314 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11315 | } |
11316 | } else // this is diff flow of RPs | |
11317 | { | |
489d5531 | 11318 | if(ptOrEta == "Pt") |
11319 | { | |
11320 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11321 | } else if (ptOrEta == "Eta") | |
11322 | { | |
11323 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11324 | } |
489d5531 | 11325 | } |
11326 | psi1=aftsTrack->Phi(); | |
11327 | for(Int_t i2=0;i2<nPrim;i2++) | |
11328 | { | |
11329 | if(i2==i1) continue; | |
11330 | aftsTrack=anEvent->GetTrack(i2); | |
11331 | // RP condition (!(first) particle in the correlator must be RP): | |
11332 | if(!(aftsTrack->InRPSelection())) continue; | |
11333 | phi2=aftsTrack->Phi(); | |
11334 | // sin terms: | |
11335 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2)),1.); // <<sin(n*(psi1+phi2))>> | |
11336 | // cos terms: | |
11337 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2)),1.); // <<cos(n*(psi1+phi2))>> | |
11338 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
11339 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11340 | ||
11341 | // 3-particle correction terms: | |
11342 | for(Int_t i1=0;i1<nPrim;i1++) | |
11343 | { | |
11344 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11345 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11346 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11347 | { |
11348 | if(ptOrEta == "Pt") | |
11349 | { | |
11350 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11351 | } else if (ptOrEta == "Eta") | |
11352 | { | |
11353 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11354 | } |
11355 | } else // this is diff flow of RPs | |
11356 | { | |
489d5531 | 11357 | if(ptOrEta == "Pt") |
11358 | { | |
11359 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11360 | } else if (ptOrEta == "Eta") | |
11361 | { | |
11362 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11363 | } |
489d5531 | 11364 | } |
11365 | psi1=aftsTrack->Phi(); | |
11366 | for(Int_t i2=0;i2<nPrim;i2++) | |
11367 | { | |
11368 | if(i2==i1) continue; | |
11369 | aftsTrack=anEvent->GetTrack(i2); | |
11370 | // RP condition (!(first) particle in the correlator must be RP): | |
11371 | if(!(aftsTrack->InRPSelection())) continue; | |
11372 | phi2=aftsTrack->Phi(); | |
11373 | for(Int_t i3=0;i3<nPrim;i3++) | |
11374 | { | |
11375 | if(i3==i1||i3==i2) continue; | |
11376 | aftsTrack=anEvent->GetTrack(i3); | |
11377 | // RP condition (!(first) particle in the correlator must be RP): | |
11378 | if(!(aftsTrack->InRPSelection())) continue; | |
11379 | phi3=aftsTrack->Phi(); | |
11380 | // sin terms: | |
11381 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][2]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2-phi3)),1.); // <<sin(n*(psi1+phi2-phi3))>> | |
11382 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][3]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1-phi2-phi3)),1.); // <<sin(n*(psi1-phi2-phi3))>> | |
11383 | // cos terms: | |
11384 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][2]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3)),1.); // <<cos(n*(psi1+phi2-phi3))>> | |
11385 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][3]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1-phi2-phi3)),1.); // <<cos(n*(psi1-phi2-phi3))>> | |
11386 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
11387 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
11388 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11389 | ||
11390 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
11391 | ||
11392 | ||
11393 | //================================================================================================================================ | |
11394 | ||
11395 | ||
11396 | void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrectionTermsForNUA(TString type, TString ptOrEta) | |
11397 | { | |
11398 | // Compare corrections temrs for non-uniform acceptance needed for diff. flow calculated with nested loops and those calculated from Q-vectors | |
11399 | ||
11400 | Int_t typeFlag = -1; | |
11401 | Int_t ptEtaFlag = -1; | |
11402 | if(type == "RP") | |
11403 | { | |
11404 | typeFlag = 0; | |
11405 | } else if(type == "POI") | |
11406 | { | |
11407 | typeFlag = 1; | |
11408 | } | |
11409 | if(ptOrEta == "Pt") | |
11410 | { | |
11411 | ptEtaFlag = 0; | |
11412 | } else if(ptOrEta == "Eta") | |
11413 | { | |
11414 | ptEtaFlag = 1; | |
11415 | } | |
11416 | // shortcuts: | |
11417 | Int_t t = typeFlag; | |
11418 | Int_t pe = ptEtaFlag; | |
11419 | ||
11420 | TString rpORpoiString[2] = {"RP ","POI"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
11421 | TString ptORetaString[2] = {"pt","eta"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
11422 | //TString sinCosFlag[2] = {"sin","cos"}; // to be improved (eventually promote to data member) | |
11423 | TString reducedCorrectionSinTerms[4] = {"<<sin(n(psi1))>>","<<sin(n(psi1+phi2))>>","<<sin(n*(psi1+phi2-phi3))>>","<<sin(n*(psi1-phi2-phi3))>>"}; // to be improved (access this from pro or hist) | |
11424 | TString reducedCorrectionCosTerms[4] = {"<<cos(n(psi1))>>","<<cos(n(psi1+phi2))>>","<<cos(n*(psi1+phi2-phi3))>>","<<cos(n*(psi1-phi2-phi3))>>"}; // to be improved (access this from pro or hist) | |
11425 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
11426 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
11427 | ||
11428 | Int_t crossCheckInPtEtaBinNo[2] = {fCrossCheckInPtBinNo,fCrossCheckInEtaBinNo}; | |
11429 | ||
11430 | cout<<endl; | |
11431 | cout<<" ******************************************"<<endl; | |
11432 | cout<<" **** cross-checking the correction ****"<<endl; | |
46b94261 | 11433 | cout<<" **** terms for non-uniform acceptance ****"<<endl; |
489d5531 | 11434 | cout<<" **** for differential flow ("<<rpORpoiString[t]<<") ****"<<endl; |
11435 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
11436 | { | |
11437 | cout<<" **** (particle weights not used) ****"<<endl; | |
11438 | } else | |
11439 | { | |
11440 | cout<<" **** (particle weights used) ****"<<endl; | |
11441 | } | |
11442 | cout<<" ******************************************"<<endl; | |
11443 | cout<<endl; | |
11444 | cout<<" "<<ptORetaString[pe]<<" bin: "<<lowerPtEtaEdge[pe]<<" <= "<<ptORetaString[pe]<<" < "<<upperPtEtaEdge[pe]<<endl; | |
11445 | cout<<endl; | |
11446 | ||
11447 | for(Int_t cti=0;cti<4;cti++) // correction term index | |
11448 | { | |
11449 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
11450 | { | |
11451 | if(sc==0) // to be improved (this can be implemented better) | |
11452 | { | |
11453 | cout<<" "<<reducedCorrectionSinTerms[cti].Data()<<":"<<endl; | |
11454 | } else | |
11455 | { | |
11456 | cout<<" "<<reducedCorrectionCosTerms[cti].Data()<<":"<<endl; | |
11457 | } | |
11458 | cout<<" from Q-vectors = "<<fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]->GetBinContent(crossCheckInPtEtaBinNo[pe])<<endl; | |
11459 | cout<<" from nested loops = "<<fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti]->GetBinContent(1)<<endl; | |
11460 | cout<<endl; | |
11461 | } | |
11462 | } // end of for(Int_t rci=0;rci<4;rci++) | |
11463 | ||
11464 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrectionTermsForNUA(TString type, TString ptOrEta) | |
11465 | ||
11466 | ||
57340a27 | 11467 | //================================================================================================================================ |
11468 | ||
489d5531 | 11469 | |
11470 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights() | |
11471 | { | |
11472 | // Calculate corrections using particle weights for non-uniform acceptance of the detector for no-name integrated flow (cos terms). | |
11473 | ||
11474 | // ********************************************************************** | |
11475 | // **** weighted corrections for non-uniform acceptance (cos terms): **** | |
11476 | // ********************************************************************** | |
57340a27 | 11477 | |
489d5531 | 11478 | // Remark 1: When particle weights are used the binning of fIntFlowCorrectionTermsForNUAPro[1] is organized as follows: |
57340a27 | 11479 | // |
489d5531 | 11480 | // 1st bin: <<w1 cos(n*(phi1))>> = cosP1nW1 |
11481 | // 2nd bin: <<w1 w2 cos(n*(phi1+phi2))>> = cosP1nP1nW1W1 | |
11482 | // 3rd bin: <<w1 w2 w3 cos(n*(phi1-phi2-phi3))>> = cosP1nM1nM1nW1W1W1 | |
11483 | // ... | |
11484 | ||
11485 | // multiplicity (number of particles used to determine the reaction plane) | |
11486 | Double_t dMult = (*fSMpk)(0,0); | |
11487 | ||
11488 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
11489 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
11490 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
11491 | //Double_t dReQ3n3k = (*fReQ)(2,3); | |
11492 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
11493 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
11494 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
11495 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
11496 | //Double_t dImQ3n3k = (*fImQ)(2,3); | |
11497 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
11498 | //Double_t dImQ1n3k = (*fImQ)(0,3); | |
11499 | ||
11500 | // dMs are variables introduced in order to simplify some Eqs. bellow: | |
11501 | //.............................................................................................. | |
11502 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
57340a27 | 11503 | Double_t dM111 = (*fSMpk)(2,1)-3.*(*fSMpk)(0,2)*(*fSMpk)(0,1) |
489d5531 | 11504 | + 2.*(*fSMpk)(0,3); // dM111 = sum_{i,j,k=1,i!=j!=k}^M w_i w_j w_k |
11505 | //.............................................................................................. | |
ecac11c2 | 11506 | // 1-particle: |
489d5531 | 11507 | Double_t cosP1nW1 = 0.; // <<w1 cos(n*(phi1))>> |
11508 | ||
0328db2d | 11509 | if(dMult>0 && TMath::Abs((*fSMpk)(0,1))>1e-6) |
489d5531 | 11510 | { |
11511 | cosP1nW1 = dReQ1n1k/(*fSMpk)(0,1); | |
11512 | ||
11513 | // average weighted 1-particle correction (cos terms) for non-uniform acceptance for single event: | |
11514 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(1,cosP1nW1); | |
11515 | ||
11516 | // final average weighted 1-particle correction (cos terms) for non-uniform acceptance for all events: | |
11517 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(0.5,cosP1nW1,(*fSMpk)(0,1)); | |
11518 | } | |
11519 | ||
11520 | // 2-particle: | |
11521 | Double_t cosP1nP1nW1W1 = 0.; // <<w1 w2 cos(n*(phi1+phi2))>> | |
11522 | ||
0328db2d | 11523 | if(dMult>1 && TMath::Abs(dM11)>1e-6) |
489d5531 | 11524 | { |
11525 | cosP1nP1nW1W1 = (pow(dReQ1n1k,2)-pow(dImQ1n1k,2)-dReQ2n2k)/dM11; | |
11526 | ||
11527 | // average weighted 2-particle correction (cos terms) for non-uniform acceptance for single event: | |
11528 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(2,cosP1nP1nW1W1); | |
11529 | ||
11530 | // final average weighted 2-particle correction (cos terms) for non-uniform acceptance for all events: | |
11531 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(1.5,cosP1nP1nW1W1,dM11); | |
11532 | } | |
11533 | ||
11534 | // 3-particle: | |
11535 | Double_t cosP1nM1nM1nW1W1W1 = 0.; // <<w1 w2 w3 cos(n*(phi1-phi2-phi3))>> | |
11536 | ||
0328db2d | 11537 | if(dMult>2 && TMath::Abs(dM111)>1e-6) |
489d5531 | 11538 | { |
57340a27 | 11539 | cosP1nM1nM1nW1W1W1 = (dReQ1n1k*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)) |
11540 | - dReQ1n1k*dReQ2n2k-dImQ1n1k*dImQ2n2k | |
11541 | - 2.*((*fSMpk)(0,2))*dReQ1n1k | |
489d5531 | 11542 | + 2.*dReQ1n3k) |
11543 | / dM111; | |
11544 | ||
11545 | // average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for single event: | |
11546 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(3,cosP1nM1nM1nW1W1W1); | |
11547 | ||
11548 | // final average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for all events: | |
11549 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(2.5,cosP1nM1nM1nW1W1W1,dM111); | |
11550 | } | |
11551 | ||
11552 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights() | |
11553 | ||
11554 | ||
11555 | //================================================================================================================================ | |
11556 | ||
11557 | ||
11558 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights() | |
11559 | { | |
11560 | // calculate corrections using particle weights for non-uniform acceptance of the detector for no-name integrated flow (sin terms) | |
11561 | ||
11562 | // ********************************************************************** | |
11563 | // **** weighted corrections for non-uniform acceptance (sin terms): **** | |
11564 | // ********************************************************************** | |
11565 | ||
11566 | // Remark 1: When particle weights are used the binning of fIntFlowCorrectionTermsForNUAPro[0] is organized as follows: | |
57340a27 | 11567 | // |
489d5531 | 11568 | // 1st bin: <<w1 sin(n*(phi1))>> = sinP1nW1 |
11569 | // 2nd bin: <<w1 w2 sin(n*(phi1+phi2))>> = sinP1nP1nW1W1 | |
11570 | // 3rd bin: <<w1 w2 w3 sin(n*(phi1-phi2-phi3))>> = sinP1nM1nM1nW1W1W1 | |
11571 | // ... | |
11572 | ||
11573 | // multiplicity (number of particles used to determine the reaction plane) | |
11574 | Double_t dMult = (*fSMpk)(0,0); | |
11575 | ||
11576 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
11577 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
11578 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
11579 | //Double_t dReQ3n3k = (*fReQ)(2,3); | |
11580 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
11581 | //Double_t dReQ1n3k = (*fReQ)(0,3); | |
11582 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
11583 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
11584 | //Double_t dImQ3n3k = (*fImQ)(2,3); | |
11585 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
11586 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
11587 | ||
11588 | // dMs are variables introduced in order to simplify some Eqs. bellow: | |
11589 | //.............................................................................................. | |
11590 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
57340a27 | 11591 | Double_t dM111 = (*fSMpk)(2,1)-3.*(*fSMpk)(0,2)*(*fSMpk)(0,1) |
489d5531 | 11592 | + 2.*(*fSMpk)(0,3); // dM111 = sum_{i,j,k=1,i!=j!=k}^M w_i w_j w_k |
11593 | //.............................................................................................. | |
11594 | ||
11595 | // 1-particle: | |
11596 | Double_t sinP1nW1 = 0.; // <<w1 sin(n*(phi1))>> | |
11597 | ||
0328db2d | 11598 | if(dMult>0 && TMath::Abs((*fSMpk)(0,1))>1e-6) |
489d5531 | 11599 | { |
11600 | sinP1nW1 = dImQ1n1k/((*fSMpk)(0,1)); | |
11601 | ||
11602 | // average weighted 1-particle correction (sin terms) for non-uniform acceptance for single event: | |
11603 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(1,sinP1nW1); | |
11604 | ||
11605 | // final average weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
11606 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(0.5,sinP1nW1,(*fSMpk)(0,1)); | |
11607 | } | |
11608 | ||
11609 | // 2-particle: | |
11610 | Double_t sinP1nP1nW1W1 = 0.; // <<w1 w2 sin(n*(phi1+phi2))>> | |
11611 | ||
0328db2d | 11612 | if(dMult>1 && TMath::Abs(dM11)>1e-6) |
489d5531 | 11613 | { |
11614 | sinP1nP1nW1W1 = (2.*dReQ1n1k*dImQ1n1k-dImQ2n2k)/dM11; | |
11615 | ||
11616 | // average weighted 2-particle correction (sin terms) for non-uniform acceptance for single event: | |
11617 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(2,sinP1nP1nW1W1); | |
11618 | ||
11619 | // final average weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
11620 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(1.5,sinP1nP1nW1W1,dM11); | |
11621 | } | |
11622 | ||
11623 | // 3-particle: | |
11624 | Double_t sinP1nM1nM1nW1W1W1 = 0.; // <<w1 w2 w3 sin(n*(phi1-phi2-phi3))>> | |
11625 | ||
0328db2d | 11626 | if(dMult>2 && TMath::Abs(dM111)>1e-6) |
489d5531 | 11627 | { |
57340a27 | 11628 | sinP1nM1nM1nW1W1W1 = (-dImQ1n1k*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)) |
11629 | + dReQ1n1k*dImQ2n2k-dImQ1n1k*dReQ2n2k | |
11630 | + 2.*((*fSMpk)(0,2))*dImQ1n1k | |
489d5531 | 11631 | - 2.*dImQ1n3k) |
11632 | / dM111; | |
11633 | ||
11634 | // average weighted 3-particle correction (sin terms) for non-uniform acceptance for single event: | |
11635 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(3,sinP1nM1nM1nW1W1W1); | |
11636 | ||
11637 | // final average weighted 3-particle correction (sin terms) for non-uniform acceptance for all events: | |
11638 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(2.5,sinP1nM1nM1nW1W1W1,dM111); | |
11639 | } | |
11640 | ||
11641 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights() | |
11642 | ||
11643 | ||
57340a27 | 11644 | //================================================================================================================================ |
489d5531 | 11645 | |
11646 | ||
0328db2d | 11647 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrectionsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple * const anEvent) |
489d5531 | 11648 | { |
11649 | // Evaluate with nested loops correction terms for non-uniform acceptance for integrated flow (using the particle weights). | |
11650 | ||
57340a27 | 11651 | // Results are stored in profiles fIntFlowDirectCorrectionTermsForNUA[0] (sin terms) and |
11652 | // fIntFlowDirectCorrectionTermsForNUA[1] (cos terms). | |
489d5531 | 11653 | |
57340a27 | 11654 | // Remark 1: When particle weights are used the binning of fIntFlowDirectCorrectionTermsForNUA[sc] is |
489d5531 | 11655 | // organized as follows (sc stands for either sin or cos): |
11656 | // | |
11657 | // 1st bin: <<w1 sc(n*(phi1))>> = scP1nW1 | |
11658 | // 2nd bin: <<w1 w2 sc(n*(phi1+phi2))>> = scP1nP1nW1W1 | |
11659 | // 3rd bin: <<w1 w2 w3 sc(n*(phi1-phi2-phi3))>> = scP1nM1nM1nW1W1W1 | |
3b552efe | 11660 | // ... |
489d5531 | 11661 | |
11662 | Int_t nPrim = anEvent->NumberOfTracks(); | |
11663 | AliFlowTrackSimple *aftsTrack = NULL; | |
11664 | //Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.; | |
11665 | //Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1., wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.; | |
11666 | Double_t phi1=0., phi2=0., phi3=0.; | |
11667 | Double_t wPhi1=1., wPhi2=1., wPhi3=1.; | |
11668 | Int_t n = fHarmonic; | |
11669 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
11670 | Double_t dMult = (*fSMpk)(0,0); | |
11671 | cout<<endl; | |
11672 | cout<<"Correction terms for non-uniform acceptance: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
11673 | if(dMult<1) | |
11674 | { | |
11675 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; | |
11676 | } else if (dMult>fMaxAllowedMultiplicity) | |
11677 | { | |
11678 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; | |
11679 | } else | |
11680 | { | |
11681 | cout<<"... evaluating nested loops (using particle weights) ..."<<endl; | |
11682 | } | |
11683 | ||
11684 | // 1-particle correction terms using particle weights: | |
11685 | if(nPrim>=1 && nPrim<=fMaxAllowedMultiplicity) | |
11686 | { | |
11687 | for(Int_t i1=0;i1<nPrim;i1++) | |
11688 | { | |
11689 | aftsTrack=anEvent->GetTrack(i1); | |
11690 | if(!(aftsTrack->InRPSelection())) continue; | |
11691 | phi1=aftsTrack->Phi(); | |
11692 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
57340a27 | 11693 | // 1-particle correction terms using particle weights: |
489d5531 | 11694 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[0]->Fill(0.5,sin(n*phi1),wPhi1); // <w1 sin(n*phi1)> |
11695 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[1]->Fill(0.5,cos(n*phi1),wPhi1); // <w1 cos(n*phi1)> | |
57340a27 | 11696 | } // end of for(Int_t i1=0;i1<nPrim;i1++) |
11697 | } // end of if(nPrim>=1 && nPrim<=fMaxAllowedMultiplicity) | |
11698 | ||
489d5531 | 11699 | // 2-particle correction terms using particle weights: |
11700 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
11701 | { | |
11702 | for(Int_t i1=0;i1<nPrim;i1++) | |
11703 | { | |
11704 | aftsTrack=anEvent->GetTrack(i1); | |
11705 | if(!(aftsTrack->InRPSelection())) continue; | |
11706 | phi1=aftsTrack->Phi(); | |
11707 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
11708 | for(Int_t i2=0;i2<nPrim;i2++) | |
11709 | { | |
11710 | if(i2==i1)continue; | |
11711 | aftsTrack=anEvent->GetTrack(i2); | |
11712 | if(!(aftsTrack->InRPSelection())) continue; | |
11713 | phi2=aftsTrack->Phi(); | |
11714 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11715 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
57340a27 | 11716 | // 2-p correction terms using particle weights: |
489d5531 | 11717 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[0]->Fill(1.5,sin(n*(phi1+phi2)),wPhi1*wPhi2); // <w1 w2 sin(n*(phi1+phi2))> |
11718 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[1]->Fill(1.5,cos(n*(phi1+phi2)),wPhi1*wPhi2); // <w1 w2 cos(n*(phi1+phi2))> | |
11719 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
11720 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
11721 | } // end of if(nPrim>=2) | |
11722 | ||
11723 | // 3-particle correction terms using particle weights: | |
11724 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
11725 | { | |
11726 | for(Int_t i1=0;i1<nPrim;i1++) | |
11727 | { | |
11728 | aftsTrack=anEvent->GetTrack(i1); | |
11729 | if(!(aftsTrack->InRPSelection())) continue; | |
11730 | phi1=aftsTrack->Phi(); | |
11731 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
11732 | for(Int_t i2=0;i2<nPrim;i2++) | |
11733 | { | |
11734 | if(i2==i1)continue; | |
11735 | aftsTrack=anEvent->GetTrack(i2); | |
11736 | if(!(aftsTrack->InRPSelection())) continue; | |
11737 | phi2=aftsTrack->Phi(); | |
11738 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11739 | for(Int_t i3=0;i3<nPrim;i3++) | |
11740 | { | |
11741 | if(i3==i1||i3==i2)continue; | |
11742 | aftsTrack=anEvent->GetTrack(i3); | |
11743 | if(!(aftsTrack->InRPSelection())) continue; | |
11744 | phi3=aftsTrack->Phi(); | |
11745 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
11746 | if(nPrim==3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; | |
57340a27 | 11747 | // 3-p correction terms using particle weights: |
489d5531 | 11748 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[0]->Fill(2.5,sin(n*(phi1-phi2-phi3)),wPhi1*wPhi2*wPhi3); // <w1 w2 w3 sin(n*(phi1-phi2-phi3))> |
11749 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[1]->Fill(2.5,cos(n*(phi1-phi2-phi3)),wPhi1*wPhi2*wPhi3); // <w1 w2 w3 cos(n*(phi1-phi2-phi3))> | |
11750 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
11751 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
11752 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
11753 | } // end of if(nPrim>=3) | |
11754 | ||
57340a27 | 11755 | /* |
11756 | ||
489d5531 | 11757 | if(nPrim>=4 && nPrim<=fMaxAllowedMultiplicity) |
11758 | { | |
11759 | // 4 nested loops multiparticle correlations using particle weights: | |
11760 | for(Int_t i1=0;i1<nPrim;i1++) | |
11761 | { | |
11762 | aftsTrack=anEvent->GetTrack(i1); | |
11763 | if(!(aftsTrack->InRPSelection())) continue; | |
11764 | phi1=aftsTrack->Phi(); | |
11765 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
11766 | for(Int_t i2=0;i2<nPrim;i2++) | |
11767 | { | |
11768 | if(i2==i1)continue; | |
11769 | aftsTrack=anEvent->GetTrack(i2); | |
11770 | if(!(aftsTrack->InRPSelection())) continue; | |
11771 | phi2=aftsTrack->Phi(); | |
11772 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11773 | for(Int_t i3=0;i3<nPrim;i3++) | |
11774 | { | |
11775 | if(i3==i1||i3==i2)continue; | |
11776 | aftsTrack=anEvent->GetTrack(i3); | |
11777 | if(!(aftsTrack->InRPSelection())) continue; | |
11778 | phi3=aftsTrack->Phi(); | |
11779 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
11780 | for(Int_t i4=0;i4<nPrim;i4++) | |
11781 | { | |
11782 | if(i4==i1||i4==i2||i4==i3)continue; | |
11783 | aftsTrack=anEvent->GetTrack(i4); | |
11784 | if(!(aftsTrack->InRPSelection())) continue; | |
11785 | phi4=aftsTrack->Phi(); | |
11786 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi()))); | |
11787 | if(nPrim>=4) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<"\r"<<flush; // to be improved (replace eventually this if statement with if(nPrim==4)) | |
11788 | // 4-p correlations using particle weights: | |
11789 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(10.5,cos(n*phi1+n*phi2-n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); | |
11790 | // extra correlations: | |
11791 | // 2-p extra correlations (do not appear if particle weights are not used): | |
11792 | // ... | |
11793 | // 3-p extra correlations (do not appear if particle weights are not used): | |
11794 | // ... | |
11795 | // 4-p extra correlations (do not appear if particle weights are not used): | |
11796 | // ... | |
11797 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
11798 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
11799 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
11800 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
11801 | } // end of if(nPrim>=4) | |
11802 | ||
11803 | */ | |
11804 | ||
11805 | cout<<endl; | |
11806 | ||
11807 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrectionsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent) | |
11808 | ||
11809 | ||
57340a27 | 11810 | //================================================================================================================================ |
489d5531 | 11811 | |
11812 | ||
11813 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights(TString type, TString ptOrEta) | |
11814 | { | |
11815 | // Calculate correction terms for non-uniform acceptance for differential flow (cos terms) using particle weights. | |
57340a27 | 11816 | |
489d5531 | 11817 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][1][cti], where cti runs as follows: |
57340a27 | 11818 | // |
489d5531 | 11819 | // 0: <<cos n(psi)>> |
11820 | // 1: <<w2 cos n(psi1+phi2)>> | |
11821 | // 2: <<w2 w3 cos n(psi1+phi2-phi3)>> | |
11822 | // 3: <<w2 w3 cos n(psi1-phi2-phi3)>> | |
11823 | // 4: | |
11824 | // 5: | |
11825 | // 6: | |
11826 | ||
11827 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
11828 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
11829 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
11830 | //Double_t dReQ1n3k = (*fReQ)(0,3); | |
11831 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
11832 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
11833 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
11834 | //Double_t dImQ1n3k = (*fImQ)(0,3); | |
11835 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
11836 | ||
11837 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
11838 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
11839 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
11840 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
11841 | ||
11842 | Int_t t = -1; // type flag | |
11843 | Int_t pe = -1; // ptEta flag | |
11844 | ||
11845 | if(type == "RP") | |
11846 | { | |
11847 | t = 0; | |
11848 | } else if(type == "POI") | |
11849 | { | |
11850 | t = 1; | |
11851 | } | |
11852 | ||
11853 | if(ptOrEta == "Pt") | |
11854 | { | |
11855 | pe = 0; | |
11856 | } else if(ptOrEta == "Eta") | |
11857 | { | |
11858 | pe = 1; | |
11859 | } | |
11860 | ||
11861 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
11862 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
11863 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
11864 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
11865 | ||
11866 | // looping over all bins and calculating correction terms: | |
11867 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
11868 | { | |
11869 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
11870 | Double_t p1n0kRe = 0.; | |
11871 | Double_t p1n0kIm = 0.; | |
11872 | ||
11873 | // number of POIs in particular pt or eta bin: | |
11874 | Double_t mp = 0.; | |
11875 | ||
11876 | // real and imaginary parts of q_{m*n,0} (weighted Q-vector evaluated for particles which are both RPs and POIs in particular pt or eta bin): | |
11877 | Double_t q1n2kRe = 0.; | |
11878 | Double_t q1n2kIm = 0.; | |
11879 | Double_t q2n1kRe = 0.; | |
11880 | Double_t q2n1kIm = 0.; | |
46b94261 | 11881 | |
489d5531 | 11882 | // s_{1,1}, s_{1,2} // to be improved (add explanation) |
11883 | Double_t s1p1k = 0.; | |
11884 | Double_t s1p2k = 0.; | |
46b94261 | 11885 | |
489d5531 | 11886 | // number of particles which are both RPs and POIs in particular pt or eta bin: |
46b94261 | 11887 | Double_t mq = 0.; |
489d5531 | 11888 | |
11889 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
11890 | Double_t dM01 = 0.; | |
11891 | Double_t dM011 = 0.; | |
11892 | ||
11893 | if(type == "POI") | |
11894 | { | |
11895 | // q_{m*n,k}: | |
11896 | q1n2kRe = fReRPQ1dEBE[2][pe][0][2]->GetBinContent(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
11897 | * fReRPQ1dEBE[2][pe][0][2]->GetBinEntries(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
11898 | q1n2kIm = fImRPQ1dEBE[2][pe][0][2]->GetBinContent(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
11899 | * fImRPQ1dEBE[2][pe][0][2]->GetBinEntries(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
11900 | q2n1kRe = fReRPQ1dEBE[2][pe][1][1]->GetBinContent(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
11901 | * fReRPQ1dEBE[2][pe][1][1]->GetBinEntries(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
11902 | q2n1kIm = fImRPQ1dEBE[2][pe][1][1]->GetBinContent(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
11903 | * fImRPQ1dEBE[2][pe][1][1]->GetBinEntries(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
11904 | mq = fReRPQ1dEBE[2][pe][1][1]->GetBinEntries(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
46b94261 | 11905 | |
489d5531 | 11906 | s1p1k = pow(fs1dEBE[2][pe][1]->GetBinContent(b)*fs1dEBE[2][pe][1]->GetBinEntries(b),1.); |
11907 | s1p2k = pow(fs1dEBE[2][pe][2]->GetBinContent(b)*fs1dEBE[2][pe][2]->GetBinEntries(b),1.); | |
11908 | }else if(type == "RP") | |
11909 | { | |
11910 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
11911 | q1n2kRe = fReRPQ1dEBE[0][pe][0][2]->GetBinContent(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
11912 | * fReRPQ1dEBE[0][pe][0][2]->GetBinEntries(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
11913 | q1n2kIm = fImRPQ1dEBE[0][pe][0][2]->GetBinContent(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
11914 | * fImRPQ1dEBE[0][pe][0][2]->GetBinEntries(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
11915 | q2n1kRe = fReRPQ1dEBE[0][pe][1][1]->GetBinContent(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
11916 | * fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
11917 | q2n1kIm = fImRPQ1dEBE[0][pe][1][1]->GetBinContent(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
11918 | * fImRPQ1dEBE[0][pe][1][1]->GetBinEntries(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
11919 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
11920 | s1p1k = pow(fs1dEBE[0][pe][1]->GetBinContent(b)*fs1dEBE[0][pe][1]->GetBinEntries(b),1.); | |
11921 | s1p2k = pow(fs1dEBE[0][pe][2]->GetBinContent(b)*fs1dEBE[0][pe][2]->GetBinEntries(b),1.); | |
3b552efe | 11922 | //s1p3k = pow(fs1dEBE[0][pe][3]->GetBinContent(b)*fs1dEBE[0][pe][3]->GetBinEntries(b),1.); |
11923 | ||
489d5531 | 11924 | mq = fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) |
11925 | } | |
3b552efe | 11926 | |
489d5531 | 11927 | if(type == "POI") |
3b552efe | 11928 | { |
11929 | // p_{m*n,k}: | |
489d5531 | 11930 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) |
11931 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
11932 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
3b552efe | 11933 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); |
11934 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
489d5531 | 11935 | // M01 from Eq. (118) in QC2c (to be improved (notation)): |
3b552efe | 11936 | dM01 = mp*dSM1p1k-s1p1k; |
11937 | dM011 = mp*(dSM2p1k-dSM1p2k) | |
11938 | - 2.*(s1p1k*dSM1p1k-s1p2k); | |
11939 | ||
11940 | // typeFlag = RP (0) or POI (1): | |
11941 | t = 1; | |
11942 | } else if(type == "RP") | |
489d5531 | 11943 | { |
11944 | // to be improved (cross-checked): | |
11945 | p1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
11946 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
11947 | p1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
11948 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
11949 | mp = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
11950 | // M01 from Eq. (118) in QC2c (to be improved (notation)): | |
3b552efe | 11951 | dM01 = mp*dSM1p1k-s1p1k; |
11952 | dM011 = mp*(dSM2p1k-dSM1p2k) | |
11953 | - 2.*(s1p1k*dSM1p1k-s1p2k); | |
489d5531 | 11954 | // typeFlag = RP (0) or POI (1): |
3b552efe | 11955 | t = 0; |
11956 | } | |
489d5531 | 11957 | |
11958 | // <<cos n(psi1)>>: | |
11959 | Double_t cosP1nPsi = 0.; | |
11960 | if(mp) | |
11961 | { | |
11962 | cosP1nPsi = p1n0kRe/mp; | |
11963 | ||
11964 | // fill profile for <<cos n(psi1)>>: | |
11965 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi,mp); | |
11966 | // histogram to store <cos n(psi1)> e-b-e (needed in some other methods): | |
11967 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][0]->SetBinContent(b,cosP1nPsi); | |
46b94261 | 11968 | } // end of if(mp) |
57340a27 | 11969 | |
489d5531 | 11970 | // <<w2 cos n(psi1+phi2)>>: |
11971 | Double_t cosP1nPsiP1nPhiW2 = 0.; | |
11972 | if(dM01) | |
11973 | { | |
11974 | cosP1nPsiP1nPhiW2 = (p1n0kRe*dReQ1n1k-p1n0kIm*dImQ1n1k-q2n1kRe)/(dM01); | |
11975 | // fill profile for <<w2 cos n(psi1+phi2)>>: | |
11976 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsiP1nPhiW2,dM01); | |
11977 | // histogram to store <w2 cos n(psi1+phi2)> e-b-e (needed in some other methods): | |
11978 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][1]->SetBinContent(b,cosP1nPsiP1nPhiW2); | |
11979 | } // end of if(dM01) | |
11980 | ||
11981 | // <<w2 w3 cos n(psi1+phi2-phi3)>>: | |
11982 | Double_t cosP1nPsi1P1nPhi2MPhi3W2W3 = 0.; | |
11983 | if(dM011) | |
11984 | { | |
46b94261 | 11985 | cosP1nPsi1P1nPhi2MPhi3W2W3 = (p1n0kRe*(pow(dImQ1n1k,2.)+pow(dReQ1n1k,2.)) |
11986 | - p1n0kRe*dSM1p2k | |
11987 | - q2n1kRe*dReQ1n1k-q2n1kIm*dImQ1n1k | |
11988 | - s1p1k*dReQ1n1k | |
11989 | + 2.*q1n2kRe) | |
11990 | / dM011; | |
489d5531 | 11991 | // fill profile for <<w1 w2 w3 cos n(psi1+phi2)>>: |
11992 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1P1nPhi2MPhi3W2W3,dM011); | |
11993 | // histogram to store <w1 w2 w3 cos n(psi1+phi2)> e-b-e (needed in some other methods): | |
11994 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][2]->SetBinContent(b,cosP1nPsi1P1nPhi2MPhi3W2W3); | |
11995 | } // end of if(dM011) | |
11996 | ||
11997 | // <<w2 w3 cos n(psi1-phi2-phi3)>>: | |
11998 | Double_t cosP1nPsi1M1nPhi2MPhi3W2W3 = 0.; | |
11999 | if(dM011) | |
12000 | { | |
12001 | cosP1nPsi1M1nPhi2MPhi3W2W3 = (p1n0kRe*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.))+2.*p1n0kIm*dReQ1n1k*dImQ1n1k | |
12002 | - 1.*(p1n0kRe*dReQ2n2k+p1n0kIm*dImQ2n2k) | |
46b94261 | 12003 | - 2.*s1p1k*dReQ1n1k |
489d5531 | 12004 | + 2.*q1n2kRe) |
12005 | / dM011; | |
12006 | // fill profile for <<w1 w2 w3 cos n(psi1+phi2)>>: | |
12007 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1M1nPhi2MPhi3W2W3,dM011); | |
12008 | // histogram to store <w1 w2 w3 cos n(psi1+phi2)> e-b-e (needed in some other methods): | |
12009 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][3]->SetBinContent(b,cosP1nPsi1M1nPhi2MPhi3W2W3); | |
12010 | } // end of if(dM011) | |
12011 | ||
12012 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
46b94261 | 12013 | |
57340a27 | 12014 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights(TString type, TString ptOrEta) |
12015 | ||
489d5531 | 12016 | |
12017 | //================================================================================================================================ | |
12018 | ||
12019 | ||
12020 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights(TString type, TString ptOrEta) | |
12021 | { | |
12022 | // Calculate correction terms for non-uniform acceptance for differential flow (sin terms). | |
12023 | ||
12024 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][0][cti], where cti runs as follows: | |
12025 | // 0: <<sin n(psi1)>> | |
12026 | // 1: <<w2 sin n(psi1+phi2)>> | |
12027 | // 2: <<w2 w3 sin n(psi1+phi2-phi3)>> | |
12028 | // 3: <<w2 w3 sin n(psi1-phi2-phi3)>>: | |
12029 | // 4: | |
12030 | // 5: | |
12031 | // 6: | |
12032 | ||
12033 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
12034 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
12035 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
12036 | //Double_t dReQ1n3k = (*fReQ)(0,3); | |
12037 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
12038 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
12039 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
12040 | //Double_t dImQ1n3k = (*fImQ)(0,3); | |
12041 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
12042 | ||
12043 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
12044 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
12045 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
12046 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
12047 | ||
12048 | Int_t t = -1; // type flag | |
12049 | Int_t pe = -1; // ptEta flag | |
12050 | ||
12051 | if(type == "RP") | |
12052 | { | |
12053 | t = 0; | |
12054 | } else if(type == "POI") | |
12055 | { | |
12056 | t = 1; | |
12057 | } | |
12058 | ||
12059 | if(ptOrEta == "Pt") | |
12060 | { | |
12061 | pe = 0; | |
12062 | } else if(ptOrEta == "Eta") | |
12063 | { | |
12064 | pe = 1; | |
12065 | } | |
12066 | ||
12067 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
12068 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
12069 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
12070 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
12071 | ||
12072 | // looping over all bins and calculating correction terms: | |
12073 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
12074 | { | |
12075 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
12076 | Double_t p1n0kRe = 0.; | |
12077 | Double_t p1n0kIm = 0.; | |
12078 | ||
12079 | // number of POIs in particular pt or eta bin: | |
12080 | Double_t mp = 0.; | |
12081 | ||
12082 | // real and imaginary parts of q_{m*n,0} (weighted Q-vector evaluated for particles which are both RPs and POIs in particular pt or eta bin): | |
12083 | Double_t q1n2kRe = 0.; | |
12084 | Double_t q1n2kIm = 0.; | |
12085 | Double_t q2n1kRe = 0.; | |
12086 | Double_t q2n1kIm = 0.; | |
46b94261 | 12087 | |
489d5531 | 12088 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) |
12089 | Double_t s1p1k = 0.; | |
12090 | Double_t s1p2k = 0.; | |
46b94261 | 12091 | |
489d5531 | 12092 | // number of particles which are both RPs and POIs in particular pt or eta bin: |
46b94261 | 12093 | Double_t mq = 0.; |
489d5531 | 12094 | |
12095 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
12096 | Double_t dM01 = 0.; | |
12097 | Double_t dM011 = 0.; | |
12098 | ||
12099 | if(type == "POI") | |
12100 | { | |
12101 | // q_{m*n,k}: | |
12102 | q1n2kRe = fReRPQ1dEBE[2][pe][0][2]->GetBinContent(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
12103 | * fReRPQ1dEBE[2][pe][0][2]->GetBinEntries(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
12104 | q1n2kIm = fImRPQ1dEBE[2][pe][0][2]->GetBinContent(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
12105 | * fImRPQ1dEBE[2][pe][0][2]->GetBinEntries(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
12106 | q2n1kRe = fReRPQ1dEBE[2][pe][1][1]->GetBinContent(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
12107 | * fReRPQ1dEBE[2][pe][1][1]->GetBinEntries(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
12108 | q2n1kIm = fImRPQ1dEBE[2][pe][1][1]->GetBinContent(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
12109 | * fImRPQ1dEBE[2][pe][1][1]->GetBinEntries(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
12110 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
46b94261 | 12111 | |
489d5531 | 12112 | s1p1k = pow(fs1dEBE[2][pe][1]->GetBinContent(b)*fs1dEBE[2][pe][1]->GetBinEntries(b),1.); |
12113 | s1p2k = pow(fs1dEBE[2][pe][2]->GetBinContent(b)*fs1dEBE[2][pe][2]->GetBinEntries(b),1.); | |
12114 | }else if(type == "RP") | |
12115 | { | |
12116 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
12117 | q1n2kRe = fReRPQ1dEBE[0][pe][0][2]->GetBinContent(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
12118 | * fReRPQ1dEBE[0][pe][0][2]->GetBinEntries(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
12119 | q1n2kIm = fImRPQ1dEBE[0][pe][0][2]->GetBinContent(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
12120 | * fImRPQ1dEBE[0][pe][0][2]->GetBinEntries(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
12121 | q2n1kRe = fReRPQ1dEBE[0][pe][1][1]->GetBinContent(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
12122 | * fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
12123 | q2n1kIm = fImRPQ1dEBE[0][pe][1][1]->GetBinContent(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
12124 | * fImRPQ1dEBE[0][pe][1][1]->GetBinEntries(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
12125 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
12126 | s1p1k = pow(fs1dEBE[0][pe][1]->GetBinContent(b)*fs1dEBE[0][pe][1]->GetBinEntries(b),1.); | |
12127 | s1p2k = pow(fs1dEBE[0][pe][2]->GetBinContent(b)*fs1dEBE[0][pe][2]->GetBinEntries(b),1.); | |
12128 | //s1p3k = pow(fs1dEBE[0][pe][3]->GetBinContent(b)*fs1dEBE[0][pe][3]->GetBinEntries(b),1.); | |
3b552efe | 12129 | } |
12130 | ||
12131 | if(type == "POI") | |
12132 | { | |
12133 | // p_{m*n,k}: | |
489d5531 | 12134 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) |
12135 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
12136 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
3b552efe | 12137 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); |
12138 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
489d5531 | 12139 | // M01 from Eq. (118) in QC2c (to be improved (notation)): |
3b552efe | 12140 | dM01 = mp*dSM1p1k-s1p1k; |
12141 | dM011 = mp*(dSM2p1k-dSM1p2k) | |
12142 | - 2.*(s1p1k*dSM1p1k-s1p2k); | |
12143 | // typeFlag = RP (0) or POI (1): | |
12144 | t = 1; | |
489d5531 | 12145 | } else if(type == "RP") |
3b552efe | 12146 | { |
489d5531 | 12147 | // to be improved (cross-checked): |
12148 | p1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
12149 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
12150 | p1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
12151 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
12152 | mp = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
12153 | // M01 from Eq. (118) in QC2c (to be improved (notation)): | |
3b552efe | 12154 | dM01 = mp*dSM1p1k-s1p1k; |
12155 | dM011 = mp*(dSM2p1k-dSM1p2k) | |
489d5531 | 12156 | - 2.*(s1p1k*dSM1p1k-s1p2k); |
12157 | // typeFlag = RP (0) or POI (1): | |
3b552efe | 12158 | t = 0; |
12159 | } | |
12160 | ||
489d5531 | 12161 | // <<sin n(psi1)>>: |
12162 | Double_t sinP1nPsi = 0.; | |
12163 | if(mp) | |
12164 | { | |
12165 | sinP1nPsi = p1n0kIm/mp; | |
12166 | ||
12167 | // fill profile for <<sin n(psi1)>>: | |
12168 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi,mp); | |
12169 | // histogram to store <sin n(psi1)> e-b-e (needed in some other methods): | |
12170 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][0]->SetBinContent(b,sinP1nPsi); | |
46b94261 | 12171 | } // end of if(mp) |
12172 | ||
489d5531 | 12173 | // <<w2 sin n(psi1+phi2)>>: |
12174 | Double_t sinP1nPsiP1nPhiW2 = 0.; | |
12175 | if(dM01) | |
12176 | { | |
12177 | sinP1nPsiP1nPhiW2 = (p1n0kRe*dImQ1n1k+p1n0kIm*dReQ1n1k-q2n1kIm)/(dM01); | |
12178 | // fill profile for <<w2 sin n(psi1+phi2)>>: | |
12179 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsiP1nPhiW2,dM01); | |
12180 | // histogram to store <w2 sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
12181 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][1]->SetBinContent(b,sinP1nPsiP1nPhiW2); | |
12182 | } // end of if(mp*dMult-mq) | |
12183 | ||
12184 | // <<w2 w3 sin n(psi1+phi2-phi3)>>: | |
12185 | Double_t sinP1nPsi1P1nPhi2MPhi3W2W3 = 0.; | |
12186 | if(dM011) | |
12187 | { | |
46b94261 | 12188 | sinP1nPsi1P1nPhi2MPhi3W2W3 = (p1n0kIm*(pow(dImQ1n1k,2.)+pow(dReQ1n1k,2.)) |
12189 | - p1n0kIm*dSM1p2k | |
12190 | + q2n1kRe*dImQ1n1k-q2n1kIm*dReQ1n1k | |
12191 | - s1p1k*dImQ1n1k | |
12192 | + 2.*q1n2kIm) | |
12193 | / dM011; | |
489d5531 | 12194 | // fill profile for <<w2 w3 sin n(psi1+phi2-phi3)>>: |
12195 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1P1nPhi2MPhi3W2W3,dM011); | |
12196 | // histogram to store <w2 w3 sin n(psi1+phi2-phi3)> e-b-e (needed in some other methods): | |
12197 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][2]->SetBinContent(b,sinP1nPsi1P1nPhi2MPhi3W2W3); | |
12198 | } // end of if(dM011) | |
12199 | ||
12200 | // <<w2 w3 sin n(psi1-phi2-phi3)>>: | |
12201 | Double_t sinP1nPsi1M1nPhi2MPhi3W2W3 = 0.; | |
12202 | if(dM011) | |
12203 | { | |
12204 | sinP1nPsi1M1nPhi2MPhi3W2W3 = (p1n0kIm*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.))-2.*p1n0kRe*dReQ1n1k*dImQ1n1k | |
12205 | + 1.*(p1n0kRe*dImQ2n2k-p1n0kIm*dReQ2n2k) | |
46b94261 | 12206 | + 2.*s1p1k*dImQ1n1k |
489d5531 | 12207 | - 2.*q1n2kIm) |
12208 | / dM011; | |
12209 | // fill profile for <<w2 w3 sin n(psi1-phi2-phi3)>>: | |
12210 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1M1nPhi2MPhi3W2W3,dM011); | |
12211 | // histogram to store <w2 w3 sin n(psi1-phi2-phi3)> e-b-e (needed in some other methods): | |
12212 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][3]->SetBinContent(b,sinP1nPsi1M1nPhi2MPhi3W2W3); | |
12213 | } // end of if(dM011) | |
12214 | ||
12215 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
12216 | ||
12217 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights(TString type, TString ptOrEta) | |
12218 | ||
12219 | ||
12220 | //================================================================================================================================ | |
12221 | ||
12222 | ||
0328db2d | 12223 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple * const anEvent, TString type, TString ptOrEta) |
489d5531 | 12224 | { |
57340a27 | 12225 | // Evaluate with nested loops correction terms for non-uniform acceptance |
489d5531 | 12226 | // with using particle weights (both sin and cos terms) relevant for differential flow. |
12227 | ||
57340a27 | 12228 | // Remark 1: "w1" in expressions bellow is a particle weight used only for particles which were |
12229 | // flagged both as POI and RP. | |
489d5531 | 12230 | // Remark 2: Reduced correction terms for non-uniform acceptance are evaluated in pt bin number fCrossCheckInPtBinNo |
12231 | // and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
12232 | // Remark 3: Results are stored in 1 bin profiles fDiffFlowDirectCorrections[t][pe][sc][cti], where first three indices runs as: | |
12233 | // [0=RP,1=POI][0=Pt,1=Eta][0=sin terms,1=cos terms], whilst the cti (correction term index) runs as follows: | |
12234 | // cti: | |
12235 | // 0: <<sc n(psi1)>> | |
12236 | // 1: <<w2 sc n(psi1+phi2)>> | |
12237 | // 2: <<w2 w3 sc n(psi1+phi2-phi3)>> | |
12238 | // 3: <<w2 w3 sc n(psi1-phi2-phi3)>> | |
12239 | // 4: | |
12240 | // 5: | |
12241 | // 6: | |
46b94261 | 12242 | |
489d5531 | 12243 | Int_t typeFlag = -1; |
12244 | Int_t ptEtaFlag = -1; | |
12245 | if(type == "RP") | |
12246 | { | |
12247 | typeFlag = 0; | |
12248 | } else if(type == "POI") | |
12249 | { | |
12250 | typeFlag = 1; | |
12251 | } | |
12252 | if(ptOrEta == "Pt") | |
12253 | { | |
12254 | ptEtaFlag = 0; | |
12255 | } else if(ptOrEta == "Eta") | |
12256 | { | |
12257 | ptEtaFlag = 1; | |
12258 | } | |
12259 | // shortcuts: | |
12260 | Int_t t = typeFlag; | |
12261 | Int_t pe = ptEtaFlag; | |
12262 | ||
12263 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
12264 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
12265 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
12266 | ||
12267 | Int_t nPrim = anEvent->NumberOfTracks(); | |
12268 | AliFlowTrackSimple *aftsTrack = NULL; | |
12269 | ||
12270 | Double_t psi1=0., phi2=0., phi3=0.;// phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
12271 | Double_t wPhi2=1., wPhi3=1.; | |
12272 | ||
12273 | Int_t n = fHarmonic; | |
12274 | ||
12275 | // 1'-particle correction terms: | |
12276 | for(Int_t i1=0;i1<nPrim;i1++) | |
12277 | { | |
12278 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 12279 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
12280 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 12281 | { |
12282 | if(ptOrEta == "Pt") | |
12283 | { | |
12284 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
12285 | } else if (ptOrEta == "Eta") | |
12286 | { | |
12287 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 12288 | } |
12289 | } else // this is diff flow of RPs | |
12290 | { | |
489d5531 | 12291 | if(ptOrEta == "Pt") |
12292 | { | |
12293 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
12294 | } else if (ptOrEta == "Eta") | |
12295 | { | |
12296 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 12297 | } |
489d5531 | 12298 | } |
12299 | psi1=aftsTrack->Phi(); | |
12300 | // sin terms: | |
12301 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*psi1),1.); // <<sin(n*(psi1))>> | |
12302 | // cos terms: | |
12303 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*psi1),1.); // <<cos(n*(psi1))>> | |
12304 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
12305 | ||
12306 | // 2'-particle correction terms: | |
12307 | for(Int_t i1=0;i1<nPrim;i1++) | |
12308 | { | |
12309 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 12310 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
12311 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 12312 | { |
12313 | if(ptOrEta == "Pt") | |
12314 | { | |
12315 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
12316 | } else if (ptOrEta == "Eta") | |
12317 | { | |
12318 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 12319 | } |
12320 | } else // this is diff flow of RPs | |
12321 | { | |
489d5531 | 12322 | if(ptOrEta == "Pt") |
12323 | { | |
12324 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
12325 | } else if (ptOrEta == "Eta") | |
12326 | { | |
12327 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 12328 | } |
489d5531 | 12329 | } |
12330 | psi1=aftsTrack->Phi(); | |
12331 | for(Int_t i2=0;i2<nPrim;i2++) | |
12332 | { | |
12333 | if(i2==i1) continue; | |
12334 | aftsTrack=anEvent->GetTrack(i2); | |
12335 | // RP condition (!(first) particle in the correlator must be RP): | |
12336 | if(!(aftsTrack->InRPSelection())) continue; | |
46b94261 | 12337 | phi2=aftsTrack->Phi(); |
489d5531 | 12338 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); |
12339 | // sin terms: | |
12340 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2)),wPhi2); // <<w2 sin(n*(psi1+phi2))>> | |
12341 | // cos terms: | |
12342 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2)),wPhi2); // <<w2 cos(n*(psi1+phi2))>> | |
12343 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
12344 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
12345 | ||
12346 | // 3'-particle correction terms: | |
12347 | for(Int_t i1=0;i1<nPrim;i1++) | |
12348 | { | |
12349 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 12350 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
12351 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 12352 | { |
12353 | if(ptOrEta == "Pt") | |
12354 | { | |
12355 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
12356 | } else if (ptOrEta == "Eta") | |
12357 | { | |
12358 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 12359 | } |
12360 | } else // this is diff flow of RPs | |
12361 | { | |
489d5531 | 12362 | if(ptOrEta == "Pt") |
12363 | { | |
12364 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
12365 | } else if (ptOrEta == "Eta") | |
12366 | { | |
12367 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 12368 | } |
489d5531 | 12369 | } |
12370 | psi1=aftsTrack->Phi(); | |
12371 | for(Int_t i2=0;i2<nPrim;i2++) | |
12372 | { | |
12373 | if(i2==i1) continue; | |
12374 | aftsTrack=anEvent->GetTrack(i2); | |
12375 | // RP condition (!(first) particle in the correlator must be RP): | |
12376 | if(!(aftsTrack->InRPSelection())) continue; | |
12377 | phi2=aftsTrack->Phi(); | |
12378 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
12379 | for(Int_t i3=0;i3<nPrim;i3++) | |
12380 | { | |
12381 | if(i3==i1||i3==i2) continue; | |
12382 | aftsTrack=anEvent->GetTrack(i3); | |
12383 | // RP condition (!(first) particle in the correlator must be RP): | |
12384 | if(!(aftsTrack->InRPSelection())) continue; | |
12385 | phi3=aftsTrack->Phi(); | |
12386 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
12387 | // sin terms: | |
12388 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][2]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2-phi3)),wPhi2*wPhi3); // <<wPhi2*wPhi3 sin(n*(psi1+phi2-phi3))>> | |
12389 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][3]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1-phi2-phi3)),wPhi2*wPhi3); // <<wPhi2*wPhi3 sin(n*(psi1-phi2-phi3))>> | |
12390 | // cos terms: | |
12391 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][2]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3)),wPhi2*wPhi3); // <<wPhi2*wPhi3 cos(n*(psi1+phi2-phi3))>> | |
12392 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][3]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1-phi2-phi3)),wPhi2*wPhi3); // <<wPhi2*wPhi3 cos(n*(psi1-phi2-phi3))>> | |
12393 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
12394 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
46b94261 | 12395 | }//end of for(Int_t i1=0;i1<nPrim;i1++) |
489d5531 | 12396 | |
12397 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
12398 | ||
2001bc3a | 12399 | //================================================================================================================================ |
12400 | ||
12401 | void AliFlowAnalysisWithQCumulants::CalculateDetectorEffectsForTrueCorrelations() | |
12402 | { | |
12403 | // Quantify detector effects for true correlations. | |
12404 | ||
12405 | // to be improved: add protection for the pointers used in this method | |
12406 | ||
12407 | Double_t measured[4] = {0.}; // measured true correlation (a.k.a. cumulant) | |
12408 | Double_t corrected[4] = {0.}; // true correlation corrected for detector effects (a.k.a. generalized cumulant) | |
12409 | ||
12410 | // measured correlations: | |
12411 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
12412 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
12413 | Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
12414 | Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
12415 | // measured true correlations (a.k.a. cumulants): | |
12416 | if(two) measured[0] = two; | |
12417 | if(four) measured[1] = four-2.*pow(two,2.); | |
12418 | if(six) measured[2] = six-9.*two*four+12.*pow(two,3.); | |
12419 | if(eight) measured[3] = eight-16.*two*six-18.*pow(four,2.)+144.*pow(two,2.)*four-144.*pow(two,4.); | |
12420 | ||
12421 | for(Int_t ci=0;ci<=1;ci++) // correlation index // to be improved (enabled also for QC{6} and QC{8} eventually) | |
12422 | { | |
12423 | corrected[ci] = fIntFlowQcumulants->GetBinContent(ci+1); | |
12424 | if(TMath::Abs(measured[ci])>1.e-44) | |
12425 | { | |
12426 | fIntFlowDetectorBias->SetBinContent(ci+1,corrected[ci]/measured[ci]); | |
12427 | } | |
12428 | } // end of for(Int_t ci=1;ci<=4;ci++) // correlation index | |
12429 | ||
12430 | // versus multiplicity: | |
12431 | if(!fApplyCorrectionForNUAVsM) return; | |
12432 | Int_t nBins = fIntFlowCorrelationsVsMPro[0]->GetNbinsX(); // to be improved (hardwired 0) | |
12433 | for(Int_t b=1;b<=nBins;b++) | |
12434 | { | |
12435 | // measured correlations vs M: | |
12436 | two = fIntFlowCorrelationsVsMHist[0]->GetBinContent(b); // <<2>> | |
12437 | four = fIntFlowCorrelationsVsMHist[1]->GetBinContent(b); // <<4>> | |
12438 | six = fIntFlowCorrelationsVsMHist[2]->GetBinContent(b); // <<6>> | |
12439 | eight = fIntFlowCorrelationsVsMHist[3]->GetBinContent(b); // <<8>> | |
12440 | // measured true correlations (a.k.a. cumulants) vs M: | |
12441 | measured[0] = 0.; // QC{2} vs M | |
12442 | measured[1] = 0.; // QC{4} vs M | |
12443 | measured[2] = 0.; // QC{6} vs M | |
12444 | measured[3] = 0.; // QC{8} vs M | |
12445 | if(two) measured[0] = two; | |
12446 | if(four) measured[1] = four-2.*pow(two,2.); | |
12447 | if(six) measured[2] = six-9.*two*four+12.*pow(two,3.); | |
12448 | if(eight) measured[3] = eight-16.*two*six-18.*pow(four,2.)+144.*pow(two,2.)*four-144.*pow(two,4.); | |
12449 | corrected[0] = 0.; // generalized QC{2} vs M | |
12450 | corrected[1] = 0.; // generalized QC{4} vs M | |
12451 | corrected[2] = 0.; // generalized QC{6} vs M | |
12452 | corrected[3] = 0.; // generalized QC{8} vs M | |
12453 | for(Int_t ci=0;ci<=1;ci++) // correlation index // to be improved (enabled also for QC{6} and QC{8} eventually) | |
12454 | { | |
12455 | corrected[ci] = fIntFlowQcumulantsVsM[ci]->GetBinContent(b); | |
12456 | if(TMath::Abs(measured[ci])>1.e-44) | |
12457 | { | |
12458 | fIntFlowDetectorBiasVsM[ci]->SetBinContent(b,corrected[ci]/measured[ci]); | |
12459 | } | |
12460 | } // end of for(Int_t ci=1;ci<=4;ci++) // correlation index | |
12461 | } // end of for(Int_t b=1;b<=nBins;b++) | |
489d5531 | 12462 | |
2001bc3a | 12463 | } // end of AliFlowAnalysisWithQCumulants::CalculateDetectorEffectsForTrueCorrelations() |
57340a27 | 12464 | |
12465 | ||
12466 |