]>
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 | ||
489d5531 | 66 | //================================================================================================================ |
67 | ||
489d5531 | 68 | ClassImp(AliFlowAnalysisWithQCumulants) |
69 | ||
70 | AliFlowAnalysisWithQCumulants::AliFlowAnalysisWithQCumulants(): | |
71 | // 0.) base: | |
72 | fHistList(NULL), | |
73 | // 1.) common: | |
74 | fCommonHists(NULL), | |
75 | fCommonHists2nd(NULL), | |
76 | fCommonHists4th(NULL), | |
77 | fCommonHists6th(NULL), | |
78 | fCommonHists8th(NULL), | |
79 | fCommonHistsResults2nd(NULL), | |
80 | fCommonHistsResults4th(NULL), | |
81 | fCommonHistsResults6th(NULL), | |
82 | fCommonHistsResults8th(NULL), | |
83 | fnBinsPhi(0), | |
84 | fPhiMin(0), | |
85 | fPhiMax(0), | |
86 | fPhiBinWidth(0), | |
87 | fnBinsPt(0), | |
88 | fPtMin(0), | |
89 | fPtMax(0), | |
90 | fPtBinWidth(0), | |
91 | fnBinsEta(0), | |
92 | fEtaMin(0), | |
93 | fEtaMax(0), | |
94 | fEtaBinWidth(0), | |
95 | fHarmonic(2), | |
96 | fAnalysisLabel(NULL), | |
97 | // 2a.) particle weights: | |
98 | fWeightsList(NULL), | |
99 | fUsePhiWeights(kFALSE), | |
100 | fUsePtWeights(kFALSE), | |
101 | fUseEtaWeights(kFALSE), | |
102 | fUseParticleWeights(NULL), | |
103 | fPhiWeights(NULL), | |
104 | fPtWeights(NULL), | |
105 | fEtaWeights(NULL), | |
106 | // 2b.) event weights: | |
107 | fMultiplicityWeight(NULL), | |
108 | // 3.) integrated flow: | |
109 | fIntFlowList(NULL), | |
110 | fIntFlowProfiles(NULL), | |
111 | fIntFlowResults(NULL), | |
112 | fIntFlowFlags(NULL), | |
b92ea2b9 | 113 | fApplyCorrectionForNUA(kFALSE), |
2001bc3a | 114 | fApplyCorrectionForNUAVsM(kFALSE), |
9da1a4f3 | 115 | fnBinsMult(10000), |
067e9bc8 | 116 | fMinMult(0.), |
117 | fMaxMult(10000.), | |
b77b6434 | 118 | fPropagateErrorAlsoFromNIT(kFALSE), |
b3dacf6b | 119 | fCalculateCumulantsVsM(kTRUE), |
0dd3b008 | 120 | fMinimumBiasReferenceFlow(kTRUE), |
489d5531 | 121 | fReQ(NULL), |
122 | fImQ(NULL), | |
123 | fSMpk(NULL), | |
124 | fIntFlowCorrelationsEBE(NULL), | |
125 | fIntFlowEventWeightsForCorrelationsEBE(NULL), | |
126 | fIntFlowCorrelationsAllEBE(NULL), | |
127 | fAvMultiplicity(NULL), | |
128 | fIntFlowCorrelationsPro(NULL), | |
129 | fIntFlowCorrelationsAllPro(NULL), | |
130 | fIntFlowExtraCorrelationsPro(NULL), | |
131 | fIntFlowProductOfCorrelationsPro(NULL), | |
0328db2d | 132 | fIntFlowProductOfCorrectionTermsForNUAPro(NULL), |
489d5531 | 133 | fIntFlowCorrelationsHist(NULL), |
134 | fIntFlowCorrelationsAllHist(NULL), | |
135 | fIntFlowCovariances(NULL), | |
136 | fIntFlowSumOfProductOfEventWeights(NULL), | |
0328db2d | 137 | fIntFlowCovariancesNUA(NULL), |
138 | fIntFlowSumOfProductOfEventWeightsNUA(NULL), | |
489d5531 | 139 | fIntFlowQcumulants(NULL), |
b92ea2b9 | 140 | fIntFlowQcumulantsRebinnedInM(NULL), |
141 | fIntFlowQcumulantsErrorSquaredRatio(NULL), | |
489d5531 | 142 | fIntFlow(NULL), |
b3dacf6b | 143 | fIntFlowRebinnedInM(NULL), |
2001bc3a | 144 | fIntFlowDetectorBias(NULL), |
489d5531 | 145 | // 4.) differential flow: |
146 | fDiffFlowList(NULL), | |
147 | fDiffFlowProfiles(NULL), | |
148 | fDiffFlowResults(NULL), | |
149 | fDiffFlowFlags(NULL), | |
150 | fCalculate2DFlow(kFALSE), | |
151 | // 5.) distributions: | |
57340a27 | 152 | fDistributionsList(NULL), |
153 | fDistributionsFlags(NULL), | |
489d5531 | 154 | fStoreDistributions(kFALSE), |
155 | // x.) debugging and cross-checking: | |
156 | fNestedLoopsList(NULL), | |
157 | fEvaluateIntFlowNestedLoops(kFALSE), | |
158 | fEvaluateDiffFlowNestedLoops(kFALSE), | |
159 | fMaxAllowedMultiplicity(10), | |
160 | fEvaluateNestedLoops(NULL), | |
161 | fIntFlowDirectCorrelations(NULL), | |
162 | fIntFlowExtraDirectCorrelations(NULL), | |
163 | fCrossCheckInPtBinNo(10), | |
3b552efe | 164 | fCrossCheckInEtaBinNo(20), |
489d5531 | 165 | fNoOfParticlesInBin(NULL) |
166 | { | |
167 | // constructor | |
168 | ||
169 | // base list to hold all output objects: | |
170 | fHistList = new TList(); | |
171 | fHistList->SetName("cobjQC"); | |
172 | fHistList->SetOwner(kTRUE); | |
173 | ||
174 | // list to hold histograms with phi, pt and eta weights: | |
175 | fWeightsList = new TList(); | |
176 | ||
177 | // multiplicity weight: | |
178 | fMultiplicityWeight = new TString("combinations"); | |
179 | ||
180 | // analysis label; | |
181 | fAnalysisLabel = new TString(); | |
182 | ||
183 | // initialize all arrays: | |
184 | this->InitializeArraysForIntFlow(); | |
185 | this->InitializeArraysForDiffFlow(); | |
186 | this->InitializeArraysForDistributions(); | |
187 | this->InitializeArraysForNestedLoops(); | |
188 | ||
189 | } // end of constructor | |
190 | ||
191 | ||
192 | //================================================================================================================ | |
193 | ||
194 | ||
195 | AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants() | |
196 | { | |
197 | // destructor | |
198 | ||
199 | delete fHistList; | |
200 | ||
201 | } // end of AliFlowAnalysisWithQCumulants::~AliFlowAnalysisWithQCumulants() | |
202 | ||
203 | ||
204 | //================================================================================================================ | |
205 | ||
206 | ||
207 | void AliFlowAnalysisWithQCumulants::Init() | |
208 | { | |
3b552efe | 209 | // a) Cross check if the settings make sense before starting the QC adventure; |
489d5531 | 210 | // b) Access all common constants; |
211 | // c) Book all objects; | |
3b552efe | 212 | // d) Store flags for integrated and differential flow; |
489d5531 | 213 | // e) Store flags for distributions of corelations; |
214 | // f) Store harmonic which will be estimated. | |
3b552efe | 215 | |
489d5531 | 216 | //save old value and prevent histograms from being added to directory |
217 | //to avoid name clashes in case multiple analaysis objects are used | |
218 | //in an analysis | |
219 | Bool_t oldHistAddStatus = TH1::AddDirectoryStatus(); | |
220 | TH1::AddDirectory(kFALSE); | |
221 | ||
3b552efe | 222 | // a) Cross check if the settings make sense before starting the QC adventure; |
489d5531 | 223 | this->CrossCheckSettings(); |
224 | // b) Access all common constants: | |
225 | this->AccessConstants(); | |
226 | // c) Book all objects: | |
227 | this->BookAndFillWeightsHistograms(); | |
228 | this->BookAndNestAllLists(); | |
229 | this->BookCommonHistograms(); | |
230 | this->BookEverythingForIntegratedFlow(); | |
231 | this->BookEverythingForDifferentialFlow(); | |
232 | this->BookEverythingForDistributions(); | |
233 | this->BookEverythingForNestedLoops(); | |
234 | // d) Store flags for integrated and differential flow: | |
235 | this->StoreIntFlowFlags(); | |
3b552efe | 236 | this->StoreDiffFlowFlags(); |
489d5531 | 237 | // e) Store flags for distributions of corelations: |
238 | this->StoreFlagsForDistributions(); | |
239 | // f) Store harmonic which will be estimated: | |
240 | this->StoreHarmonic(); | |
241 | ||
242 | TH1::AddDirectory(oldHistAddStatus); | |
243 | } // end of void AliFlowAnalysisWithQCumulants::Init() | |
244 | ||
245 | ||
246 | //================================================================================================================ | |
247 | ||
248 | ||
249 | void AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent) | |
250 | { | |
251 | // Running over data only in this method. | |
252 | ||
b3dacf6b | 253 | // a) Check all pointers used in this method; |
254 | // b) Define local variables; | |
255 | // c) Fill the common control histograms and call the method to fill fAvMultiplicity; | |
256 | // d) Loop over data and calculate e-b-e quantities; | |
257 | // e) Call all the methods which calculate correlations for reference flow; | |
258 | // f) Call all the methods which calculate correlations for differential flow; | |
259 | // g) Distributions of correlations; | |
260 | // h) Debugging and cross-checking (evaluate nested loops); | |
261 | // i) Reset all event-by-event quantities. | |
489d5531 | 262 | |
b3dacf6b | 263 | // a) Check all pointers used in this method: |
264 | this->CheckPointersUsedInMake(); | |
265 | ||
266 | // b) Define local variables: | |
489d5531 | 267 | Double_t dPhi = 0.; // azimuthal angle in the laboratory frame |
268 | Double_t dPt = 0.; // transverse momentum | |
269 | Double_t dEta = 0.; // pseudorapidity | |
489d5531 | 270 | Double_t wPhi = 1.; // phi weight |
271 | Double_t wPt = 1.; // pt weight | |
272 | Double_t wEta = 1.; // eta weight | |
489d5531 | 273 | Int_t nRP = anEvent->GetEventNSelTracksRP(); // number of RPs (i.e. number of particles used to determine the reaction plane) |
9f33751d | 274 | |
b3dacf6b | 275 | // c) Fill the common control histograms and call the method to fill fAvMultiplicity: |
489d5531 | 276 | this->FillCommonControlHistograms(anEvent); |
277 | this->FillAverageMultiplicities(nRP); | |
278 | ||
b3dacf6b | 279 | // d) Loop over data and calculate e-b-e quantities: |
9f33751d | 280 | Int_t nPrim = anEvent->NumberOfTracks(); // nPrim = total number of primary tracks, i.e. nPrim = nRP + nPOI where: |
489d5531 | 281 | // nRP = # of particles used to determine the reaction plane; |
282 | // nPOI = # of particles of interest for a detailed flow analysis; | |
489d5531 | 283 | |
284 | AliFlowTrackSimple *aftsTrack = NULL; | |
285 | ||
286 | for(Int_t i=0;i<nPrim;i++) | |
287 | { | |
288 | aftsTrack=anEvent->GetTrack(i); | |
289 | if(aftsTrack) | |
290 | { | |
291 | if(!(aftsTrack->InRPSelection() || aftsTrack->InPOISelection())) continue; // consider only tracks which are RPs or POIs | |
292 | Int_t n = fHarmonic; // shortcut for the harmonic | |
293 | if(aftsTrack->InRPSelection()) // RP condition: | |
294 | { | |
295 | dPhi = aftsTrack->Phi(); | |
296 | dPt = aftsTrack->Pt(); | |
297 | dEta = aftsTrack->Eta(); | |
298 | if(fUsePhiWeights && fPhiWeights && fnBinsPhi) // determine phi weight for this particle: | |
299 | { | |
300 | wPhi = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*fnBinsPhi/TMath::TwoPi()))); | |
301 | } | |
302 | if(fUsePtWeights && fPtWeights && fnBinsPt) // determine pt weight for this particle: | |
303 | { | |
304 | wPt = fPtWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/fPtBinWidth))); | |
305 | } | |
306 | if(fUseEtaWeights && fEtaWeights && fEtaBinWidth) // determine eta weight for this particle: | |
307 | { | |
308 | wEta = fEtaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fEtaBinWidth))); | |
309 | } | |
310 | ||
311 | // integrated flow: | |
312 | // calculate Re[Q_{m*n,k}] and Im[Q_{m*n,k}], m = 1,2,3,4, for this event: | |
313 | for(Int_t m=0;m<4;m++) | |
314 | { | |
315 | for(Int_t k=0;k<9;k++) | |
316 | { | |
317 | (*fReQ)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1)*n*dPhi); | |
318 | (*fImQ)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1)*n*dPhi); | |
319 | } | |
320 | } | |
321 | // calculate S^{M}_{p,k} for this event | |
322 | // Remark: final calculation of S^{M}_{p,k} follows after the loop over data bellow: | |
323 | for(Int_t p=0;p<8;p++) | |
324 | { | |
325 | for(Int_t k=0;k<9;k++) | |
326 | { | |
327 | (*fSMpk)(p,k)+=pow(wPhi*wPt*wEta,k); | |
328 | } | |
329 | } | |
330 | ||
331 | // differential flow: | |
332 | // 1D (pt): | |
333 | // (r_{m*m,k}(pt)): | |
334 | for(Int_t m=0;m<4;m++) | |
335 | { | |
336 | for(Int_t k=0;k<9;k++) | |
337 | { | |
338 | fReRPQ1dEBE[0][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
339 | fImRPQ1dEBE[0][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
340 | } | |
341 | } | |
342 | ||
343 | // s_{k}(pt) for RPs // to be improved (clarified) | |
344 | // Remark: final calculation of s_{p,k}(pt) follows after the loop over data bellow: | |
345 | for(Int_t k=0;k<9;k++) | |
346 | { | |
347 | fs1dEBE[0][0][k]->Fill(dPt,pow(wPhi*wPt*wEta,k),1.); | |
348 | } | |
349 | // 1D (eta): | |
350 | // (r_{m*m,k}(eta)): | |
351 | for(Int_t m=0;m<4;m++) | |
352 | { | |
353 | for(Int_t k=0;k<9;k++) | |
354 | { | |
355 | fReRPQ1dEBE[0][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
356 | fImRPQ1dEBE[0][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
357 | } | |
358 | } | |
359 | // s_{k}(eta) for RPs // to be improved (clarified) | |
360 | // Remark: final calculation of s_{p,k}(eta) follows after the loop over data bellow: | |
361 | for(Int_t k=0;k<9;k++) | |
362 | { | |
363 | fs1dEBE[0][1][k]->Fill(dEta,pow(wPhi*wPt*wEta,k),1.); | |
364 | } | |
489d5531 | 365 | // 2D (pt,eta): |
366 | if(fCalculate2DFlow) | |
367 | { | |
368 | // (r_{m*m,k}(pt,eta)): | |
369 | for(Int_t m=0;m<4;m++) | |
370 | { | |
371 | for(Int_t k=0;k<9;k++) | |
372 | { | |
373 | fReRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
374 | fImRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
375 | } | |
376 | } | |
377 | // s_{k}(pt,eta) for RPs // to be improved (clarified) | |
378 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
379 | for(Int_t k=0;k<9;k++) | |
380 | { | |
381 | fs2dEBE[0][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k),1.); | |
382 | } | |
383 | } // end of if(fCalculate2DFlow) | |
489d5531 | 384 | |
385 | if(aftsTrack->InPOISelection()) | |
386 | { | |
387 | // 1D (pt): | |
388 | // (q_{m*m,k}(pt)): | |
389 | for(Int_t m=0;m<4;m++) | |
390 | { | |
391 | for(Int_t k=0;k<9;k++) | |
392 | { | |
393 | fReRPQ1dEBE[2][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
394 | fImRPQ1dEBE[2][0][m][k]->Fill(dPt,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
395 | } | |
396 | } | |
397 | // s_{k}(pt) for RP&&POIs // to be improved (clarified) | |
398 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
399 | for(Int_t k=0;k<9;k++) | |
400 | { | |
401 | fs1dEBE[2][0][k]->Fill(dPt,pow(wPhi*wPt*wEta,k),1.); | |
402 | } | |
403 | // 1D (eta): | |
404 | // (q_{m*m,k}(eta)): | |
405 | for(Int_t m=0;m<4;m++) | |
406 | { | |
407 | for(Int_t k=0;k<9;k++) | |
408 | { | |
409 | fReRPQ1dEBE[2][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
410 | fImRPQ1dEBE[2][1][m][k]->Fill(dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
411 | } | |
412 | } | |
413 | // s_{k}(eta) for RP&&POIs // to be improved (clarified) | |
414 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
415 | for(Int_t k=0;k<9;k++) | |
416 | { | |
417 | fs1dEBE[2][1][k]->Fill(dEta,pow(wPhi*wPt*wEta,k),1.); | |
b77b6434 | 418 | } |
489d5531 | 419 | // 2D (pt,eta) |
420 | if(fCalculate2DFlow) | |
421 | { | |
422 | // (q_{m*m,k}(pt,eta)): | |
423 | for(Int_t m=0;m<4;m++) | |
424 | { | |
425 | for(Int_t k=0;k<9;k++) | |
426 | { | |
427 | fReRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1.)*n*dPhi),1.); | |
428 | fImRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1.)*n*dPhi),1.); | |
429 | } | |
430 | } | |
431 | // s_{k}(pt,eta) for RP&&POIs // to be improved (clarified) | |
432 | // Remark: final calculation of s_{p,k}(pt,eta) follows after the loop over data bellow: | |
433 | for(Int_t k=0;k<9;k++) | |
434 | { | |
435 | fs2dEBE[2][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta,k),1.); | |
436 | } | |
437 | } // end of if(fCalculate2DFlow) | |
489d5531 | 438 | |
b77b6434 | 439 | } // end of if(aftsTrack->InPOISelection()) |
489d5531 | 440 | } // end of if(pTrack->InRPSelection()) |
441 | ||
489d5531 | 442 | if(aftsTrack->InPOISelection()) |
443 | { | |
444 | dPhi = aftsTrack->Phi(); | |
445 | dPt = aftsTrack->Pt(); | |
446 | dEta = aftsTrack->Eta(); | |
447 | ||
448 | // 1D (pt) | |
449 | // p_n(m*n,0): | |
450 | for(Int_t m=0;m<4;m++) | |
451 | { | |
452 | fReRPQ1dEBE[1][0][m][0]->Fill(dPt,TMath::Cos((m+1.)*n*dPhi),1.); | |
453 | fImRPQ1dEBE[1][0][m][0]->Fill(dPt,TMath::Sin((m+1.)*n*dPhi),1.); | |
454 | } | |
455 | // 1D (eta) | |
456 | // p_n(m*n,0): | |
457 | for(Int_t m=0;m<4;m++) | |
458 | { | |
459 | fReRPQ1dEBE[1][1][m][0]->Fill(dEta,TMath::Cos((m+1.)*n*dPhi),1.); | |
460 | fImRPQ1dEBE[1][1][m][0]->Fill(dEta,TMath::Sin((m+1.)*n*dPhi),1.); | |
461 | } | |
489d5531 | 462 | // 2D (pt,eta): |
463 | if(fCalculate2DFlow) | |
464 | { | |
465 | // p_n(m*n,0): | |
466 | for(Int_t m=0;m<4;m++) | |
467 | { | |
468 | fReRPQ2dEBE[1][m][0]->Fill(dPt,dEta,TMath::Cos((m+1.)*n*dPhi),1.); | |
469 | fImRPQ2dEBE[1][m][0]->Fill(dPt,dEta,TMath::Sin((m+1.)*n*dPhi),1.); | |
470 | } | |
471 | } // end of if(fCalculate2DFlow) | |
b77b6434 | 472 | } // end of if(pTrack->InPOISelection()) |
473 | ||
489d5531 | 474 | } else // to if(aftsTrack) |
475 | { | |
476 | cout<<endl; | |
477 | cout<<" WARNING: no particle! (i.e. aftsTrack is a NULL pointer in AFAWQC::Make().)"<<endl; | |
478 | cout<<endl; | |
479 | } | |
480 | } // end of for(Int_t i=0;i<nPrim;i++) | |
481 | ||
482 | // calculate the final expressions for S^{M}_{p,k}: | |
483 | for(Int_t p=0;p<8;p++) | |
484 | { | |
485 | for(Int_t k=0;k<9;k++) | |
486 | { | |
487 | (*fSMpk)(p,k)=pow((*fSMpk)(p,k),p+1); | |
488 | } | |
489 | } | |
490 | ||
b3dacf6b | 491 | // e) Call all the methods which calculate correlations for reference flow: |
489d5531 | 492 | if(!fEvaluateIntFlowNestedLoops) |
493 | { | |
494 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
495 | { | |
496 | if(nRP>1) this->CalculateIntFlowCorrelations(); // without using particle weights | |
0328db2d | 497 | } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
489d5531 | 498 | { |
499 | if(nRP>1) this->CalculateIntFlowCorrelationsUsingParticleWeights(); // with using particle weights | |
500 | } | |
501 | ||
502 | if(nRP>3) this->CalculateIntFlowProductOfCorrelations(); | |
503 | if(nRP>1) this->CalculateIntFlowSumOfEventWeights(); | |
504 | if(nRP>1) this->CalculateIntFlowSumOfProductOfEventWeights(); | |
b92ea2b9 | 505 | |
506 | // non-isotropic terms: | |
507 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
489d5531 | 508 | { |
b92ea2b9 | 509 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUASinTerms(); |
510 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUACosTerms(); | |
511 | } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
512 | { | |
513 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights(); | |
514 | if(nRP>0) this->CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights(); | |
515 | } | |
0328db2d | 516 | |
b92ea2b9 | 517 | if(nRP>0) this->CalculateIntFlowProductOfCorrectionTermsForNUA(); |
518 | if(nRP>0) this->CalculateIntFlowSumOfEventWeightsNUA(); | |
519 | if(nRP>0) this->CalculateIntFlowSumOfProductOfEventWeightsNUA(); | |
489d5531 | 520 | } // end of if(!fEvaluateIntFlowNestedLoops) |
521 | ||
b3dacf6b | 522 | // f) Call all the methods which calculate correlations for differential flow: |
489d5531 | 523 | if(!fEvaluateDiffFlowNestedLoops) |
524 | { | |
525 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
526 | { | |
527 | // without using particle weights: | |
528 | this->CalculateDiffFlowCorrelations("RP","Pt"); | |
529 | this->CalculateDiffFlowCorrelations("RP","Eta"); | |
530 | this->CalculateDiffFlowCorrelations("POI","Pt"); | |
57340a27 | 531 | this->CalculateDiffFlowCorrelations("POI","Eta"); |
b92ea2b9 | 532 | // non-isotropic terms: |
533 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Pt"); | |
534 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Eta"); | |
535 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Pt"); | |
536 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Eta"); | |
537 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Pt"); | |
538 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Eta"); | |
539 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Pt"); | |
540 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Eta"); | |
489d5531 | 541 | } else // to if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
542 | { | |
543 | // with using particle weights: | |
544 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Pt"); | |
545 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Eta"); | |
546 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Pt"); | |
547 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Eta"); | |
b92ea2b9 | 548 | // non-isotropic terms: |
549 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("RP","Pt"); | |
550 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("RP","Eta"); | |
551 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("POI","Pt"); | |
552 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("POI","Eta"); | |
553 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("RP","Pt"); | |
554 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("RP","Eta"); | |
555 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("POI","Pt"); | |
556 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("POI","Eta"); | |
489d5531 | 557 | } |
57340a27 | 558 | |
489d5531 | 559 | // whether or not using particle weights the following is calculated in the same way: |
560 | this->CalculateDiffFlowProductOfCorrelations("RP","Pt"); | |
561 | this->CalculateDiffFlowProductOfCorrelations("RP","Eta"); | |
562 | this->CalculateDiffFlowProductOfCorrelations("POI","Pt"); | |
563 | this->CalculateDiffFlowProductOfCorrelations("POI","Eta"); | |
564 | this->CalculateDiffFlowSumOfEventWeights("RP","Pt"); | |
565 | this->CalculateDiffFlowSumOfEventWeights("RP","Eta"); | |
566 | this->CalculateDiffFlowSumOfEventWeights("POI","Pt"); | |
567 | this->CalculateDiffFlowSumOfEventWeights("POI","Eta"); | |
568 | this->CalculateDiffFlowSumOfProductOfEventWeights("RP","Pt"); | |
569 | this->CalculateDiffFlowSumOfProductOfEventWeights("RP","Eta"); | |
570 | this->CalculateDiffFlowSumOfProductOfEventWeights("POI","Pt"); | |
571 | this->CalculateDiffFlowSumOfProductOfEventWeights("POI","Eta"); | |
572 | } // end of if(!fEvaluateDiffFlowNestedLoops) | |
573 | ||
574 | ||
575 | ||
576 | // with weights: | |
577 | // ... | |
578 | ||
579 | /* | |
580 | // 2D differential flow | |
581 | if(fCalculate2DFlow) | |
582 | { | |
583 | // without weights: | |
584 | if(nRP>1) this->CalculateCorrelationsForDifferentialFlow2D("RP"); | |
585 | if(nRP>1) this->CalculateCorrelationsForDifferentialFlow2D("POI"); | |
586 | ||
587 | // with weights: | |
588 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
589 | { | |
590 | if(nRP>1) this->CalculateWeightedCorrelationsForDifferentialFlow2D("RP"); | |
591 | if(nRP>1) this->CalculateWeightedCorrelationsForDifferentialFlow2D("POI"); | |
592 | } | |
593 | } // end of if(fCalculate2DFlow) | |
594 | */ | |
57340a27 | 595 | |
b3dacf6b | 596 | // g) Distributions of correlations; |
57340a27 | 597 | if(fStoreDistributions) |
598 | { | |
599 | this->StoreDistributionsOfCorrelations(); | |
600 | } | |
489d5531 | 601 | |
b3dacf6b | 602 | // h) Debugging and cross-checking (evaluate nested loops): |
603 | // h1) cross-checking results for integrated flow: | |
489d5531 | 604 | if(fEvaluateIntFlowNestedLoops) |
605 | { | |
606 | if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10 | |
607 | { | |
608 | // without using particle weights: | |
609 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
610 | { | |
611 | // correlations: | |
612 | this->CalculateIntFlowCorrelations(); // from Q-vectors | |
613 | this->EvaluateIntFlowCorrelationsWithNestedLoops(anEvent); // from nested loops (to be improved: do I have to pass here anEvent or not?) | |
614 | // correction for non-uniform acceptance: | |
615 | this->CalculateIntFlowCorrectionsForNUASinTerms(); // from Q-vectors (sin terms) | |
616 | this->CalculateIntFlowCorrectionsForNUACosTerms(); // from Q-vectors (cos terms) | |
617 | this->EvaluateIntFlowCorrectionsForNUAWithNestedLoops(anEvent); // from nested loops (both sin and cos terms) | |
618 | } | |
619 | // using particle weights: | |
620 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
621 | { | |
622 | // correlations: | |
623 | this->CalculateIntFlowCorrelationsUsingParticleWeights(); // from Q-vectors | |
624 | this->EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent); // from nested loops (to be improved: do I have to pass here anEvent or not?) | |
625 | // correction for non-uniform acceptance: | |
626 | this->CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights(); // from Q-vectors (sin terms) | |
627 | this->CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights(); // from Q-vectors (cos terms) | |
57340a27 | 628 | this->EvaluateIntFlowCorrectionsForNUAWithNestedLoopsUsingParticleWeights(anEvent); // from nested loops (both sin and cos terms) |
489d5531 | 629 | } |
630 | } else if (nPrim>fMaxAllowedMultiplicity) // to if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) | |
631 | { | |
632 | cout<<endl; | |
633 | cout<<"Skipping the event because multiplicity is "<<nPrim<<". Too high to evaluate nested loops!"<<endl; | |
634 | } else | |
635 | { | |
636 | cout<<endl; | |
637 | cout<<"Skipping the event because multiplicity is "<<nPrim<<"."<<endl; | |
638 | } | |
639 | } // end of if(fEvaluateIntFlowNestedLoops) | |
640 | ||
b3dacf6b | 641 | // h2) cross-checking results for differential flow: |
489d5531 | 642 | if(fEvaluateDiffFlowNestedLoops) |
643 | { | |
644 | if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10 | |
645 | { | |
646 | // without using particle weights: | |
647 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
648 | { | |
649 | // reduced correlations: | |
650 | // Q-vectors: | |
651 | this->CalculateDiffFlowCorrelations("RP","Pt"); | |
652 | this->CalculateDiffFlowCorrelations("RP","Eta"); | |
653 | this->CalculateDiffFlowCorrelations("POI","Pt"); | |
654 | this->CalculateDiffFlowCorrelations("POI","Eta"); | |
655 | // nested loops: | |
656 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"RP","Pt"); | |
657 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"RP","Eta"); | |
658 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"POI","Pt"); | |
659 | this->EvaluateDiffFlowCorrelationsWithNestedLoops(anEvent,"POI","Eta"); | |
660 | // reduced corrections for non-uniform acceptance: | |
661 | // Q-vectors: | |
662 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Pt"); | |
663 | this->CalculateDiffFlowCorrectionsForNUASinTerms("RP","Eta"); | |
664 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Pt"); | |
665 | this->CalculateDiffFlowCorrectionsForNUASinTerms("POI","Eta"); | |
666 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Pt"); | |
667 | this->CalculateDiffFlowCorrectionsForNUACosTerms("RP","Eta"); | |
668 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Pt"); | |
669 | this->CalculateDiffFlowCorrectionsForNUACosTerms("POI","Eta"); | |
670 | // nested loops: | |
671 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"RP","Pt"); | |
672 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"RP","Eta"); | |
673 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"POI","Pt"); | |
674 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(anEvent,"POI","Eta"); | |
675 | } // end of if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
676 | // using particle weights: | |
677 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
678 | { | |
679 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Pt"); | |
680 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("RP","Eta"); | |
681 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Pt"); | |
682 | this->CalculateDiffFlowCorrelationsUsingParticleWeights("POI","Eta"); | |
683 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("RP","Pt"); | |
684 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("RP","Eta"); | |
685 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("POI","Pt"); | |
686 | this->CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights("POI","Eta"); | |
687 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("RP","Pt"); | |
688 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("RP","Eta"); | |
689 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("POI","Pt"); | |
690 | this->CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights("POI","Eta"); | |
691 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"RP","Pt"); | |
692 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"RP","Eta"); | |
693 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"POI","Pt"); | |
3b552efe | 694 | this->EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(anEvent,"POI","Eta"); |
489d5531 | 695 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(anEvent,"RP","Pt"); |
696 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(anEvent,"RP","Eta"); | |
697 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(anEvent,"POI","Pt"); | |
698 | this->EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(anEvent,"POI","Eta"); | |
699 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
700 | } // end of if(nPrim>0 && nPrim<=fMaxAllowedMultiplicity) // by default fMaxAllowedMultiplicity = 10 | |
701 | } // end of if(fEvaluateDiffFlowNestedLoops) | |
702 | ||
b3dacf6b | 703 | // i) Reset all event-by-event quantities. |
489d5531 | 704 | this->ResetEventByEventQuantities(); |
705 | ||
706 | } // end of AliFlowAnalysisWithQCumulants::Make(AliFlowEventSimple* anEvent) | |
707 | ||
489d5531 | 708 | //================================================================================================================================ |
709 | ||
489d5531 | 710 | void AliFlowAnalysisWithQCumulants::Finish() |
711 | { | |
712 | // Calculate the final results. | |
489d5531 | 713 | |
b3dacf6b | 714 | // a) Check all pointers used in this method; |
715 | // b) Acces the constants; | |
716 | // c) Access the flags; | |
b92ea2b9 | 717 | // d) Calculate reference cumulants (not corrected for detector effects); |
718 | // e) Correct reference cumulants for detector effects; | |
719 | // f) Calculate reference flow; | |
b77b6434 | 720 | // g) Store results for reference flow in AliFlowCommonHistResults and print them on the screen; |
721 | ||
b92ea2b9 | 722 | |
723 | ||
b92ea2b9 | 724 | // h) Calculate the final results for differential flow (without/with weights); |
725 | // i) Correct the results for differential flow (without/with weights) for effects of non-uniform acceptance (NUA); | |
726 | // j) Calculate the final results for integrated flow (RP/POI) and store in AliFlowCommonHistResults; | |
727 | // k) Store results for differential flow in AliFlowCommonHistResults; | |
728 | // l) Print the final results for integrated flow (RP/POI) on the screen; | |
729 | // m) Cross-checking: Results from Q-vectors vs results from nested loops. | |
b3dacf6b | 730 | |
731 | // a) Check all pointers used in this method: | |
732 | this->CheckPointersUsedInFinish(); | |
733 | ||
734 | // b) Acces the constants: | |
489d5531 | 735 | this->AccessConstants(); |
736 | ||
b3dacf6b | 737 | if(fCommonHists && fCommonHists->GetHarmonic()) // to be improved (moved somewhere else) |
489d5531 | 738 | { |
b3dacf6b | 739 | fHarmonic = (Int_t)(fCommonHists->GetHarmonic())->GetBinContent(1); |
489d5531 | 740 | } |
b3dacf6b | 741 | |
742 | // c) Access the flags: // to be improved (implement a method for this) | |
743 | fUsePhiWeights = (Bool_t)fUseParticleWeights->GetBinContent(1); | |
744 | fUsePtWeights = (Bool_t)fUseParticleWeights->GetBinContent(2); | |
745 | fUseEtaWeights = (Bool_t)fUseParticleWeights->GetBinContent(3); | |
746 | fApplyCorrectionForNUA = (Bool_t)fIntFlowFlags->GetBinContent(3); | |
747 | fPrintFinalResults[0] = (Bool_t)fIntFlowFlags->GetBinContent(4); | |
748 | fPrintFinalResults[1] = (Bool_t)fIntFlowFlags->GetBinContent(5); | |
749 | fPrintFinalResults[2] = (Bool_t)fIntFlowFlags->GetBinContent(6); | |
750 | fPrintFinalResults[3] = (Bool_t)fIntFlowFlags->GetBinContent(7); | |
751 | fApplyCorrectionForNUAVsM = (Bool_t)fIntFlowFlags->GetBinContent(8); | |
b77b6434 | 752 | fPropagateErrorAlsoFromNIT = (Bool_t)fIntFlowFlags->GetBinContent(9); |
0dd3b008 | 753 | fCalculateCumulantsVsM = (Bool_t)fIntFlowFlags->GetBinContent(10); |
754 | fMinimumBiasReferenceFlow = (Bool_t)fIntFlowFlags->GetBinContent(11); | |
b3dacf6b | 755 | fEvaluateIntFlowNestedLoops = (Bool_t)fEvaluateNestedLoops->GetBinContent(1); |
756 | fEvaluateDiffFlowNestedLoops = (Bool_t)fEvaluateNestedLoops->GetBinContent(2); | |
489d5531 | 757 | fCrossCheckInPtBinNo = (Int_t)fEvaluateNestedLoops->GetBinContent(3); |
758 | fCrossCheckInEtaBinNo = (Int_t)fEvaluateNestedLoops->GetBinContent(4); | |
759 | ||
b92ea2b9 | 760 | // d) Calculate reference cumulants (not corrected for detector effects): |
489d5531 | 761 | this->FinalizeCorrelationsIntFlow(); |
762 | this->CalculateCovariancesIntFlow(); | |
763 | this->CalculateCumulantsIntFlow(); | |
489d5531 | 764 | |
b92ea2b9 | 765 | // e) Correct reference cumulants for detector effects: |
766 | this->FinalizeCorrectionTermsForNUAIntFlow(); | |
767 | this->CalculateCovariancesNUAIntFlow(); | |
768 | this->CalculateQcumulantsCorrectedForNUAIntFlow(); | |
769 | ||
770 | // f) Calculate reference flow: | |
771 | this->CalculateReferenceFlow(); | |
489d5531 | 772 | |
b77b6434 | 773 | // g) Store results for reference flow in AliFlowCommonHistResults and print them on the screen: |
489d5531 | 774 | this->FillCommonHistResultsIntFlow(); |
b3dacf6b | 775 | if(fPrintFinalResults[0]){this->PrintFinalResultsForIntegratedFlow("RF");} |
776 | if(fPrintFinalResults[3] && fCalculateCumulantsVsM){this->PrintFinalResultsForIntegratedFlow("RF, rebinned in M");} | |
489d5531 | 777 | |
b77b6434 | 778 | |
779 | ||
780 | ||
781 | ||
782 | ||
783 | ||
784 | ||
785 | ||
b3dacf6b | 786 | // g) Calculate the final results for differential flow (without/with weights): |
489d5531 | 787 | this->FinalizeReducedCorrelations("RP","Pt"); |
788 | this->FinalizeReducedCorrelations("RP","Eta"); | |
789 | this->FinalizeReducedCorrelations("POI","Pt"); | |
790 | this->FinalizeReducedCorrelations("POI","Eta"); | |
791 | this->CalculateDiffFlowCovariances("RP","Pt"); | |
792 | this->CalculateDiffFlowCovariances("RP","Eta"); | |
793 | this->CalculateDiffFlowCovariances("POI","Pt"); | |
794 | this->CalculateDiffFlowCovariances("POI","Eta"); | |
795 | this->CalculateDiffFlowCumulants("RP","Pt"); | |
796 | this->CalculateDiffFlowCumulants("RP","Eta"); | |
797 | this->CalculateDiffFlowCumulants("POI","Pt"); | |
798 | this->CalculateDiffFlowCumulants("POI","Eta"); | |
799 | this->CalculateDiffFlow("RP","Pt"); | |
800 | this->CalculateDiffFlow("RP","Eta"); | |
801 | this->CalculateDiffFlow("POI","Pt"); | |
802 | this->CalculateDiffFlow("POI","Eta"); | |
803 | ||
b3dacf6b | 804 | // h) Correct the results for differential flow (without/with weights) for effects of non-uniform acceptance (NUA): |
805 | if(fApplyCorrectionForNUA) | |
489d5531 | 806 | { |
807 | this->FinalizeCorrectionTermsForNUADiffFlow("RP","Pt"); | |
808 | this->FinalizeCorrectionTermsForNUADiffFlow("RP","Eta"); | |
809 | this->FinalizeCorrectionTermsForNUADiffFlow("POI","Pt"); | |
810 | this->FinalizeCorrectionTermsForNUADiffFlow("POI","Eta"); | |
811 | this->CalculateDiffFlowCumulantsCorrectedForNUA("RP","Pt"); | |
812 | this->CalculateDiffFlowCumulantsCorrectedForNUA("RP","Eta"); | |
813 | this->CalculateDiffFlowCumulantsCorrectedForNUA("POI","Pt"); | |
814 | this->CalculateDiffFlowCumulantsCorrectedForNUA("POI","Eta"); | |
815 | this->CalculateDiffFlowCorrectedForNUA("RP","Pt"); | |
816 | this->CalculateDiffFlowCorrectedForNUA("RP","Eta"); | |
817 | this->CalculateDiffFlowCorrectedForNUA("POI","Pt"); | |
818 | this->CalculateDiffFlowCorrectedForNUA("POI","Eta"); | |
3b552efe | 819 | } |
489d5531 | 820 | |
b3dacf6b | 821 | // i) Calculate the final results for integrated flow (RP/POI) and store in AliFlowCommonHistResults: |
489d5531 | 822 | this->CalculateFinalResultsForRPandPOIIntegratedFlow("RP"); |
823 | this->CalculateFinalResultsForRPandPOIIntegratedFlow("POI"); | |
824 | ||
b3dacf6b | 825 | // j) Store results for differential flow in AliFlowCommonHistResults: |
489d5531 | 826 | this->FillCommonHistResultsDiffFlow("RP"); |
827 | this->FillCommonHistResultsDiffFlow("POI"); | |
828 | ||
b3dacf6b | 829 | // k) Print the final results for integrated flow (RP/POI) on the screen: |
830 | if(fPrintFinalResults[1]){this->PrintFinalResultsForIntegratedFlow("RP");} | |
831 | if(fPrintFinalResults[2]){this->PrintFinalResultsForIntegratedFlow("POI");} | |
832 | ||
833 | // l) Cross-checking: Results from Q-vectors vs results from nested loops: | |
834 | // l1) Reference flow: | |
489d5531 | 835 | if(fEvaluateIntFlowNestedLoops) |
836 | { | |
837 | this->CrossCheckIntFlowCorrelations(); | |
838 | this->CrossCheckIntFlowCorrectionTermsForNUA(); | |
839 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) this->CrossCheckIntFlowExtraCorrelations(); | |
840 | } // end of if(fEvaluateIntFlowNestedLoops) | |
841 | ||
b3dacf6b | 842 | // l2) Differential flow: |
489d5531 | 843 | if(fEvaluateDiffFlowNestedLoops) |
844 | { | |
b3dacf6b | 845 | // Correlations: |
489d5531 | 846 | this->PrintNumberOfParticlesInSelectedBin(); |
847 | this->CrossCheckDiffFlowCorrelations("RP","Pt"); | |
848 | this->CrossCheckDiffFlowCorrelations("RP","Eta"); | |
849 | this->CrossCheckDiffFlowCorrelations("POI","Pt"); | |
850 | this->CrossCheckDiffFlowCorrelations("POI","Eta"); | |
b3dacf6b | 851 | // Correction terms for non-uniform acceptance: |
489d5531 | 852 | this->CrossCheckDiffFlowCorrectionTermsForNUA("RP","Pt"); |
853 | this->CrossCheckDiffFlowCorrectionTermsForNUA("RP","Eta"); | |
854 | this->CrossCheckDiffFlowCorrectionTermsForNUA("POI","Pt"); | |
855 | this->CrossCheckDiffFlowCorrectionTermsForNUA("POI","Eta"); | |
856 | } // end of if(fEvaluateDiffFlowNestedLoops) | |
857 | ||
858 | } // end of AliFlowAnalysisWithQCumulants::Finish() | |
859 | ||
489d5531 | 860 | //================================================================================================================================ |
861 | ||
489d5531 | 862 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTerms() |
863 | { | |
b92ea2b9 | 864 | // Calculate correction terms for non-uniform acceptance of the detector for reference flow (cos terms). |
489d5531 | 865 | |
866 | // multiplicity: | |
867 | Double_t dMult = (*fSMpk)(0,0); | |
868 | ||
869 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
870 | Double_t dReQ1n = (*fReQ)(0,0); | |
871 | Double_t dReQ2n = (*fReQ)(1,0); | |
872 | //Double_t dReQ3n = (*fReQ)(2,0); | |
873 | //Double_t dReQ4n = (*fReQ)(3,0); | |
874 | Double_t dImQ1n = (*fImQ)(0,0); | |
875 | Double_t dImQ2n = (*fImQ)(1,0); | |
876 | //Double_t dImQ3n = (*fImQ)(2,0); | |
877 | //Double_t dImQ4n = (*fImQ)(3,0); | |
878 | ||
879 | // ************************************************************* | |
880 | // **** corrections for non-uniform acceptance (cos terms): **** | |
881 | // ************************************************************* | |
882 | // | |
883 | // Remark 1: corrections for non-uniform acceptance (cos terms) calculated with non-weighted Q-vectors | |
884 | // are stored in 1D profile fQCorrectionsCos. | |
885 | // Remark 2: binning of fIntFlowCorrectionTermsForNUAPro[1] is organized as follows: | |
886 | // -------------------------------------------------------------------------------------------------------------------- | |
887 | // 1st bin: <<cos(n*(phi1))>> = cosP1n | |
888 | // 2nd bin: <<cos(n*(phi1+phi2))>> = cosP1nP1n | |
889 | // 3rd bin: <<cos(n*(phi1-phi2-phi3))>> = cosP1nM1nM1n | |
890 | // 4th bin: <<cos(n*(2phi1-phi2))>> = cosP2nM1n | |
891 | // -------------------------------------------------------------------------------------------------------------------- | |
892 | ||
893 | // 1-particle: | |
894 | Double_t cosP1n = 0.; // <<cos(n*(phi1))>> | |
895 | ||
896 | if(dMult>0) | |
897 | { | |
898 | cosP1n = dReQ1n/dMult; | |
899 | ||
900 | // average non-weighted 1-particle correction (cos terms) for non-uniform acceptance for single event: | |
901 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(1,cosP1n); | |
0328db2d | 902 | // event weights for NUA terms: |
903 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(1,dMult); | |
489d5531 | 904 | |
905 | // final average non-weighted 1-particle correction (cos terms) for non-uniform acceptance for all events: | |
906 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(0.5,cosP1n,dMult); | |
b3dacf6b | 907 | if(fCalculateCumulantsVsM){fIntFlowCorrectionTermsForNUAVsMPro[1][0]->Fill(dMult+0.5,cosP1n,dMult);} |
489d5531 | 908 | } |
909 | ||
910 | // 2-particle: | |
3b552efe | 911 | Double_t cosP1nP1n = 0.; // <<cos(n*(phi1+phi2))>> |
489d5531 | 912 | Double_t cosP2nM1n = 0.; // <<cos(n*(2phi1-phi2))>> |
913 | ||
914 | if(dMult>1) | |
915 | { | |
916 | cosP1nP1n = (pow(dReQ1n,2)-pow(dImQ1n,2)-dReQ2n)/(dMult*(dMult-1)); | |
917 | cosP2nM1n = (dReQ2n*dReQ1n+dImQ2n*dImQ1n-dReQ1n)/(dMult*(dMult-1)); | |
918 | ||
919 | // average non-weighted 2-particle correction (cos terms) for non-uniform acceptance for single event: | |
3b552efe | 920 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(2,cosP1nP1n); |
489d5531 | 921 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(4,cosP2nM1n); |
0328db2d | 922 | // event weights for NUA terms: |
923 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(2,dMult*(dMult-1)); | |
924 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(4,dMult*(dMult-1)); | |
925 | ||
489d5531 | 926 | // final average non-weighted 2-particle correction (cos terms) for non-uniform acceptance for all events: |
3b552efe | 927 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(1.5,cosP1nP1n,dMult*(dMult-1)); |
489d5531 | 928 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(3.5,cosP2nM1n,dMult*(dMult-1)); |
b3dacf6b | 929 | if(fCalculateCumulantsVsM) |
930 | { | |
931 | fIntFlowCorrectionTermsForNUAVsMPro[1][1]->Fill(dMult+0.5,cosP1nP1n,dMult*(dMult-1)); | |
932 | fIntFlowCorrectionTermsForNUAVsMPro[1][3]->Fill(dMult+0.5,cosP2nM1n,dMult*(dMult-1)); | |
933 | } | |
489d5531 | 934 | } |
935 | ||
936 | // 3-particle: | |
937 | Double_t cosP1nM1nM1n = 0.; // <<cos(n*(phi1-phi2-phi3))>> | |
938 | ||
939 | if(dMult>2) | |
940 | { | |
941 | cosP1nM1nM1n = (dReQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))-dReQ1n*dReQ2n-dImQ1n*dImQ2n-2.*(dMult-1)*dReQ1n) | |
942 | / (dMult*(dMult-1)*(dMult-2)); | |
943 | ||
944 | // average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for single event: | |
945 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(3,cosP1nM1nM1n); | |
0328db2d | 946 | // event weights for NUA terms: |
947 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->SetBinContent(3,dMult*(dMult-1)*(dMult-2)); | |
489d5531 | 948 | |
949 | // final average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for all events: | |
2001bc3a | 950 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(2.5,cosP1nM1nM1n,dMult*(dMult-1)*(dMult-2)); |
b3dacf6b | 951 | if(fCalculateCumulantsVsM){fIntFlowCorrectionTermsForNUAVsMPro[1][2]->Fill(dMult+0.5,cosP1nM1nM1n,dMult*(dMult-1)*(dMult-2));} |
489d5531 | 952 | } |
953 | ||
954 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTerms() | |
955 | ||
956 | ||
957 | //================================================================================================================================ | |
958 | ||
959 | ||
960 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTerms() | |
961 | { | |
962 | // calculate corrections for non-uniform acceptance of the detector for no-name integrated flow (sin terms) | |
963 | ||
964 | // multiplicity: | |
965 | Double_t dMult = (*fSMpk)(0,0); | |
966 | ||
967 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
968 | Double_t dReQ1n = (*fReQ)(0,0); | |
969 | Double_t dReQ2n = (*fReQ)(1,0); | |
970 | //Double_t dReQ3n = (*fReQ)(2,0); | |
971 | //Double_t dReQ4n = (*fReQ)(3,0); | |
972 | Double_t dImQ1n = (*fImQ)(0,0); | |
973 | Double_t dImQ2n = (*fImQ)(1,0); | |
974 | //Double_t dImQ3n = (*fImQ)(2,0); | |
975 | //Double_t dImQ4n = (*fImQ)(3,0); | |
976 | ||
977 | // ************************************************************* | |
978 | // **** corrections for non-uniform acceptance (sin terms): **** | |
979 | // ************************************************************* | |
980 | // | |
981 | // Remark 1: corrections for non-uniform acceptance (sin terms) calculated with non-weighted Q-vectors | |
982 | // are stored in 1D profile fQCorrectionsSin. | |
983 | // Remark 2: binning of fIntFlowCorrectionTermsForNUAPro[0] is organized as follows: | |
984 | // -------------------------------------------------------------------------------------------------------------------- | |
985 | // 1st bin: <<sin(n*(phi1))>> = sinP1n | |
986 | // 2nd bin: <<sin(n*(phi1+phi2))>> = sinP1nP1n | |
987 | // 3rd bin: <<sin(n*(phi1-phi2-phi3))>> = sinP1nM1nM1n | |
988 | // 4th bin: <<sin(n*(2phi1-phi2))>> = sinP2nM1n | |
989 | // -------------------------------------------------------------------------------------------------------------------- | |
990 | ||
991 | // 1-particle: | |
992 | Double_t sinP1n = 0.; // <sin(n*(phi1))> | |
993 | ||
994 | if(dMult>0) | |
995 | { | |
996 | sinP1n = dImQ1n/dMult; | |
997 | ||
998 | // average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for single event: | |
0328db2d | 999 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(1,sinP1n); |
1000 | // event weights for NUA terms: | |
1001 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(1,dMult); | |
489d5531 | 1002 | |
1003 | // final average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
1004 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(0.5,sinP1n,dMult); | |
b3dacf6b | 1005 | if(fCalculateCumulantsVsM){fIntFlowCorrectionTermsForNUAVsMPro[0][0]->Fill(dMult+0.5,sinP1n,dMult);} |
489d5531 | 1006 | } |
1007 | ||
1008 | // 2-particle: | |
1009 | Double_t sinP1nP1n = 0.; // <<sin(n*(phi1+phi2))>> | |
1010 | Double_t sinP2nM1n = 0.; // <<sin(n*(2phi1-phi2))>> | |
1011 | if(dMult>1) | |
1012 | { | |
3b552efe | 1013 | sinP1nP1n = (2.*dReQ1n*dImQ1n-dImQ2n)/(dMult*(dMult-1)); |
489d5531 | 1014 | sinP2nM1n = (dImQ2n*dReQ1n-dReQ2n*dImQ1n-dImQ1n)/(dMult*(dMult-1)); |
1015 | ||
1016 | // average non-weighted 2-particle correction (sin terms) for non-uniform acceptance for single event: | |
1017 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(2,sinP1nP1n); | |
3b552efe | 1018 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(4,sinP2nM1n); |
0328db2d | 1019 | // event weights for NUA terms: |
1020 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(2,dMult*(dMult-1)); | |
1021 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(4,dMult*(dMult-1)); | |
489d5531 | 1022 | |
1023 | // final average non-weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
1024 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(1.5,sinP1nP1n,dMult*(dMult-1)); | |
1025 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(3.5,sinP2nM1n,dMult*(dMult-1)); | |
b3dacf6b | 1026 | if(fCalculateCumulantsVsM) |
1027 | { | |
1028 | fIntFlowCorrectionTermsForNUAVsMPro[0][1]->Fill(dMult+0.5,sinP1nP1n,dMult*(dMult-1)); | |
1029 | fIntFlowCorrectionTermsForNUAVsMPro[0][3]->Fill(dMult+0.5,sinP2nM1n,dMult*(dMult-1)); | |
1030 | } | |
489d5531 | 1031 | } |
1032 | ||
1033 | // 3-particle: | |
1034 | Double_t sinP1nM1nM1n = 0.; // <<sin(n*(phi1-phi2-phi3))>> | |
1035 | ||
1036 | if(dMult>2) | |
1037 | { | |
1038 | sinP1nM1nM1n = (-dImQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))+dReQ1n*dImQ2n-dImQ1n*dReQ2n+2.*(dMult-1)*dImQ1n) | |
1039 | / (dMult*(dMult-1)*(dMult-2)); | |
1040 | ||
1041 | // average non-weighted 3-particle correction (sin terms) for non-uniform acceptance for single event: | |
1042 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(3,sinP1nM1nM1n); | |
0328db2d | 1043 | // event weights for NUA terms: |
1044 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->SetBinContent(3,dMult*(dMult-1)*(dMult-2)); | |
489d5531 | 1045 | |
1046 | // final average non-weighted 3-particle correction (sin terms) for non-uniform acceptance for all events: | |
2001bc3a | 1047 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(2.5,sinP1nM1nM1n,dMult*(dMult-1)*(dMult-2)); |
b3dacf6b | 1048 | if(fCalculateCumulantsVsM){fIntFlowCorrectionTermsForNUAVsMPro[0][2]->Fill(dMult+0.5,sinP1nM1nM1n,dMult*(dMult-1)*(dMult-2));} |
489d5531 | 1049 | } |
1050 | ||
1051 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTerms() | |
1052 | ||
1053 | ||
1054 | //================================================================================================================================ | |
1055 | ||
1056 | ||
1057 | void AliFlowAnalysisWithQCumulants::GetOutputHistograms(TList *outputListHistos) | |
1058 | { | |
1059 | // a) Get pointers for common control and common result histograms and profiles. | |
1060 | // b) Get pointers for histograms with particle weights. | |
1061 | // c) Get pointers for histograms and profiles relevant for integrated flow. | |
1062 | // d) Get pointers for histograms and profiles relevant for differental flow. | |
1063 | // e) Get pointers for histograms and profiles holding results obtained with nested loops. | |
1064 | ||
1065 | if(outputListHistos) | |
3b552efe | 1066 | { |
1067 | this->SetHistList(outputListHistos); | |
1068 | if(!fHistList) | |
1069 | { | |
1070 | cout<<endl; | |
1071 | cout<<" WARNING (QC): fHistList is NULL in AFAWQC::GOH() !!!!"<<endl; | |
1072 | cout<<endl; | |
1073 | exit(0); | |
489d5531 | 1074 | } |
1075 | this->GetPointersForCommonHistograms(); | |
1076 | this->GetPointersForParticleWeightsHistograms(); | |
1077 | this->GetPointersForIntFlowHistograms(); | |
1078 | this->GetPointersForDiffFlowHistograms(); | |
1079 | this->GetPointersForNestedLoopsHistograms(); | |
3b552efe | 1080 | } else |
1081 | { | |
1082 | cout<<endl; | |
1083 | cout<<" WARNING (QC): outputListHistos is NULL in AFAWQC::GOH() !!!!"<<endl; | |
1084 | cout<<endl; | |
1085 | exit(0); | |
489d5531 | 1086 | } |
1087 | ||
1088 | } // end of void AliFlowAnalysisWithQCumulants::GetOutputHistograms(TList *outputListHistos) | |
ad87ae62 | 1089 | |
1090 | ||
489d5531 | 1091 | //================================================================================================================================ |
1092 | ||
1093 | ||
1094 | TProfile* AliFlowAnalysisWithQCumulants::MakePtProjection(TProfile2D *profilePtEta) const | |
ad87ae62 | 1095 | { |
489d5531 | 1096 | // project 2D profile onto pt axis to get 1D profile |
1097 | ||
1098 | Int_t nBinsPt = profilePtEta->GetNbinsX(); | |
1099 | Double_t dPtMin = (profilePtEta->GetXaxis())->GetXmin(); | |
1100 | Double_t dPtMax = (profilePtEta->GetXaxis())->GetXmax(); | |
1101 | ||
1102 | Int_t nBinsEta = profilePtEta->GetNbinsY(); | |
1103 | ||
1104 | TProfile *profilePt = new TProfile("","",nBinsPt,dPtMin,dPtMax); | |
1105 | ||
1106 | for(Int_t p=1;p<=nBinsPt;p++) | |
1107 | { | |
1108 | Double_t contentPt = 0.; | |
1109 | Double_t entryPt = 0.; | |
1110 | Double_t spreadPt = 0.; | |
1111 | Double_t sum1 = 0.; | |
1112 | Double_t sum2 = 0.; | |
1113 | Double_t sum3 = 0.; | |
1114 | for(Int_t e=1;e<=nBinsEta;e++) | |
1115 | { | |
1116 | contentPt += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))) | |
1117 | * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1118 | entryPt += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1119 | ||
1120 | sum1 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))) | |
1121 | * (pow(profilePtEta->GetBinError(profilePtEta->GetBin(p,e)),2.) | |
1122 | + pow(profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)),2.)); | |
1123 | sum2 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1124 | sum3 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))) | |
1125 | * (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))); | |
1126 | } | |
1127 | if(sum2>0. && sum1/sum2-pow(sum3/sum2,2.) > 0.) | |
1128 | { | |
1129 | spreadPt = pow(sum1/sum2-pow(sum3/sum2,2.),0.5); | |
1130 | } | |
1131 | profilePt->SetBinContent(p,contentPt); | |
1132 | profilePt->SetBinEntries(p,entryPt); | |
1133 | { | |
1134 | profilePt->SetBinError(p,spreadPt); | |
1135 | } | |
1136 | ||
1137 | } | |
1138 | ||
1139 | return profilePt; | |
1140 | ||
1141 | } // end of TProfile* AliFlowAnalysisWithQCumulants::MakePtProjection(TProfile2D *profilePtEta) | |
1142 | ||
1143 | ||
1144 | //================================================================================================================================ | |
1145 | ||
1146 | ||
1147 | TProfile* AliFlowAnalysisWithQCumulants::MakeEtaProjection(TProfile2D *profilePtEta) const | |
1148 | { | |
1149 | // project 2D profile onto eta axis to get 1D profile | |
1150 | ||
1151 | Int_t nBinsEta = profilePtEta->GetNbinsY(); | |
1152 | Double_t dEtaMin = (profilePtEta->GetYaxis())->GetXmin(); | |
1153 | Double_t dEtaMax = (profilePtEta->GetYaxis())->GetXmax(); | |
1154 | ||
1155 | Int_t nBinsPt = profilePtEta->GetNbinsX(); | |
1156 | ||
1157 | TProfile *profileEta = new TProfile("","",nBinsEta,dEtaMin,dEtaMax); | |
1158 | ||
1159 | for(Int_t e=1;e<=nBinsEta;e++) | |
1160 | { | |
1161 | Double_t contentEta = 0.; | |
1162 | Double_t entryEta = 0.; | |
1163 | for(Int_t p=1;p<=nBinsPt;p++) | |
1164 | { | |
1165 | contentEta += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e))) | |
1166 | * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1167 | entryEta += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e))); | |
1168 | } | |
1169 | profileEta->SetBinContent(e,contentEta); | |
1170 | profileEta->SetBinEntries(e,entryEta); | |
1171 | } | |
1172 | ||
1173 | return profileEta; | |
1174 | ||
1175 | } // end of TProfile* AliFlowAnalysisWithQCumulants::MakeEtaProjection(TProfile2D *profilePtEta) | |
1176 | ||
489d5531 | 1177 | //================================================================================================================================ |
1178 | ||
489d5531 | 1179 | void AliFlowAnalysisWithQCumulants::PrintFinalResultsForIntegratedFlow(TString type) |
1180 | { | |
2001bc3a | 1181 | // Printing on the screen the final results for integrated flow (RF, POI and RP). |
489d5531 | 1182 | |
1183 | Int_t n = fHarmonic; | |
1184 | ||
489d5531 | 1185 | Double_t dVn[4] = {0.}; // array to hold Vn{2}, Vn{4}, Vn{6} and Vn{8} |
1186 | Double_t dVnErr[4] = {0.}; // array to hold errors of Vn{2}, Vn{4}, Vn{6} and Vn{8} | |
1187 | ||
2001bc3a | 1188 | if(type == "RF") |
489d5531 | 1189 | { |
0dd3b008 | 1190 | for(Int_t b=0;b<4;b++) |
1191 | { | |
b77b6434 | 1192 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlow())->GetBinContent(1); |
1193 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlow())->GetBinError(1); | |
1194 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlow())->GetBinContent(1); | |
1195 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlow())->GetBinError(1); | |
1196 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlow())->GetBinContent(1); | |
1197 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlow())->GetBinError(1); | |
1198 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlow())->GetBinContent(1); | |
1199 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlow())->GetBinError(1); | |
0dd3b008 | 1200 | } |
489d5531 | 1201 | } else if(type == "RP") |
1202 | { | |
1203 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlowRP())->GetBinContent(1); | |
1204 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlowRP())->GetBinError(1); | |
1205 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlowRP())->GetBinContent(1); | |
1206 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlowRP())->GetBinError(1); | |
1207 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlowRP())->GetBinContent(1); | |
1208 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlowRP())->GetBinError(1); | |
1209 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlowRP())->GetBinContent(1); | |
1210 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlowRP())->GetBinError(1); | |
1211 | } else if(type == "POI") | |
1212 | { | |
1213 | dVn[0] = (fCommonHistsResults2nd->GetHistIntFlowPOI())->GetBinContent(1); | |
1214 | dVnErr[0] = (fCommonHistsResults2nd->GetHistIntFlowPOI())->GetBinError(1); | |
1215 | dVn[1] = (fCommonHistsResults4th->GetHistIntFlowPOI())->GetBinContent(1); | |
1216 | dVnErr[1] = (fCommonHistsResults4th->GetHistIntFlowPOI())->GetBinError(1); | |
1217 | dVn[2] = (fCommonHistsResults6th->GetHistIntFlowPOI())->GetBinContent(1); | |
1218 | dVnErr[2] = (fCommonHistsResults6th->GetHistIntFlowPOI())->GetBinError(1); | |
1219 | dVn[3] = (fCommonHistsResults8th->GetHistIntFlowPOI())->GetBinContent(1); | |
1220 | dVnErr[3] = (fCommonHistsResults8th->GetHistIntFlowPOI())->GetBinError(1); | |
b77b6434 | 1221 | } else if(type == "RF, rebinned in M" && fCalculateCumulantsVsM) |
b3dacf6b | 1222 | { |
0dd3b008 | 1223 | for(Int_t b=0;b<4;b++) |
1224 | { | |
1225 | dVn[b] = fIntFlowRebinnedInM->GetBinContent(b+1); | |
1226 | dVnErr[b] = fIntFlowRebinnedInM->GetBinError(b+1); | |
1227 | } | |
b3dacf6b | 1228 | } |
489d5531 | 1229 | |
1230 | TString title = " flow estimates from Q-cumulants"; | |
1231 | TString subtitle = " ("; | |
b3dacf6b | 1232 | TString subtitle2 = " (rebinned in M)"; |
489d5531 | 1233 | |
b3dacf6b | 1234 | if(type != "RF, rebinned in M") |
489d5531 | 1235 | { |
b3dacf6b | 1236 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
1237 | { | |
1238 | subtitle.Append(type); | |
1239 | subtitle.Append(", without weights)"); | |
1240 | } else | |
1241 | { | |
1242 | subtitle.Append(type); | |
1243 | subtitle.Append(", with weights)"); | |
1244 | } | |
1245 | } else | |
489d5531 | 1246 | { |
b3dacf6b | 1247 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) |
1248 | { | |
1249 | subtitle.Append("RF"); | |
1250 | subtitle.Append(", without weights)"); | |
1251 | } else | |
1252 | { | |
1253 | subtitle.Append("RF"); | |
1254 | subtitle.Append(", with weights)"); | |
1255 | } | |
1256 | } | |
1257 | ||
489d5531 | 1258 | cout<<endl; |
1259 | cout<<"*************************************"<<endl; | |
1260 | cout<<"*************************************"<<endl; | |
1261 | cout<<title.Data()<<endl; | |
1262 | cout<<subtitle.Data()<<endl; | |
b3dacf6b | 1263 | if(type == "RF, rebinned in M"){cout<<subtitle2.Data()<<endl;} |
489d5531 | 1264 | cout<<endl; |
1265 | ||
1266 | for(Int_t i=0;i<4;i++) | |
1267 | { | |
2001bc3a | 1268 | cout<<" v_"<<n<<"{"<<2*(i+1)<<"} = "<<dVn[i]<<" +/- "<<dVnErr[i]<<endl; |
489d5531 | 1269 | } |
2001bc3a | 1270 | |
489d5531 | 1271 | cout<<endl; |
b92ea2b9 | 1272 | if(type == "RF") |
1273 | { | |
b77b6434 | 1274 | if(fApplyCorrectionForNUA) |
1275 | { | |
1276 | cout<<" detector bias (corrected for): "<<endl; | |
1277 | } else | |
1278 | { | |
1279 | cout<<" detector bias (not corrected for):"<<endl; | |
1280 | } | |
b92ea2b9 | 1281 | cout<<" to QC{2}: "<<fIntFlowDetectorBias->GetBinContent(1)<<" +/- "<<fIntFlowDetectorBias->GetBinError(1)<<endl; |
1282 | cout<<" to QC{4}: "<<fIntFlowDetectorBias->GetBinContent(2)<<" +/- "<<fIntFlowDetectorBias->GetBinError(2)<<endl; | |
1283 | cout<<endl; | |
1284 | } | |
b3dacf6b | 1285 | if(type == "RF" || type == "RF, rebinned in M") |
489d5531 | 1286 | { |
2001bc3a | 1287 | cout<<" nEvts = "<<(Int_t)fCommonHists->GetHistMultRP()->GetEntries()<<", <M> = "<<(Double_t)fCommonHists->GetHistMultRP()->GetMean()<<endl; |
489d5531 | 1288 | } |
1289 | else if (type == "RP") | |
1290 | { | |
2001bc3a | 1291 | cout<<" nEvts = "<<(Int_t)fCommonHists->GetHistMultRP()->GetEntries()<<", <M> = "<<(Double_t)fCommonHists->GetHistMultRP()->GetMean()<<endl; |
489d5531 | 1292 | } |
1293 | else if (type == "POI") | |
1294 | { | |
2001bc3a | 1295 | cout<<" nEvts = "<<(Int_t)fCommonHists->GetHistMultPOI()->GetEntries()<<", <M> = "<<(Double_t)fCommonHists->GetHistMultPOI()->GetMean()<<endl; |
1296 | } | |
1297 | ||
489d5531 | 1298 | cout<<"*************************************"<<endl; |
1299 | cout<<"*************************************"<<endl; | |
1300 | cout<<endl; | |
1301 | ||
2001bc3a | 1302 | }// end of AliFlowAnalysisWithQCumulants::PrintFinalResultsForIntegratedFlow(TString type="RF"); |
489d5531 | 1303 | |
1304 | //================================================================================================================================ | |
1305 | ||
489d5531 | 1306 | void AliFlowAnalysisWithQCumulants::WriteHistograms(TString outputFileName) |
1307 | { | |
1308 | //store the final results in output .root file | |
1309 | TFile *output = new TFile(outputFileName.Data(),"RECREATE"); | |
1310 | //output->WriteObject(fHistList, "cobjQC","SingleKey"); | |
1311 | fHistList->Write(fHistList->GetName(), TObject::kSingleKey); | |
1312 | delete output; | |
1313 | } | |
1314 | ||
1315 | ||
1316 | //================================================================================================================================ | |
1317 | ||
1318 | ||
1319 | void AliFlowAnalysisWithQCumulants::WriteHistograms(TDirectoryFile *outputFileName) | |
1320 | { | |
1321 | //store the final results in output .root file | |
1322 | fHistList->SetName("cobjQC"); | |
1323 | fHistList->SetOwner(kTRUE); | |
1324 | outputFileName->Add(fHistList); | |
1325 | outputFileName->Write(outputFileName->GetName(), TObject::kSingleKey); | |
1326 | } | |
1327 | ||
1328 | ||
1329 | //================================================================================================================================ | |
1330 | ||
1331 | ||
1332 | void AliFlowAnalysisWithQCumulants::BookCommonHistograms() | |
1333 | { | |
1334 | // Book common control histograms and common histograms for final results. | |
1335 | // common control histogram (ALL events) | |
1336 | TString commonHistsName = "AliFlowCommonHistQC"; | |
1337 | commonHistsName += fAnalysisLabel->Data(); | |
1338 | fCommonHists = new AliFlowCommonHist(commonHistsName.Data()); | |
1339 | fHistList->Add(fCommonHists); | |
1340 | // common control histogram (for events with 2 and more particles) | |
1341 | TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC"; | |
1342 | commonHists2ndOrderName += fAnalysisLabel->Data(); | |
1343 | fCommonHists2nd = new AliFlowCommonHist(commonHists2ndOrderName.Data()); | |
1344 | fHistList->Add(fCommonHists2nd); | |
1345 | // common control histogram (for events with 4 and more particles) | |
1346 | TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC"; | |
1347 | commonHists4thOrderName += fAnalysisLabel->Data(); | |
1348 | fCommonHists4th = new AliFlowCommonHist(commonHists4thOrderName.Data()); | |
1349 | fHistList->Add(fCommonHists4th); | |
1350 | // common control histogram (for events with 6 and more particles) | |
1351 | TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC"; | |
1352 | commonHists6thOrderName += fAnalysisLabel->Data(); | |
1353 | fCommonHists6th = new AliFlowCommonHist(commonHists6thOrderName.Data()); | |
1354 | fHistList->Add(fCommonHists6th); | |
1355 | // common control histogram (for events with 8 and more particles) | |
1356 | TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC"; | |
1357 | commonHists8thOrderName += fAnalysisLabel->Data(); | |
1358 | fCommonHists8th = new AliFlowCommonHist(commonHists8thOrderName.Data()); | |
1359 | fHistList->Add(fCommonHists8th); | |
1360 | // common histograms for final results (calculated for events with 2 and more particles) | |
1361 | TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC"; | |
1362 | commonHistResults2ndOrderName += fAnalysisLabel->Data(); | |
1363 | fCommonHistsResults2nd = new AliFlowCommonHistResults(commonHistResults2ndOrderName.Data()); | |
1364 | fHistList->Add(fCommonHistsResults2nd); | |
1365 | // common histograms for final results (calculated for events with 4 and more particles) | |
1366 | TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC"; | |
1367 | commonHistResults4thOrderName += fAnalysisLabel->Data(); | |
1368 | fCommonHistsResults4th = new AliFlowCommonHistResults(commonHistResults4thOrderName.Data()); | |
1369 | fHistList->Add(fCommonHistsResults4th); | |
1370 | // common histograms for final results (calculated for events with 6 and more particles) | |
1371 | TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC"; | |
1372 | commonHistResults6thOrderName += fAnalysisLabel->Data(); | |
1373 | fCommonHistsResults6th = new AliFlowCommonHistResults(commonHistResults6thOrderName.Data()); | |
1374 | fHistList->Add(fCommonHistsResults6th); | |
1375 | // common histograms for final results (calculated for events with 8 and more particles) | |
1376 | TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC"; | |
1377 | commonHistResults8thOrderName += fAnalysisLabel->Data(); | |
1378 | fCommonHistsResults8th = new AliFlowCommonHistResults(commonHistResults8thOrderName.Data()); | |
1379 | fHistList->Add(fCommonHistsResults8th); | |
1380 | ||
1381 | } // end of void AliFlowAnalysisWithQCumulants::BookCommonHistograms() | |
1382 | ||
1383 | ||
1384 | //================================================================================================================================ | |
1385 | ||
1386 | ||
1387 | void AliFlowAnalysisWithQCumulants::BookAndFillWeightsHistograms() | |
1388 | { | |
1389 | // book and fill histograms which hold phi, pt and eta weights | |
1390 | ||
1391 | if(!fWeightsList) | |
1392 | { | |
1393 | cout<<"WARNING: fWeightsList is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1394 | exit(0); | |
1395 | } | |
1396 | ||
1397 | TString fUseParticleWeightsName = "fUseParticleWeightsQC"; | |
1398 | fUseParticleWeightsName += fAnalysisLabel->Data(); | |
1399 | fUseParticleWeights = new TProfile(fUseParticleWeightsName.Data(),"0 = particle weight not used, 1 = particle weight used ",3,0,3); | |
1400 | fUseParticleWeights->SetLabelSize(0.06); | |
1401 | (fUseParticleWeights->GetXaxis())->SetBinLabel(1,"w_{#phi}"); | |
1402 | (fUseParticleWeights->GetXaxis())->SetBinLabel(2,"w_{p_{T}}"); | |
1403 | (fUseParticleWeights->GetXaxis())->SetBinLabel(3,"w_{#eta}"); | |
1404 | fUseParticleWeights->Fill(0.5,(Int_t)fUsePhiWeights); | |
1405 | fUseParticleWeights->Fill(1.5,(Int_t)fUsePtWeights); | |
1406 | fUseParticleWeights->Fill(2.5,(Int_t)fUseEtaWeights); | |
1407 | fWeightsList->Add(fUseParticleWeights); | |
1408 | ||
1409 | if(fUsePhiWeights) | |
1410 | { | |
1411 | if(fWeightsList->FindObject("phi_weights")) | |
1412 | { | |
1413 | fPhiWeights = dynamic_cast<TH1F*>(fWeightsList->FindObject("phi_weights")); | |
1414 | if(TMath::Abs(fPhiWeights->GetBinWidth(1)-fPhiBinWidth)>pow(10.,-6.)) | |
1415 | { | |
1416 | cout<<endl; | |
1417 | cout<<"WARNING (QC): Inconsistent binning in histograms for phi-weights throughout the code."<<endl; | |
1418 | cout<<endl; | |
6fbbbbf1 | 1419 | //exit(0); |
489d5531 | 1420 | } |
1421 | } else | |
1422 | { | |
1423 | cout<<"WARNING: fWeightsList->FindObject(\"phi_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1424 | exit(0); | |
1425 | } | |
1426 | } // end of if(fUsePhiWeights) | |
1427 | ||
1428 | if(fUsePtWeights) | |
1429 | { | |
1430 | if(fWeightsList->FindObject("pt_weights")) | |
1431 | { | |
1432 | fPtWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("pt_weights")); | |
1433 | if(TMath::Abs(fPtWeights->GetBinWidth(1)-fPtBinWidth)>pow(10.,-6.)) | |
1434 | { | |
1435 | cout<<endl; | |
1436 | cout<<"WARNING (QC): Inconsistent binning in histograms for pt-weights throughout the code."<<endl; | |
1437 | cout<<endl; | |
6fbbbbf1 | 1438 | //exit(0); |
489d5531 | 1439 | } |
1440 | } else | |
1441 | { | |
1442 | cout<<"WARNING: fWeightsList->FindObject(\"pt_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1443 | exit(0); | |
1444 | } | |
1445 | } // end of if(fUsePtWeights) | |
1446 | ||
1447 | if(fUseEtaWeights) | |
1448 | { | |
1449 | if(fWeightsList->FindObject("eta_weights")) | |
1450 | { | |
1451 | fEtaWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("eta_weights")); | |
1452 | if(TMath::Abs(fEtaWeights->GetBinWidth(1)-fEtaBinWidth)>pow(10.,-6.)) | |
1453 | { | |
1454 | cout<<endl; | |
1455 | cout<<"WARNING (QC): Inconsistent binning in histograms for eta-weights throughout the code."<<endl; | |
1456 | cout<<endl; | |
6fbbbbf1 | 1457 | //exit(0); |
489d5531 | 1458 | } |
1459 | } else | |
1460 | { | |
1461 | cout<<"WARNING: fUseEtaWeights && fWeightsList->FindObject(\"eta_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl; | |
1462 | exit(0); | |
1463 | } | |
1464 | } // end of if(fUseEtaWeights) | |
1465 | ||
1466 | } // end of AliFlowAnalysisWithQCumulants::BookAndFillWeightsHistograms() | |
1467 | ||
1468 | ||
1469 | //================================================================================================================================ | |
1470 | ||
1471 | ||
1472 | void AliFlowAnalysisWithQCumulants::BookEverythingForIntegratedFlow() | |
1473 | { | |
1474 | // Book all objects for integrated flow: | |
1475 | // a) Book profile to hold all flags for integrated flow. | |
1476 | // b) Book event-by-event quantities. | |
1477 | // c) Book profiles. // to be improved (comment) | |
1478 | // d) Book histograms holding the final results. | |
1479 | ||
1480 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?) | |
1481 | TString powerFlag[2] = {"linear","quadratic"}; // to be improved (should I promote this to data members?) | |
1482 | ||
1483 | // a) Book profile to hold all flags for integrated flow: | |
1484 | TString intFlowFlagsName = "fIntFlowFlags"; | |
1485 | intFlowFlagsName += fAnalysisLabel->Data(); | |
0dd3b008 | 1486 | fIntFlowFlags = new TProfile(intFlowFlagsName.Data(),"Flags for Integrated Flow",11,0,11); |
489d5531 | 1487 | fIntFlowFlags->SetTickLength(-0.01,"Y"); |
1488 | fIntFlowFlags->SetMarkerStyle(25); | |
1489 | fIntFlowFlags->SetLabelSize(0.05); | |
1490 | fIntFlowFlags->SetLabelOffset(0.02,"Y"); | |
1491 | fIntFlowFlags->GetXaxis()->SetBinLabel(1,"Particle Weights"); | |
1492 | fIntFlowFlags->GetXaxis()->SetBinLabel(2,"Event Weights"); | |
1493 | fIntFlowFlags->GetXaxis()->SetBinLabel(3,"Corrected for NUA?"); | |
b3dacf6b | 1494 | fIntFlowFlags->GetXaxis()->SetBinLabel(4,"Print RF results"); |
489d5531 | 1495 | fIntFlowFlags->GetXaxis()->SetBinLabel(5,"Print RP results"); |
3b552efe | 1496 | fIntFlowFlags->GetXaxis()->SetBinLabel(6,"Print POI results"); |
b3dacf6b | 1497 | fIntFlowFlags->GetXaxis()->SetBinLabel(7,"Print RF (rebinned in M) results"); |
1498 | fIntFlowFlags->GetXaxis()->SetBinLabel(8,"Corrected for NUA vs M?"); | |
1499 | fIntFlowFlags->GetXaxis()->SetBinLabel(9,"Propagate errors to v_{n} from correlations?"); | |
1500 | fIntFlowFlags->GetXaxis()->SetBinLabel(10,"Calculate cumulants vs M"); | |
0dd3b008 | 1501 | fIntFlowFlags->GetXaxis()->SetBinLabel(11,"fMinimumBiasReferenceFlow"); |
489d5531 | 1502 | fIntFlowList->Add(fIntFlowFlags); |
1503 | ||
1504 | // b) Book event-by-event quantities: | |
1505 | // Re[Q_{m*n,k}], Im[Q_{m*n,k}] and S_{p,k}^M: | |
1506 | fReQ = new TMatrixD(4,9); | |
1507 | fImQ = new TMatrixD(4,9); | |
1508 | fSMpk = new TMatrixD(8,9); | |
1509 | // average correlations <2>, <4>, <6> and <8> for single event (bining is the same as in fIntFlowCorrelationsPro and fIntFlowCorrelationsHist): | |
1510 | TString intFlowCorrelationsEBEName = "fIntFlowCorrelationsEBE"; | |
1511 | intFlowCorrelationsEBEName += fAnalysisLabel->Data(); | |
1512 | fIntFlowCorrelationsEBE = new TH1D(intFlowCorrelationsEBEName.Data(),intFlowCorrelationsEBEName.Data(),4,0,4); | |
1513 | // weights for average correlations <2>, <4>, <6> and <8> for single event: | |
1514 | TString intFlowEventWeightsForCorrelationsEBEName = "fIntFlowEventWeightsForCorrelationsEBE"; | |
1515 | intFlowEventWeightsForCorrelationsEBEName += fAnalysisLabel->Data(); | |
1516 | fIntFlowEventWeightsForCorrelationsEBE = new TH1D(intFlowEventWeightsForCorrelationsEBEName.Data(),intFlowEventWeightsForCorrelationsEBEName.Data(),4,0,4); | |
1517 | // average all correlations for single event (bining is the same as in fIntFlowCorrelationsAllPro and fIntFlowCorrelationsAllHist): | |
1518 | TString intFlowCorrelationsAllEBEName = "fIntFlowCorrelationsAllEBE"; | |
1519 | intFlowCorrelationsAllEBEName += fAnalysisLabel->Data(); | |
1520 | fIntFlowCorrelationsAllEBE = new TH1D(intFlowCorrelationsAllEBEName.Data(),intFlowCorrelationsAllEBEName.Data(),32,0,32); | |
1521 | // average correction terms for non-uniform acceptance for single event | |
1522 | // (binning is the same as in fIntFlowCorrectionTermsForNUAPro[2] and fIntFlowCorrectionTermsForNUAHist[2]): | |
1523 | TString fIntFlowCorrectionTermsForNUAEBEName = "fIntFlowCorrectionTermsForNUAEBE"; | |
1524 | fIntFlowCorrectionTermsForNUAEBEName += fAnalysisLabel->Data(); | |
1525 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1526 | { | |
b92ea2b9 | 1527 | 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()),4,0,4); |
489d5531 | 1528 | } |
0328db2d | 1529 | // event weights for terms for non-uniform acceptance: |
1530 | TString fIntFlowEventWeightForCorrectionTermsForNUAEBEName = "fIntFlowEventWeightForCorrectionTermsForNUAEBE"; | |
1531 | fIntFlowEventWeightForCorrectionTermsForNUAEBEName += fAnalysisLabel->Data(); | |
1532 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1533 | { | |
b92ea2b9 | 1534 | 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()),4,0,4); // to be improved - 4 |
0328db2d | 1535 | } |
489d5531 | 1536 | // c) Book profiles: // to be improved (comment) |
1537 | // profile to hold average multiplicities and number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8: | |
1538 | TString avMultiplicityName = "fAvMultiplicity"; | |
1539 | avMultiplicityName += fAnalysisLabel->Data(); | |
1540 | fAvMultiplicity = new TProfile(avMultiplicityName.Data(),"Average Multiplicities of RPs",9,0,9); | |
1541 | fAvMultiplicity->SetTickLength(-0.01,"Y"); | |
1542 | fAvMultiplicity->SetMarkerStyle(25); | |
1543 | fAvMultiplicity->SetLabelSize(0.05); | |
1544 | fAvMultiplicity->SetLabelOffset(0.02,"Y"); | |
1545 | fAvMultiplicity->SetYTitle("Average Multiplicity"); | |
1546 | (fAvMultiplicity->GetXaxis())->SetBinLabel(1,"all evts"); | |
1547 | (fAvMultiplicity->GetXaxis())->SetBinLabel(2,"n_{RP} #geq 1"); | |
1548 | (fAvMultiplicity->GetXaxis())->SetBinLabel(3,"n_{RP} #geq 2"); | |
1549 | (fAvMultiplicity->GetXaxis())->SetBinLabel(4,"n_{RP} #geq 3"); | |
1550 | (fAvMultiplicity->GetXaxis())->SetBinLabel(5,"n_{RP} #geq 4"); | |
1551 | (fAvMultiplicity->GetXaxis())->SetBinLabel(6,"n_{RP} #geq 5"); | |
1552 | (fAvMultiplicity->GetXaxis())->SetBinLabel(7,"n_{RP} #geq 6"); | |
1553 | (fAvMultiplicity->GetXaxis())->SetBinLabel(8,"n_{RP} #geq 7"); | |
1554 | (fAvMultiplicity->GetXaxis())->SetBinLabel(9,"n_{RP} #geq 8"); | |
1555 | fIntFlowProfiles->Add(fAvMultiplicity); | |
1556 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with wrong errors!): | |
b3dacf6b | 1557 | TString correlationFlag[4] = {"<<2>>","<<4>>","<<6>>","<<8>>"}; |
489d5531 | 1558 | TString intFlowCorrelationsProName = "fIntFlowCorrelationsPro"; |
1559 | intFlowCorrelationsProName += fAnalysisLabel->Data(); | |
1560 | fIntFlowCorrelationsPro = new TProfile(intFlowCorrelationsProName.Data(),"Average correlations for all events",4,0,4,"s"); | |
1561 | fIntFlowCorrelationsPro->SetTickLength(-0.01,"Y"); | |
1562 | fIntFlowCorrelationsPro->SetMarkerStyle(25); | |
1563 | fIntFlowCorrelationsPro->SetLabelSize(0.06); | |
1564 | fIntFlowCorrelationsPro->SetLabelOffset(0.01,"Y"); | |
68a3b4b1 | 1565 | for(Int_t b=0;b<4;b++) |
b3dacf6b | 1566 | { |
68a3b4b1 | 1567 | (fIntFlowCorrelationsPro->GetXaxis())->SetBinLabel(b+1,correlationFlag[b].Data()); |
b3dacf6b | 1568 | } |
489d5531 | 1569 | fIntFlowProfiles->Add(fIntFlowCorrelationsPro); |
b3dacf6b | 1570 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> versus multiplicity for all events (with wrong errors): |
1571 | if(fCalculateCumulantsVsM) | |
1572 | { | |
1573 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
1574 | { | |
1575 | TString intFlowCorrelationsVsMProName = "fIntFlowCorrelationsVsMPro"; | |
1576 | intFlowCorrelationsVsMProName += fAnalysisLabel->Data(); | |
1577 | fIntFlowCorrelationsVsMPro[ci] = new TProfile(Form("%s, %s",intFlowCorrelationsVsMProName.Data(),correlationFlag[ci].Data()), | |
1578 | Form("%s vs multiplicity",correlationFlag[ci].Data()), | |
1579 | fnBinsMult,fMinMult,fMaxMult,"s"); | |
1580 | fIntFlowCorrelationsVsMPro[ci]->GetYaxis()->SetTitle(correlationFlag[ci].Data()); | |
1581 | fIntFlowCorrelationsVsMPro[ci]->GetXaxis()->SetTitle("M"); | |
1582 | fIntFlowProfiles->Add(fIntFlowCorrelationsVsMPro[ci]); | |
1583 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
1584 | } // end of if(fCalculateCumulantsVsM) | |
489d5531 | 1585 | // averaged all correlations for all events (with wrong errors!): |
1586 | TString intFlowCorrelationsAllProName = "fIntFlowCorrelationsAllPro"; | |
1587 | intFlowCorrelationsAllProName += fAnalysisLabel->Data(); | |
1588 | fIntFlowCorrelationsAllPro = new TProfile(intFlowCorrelationsAllProName.Data(),"Average correlations for all events",32,0,32,"s"); | |
1589 | fIntFlowCorrelationsAllPro->SetTickLength(-0.01,"Y"); | |
1590 | fIntFlowCorrelationsAllPro->SetMarkerStyle(25); | |
1591 | fIntFlowCorrelationsAllPro->SetLabelSize(0.03); | |
1592 | fIntFlowCorrelationsAllPro->SetLabelOffset(0.01,"Y"); | |
1593 | // 2-p correlations: | |
1594 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}"); | |
1595 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}"); | |
1596 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}"); | |
1597 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}"); | |
1598 | // 3-p correlations: | |
1599 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}"); | |
1600 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}"); | |
1601 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}"); | |
1602 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}"); | |
1603 | // 4-p correlations: | |
1604 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}"); | |
1605 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}"); | |
1606 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}"); | |
1607 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}"); | |
1608 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}"); | |
1609 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}"); | |
1610 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}"); | |
1611 | // 5-p correlations: | |
1612 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}"); | |
1613 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}"); | |
1614 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}"); | |
1615 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}"); | |
1616 | // 6-p correlations: | |
1617 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}"); | |
1618 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}"); | |
1619 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}"); | |
1620 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}"); | |
1621 | // 7-p correlations: | |
1622 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}"); | |
1623 | // 8-p correlations: | |
1624 | (fIntFlowCorrelationsAllPro->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}"); | |
1625 | fIntFlowProfiles->Add(fIntFlowCorrelationsAllPro); | |
1626 | // when particle weights are used some extra correlations appear: | |
1627 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
1628 | { | |
1629 | TString intFlowExtraCorrelationsProName = "fIntFlowExtraCorrelationsPro"; | |
1630 | intFlowExtraCorrelationsProName += fAnalysisLabel->Data(); | |
1631 | fIntFlowExtraCorrelationsPro = new TProfile(intFlowExtraCorrelationsProName.Data(),"Average extra correlations for all events",100,0,100,"s"); | |
1632 | fIntFlowExtraCorrelationsPro->SetTickLength(-0.01,"Y"); | |
1633 | fIntFlowExtraCorrelationsPro->SetMarkerStyle(25); | |
1634 | fIntFlowExtraCorrelationsPro->SetLabelSize(0.03); | |
1635 | fIntFlowExtraCorrelationsPro->SetLabelOffset(0.01,"Y"); | |
1636 | // extra 2-p correlations: | |
1637 | (fIntFlowExtraCorrelationsPro->GetXaxis())->SetBinLabel(1,"<<w1^3 w2 cos(n*(phi1-phi2))>>"); | |
1638 | (fIntFlowExtraCorrelationsPro->GetXaxis())->SetBinLabel(2,"<<w1 w2 w3^2 cos(n*(phi1-phi2))>>"); | |
1639 | fIntFlowProfiles->Add(fIntFlowExtraCorrelationsPro); | |
1640 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
1641 | // average product of correlations <2>, <4>, <6> and <8>: | |
b3dacf6b | 1642 | TString productFlag[6] = {"<<2><4>>","<<2><6>>","<<2><8>>","<<4><6>>","<<4><8>>","<<6><8>>"}; |
489d5531 | 1643 | TString intFlowProductOfCorrelationsProName = "fIntFlowProductOfCorrelationsPro"; |
1644 | intFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
1645 | fIntFlowProductOfCorrelationsPro = new TProfile(intFlowProductOfCorrelationsProName.Data(),"Average products of correlations",6,0,6); | |
1646 | fIntFlowProductOfCorrelationsPro->SetTickLength(-0.01,"Y"); | |
1647 | fIntFlowProductOfCorrelationsPro->SetMarkerStyle(25); | |
1648 | fIntFlowProductOfCorrelationsPro->SetLabelSize(0.05); | |
1649 | fIntFlowProductOfCorrelationsPro->SetLabelOffset(0.01,"Y"); | |
68a3b4b1 | 1650 | for(Int_t b=0;b<6;b++) |
b3dacf6b | 1651 | { |
68a3b4b1 | 1652 | (fIntFlowProductOfCorrelationsPro->GetXaxis())->SetBinLabel(b+1,productFlag[b].Data()); |
b3dacf6b | 1653 | } |
1654 | fIntFlowProfiles->Add(fIntFlowProductOfCorrelationsPro); | |
ff70ca91 | 1655 | // average product of correlations <2>, <4>, <6> and <8> versus multiplicity |
1656 | // [0=<<2><4>>,1=<<2><6>>,2=<<2><8>>,3=<<4><6>>,4=<<4><8>>,5=<<6><8>>] | |
b3dacf6b | 1657 | if(fCalculateCumulantsVsM) |
1658 | { | |
1659 | TString intFlowProductOfCorrelationsVsMProName = "fIntFlowProductOfCorrelationsVsMPro"; | |
1660 | intFlowProductOfCorrelationsVsMProName += fAnalysisLabel->Data(); | |
1661 | for(Int_t pi=0;pi<6;pi++) | |
1662 | { | |
1663 | fIntFlowProductOfCorrelationsVsMPro[pi] = new TProfile(Form("%s, %s",intFlowProductOfCorrelationsVsMProName.Data(),productFlag[pi].Data()), | |
1664 | Form("%s versus multiplicity",productFlag[pi].Data()), | |
1665 | fnBinsMult,fMinMult,fMaxMult); | |
1666 | fIntFlowProductOfCorrelationsVsMPro[pi]->GetXaxis()->SetTitle("M"); | |
1667 | fIntFlowProfiles->Add(fIntFlowProductOfCorrelationsVsMPro[pi]); | |
1668 | } // end of for(Int_t pi=0;pi<6;pi++) | |
1669 | } // end of if(fCalculateCumulantsVsM) | |
0328db2d | 1670 | // average product of correction terms for NUA: |
1671 | TString intFlowProductOfCorrectionTermsForNUAProName = "fIntFlowProductOfCorrectionTermsForNUAPro"; | |
1672 | intFlowProductOfCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
1673 | fIntFlowProductOfCorrectionTermsForNUAPro = new TProfile(intFlowProductOfCorrectionTermsForNUAProName.Data(),"Average products of correction terms for NUA",27,0,27); | |
1674 | fIntFlowProductOfCorrectionTermsForNUAPro->SetTickLength(-0.01,"Y"); | |
1675 | fIntFlowProductOfCorrectionTermsForNUAPro->SetMarkerStyle(25); | |
1676 | fIntFlowProductOfCorrectionTermsForNUAPro->SetLabelSize(0.05); | |
1677 | fIntFlowProductOfCorrectionTermsForNUAPro->SetLabelOffset(0.01,"Y"); | |
1678 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(1,"<<2><cos(#phi)>>"); | |
1679 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(2,"<<2><sin(#phi)>>"); | |
1680 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(3,"<<cos(#phi)><sin(#phi)>>"); | |
1681 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(4,"Cov(<2>,<cos(#phi_{1}+#phi_{2})>)"); | |
1682 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(5,"Cov(<2>,<sin(#phi_{1}+#phi_{2})>)"); | |
1683 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(6,"Cov(<2>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1684 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(7,"Cov(<2>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1685 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(8,"Cov(<4>,<cos(#phi)>)"); | |
1686 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(9,"Cov(<4>,<sin(#phi)>)"); | |
1687 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(10,"Cov(<4>,<cos(#phi_{1}+#phi_{2})>)"); | |
1688 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(11,"Cov(<4>,<sin(#phi_{1}+#phi_{2})>)"); | |
1689 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(12,"Cov(<4>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>>)"); | |
1690 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(13,"Cov(<4>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>>)"); | |
1691 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(14,"Cov(<cos(#phi)>,<cos(#phi_{1}+#phi_{2})>)"); | |
1692 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(15,"Cov(<cos(#phi)>,<sin(#phi_{1}+#phi_{2})>)"); | |
1693 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(16,"Cov(<cos(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1694 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(17,"Cov(<cos(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1695 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(18,"Cov(<sin(#phi)>,<cos(#phi_{1}+#phi_{2})>)"); | |
1696 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(19,"Cov(<sin(#phi)>,<sin(#phi_{1}+#phi_{2})>)"); | |
1697 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(20,"Cov(<sin(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1698 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(21,"Cov(<sin(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1699 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(22,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}+#phi_{2})>)"); | |
1700 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(23,"Cov(<cos(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1701 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(24,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1702 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(25,"Cov(<sin(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1703 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(26,"Cov(<sin(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1704 | (fIntFlowProductOfCorrectionTermsForNUAPro->GetXaxis())->SetBinLabel(27,"Cov(<cos(#phi_{1}-#phi_{2}-#phi_{3}>,<sin(#phi_{1}-#phi_{2}-#phi_{3}>)"); | |
1705 | fIntFlowProfiles->Add(fIntFlowProductOfCorrectionTermsForNUAPro); | |
489d5531 | 1706 | // average correction terms for non-uniform acceptance (with wrong errors!): |
1707 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1708 | { | |
1709 | TString intFlowCorrectionTermsForNUAProName = "fIntFlowCorrectionTermsForNUAPro"; | |
1710 | intFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
b92ea2b9 | 1711 | 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()),4,0,4,"s"); |
489d5531 | 1712 | fIntFlowCorrectionTermsForNUAPro[sc]->SetTickLength(-0.01,"Y"); |
1713 | fIntFlowCorrectionTermsForNUAPro[sc]->SetMarkerStyle(25); | |
1714 | fIntFlowCorrectionTermsForNUAPro[sc]->SetLabelSize(0.03); | |
1715 | fIntFlowCorrectionTermsForNUAPro[sc]->SetLabelOffset(0.01,"Y"); | |
b92ea2b9 | 1716 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(1,Form("#LT#LT%s(n(phi1))#GT#GT",sinCosFlag[sc].Data())); |
1717 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(2,Form("#LT#LT%s(n(phi1+phi2))#GT#GT",sinCosFlag[sc].Data())); | |
1718 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(3,Form("#LT#LT%s(n(phi1-phi2-phi3))#GT#GT",sinCosFlag[sc].Data())); | |
1719 | (fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->SetBinLabel(4,Form("#LT#LT%s(n(2phi1-phi2))#GT#GT",sinCosFlag[sc].Data())); | |
489d5531 | 1720 | fIntFlowProfiles->Add(fIntFlowCorrectionTermsForNUAPro[sc]); |
2001bc3a | 1721 | // versus multiplicity: |
b3dacf6b | 1722 | if(fCalculateCumulantsVsM) |
1723 | { | |
1724 | TString correctionTermFlag[4] = {"(n(phi1))","(n(phi1+phi2))","(n(phi1-phi2-phi3))","(n(2phi1-phi2))"}; // to be improved - hardwired 4 | |
1725 | for(Int_t ci=0;ci<4;ci++) // correction term index (to be improved - hardwired 4) | |
1726 | { | |
1727 | TString intFlowCorrectionTermsForNUAVsMProName = "fIntFlowCorrectionTermsForNUAVsMPro"; | |
1728 | intFlowCorrectionTermsForNUAVsMProName += fAnalysisLabel->Data(); | |
1729 | 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,"s"); | |
1730 | fIntFlowProfiles->Add(fIntFlowCorrectionTermsForNUAVsMPro[sc][ci]); | |
1731 | } | |
1732 | } // end of if(fCalculateCumulantsVsM) | |
489d5531 | 1733 | } // end of for(Int_t sc=0;sc<2;sc++) |
1734 | ||
1735 | // d) Book histograms holding the final results: | |
1736 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with correct errors!): | |
1737 | TString intFlowCorrelationsHistName = "fIntFlowCorrelationsHist"; | |
1738 | intFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
1739 | fIntFlowCorrelationsHist = new TH1D(intFlowCorrelationsHistName.Data(),"Average correlations for all events",4,0,4); | |
1740 | fIntFlowCorrelationsHist->SetTickLength(-0.01,"Y"); | |
1741 | fIntFlowCorrelationsHist->SetMarkerStyle(25); | |
1742 | fIntFlowCorrelationsHist->SetLabelSize(0.06); | |
1743 | fIntFlowCorrelationsHist->SetLabelOffset(0.01,"Y"); | |
1744 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(1,"<<2>>"); | |
1745 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(2,"<<4>>"); | |
1746 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(3,"<<6>>"); | |
1747 | (fIntFlowCorrelationsHist->GetXaxis())->SetBinLabel(4,"<<8>>"); | |
1748 | fIntFlowResults->Add(fIntFlowCorrelationsHist); | |
ff70ca91 | 1749 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> for all events (with correct errors!) vs M: |
b3dacf6b | 1750 | if(fCalculateCumulantsVsM) |
1751 | { | |
1752 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
1753 | { | |
1754 | TString intFlowCorrelationsVsMHistName = "fIntFlowCorrelationsVsMHist"; | |
1755 | intFlowCorrelationsVsMHistName += fAnalysisLabel->Data(); | |
1756 | fIntFlowCorrelationsVsMHist[ci] = new TH1D(Form("%s, %s",intFlowCorrelationsVsMHistName.Data(),correlationFlag[ci].Data()), | |
1757 | Form("%s vs multiplicity",correlationFlag[ci].Data()), | |
1758 | fnBinsMult,fMinMult,fMaxMult); | |
1759 | fIntFlowCorrelationsVsMHist[ci]->GetYaxis()->SetTitle(correlationFlag[ci].Data()); | |
1760 | fIntFlowCorrelationsVsMHist[ci]->GetXaxis()->SetTitle("M"); | |
1761 | fIntFlowResults->Add(fIntFlowCorrelationsVsMHist[ci]); | |
1762 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
1763 | } // end of if(fCalculateCumulantsVsM) | |
489d5531 | 1764 | // average all correlations for all events (with correct errors!): |
1765 | TString intFlowCorrelationsAllHistName = "fIntFlowCorrelationsAllHist"; | |
1766 | intFlowCorrelationsAllHistName += fAnalysisLabel->Data(); | |
1767 | fIntFlowCorrelationsAllHist = new TH1D(intFlowCorrelationsAllHistName.Data(),"Average correlations for all events",32,0,32); | |
1768 | fIntFlowCorrelationsAllHist->SetTickLength(-0.01,"Y"); | |
1769 | fIntFlowCorrelationsAllHist->SetMarkerStyle(25); | |
1770 | fIntFlowCorrelationsAllHist->SetLabelSize(0.03); | |
1771 | fIntFlowCorrelationsAllHist->SetLabelOffset(0.01,"Y"); | |
1772 | // 2-p correlations: | |
1773 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(1,"<<2>>_{n|n}"); | |
1774 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(2,"<<2>>_{2n|2n}"); | |
1775 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(3,"<<2>>_{3n|3n}"); | |
1776 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(4,"<<2>>_{4n|4n}"); | |
1777 | // 3-p correlations: | |
1778 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(6,"<<3>>_{2n|n,n}"); | |
1779 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(7,"<<3>>_{3n|2n,n}"); | |
1780 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(8,"<<3>>_{4n|2n,2n}"); | |
1781 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(9,"<<3>>_{4n|3n,n}"); | |
1782 | // 4-p correlations: | |
1783 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(11,"<<4>>_{n,n|n,n}"); | |
1784 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(12,"<<4>>_{2n,n|2n,n}"); | |
1785 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(13,"<<4>>_{2n,2n|2n,2n}"); | |
1786 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(14,"<<4>>_{3n|n,n,n}"); | |
1787 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(15,"<<4>>_{3n,n|3n,n}"); | |
1788 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(16,"<<4>>_{3n,n|2n,2n}"); | |
1789 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(17,"<<4>>_{4n|2n,n,n}"); | |
1790 | // 5-p correlations: | |
1791 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(19,"<<5>>_{2n|n,n,n,n}"); | |
1792 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(20,"<<5>>_{2n,2n|2n,n,n}"); | |
1793 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(21,"<<5>>_{3n,n|2n,n,n}"); | |
1794 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(22,"<<5>>_{4n|n,n,n,n}"); | |
1795 | // 6-p correlations: | |
1796 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(24,"<<6>>_{n,n,n|n,n,n}"); | |
1797 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(25,"<<6>>_{2n,n,n|2n,n,n}"); | |
1798 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(26,"<<6>>_{2n,2n|n,n,n,n}"); | |
1799 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(27,"<<6>>_{3n,n|n,n,n,n}"); | |
1800 | // 7-p correlations: | |
1801 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(29,"<<7>>_{2n,n,n|n,n,n,n}"); | |
1802 | // 8-p correlations: | |
1803 | (fIntFlowCorrelationsAllHist->GetXaxis())->SetBinLabel(31,"<<8>>_{n,n,n,n|n,n,n,n}"); | |
1804 | fIntFlowResults->Add(fIntFlowCorrelationsAllHist); | |
1805 | // average correction terms for non-uniform acceptance (with correct errors!): | |
1806 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
1807 | { | |
1808 | TString intFlowCorrectionTermsForNUAHistName = "fIntFlowCorrectionTermsForNUAHist"; | |
1809 | intFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
b92ea2b9 | 1810 | 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()),4,0,4); |
489d5531 | 1811 | fIntFlowCorrectionTermsForNUAHist[sc]->SetTickLength(-0.01,"Y"); |
1812 | fIntFlowCorrectionTermsForNUAHist[sc]->SetMarkerStyle(25); | |
1813 | fIntFlowCorrectionTermsForNUAHist[sc]->SetLabelSize(0.03); | |
1814 | fIntFlowCorrectionTermsForNUAHist[sc]->SetLabelOffset(0.01,"Y"); | |
b92ea2b9 | 1815 | (fIntFlowCorrectionTermsForNUAHist[sc]->GetXaxis())->SetBinLabel(1,Form("#LT#LT%s(n(#phi_{1}))#GT#GT",sinCosFlag[sc].Data())); |
1816 | (fIntFlowCorrectionTermsForNUAHist[sc]->GetXaxis())->SetBinLabel(2,Form("#LT#LT%s(n(phi1+phi2))#GT#GT",sinCosFlag[sc].Data())); | |
1817 | (fIntFlowCorrectionTermsForNUAHist[sc]->GetXaxis())->SetBinLabel(3,Form("#LT#LT%s(n(phi1-phi2-phi3))#GT#GT",sinCosFlag[sc].Data())); | |
1818 | (fIntFlowCorrectionTermsForNUAHist[sc]->GetXaxis())->SetBinLabel(4,Form("#LT#LT%s(n(2phi1-phi2))#GT#GT",sinCosFlag[sc].Data())); | |
489d5531 | 1819 | fIntFlowResults->Add(fIntFlowCorrectionTermsForNUAHist[sc]); |
1820 | } // end of for(Int_t sc=0;sc<2;sc++) | |
1821 | // covariances (multiplied with weight dependent prefactor): | |
1822 | TString intFlowCovariancesName = "fIntFlowCovariances"; | |
1823 | intFlowCovariancesName += fAnalysisLabel->Data(); | |
1824 | fIntFlowCovariances = new TH1D(intFlowCovariancesName.Data(),"Covariances (multiplied with weight dependent prefactor)",6,0,6); | |
1825 | fIntFlowCovariances->SetLabelSize(0.04); | |
1826 | fIntFlowCovariances->SetMarkerStyle(25); | |
1827 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(1,"Cov(<2>,<4>)"); | |
1828 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(2,"Cov(<2>,<6>)"); | |
1829 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(3,"Cov(<2>,<8>)"); | |
1830 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(4,"Cov(<4>,<6>)"); | |
1831 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(5,"Cov(<4>,<8>)"); | |
1832 | (fIntFlowCovariances->GetXaxis())->SetBinLabel(6,"Cov(<6>,<8>)"); | |
1833 | fIntFlowResults->Add(fIntFlowCovariances); | |
1834 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>: | |
1835 | TString intFlowSumOfEventWeightsName = "fIntFlowSumOfEventWeights"; | |
1836 | intFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
1837 | for(Int_t power=0;power<2;power++) | |
1838 | { | |
1839 | 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); | |
1840 | fIntFlowSumOfEventWeights[power]->SetLabelSize(0.05); | |
1841 | fIntFlowSumOfEventWeights[power]->SetMarkerStyle(25); | |
1842 | if(power == 0) | |
1843 | { | |
1844 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>}"); | |
1845 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<4>}"); | |
1846 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<6>}"); | |
1847 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<8>}"); | |
1848 | } else if (power == 1) | |
1849 | { | |
1850 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>}^{2}"); | |
1851 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<4>}^{2}"); | |
1852 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<6>}^{2}"); | |
1853 | (fIntFlowSumOfEventWeights[power]->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<8>}^{2}"); | |
1854 | } | |
1855 | fIntFlowResults->Add(fIntFlowSumOfEventWeights[power]); | |
1856 | } | |
1857 | // sum of products of event weights for correlations <2>, <4>, <6> and <8>: | |
1858 | TString intFlowSumOfProductOfEventWeightsName = "fIntFlowSumOfProductOfEventWeights"; | |
1859 | intFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
1860 | fIntFlowSumOfProductOfEventWeights = new TH1D(intFlowSumOfProductOfEventWeightsName.Data(),"Sum of product of event weights for correlations",6,0,6); | |
1861 | fIntFlowSumOfProductOfEventWeights->SetLabelSize(0.05); | |
1862 | fIntFlowSumOfProductOfEventWeights->SetMarkerStyle(25); | |
1863 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>} w_{<4>}"); | |
1864 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<2>} w_{<6>}"); | |
1865 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<2>} w_{<8>}"); | |
1866 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(4,"#sum_{i=1}^{N} w_{<4>} w_{<6>}"); | |
1867 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(5,"#sum_{i=1}^{N} w_{<4>} w_{<8>}"); | |
1868 | (fIntFlowSumOfProductOfEventWeights->GetXaxis())->SetBinLabel(6,"#sum_{i=1}^{N} w_{<6>} w_{<8>}"); | |
1869 | fIntFlowResults->Add(fIntFlowSumOfProductOfEventWeights); | |
ff70ca91 | 1870 | // final result for covariances of correlations (multiplied with weight dependent prefactor) versus M |
1871 | // [0=Cov(2,4),1=Cov(2,6),2=Cov(2,8),3=Cov(4,6),4=Cov(4,8),5=Cov(6,8)]: | |
b3dacf6b | 1872 | if(fCalculateCumulantsVsM) |
ff70ca91 | 1873 | { |
b3dacf6b | 1874 | TString intFlowCovariancesVsMName = "fIntFlowCovariancesVsM"; |
1875 | intFlowCovariancesVsMName += fAnalysisLabel->Data(); | |
1876 | TString covarianceFlag[6] = {"Cov(<2>,<4>)","Cov(<2>,<6>)","Cov(<2>,<8>)","Cov(<4>,<6>)","Cov(<4>,<8>)","Cov(<6>,<8>)"}; | |
1877 | for(Int_t ci=0;ci<6;ci++) | |
1878 | { | |
1879 | fIntFlowCovariancesVsM[ci] = new TH1D(Form("%s, %s",intFlowCovariancesVsMName.Data(),covarianceFlag[ci].Data()), | |
1880 | Form("%s vs multiplicity",covarianceFlag[ci].Data()), | |
1881 | fnBinsMult,fMinMult,fMaxMult); | |
1882 | fIntFlowCovariancesVsM[ci]->GetYaxis()->SetTitle(covarianceFlag[ci].Data()); | |
1883 | fIntFlowCovariancesVsM[ci]->GetXaxis()->SetTitle("M"); | |
1884 | fIntFlowResults->Add(fIntFlowCovariancesVsM[ci]); | |
1885 | } | |
1886 | } // end of if(fCalculateCumulantsVsM) | |
ff70ca91 | 1887 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8> versus multiplicity |
1888 | // [0=sum{w_{<2>}},1=sum{w_{<4>}},2=sum{w_{<6>}},3=sum{w_{<8>}}][0=linear 1,1=quadratic]: | |
b3dacf6b | 1889 | if(fCalculateCumulantsVsM) |
ff70ca91 | 1890 | { |
b3dacf6b | 1891 | TString intFlowSumOfEventWeightsVsMName = "fIntFlowSumOfEventWeightsVsM"; |
1892 | intFlowSumOfEventWeightsVsMName += fAnalysisLabel->Data(); | |
1893 | 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>}"}, | |
1894 | {"#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}"}}; | |
1895 | for(Int_t si=0;si<4;si++) | |
ff70ca91 | 1896 | { |
b3dacf6b | 1897 | for(Int_t power=0;power<2;power++) |
1898 | { | |
1899 | fIntFlowSumOfEventWeightsVsM[si][power] = new TH1D(Form("%s, %s",intFlowSumOfEventWeightsVsMName.Data(),sumFlag[power][si].Data()), | |
1900 | Form("%s vs multiplicity",sumFlag[power][si].Data()), | |
1901 | fnBinsMult,fMinMult,fMaxMult); | |
1902 | fIntFlowSumOfEventWeightsVsM[si][power]->GetYaxis()->SetTitle(sumFlag[power][si].Data()); | |
1903 | fIntFlowSumOfEventWeightsVsM[si][power]->GetXaxis()->SetTitle("M"); | |
1904 | fIntFlowResults->Add(fIntFlowSumOfEventWeightsVsM[si][power]); | |
1905 | } // end of for(Int_t power=0;power<2;power++) | |
1906 | } // end of for(Int_t si=0;si<4;si++) | |
1907 | } // end of if(fCalculateCumulantsVsM) | |
ff70ca91 | 1908 | // sum of products of event weights for correlations <2>, <4>, <6> and <8> vs M |
1909 | // [0=sum{w_{<2>}w_{<4>}},1=sum{w_{<2>}w_{<6>}},2=sum{w_{<2>}w_{<8>}}, | |
1910 | // 3=sum{w_{<4>}w_{<6>}},4=sum{w_{<4>}w_{<8>}},5=sum{w_{<6>}w_{<8>}}]: | |
b3dacf6b | 1911 | if(fCalculateCumulantsVsM) |
1912 | { | |
1913 | TString intFlowSumOfProductOfEventWeightsVsMName = "fIntFlowSumOfProductOfEventWeightsVsM"; | |
1914 | intFlowSumOfProductOfEventWeightsVsMName += fAnalysisLabel->Data(); | |
1915 | 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>}", | |
1916 | "#sum_{i=1}^{N} w_{<4>} w_{<6>}","#sum_{i=1}^{N} w_{<4>} w_{<8>}","#sum_{i=1}^{N} w_{<6>} w_{<8>}"}; | |
1917 | for(Int_t pi=0;pi<6;pi++) | |
1918 | { | |
1919 | fIntFlowSumOfProductOfEventWeightsVsM[pi] = new TH1D(Form("%s, %s",intFlowSumOfProductOfEventWeightsVsMName.Data(),sopowFlag[pi].Data()), | |
1920 | Form("%s versus multiplicity",sopowFlag[pi].Data()), | |
1921 | fnBinsMult,fMinMult,fMaxMult); | |
1922 | fIntFlowSumOfProductOfEventWeightsVsM[pi]->GetXaxis()->SetTitle("M"); | |
1923 | fIntFlowSumOfProductOfEventWeightsVsM[pi]->GetYaxis()->SetTitle(sopowFlag[pi].Data()); | |
1924 | fIntFlowResults->Add(fIntFlowSumOfProductOfEventWeightsVsM[pi]); | |
1925 | } // end of for(Int_t pi=0;pi<6;pi++) | |
1926 | } // end of if(fCalculateCumulantsVsM) | |
0328db2d | 1927 | // covariances of NUA terms (multiplied with weight dependent prefactor): |
1928 | TString intFlowCovariancesNUAName = "fIntFlowCovariancesNUA"; | |
1929 | intFlowCovariancesNUAName += fAnalysisLabel->Data(); | |
1930 | fIntFlowCovariancesNUA = new TH1D(intFlowCovariancesNUAName.Data(),"Covariances for NUA (multiplied with weight dependent prefactor)",27,0,27); | |
1931 | fIntFlowCovariancesNUA->SetLabelSize(0.04); | |
1932 | fIntFlowCovariancesNUA->SetMarkerStyle(25); | |
1933 | fIntFlowCovariancesNUA->GetXaxis()->SetLabelSize(0.02); | |
1934 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(1,"Cov(<2>,<cos(#phi)>"); | |
1935 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(2,"Cov(<2>,<sin(#phi)>)"); | |
1936 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(3,"Cov(<cos(#phi)>,<sin(#phi)>)"); | |
1937 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(4,"Cov(<2>,<cos(#phi_{1}+#phi_{2})>)"); | |
1938 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(5,"Cov(<2>,<sin(#phi_{1}+#phi_{2})>)"); | |
1939 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(6,"Cov(<2>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1940 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(7,"Cov(<2>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1941 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(8,"Cov(<4>,<cos(#phi)>)"); | |
1942 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(9,"Cov(<4>,<sin(#phi)>)"); | |
1943 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(10,"Cov(<4>,<cos(#phi_{1}+#phi_{2})>)"); | |
1944 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(11,"Cov(<4>,<sin(#phi_{1}+#phi_{2})>)"); | |
1945 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(12,"Cov(<4>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>>)"); | |
1946 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(13,"Cov(<4>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>>)"); | |
1947 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(14,"Cov(<cos(#phi)>,<cos(#phi_{1}+#phi_{2})>)"); | |
1948 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(15,"Cov(<cos(#phi)>,<sin(#phi_{1}+#phi_{2})>)"); | |
1949 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(16,"Cov(<cos(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1950 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(17,"Cov(<cos(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1951 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(18,"Cov(<sin(#phi)>,<cos(#phi_{1}+#phi_{2})>)"); | |
1952 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(19,"Cov(<sin(#phi)>,<sin(#phi_{1}+#phi_{2})>)"); | |
1953 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(20,"Cov(<sin(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1954 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(21,"Cov(<sin(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1955 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(22,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}+#phi_{2})>)"); | |
1956 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(23,"Cov(<cos(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1957 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(24,"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1958 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(25,"Cov(<sin(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1959 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(26,"Cov(<sin(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)"); | |
1960 | (fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(27,"Cov(<cos(#phi_{1}-#phi_{2}-#phi_{3}>,<sin(#phi_{1}-#phi_{2}-#phi_{3}>)"); | |
1961 | fIntFlowResults->Add(fIntFlowCovariancesNUA); | |
1962 | // sum of linear and quadratic event weights for NUA terms: | |
1963 | TString intFlowSumOfEventWeightsNUAName = "fIntFlowSumOfEventWeightsNUA"; | |
1964 | intFlowSumOfEventWeightsNUAName += fAnalysisLabel->Data(); | |
1965 | for(Int_t sc=0;sc<2;sc++) | |
1966 | { | |
1967 | for(Int_t power=0;power<2;power++) | |
1968 | { | |
b92ea2b9 | 1969 | 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()),4,0,4); // to be improved - 4 |
0328db2d | 1970 | fIntFlowSumOfEventWeightsNUA[sc][power]->SetLabelSize(0.05); |
1971 | fIntFlowSumOfEventWeightsNUA[sc][power]->SetMarkerStyle(25); | |
1972 | if(power == 0) | |
1973 | { | |
1974 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(1,Form("#sum_{i=1}^{N} w_{<%s(#phi)>}",sinCosFlag[sc].Data())); | |
1975 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(2,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}+#phi_{2})>}",sinCosFlag[sc].Data())); | |
b92ea2b9 | 1976 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(3,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}-#phi_{2}-#phi_{3})>}",sinCosFlag[sc].Data())); |
1977 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(4,Form("#sum_{i=1}^{N} w_{<%s(2#phi_{1}-#phi_{2})>}",sinCosFlag[sc].Data())); | |
0328db2d | 1978 | } else if(power == 1) |
1979 | { | |
1980 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(1,Form("#sum_{i=1}^{N} w_{<%s(#phi)>}^{2}",sinCosFlag[sc].Data())); | |
1981 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(2,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}+#phi_{2})>}^{2}",sinCosFlag[sc].Data())); | |
1982 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(3,Form("#sum_{i=1}^{N} w_{<%s(#phi_{1}-#phi_{2}-#phi_{3})>}^{2}",sinCosFlag[sc].Data())); | |
b92ea2b9 | 1983 | (fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(4,Form("#sum_{i=1}^{N} w_{<%s(2#phi_{1}-#phi_{2})>}^{2}",sinCosFlag[sc].Data())); |
0328db2d | 1984 | } |
1985 | fIntFlowResults->Add(fIntFlowSumOfEventWeightsNUA[sc][power]); | |
1986 | } | |
1987 | } | |
1988 | // sum of products of event weights for NUA terms: | |
1989 | TString intFlowSumOfProductOfEventWeightsNUAName = "fIntFlowSumOfProductOfEventWeightsNUA"; | |
1990 | intFlowSumOfProductOfEventWeightsNUAName += fAnalysisLabel->Data(); | |
1991 | fIntFlowSumOfProductOfEventWeightsNUA = new TH1D(intFlowSumOfProductOfEventWeightsNUAName.Data(),"Sum of product of event weights for NUA terms",27,0,27); | |
1992 | fIntFlowSumOfProductOfEventWeightsNUA->SetLabelSize(0.05); | |
1993 | fIntFlowSumOfProductOfEventWeightsNUA->SetMarkerStyle(25); | |
1994 | (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(1,"#sum_{i=1}^{N} w_{<2>} w_{<cos(#phi)>}"); | |
1995 | (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(2,"#sum_{i=1}^{N} w_{<2>} w_{<sin(#phi)>}"); | |
1996 | (fIntFlowSumOfProductOfEventWeightsNUA->GetXaxis())->SetBinLabel(3,"#sum_{i=1}^{N} w_{<cos(#phi)>} w_{<sin(#phi)>}"); | |
1997 | // .... | |
1998 | // to be improved - add labels for remaining bins | |
1999 | // .... | |
2000 | fIntFlowResults->Add(fIntFlowSumOfProductOfEventWeightsNUA); | |
b3dacf6b | 2001 | // Final results for reference Q-cumulants: |
2002 | TString cumulantFlag[4] = {"QC{2}","QC{4}","QC{6}","QC{8}"}; | |
489d5531 | 2003 | TString intFlowQcumulantsName = "fIntFlowQcumulants"; |
2004 | intFlowQcumulantsName += fAnalysisLabel->Data(); | |
b92ea2b9 | 2005 | fIntFlowQcumulants = new TH1D(intFlowQcumulantsName.Data(),"Reference Q-cumulants",4,0,4); |
b77b6434 | 2006 | if(fPropagateErrorAlsoFromNIT) |
b92ea2b9 | 2007 | { |
b77b6434 | 2008 | fIntFlowQcumulants->SetTitle("Reference Q-cumulants (error from non-isotropic terms also propagated)"); |
b92ea2b9 | 2009 | } |
489d5531 | 2010 | fIntFlowQcumulants->SetLabelSize(0.05); |
2011 | fIntFlowQcumulants->SetMarkerStyle(25); | |
68a3b4b1 | 2012 | for(Int_t b=0;b<4;b++) |
b3dacf6b | 2013 | { |
68a3b4b1 | 2014 | (fIntFlowQcumulants->GetXaxis())->SetBinLabel(b+1,cumulantFlag[b].Data()); |
b3dacf6b | 2015 | } |
489d5531 | 2016 | fIntFlowResults->Add(fIntFlowQcumulants); |
b3dacf6b | 2017 | // Final results for reference Q-cumulants rebinned in M: |
2018 | if(fCalculateCumulantsVsM) | |
2019 | { | |
2020 | TString intFlowQcumulantsRebinnedInMName = "fIntFlowQcumulantsRebinnedInM"; | |
2021 | intFlowQcumulantsRebinnedInMName += fAnalysisLabel->Data(); | |
2022 | fIntFlowQcumulantsRebinnedInM = new TH1D(intFlowQcumulantsRebinnedInMName.Data(),"Reference Q-cumulants rebinned in M",4,0,4); | |
2023 | fIntFlowQcumulantsRebinnedInM->SetLabelSize(0.05); | |
2024 | fIntFlowQcumulantsRebinnedInM->SetMarkerStyle(25); | |
68a3b4b1 | 2025 | for(Int_t b=0;b<4;b++) |
b3dacf6b | 2026 | { |
68a3b4b1 | 2027 | (fIntFlowQcumulantsRebinnedInM->GetXaxis())->SetBinLabel(b+1,cumulantFlag[b].Data()); |
b3dacf6b | 2028 | } |
2029 | fIntFlowResults->Add(fIntFlowQcumulantsRebinnedInM); | |
2030 | } // end of if(fCalculateCumulantsVsM) | |
b92ea2b9 | 2031 | // Ratio between error squared: with/without non-isotropic terms: |
2032 | TString intFlowQcumulantsErrorSquaredRatioName = "fIntFlowQcumulantsErrorSquaredRatio"; | |
2033 | intFlowQcumulantsErrorSquaredRatioName += fAnalysisLabel->Data(); | |
2034 | fIntFlowQcumulantsErrorSquaredRatio = new TH1D(intFlowQcumulantsErrorSquaredRatioName.Data(),"Error squared of reference Q-cumulants: #frac{with NUA terms}{without NUA terms}",4,0,4); | |
2035 | fIntFlowQcumulantsErrorSquaredRatio->SetLabelSize(0.05); | |
2036 | fIntFlowQcumulantsErrorSquaredRatio->SetMarkerStyle(25); | |
2037 | for(Int_t b=0;b<4;b++) | |
2038 | { | |
2039 | (fIntFlowQcumulantsErrorSquaredRatio->GetXaxis())->SetBinLabel(b+1,cumulantFlag[b].Data()); | |
2040 | } | |
2041 | fIntFlowResults->Add(fIntFlowQcumulantsErrorSquaredRatio); | |
ff70ca91 | 2042 | // final results for integrated Q-cumulants versus multiplicity: |
b3dacf6b | 2043 | if(fCalculateCumulantsVsM) |
2044 | { | |
2045 | TString intFlowQcumulantsVsMName = "fIntFlowQcumulantsVsM"; | |
2046 | intFlowQcumulantsVsMName += fAnalysisLabel->Data(); | |
2047 | for(Int_t co=0;co<4;co++) // cumulant order | |
2048 | { | |
2049 | fIntFlowQcumulantsVsM[co] = new TH1D(Form("%s, %s",intFlowQcumulantsVsMName.Data(),cumulantFlag[co].Data()), | |
2050 | Form("%s vs multipicity",cumulantFlag[co].Data()), | |
2051 | fnBinsMult,fMinMult,fMaxMult); | |
2052 | fIntFlowQcumulantsVsM[co]->GetXaxis()->SetTitle("M"); | |
2053 | fIntFlowQcumulantsVsM[co]->GetYaxis()->SetTitle(cumulantFlag[co].Data()); | |
2054 | fIntFlowResults->Add(fIntFlowQcumulantsVsM[co]); | |
2055 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
2056 | } // end of if(fCalculateCumulantsVsM) | |
489d5531 | 2057 | // final integrated flow estimates from Q-cumulants: |
b3dacf6b | 2058 | TString flowFlag[4] = {Form("v_{%d}{2,QC}",fHarmonic),Form("v_{%d}{4,QC}",fHarmonic),Form("v_{%d}{6,QC}",fHarmonic),Form("v_{%d}{8,QC}",fHarmonic)}; |
489d5531 | 2059 | TString intFlowName = "fIntFlow"; |
2060 | intFlowName += fAnalysisLabel->Data(); | |
2061 | // integrated flow from Q-cumulants: | |
b3dacf6b | 2062 | fIntFlow = new TH1D(intFlowName.Data(),"Reference flow estimates from Q-cumulants",4,0,4); |
489d5531 | 2063 | fIntFlow->SetLabelSize(0.05); |
2064 | fIntFlow->SetMarkerStyle(25); | |
68a3b4b1 | 2065 | for(Int_t b=0;b<4;b++) |
b3dacf6b | 2066 | { |
68a3b4b1 | 2067 | (fIntFlow->GetXaxis())->SetBinLabel(b+1,flowFlag[b].Data()); |
b3dacf6b | 2068 | } |
ff70ca91 | 2069 | fIntFlowResults->Add(fIntFlow); |
b3dacf6b | 2070 | // Reference flow vs M rebinned in one huge bin: |
2071 | if(fCalculateCumulantsVsM) | |
2072 | { | |
2073 | TString intFlowRebinnedInMName = "fIntFlowRebinnedInM"; | |
2074 | intFlowRebinnedInMName += fAnalysisLabel->Data(); | |
2075 | fIntFlowRebinnedInM = new TH1D(intFlowRebinnedInMName.Data(),"Reference flow estimates from Q-cumulants (rebinned in M)",4,0,4); | |
2076 | fIntFlowRebinnedInM->SetLabelSize(0.05); | |
2077 | fIntFlowRebinnedInM->SetMarkerStyle(25); | |
68a3b4b1 | 2078 | for(Int_t b=0;b<4;b++) |
b3dacf6b | 2079 | { |
68a3b4b1 | 2080 | (fIntFlowRebinnedInM->GetXaxis())->SetBinLabel(b+1,flowFlag[b].Data()); |
b3dacf6b | 2081 | } |
2082 | fIntFlowResults->Add(fIntFlowRebinnedInM); | |
2083 | } | |
ff70ca91 | 2084 | // integrated flow from Q-cumulants: versus multiplicity: |
b3dacf6b | 2085 | if(fCalculateCumulantsVsM) |
2086 | { | |
2087 | TString intFlowVsMName = "fIntFlowVsM"; | |
2088 | intFlowVsMName += fAnalysisLabel->Data(); | |
2089 | for(Int_t co=0;co<4;co++) // cumulant order | |
2090 | { | |
2091 | fIntFlowVsM[co] = new TH1D(Form("%s, %s",intFlowVsMName.Data(),flowFlag[co].Data()), | |
2092 | Form("%s vs multipicity",flowFlag[co].Data()), | |
2093 | fnBinsMult,fMinMult,fMaxMult); | |
2094 | fIntFlowVsM[co]->GetXaxis()->SetTitle("M"); | |
2095 | fIntFlowVsM[co]->GetYaxis()->SetTitle(flowFlag[co].Data()); | |
2096 | fIntFlowResults->Add(fIntFlowVsM[co]); | |
2097 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
2098 | } // end of if(fCalculateCumulantsVsM) | |
2001bc3a | 2099 | // quantifying detector effects effects to correlations: |
2100 | TString intFlowDetectorBiasName = "fIntFlowDetectorBias"; | |
2101 | intFlowDetectorBiasName += fAnalysisLabel->Data(); | |
2102 | fIntFlowDetectorBias = new TH1D(intFlowDetectorBiasName.Data(),"Quantifying detector bias",4,0,4); | |
2103 | fIntFlowDetectorBias->SetLabelSize(0.05); | |
2104 | fIntFlowDetectorBias->SetMarkerStyle(25); | |
2105 | for(Int_t ci=0;ci<4;ci++) | |
2106 | { | |
2107 | (fIntFlowDetectorBias->GetXaxis())->SetBinLabel(ci+1,Form("#frac{corrected}{measured} %s",cumulantFlag[ci].Data())); | |
2108 | } | |
2109 | fIntFlowResults->Add(fIntFlowDetectorBias); | |
2110 | // quantifying detector effects to correlations versus multiplicity: | |
b3dacf6b | 2111 | if(fCalculateCumulantsVsM) |
2001bc3a | 2112 | { |
b3dacf6b | 2113 | TString intFlowDetectorBiasVsMName = "fIntFlowDetectorBiasVsM"; |
2114 | intFlowDetectorBiasVsMName += fAnalysisLabel->Data(); | |
2115 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
2116 | { | |
2117 | fIntFlowDetectorBiasVsM[ci] = new TH1D(Form("%s for %s",intFlowDetectorBiasVsMName.Data(),cumulantFlag[ci].Data()), | |
2118 | Form("Quantifying detector bias for %s vs multipicity",cumulantFlag[ci].Data()), | |
2119 | fnBinsMult,fMinMult,fMaxMult); | |
2120 | fIntFlowDetectorBiasVsM[ci]->GetXaxis()->SetTitle("M"); | |
2121 | fIntFlowDetectorBiasVsM[ci]->GetYaxis()->SetTitle("#frac{corrected}{measured}"); | |
b77b6434 | 2122 | fIntFlowResults->Add(fIntFlowDetectorBiasVsM[ci]); |
b3dacf6b | 2123 | } // end of for(Int_t co=0;co<4;co++) // cumulant order |
2124 | } // end of if(fCalculateCumulantsVsM) | |
2125 | ||
489d5531 | 2126 | /* // to be improved (removed): |
2127 | // final average weighted multi-particle correlations for all events calculated from Q-vectors | |
2128 | fQCorrelations[1] = new TProfile("Weighted correlations","final average multi-particle correlations from weighted Q-vectors",200,0,200,"s"); | |
2129 | fQCorrelations[1]->SetTickLength(-0.01,"Y"); | |
2130 | fQCorrelations[1]->SetMarkerStyle(25); | |
2131 | fQCorrelations[1]->SetLabelSize(0.03); | |
2132 | fQCorrelations[1]->SetLabelOffset(0.01,"Y"); | |
2133 | // 2-particle correlations: | |
2134 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(1,"<w_{1}w_{2}cos(n(#phi_{1}-#phi_{2}))>"); | |
2135 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(2,"<w_{1}^{2}w_{2}^{2}cos(2n(#phi_{1}-#phi_{2}))>"); | |
2136 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(3,"<w_{1}^{3}w_{2}^{3}cos(3n(#phi_{1}-#phi_{2}))>"); | |
2137 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(4,"<w_{1}^{4}w_{2}^{4}cos(4n(#phi_{1}-#phi_{2}))>"); | |
2138 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(5,"<w_{1}^{3}w_{2}cos(n(#phi_{1}-#phi_{2}))>"); | |
2139 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(6,"<w_{1}^{2}w_{2}w_{3}cos(n(#phi_{1}-#phi_{2}))>"); | |
2140 | // 3-particle correlations: | |
2141 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(21,"<w_{1}w_{2}w_{3}^{2}cos(n(2#phi_{1}-#phi_{2}-#phi_{3}))>"); | |
2142 | // 4-particle correlations: | |
2143 | (fQCorrelations[1]->GetXaxis())->SetBinLabel(41,"<w_{1}w_{2}w_{3}w_{4}cos(n(#phi_{1}+#phi_{2}-#phi_{3}-#phi_{4}))>"); | |
2144 | // add fQCorrelations[1] to the list fIntFlowList: | |
2145 | fIntFlowList->Add(fQCorrelations[1]); | |
2146 | */ | |
2147 | ||
2148 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForIntegratedFlow() | |
2149 | ||
2150 | ||
2151 | //================================================================================================================================ | |
2152 | ||
2153 | ||
2154 | void AliFlowAnalysisWithQCumulants::InitializeArraysForNestedLoops() | |
2155 | { | |
2156 | // Initialize arrays of all objects relevant for calculations with nested loops. | |
2157 | ||
2158 | // integrated flow: | |
2159 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
2160 | { | |
2161 | fIntFlowDirectCorrectionTermsForNUA[sc] = NULL; | |
2162 | } | |
2163 | ||
2164 | // differential flow: | |
2165 | // correlations: | |
2166 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
2167 | { | |
2168 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2169 | { | |
2170 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
2171 | { | |
2172 | fDiffFlowDirectCorrelations[t][pe][ci] = NULL; | |
2173 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
2174 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2175 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
2176 | // correction terms for non-uniform acceptance: | |
2177 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
2178 | { | |
2179 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2180 | { | |
2181 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
2182 | { | |
2183 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
2184 | { | |
2185 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti] = NULL; | |
2186 | } | |
2187 | } | |
2188 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2189 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
2190 | ||
2191 | ||
2192 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForNestedLoops() | |
2193 | ||
2194 | ||
2195 | //================================================================================================================================ | |
2196 | ||
2197 | ||
2198 | void AliFlowAnalysisWithQCumulants::BookEverythingForNestedLoops() | |
2199 | { | |
2200 | // Book all objects relevant for calculations with nested loops. | |
2201 | ||
2202 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?) | |
2203 | TString typeFlag[2] = {"RP","POI"}; // to be improved (should I promote this to data members?) | |
2204 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; // to be improved (should I promote this to data members?) | |
2205 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; // to be improved (should I promote this to data members?) | |
2206 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
2207 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
2208 | ||
2209 | TString evaluateNestedLoopsName = "fEvaluateNestedLoops"; | |
2210 | evaluateNestedLoopsName += fAnalysisLabel->Data(); | |
2211 | fEvaluateNestedLoops = new TProfile(evaluateNestedLoopsName.Data(),"Flags for nested loops",4,0,4); | |
2212 | fEvaluateNestedLoops->SetLabelSize(0.03); | |
2213 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(1,"fEvaluateIntFlowNestedLoops"); | |
2214 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(2,"fEvaluateDiffFlowNestedLoops"); | |
2215 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(3,"fCrossCheckInPtBinNo"); | |
2216 | (fEvaluateNestedLoops->GetXaxis())->SetBinLabel(4,"fCrossCheckInEtaBinNo"); | |
2217 | fEvaluateNestedLoops->Fill(0.5,(Int_t)fEvaluateIntFlowNestedLoops); | |
2218 | fEvaluateNestedLoops->Fill(1.5,(Int_t)fEvaluateDiffFlowNestedLoops); | |
2219 | fEvaluateNestedLoops->Fill(2.5,fCrossCheckInPtBinNo); | |
2220 | fEvaluateNestedLoops->Fill(3.5,fCrossCheckInEtaBinNo); | |
2221 | fNestedLoopsList->Add(fEvaluateNestedLoops); | |
2222 | // nested loops for integrated flow: | |
2223 | if(fEvaluateIntFlowNestedLoops) | |
2224 | { | |
2225 | // correlations: | |
2226 | TString intFlowDirectCorrelationsName = "fIntFlowDirectCorrelations"; | |
2227 | intFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
2228 | fIntFlowDirectCorrelations = new TProfile(intFlowDirectCorrelationsName.Data(),"Multiparticle correlations calculated with nested loops (for int. flow)",32,0,32,"s"); | |
2229 | fNestedLoopsList->Add(fIntFlowDirectCorrelations); | |
2230 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
2231 | { | |
2232 | TString intFlowExtraDirectCorrelationsName = "fIntFlowExtraDirectCorrelations"; | |
2233 | intFlowExtraDirectCorrelationsName += fAnalysisLabel->Data(); | |
2234 | fIntFlowExtraDirectCorrelations = new TProfile(intFlowExtraDirectCorrelationsName.Data(),"Extra multiparticle correlations calculated with nested loops (for int. flow)",100,0,100,"s"); | |
2235 | fNestedLoopsList->Add(fIntFlowExtraDirectCorrelations); | |
2236 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
2237 | // correction terms for non-uniform acceptance: | |
2238 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
2239 | { | |
2240 | TString intFlowDirectCorrectionTermsForNUAName = "fIntFlowDirectCorrectionTermsForNUA"; | |
2241 | intFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
2242 | 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"); | |
2243 | fNestedLoopsList->Add(fIntFlowDirectCorrectionTermsForNUA[sc]); | |
2244 | } // end of for(Int_t sc=0;sc<2;sc++) | |
2245 | } // end of if(fEvaluateIntFlowNestedLoops) | |
2246 | ||
2247 | // nested loops for differential flow: | |
2248 | if(fEvaluateDiffFlowNestedLoops) | |
2249 | { | |
2250 | // reduced correlations: | |
2251 | TString diffFlowDirectCorrelationsName = "fDiffFlowDirectCorrelations"; | |
2252 | diffFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
2253 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
2254 | { | |
2255 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2256 | { | |
2257 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
2258 | { | |
2259 | // reduced correlations: | |
2260 | 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"); | |
2261 | fDiffFlowDirectCorrelations[t][pe][rci]->SetXTitle(ptEtaFlag[pe].Data()); | |
2262 | fNestedLoopsList->Add(fDiffFlowDirectCorrelations[t][pe][rci]); // to be improved (add dedicated list to hold reduced correlations) | |
2263 | } // end of for(Int_t rci=0;rci<4;rci++) // correlation index | |
2264 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2265 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
2266 | // correction terms for non-uniform acceptance: | |
2267 | TString diffFlowDirectCorrectionTermsForNUAName = "fDiffFlowDirectCorrectionTermsForNUA"; | |
2268 | diffFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
2269 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
2270 | { | |
2271 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
2272 | { | |
2273 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
2274 | { | |
2275 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
2276 | { | |
2277 | 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"); | |
2278 | fNestedLoopsList->Add(fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti]); | |
2279 | } | |
2280 | } | |
2281 | } | |
3b552efe | 2282 | } |
2283 | // number of RPs and POIs in selected pt and eta bins for cross-checkings: | |
2284 | TString noOfParticlesInBinName = "fNoOfParticlesInBin"; | |
2285 | fNoOfParticlesInBin = new TH1D(noOfParticlesInBinName.Data(),"Number of RPs and POIs in selected p_{T} and #eta bin",4,0,4); | |
489d5531 | 2286 | fNoOfParticlesInBin->GetXaxis()->SetBinLabel(1,"# of RPs in p_{T} bin"); |
2287 | fNoOfParticlesInBin->GetXaxis()->SetBinLabel(2,"# of RPs in #eta bin"); | |
2288 | fNoOfParticlesInBin->GetXaxis()->SetBinLabel(3,"# of POIs in p_{T} bin"); | |
3b552efe | 2289 | fNoOfParticlesInBin->GetXaxis()->SetBinLabel(4,"# of POIs in #eta bin"); |
489d5531 | 2290 | fNestedLoopsList->Add(fNoOfParticlesInBin); |
2291 | } // end of if(fEvaluateDiffFlowNestedLoops) | |
2292 | ||
2293 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForNestedLoops() | |
2294 | ||
2295 | ||
2296 | //================================================================================================================================ | |
2297 | ||
2298 | ||
2299 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations() | |
2300 | { | |
2301 | // calculate all correlations needed for integrated flow | |
57340a27 | 2302 | |
489d5531 | 2303 | // multiplicity: |
2304 | Double_t dMult = (*fSMpk)(0,0); | |
57340a27 | 2305 | |
489d5531 | 2306 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: |
2307 | Double_t dReQ1n = (*fReQ)(0,0); | |
2308 | Double_t dReQ2n = (*fReQ)(1,0); | |
2309 | Double_t dReQ3n = (*fReQ)(2,0); | |
2310 | Double_t dReQ4n = (*fReQ)(3,0); | |
2311 | Double_t dImQ1n = (*fImQ)(0,0); | |
2312 | Double_t dImQ2n = (*fImQ)(1,0); | |
2313 | Double_t dImQ3n = (*fImQ)(2,0); | |
2314 | Double_t dImQ4n = (*fImQ)(3,0); | |
2315 | ||
2316 | // real and imaginary parts of some expressions involving various combinations of Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
2317 | // (these expression appear in the Eqs. for the multi-particle correlations bellow) | |
2318 | ||
2319 | // Re[Q_{2n} Q_{n}^* Q_{n}^*] | |
2320 | Double_t reQ2nQ1nstarQ1nstar = pow(dReQ1n,2.)*dReQ2n + 2.*dReQ1n*dImQ1n*dImQ2n - pow(dImQ1n,2.)*dReQ2n; | |
2321 | ||
2322 | // Im[Q_{2n} Q_{n}^* Q_{n}^*] | |
2323 | //Double_t imQ2nQ1nstarQ1nstar = pow(dReQ1n,2.)*dImQ2n-2.*dReQ1n*dImQ1n*dReQ2n-pow(dImQ1n,2.)*dImQ2n; | |
2324 | ||
2325 | // Re[Q_{n} Q_{n} Q_{2n}^*] = Re[Q_{2n} Q_{n}^* Q_{n}^*] | |
2326 | Double_t reQ1nQ1nQ2nstar = reQ2nQ1nstarQ1nstar; | |
2327 | ||
2328 | // Re[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] | |
2329 | Double_t reQ3nQ1nQ2nstarQ2nstar = (pow(dReQ2n,2.)-pow(dImQ2n,2.))*(dReQ3n*dReQ1n-dImQ3n*dImQ1n) | |
2330 | + 2.*dReQ2n*dImQ2n*(dReQ3n*dImQ1n+dImQ3n*dReQ1n); | |
2331 | ||
2332 | // Im[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] | |
2333 | //Double_t imQ3nQ1nQ2nstarQ2nstar = calculate and implement this (deleteMe) | |
2334 | ||
2335 | // Re[Q_{2n} Q_{2n} Q_{3n}^* Q_{1n}^*] = Re[Q_{3n} Q_{n} Q_{2n}^* Q_{2n}^*] | |
2336 | Double_t reQ2nQ2nQ3nstarQ1nstar = reQ3nQ1nQ2nstarQ2nstar; | |
2337 | ||
2338 | // Re[Q_{4n} Q_{2n}^* Q_{2n}^*] | |
2339 | Double_t reQ4nQ2nstarQ2nstar = pow(dReQ2n,2.)*dReQ4n+2.*dReQ2n*dImQ2n*dImQ4n-pow(dImQ2n,2.)*dReQ4n; | |
2340 | ||
2341 | // Im[Q_{4n} Q_{2n}^* Q_{2n}^*] | |
2342 | //Double_t imQ4nQ2nstarQ2nstar = calculate and implement this (deleteMe) | |
2343 | ||
2344 | // Re[Q_{2n} Q_{2n} Q_{4n}^*] = Re[Q_{4n} Q_{2n}^* Q_{2n}^*] | |
2345 | Double_t reQ2nQ2nQ4nstar = reQ4nQ2nstarQ2nstar; | |
2346 | ||
2347 | // Re[Q_{4n} Q_{3n}^* Q_{n}^*] | |
2348 | Double_t reQ4nQ3nstarQ1nstar = dReQ4n*(dReQ3n*dReQ1n-dImQ3n*dImQ1n)+dImQ4n*(dReQ3n*dImQ1n+dImQ3n*dReQ1n); | |
2349 | ||
2350 | // Re[Q_{3n} Q_{n} Q_{4n}^*] = Re[Q_{4n} Q_{3n}^* Q_{n}^*] | |
2351 | Double_t reQ3nQ1nQ4nstar = reQ4nQ3nstarQ1nstar; | |
2352 | ||
2353 | // Im[Q_{4n} Q_{3n}^* Q_{n}^*] | |
2354 | //Double_t imQ4nQ3nstarQ1nstar = calculate and implement this (deleteMe) | |
2355 | ||
2356 | // Re[Q_{3n} Q_{2n}^* Q_{n}^*] | |
2357 | Double_t reQ3nQ2nstarQ1nstar = dReQ3n*dReQ2n*dReQ1n-dReQ3n*dImQ2n*dImQ1n+dImQ3n*dReQ2n*dImQ1n | |
2358 | + dImQ3n*dImQ2n*dReQ1n; | |
2359 | ||
2360 | // Re[Q_{2n} Q_{n} Q_{3n}^*] = Re[Q_{3n} Q_{2n}^* Q_{n}^*] | |
2361 | Double_t reQ2nQ1nQ3nstar = reQ3nQ2nstarQ1nstar; | |
2362 | ||
2363 | // Im[Q_{3n} Q_{2n}^* Q_{n}^*] | |
2364 | //Double_t imQ3nQ2nstarQ1nstar; //calculate and implement this (deleteMe) | |
2365 | ||
2366 | // Re[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
2367 | Double_t reQ3nQ1nstarQ1nstarQ1nstar = dReQ3n*pow(dReQ1n,3)-3.*dReQ1n*dReQ3n*pow(dImQ1n,2) | |
2368 | + 3.*dImQ1n*dImQ3n*pow(dReQ1n,2)-dImQ3n*pow(dImQ1n,3); | |
2369 | ||
2370 | // Im[Q_{3n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
2371 | //Double_t imQ3nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe) | |
2372 | ||
2373 | // |Q_{2n}|^2 |Q_{n}|^2 | |
2374 | Double_t dQ2nQ1nQ2nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)); | |
2375 | ||
2376 | // Re[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2377 | Double_t reQ4nQ2nstarQ1nstarQ1nstar = (dReQ4n*dReQ2n+dImQ4n*dImQ2n)*(pow(dReQ1n,2)-pow(dImQ1n,2)) | |
2378 | + 2.*dReQ1n*dImQ1n*(dImQ4n*dReQ2n-dReQ4n*dImQ2n); | |
2379 | ||
2380 | // Im[Q_{4n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2381 | //Double_t imQ4nQ2nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe) | |
2382 | ||
2383 | // Re[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
2384 | Double_t reQ2nQ1nQ1nstarQ1nstarQ1nstar = (dReQ2n*dReQ1n-dImQ2n*dImQ1n)*(pow(dReQ1n,3)-3.*dReQ1n*pow(dImQ1n,2)) | |
2385 | + (dReQ2n*dImQ1n+dReQ1n*dImQ2n)*(3.*dImQ1n*pow(dReQ1n,2)-pow(dImQ1n,3)); | |
2386 | ||
2387 | // Im[Q_{2n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^*] | |
2388 | //Double_t imQ2nQ1nQ1nstarQ1nstarQ1nstar; //calculate and implement this (deleteMe) | |
2389 | ||
2390 | // Re[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2391 | Double_t reQ2nQ2nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2392 | * (dReQ2n*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) + 2.*dImQ2n*dReQ1n*dImQ1n); | |
2393 | ||
2394 | // Im[Q_{2n} Q_{2n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2395 | //Double_t imQ2nQ2nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2396 | // * (dImQ2n*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) - 2.*dReQ2n*dReQ1n*dImQ1n); | |
2397 | ||
2398 | // Re[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2399 | Double_t reQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(dReQ1n,4.)*dReQ4n-6.*pow(dReQ1n,2.)*dReQ4n*pow(dImQ1n,2.) | |
2400 | + pow(dImQ1n,4.)*dReQ4n+4.*pow(dReQ1n,3.)*dImQ1n*dImQ4n | |
2401 | - 4.*pow(dImQ1n,3.)*dReQ1n*dImQ4n; | |
2402 | ||
2403 | // Im[Q_{4n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2404 | //Double_t imQ4nQ1nstarQ1nstarQ1nstarQ1nstar = pow(dReQ1n,4.)*dImQ4n-6.*pow(dReQ1n,2.)*dImQ4n*pow(dImQ1n,2.) | |
2405 | // + pow(dImQ1n,4.)*dImQ4n+4.*pow(dImQ1n,3.)*dReQ1n*dReQ4n | |
2406 | // - 4.*pow(dReQ1n,3.)*dImQ1n*dReQ4n; | |
2407 | ||
2408 | // Re[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2409 | Double_t reQ3nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2410 | * (dReQ1n*dReQ2n*dReQ3n-dReQ3n*dImQ1n*dImQ2n+dReQ2n*dImQ1n*dImQ3n+dReQ1n*dImQ2n*dImQ3n); | |
2411 | ||
2412 | // Im[Q_{3n} Q_{n} Q_{2n}^* Q_{n}^* Q_{n}^*] | |
2413 | //Double_t imQ3nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2414 | // * (-dReQ2n*dReQ3n*dImQ1n-dReQ1n*dReQ3n*dImQ2n+dReQ1n*dReQ2n*dImQ3n-dImQ1n*dImQ2n*dImQ3n); | |
2415 | ||
2416 | ||
2417 | // Re[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2418 | Double_t reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)*dReQ2n-2.*dReQ1n*dReQ2n*dImQ1n-dReQ2n*pow(dImQ1n,2.) | |
2419 | + dImQ2n*pow(dReQ1n,2.)+2.*dReQ1n*dImQ1n*dImQ2n-pow(dImQ1n,2.)*dImQ2n) | |
2420 | * (pow(dReQ1n,2.)*dReQ2n+2.*dReQ1n*dReQ2n*dImQ1n-dReQ2n*pow(dImQ1n,2.) | |
2421 | - dImQ2n*pow(dReQ1n,2.)+2.*dReQ1n*dImQ1n*dImQ2n+pow(dImQ1n,2.)*dImQ2n); | |
2422 | ||
2423 | // Im[Q_{2n} Q_{2n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2424 | //Double_t imQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar = 2.*(pow(dReQ1n,2.)*dReQ2n-dReQ2n*pow(dImQ1n,2.) | |
2425 | // + 2.*dReQ1n*dImQ1n*dImQ2n)*(pow(dReQ1n,2.)*dImQ2n | |
2426 | // - 2.*dReQ1n*dImQ1n*dReQ2n-pow(dImQ1n,2.)*dImQ2n); | |
2427 | ||
2428 | // Re[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2429 | Double_t reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2430 | * (pow(dReQ1n,3.)*dReQ3n-3.*dReQ1n*dReQ3n*pow(dImQ1n,2.) | |
2431 | + 3.*pow(dReQ1n,2.)*dImQ1n*dImQ3n-pow(dImQ1n,3.)*dImQ3n); | |
2432 | ||
2433 | // Im[Q_{3n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2434 | //Double_t imQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = (pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2435 | // * (pow(dImQ1n,3.)*dReQ3n-3.*dImQ1n*dReQ3n*pow(dReQ1n,2.) | |
2436 | // - 3.*pow(dImQ1n,2.)*dReQ1n*dImQ3n+pow(dReQ1n,3.)*dImQ3n); | |
2437 | ||
2438 | // |Q_{2n}|^2 |Q_{n}|^4 | |
2439 | Double_t dQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar = (pow(dReQ2n,2.)+pow(dImQ2n,2.))*pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.); | |
2440 | ||
2441 | // Re[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2442 | Double_t reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2443 | * (pow(dReQ1n,2.)*dReQ2n-dReQ2n*pow(dImQ1n,2.) | |
2444 | + 2.*dReQ1n*dImQ1n*dImQ2n); | |
2445 | ||
2446 | // Im[Q_{2n} Q_{n} Q_{n} Q_{n}^* Q_{n}^* Q_{n}^* Q_{n}^*] | |
2447 | //Double_t imQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar = pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2448 | // * (pow(dReQ1n,2.)*dImQ2n-dImQ2n*pow(dImQ1n,2.) | |
2449 | // - 2.*dReQ1n*dReQ2n*dImQ1n); | |
2450 | ||
2451 | ||
2452 | ||
2453 | ||
2454 | // ************************************** | |
2455 | // **** multi-particle correlations: **** | |
2456 | // ************************************** | |
2457 | // | |
2458 | // Remark 1: multi-particle correlations calculated with non-weighted Q-vectors are stored in 1D profile fQCorrelations[0]. // to be improved (wrong profiles) | |
2459 | // Remark 2: binning of fQCorrelations[0] is organized as follows: // to be improved (wrong profiles) | |
2460 | // -------------------------------------------------------------------------------------------------------------------- | |
2461 | // 1st bin: <2>_{1n|1n} = two1n1n = cos(n*(phi1-phi2))> | |
2462 | // 2nd bin: <2>_{2n|2n} = two2n2n = cos(2n*(phi1-phi2))> | |
2463 | // 3rd bin: <2>_{3n|3n} = two3n3n = cos(3n*(phi1-phi2))> | |
2464 | // 4th bin: <2>_{4n|4n} = two4n4n = cos(4n*(phi1-phi2))> | |
2465 | // 5th bin: ---- EMPTY ---- | |
2466 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1n = <cos(n*(2.*phi1-phi2-phi3))> | |
2467 | // 7th bin: <3>_{3n|2n,1n} = three3n2n1n = <cos(n*(3.*phi1-2.*phi2-phi3))> | |
2468 | // 8th bin: <3>_{4n|2n,2n} = three4n2n2n = <cos(n*(4.*phi1-2.*phi2-2.*phi3))> | |
2469 | // 9th bin: <3>_{4n|3n,1n} = three4n3n1n = <cos(n*(4.*phi1-3.*phi2-phi3))> | |
2470 | // 10th bin: ---- EMPTY ---- | |
2471 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1n = <cos(n*(phi1+phi2-phi3-phi4))> | |
2472 | // 12th bin: <4>_{2n,1n|2n,1n} = four2n1n2n1n = <cos(2.*n*(phi1+phi2-phi3-phi4))> | |
2473 | // 13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n = <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> | |
2474 | // 14th bin: <4>_{3n|1n,1n,1n} = four3n1n1n1n = <cos(n*(3.*phi1-phi2-phi3-phi4))> | |
2475 | // 15th bin: <4>_{3n,1n|3n,1n} = four3n1n3n1n = <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> | |
2476 | // 16th bin: <4>_{3n,1n|2n,2n} = four3n1n2n2n = <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> | |
2477 | // 17th bin: <4>_{4n|2n,1n,1n} = four4n2n1n1n = <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> | |
2478 | // 18th bin: ---- EMPTY ---- | |
2479 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = five2n1n1n1n1n = <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))> | |
2480 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = five2n2n2n1n1n = <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))> | |
2481 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = five3n1n2n1n1n = <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))> | |
2482 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = five4n1n1n1n1n = <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))> | |
2483 | // 23rd bin: ---- EMPTY ---- | |
2484 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = six1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
2485 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = six2n1n1n2n1n1n = <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))> | |
2486 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = six2n2n1n1n1n1n = <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))> | |
2487 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = six3n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))> | |
2488 | // 28th bin: ---- EMPTY ---- | |
2489 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = seven2n1n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))> | |
2490 | // 30th bin: ---- EMPTY ---- | |
2491 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = eight1n1n1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
2492 | // -------------------------------------------------------------------------------------------------------------------- | |
2493 | ||
2494 | // 2-particle: | |
2495 | Double_t two1n1n = 0.; // <cos(n*(phi1-phi2))> | |
2496 | Double_t two2n2n = 0.; // <cos(2n*(phi1-phi2))> | |
2497 | Double_t two3n3n = 0.; // <cos(3n*(phi1-phi2))> | |
2498 | Double_t two4n4n = 0.; // <cos(4n*(phi1-phi2))> | |
2499 | ||
2500 | if(dMult>1) | |
2501 | { | |
2502 | two1n1n = (pow(dReQ1n,2.)+pow(dImQ1n,2.)-dMult)/(dMult*(dMult-1.)); | |
2503 | two2n2n = (pow(dReQ2n,2.)+pow(dImQ2n,2.)-dMult)/(dMult*(dMult-1.)); | |
2504 | two3n3n = (pow(dReQ3n,2.)+pow(dImQ3n,2.)-dMult)/(dMult*(dMult-1.)); | |
2505 | two4n4n = (pow(dReQ4n,2.)+pow(dImQ4n,2.)-dMult)/(dMult*(dMult-1.)); | |
2506 | ||
2507 | // average 2-particle correlations for single event: | |
2508 | fIntFlowCorrelationsAllEBE->SetBinContent(1,two1n1n); | |
2509 | fIntFlowCorrelationsAllEBE->SetBinContent(2,two2n2n); | |
2510 | fIntFlowCorrelationsAllEBE->SetBinContent(3,two3n3n); | |
2511 | fIntFlowCorrelationsAllEBE->SetBinContent(4,two4n4n); | |
2512 | ||
2513 | // average 2-particle correlations for all events: | |
2514 | fIntFlowCorrelationsAllPro->Fill(0.5,two1n1n,dMult*(dMult-1.)); | |
2515 | fIntFlowCorrelationsAllPro->Fill(1.5,two2n2n,dMult*(dMult-1.)); | |
2516 | fIntFlowCorrelationsAllPro->Fill(2.5,two3n3n,dMult*(dMult-1.)); | |
2517 | fIntFlowCorrelationsAllPro->Fill(3.5,two4n4n,dMult*(dMult-1.)); | |
2518 | ||
2519 | // store separetately <2> (to be improved: do I really need this?) | |
2520 | fIntFlowCorrelationsEBE->SetBinContent(1,two1n1n); // <2> | |
2521 | ||
2522 | // to be improved (this can be implemented better): | |
2523 | Double_t mWeight2p = 0.; | |
2524 | if(!strcmp(fMultiplicityWeight->Data(),"combinations")) | |
2525 | { | |
2526 | mWeight2p = dMult*(dMult-1.); | |
2527 | } else if(!strcmp(fMultiplicityWeight->Data(),"unit")) | |
2528 | { | |
2529 | mWeight2p = 1.; | |
2530 | } else if(!strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
2531 | { | |
2532 | mWeight2p = dMult; | |
2533 | } | |
2534 | ||
2535 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(1,mWeight2p); // eW_<2> | |
2536 | fIntFlowCorrelationsPro->Fill(0.5,two1n1n,mWeight2p); | |
b3dacf6b | 2537 | if(fCalculateCumulantsVsM){fIntFlowCorrelationsVsMPro[0]->Fill(dMult+0.5,two1n1n,mWeight2p);} |
489d5531 | 2538 | |
2539 | // distribution of <cos(n*(phi1-phi2))>: | |
2540 | //f2pDistribution->Fill(two1n1n,dMult*(dMult-1.)); | |
2541 | } // end of if(dMult>1) | |
2542 | ||
2543 | // 3-particle: | |
2544 | Double_t three2n1n1n = 0.; // <cos(n*(2.*phi1-phi2-phi3))> | |
2545 | Double_t three3n2n1n = 0.; // <cos(n*(3.*phi1-2.*phi2-phi3))> | |
2546 | Double_t three4n2n2n = 0.; // <cos(n*(4.*phi1-2.*phi2-2.*phi3))> | |
2547 | Double_t three4n3n1n = 0.; // <cos(n*(4.*phi1-3.*phi2-phi3))> | |
2548 | ||
2549 | if(dMult>2) | |
2550 | { | |
2551 | three2n1n1n = (reQ2nQ1nstarQ1nstar-2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2552 | - (pow(dReQ2n,2.)+pow(dImQ2n,2.))+2.*dMult) | |
2553 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2554 | three3n2n1n = (reQ3nQ2nstarQ1nstar-(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2555 | - (pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2556 | - (pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult) | |
2557 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2558 | three4n2n2n = (reQ4nQ2nstarQ2nstar-2.*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2559 | - (pow(dReQ4n,2.)+pow(dImQ4n,2.))+2.*dMult) | |
2560 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2561 | three4n3n1n = (reQ4nQ3nstarQ1nstar-(pow(dReQ4n,2.)+pow(dImQ4n,2.)) | |
2562 | - (pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2563 | - (pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult) | |
2564 | / (dMult*(dMult-1.)*(dMult-2.)); | |
2565 | ||
2566 | // average 3-particle correlations for single event: | |
2567 | fIntFlowCorrelationsAllEBE->SetBinContent(6,three2n1n1n); | |
2568 | fIntFlowCorrelationsAllEBE->SetBinContent(7,three3n2n1n); | |
2569 | fIntFlowCorrelationsAllEBE->SetBinContent(8,three4n2n2n); | |
2570 | fIntFlowCorrelationsAllEBE->SetBinContent(9,three4n3n1n); | |
2571 | ||
2572 | // average 3-particle correlations for all events: | |
2573 | fIntFlowCorrelationsAllPro->Fill(5.5,three2n1n1n,dMult*(dMult-1.)*(dMult-2.)); | |
2574 | fIntFlowCorrelationsAllPro->Fill(6.5,three3n2n1n,dMult*(dMult-1.)*(dMult-2.)); | |
2575 | fIntFlowCorrelationsAllPro->Fill(7.5,three4n2n2n,dMult*(dMult-1.)*(dMult-2.)); | |
2576 | fIntFlowCorrelationsAllPro->Fill(8.5,three4n3n1n,dMult*(dMult-1.)*(dMult-2.)); | |
2577 | } // end of if(dMult>2) | |
2578 | ||
2579 | // 4-particle: | |
2580 | Double_t four1n1n1n1n = 0.; // <cos(n*(phi1+phi2-phi3-phi4))> | |
2581 | Double_t four2n2n2n2n = 0.; // <cos(2.*n*(phi1+phi2-phi3-phi4))> | |
2582 | Double_t four2n1n2n1n = 0.; // <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> | |
2583 | Double_t four3n1n1n1n = 0.; // <cos(n*(3.*phi1-phi2-phi3-phi4))> | |
2584 | Double_t four4n2n1n1n = 0.; // <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> | |
2585 | Double_t four3n1n2n2n = 0.; // <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> | |
2586 | Double_t four3n1n3n1n = 0.; // <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> | |
2587 | ||
2588 | if(dMult>3) | |
2589 | { | |
2590 | four1n1n1n1n = (2.*dMult*(dMult-3.)+pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)-4.*(dMult-2.)*(pow(dReQ1n,2.) | |
2591 | + pow(dImQ1n,2.))-2.*reQ2nQ1nstarQ1nstar+(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2592 | / (dMult*(dMult-1)*(dMult-2.)*(dMult-3.)); | |
2593 | four2n2n2n2n = (2.*dMult*(dMult-3.)+pow((pow(dReQ2n,2.)+pow(dImQ2n,2.)),2.)-4.*(dMult-2.)*(pow(dReQ2n,2.) | |
2594 | + pow(dImQ2n,2.))-2.*reQ4nQ2nstarQ2nstar+(pow(dReQ4n,2.)+pow(dImQ4n,2.))) | |
2595 | / (dMult*(dMult-1)*(dMult-2.)*(dMult-3.)); | |
2596 | four2n1n2n1n = (dQ2nQ1nQ2nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar-2.*reQ2nQ1nstarQ1nstar) | |
2597 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2598 | - ((dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2599 | + (dMult-4.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-(pow(dReQ3n,2.)+pow(dImQ3n,2.))) | |
2600 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2601 | + (dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2602 | four3n1n1n1n = (reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar-3.*reQ2nQ1nstarQ1nstar) | |
2603 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2604 | + (2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))+3.*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2605 | + 6.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))-6.*dMult) | |
2606 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2607 | four4n2n1n1n = (reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar-2.*reQ3nQ2nstarQ1nstar) | |
2608 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2609 | - (reQ2nQ1nstarQ1nstar-2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))-2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2610 | - 3.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2611 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2612 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2613 | four3n1n2n2n = (reQ3nQ1nQ2nstarQ2nstar-reQ4nQ2nstarQ2nstar-reQ3nQ1nQ4nstar-2.*reQ3nQ2nstarQ1nstar) | |
2614 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2615 | - (2.*reQ1nQ1nQ2nstar-(pow(dReQ4n,2.)+pow(dImQ4n,2.))-2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2616 | - 4.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))-4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2617 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2618 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2619 | four3n1n3n1n = ((pow(dReQ3n,2.)+pow(dImQ3n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2620 | - 2.*reQ4nQ3nstarQ1nstar-2.*reQ3nQ2nstarQ1nstar) | |
2621 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2622 | + ((pow(dReQ4n,2.)+pow(dImQ4n,2.))-(dMult-4.)*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2623 | + (pow(dReQ2n,2.)+pow(dImQ2n,2.))-(dMult-4.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2624 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
2625 | + (dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2626 | ||
2627 | // average 4-particle correlations for single event: | |
2628 | fIntFlowCorrelationsAllEBE->SetBinContent(11,four1n1n1n1n); | |
2629 | fIntFlowCorrelationsAllEBE->SetBinContent(12,four2n1n2n1n); | |
2630 | fIntFlowCorrelationsAllEBE->SetBinContent(13,four2n2n2n2n); | |
2631 | fIntFlowCorrelationsAllEBE->SetBinContent(14,four3n1n1n1n); | |
2632 | fIntFlowCorrelationsAllEBE->SetBinContent(15,four3n1n3n1n); | |
2633 | fIntFlowCorrelationsAllEBE->SetBinContent(16,four3n1n2n2n); | |
2634 | fIntFlowCorrelationsAllEBE->SetBinContent(17,four4n2n1n1n); | |
2635 | ||
2636 | // average 4-particle correlations for all events: | |
2637 | fIntFlowCorrelationsAllPro->Fill(10.5,four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2638 | fIntFlowCorrelationsAllPro->Fill(11.5,four2n1n2n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2639 | fIntFlowCorrelationsAllPro->Fill(12.5,four2n2n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2640 | fIntFlowCorrelationsAllPro->Fill(13.5,four3n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2641 | fIntFlowCorrelationsAllPro->Fill(14.5,four3n1n3n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2642 | fIntFlowCorrelationsAllPro->Fill(15.5,four3n1n2n2n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2643 | fIntFlowCorrelationsAllPro->Fill(16.5,four4n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2644 | ||
2645 | // store separetately <4> (to be improved: do I really need this?) | |
2646 | fIntFlowCorrelationsEBE->SetBinContent(2,four1n1n1n1n); // <4> | |
2647 | ||
2648 | // to be improved (this can be implemented better): | |
2649 | Double_t mWeight4p = 0.; | |
2650 | if(!strcmp(fMultiplicityWeight->Data(),"combinations")) | |
2651 | { | |
2652 | mWeight4p = dMult*(dMult-1.)*(dMult-2.)*(dMult-3.); | |
2653 | } else if(!strcmp(fMultiplicityWeight->Data(),"unit")) | |
2654 | { | |
2655 | mWeight4p = 1.; | |
2656 | } else if(!strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
2657 | { | |
2658 | mWeight4p = dMult; | |
2659 | } | |
2660 | ||
2661 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(2,mWeight4p); // eW_<4> | |
2662 | fIntFlowCorrelationsPro->Fill(1.5,four1n1n1n1n,mWeight4p); | |
b3dacf6b | 2663 | if(fCalculateCumulantsVsM){fIntFlowCorrelationsVsMPro[1]->Fill(dMult+0.5,four1n1n1n1n,mWeight4p);} |
489d5531 | 2664 | |
2665 | // distribution of <cos(n*(phi1+phi2-phi3-phi4))> | |
2666 | //f4pDistribution->Fill(four1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2667 | ||
2668 | } // end of if(dMult>3) | |
2669 | ||
2670 | // 5-particle: | |
2671 | Double_t five2n1n1n1n1n = 0.; // <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))> | |
2672 | Double_t five2n2n2n1n1n = 0.; // <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))> | |
2673 | Double_t five3n1n2n1n1n = 0.; // <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))> | |
2674 | Double_t five4n1n1n1n1n = 0.; // <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))> | |
2675 | ||
2676 | if(dMult>4) | |
2677 | { | |
2678 | five2n1n1n1n1n = (reQ2nQ1nQ1nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar+6.*reQ3nQ2nstarQ1nstar) | |
2679 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2680 | - (reQ2nQ1nQ3nstar+3.*(dMult-6.)*reQ2nQ1nstarQ1nstar+3.*reQ1nQ1nQ2nstar) | |
2681 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2682 | - (2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2683 | + 3.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2684 | - 3.*(dMult-4.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2685 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2686 | - 3.*(pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2687 | - 2.*(2*dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))+2.*dMult*(dMult-4.)) | |
2688 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2689 | ||
2690 | five2n2n2n1n1n = (reQ2nQ2nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-2.*reQ2nQ2nQ3nstarQ1nstar) | |
2691 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2692 | + 2.*(reQ4nQ2nstarQ2nstar+4.*reQ3nQ2nstarQ1nstar+reQ3nQ1nQ4nstar) | |
2693 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2694 | + (reQ2nQ2nQ4nstar-2.*(dMult-5.)*reQ2nQ1nstarQ1nstar+2.*reQ1nQ1nQ2nstar) | |
2695 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2696 | - (2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))+4.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2697 | + 1.*pow((pow(dReQ2n,2.)+pow(dImQ2n,2.)),2.) | |
2698 | - 2.*(3.*dMult-10.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2699 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2700 | - (4.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2701 | - 4.*(dMult-5.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))+4.*dMult*(dMult-6.)) | |
2702 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2703 | ||
2704 | five4n1n1n1n1n = (reQ4nQ1nstarQ1nstarQ1nstarQ1nstar-6.*reQ4nQ2nstarQ1nstarQ1nstar-4.*reQ3nQ1nstarQ1nstarQ1nstar) | |
2705 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2706 | + (8.*reQ4nQ3nstarQ1nstar+3.*reQ4nQ2nstarQ2nstar+12.*reQ3nQ2nstarQ1nstar+12.*reQ2nQ1nstarQ1nstar) | |
2707 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2708 | - (6.*(pow(dReQ4n,2.)+pow(dImQ4n,2.))+8.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
2709 | + 12.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))+24.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))-24.*dMult) | |
2710 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2711 | ||
2712 | five3n1n2n1n1n = (reQ3nQ1nQ2nstarQ1nstarQ1nstar-reQ4nQ2nstarQ1nstarQ1nstar-reQ3nQ1nstarQ1nstarQ1nstar) | |
2713 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2714 | - (reQ3nQ1nQ2nstarQ2nstar-3.*reQ4nQ3nstarQ1nstar-reQ4nQ2nstarQ2nstar) | |
2715 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2716 | - ((2.*dMult-13.)*reQ3nQ2nstarQ1nstar-reQ3nQ1nQ4nstar-9.*reQ2nQ1nstarQ1nstar) | |
2717 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2718 | - (2.*reQ1nQ1nQ2nstar+2.*(pow(dReQ4n,2.)+pow(dImQ4n,2.)) | |
2719 | - 2.*(dMult-5.)*(pow(dReQ3n,2.)+pow(dImQ3n,2.))+2.*(pow(dReQ3n,2.) | |
2720 | + pow(dImQ3n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2721 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2722 | + (2.*(dMult-6.)*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
2723 | - 2.*(pow(dReQ2n,2.)+pow(dImQ2n,2.))*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) | |
2724 | - pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.) | |
2725 | + 2.*(3.*dMult-11.)*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2726 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)) | |
2727 | - 4.*(dMult-6.)/((dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2728 | ||
2729 | // average 5-particle correlations for single event: | |
2730 | fIntFlowCorrelationsAllEBE->SetBinContent(19,five2n1n1n1n1n); | |
2731 | fIntFlowCorrelationsAllEBE->SetBinContent(20,five2n2n2n1n1n); | |
2732 | fIntFlowCorrelationsAllEBE->SetBinContent(21,five3n1n2n1n1n); | |
2733 | fIntFlowCorrelationsAllEBE->SetBinContent(22,five4n1n1n1n1n); | |
2734 | ||
2735 | // average 5-particle correlations for all events: | |
2736 | fIntFlowCorrelationsAllPro->Fill(18.5,five2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2737 | fIntFlowCorrelationsAllPro->Fill(19.5,five2n2n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2738 | fIntFlowCorrelationsAllPro->Fill(20.5,five3n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2739 | fIntFlowCorrelationsAllPro->Fill(21.5,five4n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
2740 | } // end of if(dMult>4) | |
2741 | ||
2742 | // 6-particle: | |
2743 | Double_t six1n1n1n1n1n1n = 0.; // <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
2744 | Double_t six2n2n1n1n1n1n = 0.; // <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))> | |
2745 | Double_t six3n1n1n1n1n1n = 0.; // <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))> | |
2746 | Double_t six2n1n1n2n1n1n = 0.; // <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))> | |
2747 | ||
2748 | if(dMult>5) | |
2749 | { | |
2750 | six1n1n1n1n1n1n = (pow(pow(dReQ1n,2.)+pow(dImQ1n,2.),3.)+9.*dQ2nQ1nQ2nstarQ1nstar-6.*reQ2nQ1nQ1nstarQ1nstarQ1nstar) | |
2751 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)) | |
2752 | + 4.*(reQ3nQ1nstarQ1nstarQ1nstar-3.*reQ3nQ2nstarQ1nstar) | |
2753 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)) | |
2754 | + 2.*(9.*(dMult-4.)*reQ2nQ1nstarQ1nstar+2.*(pow(dReQ3n,2.)+pow(dImQ3n,2.))) | |
2755 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)) | |
2756 | - 9.*(pow((pow(dReQ1n,2.)+pow(dImQ1n,2.)),2.)+(pow(dReQ2n,2.)+pow(dImQ2n,2.))) | |
2757 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-5.)) | |
2758 | + (18.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))) | |
2759 | / (dMult*(dMult-1)*(dMult-3)*(dMult-4)) | |
2760 | - 6./((dMult-1.)*(dMult-2.)*(dMult-3.)); | |
2761 | ||
2762 | six2n1n1n2n1n1n = (dQ2nQ1nQ1nQ2nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.) | |
2763 | * (2.*five2n2n2n1n1n+4.*five2n1n1n1n1n+4.*five3n1n2n1n1n+4.*four2n1n2n1n+1.*four1n1n1n1n) | |
2764 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four1n1n1n1n+4.*two1n1n | |
2765 | + 2.*three2n1n1n+2.*three2n1n1n+4.*four3n1n1n1n+8.*three2n1n1n+2.*four4n2n1n1n | |
2766 | + 4.*four2n1n2n1n+2.*two2n2n+8.*four2n1n2n1n+4.*four3n1n3n1n+8.*three3n2n1n | |
2767 | + 4.*four3n1n2n2n+4.*four1n1n1n1n+4.*four2n1n2n1n+1.*four2n2n2n2n) | |
2768 | - dMult*(dMult-1.)*(dMult-2.)*(2.*three2n1n1n+8.*two1n1n+4.*two1n1n+2. | |
2769 | + 4.*two1n1n+4.*three2n1n1n+2.*two2n2n+4.*three2n1n1n+8.*three3n2n1n | |
2770 | + 8.*two2n2n+4.*three4n3n1n+4.*two3n3n+4.*three3n2n1n+4.*two1n1n | |
2771 | + 8.*three2n1n1n+4.*two1n1n+4.*three3n2n1n+4.*three2n1n1n+2.*two2n2n | |
2772 | + 4.*three3n2n1n+2.*three4n2n2n)-dMult*(dMult-1.) | |
2773 | * (4.*two1n1n+4.+4.*two1n1n+2.*two2n2n+1.+4.*two1n1n+4.*two2n2n+4.*two3n3n | |
2774 | + 1.+2.*two2n2n+1.*two4n4n)-dMult) | |
2775 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed) | |
2776 | ||
2777 | six2n2n1n1n1n1n = (reQ2nQ2nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.) | |
2778 | * (five4n1n1n1n1n+8.*five2n1n1n1n1n+6.*five2n2n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.) | |
2779 | * (4.*four3n1n1n1n+6.*four4n2n1n1n+12.*three2n1n1n+12.*four1n1n1n1n+24.*four2n1n2n1n | |
2780 | + 4.*four3n1n2n2n+3.*four2n2n2n2n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n | |
2781 | + 4.*three4n3n1n+3.*three4n2n2n+8.*three2n1n1n+24.*two1n1n+12.*two2n2n+12.*three2n1n1n+8.*three3n2n1n | |
2782 | + 1.*three4n2n2n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+2.*two2n2n+8.*two1n1n+6.)-dMult) | |
2783 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed) | |
2784 | ||
2785 | six3n1n1n1n1n1n = (reQ3nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.) | |
2786 | * (five4n1n1n1n1n+4.*five2n1n1n1n1n+6.*five3n1n2n1n1n+4.*four3n1n1n1n) | |
2787 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+6.*four1n1n1n1n | |
2788 | + 12.*three2n1n1n+12.*four2n1n2n1n+6.*four3n1n1n1n+12.*three3n2n1n+4.*four3n1n3n1n+3.*four3n1n2n2n) | |
2789 | - dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+12.*three3n2n1n+4.*three4n3n1n+3.*three4n2n2n+4.*two1n1n | |
2790 | + 12.*two1n1n+6.*three2n1n1n+12.*three2n1n1n+4.*three3n2n1n+12.*two2n2n+4.*three3n2n1n+4.*two3n3n+1.*three4n3n1n | |
2791 | + 6.*three3n2n1n)-dMult*(dMult-1.)*(4.*two1n1n+6.*two2n2n+4.*two3n3n+1.*two4n4n+1.*two1n1n+4.+6.*two1n1n+4.*two2n2n | |
2792 | + 1.*two3n3n)-dMult)/(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); // to be improved (direct formula needed) | |
2793 | ||
2794 | // average 6-particle correlations for single event: | |
2795 | fIntFlowCorrelationsAllEBE->SetBinContent(24,six1n1n1n1n1n1n); | |
2796 | fIntFlowCorrelationsAllEBE->SetBinContent(25,six2n1n1n2n1n1n); | |
2797 | fIntFlowCorrelationsAllEBE->SetBinContent(26,six2n2n1n1n1n1n); | |
2798 | fIntFlowCorrelationsAllEBE->SetBinContent(27,six3n1n1n1n1n1n); | |
2799 | ||
2800 | // average 6-particle correlations for all events: | |
2801 | fIntFlowCorrelationsAllPro->Fill(23.5,six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2802 | fIntFlowCorrelationsAllPro->Fill(24.5,six2n1n1n2n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2803 | fIntFlowCorrelationsAllPro->Fill(25.5,six2n2n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2804 | fIntFlowCorrelationsAllPro->Fill(26.5,six3n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2805 | ||
2806 | // store separetately <6> (to be improved: do I really need this?) | |
2807 | fIntFlowCorrelationsEBE->SetBinContent(3,six1n1n1n1n1n1n); // <6> | |
2808 | ||
2809 | // to be improved (this can be implemented better): | |
2810 | Double_t mWeight6p = 0.; | |
2811 | if(!strcmp(fMultiplicityWeight->Data(),"combinations")) | |
2812 | { | |
2813 | mWeight6p = dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.); | |
2814 | } else if(!strcmp(fMultiplicityWeight->Data(),"unit")) | |
2815 | { | |
2816 | mWeight6p = 1.; | |
2817 | } else if(!strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
2818 | { | |
2819 | mWeight6p = dMult; | |
2820 | } | |
2821 | ||
2822 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(3,mWeight6p); // eW_<6> | |
2823 | fIntFlowCorrelationsPro->Fill(2.5,six1n1n1n1n1n1n,mWeight6p); | |
b3dacf6b | 2824 | if(fCalculateCumulantsVsM){fIntFlowCorrelationsVsMPro[2]->Fill(dMult+0.5,six1n1n1n1n1n1n,mWeight6p);} |
489d5531 | 2825 | |
2826 | // distribution of <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
2827 | //f6pDistribution->Fill(six1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)); | |
2828 | } // end of if(dMult>5) | |
2829 | ||
2830 | // 7-particle: | |
2831 | Double_t seven2n1n1n1n1n1n1n = 0.; // <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))> | |
2832 | ||
2833 | if(dMult>6) | |
2834 | { | |
2835 | seven2n1n1n1n1n1n1n = (reQ2nQ1nQ1nQ1nstarQ1nstarQ1nstarQ1nstar-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.) | |
2836 | * (2.*six3n1n1n1n1n1n+4.*six1n1n1n1n1n1n+1.*six2n2n1n1n1n1n+6.*six2n1n1n2n1n1n+8.*five2n1n1n1n1n) | |
2837 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(1.*five4n1n1n1n1n +8.*five2n1n1n1n1n+8.*four3n1n1n1n | |
2838 | + 12.*five3n1n2n1n1n+4.*five2n1n1n1n1n+3.*five2n2n2n1n1n+6.*five2n2n2n1n1n+6.*four1n1n1n1n+24.*four1n1n1n1n | |
2839 | + 12.*five2n1n1n1n1n+12.*five2n1n1n1n1n+12.*three2n1n1n+24.*four2n1n2n1n+4.*five3n1n2n1n1n+4.*five2n1n1n1n1n) | |
2840 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(4.*four3n1n1n1n+6.*four4n2n1n1n+12.*four1n1n1n1n+24.*three2n1n1n | |
2841 | + 24.*four2n1n2n1n+12.*four3n1n1n1n+24.*three3n2n1n+8.*four3n1n3n1n+6.*four3n1n2n2n+6.*three2n1n1n+12.*four1n1n1n1n | |
2842 | + 12.*four2n1n2n1n+6.*three2n1n1n+12.*four2n1n2n1n+4.*four3n1n2n2n+3.*four2n2n2n2n+4.*four1n1n1n1n+6.*three2n1n1n | |
2843 | + 24.*two1n1n+24.*four1n1n1n1n+4.*four3n1n1n1n+24.*two1n1n+24.*three2n1n1n+12.*two2n2n+24.*three2n1n1n+12.*four2n1n2n1n | |
2844 | + 8.*three3n2n1n+8.*four2n1n2n1n+1.*four4n2n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(6.*three2n1n1n+1.*three2n1n1n+8.*two1n1n | |
2845 | + 12.*three3n2n1n+24.*two1n1n+12.*three2n1n1n+4.*three2n1n1n+8.*two1n1n+4.*three4n3n1n+24.*three2n1n1n+8.*three3n2n1n | |
2846 | + 12.*two1n1n+12.*two1n1n+3.*three4n2n2n+24.*two2n2n+6.*two2n2n+12.+12.*three3n2n1n+8.*two3n3n+12.*three2n1n1n+24.*two1n1n | |
2847 | + 4.*three3n2n1n+8.*three3n2n1n+2.*three4n3n1n+12.*two1n1n+8.*three2n1n1n+4.*three2n1n1n+2.*three3n2n1n+6.*two2n2n+8.*two2n2n | |
2848 | + 1.*three4n2n2n+4.*three3n2n1n+6.*three2n1n1n)-dMult*(dMult-1.)*(4.*two1n1n+2.*two1n1n+6.*two2n2n+8.+1.*two2n2n+4.*two3n3n | |
2849 | + 12.*two1n1n+4.*two1n1n+1.*two4n4n+8.*two2n2n+6.+2.*two3n3n+4.*two1n1n+1.*two2n2n)-dMult) | |
2850 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)); // to be improved (direct formula needed) | |
2851 | ||
2852 | // average 7-particle correlations for single event: | |
2853 | fIntFlowCorrelationsAllEBE->SetBinContent(29,seven2n1n1n1n1n1n1n); | |
2854 | ||
2855 | // average 7-particle correlations for all events: | |
2856 | fIntFlowCorrelationsAllPro->Fill(28.5,seven2n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)); | |
2857 | } // end of if(dMult>6) | |
2858 | ||
2859 | // 8-particle: | |
2860 | Double_t eight1n1n1n1n1n1n1n1n = 0.; // <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
2861 | if(dMult>7) | |
2862 | { | |
2863 | eight1n1n1n1n1n1n1n1n = (pow(pow(dReQ1n,2.)+pow(dImQ1n,2.),4.)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.) | |
2864 | * (12.*seven2n1n1n1n1n1n1n+16.*six1n1n1n1n1n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.) | |
2865 | * (8.*six3n1n1n1n1n1n+48.*six1n1n1n1n1n1n+6.*six2n2n1n1n1n1n+96.*five2n1n1n1n1n+72.*four1n1n1n1n+36.*six2n1n1n2n1n1n) | |
2866 | - dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(2.*five4n1n1n1n1n+32.*five2n1n1n1n1n+36.*four1n1n1n1n | |
2867 | + 32.*four3n1n1n1n+48.*five2n1n1n1n1n+48.*five3n1n2n1n1n+144.*five2n1n1n1n1n+288.*four1n1n1n1n+36.*five2n2n2n1n1n | |
2868 | + 144.*three2n1n1n+96.*two1n1n+144.*four2n1n2n1n)-dMult*(dMult-1.)*(dMult-2.)*(dMult-3.) | |
2869 | * (8.*four3n1n1n1n+48.*four1n1n1n1n+12.*four4n2n1n1n+96.*four2n1n2n1n+96.*three2n1n1n+72.*three2n1n1n+144.*two1n1n | |
2870 | + 16.*four3n1n3n1n+48.*four3n1n1n1n+144.*four1n1n1n1n+72.*four1n1n1n1n+96.*three3n2n1n+24.*four3n1n2n2n+144.*four2n1n2n1n | |
2871 | + 288.*two1n1n+288.*three2n1n1n+9.*four2n2n2n2n+72.*two2n2n+24.)-dMult*(dMult-1.)*(dMult-2.)*(12.*three2n1n1n+16.*two1n1n | |
2872 | + 24.*three3n2n1n+48.*three2n1n1n+96.*two1n1n+8.*three4n3n1n+32.*three3n2n1n+96.*three2n1n1n+144.*two1n1n+6.*three4n2n2n | |
2873 | + 96.*two2n2n+36.*two2n2n+72.+48.*three3n2n1n+16.*two3n3n+72.*three2n1n1n+144.*two1n1n)-dMult*(dMult-1.)*(8.*two1n1n | |
2874 | + 12.*two2n2n+16.+8.*two3n3n+48.*two1n1n+1.*two4n4n+16.*two2n2n+18.)-dMult) | |
2875 | / (dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); // to be improved (direct formula needed) | |
2876 | ||
2877 | // average 8-particle correlations for single event: | |
2878 | fIntFlowCorrelationsAllEBE->SetBinContent(31,eight1n1n1n1n1n1n1n1n); | |
2879 | ||
2880 | // average 8-particle correlations for all events: | |
2881 | fIntFlowCorrelationsAllPro->Fill(30.5,eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); | |
2882 | ||
2883 | // store separetately <8> (to be improved: do I really need this?) | |
2884 | fIntFlowCorrelationsEBE->SetBinContent(4,eight1n1n1n1n1n1n1n1n); // <8> | |
2885 | ||
2886 | // to be improved (this can be implemented better): | |
2887 | Double_t mWeight8p = 0.; | |
2888 | if(!strcmp(fMultiplicityWeight->Data(),"combinations")) | |
2889 | { | |
2890 | mWeight8p = dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.); | |
2891 | } else if(!strcmp(fMultiplicityWeight->Data(),"unit")) | |
2892 | { | |
2893 | mWeight8p = 1.; | |
2894 | } else if(!strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
2895 | { | |
2896 | mWeight8p = dMult; | |
2897 | } | |
2898 | ||
2899 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(4,mWeight8p); // eW_<8> | |
2900 | fIntFlowCorrelationsPro->Fill(3.5,eight1n1n1n1n1n1n1n1n,mWeight8p); | |
b3dacf6b | 2901 | if(fCalculateCumulantsVsM){fIntFlowCorrelationsVsMPro[3]->Fill(dMult+0.5,eight1n1n1n1n1n1n1n1n,mWeight8p);} |
489d5531 | 2902 | |
2903 | // distribution of <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
2904 | //f8pDistribution->Fill(eight1n1n1n1n1n1n1n1n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)*(dMult-5.)*(dMult-6.)*(dMult-7.)); | |
2905 | } // end of if(dMult>7) | |
2906 | ||
2907 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelations() | |
2908 | ||
2909 | ||
2910 | //================================================================================================================================ | |
2911 | ||
2912 | ||
2913 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrelations() | |
2914 | { | |
0328db2d | 2915 | // Calculate averages of products of correlations for integrated flow. |
489d5531 | 2916 | |
2001bc3a | 2917 | // multiplicity: |
2918 | Double_t dMult = (*fSMpk)(0,0); | |
2919 | ||
489d5531 | 2920 | Int_t counter = 0; |
2921 | ||
2922 | for(Int_t ci1=1;ci1<4;ci1++) | |
2923 | { | |
2924 | for(Int_t ci2=ci1+1;ci2<=4;ci2++) | |
2925 | { | |
ff70ca91 | 2926 | fIntFlowProductOfCorrelationsPro->Fill(0.5+counter, |
2927 | fIntFlowCorrelationsEBE->GetBinContent(ci1)* | |
2928 | fIntFlowCorrelationsEBE->GetBinContent(ci2), | |
2929 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)* | |
2930 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
2931 | // products versus multiplicity: // [0=<<2><4>>,1=<<2><6>>,2=<<2><8>>,3=<<4><6>>,4=<<4><8>>,5=<<6><8>>] | |
b3dacf6b | 2932 | if(fCalculateCumulantsVsM) |
2933 | { | |
2934 | fIntFlowProductOfCorrelationsVsMPro[counter]->Fill(dMult+0.5, // to be improved: dMult => sum of weights ? | |
2935 | fIntFlowCorrelationsEBE->GetBinContent(ci1)* | |
2936 | fIntFlowCorrelationsEBE->GetBinContent(ci2), | |
2937 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)* | |
2938 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
2939 | } // end of if(fCalculateCumulantsVsM) | |
ff70ca91 | 2940 | counter++; |
489d5531 | 2941 | } |
2942 | } | |
2943 | ||
2944 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrelations() | |
2945 | ||
2946 | ||
2947 | //================================================================================================================================ | |
2948 | ||
2949 | ||
0328db2d | 2950 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrectionTermsForNUA() |
2951 | { | |
2952 | // Calculate averages of products of correction terms for NUA. | |
2953 | ||
2954 | // a) Binning of fIntFlowProductOfCorrectionTermsForNUAPro is organized as follows: | |
2955 | // 1st bin: <<2><cos(phi)>> | |
2956 | // 2nd bin: <<2><sin(phi)>> | |
2957 | // 3rd bin: <<cos(phi)><sin(phi)>> | |
2958 | // 4th bin: <<2><cos(phi1+phi2)>> | |
2959 | // 5th bin: <<2><sin(phi1+phi2)>> | |
2960 | // 6th bin: <<2><cos(phi1-phi2-phi3)>> | |
2961 | // 7th bin: <<2><sin(phi1-phi2-phi3)>> | |
2962 | // 8th bin: <<4><cos(phi1)>> | |
2963 | // 9th bin: <<4><sin(phi1)>> | |
2964 | // 10th bin: <<4><cos(phi1+phi2)>> | |
2965 | // 11th bin: <<4><sin(phi1+phi2)>> | |
2966 | // 12th bin: <<4><cos(phi1-phi2-phi3)>> | |
2967 | // 13th bin: <<4><sin(phi1-phi2-phi3)>> | |
2968 | // 14th bin: <<cos(phi1)><cos(phi1+phi2)>> | |
2969 | // 15th bin: <<cos(phi1)><sin(phi1+phi2)>> | |
2970 | // 16th bin: <<cos(phi1)><cos(phi1-phi2-phi3)>> | |
2971 | // 17th bin: <<cos(phi1)><sin(phi1-phi2-phi3)>> | |
2972 | // 18th bin: <<sin(phi1)><cos(phi1+phi2)>> | |
2973 | // 19th bin: <<sin(phi1)><sin(phi1+phi2)>> | |
2974 | // 20th bin: <<sin(phi1)><cos(phi1-phi2-phi3)>> | |
2975 | // 21st bin: <<sin(phi1)><sin(phi1-phi2-phi3)>> | |
2976 | // 22nd bin: <<cos(phi1+phi2)><sin(phi1+phi2)>> | |
2977 | // 23rd bin: <<cos(phi1+phi2)><cos(phi1-phi2-phi3)>> | |
2978 | // 24th bin: <<cos(phi1+phi2)><sin(phi1-phi2-phi3)>> | |
2979 | // 25th bin: <<sin(phi1+phi2)><cos(phi1-phi2-phi3)>> | |
2980 | // 26th bin: <<sin(phi1+phi2)><sin(phi1-phi2-phi3)>> | |
2981 | // 27th bin: <<cos(phi1-phi2-phi3)><sin(phi1-phi2-phi3)>> | |
2982 | ||
2983 | // <<2><cos(phi)>>: | |
2984 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(0.5, | |
2985 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1), | |
2986 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2987 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)); | |
2988 | // <<2><sin(phi)>>: | |
2989 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(1.5, | |
2990 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1), | |
2991 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
2992 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
2993 | // <<cos(phi)><sin(phi)>>: | |
2994 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(2.5, | |
2995 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1), | |
2996 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
2997 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
2998 | // <<2><cos(phi1+phi2)>>: | |
2999 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(3.5, | |
3000 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2), | |
3001 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
3002 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
3003 | // <<2><sin(phi1+phi2)>>: | |
3004 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(4.5, | |
3005 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
3006 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
3007 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
3008 | // <<2><cos(phi1-phi2-phi3)>>: | |
3009 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(5.5, | |
3010 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
3011 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
3012 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
3013 | // <<2><sin(phi1-phi2-phi3)>>: | |
3014 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(6.5, | |
3015 | fIntFlowCorrelationsEBE->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
3016 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1) | |
3017 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
3018 | // <<4><cos(phi1)>>: | |
3019 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(7.5, | |
3020 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1), | |
3021 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
3022 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)); | |
3023 | // <<4><sin(phi1)>>: | |
3024 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(8.5, | |
3025 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1), | |
3026 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
3027 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
3028 | // <<4><cos(phi1+phi2)>>: | |
3029 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(9.5, | |
3030 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2), | |
3031 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
3032 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
3033 | // <<4><sin(phi1+phi2)>>: | |
3034 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(10.5, | |
3035 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
3036 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
3037 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
3038 | // <<4><cos(phi1-phi2-phi3)>>: | |
3039 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(11.5, | |
3040 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
3041 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
3042 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
3043 | // <<4><sin(phi1-phi2-phi3)>>: | |
3044 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(12.5, | |
3045 | fIntFlowCorrelationsEBE->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
3046 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2) | |
3047 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
3048 | // <<cos(phi1)><cos(phi1+phi2)>>: | |
3049 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(13.5, | |
3050 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2), | |
3051 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
3052 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
3053 | // <<cos(phi1)><sin(phi1+phi2)>>: | |
3054 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(14.5, | |
3055 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
3056 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
3057 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
3058 | // <<cos(phi1)><cos(phi1-phi2-phi3)>>: | |
3059 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(15.5, | |
3060 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
3061 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
3062 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
3063 | // <<cos(phi1)><sin(phi1-phi2-phi3)>>: | |
3064 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(16.5, | |
3065 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
3066 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1) | |
3067 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
3068 | // <<sin(phi1)><cos(phi1+phi2)>>: | |
3069 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(17.5, | |
3070 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2), | |
3071 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1) | |
3072 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
3073 | // <<sin(phi1)><sin(phi1+phi2)>>: | |
3074 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(18.5, | |
3075 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
3076 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1) | |
3077 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
3078 | // <<sin(phi1)><cos(phi1-phi2-phi3)>>: | |
3079 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(19.5, | |
3080 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
3081 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1) | |
3082 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
3083 | // <<sin(phi1)><sin(phi1-phi2-phi3)>>: | |
3084 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(20.5, | |
3085 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(1)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
3086 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1) | |
3087 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
3088 | // <<cos(phi1+phi2)><sin(phi1+phi2)>>: | |
3089 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(21.5, | |
3090 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2), | |
3091 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2) | |
3092 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
3093 | // <<cos(phi1+phi2)><cos(phi1-phi2-phi3)>>: | |
3094 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(22.5, | |
3095 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
3096 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2) | |
3097 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
3098 | // <<cos(phi1+phi2)><sin(phi1-phi2-phi3)>>: | |
3099 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(23.5, | |
3100 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
3101 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2) | |
3102 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
3103 | // <<sin(phi1+phi2)><cos(phi1-phi2-phi3)>>: | |
3104 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(24.5, | |
3105 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3), | |
3106 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2) | |
3107 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
3108 | // <<sin(phi1+phi2)><sin(phi1-phi2-phi3)>>: | |
3109 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(25.5, | |
3110 | fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(2)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
3111 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2) | |
3112 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
3113 | // <<cos(phi1-phi2-phi3)><sin(phi1-phi2-phi3)>>: | |
3114 | fIntFlowProductOfCorrectionTermsForNUAPro->Fill(26.5, | |
3115 | fIntFlowCorrectionTermsForNUAEBE[1]->GetBinContent(3)*fIntFlowCorrectionTermsForNUAEBE[0]->GetBinContent(3), | |
3116 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3) | |
3117 | *fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
3118 | ||
3119 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowProductOfCorrectionTermsForNUA() | |
3120 | ||
0328db2d | 3121 | //================================================================================================================================ |
3122 | ||
489d5531 | 3123 | void AliFlowAnalysisWithQCumulants::CalculateCovariancesIntFlow() |
3124 | { | |
3125 | // a) Calculate unbiased estimators Cov(<2>,<4>), Cov(<2>,<6>), Cov(<2>,<8>), Cov(<4>,<6>), Cov(<4>,<8>) and Cov(<6>,<8>) | |
3126 | // for covariances V_(<2>,<4>), V_(<2>,<6>), V_(<2>,<8>), V_(<4>,<6>), V_(<4>,<8>) and V_(<6>,<8>). | |
3127 | // b) Store in histogram fIntFlowCovariances for instance the following: | |
3128 | // | |
3129 | // 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)] | |
3130 | // | |
3131 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<4>} is event weight for <4>. | |
3132 | // c) Binning of fIntFlowCovariances is organized as follows: | |
3133 | // | |
3134 | // 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)] | |
3135 | // 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)] | |
3136 | // 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)] | |
3137 | // 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)] | |
3138 | // 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)] | |
3139 | // 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)] | |
b3dacf6b | 3140 | // |
489d5531 | 3141 | |
b3dacf6b | 3142 | // Average 2-, 4-, 6- and 8-particle correlations for all events: |
489d5531 | 3143 | Double_t correlation[4] = {0.}; |
3144 | for(Int_t ci=0;ci<4;ci++) | |
3145 | { | |
3146 | correlation[ci] = fIntFlowCorrelationsPro->GetBinContent(ci+1); | |
3147 | } | |
b3dacf6b | 3148 | // Average products of 2-, 4-, 6- and 8-particle correlations: |
489d5531 | 3149 | Double_t productOfCorrelations[4][4] = {{0.}}; |
3150 | Int_t productOfCorrelationsLabel = 1; | |
b3dacf6b | 3151 | // Denominators in the expressions for the unbiased estimator for covariance: |
489d5531 | 3152 | Double_t denominator[4][4] = {{0.}}; |
3153 | Int_t sumOfProductOfEventWeightsLabel1 = 1; | |
b3dacf6b | 3154 | // Weight dependent prefactor which multiply unbiased estimators for covariances: |
489d5531 | 3155 | Double_t wPrefactor[4][4] = {{0.}}; |
3156 | Int_t sumOfProductOfEventWeightsLabel2 = 1; | |
3157 | for(Int_t c1=0;c1<4;c1++) | |
3158 | { | |
3159 | for(Int_t c2=c1+1;c2<4;c2++) | |
3160 | { | |
3161 | productOfCorrelations[c1][c2] = fIntFlowProductOfCorrelationsPro->GetBinContent(productOfCorrelationsLabel); | |
b3dacf6b | 3162 | if(TMath::Abs(fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1)) > 1.e-44 && TMath::Abs(fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1)) > 1.e-44) |
3163 | { | |
3164 | denominator[c1][c2] = 1.-(fIntFlowSumOfProductOfEventWeights->GetBinContent(sumOfProductOfEventWeightsLabel1)) | |
3165 | / (fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) | |
3166 | * fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1)); | |
3167 | wPrefactor[c1][c2] = fIntFlowSumOfProductOfEventWeights->GetBinContent(sumOfProductOfEventWeightsLabel2) | |
3168 | / (fIntFlowSumOfEventWeights[0]->GetBinContent(c1+1) | |
3169 | * fIntFlowSumOfEventWeights[0]->GetBinContent(c2+1)); | |
489d5531 | 3170 | } |
b3dacf6b | 3171 | productOfCorrelationsLabel++; // to be improved - do I need here all 3 counters? |
489d5531 | 3172 | sumOfProductOfEventWeightsLabel1++; |
3173 | sumOfProductOfEventWeightsLabel2++; | |
b3dacf6b | 3174 | } // end of for(Int_t c2=c1+1;c2<4;c2++) |
3175 | } // end of for(Int_t c1=0;c1<4;c1++) | |
489d5531 | 3176 | |
489d5531 | 3177 | Int_t covarianceLabel = 1; |
3178 | for(Int_t c1=0;c1<4;c1++) | |
3179 | { | |
3180 | for(Int_t c2=c1+1;c2<4;c2++) | |
3181 | { | |
b3dacf6b | 3182 | if(TMath::Abs(denominator[c1][c2]) > 1.e-44) |
489d5531 | 3183 | { |
b3dacf6b | 3184 | // Covariances: |
489d5531 | 3185 | Double_t cov = (productOfCorrelations[c1][c2]-correlation[c1]*correlation[c2])/denominator[c1][c2]; |
b3dacf6b | 3186 | // Covariances multiplied with weight dependent prefactor: |
489d5531 | 3187 | Double_t wCov = cov * wPrefactor[c1][c2]; |
3188 | fIntFlowCovariances->SetBinContent(covarianceLabel,wCov); | |
3189 | } | |
3190 | covarianceLabel++; | |
b3dacf6b | 3191 | } // end of for(Int_t c2=c1+1;c2<4;c2++) |
3192 | } // end of for(Int_t c1=0;c1<4;c1++) | |
489d5531 | 3193 | |
b3dacf6b | 3194 | // Versus multiplicity: |
3195 | if(!fCalculateCumulantsVsM){return;} | |
9da1a4f3 | 3196 | Int_t nBins = fIntFlowCorrelationsVsMPro[0]->GetNbinsX(); // to be improved (hardwired 0) |
3197 | for(Int_t b=1;b<=nBins;b++) | |
3198 | { | |
b3dacf6b | 3199 | // Average 2-, 4-, 6- and 8-particle correlations for all events: |
9da1a4f3 | 3200 | Double_t correlationVsM[4] = {0.}; |
3201 | for(Int_t ci=0;ci<4;ci++) | |
3202 | { | |
3203 | correlationVsM[ci] = fIntFlowCorrelationsVsMPro[ci]->GetBinContent(b); | |
3204 | } // end of for(Int_t ci=0;ci<4;ci++) | |
b3dacf6b | 3205 | // Average products of 2-, 4-, 6- and 8-particle correlations: |
9da1a4f3 | 3206 | Double_t productOfCorrelationsVsM[4][4] = {{0.}}; |
3207 | Int_t productOfCorrelationsLabelVsM = 1; | |
b3dacf6b | 3208 | // Denominators in the expressions for the unbiased estimator for covariance: |
9da1a4f3 | 3209 | Double_t denominatorVsM[4][4] = {{0.}}; |
3210 | Int_t sumOfProductOfEventWeightsLabel1VsM = 1; | |
b3dacf6b | 3211 | // Weight dependent prefactor which multiply unbiased estimators for covariances: |
9da1a4f3 | 3212 | Double_t wPrefactorVsM[4][4] = {{0.}}; |
3213 | Int_t sumOfProductOfEventWeightsLabel2VsM = 1; | |
3214 | for(Int_t c1=0;c1<4;c1++) | |
3215 | { | |
3216 | for(Int_t c2=c1+1;c2<4;c2++) | |
3217 | { | |
3218 | productOfCorrelationsVsM[c1][c2] = fIntFlowProductOfCorrelationsVsMPro[productOfCorrelationsLabelVsM-1]->GetBinContent(b); | |
b3dacf6b | 3219 | if(TMath::Abs(fIntFlowSumOfEventWeightsVsM[c1][0]->GetBinContent(b)) > 1.e-44 && TMath::Abs(fIntFlowSumOfEventWeightsVsM[c2][0]->GetBinContent(b)) > 1.e-44) |
3220 | { | |
3221 | denominatorVsM[c1][c2] = 1.-(fIntFlowSumOfProductOfEventWeightsVsM[sumOfProductOfEventWeightsLabel1VsM-1]->GetBinContent(b)) | |
3222 | / (fIntFlowSumOfEventWeightsVsM[c1][0]->GetBinContent(b) | |
3223 | * fIntFlowSumOfEventWeightsVsM[c2][0]->GetBinContent(b)); | |
3224 | wPrefactorVsM[c1][c2] = fIntFlowSumOfProductOfEventWeightsVsM[sumOfProductOfEventWeightsLabel2VsM-1]->GetBinContent(b) | |
3225 | / (fIntFlowSumOfEventWeightsVsM[c1][0]->GetBinContent(b) | |
3226 | * fIntFlowSumOfEventWeightsVsM[c2][0]->GetBinContent(b)); | |
9da1a4f3 | 3227 | } |
3228 | productOfCorrelationsLabelVsM++; | |
3229 | sumOfProductOfEventWeightsLabel1VsM++; | |
3230 | sumOfProductOfEventWeightsLabel2VsM++; | |
3231 | } // end of for(Int_t c1=0;c1<4;c1++) | |
3232 | } // end of for(Int_t c2=c1+1;c2<4;c2++) | |
b3dacf6b | 3233 | |
9da1a4f3 | 3234 | Int_t covarianceLabelVsM = 1; |
3235 | for(Int_t c1=0;c1<4;c1++) | |
3236 | { | |
3237 | for(Int_t c2=c1+1;c2<4;c2++) | |
3238 | { | |
b3dacf6b | 3239 | if(TMath::Abs(denominatorVsM[c1][c2]) > 1.e-44) |
9da1a4f3 | 3240 | { |
b3dacf6b | 3241 | // Covariances: |
9da1a4f3 | 3242 | Double_t covVsM = (productOfCorrelationsVsM[c1][c2]-correlationVsM[c1]*correlationVsM[c2])/denominatorVsM[c1][c2]; |
b3dacf6b | 3243 | // Covariances multiplied with weight dependent prefactor: |
9da1a4f3 | 3244 | Double_t wCovVsM = covVsM * wPrefactorVsM[c1][c2]; |
3245 | fIntFlowCovariancesVsM[covarianceLabelVsM-1]->SetBinContent(b,wCovVsM); | |
3246 | } | |
3247 | covarianceLabelVsM++; | |
b3dacf6b | 3248 | } // end of for(Int_t c2=c1+1;c2<4;c2++) |
3249 | } // end of for(Int_t c1=0;c1<4;c1++) | |
9da1a4f3 | 3250 | } // end of for(Int_t b=1;b<=nBins;b++) |
3251 | ||
489d5531 | 3252 | } // end of AliFlowAnalysisWithQCumulants::CalculateCovariancesIntFlow() |
3253 | ||
489d5531 | 3254 | //================================================================================================================================ |
3255 | ||
0328db2d | 3256 | void AliFlowAnalysisWithQCumulants::CalculateCovariancesNUAIntFlow() |
3257 | { | |
3258 | // a) Calculate unbiased estimators Cov(*,*) for true covariances V_(*,*) for NUA terms. | |
3259 | // b) Store in histogram fIntFlowCovariancesNUA for instance the following: | |
3260 | // | |
3261 | // 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)] | |
3262 | // | |
3263 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<cos(phi)>} is event weight for <cos(phi)>. | |
3264 | // c) Binning of fIntFlowCovariancesNUA is organized as follows: | |
3265 | // | |
3266 | // 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)] | |
3267 | // 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)] | |
3268 | // 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)] | |
3269 | // ... | |
3270 | ||
3271 | // Cov(<2>,<cos(phi)>): | |
3272 | Double_t product1 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(1); // <<2><cos(phi)>> | |
3273 | Double_t term1st1 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3274 | Double_t term2nd1 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi)>> | |
3275 | Double_t sumOfW1st1 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3276 | Double_t sumOfW2nd1 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi)>} | |
3277 | Double_t sumOfWW1 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(1); // W_{<2>} * W_{<cos(phi)>} | |
3278 | // numerator in the expression for the the unbiased estimator for covariance: | |
3279 | Double_t numerator1 = product1 - term1st1*term2nd1; | |
3280 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3281 | Double_t denominator1 = 0.; |
3282 | if(TMath::Abs(sumOfW1st1*sumOfW2nd1)>0.) | |
3283 | { | |
3284 | denominator1 = 1.-sumOfWW1/(sumOfW1st1*sumOfW2nd1); | |
3285 | if(TMath::Abs(denominator1)>0.) | |
3286 | { | |
3287 | // covariance: | |
3288 | Double_t covariance1 = numerator1/denominator1; | |
3289 | // weight dependent prefactor for covariance: | |
3290 | Double_t wPrefactor1 = sumOfWW1/(sumOfW1st1*sumOfW2nd1); | |
3291 | // finally, store "weighted" covariance: | |
3292 | fIntFlowCovariancesNUA->SetBinContent(1,wPrefactor1*covariance1); | |
3293 | } // end of if(TMath::Abs(denominator)>0.) | |
3294 | } // end of if(TMath::Abs(sumOfW1st1*sumOfW2nd1)>0.) | |
3295 | ||
0328db2d | 3296 | // Cov(<2>,<sin(phi)>): |
3297 | Double_t product2 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(2); // <<2><sin(phi)>> | |
3298 | Double_t term1st2 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3299 | Double_t term2nd2 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi)>> | |
3300 | Double_t sumOfW1st2 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3301 | Double_t sumOfW2nd2 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi)>} | |
3302 | Double_t sumOfWW2 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(2); // W_{<2>} * W_{<sin(phi)>} | |
3303 | // numerator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3304 | Double_t numerator2 = product2 - term1st2*term2nd2; |
0328db2d | 3305 | // denominator in the expression for the the unbiased estimator for covariance: |
b92ea2b9 | 3306 | Double_t denominator2 = 0.; |
3307 | if(TMath::Abs(sumOfW1st2*sumOfW2nd2)>0.) | |
3308 | { | |
3309 | denominator2 = 1.-sumOfWW2/(sumOfW1st2*sumOfW2nd2); | |
3310 | if(TMath::Abs(denominator2)>0.) | |
3311 | { | |
3312 | // covariance: | |
3313 | Double_t covariance2 = numerator2/denominator2; | |
3314 | // weight dependent prefactor for covariance: | |
3315 | Double_t wPrefactor2 = sumOfWW2/(sumOfW1st2*sumOfW2nd2); | |
3316 | // finally, store "weighted" covariance: | |
3317 | fIntFlowCovariancesNUA->SetBinContent(2,wPrefactor2*covariance2); | |
3318 | } // end of if(TMath::Abs(denominator2)>0.) | |
3319 | } // end of if(TMath::Abs(sumOfW1st2*sumOfW2nd2)>0.) | |
0328db2d | 3320 | |
3321 | // Cov(<cos(phi)>,<sin(phi)>): | |
3322 | Double_t product3 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(3); // <<cos(phi)><sin(phi)>> | |
3323 | Double_t term1st3 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi)>> | |
3324 | Double_t term2nd3 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi)>> | |
3325 | Double_t sumOfW1st3 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi)>} | |
3326 | Double_t sumOfW2nd3 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi)>} | |
3327 | Double_t sumOfWW3 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(3); // W_{<cos(phi)>} * W_{<sin(phi)>} | |
3328 | // numerator in the expression for the the unbiased estimator for covariance: | |
3329 | Double_t numerator3 = product3 - term1st3*term2nd3; | |
3330 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3331 | Double_t denominator3 = 0; |
3332 | if(TMath::Abs(sumOfW1st3*sumOfW2nd3)>0.) | |
3333 | { | |
3334 | denominator3 = 1.-sumOfWW3/(sumOfW1st3*sumOfW2nd3); | |
3335 | if(TMath::Abs(denominator3)>0.) | |
3336 | { | |
3337 | // covariance: | |
3338 | Double_t covariance3 = numerator3/denominator3; | |
3339 | // weight dependent prefactor for covariance: | |
3340 | Double_t wPrefactor3 = sumOfWW3/(sumOfW1st3*sumOfW2nd3); | |
3341 | // finally, store "weighted" covariance: | |
3342 | fIntFlowCovariancesNUA->SetBinContent(3,wPrefactor3*covariance3); | |
3343 | } // end of if(TMath::Abs(denominator3)>0.) | |
3344 | } // end of if(TMath::Abs(sumOfW1st3*sumOfW2nd3)>0.) | |
0328db2d | 3345 | |
3346 | // Cov(<2>,<cos(phi1+phi2)>): | |
3347 | Double_t product4 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(4); // <<2><cos(phi1+phi2)>> | |
3348 | Double_t term1st4 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3349 | Double_t term2nd4 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3350 | Double_t sumOfW1st4 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3351 | Double_t sumOfW2nd4 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3352 | Double_t sumOfWW4 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(4); // W_{<2>} * W_{<cos(phi1+phi2)>} | |
3353 | // numerator in the expression for the the unbiased estimator for covariance: | |
3354 | Double_t numerator4 = product4 - term1st4*term2nd4; | |
3355 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3356 | Double_t denominator4 = 0.; |
3357 | if(TMath::Abs(sumOfW1st4*sumOfW2nd4)>0.) | |
3358 | { | |
3359 | denominator4 = 1.-sumOfWW4/(sumOfW1st4*sumOfW2nd4); | |
3360 | if(TMath::Abs(denominator4)>0.) | |
3361 | { | |
3362 | // covariance: | |
3363 | Double_t covariance4 = numerator4/denominator4; | |
3364 | // weight dependent prefactor for covariance: | |
3365 | Double_t wPrefactor4 = sumOfWW4/(sumOfW1st4*sumOfW2nd4); | |
3366 | // finally, store "weighted" covariance: | |
3367 | fIntFlowCovariancesNUA->SetBinContent(4,wPrefactor4*covariance4); | |
3368 | } // end of if(TMath::Abs(denominator4)>0.) | |
3369 | } // end of if(TMath::Abs(sumOfW1st4*sumOfW2nd4)>0.) | |
3370 | ||
0328db2d | 3371 | // Cov(<2>,<sin(phi1+phi2)>): |
3372 | Double_t product5 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(5); // <<2><sin(phi1+phi2)>> | |
3373 | Double_t term1st5 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3374 | Double_t term2nd5 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3375 | Double_t sumOfW1st5 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3376 | Double_t sumOfW2nd5 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3377 | Double_t sumOfWW5 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(5); // W_{<2>} * W_{<sin(phi1+phi2)>} | |
3378 | // numerator in the expression for the the unbiased estimator for covariance: | |
3379 | Double_t numerator5 = product5 - term1st5*term2nd5; | |
3380 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3381 | Double_t denominator5 = 0.; |
3382 | if(TMath::Abs(sumOfW1st5*sumOfW2nd5)>0.) | |
3383 | { | |
3384 | denominator5 = 1.-sumOfWW5/(sumOfW1st5*sumOfW2nd5); | |
3385 | if(TMath::Abs(denominator5)>0.) | |
3386 | { | |
3387 | // covariance: | |
3388 | Double_t covariance5 = numerator5/denominator5; | |
3389 | // weight dependent prefactor for covariance: | |
3390 | Double_t wPrefactor5 = sumOfWW5/(sumOfW1st5*sumOfW2nd5); | |
3391 | // finally, store "weighted" covariance: | |
3392 | fIntFlowCovariancesNUA->SetBinContent(5,wPrefactor5*covariance5); | |
3393 | } // end of if(TMath::Abs(denominator5)>0.) | |
3394 | } // end of if(TMath::Abs(sumOfW1st5*sumOfW2nd5)>0.) | |
3395 | ||
0328db2d | 3396 | // Cov(<2>,<cos(phi1-phi2-phi3)>): |
3397 | Double_t product6 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(6); // <<2><cos(phi1-phi2-phi3)>> | |
3398 | Double_t term1st6 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3399 | Double_t term2nd6 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3400 | Double_t sumOfW1st6 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3401 | Double_t sumOfW2nd6 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3402 | Double_t sumOfWW6 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(6); // W_{<2>} * W_{<cos(phi1-phi2-phi3)>} | |
3403 | // numerator in the expression for the the unbiased estimator for covariance: | |
3404 | Double_t numerator6 = product6 - term1st6*term2nd6; | |
3405 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3406 | Double_t denominator6 = 0.; |
3407 | if(TMath::Abs(sumOfW1st6*sumOfW2nd6)>0.) | |
3408 | { | |
3409 | denominator6 = 1.-sumOfWW6/(sumOfW1st6*sumOfW2nd6); | |
3410 | if(TMath::Abs(denominator6)>0.) | |
3411 | { | |
3412 | // covariance: | |
3413 | Double_t covariance6 = numerator6/denominator6; | |
3414 | // weight dependent prefactor for covariance: | |
3415 | Double_t wPrefactor6 = sumOfWW6/(sumOfW1st6*sumOfW2nd6); | |
3416 | // finally, store "weighted" covariance: | |
3417 | fIntFlowCovariancesNUA->SetBinContent(6,wPrefactor6*covariance6); | |
3418 | } // end of if(TMath::Abs(denominator6)>0.) | |
3419 | } // end of if(TMath::Abs(sumOfW1st6*sumOfW2nd6)>0.) | |
3420 | ||
0328db2d | 3421 | // Cov(<2>,<sin(phi1-phi2-phi3)>): |
3422 | Double_t product7 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(7); // <<2><sin(phi1-phi2-phi3)>> | |
3423 | Double_t term1st7 = fIntFlowCorrelationsPro->GetBinContent(1); // <<2>> | |
3424 | Double_t term2nd7 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3425 | Double_t sumOfW1st7 = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // W_{<2>} | |
3426 | Double_t sumOfW2nd7 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3427 | Double_t sumOfWW7 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(7); // W_{<2>} * W_{<sin(phi1-phi2-phi3)>} | |
3428 | // numerator in the expression for the the unbiased estimator for covariance: | |
3429 | Double_t numerator7 = product7 - term1st7*term2nd7; | |
3430 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3431 | Double_t denominator7 = 0.; |
3432 | if(TMath::Abs(sumOfW1st7*sumOfW2nd7)>0.) | |
3433 | { | |
3434 | denominator7 = 1.-sumOfWW7/(sumOfW1st7*sumOfW2nd7); | |
3435 | if(TMath::Abs(denominator7)>0.) | |
3436 | { | |
3437 | // covariance: | |
3438 | Double_t covariance7 = numerator7/denominator7; | |
3439 | // weight dependent prefactor for covariance: | |
3440 | Double_t wPrefactor7 = sumOfWW7/(sumOfW1st7*sumOfW2nd7); | |
3441 | // finally, store "weighted" covariance: | |
3442 | fIntFlowCovariancesNUA->SetBinContent(7,wPrefactor7*covariance7); | |
3443 | } // end of if(TMath::Abs(denominator7)>0.) | |
3444 | } // end of if(TMath::Abs(sumOfW1st7*sumOfW2nd7)>0.) | |
3445 | ||
0328db2d | 3446 | // Cov(<4>,<cos(phi1>): |
3447 | Double_t product8 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(8); // <<4><cos(phi1)>> | |
3448 | Double_t term1st8 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3449 | Double_t term2nd8 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3450 | Double_t sumOfW1st8 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3451 | Double_t sumOfW2nd8 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3452 | Double_t sumOfWW8 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(8); // W_{<4>} * W_{<cos(phi1)>} | |
3453 | // numerator in the expression for the the unbiased estimator for covariance: | |
3454 | Double_t numerator8 = product8 - term1st8*term2nd8; | |
3455 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3456 | Double_t denominator8 = 0.; |
3457 | if(TMath::Abs(sumOfW1st8*sumOfW2nd8)>0.) | |
3458 | { | |
3459 | denominator8 = 1.-sumOfWW8/(sumOfW1st8*sumOfW2nd8); | |
3460 | if(TMath::Abs(denominator8)>0.) | |
3461 | { | |
3462 | // covariance: | |
3463 | Double_t covariance8 = numerator8/denominator8; | |
3464 | // weight dependent prefactor for covariance: | |
3465 | Double_t wPrefactor8 = sumOfWW8/(sumOfW1st8*sumOfW2nd8); | |
3466 | // finally, store "weighted" covariance: | |
3467 | fIntFlowCovariancesNUA->SetBinContent(8,wPrefactor8*covariance8); | |
3468 | } // end of if(TMath::Abs(denominator8)>0.) | |
3469 | } // end of if(TMath::Abs(sumOfW1st8*sumOfW2nd8)>0.) | |
3470 | ||
0328db2d | 3471 | // Cov(<4>,<sin(phi1)>): |
3472 | Double_t product9 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(9); // <<4><sin(phi1)>> | |
3473 | Double_t term1st9 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3474 | Double_t term2nd9 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3475 | Double_t sumOfW1st9 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3476 | Double_t sumOfW2nd9 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3477 | Double_t sumOfWW9 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(9); // W_{<4>} * W_{<sin(phi1)>} | |
3478 | // numerator in the expression for the the unbiased estimator for covariance: | |
3479 | Double_t numerator9 = product9 - term1st9*term2nd9; | |
3480 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3481 | Double_t denominator9 = 0.; |
3482 | if(TMath::Abs(sumOfW1st9*sumOfW2nd9)>0.) | |
3483 | { | |
3484 | denominator9 = 1.-sumOfWW9/(sumOfW1st9*sumOfW2nd9); | |
3485 | if(TMath::Abs(denominator9)>0.) | |
3486 | { | |
3487 | // covariance: | |
3488 | Double_t covariance9 = numerator9/denominator9; | |
3489 | // weight dependent prefactor for covariance: | |
3490 | Double_t wPrefactor9 = sumOfWW9/(sumOfW1st9*sumOfW2nd9); | |
3491 | // finally, store "weighted" covariance: | |
3492 | fIntFlowCovariancesNUA->SetBinContent(9,wPrefactor9*covariance9); | |
3493 | } | |
3494 | } // end of if(TMath::Abs(sumOfW1st9*sumOfW2nd9)>0.) | |
3495 | ||
0328db2d | 3496 | // Cov(<4>,<cos(phi1+phi2)>): |
3497 | Double_t product10 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(10); // <<4><cos(phi1+phi2)>> | |
3498 | Double_t term1st10 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3499 | Double_t term2nd10 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3500 | Double_t sumOfW1st10 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3501 | Double_t sumOfW2nd10 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3502 | Double_t sumOfWW10 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(10); // W_{<4>} * W_{<cos(phi1+phi2)>} | |
3503 | // numerator in the expression for the the unbiased estimator for covariance: | |
3504 | Double_t numerator10 = product10 - term1st10*term2nd10; | |
3505 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3506 | Double_t denominator10 = 0.; |
3507 | if(TMath::Abs(sumOfW1st10*sumOfW2nd10)>0.) | |
3508 | { | |
3509 | denominator10 = 1.-sumOfWW10/(sumOfW1st10*sumOfW2nd10); | |
3510 | if(TMath::Abs(denominator10)>0.) | |
3511 | { | |
3512 | // covariance: | |
3513 | Double_t covariance10 = numerator10/denominator10; | |
3514 | // weight dependent prefactor for covariance: | |
3515 | Double_t wPrefactor10 = sumOfWW10/(sumOfW1st10*sumOfW2nd10); | |
3516 | // finally, store "weighted" covariance: | |
3517 | fIntFlowCovariancesNUA->SetBinContent(10,wPrefactor10*covariance10); | |
3518 | } // end of if(TMath::Abs(denominator10)>0.) | |
3519 | } // end of if(TMath::Abs(sumOfW1st10*sumOfW2nd10)>0.) | |
3520 | ||
0328db2d | 3521 | // Cov(<4>,<sin(phi1+phi2)>): |
3522 | Double_t product11 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(11); // <<4><sin(phi1+phi2)>> | |
3523 | Double_t term1st11 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3524 | Double_t term2nd11 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3525 | Double_t sumOfW1st11 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3526 | Double_t sumOfW2nd11 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3527 | Double_t sumOfWW11 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(11); // W_{<4>} * W_{<sin(phi1+phi2)>} | |
3528 | // numerator in the expression for the the unbiased estimator for covariance: | |
3529 | Double_t numerator11 = product11 - term1st11*term2nd11; | |
3530 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3531 | Double_t denominator11 = 0.; |
3532 | if(TMath::Abs(sumOfW1st11*sumOfW2nd11)>0.) | |
3533 | { | |
3534 | denominator11 = 1.-sumOfWW11/(sumOfW1st11*sumOfW2nd11); | |
3535 | if(TMath::Abs(denominator11)>0.) | |
3536 | { | |
3537 | // covariance: | |
3538 | Double_t covariance11 = numerator11/denominator11; | |
3539 | // weight dependent prefactor for covariance: | |
3540 | Double_t wPrefactor11 = sumOfWW11/(sumOfW1st11*sumOfW2nd11); | |
3541 | // finally, store "weighted" covariance: | |
3542 | fIntFlowCovariancesNUA->SetBinContent(11,wPrefactor11*covariance11); | |
3543 | } // end of if(TMath::Abs(denominator11)>0.) | |
3544 | } // end of if(TMath::Abs(sumOfW1st11*sumOfW2nd11)>0.) | |
0328db2d | 3545 | |
3546 | // Cov(<4>,<cos(phi1-phi2-phi3)>): | |
3547 | Double_t product12 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(12); // <<4><cos(phi1-phi2-phi3)>> | |
3548 | Double_t term1st12 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3549 | Double_t term2nd12 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3550 | Double_t sumOfW1st12 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3551 | Double_t sumOfW2nd12 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3552 | Double_t sumOfWW12 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(12); // W_{<4>} * W_{<cos(phi1-phi2-phi3)>} | |
3553 | // numerator in the expression for the the unbiased estimator for covariance: | |
3554 | Double_t numerator12 = product12 - term1st12*term2nd12; | |
3555 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3556 | Double_t denominator12 = 0.; |
3557 | if(TMath::Abs(sumOfW1st12*sumOfW2nd12)>0.) | |
3558 | { | |
3559 | denominator12 = 1.-sumOfWW12/(sumOfW1st12*sumOfW2nd12); | |
3560 | if(TMath::Abs(denominator12)>0.) | |
3561 | { | |
3562 | // covariance: | |
3563 | Double_t covariance12 = numerator12/denominator12; | |
3564 | // weight dependent prefactor for covariance: | |
3565 | Double_t wPrefactor12 = sumOfWW12/(sumOfW1st12*sumOfW2nd12); | |
3566 | // finally, store "weighted" covariance: | |
3567 | fIntFlowCovariancesNUA->SetBinContent(12,wPrefactor12*covariance12); | |
3568 | } // end of if(TMath::Abs(denominator12)>0.) | |
3569 | } // end of if(TMath::Abs(sumOfW1st12*sumOfW2nd12)>0.) | |
0328db2d | 3570 | |
3571 | // Cov(<4>,<sin(phi1-phi2-phi3)>): | |
3572 | Double_t product13 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(13); // <<4><sin(phi1-phi2-phi3)>> | |
3573 | Double_t term1st13 = fIntFlowCorrelationsPro->GetBinContent(2); // <<4>> | |
3574 | Double_t term2nd13 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3575 | Double_t sumOfW1st13 = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // W_{<4>} | |
3576 | Double_t sumOfW2nd13 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3577 | Double_t sumOfWW13 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(13); // W_{<4>} * W_{<sin(phi1-phi2-phi3)>} | |
3578 | // numerator in the expression for the the unbiased estimator for covariance: | |
3579 | Double_t numerator13 = product13 - term1st13*term2nd13; | |
3580 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3581 | Double_t denominator13 = 0.; |
3582 | if(TMath::Abs(sumOfW1st13*sumOfW2nd13)>0.) | |
3583 | { | |
3584 | denominator13 = 1.-sumOfWW13/(sumOfW1st13*sumOfW2nd13); | |
3585 | if(TMath::Abs(denominator13)>0.) | |
3586 | { | |
3587 | // covariance: | |
3588 | Double_t covariance13 = numerator13/denominator13; | |
3589 | // weight dependent prefactor for covariance: | |
3590 | Double_t wPrefactor13 = sumOfWW13/(sumOfW1st13*sumOfW2nd13); | |
3591 | // finally, store "weighted" covariance: | |
3592 | fIntFlowCovariancesNUA->SetBinContent(13,wPrefactor13*covariance13); | |
3593 | } // end of if(TMath::Abs(denominator13)>0.) | |
3594 | } // end of if(TMath::Abs(sumOfW1st13*sumOfW2nd13)>0.) | |
0328db2d | 3595 | |
3596 | // Cov(<cos(phi1)>,<cos(phi1+phi2)>): | |
3597 | Double_t product14 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(14); // <<cos(phi1)><cos(phi1+phi2)>> | |
3598 | Double_t term1st14 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3599 | Double_t term2nd14 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3600 | Double_t sumOfW1st14 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3601 | Double_t sumOfW2nd14 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3602 | Double_t sumOfWW14 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(14); // W_{<cos(phi1)>} * W_{<cos(phi1+phi2)>} | |
3603 | // numerator in the expression for the the unbiased estimator for covariance: | |
3604 | Double_t numerator14 = product14 - term1st14*term2nd14; | |
3605 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3606 | Double_t denominator14 = 0.; |
3607 | if(TMath::Abs(sumOfW1st14*sumOfW2nd14)>0.) | |
3608 | { | |
3609 | denominator14 = 1.-sumOfWW14/(sumOfW1st14*sumOfW2nd14); | |
3610 | if(TMath::Abs(denominator14)>0.) | |
3611 | { | |
3612 | // covariance: | |
3613 | Double_t covariance14 = numerator14/denominator14; | |
3614 | // weight dependent prefactor for covariance: | |
3615 | Double_t wPrefactor14 = sumOfWW14/(sumOfW1st14*sumOfW2nd14); | |
3616 | // finally, store "weighted" covariance: | |
3617 | fIntFlowCovariancesNUA->SetBinContent(14,wPrefactor14*covariance14); | |
3618 | } // end of if(TMath::Abs(denominator14)>0.) | |
3619 | } // end of if(TMath::Abs(sumOfW1st14*sumOfW2nd14)>0.) | |
0328db2d | 3620 | |
3621 | // Cov(<cos(phi1)>,<sin(phi1+phi2)>): | |
3622 | Double_t product15 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(15); // <<cos(phi1)><sin(phi1+phi2)>> | |
3623 | Double_t term1st15 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3624 | Double_t term2nd15 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3625 | Double_t sumOfW1st15 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3626 | Double_t sumOfW2nd15 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3627 | Double_t sumOfWW15 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(15); // W_{<cos(phi1)>} * W_{<sin(phi1+phi2)>} | |
3628 | // numerator in the expression for the the unbiased estimator for covariance: | |
3629 | Double_t numerator15 = product15 - term1st15*term2nd15; | |
3630 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3631 | Double_t denominator15 = 0.; |
3632 | if(TMath::Abs(sumOfW1st15*sumOfW2nd15)>0.) | |
3633 | { | |
3634 | denominator15 = 1.-sumOfWW15/(sumOfW1st15*sumOfW2nd15); | |
3635 | if(TMath::Abs(denominator15)>0.) | |
3636 | { | |
3637 | // covariance: | |
3638 | Double_t covariance15 = numerator15/denominator15; | |
3639 | // weight dependent prefactor for covariance: | |
3640 | Double_t wPrefactor15 = sumOfWW15/(sumOfW1st15*sumOfW2nd15); | |
3641 | // finally, store "weighted" covariance: | |
3642 | fIntFlowCovariancesNUA->SetBinContent(15,wPrefactor15*covariance15); | |
3643 | } // end of if(TMath::Abs(denominator15)>0.) | |
3644 | } // end of if(TMath::Abs(sumOfW1st15*sumOfW2nd15)>0.) | |
3645 | ||
0328db2d | 3646 | // Cov(<cos(phi1)>,<cos(phi1-phi2-phi3)>): |
3647 | Double_t product16 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(16); // <<cos(phi1)><cos(phi1-phi2-phi3)>> | |
3648 | Double_t term1st16 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3649 | Double_t term2nd16 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3650 | Double_t sumOfW1st16 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3651 | Double_t sumOfW2nd16 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3652 | Double_t sumOfWW16 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(16); // W_{<cos(phi1)>} * W_{<cos(phi1-phi2-phi3)>} | |
3653 | // numerator in the expression for the the unbiased estimator for covariance: | |
3654 | Double_t numerator16 = product16 - term1st16*term2nd16; | |
3655 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3656 | Double_t denominator16 = 0.; |
3657 | if(TMath::Abs(sumOfW1st16*sumOfW2nd16)>0.) | |
3658 | { | |
3659 | denominator16 = 1.-sumOfWW16/(sumOfW1st16*sumOfW2nd16); | |
3660 | if(TMath::Abs(denominator16)>0.) | |
3661 | { | |
3662 | // covariance: | |
3663 | Double_t covariance16 = numerator16/denominator16; | |
3664 | // weight dependent prefactor for covariance: | |
3665 | Double_t wPrefactor16 = sumOfWW16/(sumOfW1st16*sumOfW2nd16); | |
3666 | // finally, store "weighted" covariance: | |
3667 | fIntFlowCovariancesNUA->SetBinContent(16,wPrefactor16*covariance16); | |
3668 | } // end of if(TMath::Abs(denominator16)>0.) | |
3669 | } // end ofif(TMath::Abs(sumOfW1st16*sumOfW2nd16)>0.) | |
3670 | ||
0328db2d | 3671 | // Cov(<cos(phi1)>,<sin(phi1-phi2-phi3)>): |
3672 | Double_t product17 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(17); // <<cos(phi1)><sin(phi1-phi2-phi3)>> | |
3673 | Double_t term1st17 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(1); // <<cos(phi1)>> | |
3674 | Double_t term2nd17 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3675 | Double_t sumOfW1st17 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(1); // W_{<cos(phi1)>} | |
3676 | Double_t sumOfW2nd17 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3677 | Double_t sumOfWW17 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(17); // W_{<cos(phi1)>} * W_{<sin(phi1-phi2-phi3)>} | |
3678 | // numerator in the expression for the the unbiased estimator for covariance: | |
3679 | Double_t numerator17 = product17 - term1st17*term2nd17; | |
3680 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3681 | Double_t denominator17 = 0.; |
3682 | if(TMath::Abs(sumOfW1st17*sumOfW2nd17)>0.) | |
3683 | { | |
3684 | denominator17 = 1.-sumOfWW17/(sumOfW1st17*sumOfW2nd17); | |
3685 | if(TMath::Abs(denominator17)>0.) | |
3686 | { | |
3687 | // covariance: | |
3688 | Double_t covariance17 = numerator17/denominator17; | |
3689 | // weight dependent prefactor for covariance: | |
3690 | Double_t wPrefactor17 = sumOfWW17/(sumOfW1st17*sumOfW2nd17); | |
3691 | // finally, store "weighted" covariance: | |
3692 | fIntFlowCovariancesNUA->SetBinContent(17,wPrefactor17*covariance17); | |
3693 | } // end of if(TMath::Abs(denominator17)>0.) | |
3694 | } // end of if(TMath::Abs(sumOfW1st17*sumOfW2nd17)>0.) | |
0328db2d | 3695 | |
3696 | // Cov(<sin(phi1)>,<cos(phi1+phi2)>): | |
3697 | Double_t product18 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(18); // <<sin(phi1)><cos(phi1+phi2)>> | |
3698 | Double_t term1st18 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3699 | Double_t term2nd18 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3700 | Double_t sumOfW1st18 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3701 | Double_t sumOfW2nd18 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3702 | Double_t sumOfWW18 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(18); // W_{<sin(phi1)>} * W_{<cos(phi1+phi2)>} | |
3703 | // numerator in the expression for the the unbiased estimator for covariance: | |
3704 | Double_t numerator18 = product18 - term1st18*term2nd18; | |
3705 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3706 | Double_t denominator18 = 0.; |
3707 | if(TMath::Abs(sumOfW1st18*sumOfW2nd18)>0.) | |
3708 | { | |
3709 | denominator18 = 1.-sumOfWW18/(sumOfW1st18*sumOfW2nd18); | |
3710 | if(TMath::Abs(denominator18)>0.) | |
3711 | { | |
3712 | // covariance: | |
3713 | Double_t covariance18 = numerator18/denominator18; | |
3714 | // weight dependent prefactor for covariance: | |
3715 | Double_t wPrefactor18 = sumOfWW18/(sumOfW1st18*sumOfW2nd18); | |
3716 | // finally, store "weighted" covariance: | |
3717 | fIntFlowCovariancesNUA->SetBinContent(18,wPrefactor18*covariance18); | |
3718 | } // end of if(TMath::Abs(denominator18)>0.) | |
3719 | } // end of if(TMath::Abs(sumOfW1st18*sumOfW2nd18)>0.) | |
0328db2d | 3720 | |
3721 | // Cov(<sin(phi1)>,<sin(phi1+phi2)>): | |
3722 | Double_t product19 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(19); // <<sin(phi1)><sin(phi1+phi2)>> | |
3723 | Double_t term1st19 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3724 | Double_t term2nd19 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3725 | Double_t sumOfW1st19 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3726 | Double_t sumOfW2nd19 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3727 | Double_t sumOfWW19 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(19); // W_{<sin(phi1)>} * W_{<sin(phi1+phi2)>} | |
3728 | // numerator in the expression for the the unbiased estimator for covariance: | |
3729 | Double_t numerator19 = product19 - term1st19*term2nd19; | |
3730 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3731 | Double_t denominator19 = 0.; |
3732 | if(TMath::Abs(sumOfW1st19*sumOfW2nd19)>0.) | |
3733 | { | |
3734 | denominator19 = 1.-sumOfWW19/(sumOfW1st19*sumOfW2nd19); | |
3735 | if(TMath::Abs(denominator19)>0.) | |
3736 | { | |
3737 | // covariance: | |
3738 | Double_t covariance19 = numerator19/denominator19; | |
3739 | // weight dependent prefactor for covariance: | |
3740 | Double_t wPrefactor19 = sumOfWW19/(sumOfW1st19*sumOfW2nd19); | |
3741 | // finally, store "weighted" covariance: | |
3742 | fIntFlowCovariancesNUA->SetBinContent(19,wPrefactor19*covariance19); | |
3743 | } // end of if(TMath::Abs(denominator19)>0.) | |
3744 | } // end of if(TMath::Abs(sumOfW1st19*sumOfW2nd19)>0.) | |
3745 | ||
0328db2d | 3746 | // Cov(<sin(phi1)>,<cos(phi1-phi2-phi3)>): |
3747 | Double_t product20 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(20); // <<sin(phi1)><cos(phi1-phi2-phi3)>> | |
3748 | Double_t term1st20 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3749 | Double_t term2nd20 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3750 | Double_t sumOfW1st20 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3751 | Double_t sumOfW2nd20 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3752 | Double_t sumOfWW20 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(20); // W_{<sin(phi1)>} * W_{<cos(phi1-phi2-phi3)>} | |
3753 | // numerator in the expression for the the unbiased estimator for covariance: | |
3754 | Double_t numerator20 = product20 - term1st20*term2nd20; | |
3755 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3756 | Double_t denominator20 = 0.; |
3757 | if(TMath::Abs(sumOfW1st20*sumOfW2nd20)>0.) | |
3758 | { | |
3759 | denominator20 = 1.-sumOfWW20/(sumOfW1st20*sumOfW2nd20); | |
3760 | if(TMath::Abs(denominator20)>0.) | |
3761 | { | |
3762 | // covariance: | |
3763 | Double_t covariance20 = numerator20/denominator20; | |
3764 | // weight dependent prefactor for covariance: | |
3765 | Double_t wPrefactor20 = sumOfWW20/(sumOfW1st20*sumOfW2nd20); | |
3766 | // finally, store "weighted" covariance: | |
3767 | fIntFlowCovariancesNUA->SetBinContent(20,wPrefactor20*covariance20); | |
3768 | } // end of if(TMath::Abs(denominator20)>0.) | |
3769 | } // end of if(TMath::Abs(sumOfW1st20*sumOfW2nd20)>0.) | |
0328db2d | 3770 | |
3771 | // Cov(<sin(phi1)>,<sin(phi1-phi2-phi3)>): | |
3772 | Double_t product21 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(21); // <<sin(phi1)><sin(phi1-phi2-phi3)>> | |
3773 | Double_t term1st21 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(1); // <<sin(phi1)>> | |
3774 | Double_t term2nd21 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3775 | Double_t sumOfW1st21 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(1); // W_{<sin(phi1)>} | |
3776 | Double_t sumOfW2nd21 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3777 | Double_t sumOfWW21 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(21); // W_{<sin(phi1)>} * W_{<sin(phi1-phi2-phi3)>} | |
3778 | // numerator in the expression for the the unbiased estimator for covariance: | |
3779 | Double_t numerator21 = product21 - term1st21*term2nd21; | |
3780 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3781 | Double_t denominator21 = 0.; |
3782 | if(TMath::Abs(sumOfW1st21*sumOfW2nd21)>0.) | |
3783 | { | |
3784 | denominator21 = 1.-sumOfWW21/(sumOfW1st21*sumOfW2nd21); | |
3785 | if(TMath::Abs(denominator21)>0.) | |
3786 | { | |
3787 | // covariance: | |
3788 | Double_t covariance21 = numerator21/denominator21; | |
3789 | // weight dependent prefactor for covariance: | |
3790 | Double_t wPrefactor21 = sumOfWW21/(sumOfW1st21*sumOfW2nd21); | |
3791 | // finally, store "weighted" covariance: | |
3792 | fIntFlowCovariancesNUA->SetBinContent(21,wPrefactor21*covariance21); | |
3793 | } // end of if(TMath::Abs(denominator21)>0.) | |
3794 | } // end of if(TMath::Abs(sumOfW1st21*sumOfW2nd21)>0.) | |
0328db2d | 3795 | |
3796 | // Cov(<cos(phi1+phi2)>,<sin(phi1+phi2)>): | |
3797 | Double_t product22 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(22); // <<cos(phi1+phi2)><sin(phi1+phi2)>> | |
3798 | Double_t term1st22 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3799 | Double_t term2nd22 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3800 | Double_t sumOfW1st22 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3801 | Double_t sumOfW2nd22 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3802 | Double_t sumOfWW22 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(22); // W_{<cos(phi1+phi2)>} * W_{<sin(phi1+phi2)>} | |
3803 | // numerator in the expression for the the unbiased estimator for covariance: | |
3804 | Double_t numerator22 = product22 - term1st22*term2nd22; | |
3805 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3806 | Double_t denominator22 = 0.; |
3807 | if(TMath::Abs(sumOfW1st22*sumOfW2nd22)>0.) | |
3808 | { | |
3809 | denominator22 = 1.-sumOfWW22/(sumOfW1st22*sumOfW2nd22); | |
3810 | if(TMath::Abs(denominator22)>0.) | |
3811 | { | |
3812 | // covariance: | |
3813 | Double_t covariance22 = numerator22/denominator22; | |
3814 | // weight dependent prefactor for covariance: | |
3815 | Double_t wPrefactor22 = sumOfWW22/(sumOfW1st22*sumOfW2nd22); | |
3816 | // finally, store "weighted" covariance: | |
3817 | fIntFlowCovariancesNUA->SetBinContent(22,wPrefactor22*covariance22); | |
3818 | } // end of if(TMath::Abs(denominator22)>0.) | |
3819 | } // end of if(TMath::Abs(sumOfW1st22*sumOfW2nd22)>0.) | |
0328db2d | 3820 | |
3821 | // Cov(<cos(phi1+phi2)>,<cos(phi1-phi2-phi3)>): | |
3822 | Double_t product23 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(23); // <<cos(phi1+phi2)><cos(phi1-phi2-phi3)>> | |
3823 | Double_t term1st23 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3824 | Double_t term2nd23 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3825 | Double_t sumOfW1st23 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3826 | Double_t sumOfW2nd23 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3827 | Double_t sumOfWW23 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(23); // W_{<cos(phi1+phi2)>} * W_{<cos(phi1-phi2-phi3)>} | |
3828 | // numerator in the expression for the the unbiased estimator for covariance: | |
3829 | Double_t numerator23 = product23 - term1st23*term2nd23; | |
3830 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3831 | Double_t denominator23 = 0.; |
3832 | if(TMath::Abs(sumOfW1st23*sumOfW2nd23)>0.) | |
3833 | { | |
3834 | denominator23 = 1.-sumOfWW23/(sumOfW1st23*sumOfW2nd23); | |
3835 | if(TMath::Abs(denominator23)>0.) | |
3836 | { | |
3837 | // covariance: | |
3838 | Double_t covariance23 = numerator23/denominator23; | |
3839 | // weight dependent prefactor for covariance: | |
3840 | Double_t wPrefactor23 = sumOfWW23/(sumOfW1st23*sumOfW2nd23); | |
3841 | // finally, store "weighted" covariance: | |
3842 | fIntFlowCovariancesNUA->SetBinContent(23,wPrefactor23*covariance23); | |
3843 | } // end of if(TMath::Abs(denominator23)>0.) | |
3844 | } // end of if(TMath::Abs(sumOfW1st23*sumOfW2nd23)>0.) | |
3845 | ||
0328db2d | 3846 | // Cov(<cos(phi1+phi2)>,<sin(phi1-phi2-phi3)>): |
3847 | Double_t product24 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(24); // <<cos(phi1+phi2)><sin(phi1-phi2-phi3)>> | |
3848 | Double_t term1st24 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(2); // <<cos(phi1+phi2)>> | |
3849 | Double_t term2nd24 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3850 | Double_t sumOfW1st24 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(2); // W_{<cos(phi1+phi2)>} | |
3851 | Double_t sumOfW2nd24 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3852 | Double_t sumOfWW24 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(24); // W_{<cos(phi1+phi2)>} * W_{<sin(phi1-phi2-phi3)>} | |
3853 | // numerator in the expression for the the unbiased estimator for covariance: | |
3854 | Double_t numerator24 = product24 - term1st24*term2nd24; | |
3855 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3856 | Double_t denominator24 = 0.; |
3857 | if(TMath::Abs(sumOfW1st24*sumOfW2nd24)>0.) | |
3858 | { | |
3859 | denominator24 = 1.-sumOfWW24/(sumOfW1st24*sumOfW2nd24); | |
3860 | if(TMath::Abs(denominator24)>0.) | |
3861 | { | |
3862 | // covariance: | |
3863 | Double_t covariance24 = numerator24/denominator24; | |
3864 | // weight dependent prefactor for covariance: | |
3865 | Double_t wPrefactor24 = sumOfWW24/(sumOfW1st24*sumOfW2nd24); | |
3866 | // finally, store "weighted" covariance: | |
3867 | fIntFlowCovariancesNUA->SetBinContent(24,wPrefactor24*covariance24); | |
3868 | } // end of if(TMath::Abs(denominator24)>0.) | |
3869 | } // end of if(TMath::Abs(sumOfW1st24*sumOfW2nd24)>0.) | |
0328db2d | 3870 | |
3871 | // Cov(<sin(phi1+phi2)>,<cos(phi1-phi2-phi3)>): | |
3872 | Double_t product25 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(25); // <<sin(phi1+phi2)><cos(phi1-phi2-phi3)>> | |
3873 | Double_t term1st25 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3874 | Double_t term2nd25 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> | |
3875 | Double_t sumOfW1st25 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3876 | Double_t sumOfW2nd25 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} | |
3877 | Double_t sumOfWW25 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(25); // W_{<sin(phi1+phi2)>} * W_{<cos(phi1-phi2-phi3)>} | |
3878 | // numerator in the expression for the the unbiased estimator for covariance: | |
3879 | Double_t numerator25 = product25 - term1st25*term2nd25; | |
3880 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3881 | Double_t denominator25 = 0.; |
3882 | if(TMath::Abs(sumOfW1st25*sumOfW2nd25)>0.) | |
3883 | { | |
3884 | denominator25 = 1.-sumOfWW25/(sumOfW1st25*sumOfW2nd25); | |
3885 | if(TMath::Abs(denominator25)>0.) | |
3886 | { | |
3887 | // covariance: | |
3888 | Double_t covariance25 = numerator25/denominator25; | |
3889 | // weight dependent prefactor for covariance: | |
3890 | Double_t wPrefactor25 = sumOfWW25/(sumOfW1st25*sumOfW2nd25); | |
3891 | // finally, store "weighted" covariance: | |
3892 | fIntFlowCovariancesNUA->SetBinContent(25,wPrefactor25*covariance25); | |
3893 | } // end of if(TMath::Abs(denominator25)>0.) | |
3894 | } // end of if(TMath::Abs(sumOfW1st25*sumOfW2nd25)>0.) | |
3895 | ||
0328db2d | 3896 | // Cov(<sin(phi1+phi2)>,<sin(phi1-phi2-phi3)>): |
3897 | Double_t product26 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(26); // <<sin(phi1+phi2)><sin(phi1-phi2-phi3)>> | |
3898 | Double_t term1st26 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(2); // <<sin(phi1+phi2)>> | |
3899 | Double_t term2nd26 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> | |
3900 | Double_t sumOfW1st26 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(2); // W_{<sin(phi1+phi2)>} | |
3901 | Double_t sumOfW2nd26 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} | |
3902 | Double_t sumOfWW26 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(26); // W_{<sin(phi1+phi2)>} * W_{<sin(phi1-phi2-phi3)>} | |
3903 | // numerator in the expression for the the unbiased estimator for covariance: | |
3904 | Double_t numerator26 = product26 - term1st26*term2nd26; | |
3905 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3906 | Double_t denominator26 = 0.; |
3907 | if(TMath::Abs(sumOfW1st26*sumOfW2nd26)>0.) | |
3908 | { | |
3909 | denominator26 = 1.-sumOfWW26/(sumOfW1st26*sumOfW2nd26); | |
3910 | if(TMath::Abs(denominator26)>0.) | |
3911 | { | |
3912 | // covariance: | |
3913 | Double_t covariance26 = numerator26/denominator26; | |
3914 | // weight dependent prefactor for covariance: | |
3915 | Double_t wPrefactor26 = sumOfWW26/(sumOfW1st26*sumOfW2nd26); | |
3916 | // finally, store "weighted" covariance: | |
3917 | fIntFlowCovariancesNUA->SetBinContent(26,wPrefactor26*covariance26); | |
3918 | } // end of if(TMath::Abs(denominator26)>0.) | |
3919 | } // end of if(TMath::Abs(sumOfW1st26*sumOfW2nd26)>0.) | |
3920 | ||
0328db2d | 3921 | // Cov(<cos(phi1-phi2-phi3)>,<sin(phi1-phi2-phi3)>): |
3922 | Double_t product27 = fIntFlowProductOfCorrectionTermsForNUAPro->GetBinContent(27); // <<cos(phi1-phi2-phi3)><sin(phi1-phi2-phi3)>> | |
b92ea2b9 | 3923 | Double_t term1st27 = fIntFlowCorrectionTermsForNUAPro[1]->GetBinContent(3); // <<cos(phi1-phi2-phi3)>> |
0328db2d | 3924 | Double_t term2nd27 = fIntFlowCorrectionTermsForNUAPro[0]->GetBinContent(3); // <<sin(phi1-phi2-phi3)>> |
b92ea2b9 | 3925 | Double_t sumOfW1st27 = fIntFlowSumOfEventWeightsNUA[1][0]->GetBinContent(3); // W_{<cos(phi1-phi2-phi3)>} |
0328db2d | 3926 | Double_t sumOfW2nd27 = fIntFlowSumOfEventWeightsNUA[0][0]->GetBinContent(3); // W_{<sin(phi1-phi2-phi3)>} |
3927 | Double_t sumOfWW27 = fIntFlowSumOfProductOfEventWeightsNUA->GetBinContent(27); // W_{<cos(phi1-phi2-phi3)>} * W_{<sin(phi1-phi2-phi3)>} | |
3928 | // numerator in the expression for the the unbiased estimator for covariance: | |
3929 | Double_t numerator27 = product27 - term1st27*term2nd27; | |
3930 | // denominator in the expression for the the unbiased estimator for covariance: | |
b92ea2b9 | 3931 | Double_t denominator27 = 0.; |
3932 | if(TMath::Abs(sumOfW1st27*sumOfW2nd27)>0.) | |
3933 | { | |
3934 | denominator27 = 1.-sumOfWW27/(sumOfW1st27*sumOfW2nd27); | |
3935 | if(TMath::Abs(denominator27)>0.) | |
3936 | { | |
3937 | // covariance: | |
3938 | Double_t covariance27 = numerator27/denominator27; | |
3939 | // weight dependent prefactor for covariance: | |
3940 | Double_t wPrefactor27 = sumOfWW27/(sumOfW1st27*sumOfW2nd27); | |
3941 | // finally, store "weighted" covariance: | |
3942 | fIntFlowCovariancesNUA->SetBinContent(27,wPrefactor27*covariance27); | |
3943 | } // end of if(TMath::Abs(denominator27)>0.) | |
3944 | } // end of if(TMath::Abs(sumOfW1st27*sumOfW2nd27)>0.) | |
3945 | ||
0328db2d | 3946 | } // end of AliFlowAnalysisWithQCumulants::CalculateCovariancesNUAIntFlow() |
3947 | ||
0328db2d | 3948 | //================================================================================================================================ |
3949 | ||
489d5531 | 3950 | void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsIntFlow() |
3951 | { | |
3952 | // From profile fIntFlowCorrelationsPro access measured correlations and spread, | |
3953 | // correctly calculate the statistical errors and store the final results and | |
3954 | // statistical errors for correlations in histogram fIntFlowCorrelationsHist. | |
3955 | // | |
3956 | // Remark: Statistical error of correlation is calculated as: | |
3957 | // | |
3958 | // statistical error = termA * spread * termB: | |
3959 | // termA = sqrt{sum_{i=1}^{N} w^2}/(sum_{i=1}^{N} w) | |
3960 | // termB = 1/sqrt(1-termA^2) | |
b3dacf6b | 3961 | // |
3962 | ||
489d5531 | 3963 | for(Int_t ci=1;ci<=4;ci++) // correlation index |
3964 | { | |
3965 | Double_t correlation = fIntFlowCorrelationsPro->GetBinContent(ci); | |
3966 | Double_t spread = fIntFlowCorrelationsPro->GetBinError(ci); | |
3967 | Double_t sumOfLinearEventWeights = fIntFlowSumOfEventWeights[0]->GetBinContent(ci); | |
3968 | Double_t sumOfQuadraticEventWeights = fIntFlowSumOfEventWeights[1]->GetBinContent(ci); | |
3969 | Double_t termA = 0.; | |
3970 | Double_t termB = 0.; | |
b3dacf6b | 3971 | if(TMath::Abs(sumOfLinearEventWeights) > 0.) // to be improved - shall I omitt here Abs() ? |
489d5531 | 3972 | { |
3973 | termA = pow(sumOfQuadraticEventWeights,0.5)/sumOfLinearEventWeights; | |
3974 | } else | |
3975 | { | |
b3dacf6b | 3976 | cout<<endl; |
3977 | cout<<" WARNING (QC): sumOfLinearEventWeights == 0 in method FinalizeCorrelationsIntFlow() !!!!"<<endl; | |
3978 | cout<<" (for "<<2*ci<<"-particle correlation)"<<endl; | |
3979 | cout<<endl; | |
489d5531 | 3980 | } |
3981 | if(1.-pow(termA,2.) > 0.) | |
3982 | { | |
3983 | termB = 1./pow(1-pow(termA,2.),0.5); | |
3984 | } else | |
3985 | { | |
b3dacf6b | 3986 | cout<<endl; |
3987 | cout<<" WARNING (QC): 1.-pow(termA,2.) <= 0 in method FinalizeCorrelationsIntFlow() !!!!"<<endl; | |
3988 | cout<<" (for "<<2*ci<<"-particle correlation)"<<endl; | |
3989 | cout<<endl; | |
489d5531 | 3990 | } |
3991 | Double_t statisticalError = termA * spread * termB; | |
3992 | fIntFlowCorrelationsHist->SetBinContent(ci,correlation); | |
3993 | fIntFlowCorrelationsHist->SetBinError(ci,statisticalError); | |
ff70ca91 | 3994 | } // end of for(Int_t ci=1;ci<=4;ci++) // correlation index |
3995 | ||
b3dacf6b | 3996 | // Versus multiplicity: |
3997 | if(!fCalculateCumulantsVsM){return;} | |
ff70ca91 | 3998 | for(Int_t ci=0;ci<=3;ci++) // correlation index |
3999 | { | |
4000 | Int_t nBins = fIntFlowCorrelationsVsMPro[ci]->GetNbinsX(); | |
4001 | for(Int_t b=1;b<=nBins;b++) // looping over multiplicity bins | |
4002 | { | |
4003 | Double_t correlationVsM = fIntFlowCorrelationsVsMPro[ci]->GetBinContent(b); | |
4004 | Double_t spreadVsM = fIntFlowCorrelationsVsMPro[ci]->GetBinError(b); | |
4005 | Double_t sumOfLinearEventWeightsVsM = fIntFlowSumOfEventWeightsVsM[ci][0]->GetBinContent(b); | |
4006 | Double_t sumOfQuadraticEventWeightsVsM = fIntFlowSumOfEventWeightsVsM[ci][1]->GetBinContent(b); | |
4007 | Double_t termAVsM = 0.; | |
4008 | Double_t termBVsM = 0.; | |
b3dacf6b | 4009 | if(TMath::Abs(sumOfLinearEventWeightsVsM) > 0.) // to be improved - shall I omitt here Abs() ? |
ff70ca91 | 4010 | { |
4011 | termAVsM = pow(sumOfQuadraticEventWeightsVsM,0.5)/sumOfLinearEventWeightsVsM; | |
b3dacf6b | 4012 | } |
ff70ca91 | 4013 | if(1.-pow(termAVsM,2.) > 0.) |
4014 | { | |
4015 | termBVsM = 1./pow(1-pow(termAVsM,2.),0.5); | |
b3dacf6b | 4016 | } |
ff70ca91 | 4017 | Double_t statisticalErrorVsM = termAVsM * spreadVsM * termBVsM; |
4018 | fIntFlowCorrelationsVsMHist[ci]->SetBinContent(b,correlationVsM); | |
4019 | fIntFlowCorrelationsVsMHist[ci]->SetBinError(b,statisticalErrorVsM); | |
4020 | } // end of for(Int_t b=1;b<=nBins;b++) | |
4021 | } // end of for(Int_t ci=1;ci<=4;ci++) // correlation index | |
4022 | ||
489d5531 | 4023 | } // end of AliFlowAnalysisWithQCumulants::FinalizeCorrelationsIntFlow() |
4024 | ||
489d5531 | 4025 | //================================================================================================================================ |
4026 | ||
489d5531 | 4027 | void AliFlowAnalysisWithQCumulants::FillAverageMultiplicities(Int_t nRP) |
4028 | { | |
b77b6434 | 4029 | // Fill profile fAverageMultiplicity to hold average multiplicities and |
4030 | // number of events for events with nRP>=0, nRP>=1, ... , and nRP>=8 | |
489d5531 | 4031 | |
4032 | // Binning of fAverageMultiplicity is organized as follows: | |
4033 | // 1st bin: all events (including the empty ones) | |
4034 | // 2nd bin: event with # of RPs greater or equal to 1 | |
4035 | // 3rd bin: event with # of RPs greater or equal to 2 | |
4036 | // 4th bin: event with # of RPs greater or equal to 3 | |
4037 | // 5th bin: event with # of RPs greater or equal to 4 | |
4038 | // 6th bin: event with # of RPs greater or equal to 5 | |
4039 | // 7th bin: event with # of RPs greater or equal to 6 | |
4040 | // 8th bin: event with # of RPs greater or equal to 7 | |
4041 | // 9th bin: event with # of RPs greater or equal to 8 | |
4042 | ||
489d5531 | 4043 | if(nRP<0) |
4044 | { | |
b77b6434 | 4045 | cout<<endl; |
4046 | cout<<" WARNING (QC): nRP<0 in in AFAWQC::FAM() !!!!"<<endl; | |
4047 | cout<<endl; | |
489d5531 | 4048 | exit(0); |
4049 | } | |
4050 | ||
4051 | for(Int_t i=0;i<9;i++) | |
4052 | { | |
b77b6434 | 4053 | if(nRP>=i){fAvMultiplicity->Fill(i+0.5,nRP,1);} |
489d5531 | 4054 | } |
4055 | ||
4056 | } // end of AliFlowAnalysisWithQCumulants::FillAverageMultiplicities(nRP) | |
4057 | ||
489d5531 | 4058 | //================================================================================================================================ |
4059 | ||
489d5531 | 4060 | void AliFlowAnalysisWithQCumulants::CalculateCumulantsIntFlow() |
b3dacf6b | 4061 | { |
b92ea2b9 | 4062 | // a) Calculate Q-cumulants from the measured multiparticle correlations; |
4063 | // b) Propagate the statistical errors from measured multiparticle correlations to statistical errors of Q-cumulants; | |
4064 | // c) Remark: Q-cumulants calculated in this method are biased by non-uniform acceptance of detector !!!! | |
4065 | // Method CalculateQcumulantsCorrectedForNUAIntFlow() is called afterwards to correct for this bias; | |
4066 | // d) Store the results and statistical error of Q-cumulants in histogram fIntFlowQcumulants. | |
4067 | // Binning of fIntFlowQcumulants is organized as follows: | |
489d5531 | 4068 | // |
b3dacf6b | 4069 | // 1st bin: QC{2} |
4070 | // 2nd bin: QC{4} | |
4071 | // 3rd bin: QC{6} | |
4072 | // 4th bin: QC{8} | |
4073 | // | |
489d5531 | 4074 | |
b3dacf6b | 4075 | // Correlations: |
489d5531 | 4076 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> |
4077 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
4078 | Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
4079 | Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
b3dacf6b | 4080 | // Statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: |
489d5531 | 4081 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <2> |
4082 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <4> | |
4083 | Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <6> | |
4084 | Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <8> | |
b3dacf6b | 4085 | // Covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()): |
489d5531 | 4086 | Double_t wCov24 = fIntFlowCovariances->GetBinContent(1); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) |
4087 | Double_t wCov26 = fIntFlowCovariances->GetBinContent(2); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>) | |
4088 | Double_t wCov28 = fIntFlowCovariances->GetBinContent(3); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>) | |
4089 | Double_t wCov46 = fIntFlowCovariances->GetBinContent(4); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>) | |
4090 | Double_t wCov48 = fIntFlowCovariances->GetBinContent(5); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>) | |
b3dacf6b | 4091 | Double_t wCov68 = fIntFlowCovariances->GetBinContent(6); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>) |
489d5531 | 4092 | // Q-cumulants: |
4093 | Double_t qc2 = 0.; // QC{2} | |
4094 | Double_t qc4 = 0.; // QC{4} | |
4095 | Double_t qc6 = 0.; // QC{6} | |
4096 | Double_t qc8 = 0.; // QC{8} | |
b3dacf6b | 4097 | if(TMath::Abs(two) > 0.){qc2 = two;} |
4098 | if(TMath::Abs(four) > 0.){qc4 = four-2.*pow(two,2.);} | |
4099 | if(TMath::Abs(six) > 0.){qc6 = six-9.*two*four+12.*pow(two,3.);} | |
4100 | if(TMath::Abs(eight) > 0.){qc8 = eight-16.*two*six-18.*pow(four,2.)+144.*pow(two,2.)*four-144.*pow(two,4.);} | |
4101 | // Statistical errors of Q-cumulants: | |
489d5531 | 4102 | Double_t qc2Error = 0.; |
4103 | Double_t qc4Error = 0.; | |
4104 | Double_t qc6Error = 0.; | |
b3dacf6b | 4105 | Double_t qc8Error = 0.; |
4106 | // Squared statistical errors of Q-cumulants: | |
489d5531 | 4107 | //Double_t qc2ErrorSquared = 0.; |
4108 | Double_t qc4ErrorSquared = 0.; | |
4109 | Double_t qc6ErrorSquared = 0.; | |
b3dacf6b | 4110 | Double_t qc8ErrorSquared = 0.; |
4111 | // Statistical error of QC{2}: | |
4112 | qc2Error = twoError; | |
4113 | // Statistical error of QC{4}: | |
489d5531 | 4114 | qc4ErrorSquared = 16.*pow(two,2.)*pow(twoError,2)+pow(fourError,2.) |
4115 | - 8.*two*wCov24; | |
4116 | if(qc4ErrorSquared>0.) | |
4117 | { | |
4118 | qc4Error = pow(qc4ErrorSquared,0.5); | |
4119 | } else | |
4120 | { | |
b3dacf6b | 4121 | cout<<" WARNING (QC): Statistical error of QC{4} is imaginary !!!!"<<endl; |
4122 | } | |
4123 | // Statistical error of QC{6}: | |
489d5531 | 4124 | qc6ErrorSquared = 81.*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) |
4125 | + 81.*pow(two,2.)*pow(fourError,2.) | |
4126 | + pow(sixError,2.) | |
4127 | - 162.*two*(4.*pow(two,2.)-four)*wCov24 | |
4128 | + 18.*(4.*pow(two,2.)-four)*wCov26 | |
b3dacf6b | 4129 | - 18.*two*wCov46; |
489d5531 | 4130 | if(qc6ErrorSquared>0.) |
4131 | { | |
4132 | qc6Error = pow(qc6ErrorSquared,0.5); | |
4133 | } else | |
4134 | { | |
b3dacf6b | 4135 | cout<<" WARNING (QC): Statistical error of QC{6} is imaginary !!!!"<<endl; |
4136 | } | |
4137 | // Statistical error of QC{8}: | |
489d5531 | 4138 | qc8ErrorSquared = 256.*pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.) |
4139 | + 1296.*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.) | |
4140 | + 256.*pow(two,2.)*pow(sixError,2.) | |
4141 | + pow(eightError,2.) | |
4142 | - 1152.*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24 | |
4143 | + 512.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26 | |
4144 | - 32.*(36.*pow(two,3.)-18.*four*two+six)*wCov28 | |
4145 | - 1152.*two*(4.*pow(two,2.)-four)*wCov46 | |
4146 | + 72.*(4.*pow(two,2.)-four)*wCov48 | |
4147 | - 32.*two*wCov68; | |
4148 | if(qc8ErrorSquared>0.) | |
4149 | { | |
4150 | qc8Error = pow(qc8ErrorSquared,0.5); | |
4151 | } else | |
4152 | { | |
b3dacf6b | 4153 | cout<<"WARNING (QC): Statistical error of QC{8} is imaginary !!!!"<<endl; |
489d5531 | 4154 | } |
b3dacf6b | 4155 | // Store the results and statistical errors for Q-cumulants: |
4156 | if(TMath::Abs(qc2)>0.) | |
4157 | { | |
4158 | fIntFlowQcumulants->SetBinContent(1,qc2); | |
4159 | fIntFlowQcumulants->SetBinError(1,qc2Error); | |
4160 | } | |
4161 | if(TMath::Abs(qc4)>0.) | |
4162 | { | |
4163 | fIntFlowQcumulants->SetBinContent(2,qc4); | |
4164 | fIntFlowQcumulants->SetBinError(2,qc4Error); | |
4165 | } | |
4166 | if(TMath::Abs(qc6)>0.) | |
4167 | { | |
4168 | fIntFlowQcumulants->SetBinContent(3,qc6); | |
4169 | fIntFlowQcumulants->SetBinError(3,qc6Error); | |
4170 | } | |
4171 | if(TMath::Abs(qc8)>0.) | |
4172 | { | |
4173 | fIntFlowQcumulants->SetBinContent(4,qc8); | |
4174 | fIntFlowQcumulants->SetBinError(4,qc8Error); | |
4175 | } | |
4176 | ||
4177 | // Versus multiplicity: | |
4178 | if(!fCalculateCumulantsVsM){return;} | |
9da1a4f3 | 4179 | Int_t nBins = fIntFlowCorrelationsVsMPro[0]->GetNbinsX(); // to be improved (hardwired 0) |
b3dacf6b | 4180 | Double_t value[4] = {0.}; // QCs vs M |
4181 | Double_t error[4] = {0.}; // error of QCs vs M | |
4182 | Double_t dSum1[4] = {0.}; // sum value_i/(error_i)^2 | |
4183 | Double_t dSum2[4] = {0.}; // sum 1/(error_i)^2 | |
9da1a4f3 | 4184 | for(Int_t b=1;b<=nBins;b++) |
4185 | { | |
b3dacf6b | 4186 | // Correlations: |
9da1a4f3 | 4187 | two = fIntFlowCorrelationsVsMHist[0]->GetBinContent(b); // <<2>> |
4188 | four = fIntFlowCorrelationsVsMHist[1]->GetBinContent(b); // <<4>> | |
4189 | six = fIntFlowCorrelationsVsMHist[2]->GetBinContent(b); // <<6>> | |
4190 | eight = fIntFlowCorrelationsVsMHist[3]->GetBinContent(b); // <<8>> | |
b3dacf6b | 4191 | // Statistical errors of average 2-, 4-, 6- and 8-particle azimuthal correlations: |
9da1a4f3 | 4192 | twoError = fIntFlowCorrelationsVsMHist[0]->GetBinError(b); // statistical error of <2> |
4193 | fourError = fIntFlowCorrelationsVsMHist[1]->GetBinError(b); // statistical error of <4> | |
4194 | sixError = fIntFlowCorrelationsVsMHist[2]->GetBinError(b); // statistical error of <6> | |
4195 | eightError = fIntFlowCorrelationsVsMHist[3]->GetBinError(b); // statistical error of <8> | |
b3dacf6b | 4196 | // Covariances (multiplied by prefactor depending on weights - see comments in CalculateCovariancesIntFlow()): |
9da1a4f3 | 4197 | wCov24 = fIntFlowCovariancesVsM[0]->GetBinContent(b); // Cov(<2>,<4>) * prefactor(w_<2>,w_<4>) |
4198 | wCov26 = fIntFlowCovariancesVsM[1]->GetBinContent(b); // Cov(<2>,<6>) * prefactor(w_<2>,w_<6>) | |
4199 | wCov28 = fIntFlowCovariancesVsM[2]->GetBinContent(b); // Cov(<2>,<8>) * prefactor(w_<2>,w_<8>) | |
4200 | wCov46 = fIntFlowCovariancesVsM[3]->GetBinContent(b); // Cov(<4>,<6>) * prefactor(w_<4>,w_<6>) | |
4201 | wCov48 = fIntFlowCovariancesVsM[4]->GetBinContent(b); // Cov(<4>,<8>) * prefactor(w_<4>,w_<8>) | |
b3dacf6b | 4202 | wCov68 = fIntFlowCovariancesVsM[5]->GetBinContent(b); // Cov(<6>,<8>) * prefactor(w_<6>,w_<8>) |
9da1a4f3 | 4203 | // Q-cumulants: |
4204 | qc2 = 0.; // QC{2} | |
4205 | qc4 = 0.; // QC{4} | |
4206 | qc6 = 0.; // QC{6} | |
4207 | qc8 = 0.; // QC{8} | |
b3dacf6b | 4208 | if(TMath::Abs(two) > 0.){qc2 = two;} |
4209 | if(TMath::Abs(four) > 0.){qc4 = four-2.*pow(two,2.);} | |
4210 | if(TMath::Abs(six) > 0.){qc6 = six-9.*two*four+12.*pow(two,3.);} | |
4211 | if(TMath::Abs(eight) > 0.){qc8 = eight-16.*two*six-18.*pow(four,2.)+144.*pow(two,2.)*four-144.*pow(two,4.);} | |
4212 | // Statistical errors of Q-cumulants: | |
9da1a4f3 | 4213 | qc2Error = 0.; |
4214 | qc4Error = 0.; | |
4215 | qc6Error = 0.; | |
b3dacf6b | 4216 | qc8Error = 0.; |
4217 | // Squared statistical errors of Q-cumulants: | |
9da1a4f3 | 4218 | //Double_t qc2ErrorSquared = 0.; |
4219 | qc4ErrorSquared = 0.; | |
4220 | qc6ErrorSquared = 0.; | |
b3dacf6b | 4221 | qc8ErrorSquared = 0.; |
4222 | // Statistical error of QC{2}: | |
4223 | qc2Error = twoError; | |
4224 | // Statistical error of QC{4}: | |
9da1a4f3 | 4225 | qc4ErrorSquared = 16.*pow(two,2.)*pow(twoError,2)+pow(fourError,2.) |
4226 | - 8.*two*wCov24; | |
4227 | if(qc4ErrorSquared>0.) | |
4228 | { | |
4229 | qc4Error = pow(qc4ErrorSquared,0.5); | |
4230 | } else | |
4231 | { | |
4232 | // cout<<"WARNING: Statistical error of QC{4} is imaginary in multiplicity bin "<<b<<" !!!!"<<endl; | |
b3dacf6b | 4233 | } |
4234 | // Statistical error of QC{6}: | |
9da1a4f3 | 4235 | qc6ErrorSquared = 81.*pow(4.*pow(two,2.)-four,2.)*pow(twoError,2.) |
4236 | + 81.*pow(two,2.)*pow(fourError,2.) | |
4237 | + pow(sixError,2.) | |
4238 | - 162.*two*(4.*pow(two,2.)-four)*wCov24 | |
4239 | + 18.*(4.*pow(two,2.)-four)*wCov26 | |
b3dacf6b | 4240 | - 18.*two*wCov46; |
9da1a4f3 | 4241 | if(qc6ErrorSquared>0.) |
4242 | { | |
4243 | qc6Error = pow(qc6ErrorSquared,0.5); | |
4244 | } else | |
4245 | { | |
4246 | // cout<<"WARNING: Statistical error of QC{6} is imaginary in multiplicity bin "<<b<<" !!!!"<<endl; | |
b3dacf6b | 4247 | } |
4248 | // Statistical error of QC{8}: | |
9da1a4f3 | 4249 | qc8ErrorSquared = 256.*pow(36.*pow(two,3.)-18.*four*two+six,2.)*pow(twoError,2.) |
4250 | + 1296.*pow(4.*pow(two,2.)-four,2.)*pow(fourError,2.) | |
4251 | + 256.*pow(two,2.)*pow(sixError,2.) | |
4252 | + pow(eightError,2.) | |
4253 | - 1152.*(36.*pow(two,3.)-18.*four*two+six)*(4.*pow(two,2.)-four)*wCov24 | |
4254 | + 512.*two*(36.*pow(two,3.)-18.*four*two+six)*wCov26 | |
4255 | - 32.*(36.*pow(two,3.)-18.*four*two+six)*wCov28 | |
4256 | - 1152.*two*(4.*pow(two,2.)-four)*wCov46 | |
4257 | + 72.*(4.*pow(two,2.)-four)*wCov48 | |
4258 | - 32.*two*wCov68; | |
4259 | if(qc8ErrorSquared>0.) | |
4260 | { | |
4261 | qc8Error = pow(qc8ErrorSquared,0.5); | |
4262 | } else | |
4263 | { | |
4264 | // cout<<"WARNING: Statistical error of QC{8} is imaginary in multiplicity bin "<<b<<" !!!!"<<endl; | |
4265 | } | |
b3dacf6b | 4266 | // Store the results and statistical errors for Q-cumulants: |
4267 | if(TMath::Abs(qc2)>0.) | |
4268 | { | |
4269 | fIntFlowQcumulantsVsM[0]->SetBinContent(b,qc2); | |
4270 | fIntFlowQcumulantsVsM[0]->SetBinError(b,qc2Error); | |
4271 | } | |
4272 | if(TMath::Abs(qc4)>0.) | |
4273 | { | |
4274 | fIntFlowQcumulantsVsM[1]->SetBinContent(b,qc4); | |
4275 | fIntFlowQcumulantsVsM[1]->SetBinError(b,qc4Error); | |
4276 | } | |
4277 | if(TMath::Abs(qc6)>0.) | |
4278 | { | |
4279 | fIntFlowQcumulantsVsM[2]->SetBinContent(b,qc6); | |
4280 | fIntFlowQcumulantsVsM[2]->SetBinError(b,qc6Error); | |
4281 | } | |
4282 | if(TMath::Abs(qc8)>0.) | |
4283 | { | |
4284 | fIntFlowQcumulantsVsM[3]->SetBinContent(b,qc8); | |
4285 | fIntFlowQcumulantsVsM[3]->SetBinError(b,qc8Error); | |
4286 | } | |
4287 | // Rebin in M: | |
4288 | for(Int_t co=0;co<4;co++) | |
4289 | { | |
4290 | value[co] = fIntFlowQcumulantsVsM[co]->GetBinContent(b); | |
4291 | error[co] = fIntFlowQcumulantsVsM[co]->GetBinError(b); | |
4292 | if(error[co]>0.) | |
4293 | { | |
4294 | dSum1[co]+=value[co]/(error[co]*error[co]); | |
4295 | dSum2[co]+=1./(error[co]*error[co]); | |
4296 | } | |
4297 | } // end of for(Int_t co=0;co<4;co++) | |
9da1a4f3 | 4298 | } // end of for(Int_t b=1;b<=nBins;b++) |
b3dacf6b | 4299 | // Store rebinned Q-cumulants: |
4300 | for(Int_t co=0;co<4;co++) | |
4301 | { | |
4302 | if(dSum2[co]>0.) | |
4303 | { | |
4304 | fIntFlowQcumulantsRebinnedInM->SetBinContent(co+1,dSum1[co]/dSum2[co]); | |
4305 | fIntFlowQcumulantsRebinnedInM->SetBinError(co+1,pow(1./dSum2[co],0.5)); | |
4306 | } | |
4307 | } // end of for(Int_t co=0;co<4;co++) | |
4308 | ||
489d5531 | 4309 | } // end of AliFlowAnalysisWithQCumulants::CalculateCumulantsIntFlow() |
4310 | ||
489d5531 | 4311 | //================================================================================================================================ |
4312 | ||
b92ea2b9 | 4313 | void AliFlowAnalysisWithQCumulants::CalculateReferenceFlow() |
489d5531 | 4314 | { |
b92ea2b9 | 4315 | // a) Calculate the final results for reference flow estimates from Q-cumulants; |
4316 | // b) Propagate the statistical errors to reference flow estimates from statistical error of Q-cumulants; | |
0328db2d | 4317 | // c) Store the results and statistical errors of reference flow estimates in histogram fIntFlow. |
489d5531 | 4318 | // Binning of fIntFlow is organized as follows: |
4319 | // | |
b3dacf6b | 4320 | // 1st bin: v{2,QC} |
4321 | // 2nd bin: v{4,QC} | |
4322 | // 3rd bin: v{6,QC} | |
4323 | // 4th bin: v{8,QC} | |
4324 | // | |
489d5531 | 4325 | |
b3dacf6b | 4326 | // Reference flow estimates: |
489d5531 | 4327 | Double_t v2 = 0.; // v{2,QC} |
4328 | Double_t v4 = 0.; // v{4,QC} | |
4329 | Double_t v6 = 0.; // v{6,QC} | |
4330 | Double_t v8 = 0.; // v{8,QC} | |
b3dacf6b | 4331 | // Reference flow's statistical errors: |
4332 | Double_t v2Error = 0.; // v{2,QC} stat. error | |
4333 | Double_t v4Error = 0.; // v{4,QC} stat. error | |
4334 | Double_t v6Error = 0.; // v{6,QC} stat. error | |
4335 | Double_t v8Error = 0.; // v{8,QC} stat. error | |
4336 | ||
b92ea2b9 | 4337 | // Q-cumulants: |
4338 | Double_t qc2 = fIntFlowQcumulants->GetBinContent(1); // QC{2} | |
4339 | Double_t qc4 = fIntFlowQcumulants->GetBinContent(2); // QC{4} | |
4340 | Double_t qc6 = fIntFlowQcumulants->GetBinContent(3); // QC{6} | |
4341 | Double_t qc8 = fIntFlowQcumulants->GetBinContent(4); // QC{8} | |
4342 | // Q-cumulants's statistical errors: | |
4343 | Double_t qc2Error = fIntFlowQcumulants->GetBinError(1); // QC{2} stat. error | |
4344 | Double_t qc4Error = fIntFlowQcumulants->GetBinError(2); // QC{4} stat. error | |
4345 | Double_t qc6Error = fIntFlowQcumulants->GetBinError(3); // QC{6} stat. error | |
4346 | Double_t qc8Error = fIntFlowQcumulants->GetBinError(4); // QC{8} stat. error | |
4347 | // Calculate reference flow estimates from Q-cumulants: | |
4348 | if(qc2>=0.){v2 = pow(qc2,1./2.);} | |
4349 | if(qc4<=0.){v4 = pow(-1.*qc4,1./4.);} | |
4350 | if(qc6>=0.){v6 = pow((1./4.)*qc6,1./6.);} | |
4351 | if(qc8<=0.){v8 = pow((-1./33.)*qc8,1./8.);} | |
4352 | // Calculate stat. error for reference flow estimates from stat. error of Q-cumulants: | |
4353 | if(qc2>0.){v2Error = (1./2.)*pow(qc2,-1./2.)*qc2Error;} | |
4354 | if(qc4<0.){v4Error = (1./4.)*pow(-qc4,-3./4.)*qc4Error;} | |
4355 | if(qc6>0.){v6Error = (1./6.)*pow(2.,-1./3.)*pow(qc6,-5./6.)*qc6Error;} | |
4356 | if(qc8<0.){v8Error = (1./8.)*pow(33.,-1./8.)*pow(-qc8,-7./8.)*qc8Error;} | |
4357 | // Print warnings for the 'wrong sign' cumulants: | |
4358 | if(TMath::Abs(v2) < 1.e-44) | |
4359 | { | |
4360 | cout<<" WARNING: Wrong sign QC{2}, couldn't calculate v{2,QC} !!!!"<<endl; | |
4361 | } | |
4362 | if(TMath::Abs(v4) < 1.e-44) | |
4363 | { | |
4364 | cout<<" WARNING: Wrong sign QC{4}, couldn't calculate v{4,QC} !!!!"<<endl; | |
4365 | } | |
4366 | if(TMath::Abs(v6) < 1.e-44) | |
4367 | { | |
4368 | cout<<" WARNING: Wrong sign QC{6}, couldn't calculate v{6,QC} !!!!"<<endl; | |
4369 | } | |
4370 | if(TMath::Abs(v8) < 1.e-44) | |
4371 | { | |
4372 | cout<<" WARNING: Wrong sign QC{8}, couldn't calculate v{8,QC} !!!!"<<endl; | |
4373 | } | |
4374 | // Store the results and statistical errors of integrated flow estimates: | |
4375 | fIntFlow->SetBinContent(1,v2); | |
4376 | fIntFlow->SetBinError(1,v2Error); | |
4377 | fIntFlow->SetBinContent(2,v4); | |
4378 | fIntFlow->SetBinError(2,v4Error); | |
4379 | fIntFlow->SetBinContent(3,v6); | |
4380 | fIntFlow->SetBinError(3,v6Error); | |
4381 | fIntFlow->SetBinContent(4,v8); | |
4382 | fIntFlow->SetBinError(4,v8Error); | |
4383 | ||
4384 | // Versus multiplicity: | |
4385 | if(!fCalculateCumulantsVsM){return;} | |
4386 | Int_t nBins = fIntFlowCorrelationsVsMPro[0]->GetNbinsX(); // to be improved (hardwired 0) | |
4387 | for(Int_t b=1;b<=nBins;b++) | |
9da1a4f3 | 4388 | { |
4389 | // Q-cumulants: | |
b92ea2b9 | 4390 | Double_t qc2VsM = fIntFlowQcumulantsVsM[0]->GetBinContent(b); // QC{2} |
4391 | Double_t qc4VsM = fIntFlowQcumulantsVsM[1]->GetBinContent(b); // QC{4} | |
4392 | Double_t qc6VsM = fIntFlowQcumulantsVsM[2]->GetBinContent(b); // QC{6} | |
4393 | Double_t qc8VsM = fIntFlowQcumulantsVsM[3]->GetBinContent(b); // QC{8} | |
b3dacf6b | 4394 | // Q-cumulants's statistical errors: |
b92ea2b9 | 4395 | Double_t qc2ErrorVsM = fIntFlowQcumulantsVsM[0]->GetBinError(b); // QC{2} stat. error |
4396 | Double_t qc4ErrorVsM = fIntFlowQcumulantsVsM[1]->GetBinError(b); // QC{4} stat. error | |
4397 | Double_t qc6ErrorVsM = fIntFlowQcumulantsVsM[2]->GetBinError(b); // QC{6} stat. error | |
4398 | Double_t qc8ErrorVsM = fIntFlowQcumulantsVsM[3]->GetBinError(b); // QC{8} stat. error | |
b3dacf6b | 4399 | // Reference flow estimates: |
b92ea2b9 | 4400 | Double_t v2VsM = 0.; // v{2,QC} |
4401 | Double_t v4VsM = 0.; // v{4,QC} | |
4402 | Double_t v6VsM = 0.; // v{6,QC} | |
4403 | Double_t v8VsM = 0.; // v{8,QC} | |
4404 | // Reference flow estimates errors: | |
4405 | Double_t v2ErrorVsM = 0.; // v{2,QC} stat. error | |
4406 | Double_t v4ErrorVsM = 0.; // v{4,QC} stat. error | |
4407 | Double_t v6ErrorVsM = 0.; // v{6,QC} stat. error | |
4408 | Double_t v8ErrorVsM = 0.; // v{8,QC} stat. error | |
b3dacf6b | 4409 | // Calculate reference flow estimates from Q-cumulants: |
b92ea2b9 | 4410 | if(qc2VsM>=0.){v2VsM = pow(qc2VsM,1./2.);} |
4411 | if(qc4VsM<=0.){v4VsM = pow(-1.*qc4VsM,1./4.);} | |
4412 | if(qc6VsM>=0.){v6VsM = pow((1./4.)*qc6VsM,1./6.);} | |
4413 | if(qc8VsM<=0.){v8VsM = pow((-1./33.)*qc8VsM,1./8.);} | |
b3dacf6b | 4414 | // Calculate stat. error for reference flow estimates from stat. error of Q-cumulants: |
b92ea2b9 | 4415 | if(qc2VsM>0.){v2ErrorVsM = (1./2.)*pow(qc2VsM,-1./2.)*qc2ErrorVsM;} |
4416 | if(qc4VsM<0.){v4ErrorVsM = (1./4.)*pow(-qc4VsM,-3./4.)*qc4ErrorVsM;} | |
4417 | if(qc6VsM>0.){v6ErrorVsM = (1./6.)*pow(2.,-1./3.)*pow(qc6VsM,-5./6.)*qc6ErrorVsM;} | |
4418 | if(qc8VsM<0.){v8ErrorVsM = (1./8.)*pow(33.,-1./8.)*pow(-qc8VsM,-7./8.)*qc8ErrorVsM;} | |
b3dacf6b | 4419 | // Store the results and statistical errors of integrated flow estimates: |
b92ea2b9 | 4420 | fIntFlowVsM[0]->SetBinContent(b,v2VsM); |
4421 | fIntFlowVsM[0]->SetBinError(b,v2ErrorVsM); | |
4422 | fIntFlowVsM[1]->SetBinContent(b,v4VsM); | |
4423 | fIntFlowVsM[1]->SetBinError(b,v4ErrorVsM); | |
4424 | fIntFlowVsM[2]->SetBinContent(b,v6VsM); | |
4425 | fIntFlowVsM[2]->SetBinError(b,v6ErrorVsM); | |
4426 | fIntFlowVsM[3]->SetBinContent(b,v8VsM); | |
4427 | fIntFlowVsM[3]->SetBinError(b,v8ErrorVsM); | |
4428 | } // end of for(Int_t b=1;b<=nBins;b++) | |
4429 | ||
4430 | // 'Rebinned in M' calculation: // to be improved - this can be implemented better: | |
4431 | // Reference flow estimates: | |
4432 | Double_t v2RebinnedInM = 0.; // v{2,QC} | |
4433 | Double_t v4RebinnedInM = 0.; // v{4,QC} | |
4434 | Double_t v6RebinnedInM = 0.; // v{6,QC} | |
4435 | Double_t v8RebinnedInM = 0.; // v{8,QC} | |
4436 | // Reference flow's statistical errors: | |
4437 | Double_t v2ErrorRebinnedInM = 0.; // v{2,QC} stat. error | |
4438 | Double_t v4ErrorRebinnedInM = 0.; // v{4,QC} stat. error | |
4439 | Double_t v6ErrorRebinnedInM = 0.; // v{6,QC} stat. error | |
4440 | Double_t v8ErrorRebinnedInM = 0.; // v{8,QC} stat. error | |
4441 | // Q-cumulants: | |
4442 | Double_t qc2RebinnedInM = fIntFlowQcumulantsRebinnedInM->GetBinContent(1); // QC{2} | |
4443 | Double_t qc4RebinnedInM = fIntFlowQcumulantsRebinnedInM->GetBinContent(2); // QC{4} | |
4444 | Double_t qc6RebinnedInM = fIntFlowQcumulantsRebinnedInM->GetBinContent(3); // QC{6} | |
4445 | Double_t qc8RebinnedInM = fIntFlowQcumulantsRebinnedInM->GetBinContent(4); // QC{8} | |
4446 | // Q-cumulants's statistical errors: | |
4447 | Double_t qc2ErrorRebinnedInM = fIntFlowQcumulantsRebinnedInM->GetBinError(1); // QC{2} stat. error | |
4448 | Double_t qc4ErrorRebinnedInM = fIntFlowQcumulantsRebinnedInM->GetBinError(2); // QC{4} stat. error | |
4449 | Double_t qc6ErrorRebinnedInM = fIntFlowQcumulantsRebinnedInM->GetBinError(3); // QC{6} stat. error | |
4450 | Double_t qc8ErrorRebinnedInM = fIntFlowQcumulantsRebinnedInM->GetBinError(4); // QC{8} stat. error | |
4451 | // Calculate reference flow estimates from Q-cumulants: | |
4452 | if(qc2RebinnedInM>=0.){v2RebinnedInM = pow(qc2RebinnedInM,1./2.);} | |
4453 | if(qc4RebinnedInM<=0.){v4RebinnedInM = pow(-1.*qc4RebinnedInM,1./4.);} | |
4454 | if(qc6RebinnedInM>=0.){v6RebinnedInM = pow((1./4.)*qc6RebinnedInM,1./6.);} | |
4455 | if(qc8RebinnedInM<=0.){v8RebinnedInM = pow((-1./33.)*qc8RebinnedInM,1./8.);} | |
4456 | // Calculate stat. error for reference flow estimates from stat. error of Q-cumulants: | |
4457 | if(qc2RebinnedInM>0.){v2ErrorRebinnedInM = (1./2.)*pow(qc2RebinnedInM,-1./2.)*qc2ErrorRebinnedInM;} | |
4458 | if(qc4RebinnedInM<0.){v4ErrorRebinnedInM = (1./4.)*pow(-qc4RebinnedInM,-3./4.)*qc4ErrorRebinnedInM;} | |
4459 | if(qc6RebinnedInM>0.){v6ErrorRebinnedInM = (1./6.)*pow(2.,-1./3.)*pow(qc6RebinnedInM,-5./6.)*qc6ErrorRebinnedInM;} | |
4460 | if(qc8RebinnedInM<0.){v8ErrorRebinnedInM = (1./8.)*pow(33.,-1./8.)*pow(-qc8RebinnedInM,-7./8.)*qc8ErrorRebinnedInM;} | |
4461 | // Print warnings for the 'wrong sign' cumulants: | |
4462 | if(TMath::Abs(v2RebinnedInM) < 1.e-44) | |
4463 | { | |
4464 | cout<<" WARNING: Wrong sign QC{2} rebinned in M, couldn't calculate v{2,QC} !!!!"<<endl; | |
4465 | } | |
4466 | if(TMath::Abs(v4RebinnedInM) < 1.e-44) | |
4467 | { | |
4468 | cout<<" WARNING: Wrong sign QC{4} rebinned in M, couldn't calculate v{4,QC} !!!!"<<endl; | |
4469 | } | |
4470 | if(TMath::Abs(v6RebinnedInM) < 1.e-44) | |
4471 | { | |
4472 | cout<<" WARNING: Wrong sign QC{6} rebinned in M, couldn't calculate v{6,QC} !!!!"<<endl; | |
4473 | } | |
4474 | if(TMath::Abs(v8RebinnedInM) < 1.e-44) | |
4475 | { | |
4476 | cout<<" WARNING: Wrong sign QC{8} rebinned in M, couldn't calculate v{8,QC} !!!!"<<endl; | |
4477 | } | |
4478 | // Store the results and statistical errors of integrated flow estimates: | |
4479 | fIntFlowRebinnedInM->SetBinContent(1,v2RebinnedInM); | |
4480 | fIntFlowRebinnedInM->SetBinError(1,v2ErrorRebinnedInM); | |
4481 | fIntFlowRebinnedInM->SetBinContent(2,v4RebinnedInM); | |
4482 | fIntFlowRebinnedInM->SetBinError(2,v4ErrorRebinnedInM); | |
4483 | fIntFlowRebinnedInM->SetBinContent(3,v6RebinnedInM); | |
4484 | fIntFlowRebinnedInM->SetBinError(3,v6ErrorRebinnedInM); | |
4485 | fIntFlowRebinnedInM->SetBinContent(4,v8RebinnedInM); | |
4486 | fIntFlowRebinnedInM->SetBinError(4,v8ErrorRebinnedInM); | |
4487 | ||
4488 | } // end of AliFlowAnalysisWithQCumulants::CalculateReferenceFlow() | |
489d5531 | 4489 | |
489d5531 | 4490 | //================================================================================================================================ |
4491 | ||
489d5531 | 4492 | void AliFlowAnalysisWithQCumulants::FillCommonHistResultsIntFlow() |
4493 | { | |
0dd3b008 | 4494 | // Fill in AliFlowCommonHistResults histograms relevant for reference flow. |
489d5531 | 4495 | |
0dd3b008 | 4496 | // There are two possibilities here: |
4497 | // a) Store minimum bias reference flow - use SetMinimumBiasReferenceFlow(kTRUE). This result is | |
4498 | // biased by the interplay between nonflow correlations and multiplicity fluctuations and is | |
4499 | // also stored in local histogram fIntFlow; | |
4500 | // b) Store reference flow obtained from flow analysis performed at fixed multiplicity and | |
4501 | // rebinned only at the end of the day - use SetMinimumBiasReferenceFlow(kFALSE). This result | |
4502 | // is also stored in local histogram fIntFlowRebinnedInM. | |
489d5531 | 4503 | |
0dd3b008 | 4504 | // Reference flow estimates: |
4505 | Double_t v[4] = {0.}; | |
4506 | // Statistical errors of reference flow estimates: | |
4507 | Double_t vError[4] = {0.}; | |
489d5531 | 4508 | |
0dd3b008 | 4509 | for(Int_t b=0;b<4;b++) |
4510 | { | |
4511 | if(fMinimumBiasReferenceFlow) | |
4512 | { | |
4513 | v[b] = fIntFlow->GetBinContent(b+1); | |
4514 | vError[b] = fIntFlow->GetBinError(b+1); | |
4515 | } else | |
4516 | { | |
4517 | v[b] = fIntFlowRebinnedInM->GetBinContent(b+1); | |
4518 | vError[b] = fIntFlowRebinnedInM->GetBinError(b+1); | |
4519 | } | |
4520 | } // end of for(Int_t b=0;b<4;b++) | |
4521 | ||
4522 | // Fill AliFlowCommonHistResults histogram: | |
4523 | fCommonHistsResults2nd->FillIntegratedFlow(v[0],vError[0]); // to be improved (hardwired 2nd in the name) | |
4524 | fCommonHistsResults4th->FillIntegratedFlow(v[1],vError[1]); // to be improved (hardwired 4th in the name) | |
489d5531 | 4525 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) // to be improved (calculate also 6th and 8th order) |
4526 | { | |
0dd3b008 | 4527 | fCommonHistsResults6th->FillIntegratedFlow(v[2],vError[2]); // to be improved (hardwired 6th in the name) |
4528 | fCommonHistsResults8th->FillIntegratedFlow(v[3],vError[3]); // to be improved (hardwired 8th in the name) | |
489d5531 | 4529 | } |
4530 | ||
4531 | } // end of AliFlowAnalysisWithQCumulants::FillCommonHistResultsIntFlow() | |
4532 | ||
489d5531 | 4533 | //================================================================================================================================ |
4534 | ||
489d5531 | 4535 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelationsUsingParticleWeights() |
4536 | { | |
4537 | // Calculate all correlations needed for integrated flow using particle weights. | |
4538 | ||
4539 | // Remark 1: When particle weights are used the binning of fIntFlowCorrelationAllPro is organized as follows: | |
4540 | // | |
4541 | // 1st bin: <2>_{1n|1n} = two1n1nW1W1 = <w1 w2 cos(n*(phi1-phi2))> | |
4542 | // 2nd bin: <2>_{2n|2n} = two2n2nW2W2 = <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
4543 | // 3rd bin: <2>_{3n|3n} = two3n3nW3W3 = <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
4544 | // 4th bin: <2>_{4n|4n} = two4n4nW4W4 = <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
4545 | // 5th bin: ---- EMPTY ---- | |
4546 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1nW2W1W1 = <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
4547 | // 7th bin: <3>_{3n|2n,1n} = ... | |
4548 | // 8th bin: <3>_{4n|2n,2n} = ... | |
4549 | // 9th bin: <3>_{4n|3n,1n} = ... | |
4550 | // 10th bin: ---- EMPTY ---- | |
4551 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1nW1W1W1W1 = <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> | |
4552 | // 12th bin: <4>_{2n,1n|2n,1n} = ... | |
4553 | // 13th bin: <4>_{2n,2n|2n,2n} = ... | |
4554 | // 14th bin: <4>_{3n|1n,1n,1n} = ... | |
4555 | // 15th bin: <4>_{3n,1n|3n,1n} = ... | |
4556 | // 16th bin: <4>_{3n,1n|2n,2n} = ... | |
4557 | // 17th bin: <4>_{4n|2n,1n,1n} = ... | |
4558 | // 18th bin: ---- EMPTY ---- | |
4559 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = ... | |
4560 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = ... | |
4561 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = ... | |
4562 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = ... | |
4563 | // 23rd bin: ---- EMPTY ---- | |
4564 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = ... | |
4565 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = ... | |
4566 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = ... | |
4567 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = ... | |
4568 | // 28th bin: ---- EMPTY ---- | |
4569 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = ... | |
4570 | // 30th bin: ---- EMPTY ---- | |
4571 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = ... | |
4572 | ||
4573 | // Remark 2: When particle weights are used there are some extra correlations. They are stored in | |
4574 | // fIntFlowExtraCorrelationsPro binning of which is organized as follows: | |
4575 | ||
4576 | // 1st bin: two1n1nW3W1 = <w1^3 w2 cos(n*(phi1-phi2))> | |
4577 | // 2nd bin: two1n1nW1W1W2 = <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
4578 | ||
4579 | // multiplicity (number of particles used to determine the reaction plane) | |
4580 | Double_t dMult = (*fSMpk)(0,0); | |
4581 | ||
4582 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
4583 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
4584 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
4585 | Double_t dReQ3n3k = (*fReQ)(2,3); | |
4586 | Double_t dReQ4n4k = (*fReQ)(3,4); | |
4587 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
4588 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
4589 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
4590 | Double_t dImQ3n3k = (*fImQ)(2,3); | |
4591 | Double_t dImQ4n4k = (*fImQ)(3,4); | |
4592 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
4593 | ||
4594 | // dMs are variables introduced in order to simplify some Eqs. bellow: | |
4595 | //.............................................................................................. | |
4596 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
4597 | Double_t dM22 = (*fSMpk)(1,2)-(*fSMpk)(0,4); // dM22 = sum_{i,j=1,i!=j}^M w_i^2 w_j^2 | |
4598 | Double_t dM33 = (*fSMpk)(1,3)-(*fSMpk)(0,6); // dM33 = sum_{i,j=1,i!=j}^M w_i^3 w_j^3 | |
4599 | Double_t dM44 = (*fSMpk)(1,4)-(*fSMpk)(0,8); // dM44 = sum_{i,j=1,i!=j}^M w_i^4 w_j^4 | |
4600 | 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 | |
4601 | Double_t dM211 = (*fSMpk)(0,2)*(*fSMpk)(1,1)-2.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
4602 | - (*fSMpk)(1,2)+2.*(*fSMpk)(0,4); // dM211 = sum_{i,j,k=1,i!=j!=k}^M w_i^2 w_j w_k | |
4603 | Double_t dM1111 = (*fSMpk)(3,1)-6.*(*fSMpk)(0,2)*(*fSMpk)(1,1) | |
4604 | + 8.*(*fSMpk)(0,3)*(*fSMpk)(0,1) | |
4605 | + 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 | |
4606 | //.............................................................................................. | |
4607 | ||
4608 | // 2-particle correlations: | |
4609 | Double_t two1n1nW1W1 = 0.; // <w1 w2 cos(n*(phi1-phi2))> | |
4610 | Double_t two2n2nW2W2 = 0.; // <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
4611 | Double_t two3n3nW3W3 = 0.; // <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
4612 | Double_t two4n4nW4W4 = 0.; // <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
4613 | if(dMult>1) | |
4614 | { | |
4615 | if(dM11) | |
4616 | { | |
4617 | two1n1nW1W1 = (pow(dReQ1n1k,2)+pow(dImQ1n1k,2)-(*fSMpk)(0,2))/dM11; | |
4618 | // average correlation <w1 w2 cos(n*(phi1-phi2))> for single event: | |
4619 | fIntFlowCorrelationsEBE->SetBinContent(1,two1n1nW1W1); | |
4620 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(1,dM11); | |
4621 | // average correlation <w1 w2 cos(n*(phi1-phi2))> for all events: | |
4622 | fIntFlowCorrelationsPro->Fill(0.5,two1n1nW1W1,dM11); | |
4623 | fIntFlowCorrelationsAllPro->Fill(0.5,two1n1nW1W1,dM11); | |
4624 | } | |
4625 | if(dM22) | |
4626 | { | |
4627 | two2n2nW2W2 = (pow(dReQ2n2k,2)+pow(dImQ2n2k,2)-(*fSMpk)(0,4))/dM22; | |
4628 | // ... | |
4629 | // average correlation <w1^2 w2^2 cos(2n*(phi1-phi2))> for all events: | |
4630 | fIntFlowCorrelationsAllPro->Fill(1.5,two2n2nW2W2,dM22); | |
4631 | } | |
4632 | if(dM33) | |
4633 | { | |
4634 | two3n3nW3W3 = (pow(dReQ3n3k,2)+pow(dImQ3n3k,2)-(*fSMpk)(0,6))/dM33; | |
4635 | // ... | |
4636 | // average correlation <w1^3 w2^3 cos(3n*(phi1-phi2))> for all events: | |
4637 | fIntFlowCorrelationsAllPro->Fill(2.5,two3n3nW3W3,dM33); | |
4638 | } | |
4639 | if(dM44) | |
4640 | { | |
4641 | two4n4nW4W4 = (pow(dReQ4n4k,2)+pow(dImQ4n4k,2)-(*fSMpk)(0,8))/dM44; | |
4642 | // ... | |
4643 | // average correlation <w1^4 w2^4 cos(4n*(phi1-phi2))> for all events: | |
4644 | fIntFlowCorrelationsAllPro->Fill(3.5,two4n4nW4W4,dM44); | |
4645 | } | |
4646 | } // end of if(dMult>1) | |
4647 | ||
4648 | // extra 2-particle correlations: | |
4649 | Double_t two1n1nW3W1 = 0.; // <w1^3 w2 cos(n*(phi1-phi2))> | |
4650 | Double_t two1n1nW1W1W2 = 0.; // <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
4651 | if(dMult>1) | |
4652 | { | |
4653 | if(dM31) | |
4654 | { | |
4655 | two1n1nW3W1 = (dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k-(*fSMpk)(0,4))/dM31; | |
4656 | fIntFlowExtraCorrelationsPro->Fill(0.5,two1n1nW3W1,dM31); | |
4657 | } | |
4658 | if(dM211) | |
4659 | { | |
4660 | two1n1nW1W1W2 = ((*fSMpk)(0,2)*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)-(*fSMpk)(0,2)) | |
4661 | - 2.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k | |
4662 | - (*fSMpk)(0,4)))/dM211; | |
4663 | fIntFlowExtraCorrelationsPro->Fill(1.5,two1n1nW1W1W2,dM211); | |
4664 | } | |
4665 | } // end of if(dMult>1) | |
4666 | //.............................................................................................. | |
4667 | ||
4668 | //.............................................................................................. | |
4669 | // 3-particle correlations: | |
4670 | Double_t three2n1n1nW2W1W1 = 0.; // <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
4671 | ||
4672 | if(dMult>2) | |
4673 | { | |
4674 | if(dM211) | |
4675 | { | |
4676 | three2n1n1nW2W1W1 = (pow(dReQ1n1k,2.)*dReQ2n2k+2.*dReQ1n1k*dImQ1n1k*dImQ2n2k-pow(dImQ1n1k,2.)*dReQ2n2k | |
4677 | - 2.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k) | |
4678 | - pow(dReQ2n2k,2)-pow(dImQ2n2k,2) | |
4679 | + 2.*(*fSMpk)(0,4))/dM211; | |
4680 | fIntFlowCorrelationsAllPro->Fill(5.5,three2n1n1nW2W1W1,dM211); | |
4681 | } | |
4682 | } // end of if(dMult>2) | |
4683 | //.............................................................................................. | |
4684 | ||
4685 | //.............................................................................................. | |
4686 | // 4-particle correlations: | |
4687 | Double_t four1n1n1n1nW1W1W1W1 = 0.; // <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> | |
4688 | if(dMult>3) | |
4689 | { | |
4690 | if(dM1111) | |
4691 | { | |
4692 | four1n1n1n1nW1W1W1W1 = (pow(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.),2) | |
4693 | - 2.*(pow(dReQ1n1k,2.)*dReQ2n2k+2.*dReQ1n1k*dImQ1n1k*dImQ2n2k-pow(dImQ1n1k,2.)*dReQ2n2k) | |
4694 | + 8.*(dReQ1n3k*dReQ1n1k+dImQ1n3k*dImQ1n1k) | |
4695 | + (pow(dReQ2n2k,2)+pow(dImQ2n2k,2)) | |
4696 | - 4.*(*fSMpk)(0,2)*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)) | |
4697 | - 6.*(*fSMpk)(0,4)+2.*(*fSMpk)(1,2))/dM1111; | |
4698 | ||
4699 | // average correlation <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> for single event: | |
4700 | fIntFlowCorrelationsEBE->SetBinContent(2,four1n1n1n1nW1W1W1W1); | |
4701 | fIntFlowEventWeightsForCorrelationsEBE->SetBinContent(2,dM1111); | |
4702 | // average correlation <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> for all events: | |
4703 | fIntFlowCorrelationsPro->Fill(1.5,four1n1n1n1nW1W1W1W1,dM1111); | |
4704 | fIntFlowCorrelationsAllPro->Fill(10.5,four1n1n1n1nW1W1W1W1,dM1111); | |
4705 | } | |
4706 | } // end of if(dMult>3) | |
4707 | //.............................................................................................. | |
4708 | ||
4709 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrelationsUsingParticleWeights() | |
4710 | ||
489d5531 | 4711 | //================================================================================================================================ |
4712 | ||
489d5531 | 4713 | void AliFlowAnalysisWithQCumulants::InitializeArraysForIntFlow() |
4714 | { | |
4715 | // Initialize all arrays used to calculate integrated flow. | |
4716 | ||
4717 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
4718 | { | |
4719 | fIntFlowCorrectionTermsForNUAEBE[sc] = NULL; | |
0328db2d | 4720 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[sc] = NULL; |
489d5531 | 4721 | fIntFlowCorrectionTermsForNUAPro[sc] = NULL; |
4722 | fIntFlowCorrectionTermsForNUAHist[sc] = NULL; | |
b92ea2b9 | 4723 | for(Int_t ci=0;ci<4;ci++) // correction term index (to be improved - hardwired 4) |
2001bc3a | 4724 | { |
4725 | fIntFlowCorrectionTermsForNUAVsMPro[sc][ci] = NULL; | |
4726 | } | |
0328db2d | 4727 | for(Int_t power=0;power<2;power++) // linear or quadratic |
4728 | { | |
4729 | fIntFlowSumOfEventWeightsNUA[sc][power] = NULL; | |
4730 | } | |
489d5531 | 4731 | } |
4732 | for(Int_t power=0;power<2;power++) // linear or quadratic | |
4733 | { | |
4734 | fIntFlowSumOfEventWeights[power] = NULL; | |
4735 | } | |
b3dacf6b | 4736 | for(Int_t i=0;i<4;i++) // print on the screen the final results (0=RF, 1=RP, 2=POI, 3=RF (rebbined in M)) |
489d5531 | 4737 | { |
4738 | fPrintFinalResults[i] = kTRUE; | |
4739 | } | |
ff70ca91 | 4740 | for(Int_t ci=0;ci<4;ci++) // correlation index or cumulant order |
4741 | { | |
4742 | fIntFlowCorrelationsVsMPro[ci] = NULL; | |
4743 | fIntFlowCorrelationsVsMHist[ci] = NULL; | |
4744 | fIntFlowQcumulantsVsM[ci] = NULL; | |
4745 | fIntFlowVsM[ci] = NULL; | |
2001bc3a | 4746 | fIntFlowDetectorBiasVsM[ci] = NULL; |
ff70ca91 | 4747 | for(Int_t lc=0;lc<2;lc++) |
4748 | { | |
4749 | fIntFlowSumOfEventWeightsVsM[ci][lc] = NULL; | |
4750 | } | |
4751 | } | |
4752 | for(Int_t pi=0;pi<6;pi++) // product or covariance index | |
4753 | { | |
4754 | fIntFlowProductOfCorrelationsVsMPro[pi] = NULL; | |
4755 | fIntFlowCovariancesVsM[pi] = NULL; | |
4756 | fIntFlowSumOfProductOfEventWeightsVsM[pi] = NULL; | |
4757 | } | |
4758 | ||
489d5531 | 4759 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForIntFlow() |
4760 | ||
489d5531 | 4761 | //================================================================================================================================ |
4762 | ||
489d5531 | 4763 | void AliFlowAnalysisWithQCumulants::InitializeArraysForDiffFlow() |
4764 | { | |
4765 | // Initialize all arrays needed to calculate differential flow. | |
4766 | // a) Initialize lists holding profiles; | |
4767 | // b) Initialize lists holding histograms; | |
4768 | // c) Initialize event-by-event quantities; | |
4769 | // d) Initialize profiles; | |
4770 | // e) Initialize histograms holding final results. | |
4771 | ||
4772 | // a) Initialize lists holding profiles; | |
4773 | for(Int_t t=0;t<2;t++) // type (RP, POI) | |
4774 | { | |
4775 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4776 | { | |
4777 | fDiffFlowCorrelationsProList[t][pe] = NULL; | |
4778 | fDiffFlowProductOfCorrelationsProList[t][pe] = NULL; | |
4779 | fDiffFlowCorrectionsProList[t][pe] = NULL; | |
4780 | } | |
4781 | } | |
4782 | ||
4783 | // b) Initialize lists holding histograms; | |
4784 | for(Int_t t=0;t<2;t++) // type (RP, POI) | |
4785 | { | |
4786 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4787 | { | |
4788 | fDiffFlowCorrelationsHistList[t][pe] = NULL; | |
4789 | for(Int_t power=0;power<2;power++) | |
4790 | { | |
4791 | fDiffFlowSumOfEventWeightsHistList[t][pe][power] = NULL; | |
4792 | } // end of for(Int_t power=0;power<2;power++) | |
4793 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe] = NULL; | |
4794 | fDiffFlowCorrectionsHistList[t][pe] = NULL; | |
4795 | fDiffFlowCovariancesHistList[t][pe] = NULL; | |
4796 | fDiffFlowCumulantsHistList[t][pe] = NULL; | |
4797 | fDiffFlowHistList[t][pe] = NULL; | |
4798 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4799 | } // enf of for(Int_t t=0;t<2;t++) // type (RP, POI) | |
4800 | ||
4801 | // c) Initialize event-by-event quantities: | |
4802 | // 1D: | |
4803 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
4804 | { | |
4805 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4806 | { | |
4807 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
4808 | { | |
4809 | for(Int_t k=0;k<9;k++) // power of weight | |
4810 | { | |
4811 | fReRPQ1dEBE[t][pe][m][k] = NULL; | |
4812 | fImRPQ1dEBE[t][pe][m][k] = NULL; | |
4813 | fs1dEBE[t][pe][k] = NULL; // to be improved (this doesn't need to be within loop over m) | |
4814 | } | |
4815 | } | |
4816 | } | |
4817 | } | |
4818 | // 1D: | |
4819 | for(Int_t t=0;t<2;t++) // type (RP or POI) | |
4820 | { | |
4821 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4822 | { | |
4823 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
4824 | { | |
4825 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
4826 | { | |
4827 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][sc][cti] = NULL; | |
4828 | } | |
4829 | } | |
4830 | } | |
4831 | } | |
4832 | // 2D: | |
4833 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
4834 | { | |
4835 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
4836 | { | |
4837 | for(Int_t k=0;k<9;k++) // power of weight | |
4838 | { | |
4839 | fReRPQ2dEBE[t][m][k] = NULL; | |
4840 | fImRPQ2dEBE[t][m][k] = NULL; | |
4841 | fs2dEBE[t][k] = NULL; // to be improved (this doesn't need to be within loop over m) | |
4842 | } | |
4843 | } | |
4844 | } | |
4845 | ||
4846 | // d) Initialize profiles: | |
4847 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
4848 | { | |
4849 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4850 | { | |
4851 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
4852 | { | |
4853 | fDiffFlowCorrelationsPro[t][pe][ci] = NULL; | |
4854 | } // end of for(Int_t ci=0;ci<4;ci++) | |
4855 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
4856 | { | |
4857 | for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index | |
4858 | { | |
4859 | fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2] = NULL; | |
4860 | } // end of for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index | |
4861 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
4862 | // correction terms for nua: | |
4863 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
4864 | { | |
4865 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
4866 | { | |
4867 | fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti] = NULL; | |
4868 | } | |
4869 | } | |
4870 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4871 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
4872 | ||
4873 | // e) Initialize histograms holding final results. | |
4874 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
4875 | { | |
4876 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4877 | { | |
4878 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
4879 | { | |
4880 | fDiffFlowCorrelationsHist[t][pe][ci] = NULL; | |
4881 | fDiffFlowCumulants[t][pe][ci] = NULL; | |
4882 | fDiffFlow[t][pe][ci] = NULL; | |
4883 | } // end of for(Int_t ci=0;ci<4;ci++) | |
4884 | for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++) | |
4885 | { | |
4886 | fDiffFlowCovariances[t][pe][covarianceIndex] = NULL; | |
4887 | } // end of for(Int_t covarianceIndex=0;covarianceIndex<5;covarianceIndex++) | |
4888 | // correction terms for nua: | |
4889 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
4890 | { | |
4891 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
4892 | { | |
4893 | fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti] = NULL; | |
4894 | } | |
4895 | } | |
4896 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4897 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
4898 | ||
4899 | // sum of event weights for reduced correlations: | |
4900 | for(Int_t t=0;t<2;t++) // type = RP or POI | |
4901 | { | |
4902 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4903 | { | |
4904 | for(Int_t p=0;p<2;p++) // power of weight is 1 or 2 | |
4905 | { | |
4906 | for(Int_t ew=0;ew<4;ew++) // event weight index for reduced correlations | |
4907 | { | |
4908 | fDiffFlowSumOfEventWeights[t][pe][p][ew] = NULL; | |
4909 | } | |
4910 | } | |
4911 | } | |
4912 | } | |
4913 | // product of event weights for both types of correlations: | |
4914 | for(Int_t t=0;t<2;t++) // type = RP or POI | |
4915 | { | |
4916 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
4917 | { | |
4918 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
4919 | { | |
4920 | for(Int_t mci2=0;mci2<8;mci2++) // mixed correlation index | |
4921 | { | |
4922 | fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] = NULL; | |
4923 | } | |
4924 | } | |
4925 | } | |
4926 | } | |
4927 | ||
4928 | ||
4929 | ||
4930 | ||
4931 | /* | |
4932 | ||
4933 | // nested lists in fDiffFlowProfiles: | |
4934 | for(Int_t t=0;t<2;t++) | |
4935 | { | |
4936 | fDFPType[t] = NULL; | |
4937 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1) | |
4938 | { | |
4939 | fDFPParticleWeights[t][pW] = NULL; | |
4940 | for(Int_t eW=0;eW<2;eW++) | |
4941 | { | |
4942 | fDFPEventWeights[t][pW][eW] = NULL; | |
4943 | fDiffFlowCorrelations[t][pW][eW] = NULL; | |
4944 | fDiffFlowProductsOfCorrelations[t][pW][eW] = NULL; | |
4945 | for(Int_t sc=0;sc<2;sc++) | |
4946 | { | |
4947 | fDiffFlowCorrectionTerms[t][pW][eW][sc] = NULL; | |
4948 | } | |
4949 | } | |
4950 | } | |
4951 | } | |
4952 | ||
4953 | ||
4954 | */ | |
4955 | ||
4956 | ||
4957 | ||
4958 | /* | |
4959 | for(Int_t pW=0;pW<2;pW++) // particle weights not used (0) or used (1) | |
4960 | { | |
4961 | for(Int_t eW=0;eW<2;eW++) | |
4962 | { | |
4963 | // correlations: | |
4964 | for(Int_t correlationIndex=0;correlationIndex<4;correlationIndex++) | |
4965 | { | |
4966 | fCorrelationsPro[t][pW][eW][correlationIndex] = NULL; | |
4967 | } | |
4968 | // products of correlations: | |
4969 | for(Int_t productOfCorrelationsIndex=0;productOfCorrelationsIndex<6;productOfCorrelationsIndex++) | |
4970 | { | |
4971 | fProductsOfCorrelationsPro[t][pW][eW][productOfCorrelationsIndex] = NULL; | |
4972 | } | |
4973 | // correction terms: | |
4974 | for(Int_t sc=0;sc<2;sc++) | |
4975 | { | |
4976 | for(Int_t correctionsIndex=0;correctionsIndex<2;correctionsIndex++) | |
4977 | { | |
4978 | fCorrectionTermsPro[t][pW][eW][sc][correctionsIndex] = NULL; | |
4979 | } | |
4980 | } | |
4981 | } | |
4982 | } | |
4983 | */ | |
4984 | ||
4985 | } // end of AliFlowAnalysisWithQCumulants::InitializeArraysForDiffFlow() | |
4986 | ||
4987 | ||
4988 | //================================================================================================================================ | |
4989 | /* | |
4990 | ||
4991 | ||
4992 | void AliFlowAnalysisWithQCumulants::CalculateCorrelationsForDifferentialFlow2D(TString type) | |
4993 | { | |
4994 | // calculate all reduced correlations needed for differential flow for each (pt,eta) bin: | |
4995 | ||
4996 | if(type == "RP") // to be improved (removed) | |
4997 | { | |
4998 | cout<<endl; | |
4999 | } | |
5000 | // ... | |
5001 | ||
5002 | ||
5003 | Int_t typeFlag = -1; | |
5004 | ||
5005 | // reduced correlations ares stored in fCorrelationsPro[t][pW][index] and are indexed as follows: | |
5006 | // index: | |
5007 | // 0: <2'> | |
5008 | // 1: <4'> | |
5009 | ||
5010 | // multiplicity: | |
5011 | Double_t dMult = (*fSMpk)(0,0); | |
5012 | ||
5013 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
5014 | Double_t dReQ1n = (*fReQ)(0,0); | |
5015 | Double_t dReQ2n = (*fReQ)(1,0); | |
5016 | //Double_t dReQ3n = (*fReQ)(2,0); | |
5017 | //Double_t dReQ4n = (*fReQ)(3,0); | |
5018 | Double_t dImQ1n = (*fImQ)(0,0); | |
5019 | Double_t dImQ2n = (*fImQ)(1,0); | |
5020 | //Double_t dImQ3n = (*fImQ)(2,0); | |
5021 | //Double_t dImQ4n = (*fImQ)(3,0); | |
5022 | ||
5023 | // looping over all (pt,eta) bins and calculating correlations needed for differential flow: | |
5024 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5025 | { | |
5026 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5027 | { | |
5028 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): | |
5029 | Double_t p1n0kRe = 0.; | |
5030 | Double_t p1n0kIm = 0.; | |
5031 | ||
5032 | // number of POIs in particular (pt,eta) bin: | |
5033 | Double_t mp = 0.; | |
5034 | ||
5035 | // 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): | |
5036 | Double_t q1n0kRe = 0.; | |
5037 | Double_t q1n0kIm = 0.; | |
5038 | Double_t q2n0kRe = 0.; | |
5039 | Double_t q2n0kIm = 0.; | |
5040 | ||
5041 | // number of particles which are both RPs and POIs in particular (pt,eta) bin: | |
5042 | Double_t mq = 0.; | |
5043 | ||
5044 | // q_{m*n,0}: | |
5045 | q1n0kRe = fReEBE2D[2][0][0]->GetBinContent(fReEBE2D[2][0][0]->GetBin(p,e)) | |
5046 | * fReEBE2D[2][0][0]->GetBinEntries(fReEBE2D[2][0][0]->GetBin(p,e)); | |
5047 | q1n0kIm = fImEBE2D[2][0][0]->GetBinContent(fImEBE2D[2][0][0]->GetBin(p,e)) | |
5048 | * fImEBE2D[2][0][0]->GetBinEntries(fImEBE2D[2][0][0]->GetBin(p,e)); | |
5049 | q2n0kRe = fReEBE2D[2][1][0]->GetBinContent(fReEBE2D[2][1][0]->GetBin(p,e)) | |
5050 | * fReEBE2D[2][1][0]->GetBinEntries(fReEBE2D[2][1][0]->GetBin(p,e)); | |
5051 | q2n0kIm = fImEBE2D[2][1][0]->GetBinContent(fImEBE2D[2][1][0]->GetBin(p,e)) | |
5052 | * fImEBE2D[2][1][0]->GetBinEntries(fImEBE2D[2][1][0]->GetBin(p,e)); | |
5053 | ||
5054 | mq = fReEBE2D[2][0][0]->GetBinEntries(fReEBE2D[2][0][0]->GetBin(p,e)); // to be improved (cross-checked by accessing other profiles here) | |
5055 | ||
5056 | if(type == "POI") | |
5057 | { | |
5058 | // p_{m*n,0}: | |
5059 | p1n0kRe = fReEBE2D[1][0][0]->GetBinContent(fReEBE2D[1][0][0]->GetBin(p,e)) | |
5060 | * fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); | |
5061 | p1n0kIm = fImEBE2D[1][0][0]->GetBinContent(fImEBE2D[1][0][0]->GetBin(p,e)) | |
5062 | * fImEBE2D[1][0][0]->GetBinEntries(fImEBE2D[1][0][0]->GetBin(p,e)); | |
5063 | ||
5064 | mp = fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); // to be improved (cross-checked by accessing other profiles here) | |
5065 | ||
5066 | typeFlag = 1; | |
5067 | } | |
5068 | else if(type == "RP") | |
5069 | { | |
5070 | // p_{m*n,0} = q_{m*n,0}: | |
5071 | p1n0kRe = q1n0kRe; | |
5072 | p1n0kIm = q1n0kIm; | |
5073 | mp = mq; | |
5074 | ||
5075 | typeFlag = 0; | |
5076 | } | |
5077 | ||
5078 | // count events with non-empty (pt,eta) bin: | |
5079 | if(mp>0) | |
5080 | { | |
5081 | fNonEmptyBins2D[typeFlag]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,1); | |
5082 | } | |
5083 | ||
5084 | // 2'-particle correlation for particular (pt,eta) bin: | |
5085 | Double_t two1n1nPtEta = 0.; | |
5086 | if(mp*dMult-mq) | |
5087 | { | |
5088 | two1n1nPtEta = (p1n0kRe*dReQ1n+p1n0kIm*dImQ1n-mq) | |
5089 | / (mp*dMult-mq); | |
5090 | ||
5091 | // fill the 2D profile to get the average correlation for each (pt,eta) bin: | |
5092 | if(type == "POI") | |
5093 | { | |
5094 | //f2pPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
5095 | ||
5096 | fCorrelationsPro[1][0][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
5097 | } | |
5098 | else if(type == "RP") | |
5099 | { | |
5100 | //f2pPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
5101 | fCorrelationsPro[0][0][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nPtEta,mp*dMult-mq); | |
5102 | } | |
5103 | } // end of if(mp*dMult-mq) | |
5104 | ||
5105 | // 4'-particle correlation: | |
5106 | Double_t four1n1n1n1nPtEta = 0.; | |
5107 | if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5108 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) // to be improved (introduce a new variable for this expression) | |
5109 | { | |
5110 | four1n1n1n1nPtEta = ((pow(dReQ1n,2.)+pow(dImQ1n,2.))*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
5111 | - q2n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) | |
5112 | - 2.*q2n0kIm*dReQ1n*dImQ1n | |
5113 | - p1n0kRe*(dReQ1n*dReQ2n+dImQ1n*dImQ2n) | |
5114 | + p1n0kIm*(dImQ1n*dReQ2n-dReQ1n*dImQ2n) | |
5115 | - 2.*dMult*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
5116 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*mq | |
5117 | + 6.*(q1n0kRe*dReQ1n+q1n0kIm*dImQ1n) | |
5118 | + 1.*(q2n0kRe*dReQ2n+q2n0kIm*dImQ2n) | |
5119 | + 2.*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
5120 | + 2.*mq*dMult | |
5121 | - 6.*mq) | |
5122 | / ((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5123 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5124 | ||
5125 | // fill the 2D profile to get the average correlation for each (pt, eta) bin: | |
5126 | if(type == "POI") | |
5127 | { | |
5128 | //f4pPtEtaPOI->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
5129 | // (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5130 | // + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5131 | ||
5132 | fCorrelationsPro[1][0][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
5133 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5134 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5135 | } | |
5136 | else if(type == "RP") | |
5137 | { | |
5138 | //f4pPtEtaRP->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
5139 | // (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5140 | // + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5141 | ||
5142 | fCorrelationsPro[0][0][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nPtEta, | |
5143 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5144 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
5145 | } | |
5146 | } // end of if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
5147 | // +mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
5148 | ||
5149 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5150 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5151 | ||
5152 | ||
5153 | ||
5154 | ||
5155 | ||
5156 | } // end of AliFlowAnalysisWithQCumulants::CalculateCorrelationsForDifferentialFlow2D() | |
5157 | ||
5158 | ||
5159 | ||
5160 | ||
5161 | ||
5162 | ||
5163 | //================================================================================================================================ | |
5164 | ||
5165 | ||
5166 | void AliFlowAnalysisWithQCumulants::CalculateWeightedCorrelationsForDifferentialFlow2D(TString type) | |
5167 | { | |
5168 | // calculate all weighted correlations needed for differential flow | |
5169 | ||
5170 | if(type == "RP") // to be improved (removed) | |
5171 | { | |
5172 | cout<<endl; | |
5173 | } | |
5174 | // ... | |
5175 | ||
5176 | ||
5177 | ||
5178 | ||
5179 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
5180 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
5181 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
5182 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
5183 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
5184 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
5185 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
5186 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
5187 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
5188 | ||
5189 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
5190 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
5191 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
5192 | Double_t dSM1p3k = (*fSMpk)(0,3); | |
5193 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
5194 | Double_t dSM3p1k = (*fSMpk)(2,1); | |
5195 | ||
5196 | // looping over all (pt,eta) bins and calculating weighted correlations needed for differential flow: | |
5197 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5198 | { | |
5199 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5200 | { | |
5201 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): | |
5202 | Double_t p1n0kRe = 0.; | |
5203 | Double_t p1n0kIm = 0.; | |
5204 | ||
5205 | // number of POIs in particular (pt,eta) bin): | |
5206 | Double_t mp = 0.; | |
5207 | ||
5208 | // real and imaginary parts of q_{m*n,k}: | |
5209 | // (weighted Q-vector evaluated for particles which are both RPs and POIs in particular (pt,eta) bin) | |
5210 | Double_t q1n2kRe = 0.; | |
5211 | Double_t q1n2kIm = 0.; | |
5212 | Double_t q2n1kRe = 0.; | |
5213 | Double_t q2n1kIm = 0.; | |
5214 | ||
5215 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
5216 | Double_t s1p1k = 0.; | |
5217 | Double_t s1p2k = 0.; | |
5218 | Double_t s1p3k = 0.; | |
5219 | ||
5220 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
5221 | Double_t dM0111 = 0.; | |
5222 | ||
5223 | if(type == "POI") | |
5224 | { | |
5225 | // p_{m*n,0}: | |
5226 | p1n0kRe = fReEBE2D[1][0][0]->GetBinContent(fReEBE2D[1][0][0]->GetBin(p,e)) | |
5227 | * fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); | |
5228 | p1n0kIm = fImEBE2D[1][0][0]->GetBinContent(fImEBE2D[1][0][0]->GetBin(p,e)) | |
5229 | * fImEBE2D[1][0][0]->GetBinEntries(fImEBE2D[1][0][0]->GetBin(p,e)); | |
5230 | ||
5231 | mp = fReEBE2D[1][0][0]->GetBinEntries(fReEBE2D[1][0][0]->GetBin(p,e)); | |
5232 | ||
5233 | // q_{m*n,k}: | |
5234 | q1n2kRe = fReEBE2D[2][0][2]->GetBinContent(fReEBE2D[2][0][2]->GetBin(p,e)) | |
5235 | * fReEBE2D[2][0][2]->GetBinEntries(fReEBE2D[2][0][2]->GetBin(p,e)); | |
5236 | q1n2kIm = fImEBE2D[2][0][2]->GetBinContent(fImEBE2D[2][0][2]->GetBin(p,e)) | |
5237 | * fImEBE2D[2][0][2]->GetBinEntries(fImEBE2D[2][0][2]->GetBin(p,e)); | |
5238 | q2n1kRe = fReEBE2D[2][1][1]->GetBinContent(fReEBE2D[2][1][1]->GetBin(p,e)) | |
5239 | * fReEBE2D[2][1][1]->GetBinEntries(fReEBE2D[2][1][1]->GetBin(p,e)); | |
5240 | q2n1kIm = fImEBE2D[2][1][1]->GetBinContent(fImEBE2D[2][1][1]->GetBin(p,e)) | |
5241 | * fImEBE2D[2][1][1]->GetBinEntries(fImEBE2D[2][1][1]->GetBin(p,e)); | |
5242 | ||
5243 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
5244 | s1p1k = pow(fs2D[2][1]->GetBinContent(fs2D[2][1]->GetBin(p,e)),1.); | |
5245 | s1p2k = pow(fs2D[2][2]->GetBinContent(fs2D[2][2]->GetBin(p,e)),1.); | |
5246 | s1p3k = pow(fs2D[2][3]->GetBinContent(fs2D[2][3]->GetBin(p,e)),1.); | |
5247 | ||
5248 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
5249 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
5250 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
5251 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
5252 | } | |
5253 | else if(type == "RP") | |
5254 | { | |
5255 | p1n0kRe = fReEBE2D[0][0][0]->GetBinContent(fReEBE2D[0][0][0]->GetBin(p,e)) | |
5256 | * fReEBE2D[0][0][0]->GetBinEntries(fReEBE2D[0][0][0]->GetBin(p,e)); | |
5257 | p1n0kIm = fImEBE2D[0][0][0]->GetBinContent(fImEBE2D[0][0][0]->GetBin(p,e)) | |
5258 | * fImEBE2D[0][0][0]->GetBinEntries(fImEBE2D[0][0][0]->GetBin(p,e)); | |
5259 | ||
5260 | mp = fReEBE2D[0][0][0]->GetBinEntries(fReEBE2D[0][0][0]->GetBin(p,e)); | |
5261 | ||
5262 | // q_{m*n,k}: | |
5263 | q1n2kRe = fReEBE2D[0][0][2]->GetBinContent(fReEBE2D[0][0][2]->GetBin(p,e)) | |
5264 | * fReEBE2D[0][0][2]->GetBinEntries(fReEBE2D[0][0][2]->GetBin(p,e)); | |
5265 | q1n2kIm = fImEBE2D[0][0][2]->GetBinContent(fImEBE2D[0][0][2]->GetBin(p,e)) | |
5266 | * fImEBE2D[0][0][2]->GetBinEntries(fImEBE2D[0][0][2]->GetBin(p,e)); | |
5267 | q2n1kRe = fReEBE2D[0][1][1]->GetBinContent(fReEBE2D[0][1][1]->GetBin(p,e)) | |
5268 | * fReEBE2D[0][1][1]->GetBinEntries(fReEBE2D[0][1][1]->GetBin(p,e)); | |
5269 | q2n1kIm = fImEBE2D[0][1][1]->GetBinContent(fImEBE2D[0][1][1]->GetBin(p,e)) | |
5270 | * fImEBE2D[0][1][1]->GetBinEntries(fImEBE2D[0][1][1]->GetBin(p,e)); | |
5271 | ||
5272 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
5273 | s1p1k = pow(fs2D[0][1]->GetBinContent(fs2D[0][1]->GetBin(p,e)),1.); | |
5274 | s1p2k = pow(fs2D[0][2]->GetBinContent(fs2D[0][2]->GetBin(p,e)),1.); | |
5275 | s1p3k = pow(fs2D[0][3]->GetBinContent(fs2D[0][3]->GetBin(p,e)),1.); | |
5276 | ||
5277 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
5278 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
5279 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
5280 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
5281 | //............................................................................................... | |
5282 | } | |
5283 | ||
5284 | // 2'-particle correlation: | |
5285 | Double_t two1n1nW0W1PtEta = 0.; | |
5286 | if(mp*dSM1p1k-s1p1k) | |
5287 | { | |
5288 | two1n1nW0W1PtEta = (p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k-s1p1k) | |
5289 | / (mp*dSM1p1k-s1p1k); | |
5290 | ||
5291 | // fill the 2D profile to get the average correlation for each (pt, eta) bin: | |
5292 | if(type == "POI") | |
5293 | { | |
5294 | //f2pPtEtaPOIW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta, | |
5295 | // mp*dSM1p1k-s1p1k); | |
5296 | fCorrelationsPro[1][1][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta,mp*dSM1p1k-s1p1k); | |
5297 | } | |
5298 | else if(type == "RP") | |
5299 | { | |
5300 | //f2pPtEtaRPW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta, | |
5301 | // mp*dSM1p1k-s1p1k); | |
5302 | fCorrelationsPro[0][1][0][0]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,two1n1nW0W1PtEta,mp*dSM1p1k-s1p1k); | |
5303 | } | |
5304 | } // end of if(mp*dMult-dmPrimePrimePtEta) | |
5305 | ||
5306 | // 4'-particle correlation: | |
5307 | Double_t four1n1n1n1nW0W1W1W1PtEta = 0.; | |
5308 | if(dM0111) | |
5309 | { | |
5310 | four1n1n1n1nW0W1W1W1PtEta = ((pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
5311 | - q2n1kRe*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.)) | |
5312 | - 2.*q2n1kIm*dReQ1n1k*dImQ1n1k | |
5313 | - p1n0kRe*(dReQ1n1k*dReQ2n2k+dImQ1n1k*dImQ2n2k) | |
5314 | + p1n0kIm*(dImQ1n1k*dReQ2n2k-dReQ1n1k*dImQ2n2k) | |
5315 | - 2.*dSM1p2k*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
5316 | - 2.*(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*s1p1k | |
5317 | + 6.*(q1n2kRe*dReQ1n1k+q1n2kIm*dImQ1n1k) | |
5318 | + 1.*(q2n1kRe*dReQ2n2k+q2n1kIm*dImQ2n2k) | |
5319 | + 2.*(p1n0kRe*dReQ1n3k+p1n0kIm*dImQ1n3k) | |
5320 | + 2.*s1p1k*dSM1p2k | |
5321 | - 6.*s1p3k) | |
5322 | / dM0111; // to be imropoved (notation of dM0111) | |
5323 | ||
5324 | // fill the 2D profile to get the average correlation for each (pt, eta) bin: | |
5325 | if(type == "POI") | |
5326 | { | |
5327 | //f4pPtEtaPOIW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
5328 | fCorrelationsPro[1][1][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
5329 | } | |
5330 | else if(type == "RP") | |
5331 | { | |
5332 | //f4pPtEtaRPW->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
5333 | fCorrelationsPro[0][1][0][1]->Fill(fPtMin+(p-1)*fPtBinWidth,fEtaMin+(e-1)*fEtaBinWidth,four1n1n1n1nW0W1W1W1PtEta,dM0111); | |
5334 | } | |
5335 | } // end of if(dM0111) | |
5336 | ||
5337 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5338 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5339 | ||
5340 | ||
5341 | ||
5342 | ||
5343 | } // end of AliFlowAnalysisWithQCumulants::CalculateWeightedCorrelationsForDifferentialFlow2D(TString type) | |
5344 | ||
5345 | ||
5346 | //================================================================================================================================ | |
5347 | ||
5348 | */ | |
5349 | ||
5350 | /* | |
5351 | void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsForDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights) | |
5352 | { | |
5353 | // 1.) Access average for 2D correlations from profiles and store them in 2D final results histograms; | |
5354 | // 2.) Access spread for 2D correlations from profiles, calculate error and store it in 2D final results histograms; | |
5355 | // 3.) Make projections along pt and eta axis and store results and errors in 1D final results histograms. | |
5356 | ||
5357 | Int_t typeFlag = -1; | |
5358 | Int_t pWeightsFlag = -1; | |
5359 | Int_t eWeightsFlag = -1; | |
5360 | ||
5361 | if(type == "RP") | |
5362 | { | |
5363 | typeFlag = 0; | |
5364 | } else if(type == "POI") | |
5365 | { | |
5366 | typeFlag = 1; | |
5367 | } else | |
5368 | { | |
5369 | cout<<"WARNING: type must be either RP or POI in AFAWQC::FCFDF() !!!!"<<endl; | |
5370 | exit(0); | |
5371 | } | |
5372 | ||
5373 | if(!useParticleWeights) | |
5374 | { | |
5375 | pWeightsFlag = 0; | |
5376 | } else | |
5377 | { | |
5378 | pWeightsFlag = 1; | |
5379 | } | |
5380 | ||
5381 | if(eventWeights == "exact") | |
5382 | { | |
5383 | eWeightsFlag = 0; | |
5384 | } | |
5385 | ||
5386 | // shortcuts: | |
5387 | Int_t t = typeFlag; | |
5388 | Int_t pW = pWeightsFlag; | |
5389 | Int_t eW = eWeightsFlag; | |
5390 | ||
5391 | // from 2D histogram fNonEmptyBins2D make two 1D histograms fNonEmptyBins1D in pt and eta (to be improved (i.e. moved somewhere else)) | |
5392 | // pt: | |
5393 | for(Int_t p=1;p<fnBinsPt;p++) | |
5394 | { | |
5395 | Double_t contentPt = 0.; | |
5396 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5397 | { | |
5398 | contentPt += (fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e))); | |
5399 | } | |
5400 | fNonEmptyBins1D[t][0]->SetBinContent(p,contentPt); | |
5401 | } | |
5402 | // eta: | |
5403 | for(Int_t e=1;e<fnBinsEta;e++) | |
5404 | { | |
5405 | Double_t contentEta = 0.; | |
5406 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5407 | { | |
5408 | contentEta += (fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e))); | |
5409 | } | |
5410 | fNonEmptyBins1D[t][1]->SetBinContent(e,contentEta); | |
5411 | } | |
5412 | ||
5413 | // from 2D profile in (pt,eta) make two 1D profiles in (pt) and (eta): | |
5414 | TProfile *profile[2][4]; // [0=pt,1=eta][correlation index] // to be improved (do not hardwire the correlation index) | |
5415 | ||
5416 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5417 | { | |
5418 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
5419 | { | |
5420 | if(pe==0) profile[pe][ci] = this->MakePtProjection(fCorrelationsPro[t][pW][eW][ci]); | |
5421 | if(pe==1) profile[pe][ci] = this->MakeEtaProjection(fCorrelationsPro[t][pW][eW][ci]); | |
5422 | } | |
5423 | } | |
5424 | ||
5425 | // transfer 2D profile into 2D histogram: | |
5426 | // to be improved (see in documentation if there is a method to transfer values from 2D profile into 2D histogram) | |
5427 | for(Int_t ci=0;ci<4;ci++) | |
5428 | { | |
5429 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5430 | { | |
5431 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5432 | { | |
5433 | Double_t correlation = fCorrelationsPro[t][pW][eW][ci]->GetBinContent(fCorrelationsPro[t][pW][eW][ci]->GetBin(p,e)); | |
5434 | Double_t spread = fCorrelationsPro[t][pW][eW][ci]->GetBinError(fCorrelationsPro[t][pW][eW][ci]->GetBin(p,e)); | |
5435 | Double_t nEvts = fNonEmptyBins2D[t]->GetBinContent(fNonEmptyBins2D[t]->GetBin(p,e)); | |
5436 | Double_t error = 0.; | |
5437 | fFinalCorrelations2D[t][pW][eW][ci]->SetBinContent(fFinalCorrelations2D[t][pW][eW][ci]->GetBin(p,e),correlation); | |
5438 | if(nEvts>0) | |
5439 | { | |
5440 | error = spread/pow(nEvts,0.5); | |
5441 | fFinalCorrelations2D[t][pW][eW][ci]->SetBinError(fFinalCorrelations2D[t][pW][eW][ci]->GetBin(p,e),error); | |
5442 | } | |
5443 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5444 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5445 | } // end of for(Int_t ci=0;ci<4;ci++) | |
5446 | ||
5447 | // transfer 1D profile into 1D histogram (pt): | |
5448 | // to be improved (see in documentation if there is a method to transfer values from 1D profile into 1D histogram) | |
5449 | for(Int_t ci=0;ci<4;ci++) | |
5450 | { | |
5451 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5452 | { | |
5453 | if(profile[0][ci]) | |
5454 | { | |
5455 | Double_t correlation = profile[0][ci]->GetBinContent(p); | |
5456 | Double_t spread = profile[0][ci]->GetBinError(p); | |
5457 | Double_t nEvts = fNonEmptyBins1D[t][0]->GetBinContent(p); | |
5458 | Double_t error = 0.; | |
5459 | fFinalCorrelations1D[t][pW][eW][0][ci]->SetBinContent(p,correlation); | |
5460 | if(nEvts>0) | |
5461 | { | |
5462 | error = spread/pow(nEvts,0.5); | |
5463 | fFinalCorrelations1D[t][pW][eW][0][ci]->SetBinError(p,error); | |
5464 | } | |
5465 | } | |
5466 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5467 | } // end of for(Int_t ci=0;ci<4;ci++) | |
5468 | ||
5469 | // transfer 1D profile into 1D histogram (eta): | |
5470 | // to be improved (see in documentation if there is a method to transfer values from 1D profile into 1D histogram) | |
5471 | for(Int_t ci=0;ci<4;ci++) | |
5472 | { | |
5473 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5474 | { | |
5475 | if(profile[1][ci]) | |
5476 | { | |
5477 | Double_t correlation = profile[1][ci]->GetBinContent(e); | |
5478 | fFinalCorrelations1D[t][pW][eW][1][ci]->SetBinContent(e,correlation); | |
5479 | } | |
5480 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5481 | } // end of for(Int_t ci=0;ci<4;ci++) | |
5482 | ||
5483 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeCorrelationsForDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights) | |
5484 | */ | |
5485 | ||
5486 | ||
5487 | //================================================================================================================================ | |
5488 | ||
5489 | ||
5490 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulants(TString type, TString ptOrEta) | |
5491 | { | |
5492 | // calcualate cumulants for differential flow from measured correlations | |
5493 | // Remark: cumulants calculated here are NOT corrected for non-uniform acceptance. This correction is applied in the method ... | |
5494 | // to be improved (description) | |
5495 | ||
5496 | Int_t typeFlag = -1; | |
5497 | Int_t ptEtaFlag = -1; | |
5498 | ||
5499 | if(type == "RP") | |
5500 | { | |
5501 | typeFlag = 0; | |
5502 | } else if(type == "POI") | |
5503 | { | |
5504 | typeFlag = 1; | |
5505 | } | |
5506 | ||
5507 | if(ptOrEta == "Pt") | |
5508 | { | |
5509 | ptEtaFlag = 0; | |
5510 | } else if(ptOrEta == "Eta") | |
5511 | { | |
5512 | ptEtaFlag = 1; | |
5513 | } | |
5514 | ||
5515 | // shortcuts: | |
5516 | Int_t t = typeFlag; | |
5517 | Int_t pe = ptEtaFlag; | |
5518 | ||
5519 | // common: | |
5520 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
5521 | ||
5522 | // correlation <<2>>: | |
5523 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); | |
5524 | ||
5525 | // 1D: | |
5526 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
5527 | { | |
5528 | // reduced correlations: | |
5529 | Double_t twoPrime = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); // <<2'>>(pt) | |
5530 | Double_t fourPrime = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); // <<4'>>(pt) | |
5531 | // final statistical error of reduced correlations: | |
5532 | //Double_t twoPrimeError = fFinalCorrelations1D[t][pW][eW][0][0]->GetBinError(p); | |
5533 | // QC{2'}: | |
5534 | Double_t qc2Prime = twoPrime; // QC{2'} | |
5535 | //Double_t qc2PrimeError = twoPrimeError; // final stat. error of QC{2'} | |
5536 | fDiffFlowCumulants[t][pe][0]->SetBinContent(b,qc2Prime); | |
5537 | //fFinalCumulantsPt[t][pW][eW][nua][0]->SetBinError(p,qc2PrimeError); | |
5538 | // QC{4'}: | |
5539 | Double_t qc4Prime = fourPrime - 2.*twoPrime*two; // QC{4'} = <<4'>> - 2*<<2'>><<2>> | |
5540 | fDiffFlowCumulants[t][pe][1]->SetBinContent(b,qc4Prime); | |
5541 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5542 | ||
5543 | ||
5544 | /* | |
5545 | // 2D (pt,eta): | |
5546 | // to be improved (see documentation if I can do all this without looping) | |
5547 | for(Int_t p=1;p<=fnBinsPt;p++) | |
5548 | { | |
5549 | for(Int_t e=1;e<=fnBinsEta;e++) | |
5550 | { | |
5551 | // reduced correlations: | |
5552 | Double_t twoPrime = fFinalCorrelations2D[t][pW][eW][0]->GetBinContent(fFinalCorrelations2D[t][pW][eW][0]->GetBin(p,e)); // <<2'>>(pt,eta) | |
5553 | Double_t fourPrime = fFinalCorrelations2D[t][pW][eW][1]->GetBinContent(fFinalCorrelations2D[t][pW][eW][1]->GetBin(p,e)); // <<4'>>(pt,eta) | |
5554 | for(Int_t nua=0;nua<2;nua++) | |
5555 | { | |
5556 | // QC{2'}: | |
5557 | Double_t qc2Prime = twoPrime; // QC{2'} = <<2'>> | |
5558 | fFinalCumulants2D[t][pW][eW][nua][0]->SetBinContent(fFinalCumulants2D[t][pW][eW][nua][0]->GetBin(p,e),qc2Prime); | |
5559 | // QC{4'}: | |
5560 | Double_t qc4Prime = fourPrime - 2.*twoPrime*two; // QC{4'} = <<4'>> - 2*<<2'>><<2>> | |
5561 | fFinalCumulants2D[t][pW][eW][nua][1]->SetBinContent(fFinalCumulants2D[t][pW][eW][nua][1]->GetBin(p,e),qc4Prime); | |
5562 | } // end of for(Int_t nua=0;nua<2;nua++) | |
5563 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
5564 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
5565 | */ | |
5566 | ||
5567 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulants(TString type, Bool_t useParticleWeights, TString eventWeights); | |
5568 | ||
5569 | ||
5570 | //================================================================================================================================ | |
5571 | ||
5572 | ||
5573 | void AliFlowAnalysisWithQCumulants::CalculateFinalResultsForRPandPOIIntegratedFlow(TString type) | |
5574 | { | |
5575 | // calculate final results for integrated flow of RPs and POIs | |
5576 | ||
5577 | Int_t typeFlag = -1; | |
5578 | ||
5579 | if(type == "RP") | |
5580 | { | |
5581 | typeFlag = 0; | |
5582 | } else if(type == "POI") | |
5583 | { | |
5584 | typeFlag = 1; | |
5585 | } else | |
5586 | { | |
5587 | cout<<"WARNING: type must be either RP or POI in AFAWQC::CDF() !!!!"<<endl; | |
5588 | exit(0); | |
5589 | } | |
5590 | ||
5591 | // shortcuts: | |
5592 | Int_t t = typeFlag; | |
5593 | ||
5594 | // pt yield: | |
5595 | TH1F *yield2ndPt = NULL; | |
5596 | TH1F *yield4thPt = NULL; | |
5597 | TH1F *yield6thPt = NULL; | |
5598 | TH1F *yield8thPt = NULL; | |
5599 | ||
5600 | if(type == "POI") | |
5601 | { | |
5602 | yield2ndPt = (TH1F*)(fCommonHists2nd->GetHistPtPOI())->Clone(); | |
5603 | yield4thPt = (TH1F*)(fCommonHists4th->GetHistPtPOI())->Clone(); | |
5604 | yield6thPt = (TH1F*)(fCommonHists6th->GetHistPtPOI())->Clone(); | |
5605 | yield8thPt = (TH1F*)(fCommonHists8th->GetHistPtPOI())->Clone(); | |
5606 | } | |
5607 | else if(type == "RP") | |
5608 | { | |
5609 | yield2ndPt = (TH1F*)(fCommonHists2nd->GetHistPtRP())->Clone(); | |
5610 | yield4thPt = (TH1F*)(fCommonHists4th->GetHistPtRP())->Clone(); | |
5611 | yield6thPt = (TH1F*)(fCommonHists6th->GetHistPtRP())->Clone(); | |
5612 | yield8thPt = (TH1F*)(fCommonHists8th->GetHistPtRP())->Clone(); | |
5613 | } | |
5614 | ||
5615 | Int_t nBinsPt = yield2ndPt->GetNbinsX(); | |
5616 | ||
5617 | TH1D *flow2ndPt = NULL; | |
5618 | TH1D *flow4thPt = NULL; | |
5619 | TH1D *flow6thPt = NULL; | |
5620 | TH1D *flow8thPt = NULL; | |
5621 | ||
5622 | // to be improved (hardwired pt index) | |
5623 | flow2ndPt = (TH1D*)fDiffFlow[t][0][0]->Clone(); | |
5624 | flow4thPt = (TH1D*)fDiffFlow[t][0][1]->Clone(); | |
5625 | flow6thPt = (TH1D*)fDiffFlow[t][0][2]->Clone(); | |
5626 | flow8thPt = (TH1D*)fDiffFlow[t][0][3]->Clone(); | |
5627 | ||
5628 | Double_t dvn2nd = 0., dvn4th = 0., dvn6th = 0., dvn8th = 0.; // differential flow | |
5629 | Double_t dErrvn2nd = 0., dErrvn4th = 0., dErrvn6th = 0., dErrvn8th = 0.; // error on differential flow | |
5630 | ||
5631 | Double_t dVn2nd = 0., dVn4th = 0., dVn6th = 0., dVn8th = 0.; // integrated flow | |
5632 | Double_t dErrVn2nd = 0., dErrVn4th = 0., dErrVn6th = 0., dErrVn8th = 0.; // error on integrated flow | |
5633 | ||
5634 | Double_t dYield2nd = 0., dYield4th = 0., dYield6th = 0., dYield8th = 0.; // pt yield | |
5635 | Double_t dSum2nd = 0., dSum4th = 0., dSum6th = 0., dSum8th = 0.; // needed for normalizing integrated flow | |
5636 | ||
5637 | // looping over pt bins: | |
5638 | for(Int_t p=1;p<nBinsPt+1;p++) | |
5639 | { | |
5640 | dvn2nd = flow2ndPt->GetBinContent(p); | |
5641 | dvn4th = flow4thPt->GetBinContent(p); | |
5642 | dvn6th = flow6thPt->GetBinContent(p); | |
5643 | dvn8th = flow8thPt->GetBinContent(p); | |
5644 | ||
5645 | dErrvn2nd = flow2ndPt->GetBinError(p); | |
5646 | dErrvn4th = flow4thPt->GetBinError(p); | |
5647 | dErrvn6th = flow6thPt->GetBinError(p); | |
5648 | dErrvn8th = flow8thPt->GetBinError(p); | |
5649 | ||
5650 | dYield2nd = yield2ndPt->GetBinContent(p); | |
5651 | dYield4th = yield4thPt->GetBinContent(p); | |
5652 | dYield6th = yield6thPt->GetBinContent(p); | |
5653 | dYield8th = yield8thPt->GetBinContent(p); | |
5654 | ||
5655 | dVn2nd += dvn2nd*dYield2nd; | |
5656 | dVn4th += dvn4th*dYield4th; | |
5657 | dVn6th += dvn6th*dYield6th; | |
5658 | dVn8th += dvn8th*dYield8th; | |
5659 | ||
5660 | dSum2nd += dYield2nd; | |
5661 | dSum4th += dYield4th; | |
5662 | dSum6th += dYield6th; | |
5663 | dSum8th += dYield8th; | |
5664 | ||
5665 | dErrVn2nd += dYield2nd*dYield2nd*dErrvn2nd*dErrvn2nd; // ro be improved (check this relation) | |
5666 | dErrVn4th += dYield4th*dYield4th*dErrvn4th*dErrvn4th; | |
5667 | dErrVn6th += dYield6th*dYield6th*dErrvn6th*dErrvn6th; | |
5668 | dErrVn8th += dYield8th*dYield8th*dErrvn8th*dErrvn8th; | |
5669 | ||
5670 | } // end of for(Int_t p=1;p<nBinsPt+1;p++) | |
5671 | ||
5672 | // normalizing the results for integrated flow: | |
5673 | if(dSum2nd) | |
5674 | { | |
5675 | dVn2nd /= dSum2nd; | |
5676 | dErrVn2nd /= (dSum2nd*dSum2nd); | |
5677 | dErrVn2nd = TMath::Sqrt(dErrVn2nd); | |
5678 | } | |
5679 | if(dSum4th) | |
5680 | { | |
5681 | dVn4th /= dSum4th; | |
5682 | dErrVn4th /= (dSum4th*dSum4th); | |
5683 | dErrVn4th = TMath::Sqrt(dErrVn4th); | |
5684 | } | |
5685 | //if(dSum6th) dVn6th/=dSum6th; | |
5686 | //if(dSum8th) dVn8th/=dSum8th; | |
5687 | ||
5688 | // storing the results for integrated flow in common histos: (to be improved: new method for this?) | |
5689 | if(type == "POI") | |
5690 | { | |
5691 | fCommonHistsResults2nd->FillIntegratedFlowPOI(dVn2nd,dErrVn2nd); | |
5692 | fCommonHistsResults4th->FillIntegratedFlowPOI(dVn4th,dErrVn4th); | |
5693 | fCommonHistsResults6th->FillIntegratedFlowPOI(dVn6th,0.); // to be improved (errors) | |
5694 | fCommonHistsResults8th->FillIntegratedFlowPOI(dVn8th,0.); // to be improved (errors) | |
5695 | } | |
5696 | else if (type == "RP") | |
5697 | { | |
5698 | fCommonHistsResults2nd->FillIntegratedFlowRP(dVn2nd,dErrVn2nd); | |
5699 | fCommonHistsResults4th->FillIntegratedFlowRP(dVn4th,dErrVn4th); | |
5700 | fCommonHistsResults6th->FillIntegratedFlowRP(dVn6th,0.); // to be improved (errors) | |
5701 | fCommonHistsResults8th->FillIntegratedFlowRP(dVn8th,0.); // to be improved (errors) | |
5702 | } | |
5703 | ||
5704 | delete flow2ndPt; | |
5705 | delete flow4thPt; | |
5706 | //delete flow6thPt; | |
5707 | //delete flow8thPt; | |
5708 | ||
5709 | delete yield2ndPt; | |
5710 | delete yield4thPt; | |
5711 | delete yield6thPt; | |
5712 | delete yield8thPt; | |
5713 | ||
5714 | } // end of AliFlowAnalysisWithQCumulants::CalculateFinalResultsForRPandPOIIntegratedFlow(TString type) | |
5715 | ||
5716 | ||
5717 | //================================================================================================================================ | |
5718 | ||
5719 | ||
5720 | void AliFlowAnalysisWithQCumulants::InitializeArraysForDistributions() | |
5721 | { | |
5722 | // Initialize all arrays used for distributions. | |
5723 | ||
5724 | // a) Initialize arrays of histograms used to hold distributions of correlations; | |
5725 | // b) Initialize array to hold min and max values of correlations. | |
5726 | ||
5727 | // a) Initialize arrays of histograms used to hold distributions of correlations: | |
5728 | for(Int_t di=0;di<4;di++) // distribution index | |
5729 | { | |
5730 | fDistributions[di] = NULL; | |
5731 | } | |
5732 | ||
5733 | // b) Initialize default min and max values of correlations: | |
5734 | // (Remark: The default values bellow were chosen for v2=5% and M=500) | |
5735 | fMinValueOfCorrelation[0] = -0.01; // <2>_min | |
5736 | fMaxValueOfCorrelation[0] = 0.04; // <2>_max | |
5737 | fMinValueOfCorrelation[1] = -0.00002; // <4>_min | |
5738 | fMaxValueOfCorrelation[1] = 0.00015; // <4>_max | |
5739 | fMinValueOfCorrelation[2] = -0.0000003; // <6>_min | |
5740 | fMaxValueOfCorrelation[2] = 0.0000006; // <6>_max | |
5741 | fMinValueOfCorrelation[3] = -0.000000006; // <8>_min | |
5742 | fMaxValueOfCorrelation[3] = 0.000000003; // <8>_max | |
5743 | ||
5744 | } // end of void AliFlowAnalysisWithQCumulants::InitializeArraysForDistributions() | |
5745 | ||
5746 | ||
5747 | //================================================================================================================================ | |
5748 | ||
5749 | ||
5750 | void AliFlowAnalysisWithQCumulants::BookEverythingForDistributions() | |
5751 | { | |
5752 | // a) Book profile to hold all flags for distributions of correlations; | |
5753 | // b) Book all histograms to hold distributions of correlations. | |
5754 | ||
5755 | TString correlationIndex[4] = {"<2>","<4>","<6>","<8>"}; // to be improved (should I promote this to data members?) | |
5756 | ||
5757 | // a) Book profile to hold all flags for distributions of correlations: | |
5758 | TString distributionsFlagsName = "fDistributionsFlags"; | |
5759 | distributionsFlagsName += fAnalysisLabel->Data(); | |
5760 | fDistributionsFlags = new TProfile(distributionsFlagsName.Data(),"Flags for Distributions of Correlations",9,0,9); | |
5761 | fDistributionsFlags->SetTickLength(-0.01,"Y"); | |
5762 | fDistributionsFlags->SetMarkerStyle(25); | |
5763 | fDistributionsFlags->SetLabelSize(0.05); | |
5764 | fDistributionsFlags->SetLabelOffset(0.02,"Y"); | |
5765 | fDistributionsFlags->GetXaxis()->SetBinLabel(1,"Store or not?"); | |
5766 | fDistributionsFlags->GetXaxis()->SetBinLabel(2,"<2>_{min}"); | |
5767 | fDistributionsFlags->GetXaxis()->SetBinLabel(3,"<2>_{max}"); | |
5768 | fDistributionsFlags->GetXaxis()->SetBinLabel(4,"<4>_{min}"); | |
5769 | fDistributionsFlags->GetXaxis()->SetBinLabel(5,"<4>_{max}"); | |
5770 | fDistributionsFlags->GetXaxis()->SetBinLabel(6,"<6>_{min}"); | |
5771 | fDistributionsFlags->GetXaxis()->SetBinLabel(7,"<6>_{max}"); | |
5772 | fDistributionsFlags->GetXaxis()->SetBinLabel(8,"<8>_{min}"); | |
5773 | fDistributionsFlags->GetXaxis()->SetBinLabel(9,"<8>_{max}"); | |
5774 | fDistributionsList->Add(fDistributionsFlags); | |
5775 | ||
5776 | // b) Book all histograms to hold distributions of correlations. | |
5777 | if(fStoreDistributions) | |
5778 | { | |
5779 | TString distributionsName = "fDistributions"; | |
5780 | distributionsName += fAnalysisLabel->Data(); | |
5781 | for(Int_t di=0;di<4;di++) // distribution index | |
5782 | { | |
5783 | fDistributions[di] = new TH1D(Form("Distribution of %s",correlationIndex[di].Data()),Form("Distribution of %s",correlationIndex[di].Data()),10000,fMinValueOfCorrelation[di],fMaxValueOfCorrelation[di]); | |
5784 | fDistributions[di]->SetXTitle(correlationIndex[di].Data()); | |
5785 | fDistributionsList->Add(fDistributions[di]); | |
5786 | } // end of for(Int_t di=0;di<4;di++) // distribution index | |
5787 | } // end of if(fStoreDistributions) | |
5788 | ||
5789 | } // end of void AliFlowAnalysisWithQCumulants::BookEverythingForDistributions() | |
5790 | ||
5791 | ||
5792 | //================================================================================================================================ | |
5793 | ||
5794 | ||
5795 | void AliFlowAnalysisWithQCumulants::StoreFlagsForDistributions() | |
5796 | { | |
5797 | // Store all flags for distributiuons of correlations in profile fDistributionsFlags. | |
5798 | ||
5799 | if(!fDistributionsFlags) | |
5800 | { | |
5801 | cout<<"WARNING: fDistributionsFlags is NULL in AFAWQC::SDF() !!!!"<<endl; | |
5802 | exit(0); | |
5803 | } | |
5804 | ||
5805 | fDistributionsFlags->Fill(0.5,(Int_t)fStoreDistributions); // histos with distributions of correlations stored or not in the output file | |
5806 | // store min and max values of correlations: | |
5807 | for(Int_t di=0;di<4;di++) // distribution index | |
5808 | { | |
5809 | fDistributionsFlags->Fill(1.5+2.*(Double_t)di,fMinValueOfCorrelation[di]); | |
5810 | fDistributionsFlags->Fill(2.5+2.*(Double_t)di,fMaxValueOfCorrelation[di]); | |
5811 | } | |
5812 | ||
5813 | } // end of void AliFlowAnalysisWithQCumulants::StoreFlagsForDistributions() | |
5814 | ||
5815 | ||
5816 | //================================================================================================================================ | |
5817 | ||
5818 | ||
5819 | void AliFlowAnalysisWithQCumulants::StoreDistributionsOfCorrelations() | |
5820 | { | |
5821 | // Store distributions of correlations. | |
5822 | ||
5823 | if(!(fIntFlowCorrelationsEBE && fIntFlowEventWeightsForCorrelationsEBE)) | |
5824 | { | |
5825 | cout<<"WARNING: fIntFlowCorrelationsEBE && fIntFlowEventWeightsForCorrelationsEBE"<<endl; | |
5826 | cout<<" is NULL in AFAWQC::SDOC() !!!!"<<endl; | |
5827 | exit(0); | |
5828 | } | |
5829 | ||
5830 | for(Int_t di=0;di<4;di++) // distribution index | |
5831 | { | |
5832 | if(!fDistributions[di]) | |
5833 | { | |
5834 | cout<<"WARNING: fDistributions[di] is NULL in AFAWQC::SDOC() !!!!"<<endl; | |
5835 | cout<<"di = "<<di<<endl; | |
5836 | exit(0); | |
5837 | } else | |
5838 | { | |
5839 | fDistributions[di]->Fill(fIntFlowCorrelationsEBE->GetBinContent(di+1),fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(di+1)); | |
5840 | } | |
5841 | } // end of for(Int_t di=0;di<4;di++) // distribution index | |
5842 | ||
5843 | } // end of void AliFlowAnalysisWithQCumulants::StoreDistributionsOfCorrelations() | |
5844 | ||
5845 | ||
5846 | //================================================================================================================================ | |
5847 | ||
5848 | ||
5849 | void AliFlowAnalysisWithQCumulants::BookAndNestAllLists() | |
5850 | { | |
5851 | // Book and nest all lists nested in the base list fHistList. | |
5852 | // a) Book and nest lists for integrated flow; | |
5853 | // b) Book and nest lists for differential flow; | |
5854 | // c) Book and nest list for particle weights; | |
5855 | // d) Book and nest list for distributions; | |
5856 | // e) Book and nest list for nested loops; | |
5857 | ||
5858 | // a) Book and nest all lists for integrated flow: | |
5859 | // base list for integrated flow: | |
5860 | fIntFlowList = new TList(); | |
5861 | fIntFlowList->SetName("Integrated Flow"); | |
5862 | fIntFlowList->SetOwner(kTRUE); | |
5863 | fHistList->Add(fIntFlowList); | |
5864 | // list holding profiles: | |
5865 | fIntFlowProfiles = new TList(); | |
5866 | fIntFlowProfiles->SetName("Profiles"); | |
5867 | fIntFlowProfiles->SetOwner(kTRUE); | |
5868 | fIntFlowList->Add(fIntFlowProfiles); | |
5869 | // list holding histograms with results: | |
5870 | fIntFlowResults = new TList(); | |
5871 | fIntFlowResults->SetName("Results"); | |
5872 | fIntFlowResults->SetOwner(kTRUE); | |
5873 | fIntFlowList->Add(fIntFlowResults); | |
5874 | ||
5875 | // b) Book and nest lists for differential flow; | |
5876 | fDiffFlowList = new TList(); | |
5877 | fDiffFlowList->SetName("Differential Flow"); | |
5878 | fDiffFlowList->SetOwner(kTRUE); | |
5879 | fHistList->Add(fDiffFlowList); | |
5880 | // list holding profiles: | |
5881 | fDiffFlowProfiles = new TList(); | |
5882 | fDiffFlowProfiles->SetName("Profiles"); | |
5883 | fDiffFlowProfiles->SetOwner(kTRUE); | |
5884 | fDiffFlowList->Add(fDiffFlowProfiles); | |
5885 | // list holding histograms with results: | |
5886 | fDiffFlowResults = new TList(); | |
5887 | fDiffFlowResults->SetName("Results"); | |
5888 | fDiffFlowResults->SetOwner(kTRUE); | |
5889 | fDiffFlowList->Add(fDiffFlowResults); | |
5890 | // flags used for naming nested lists in list fDiffFlowProfiles and fDiffFlowResults: | |
5891 | TList list; | |
5892 | list.SetOwner(kTRUE); | |
5893 | TString typeFlag[2] = {"RP","POI"}; | |
5894 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; | |
5895 | TString powerFlag[2] = {"linear","quadratic"}; | |
5896 | // nested lists in fDiffFlowProfiles (~/Differential Flow/Profiles): | |
5897 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
5898 | { | |
5899 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5900 | { | |
5901 | // list holding profiles with correlations: | |
5902 | fDiffFlowCorrelationsProList[t][pe] = (TList*)list.Clone(); | |
5903 | fDiffFlowCorrelationsProList[t][pe]->SetName(Form("Profiles with correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5904 | fDiffFlowProfiles->Add(fDiffFlowCorrelationsProList[t][pe]); | |
5905 | // list holding profiles with products of correlations: | |
5906 | fDiffFlowProductOfCorrelationsProList[t][pe] = (TList*)list.Clone(); | |
5907 | fDiffFlowProductOfCorrelationsProList[t][pe]->SetName(Form("Profiles with products of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5908 | fDiffFlowProfiles->Add(fDiffFlowProductOfCorrelationsProList[t][pe]); | |
5909 | // list holding profiles with corrections: | |
5910 | fDiffFlowCorrectionsProList[t][pe] = (TList*)list.Clone(); | |
5911 | fDiffFlowCorrectionsProList[t][pe]->SetName(Form("Profiles with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5912 | fDiffFlowProfiles->Add(fDiffFlowCorrectionsProList[t][pe]); | |
5913 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5914 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
5915 | // nested lists in fDiffFlowResults (~/Differential Flow/Results): | |
5916 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
5917 | { | |
5918 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5919 | { | |
5920 | // list holding histograms with correlations: | |
5921 | fDiffFlowCorrelationsHistList[t][pe] = (TList*)list.Clone(); | |
5922 | fDiffFlowCorrelationsHistList[t][pe]->SetName(Form("Correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5923 | fDiffFlowResults->Add(fDiffFlowCorrelationsHistList[t][pe]); | |
5924 | // list holding histograms with corrections: | |
5925 | fDiffFlowCorrectionsHistList[t][pe] = (TList*)list.Clone(); | |
5926 | fDiffFlowCorrectionsHistList[t][pe]->SetName(Form("Histograms with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5927 | fDiffFlowResults->Add(fDiffFlowCorrectionsHistList[t][pe]); | |
5928 | for(Int_t power=0;power<2;power++) | |
5929 | { | |
5930 | // list holding histograms with sums of event weights: | |
5931 | fDiffFlowSumOfEventWeightsHistList[t][pe][power] = (TList*)list.Clone(); | |
5932 | fDiffFlowSumOfEventWeightsHistList[t][pe][power]->SetName(Form("Sum of %s event weights (%s, %s)",powerFlag[power].Data(),typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5933 | fDiffFlowResults->Add(fDiffFlowSumOfEventWeightsHistList[t][pe][power]); | |
5934 | } // end of for(Int_t power=0;power<2;power++) | |
5935 | // list holding histograms with sums of products of event weights: | |
5936 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe] = (TList*)list.Clone(); | |
5937 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]->SetName(Form("Sum of products of event weights (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5938 | fDiffFlowResults->Add(fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]); | |
5939 | // list holding histograms with covariances of correlations: | |
5940 | fDiffFlowCovariancesHistList[t][pe] = (TList*)list.Clone(); | |
5941 | fDiffFlowCovariancesHistList[t][pe]->SetName(Form("Covariances of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5942 | fDiffFlowResults->Add(fDiffFlowCovariancesHistList[t][pe]); | |
5943 | // list holding histograms with differential Q-cumulants: | |
5944 | fDiffFlowCumulantsHistList[t][pe] = (TList*)list.Clone(); | |
5945 | fDiffFlowCumulantsHistList[t][pe]->SetName(Form("Differential Q-cumulants (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5946 | fDiffFlowResults->Add(fDiffFlowCumulantsHistList[t][pe]); | |
5947 | // list holding histograms with differential flow estimates from Q-cumulants: | |
5948 | fDiffFlowHistList[t][pe] = (TList*)list.Clone(); | |
5949 | fDiffFlowHistList[t][pe]->SetName(Form("Differential flow (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data())); | |
5950 | fDiffFlowResults->Add(fDiffFlowHistList[t][pe]); | |
5951 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
5952 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
5953 | ||
5954 | // c) Book and nest list for particle weights: | |
5955 | fWeightsList->SetName("Weights"); | |
5956 | fWeightsList->SetOwner(kTRUE); | |
5957 | fHistList->Add(fWeightsList); | |
5958 | ||
5959 | // d) Book and nest list for distributions: | |
5960 | fDistributionsList = new TList(); | |
5961 | fDistributionsList->SetName("Distributions"); | |
5962 | fDistributionsList->SetOwner(kTRUE); | |
5963 | fHistList->Add(fDistributionsList); | |
5964 | ||
5965 | // e) Book and nest list for nested loops: | |
5966 | fNestedLoopsList = new TList(); | |
5967 | fNestedLoopsList->SetName("Nested Loops"); | |
5968 | fNestedLoopsList->SetOwner(kTRUE); | |
5969 | fHistList->Add(fNestedLoopsList); | |
5970 | ||
5971 | } // end of void AliFlowAnalysisWithQCumulants::BookAndNestAllLists() | |
5972 | ||
5973 | ||
5974 | //================================================================================================================================ | |
5975 | ||
5976 | ||
5977 | void AliFlowAnalysisWithQCumulants::FillCommonHistResultsDiffFlow(TString type) | |
5978 | { | |
5979 | // fill common result histograms for differential flow | |
5980 | ||
5981 | Int_t typeFlag = -1; | |
5982 | //Int_t ptEtaFlag = -1; | |
5983 | ||
5984 | if(type == "RP") | |
5985 | { | |
5986 | typeFlag = 0; | |
5987 | } else if(type == "POI") | |
5988 | { | |
5989 | typeFlag = 1; | |
5990 | } | |
5991 | ||
5992 | // shortcuts: | |
5993 | Int_t t = typeFlag; | |
5994 | //Int_t pe = ptEtaFlag; | |
5995 | ||
5996 | // to be improved (implement protection here) | |
5997 | ||
5998 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th)) | |
5999 | { | |
6000 | cout<<"WARNING: fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th"<<endl; | |
6001 | cout<<" is NULL in AFAWQC::FCHRIF() !!!!"<<endl; | |
6002 | exit(0); | |
6003 | } | |
6004 | ||
6005 | // pt: | |
6006 | for(Int_t p=1;p<=fnBinsPt;p++) | |
6007 | { | |
6008 | Double_t v2 = fDiffFlow[t][0][0]->GetBinContent(p); | |
6009 | Double_t v4 = fDiffFlow[t][0][1]->GetBinContent(p); | |
6010 | Double_t v6 = fDiffFlow[t][0][2]->GetBinContent(p); | |
6011 | Double_t v8 = fDiffFlow[t][0][3]->GetBinContent(p); | |
6012 | ||
6013 | Double_t v2Error = fDiffFlow[t][0][0]->GetBinError(p); | |
6014 | Double_t v4Error = fDiffFlow[t][0][1]->GetBinError(p); | |
6015 | //Double_t v6Error = fFinalFlow1D[t][pW][nua][0][2]->GetBinError(p); | |
6016 | //Double_t v8Error = fFinalFlow1D[t][pW][nua][0][3]->GetBinError(p); | |
6017 | ||
6018 | if(type == "RP") | |
6019 | { | |
6020 | fCommonHistsResults2nd->FillDifferentialFlowPtRP(p,v2,v2Error); | |
6021 | fCommonHistsResults4th->FillDifferentialFlowPtRP(p,v4,v4Error); | |
6022 | fCommonHistsResults6th->FillDifferentialFlowPtRP(p,v6,0.); | |
6023 | fCommonHistsResults8th->FillDifferentialFlowPtRP(p,v8,0.); | |
6024 | } else if(type == "POI") | |
6025 | { | |
6026 | fCommonHistsResults2nd->FillDifferentialFlowPtPOI(p,v2,v2Error); | |
6027 | fCommonHistsResults4th->FillDifferentialFlowPtPOI(p,v4,v4Error); | |
6028 | fCommonHistsResults6th->FillDifferentialFlowPtPOI(p,v6,0.); | |
6029 | fCommonHistsResults8th->FillDifferentialFlowPtPOI(p,v8,0.); | |
6030 | } | |
6031 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
6032 | ||
6033 | // eta: | |
6034 | for(Int_t e=1;e<=fnBinsEta;e++) | |
6035 | { | |
6036 | Double_t v2 = fDiffFlow[t][1][0]->GetBinContent(e); | |
6037 | Double_t v4 = fDiffFlow[t][1][1]->GetBinContent(e); | |
6038 | Double_t v6 = fDiffFlow[t][1][2]->GetBinContent(e); | |
6039 | Double_t v8 = fDiffFlow[t][1][3]->GetBinContent(e); | |
6040 | ||
6041 | Double_t v2Error = fDiffFlow[t][1][0]->GetBinError(e); | |
6042 | Double_t v4Error = fDiffFlow[t][1][1]->GetBinError(e); | |
6043 | //Double_t v6Error = fDiffFlow[t][1][2]->GetBinError(e); | |
6044 | //Double_t v8Error = fDiffFlow[t][1][3]->GetBinError(e); | |
6045 | ||
6046 | if(type == "RP") | |
6047 | { | |
6048 | fCommonHistsResults2nd->FillDifferentialFlowEtaRP(e,v2,v2Error); | |
6049 | fCommonHistsResults4th->FillDifferentialFlowEtaRP(e,v4,v4Error); | |
6050 | fCommonHistsResults6th->FillDifferentialFlowEtaRP(e,v6,0.); | |
6051 | fCommonHistsResults8th->FillDifferentialFlowEtaRP(e,v8,0.); | |
6052 | } else if(type == "POI") | |
6053 | { | |
6054 | fCommonHistsResults2nd->FillDifferentialFlowEtaPOI(e,v2,v2Error); | |
6055 | fCommonHistsResults4th->FillDifferentialFlowEtaPOI(e,v4,v4Error); | |
6056 | fCommonHistsResults6th->FillDifferentialFlowEtaPOI(e,v6,0.); | |
6057 | fCommonHistsResults8th->FillDifferentialFlowEtaPOI(e,v8,0.); | |
6058 | } | |
6059 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
6060 | ||
6061 | } // end of void AliFlowAnalysisWithQCumulants::FillCommonHistResultsDiffFlow(TString type, Bool_t useParticleWeights, TString eventWeights, Bool_t correctedForNUA) | |
6062 | ||
489d5531 | 6063 | //================================================================================================================================ |
6064 | ||
489d5531 | 6065 | void AliFlowAnalysisWithQCumulants::AccessConstants() |
6066 | { | |
b3dacf6b | 6067 | // Access needed common constants from AliFlowCommonConstants. |
489d5531 | 6068 | |
6069 | fnBinsPhi = AliFlowCommonConstants::GetMaster()->GetNbinsPhi(); | |
6070 | fPhiMin = AliFlowCommonConstants::GetMaster()->GetPhiMin(); | |
6071 | fPhiMax = AliFlowCommonConstants::GetMaster()->GetPhiMax(); | |
6072 | if(fnBinsPhi) fPhiBinWidth = (fPhiMax-fPhiMin)/fnBinsPhi; | |
6073 | fnBinsPt = AliFlowCommonConstants::GetMaster()->GetNbinsPt(); | |
6074 | fPtMin = AliFlowCommonConstants::GetMaster()->GetPtMin(); | |
6075 | fPtMax = AliFlowCommonConstants::GetMaster()->GetPtMax(); | |
6076 | if(fnBinsPt) fPtBinWidth = (fPtMax-fPtMin)/fnBinsPt; | |
6077 | fnBinsEta = AliFlowCommonConstants::GetMaster()->GetNbinsEta(); | |
6078 | fEtaMin = AliFlowCommonConstants::GetMaster()->GetEtaMin(); | |
6079 | fEtaMax = AliFlowCommonConstants::GetMaster()->GetEtaMax(); | |
6080 | if(fnBinsEta) fEtaBinWidth = (fEtaMax-fEtaMin)/fnBinsEta; | |
6081 | ||
6082 | } // end of void AliFlowAnalysisWithQCumulants::AccessConstants() | |
6083 | ||
489d5531 | 6084 | //================================================================================================================================ |
6085 | ||
489d5531 | 6086 | void AliFlowAnalysisWithQCumulants::CrossCheckSettings() |
6087 | { | |
6088 | // a) Cross check if the choice for multiplicity weights make sense; | |
6089 | ||
6090 | // a) Cross check if the choice for multiplicity weights make sense: | |
6091 | if(strcmp(fMultiplicityWeight->Data(),"combinations") && | |
6092 | strcmp(fMultiplicityWeight->Data(),"unit") && | |
6093 | strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
6094 | { | |
6095 | cout<<"WARNING (QC): Multiplicity weight can be either \"combinations\", \"unit\""<<endl; | |
6096 | cout<<" or \"multiplicity\". Certainly not \""<<fMultiplicityWeight->Data()<<"\"."<<endl; | |
6097 | exit(0); | |
6098 | } | |
6099 | ||
6100 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckSettings() | |
6101 | ||
489d5531 | 6102 | //================================================================================================================================ |
6103 | ||
489d5531 | 6104 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeights() |
6105 | { | |
0328db2d | 6106 | // Calculate sum of linear and quadratic event weights for correlations. |
2001bc3a | 6107 | |
6108 | // multiplicity: | |
6109 | Double_t dMult = (*fSMpk)(0,0); | |
9f33751d | 6110 | |
489d5531 | 6111 | for(Int_t p=0;p<2;p++) // power-1 |
6112 | { | |
6113 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
6114 | { | |
6115 | fIntFlowSumOfEventWeights[p]->Fill(ci+0.5,pow(fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci+1),p+1)); | |
b3dacf6b | 6116 | if(fCalculateCumulantsVsM) |
6117 | { | |
6118 | fIntFlowSumOfEventWeightsVsM[ci][p]->Fill(dMult+0.5,pow(fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci+1),p+1)); // to be improved: dMult => sum of weights? | |
6119 | } | |
489d5531 | 6120 | } |
6121 | } | |
6122 | ||
6123 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeights() | |
6124 | ||
489d5531 | 6125 | //================================================================================================================================ |
6126 | ||
0328db2d | 6127 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeightsNUA() |
489d5531 | 6128 | { |
0328db2d | 6129 | // Calculate sum of linear and quadratic event weights for NUA terms. |
6130 | ||
6131 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
489d5531 | 6132 | { |
0328db2d | 6133 | for(Int_t p=0;p<2;p++) // power-1 |
6134 | { | |
b92ea2b9 | 6135 | for(Int_t ci=0;ci<4;ci++) // nua term index |
0328db2d | 6136 | { |
6137 | fIntFlowSumOfEventWeightsNUA[sc][p]->Fill(ci+0.5,pow(fIntFlowEventWeightForCorrectionTermsForNUAEBE[sc]->GetBinContent(ci+1),p+1)); | |
489d5531 | 6138 | } |
0328db2d | 6139 | } |
6140 | } | |
6141 | ||
6142 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfEventWeightsNUA() | |
489d5531 | 6143 | |
0328db2d | 6144 | //================================================================================================================================ |
6145 | ||
0328db2d | 6146 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfProductOfEventWeights() |
6147 | { | |
ff70ca91 | 6148 | // Calculate sum of product of event weights for correlations. |
2001bc3a | 6149 | |
6150 | // multiplicity: | |
6151 | Double_t dMult = (*fSMpk)(0,0); | |
6152 | ||
489d5531 | 6153 | Int_t counter = 0; |
6154 | ||
6155 | for(Int_t ci1=1;ci1<4;ci1++) | |
6156 | { | |
6157 | for(Int_t ci2=ci1+1;ci2<=4;ci2++) | |
6158 | { | |
ff70ca91 | 6159 | fIntFlowSumOfProductOfEventWeights->Fill(0.5+counter, |
6160 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)* | |
b3dacf6b | 6161 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); |
6162 | if(fCalculateCumulantsVsM) | |
6163 | { | |
6164 | fIntFlowSumOfProductOfEventWeightsVsM[counter]->Fill(dMult+0.5, // to be improved: dMult => sum of weights? | |
6165 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci1)* | |
6166 | fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(ci2)); | |
6167 | } // end of if(fCalculateCumulantsVsM) | |
ff70ca91 | 6168 | counter++; |
489d5531 | 6169 | } |
6170 | } | |
6171 | ||
0328db2d | 6172 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfProductOfEventWeights() |
6173 | ||
0328db2d | 6174 | //================================================================================================================================ |
6175 | ||
0328db2d | 6176 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowSumOfProductOfEventWeightsNUA() |
6177 | { | |
6178 | // Calculate sum of product of event weights for NUA terms. | |
6179 | ||
6180 | // w_{<2>} * w_{<cos(#phi)>}: | |
6181 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(0.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6182 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)); | |
6183 | // w_{<2>} * w_{<sin(#phi)>}: | |
6184 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(1.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6185 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
6186 | // w_{<cos(#phi)> * w_{<sin(#phi)>}: | |
6187 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(2.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6188 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
6189 | // w_{<2>} * w{<cos(phi1+phi2)>} | |
6190 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(3.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6191 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
6192 | // w_{<2>} * w{<sin(phi1+phi2)>} | |
6193 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(4.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6194 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6195 | // w_{<2>} * w{<cos(phi1-phi2-phi3)>} | |
6196 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(5.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6197 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6198 | // w_{<2>} * w{<sin(phi1-phi2-phi3)>} | |
6199 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(6.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1)* | |
6200 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6201 | // w_{<4>} * w{<cos(phi1)>} | |
6202 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(7.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6203 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)); | |
6204 | // w_{<4>} * w{<sin(phi1)>} | |
6205 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(8.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6206 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)); | |
6207 | // w_{<4>} * w{<cos(phi1+phi2)>} | |
6208 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(9.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6209 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
6210 | // w_{<4>} * w{<sin(phi1+phi2)>} | |
6211 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(10.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6212 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6213 | // w_{<4>} * w{<cos(phi1-phi2-phi3)>} | |
6214 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(11.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6215 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6216 | // w_{<4>} * w{<sin(phi1-phi2-phi3)>} | |
6217 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(12.5,fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2)* | |
6218 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6219 | // w_{<cos(phi1)>} * w{<cos(phi1+phi2)>} | |
6220 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(13.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6221 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
6222 | // w_{<cos(phi1)>} * w{<sin(phi1+phi2)>} | |
6223 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(14.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6224 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6225 | // w_{<cos(phi1)>} * w{<cos(phi1-phi2-phi3)>} | |
6226 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(15.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6227 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6228 | // w_{<cos(phi1)>} * w{<sin(phi1-phi2-phi3)>} | |
6229 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(16.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(1)* | |
6230 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6231 | // w_{<sin(phi1)>} * w{<cos(phi1+phi2)>} | |
6232 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(17.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)* | |
6233 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)); | |
6234 | // w_{<sin(phi1)>} * w{<sin(phi1+phi2)>} | |
6235 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(18.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)* | |
6236 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6237 | // w_{<sin(phi1)>} * w{<cos(phi1-phi2-phi3)>} | |
6238 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(19.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)* | |
6239 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6240 | // w_{<sin(phi1)>} * w{<sin(phi1-phi2-phi3)>} | |
6241 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(20.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(1)* | |
6242 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6243 | // w_{<cos(phi1+phi2)>} * w{<sin(phi1+phi2))>} | |
6244 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(21.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)* | |
6245 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)); | |
6246 | // w_{<cos(phi1+phi2)>} * w{<cos(phi1-phi2-phi3)>} | |
6247 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(22.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)* | |
6248 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6249 | // w_{<cos(phi1+phi2)>} * w{<sin(phi1-phi2-phi3)>} | |
6250 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(23.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(2)* | |
6251 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6252 | // w_{<sin(phi1+phi2)>} * w{<cos(phi1-phi2-phi3)>} | |
6253 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(24.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)* | |
6254 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)); | |
6255 | // w_{<sin(phi1+phi2)>} * w{<sin(phi1-phi2-phi3)>} | |
6256 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(25.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(2)* | |
6257 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6258 | // w_{<cos(phi1-phi2-phi3)>} * w{<sin(phi1-phi2-phi3)>} | |
6259 | fIntFlowSumOfProductOfEventWeightsNUA->Fill(26.5,fIntFlowEventWeightForCorrectionTermsForNUAEBE[1]->GetBinContent(3)* | |
6260 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[0]->GetBinContent(3)); | |
6261 | ||
6262 | } // end of void AliFlowAnalysisWithQCumulants::CalculateIntFlowIntFlowSumOfProductOfEventWeightsNUA() | |
489d5531 | 6263 | |
6264 | ||
6265 | //================================================================================================================================ | |
6266 | ||
6267 | ||
6268 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelations(TString type, TString ptOrEta) | |
6269 | { | |
6270 | // calculate reduced correlations for RPs or POIs in pt or eta bins | |
6271 | ||
6272 | // multiplicity: | |
6273 | Double_t dMult = (*fSMpk)(0,0); | |
6274 | ||
6275 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
6276 | Double_t dReQ1n = (*fReQ)(0,0); | |
6277 | Double_t dReQ2n = (*fReQ)(1,0); | |
6278 | //Double_t dReQ3n = (*fReQ)(2,0); | |
6279 | //Double_t dReQ4n = (*fReQ)(3,0); | |
6280 | Double_t dImQ1n = (*fImQ)(0,0); | |
6281 | Double_t dImQ2n = (*fImQ)(1,0); | |
6282 | //Double_t dImQ3n = (*fImQ)(2,0); | |
6283 | //Double_t dImQ4n = (*fImQ)(3,0); | |
6284 | ||
6285 | // reduced correlations are stored in fDiffFlowCorrelationsPro[0=RP,1=POI][0=pt,1=eta][correlation index]. Correlation index runs as follows: | |
6286 | // | |
6287 | // 0: <<2'>> | |
6288 | // 1: <<4'>> | |
6289 | // 2: <<6'>> | |
6290 | // 3: <<8'>> | |
6291 | ||
6292 | Int_t t = -1; // type flag | |
6293 | Int_t pe = -1; // ptEta flag | |
6294 | ||
6295 | if(type == "RP") | |
6296 | { | |
6297 | t = 0; | |
6298 | } else if(type == "POI") | |
6299 | { | |
6300 | t = 1; | |
6301 | } | |
6302 | ||
6303 | if(ptOrEta == "Pt") | |
6304 | { | |
6305 | pe = 0; | |
6306 | } else if(ptOrEta == "Eta") | |
6307 | { | |
6308 | pe = 1; | |
6309 | } | |
6310 | ||
6311 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6312 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6313 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6314 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6315 | ||
6316 | // looping over all bins and calculating reduced correlations: | |
6317 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6318 | { | |
6319 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
6320 | Double_t p1n0kRe = 0.; | |
6321 | Double_t p1n0kIm = 0.; | |
6322 | ||
6323 | // number of POIs in particular pt or eta bin: | |
6324 | Double_t mp = 0.; | |
6325 | ||
6326 | // 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): | |
6327 | Double_t q1n0kRe = 0.; | |
6328 | Double_t q1n0kIm = 0.; | |
6329 | Double_t q2n0kRe = 0.; | |
6330 | Double_t q2n0kIm = 0.; | |
6331 | ||
6332 | // number of particles which are both RPs and POIs in particular pt or eta bin: | |
6333 | Double_t mq = 0.; | |
6334 | ||
6335 | if(type == "POI") | |
6336 | { | |
6337 | // q_{m*n,0}: | |
6338 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
6339 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
6340 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
6341 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
6342 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
6343 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
6344 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
6345 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
6346 | ||
6347 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
6348 | } | |
6349 | else if(type == "RP") | |
6350 | { | |
6351 | // q_{m*n,0}: | |
6352 | q1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
6353 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
6354 | q1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
6355 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
6356 | q2n0kRe = fReRPQ1dEBE[0][pe][1][0]->GetBinContent(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
6357 | * fReRPQ1dEBE[0][pe][1][0]->GetBinEntries(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
6358 | q2n0kIm = fImRPQ1dEBE[0][pe][1][0]->GetBinContent(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
6359 | * fImRPQ1dEBE[0][pe][1][0]->GetBinEntries(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
6360 | ||
6361 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
6362 | } | |
6363 | ||
6364 | if(type == "POI") | |
6365 | { | |
6366 | // p_{m*n,0}: | |
6367 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
6368 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
6369 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
6370 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
6371 | ||
6372 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
6373 | ||
6374 | t = 1; // typeFlag = RP or POI | |
6375 | } | |
6376 | else if(type == "RP") | |
6377 | { | |
6378 | // p_{m*n,0} = q_{m*n,0}: | |
6379 | p1n0kRe = q1n0kRe; | |
6380 | p1n0kIm = q1n0kIm; | |
6381 | ||
6382 | mp = mq; | |
6383 | ||
6384 | t = 0; // typeFlag = RP or POI | |
6385 | } | |
6386 | ||
6387 | // 2'-particle correlation for particular (pt,eta) bin: | |
6388 | Double_t two1n1nPtEta = 0.; | |
6389 | if(mp*dMult-mq) | |
6390 | { | |
6391 | two1n1nPtEta = (p1n0kRe*dReQ1n+p1n0kIm*dImQ1n-mq) | |
6392 | / (mp*dMult-mq); | |
6393 | ||
6394 | if(type == "POI") // to be improved (I do not this if) | |
6395 | { | |
6396 | // fill profile to get <<2'>> for POIs | |
6397 | fDiffFlowCorrelationsPro[1][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nPtEta,mp*dMult-mq); | |
6398 | // histogram to store <2'> for POIs e-b-e (needed in some other methods): | |
6399 | fDiffFlowCorrelationsEBE[1][pe][0]->SetBinContent(b,two1n1nPtEta); | |
6400 | fDiffFlowEventWeightsForCorrelationsEBE[1][pe][0]->SetBinContent(b,mp*dMult-mq); | |
6401 | } | |
6402 | else if(type == "RP") // to be improved (I do not this if) | |
6403 | { | |
6404 | // profile to get <<2'>> for RPs: | |
6405 | fDiffFlowCorrelationsPro[0][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nPtEta,mp*dMult-mq); | |
6406 | // histogram to store <2'> for RPs e-b-e (needed in some other methods): | |
6407 | fDiffFlowCorrelationsEBE[0][pe][0]->SetBinContent(b,two1n1nPtEta); | |
6408 | fDiffFlowEventWeightsForCorrelationsEBE[0][pe][0]->SetBinContent(b,mp*dMult-mq); | |
6409 | } | |
6410 | } // end of if(mp*dMult-mq) | |
6411 | ||
6412 | // 4'-particle correlation: | |
6413 | Double_t four1n1n1n1nPtEta = 0.; | |
6414 | if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6415 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) // to be improved (introduce a new variable for this expression) | |
6416 | { | |
6417 | four1n1n1n1nPtEta = ((pow(dReQ1n,2.)+pow(dImQ1n,2.))*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
6418 | - q2n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.)) | |
6419 | - 2.*q2n0kIm*dReQ1n*dImQ1n | |
6420 | - p1n0kRe*(dReQ1n*dReQ2n+dImQ1n*dImQ2n) | |
6421 | + p1n0kIm*(dImQ1n*dReQ2n-dReQ1n*dImQ2n) | |
6422 | - 2.*dMult*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
6423 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))*mq | |
6424 | + 6.*(q1n0kRe*dReQ1n+q1n0kIm*dImQ1n) | |
6425 | + 1.*(q2n0kRe*dReQ2n+q2n0kIm*dImQ2n) | |
6426 | + 2.*(p1n0kRe*dReQ1n+p1n0kIm*dImQ1n) | |
6427 | + 2.*mq*dMult | |
6428 | - 6.*mq) | |
6429 | / ((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6430 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6431 | ||
6432 | if(type == "POI") | |
6433 | { | |
6434 | // profile to get <<4'>> for POIs: | |
6435 | fDiffFlowCorrelationsPro[1][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 POIs e-b-e (needed in some other methods): | |
6439 | fDiffFlowCorrelationsEBE[1][pe][1]->SetBinContent(b,four1n1n1n1nPtEta); | |
6440 | fDiffFlowEventWeightsForCorrelationsEBE[1][pe][1]->SetBinContent(b,(mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6441 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6442 | } | |
6443 | else if(type == "RP") | |
6444 | { | |
6445 | // profile to get <<4'>> for RPs: | |
6446 | fDiffFlowCorrelationsPro[0][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nPtEta, | |
6447 | (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6448 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6449 | // histogram to store <4'> for RPs e-b-e (needed in some other methods): | |
6450 | fDiffFlowCorrelationsEBE[0][pe][1]->SetBinContent(b,four1n1n1n1nPtEta); | |
6451 | fDiffFlowEventWeightsForCorrelationsEBE[0][pe][1]->SetBinContent(b,(mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6452 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.)); | |
6453 | } | |
6454 | } // end of if((mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6455 | // +mq*(dMult-1.)*(dMult-2.)*(dMult-3.)) | |
6456 | ||
6457 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6458 | ||
6459 | ||
6460 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelations(TString type, TString ptOrEta); | |
6461 | ||
6462 | ||
6463 | //================================================================================================================================ | |
6464 | ||
6465 | ||
6466 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfEventWeights(TString type, TString ptOrEta) | |
6467 | { | |
6468 | // Calculate sums of various event weights for reduced correlations. | |
6469 | // (These quantitites are needed in expressions for unbiased estimators relevant for the statistical errors.) | |
6470 | ||
6471 | Int_t typeFlag = -1; | |
6472 | Int_t ptEtaFlag = -1; | |
6473 | ||
6474 | if(type == "RP") | |
6475 | { | |
6476 | typeFlag = 0; | |
6477 | } else if(type == "POI") | |
6478 | { | |
6479 | typeFlag = 1; | |
6480 | } | |
6481 | ||
6482 | if(ptOrEta == "Pt") | |
6483 | { | |
6484 | ptEtaFlag = 0; | |
6485 | } else if(ptOrEta == "Eta") | |
6486 | { | |
6487 | ptEtaFlag = 1; | |
6488 | } | |
6489 | ||
6490 | // shortcuts: | |
6491 | Int_t t = typeFlag; | |
6492 | Int_t pe = ptEtaFlag; | |
6493 | ||
6494 | // binning: | |
6495 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6496 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6497 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6498 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6499 | ||
6500 | for(Int_t rpq=0;rpq<3;rpq++) | |
6501 | { | |
6502 | for(Int_t m=0;m<4;m++) | |
6503 | { | |
6504 | for(Int_t k=0;k<9;k++) | |
6505 | { | |
6506 | if(!fReRPQ1dEBE[rpq][pe][m][k]) | |
6507 | { | |
6508 | cout<<"WARNING: fReRPQ1dEBE[rpq][pe][m][k] is NULL in AFAWQC::CSAPOEWFDF() !!!!"<<endl; | |
6509 | cout<<"pe = "<<pe<<endl; | |
6510 | cout<<"rpq = "<<rpq<<endl; | |
6511 | cout<<"m = "<<m<<endl; | |
6512 | cout<<"k = "<<k<<endl; | |
6513 | exit(0); | |
6514 | } | |
6515 | } | |
6516 | } | |
6517 | } | |
6518 | ||
6519 | // multiplicities: | |
6520 | Double_t dMult = (*fSMpk)(0,0); // total event multiplicity | |
6521 | //Double_t mr = 0.; // number of RPs in particular pt or eta bin | |
6522 | Double_t mp = 0.; // number of POIs in particular pt or eta bin | |
6523 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin | |
6524 | ||
6525 | // event weights for reduced correlations: | |
6526 | Double_t dw2 = 0.; // event weight for <2'> | |
6527 | Double_t dw4 = 0.; // event weight for <4'> | |
6528 | //Double_t dw6 = 0.; // event weight for <6'> | |
6529 | //Double_t dw8 = 0.; // event weight for <8'> | |
6530 | ||
6531 | // looping over bins: | |
6532 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6533 | { | |
6534 | if(type == "RP") | |
6535 | { | |
6536 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b); | |
6537 | mp = mq; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow | |
6538 | } else if(type == "POI") | |
6539 | { | |
6540 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b); | |
6541 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); | |
6542 | } | |
6543 | ||
6544 | // event weight for <2'>: | |
6545 | dw2 = mp*dMult-mq; | |
6546 | fDiffFlowSumOfEventWeights[t][pe][0][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2); | |
6547 | fDiffFlowSumOfEventWeights[t][pe][1][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw2,2.)); | |
6548 | ||
6549 | // event weight for <4'>: | |
6550 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6551 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); | |
6552 | fDiffFlowSumOfEventWeights[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4); | |
6553 | fDiffFlowSumOfEventWeights[t][pe][1][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw4,2.)); | |
6554 | ||
6555 | // event weight for <6'>: | |
6556 | //dw6 = ...; | |
6557 | //fDiffFlowSumOfEventWeights[t][pe][0][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6); | |
6558 | //fDiffFlowSumOfEventWeights[t][pe][t][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw6,2.)); | |
6559 | ||
6560 | // event weight for <8'>: | |
6561 | //dw8 = ...; | |
6562 | //fDiffFlowSumOfEventWeights[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw8); | |
6563 | //fDiffFlowSumOfEventWeights[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],pow(dw8,2.)); | |
6564 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6565 | ||
6566 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfEventWeights() | |
6567 | ||
6568 | ||
6569 | //================================================================================================================================ | |
6570 | ||
6571 | ||
6572 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta) | |
6573 | { | |
6574 | // Calculate sum of products of various event weights for both types of correlations (the ones for int. and diff. flow). | |
6575 | // (These quantitites are needed in expressions for unbiased estimators relevant for the statistical errors.) | |
6576 | // | |
6577 | // Important: To fill fDiffFlowSumOfProductOfEventWeights[][][][] use bellow table (i,j) with following constraints: | |
6578 | // 1.) i<j | |
6579 | // 2.) do not store terms which DO NOT include reduced correlations; | |
6580 | // Table: | |
6581 | // [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'>] | |
6582 | ||
6583 | Int_t typeFlag = -1; | |
6584 | Int_t ptEtaFlag = -1; | |
6585 | ||
6586 | if(type == "RP") | |
6587 | { | |
6588 | typeFlag = 0; | |
6589 | } else if(type == "POI") | |
6590 | { | |
6591 | typeFlag = 1; | |
6592 | } | |
6593 | ||
6594 | if(ptOrEta == "Pt") | |
6595 | { | |
6596 | ptEtaFlag = 0; | |
6597 | } else if(ptOrEta == "Eta") | |
6598 | { | |
6599 | ptEtaFlag = 1; | |
6600 | } | |
6601 | ||
6602 | // shortcuts: | |
6603 | Int_t t = typeFlag; | |
6604 | Int_t pe = ptEtaFlag; | |
6605 | ||
6606 | // binning: | |
6607 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6608 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6609 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6610 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6611 | ||
6612 | // protection: | |
6613 | for(Int_t rpq=0;rpq<3;rpq++) | |
6614 | { | |
6615 | for(Int_t m=0;m<4;m++) | |
6616 | { | |
6617 | for(Int_t k=0;k<9;k++) | |
6618 | { | |
6619 | if(!fReRPQ1dEBE[rpq][pe][m][k]) | |
6620 | { | |
6621 | cout<<"WARNING: fReRPQ1dEBE[rpq][pe][m][k] is NULL in AFAWQC::CSAPOEWFDF() !!!!"<<endl; | |
6622 | cout<<"pe = "<<pe<<endl; | |
6623 | cout<<"rpq = "<<rpq<<endl; | |
6624 | cout<<"m = "<<m<<endl; | |
6625 | cout<<"k = "<<k<<endl; | |
6626 | exit(0); | |
6627 | } | |
6628 | } | |
6629 | } | |
6630 | } | |
6631 | ||
6632 | // multiplicities: | |
6633 | Double_t dMult = (*fSMpk)(0,0); // total event multiplicity | |
6634 | //Double_t mr = 0.; // number of RPs in particular pt or eta bin | |
6635 | Double_t mp = 0.; // number of POIs in particular pt or eta bin | |
6636 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin | |
6637 | ||
6638 | // event weights for correlations: | |
6639 | Double_t dW2 = dMult*(dMult-1); // event weight for <2> | |
6640 | Double_t dW4 = dMult*(dMult-1)*(dMult-2)*(dMult-3); // event weight for <4> | |
6641 | Double_t dW6 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5); // event weight for <6> | |
6642 | Double_t dW8 = dMult*(dMult-1)*(dMult-2)*(dMult-3)*(dMult-4)*(dMult-5)*(dMult-6)*(dMult-7); // event weight for <8> | |
6643 | ||
6644 | // event weights for reduced correlations: | |
6645 | Double_t dw2 = 0.; // event weight for <2'> | |
6646 | Double_t dw4 = 0.; // event weight for <4'> | |
6647 | //Double_t dw6 = 0.; // event weight for <6'> | |
6648 | //Double_t dw8 = 0.; // event weight for <8'> | |
6649 | ||
6650 | // looping over bins: | |
6651 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6652 | { | |
6653 | if(type == "RP") | |
6654 | { | |
6655 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b); | |
6656 | mp = mq; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow | |
6657 | } else if(type == "POI") | |
6658 | { | |
6659 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b); | |
6660 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); | |
6661 | } | |
6662 | ||
6663 | // event weight for <2'>: | |
6664 | dw2 = mp*dMult-mq; | |
6665 | fDiffFlowSumOfProductOfEventWeights[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw2); // storing product of even weights for <2> and <2'> | |
6666 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW4); // storing product of even weights for <4> and <2'> | |
6667 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW6); // storing product of even weights for <6> and <2'> | |
6668 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dW8); // storing product of even weights for <8> and <2'> | |
6669 | ||
6670 | // event weight for <4'>: | |
6671 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6672 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); | |
6673 | fDiffFlowSumOfProductOfEventWeights[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw4); // storing product of even weights for <2> and <4'> | |
6674 | fDiffFlowSumOfProductOfEventWeights[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw4); // storing product of even weights for <2'> and <4'> | |
6675 | fDiffFlowSumOfProductOfEventWeights[t][pe][2][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw4); // storing product of even weights for <4> and <4'> | |
6676 | fDiffFlowSumOfProductOfEventWeights[t][pe][3][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dW6); // storing product of even weights for <6> and <4'> | |
6677 | fDiffFlowSumOfProductOfEventWeights[t][pe][3][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dW8); // storing product of even weights for <8> and <4'> | |
6678 | ||
6679 | // event weight for <6'>: | |
6680 | //dw6 = ...; | |
6681 | //fDiffFlowSumOfProductOfEventWeights[t][pe][0][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw6); // storing product of even weights for <2> and <6'> | |
6682 | //fDiffFlowSumOfProductOfEventWeights[t][pe][1][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw6); // storing product of even weights for <2'> and <6'> | |
6683 | //fDiffFlowSumOfProductOfEventWeights[t][pe][2][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw6); // storing product of even weights for <4> and <6'> | |
6684 | //fDiffFlowSumOfProductOfEventWeights[t][pe][3][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dw6); // storing product of even weights for <4'> and <6'> | |
6685 | //fDiffFlowSumOfProductOfEventWeights[t][pe][4][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW6*dw6); // storing product of even weights for <6> and <6'> | |
6686 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dW8); // storing product of even weights for <6'> and <8> | |
6687 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dw8); // storing product of even weights for <6'> and <8'> | |
6688 | ||
6689 | // event weight for <8'>: | |
6690 | //dw8 = ...; | |
6691 | //fDiffFlowSumOfProductOfEventWeights[t][pe][0][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW2*dw8); // storing product of even weights for <2> and <8'> | |
6692 | //fDiffFlowSumOfProductOfEventWeights[t][pe][1][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw2*dw8); // storing product of even weights for <2'> and <8'> | |
6693 | //fDiffFlowSumOfProductOfEventWeights[t][pe][2][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW4*dw8); // storing product of even weights for <4> and <8'> | |
6694 | //fDiffFlowSumOfProductOfEventWeights[t][pe][3][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw4*dw8); // storing product of even weights for <4'> and <8'> | |
6695 | //fDiffFlowSumOfProductOfEventWeights[t][pe][4][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW6*dw8); // storing product of even weights for <6> and <8'> | |
6696 | //fDiffFlowSumOfProductOfEventWeights[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dw6*dw8); // storing product of even weights for <6'> and <8'> | |
6697 | //fDiffFlowSumOfProductOfEventWeights[t][pe][6][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],dW8*dw8); // storing product of even weights for <8> and <8'> | |
6698 | ||
6699 | // Table: | |
6700 | // [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'>] | |
6701 | ||
6702 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6703 | ||
6704 | ||
6705 | ||
6706 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowSumOfProductOfEventWeights(TString type, TString ptOrEta) | |
6707 | ||
6708 | ||
6709 | //================================================================================================================================ | |
6710 | ||
6711 | ||
6712 | void AliFlowAnalysisWithQCumulants::FinalizeReducedCorrelations(TString type, TString ptOrEta) | |
6713 | { | |
6714 | // Transfer profiles into histograms and calculate statistical errors correctly. | |
6715 | ||
6716 | Int_t typeFlag = -1; | |
6717 | Int_t ptEtaFlag = -1; | |
6718 | ||
6719 | if(type == "RP") | |
6720 | { | |
6721 | typeFlag = 0; | |
6722 | } else if(type == "POI") | |
6723 | { | |
6724 | typeFlag = 1; | |
6725 | } | |
6726 | ||
6727 | if(ptOrEta == "Pt") | |
6728 | { | |
6729 | ptEtaFlag = 0; | |
6730 | } else if(ptOrEta == "Eta") | |
6731 | { | |
6732 | ptEtaFlag = 1; | |
6733 | } | |
6734 | ||
6735 | // shortcuts: | |
6736 | Int_t t = typeFlag; | |
6737 | Int_t pe = ptEtaFlag; | |
6738 | ||
6739 | for(Int_t rci=0;rci<4;rci++) | |
6740 | { | |
6741 | if(!fDiffFlowCorrelationsPro[t][pe][rci]) | |
6742 | { | |
6743 | cout<<"WARNING: fDiffFlowCorrelationsPro[t][pe][rci] is NULL in AFAWQC::FRC() !!!!"<<endl; | |
6744 | cout<<"t = "<<t<<endl; | |
6745 | cout<<"pe = "<<pe<<endl; | |
6746 | cout<<"rci = "<<rci<<endl; | |
6747 | exit(0); | |
6748 | } | |
6749 | for(Int_t power=0;power<2;power++) | |
6750 | { | |
6751 | if(!fDiffFlowSumOfEventWeights[t][pe][power][rci]) | |
6752 | { | |
6753 | cout<<"WARNING: fDiffFlowSumOfEventWeights[t][pe][power][rci] is NULL in AFAWQC::FRC() !!!!"<<endl; | |
6754 | cout<<"t = "<<t<<endl; | |
6755 | cout<<"pe = "<<pe<<endl; | |
6756 | cout<<"power = "<<power<<endl; | |
6757 | cout<<"rci = "<<rci<<endl; | |
6758 | exit(0); | |
6759 | } | |
6760 | } // end of for(Int_t power=0;power<2;power++) | |
6761 | } // end of for(Int_t rci=0;rci<4;rci++) | |
6762 | ||
6763 | // common: | |
6764 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6765 | ||
6766 | // transfer 1D profile into 1D histogram: | |
6767 | Double_t correlation = 0.; | |
6768 | Double_t spread = 0.; | |
6769 | Double_t sumOfWeights = 0.; // sum of weights for particular reduced correlations for particular pt or eta bin | |
6770 | Double_t sumOfSquaredWeights = 0.; // sum of squared weights for particular reduced correlations for particular pt or eta bin | |
6771 | Double_t error = 0.; // error = termA * spread * termB | |
6772 | // termA = (sqrt(sumOfSquaredWeights)/sumOfWeights) | |
6773 | // termB = 1/pow(1-termA^2,0.5) | |
6774 | Double_t termA = 0.; | |
6775 | Double_t termB = 0.; | |
6776 | for(Int_t rci=0;rci<4;rci++) // index of reduced correlation | |
6777 | { | |
6778 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) // number of pt or eta bins | |
6779 | { | |
6780 | correlation = fDiffFlowCorrelationsPro[t][pe][rci]->GetBinContent(b); | |
6781 | spread = fDiffFlowCorrelationsPro[t][pe][rci]->GetBinError(b); | |
6782 | sumOfWeights = fDiffFlowSumOfEventWeights[t][pe][0][rci]->GetBinContent(b); | |
6783 | sumOfSquaredWeights = fDiffFlowSumOfEventWeights[t][pe][1][rci]->GetBinContent(b); | |
6784 | if(sumOfWeights) termA = (pow(sumOfSquaredWeights,0.5)/sumOfWeights); | |
6785 | if(1.-pow(termA,2.)>0.) termB = 1./pow(1.-pow(termA,2.),0.5); | |
6786 | error = termA*spread*termB; // final error (unbiased estimator for standard deviation) | |
6787 | fDiffFlowCorrelationsHist[t][pe][rci]->SetBinContent(b,correlation); | |
6788 | fDiffFlowCorrelationsHist[t][pe][rci]->SetBinError(b,error); | |
6789 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6790 | } // end of for(Int_t rci=0;rci<4;rci++) | |
6791 | ||
6792 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeReducedCorrelations(TString type, TString ptOrEta) | |
6793 | ||
6794 | ||
6795 | //================================================================================================================================ | |
6796 | ||
6797 | ||
6798 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta) | |
6799 | { | |
6800 | // store products: <2><2'>, <2><4'>, <2><6'>, <2><8'>, <2'><4>, | |
6801 | // <2'><4'>, <2'><6>, <2'><6'>, <2'><8>, <2'><8'>, | |
6802 | // <4><4'>, <4><6'>, <4><8'>, <4'><6>, <4'><6'>, | |
6803 | // <4'><8>, <4'><8'>, <6><6'>, <6><8'>, <6'><8>, | |
6804 | // <6'><8'>, <8><8'>. | |
6805 | ||
6806 | Int_t typeFlag = -1; | |
6807 | Int_t ptEtaFlag = -1; | |
6808 | ||
6809 | if(type == "RP") | |
6810 | { | |
6811 | typeFlag = 0; | |
6812 | } else if(type == "POI") | |
6813 | { | |
6814 | typeFlag = 1; | |
6815 | } | |
6816 | ||
6817 | if(ptOrEta == "Pt") | |
6818 | { | |
6819 | ptEtaFlag = 0; | |
6820 | } else if(ptOrEta == "Eta") | |
6821 | { | |
6822 | ptEtaFlag = 1; | |
6823 | } | |
6824 | ||
6825 | // shortcuts: | |
6826 | Int_t t = typeFlag; | |
6827 | Int_t pe = ptEtaFlag; | |
6828 | ||
6829 | // common: | |
6830 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6831 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6832 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6833 | ||
6834 | // protections // to be improved (add protection for all pointers in this method) | |
6835 | if(!fIntFlowCorrelationsEBE) | |
6836 | { | |
6837 | cout<<"WARNING: fIntFlowCorrelationsEBE is NULL in AFAWQC::CDFPOC() !!!!"<<endl; | |
6838 | exit(0); | |
6839 | } | |
6840 | ||
6841 | /* | |
6842 | Double_t dMult = (*fSMpk)(0,0); // multiplicity (number of particles used to determine the reaction plane) | |
6843 | //Double_t mr = 0.; // number of RPs in particular pt or eta bin | |
6844 | Double_t mp = 0.; // number of POIs in particular pt or eta bin | |
6845 | Double_t mq = 0.; // number of particles which are both RPs and POIs in particular pt or eta bin | |
6846 | */ | |
6847 | ||
6848 | // e-b-e correlations: | |
6849 | Double_t twoEBE = fIntFlowCorrelationsEBE->GetBinContent(1); // <2> | |
6850 | Double_t fourEBE = fIntFlowCorrelationsEBE->GetBinContent(2); // <4> | |
6851 | Double_t sixEBE = fIntFlowCorrelationsEBE->GetBinContent(3); // <6> | |
6852 | Double_t eightEBE = fIntFlowCorrelationsEBE->GetBinContent(4); // <8> | |
6853 | ||
6854 | // event weights for correlations: | |
6855 | Double_t dW2 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(1); // event weight for <2> | |
6856 | Double_t dW4 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(2); // event weight for <4> | |
6857 | Double_t dW6 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(3); // event weight for <6> | |
6858 | Double_t dW8 = fIntFlowEventWeightsForCorrelationsEBE->GetBinContent(4); // event weight for <8> | |
6859 | ||
6860 | // e-b-e reduced correlations: | |
6861 | Double_t twoReducedEBE = 0.; // <2'> | |
6862 | Double_t fourReducedEBE = 0.; // <4'> | |
6863 | Double_t sixReducedEBE = 0.; // <6'> | |
6864 | Double_t eightReducedEBE = 0.; // <8'> | |
6865 | ||
6866 | // event weights for reduced correlations: | |
6867 | Double_t dw2 = 0.; // event weight for <2'> | |
6868 | Double_t dw4 = 0.; // event weight for <4'> | |
6869 | //Double_t dw6 = 0.; // event weight for <6'> | |
6870 | //Double_t dw8 = 0.; // event weight for <8'> | |
6871 | ||
6872 | // looping over bins: | |
6873 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
6874 | { | |
6875 | // e-b-e reduced correlations: | |
6876 | twoReducedEBE = fDiffFlowCorrelationsEBE[t][pe][0]->GetBinContent(b); | |
6877 | fourReducedEBE = fDiffFlowCorrelationsEBE[t][pe][1]->GetBinContent(b); | |
6878 | sixReducedEBE = fDiffFlowCorrelationsEBE[t][pe][2]->GetBinContent(b); | |
6879 | eightReducedEBE = fDiffFlowCorrelationsEBE[t][pe][3]->GetBinContent(b); | |
6880 | ||
6881 | /* | |
6882 | // to be improved (I should not do this here again) | |
6883 | if(type == "RP") | |
6884 | { | |
6885 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(b); | |
6886 | mp = mq; // trick to use the very same Eqs. bellow both for RP's and POI's diff. flow | |
6887 | } else if(type == "POI") | |
6888 | { | |
6889 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(b); | |
6890 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(b); | |
6891 | } | |
6892 | ||
6893 | // event weights for reduced correlations: | |
6894 | dw2 = mp*dMult-mq; // weight for <2'> | |
6895 | dw4 = (mp-mq)*dMult*(dMult-1.)*(dMult-2.) | |
6896 | + mq*(dMult-1.)*(dMult-2.)*(dMult-3.); // weight for <4'> | |
6897 | //dw6 = ... | |
6898 | //dw8 = ... | |
6899 | ||
6900 | */ | |
6901 | ||
6902 | dw2 = fDiffFlowEventWeightsForCorrelationsEBE[t][pe][0]->GetBinContent(b); | |
6903 | dw4 = fDiffFlowEventWeightsForCorrelationsEBE[t][pe][1]->GetBinContent(b); | |
6904 | ||
6905 | // storing all products: | |
6906 | fDiffFlowProductOfCorrelationsPro[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*twoReducedEBE,dW2*dw2); // storing <2><2'> | |
6907 | fDiffFlowProductOfCorrelationsPro[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*twoReducedEBE,dW4*dw2); // storing <4><2'> | |
6908 | fDiffFlowProductOfCorrelationsPro[t][pe][1][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*twoReducedEBE,dW6*dw2); // storing <6><2'> | |
6909 | fDiffFlowProductOfCorrelationsPro[t][pe][1][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*twoReducedEBE,dW8*dw2); // storing <8><2'> | |
6910 | ||
6911 | // event weight for <4'>: | |
6912 | fDiffFlowProductOfCorrelationsPro[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*fourReducedEBE,dW2*dw4); // storing <2><4'> | |
6913 | fDiffFlowProductOfCorrelationsPro[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*fourReducedEBE,dw2*dw4); // storing <2'><4'> | |
6914 | fDiffFlowProductOfCorrelationsPro[t][pe][2][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*fourReducedEBE,dW4*dw4); // storing <4><4'> | |
6915 | fDiffFlowProductOfCorrelationsPro[t][pe][3][4]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*fourReducedEBE,dW6*dw4); // storing <6><4'> | |
6916 | fDiffFlowProductOfCorrelationsPro[t][pe][3][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*fourReducedEBE,dW8*dw4); // storing <8><4'> | |
6917 | ||
6918 | // event weight for <6'>: | |
6919 | //dw6 = ...; | |
6920 | //fDiffFlowProductOfCorrelationsPro[t][pe][0][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*sixReducedEBE,dW2*dw6); // storing <2><6'> | |
6921 | //fDiffFlowProductOfCorrelationsPro[t][pe][1][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*sixReducedEBE,dw2*dw6); // storing <2'><6'> | |
6922 | //fDiffFlowProductOfCorrelationsPro[t][pe][2][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*sixReducedEBE,dW4*dw6); // storing <4><6'> | |
6923 | //fDiffFlowProductOfCorrelationsPro[t][pe][3][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourReducedEBE*sixReducedEBE,dw4*dw6); // storing <4'><6'> | |
6924 | //fDiffFlowProductOfCorrelationsPro[t][pe][4][5]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*sixReducedEBE,dW6*dw6); // storing <6><6'> | |
6925 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][6]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightEBE,dw6*dW8); // storing <6'><8> | |
6926 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightReducedEBE,dw6*dw8); // storing <6'><8'> | |
6927 | ||
6928 | // event weight for <8'>: | |
6929 | //dw8 = ...; | |
6930 | //fDiffFlowProductOfCorrelationsPro[t][pe][0][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoEBE*eightReducedEBE,dW2*dw8); // storing <2><8'> | |
6931 | //fDiffFlowProductOfCorrelationsPro[t][pe][1][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],twoReducedEBE*eightReducedEBE,dw2*dw8); // storing <2'><8'> | |
6932 | //fDiffFlowProductOfCorrelationsPro[t][pe][2][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourEBE*eightReducedEBE,dW4*dw8); // storing <4><8'> | |
6933 | //fDiffFlowProductOfCorrelationsPro[t][pe][3][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],fourReducedEBE*eightReducedEBE,dw4*dw8); // storing <4'><8'> | |
6934 | //fDiffFlowProductOfCorrelationsPro[t][pe][4][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixEBE*eightReducedEBE,dW6*dw8); // storing <6><8'> | |
6935 | //fDiffFlowProductOfCorrelationsPro[t][pe][5][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sixReducedEBE*eightReducedEBE,dw6*dw8); // storing <6'><8'> | |
6936 | //fDiffFlowProductOfCorrelationsPro[t][pe][6][7]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],eightEBE*eightReducedEBE,dW8*dw8); // storing <8><8'> | |
6937 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++ | |
6938 | ||
6939 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowProductOfCorrelations(TString type, TString ptOrEta) | |
6940 | ||
6941 | ||
6942 | //================================================================================================================================ | |
6943 | ||
6944 | ||
6945 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCovariances(TString type, TString ptOrEta) // to be improved (reimplemented) | |
6946 | { | |
6947 | // a) Calculate unbiased estimators Cov(<2>,<2'>), Cov(<2>,<4'>), Cov(<4>,<2'>), Cov(<4>,<4'>) and Cov(<2'>,<4'>) | |
6948 | // for covariances V(<2>,<2'>), V(<2>,<4'>), V(<4>,<2'>), V(<4>,<4'>) and V(<2'>,<4'>). | |
6949 | // b) Store in histogram fDiffFlowCovariances[t][pe][index] for instance the following: | |
6950 | // | |
6951 | // 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)] | |
6952 | // | |
6953 | // where N is the number of events, w_{<2>} is event weight for <2> and w_{<2'>} is event weight for <2'>. | |
6954 | // c) Binning of fDiffFlowCovariances[t][pe][index] is organized as follows: | |
6955 | // | |
6956 | // 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)] | |
6957 | // 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)] | |
6958 | // 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)] | |
6959 | // 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)] | |
6960 | // 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)] | |
6961 | // ... | |
6962 | ||
6963 | Int_t typeFlag = -1; | |
6964 | Int_t ptEtaFlag = -1; | |
6965 | ||
6966 | if(type == "RP") | |
6967 | { | |
6968 | typeFlag = 0; | |
6969 | } else if(type == "POI") | |
6970 | { | |
6971 | typeFlag = 1; | |
6972 | } | |
6973 | ||
6974 | if(ptOrEta == "Pt") | |
6975 | { | |
6976 | ptEtaFlag = 0; | |
6977 | } else if(ptOrEta == "Eta") | |
6978 | { | |
6979 | ptEtaFlag = 1; | |
6980 | } | |
6981 | ||
6982 | // shortcuts: | |
6983 | Int_t t = typeFlag; | |
6984 | Int_t pe = ptEtaFlag; | |
6985 | ||
6986 | // common: | |
6987 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
6988 | //Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
6989 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
6990 | //Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
6991 | ||
6992 | // average correlations: | |
6993 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
6994 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
6995 | //Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> | |
6996 | //Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> | |
6997 | ||
6998 | // sum of weights for correlation: | |
6999 | Double_t sumOfWeightsForTwo = fIntFlowSumOfEventWeights[0]->GetBinContent(1); // sum_{i=1}^{N} w_{<2>} | |
7000 | Double_t sumOfWeightsForFour = fIntFlowSumOfEventWeights[0]->GetBinContent(2); // sum_{i=1}^{N} w_{<4>} | |
7001 | //Double_t sumOfWeightsForSix = fIntFlowSumOfEventWeights[0]->GetBinContent(3); // sum_{i=1}^{N} w_{<6>} | |
7002 | //Double_t sumOfWeightsForEight = fIntFlowSumOfEventWeights[0]->GetBinContent(4); // sum_{i=1}^{N} w_{<8>} | |
7003 | ||
7004 | // average reduced correlations: | |
7005 | Double_t twoReduced = 0.; // <<2'>> | |
7006 | Double_t fourReduced = 0.; // <<4'>> | |
7007 | //Double_t sixReduced = 0.; // <<6'>> | |
7008 | //Double_t eightReduced = 0.; // <<8'>> | |
7009 | ||
7010 | // sum of weights for reduced correlation: | |
7011 | Double_t sumOfWeightsForTwoReduced = 0.; // sum_{i=1}^{N} w_{<2'>} | |
7012 | Double_t sumOfWeightsForFourReduced = 0.; // sum_{i=1}^{N} w_{<4'>} | |
7013 | //Double_t sumOfWeightsForSixReduced = 0.; // sum_{i=1}^{N} w_{<6'>} | |
7014 | //Double_t sumOfWeightsForEightReduced = 0.; // sum_{i=1}^{N} w_{<8'>} | |
7015 | ||
7016 | // product of weights for reduced correlation: | |
7017 | Double_t productOfWeightsForTwoTwoReduced = 0.; // sum_{i=1}^{N} w_{<2>}w_{<2'>} | |
7018 | Double_t productOfWeightsForTwoFourReduced = 0.; // sum_{i=1}^{N} w_{<2>}w_{<4'>} | |
7019 | Double_t productOfWeightsForFourTwoReduced = 0.; // sum_{i=1}^{N} w_{<4>}w_{<2'>} | |
7020 | Double_t productOfWeightsForFourFourReduced = 0.; // sum_{i=1}^{N} w_{<4>}w_{<4'>} | |
7021 | Double_t productOfWeightsForTwoReducedFourReduced = 0.; // sum_{i=1}^{N} w_{<2'>}w_{<4'>} | |
7022 | // ... | |
7023 | ||
7024 | // products for differential flow: | |
7025 | Double_t twoTwoReduced = 0; // <<2><2'>> | |
7026 | Double_t twoFourReduced = 0; // <<2><4'>> | |
7027 | Double_t fourTwoReduced = 0; // <<4><2'>> | |
7028 | Double_t fourFourReduced = 0; // <<4><4'>> | |
7029 | Double_t twoReducedFourReduced = 0; // <<2'><4'>> | |
7030 | ||
7031 | // denominators in the expressions for the unbiased estimators for covariances: | |
7032 | // denominator = 1 - term1/(term2*term3) | |
7033 | // prefactor = term1/(term2*term3) | |
7034 | Double_t denominator = 0.; | |
7035 | Double_t prefactor = 0.; | |
7036 | Double_t term1 = 0.; | |
7037 | Double_t term2 = 0.; | |
7038 | Double_t term3 = 0.; | |
7039 | ||
7040 | // unbiased estimators for covariances for differential flow: | |
7041 | Double_t covTwoTwoReduced = 0.; // Cov(<2>,<2'>) | |
7042 | Double_t wCovTwoTwoReduced = 0.; // Cov(<2>,<2'>) * prefactor(w_{<2>},w_{<2'>}) | |
7043 | Double_t covTwoFourReduced = 0.; // Cov(<2>,<4'>) | |
7044 | Double_t wCovTwoFourReduced = 0.; // Cov(<2>,<4'>) * prefactor(w_{<2>},w_{<4'>}) | |
7045 | Double_t covFourTwoReduced = 0.; // Cov(<4>,<2'>) | |
7046 | Double_t wCovFourTwoReduced = 0.; // Cov(<4>,<2'>) * prefactor(w_{<4>},w_{<2'>}) | |
7047 | Double_t covFourFourReduced = 0.; // Cov(<4>,<4'>) | |
7048 | Double_t wCovFourFourReduced = 0.; // Cov(<4>,<4'>) * prefactor(w_{<4>},w_{<4'>}) | |
7049 | Double_t covTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) | |
7050 | Double_t wCovTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) * prefactor(w_{<2'>},w_{<4'>}) | |
7051 | ||
7052 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7053 | { | |
7054 | // average reduced corelations: | |
7055 | twoReduced = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); | |
7056 | fourReduced = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); | |
7057 | // average products: | |
7058 | twoTwoReduced = fDiffFlowProductOfCorrelationsPro[t][pe][0][1]->GetBinContent(b); | |
7059 | twoFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][0][3]->GetBinContent(b); | |
7060 | fourTwoReduced = fDiffFlowProductOfCorrelationsPro[t][pe][1][2]->GetBinContent(b); | |
7061 | fourFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][2][3]->GetBinContent(b); | |
7062 | twoReducedFourReduced = fDiffFlowProductOfCorrelationsPro[t][pe][1][3]->GetBinContent(b); | |
7063 | // sum of weights for reduced correlations: | |
7064 | sumOfWeightsForTwoReduced = fDiffFlowSumOfEventWeights[t][pe][0][0]->GetBinContent(b); | |
7065 | sumOfWeightsForFourReduced = fDiffFlowSumOfEventWeights[t][pe][0][1]->GetBinContent(b); | |
7066 | // products of weights for correlations: | |
7067 | productOfWeightsForTwoTwoReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][0][1]->GetBinContent(b); | |
7068 | productOfWeightsForTwoFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][0][3]->GetBinContent(b); | |
7069 | productOfWeightsForFourTwoReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][1][2]->GetBinContent(b); | |
7070 | productOfWeightsForFourFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][2][3]->GetBinContent(b); | |
7071 | productOfWeightsForTwoReducedFourReduced = fDiffFlowSumOfProductOfEventWeights[t][pe][1][3]->GetBinContent(b); | |
7072 | // denominator for the unbiased estimator for covariances: 1 - term1/(term2*term3) | |
7073 | // prefactor (multiplies Cov's) = term1/(term2*term3) | |
7074 | // <2>,<2'>: | |
7075 | term1 = productOfWeightsForTwoTwoReduced; | |
7076 | term2 = sumOfWeightsForTwo; | |
7077 | term3 = sumOfWeightsForTwoReduced; | |
7078 | if(term2*term3>0.) | |
7079 | { | |
7080 | denominator = 1.-term1/(term2*term3); | |
7081 | prefactor = term1/(term2*term3); | |
0328db2d | 7082 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7083 | { |
7084 | covTwoTwoReduced = (twoTwoReduced-two*twoReduced)/denominator; | |
7085 | wCovTwoTwoReduced = covTwoTwoReduced*prefactor; | |
7086 | fDiffFlowCovariances[t][pe][0]->SetBinContent(b,wCovTwoTwoReduced); | |
7087 | } | |
7088 | } | |
7089 | // <2>,<4'>: | |
7090 | term1 = productOfWeightsForTwoFourReduced; | |
7091 | term2 = sumOfWeightsForTwo; | |
7092 | term3 = sumOfWeightsForFourReduced; | |
7093 | if(term2*term3>0.) | |
7094 | { | |
7095 | denominator = 1.-term1/(term2*term3); | |
7096 | prefactor = term1/(term2*term3); | |
0328db2d | 7097 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7098 | { |
7099 | covTwoFourReduced = (twoFourReduced-two*fourReduced)/denominator; | |
7100 | wCovTwoFourReduced = covTwoFourReduced*prefactor; | |
7101 | fDiffFlowCovariances[t][pe][1]->SetBinContent(b,wCovTwoFourReduced); | |
7102 | } | |
7103 | } | |
7104 | // <4>,<2'>: | |
7105 | term1 = productOfWeightsForFourTwoReduced; | |
7106 | term2 = sumOfWeightsForFour; | |
7107 | term3 = sumOfWeightsForTwoReduced; | |
7108 | if(term2*term3>0.) | |
7109 | { | |
7110 | denominator = 1.-term1/(term2*term3); | |
7111 | prefactor = term1/(term2*term3); | |
0328db2d | 7112 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7113 | { |
7114 | covFourTwoReduced = (fourTwoReduced-four*twoReduced)/denominator; | |
7115 | wCovFourTwoReduced = covFourTwoReduced*prefactor; | |
7116 | fDiffFlowCovariances[t][pe][2]->SetBinContent(b,wCovFourTwoReduced); | |
7117 | } | |
7118 | } | |
7119 | // <4>,<4'>: | |
7120 | term1 = productOfWeightsForFourFourReduced; | |
7121 | term2 = sumOfWeightsForFour; | |
7122 | term3 = sumOfWeightsForFourReduced; | |
7123 | if(term2*term3>0.) | |
7124 | { | |
7125 | denominator = 1.-term1/(term2*term3); | |
7126 | prefactor = term1/(term2*term3); | |
0328db2d | 7127 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7128 | { |
7129 | covFourFourReduced = (fourFourReduced-four*fourReduced)/denominator; | |
7130 | wCovFourFourReduced = covFourFourReduced*prefactor; | |
7131 | fDiffFlowCovariances[t][pe][3]->SetBinContent(b,wCovFourFourReduced); | |
7132 | } | |
7133 | } | |
7134 | // <2'>,<4'>: | |
7135 | term1 = productOfWeightsForTwoReducedFourReduced; | |
7136 | term2 = sumOfWeightsForTwoReduced; | |
7137 | term3 = sumOfWeightsForFourReduced; | |
7138 | if(term2*term3>0.) | |
7139 | { | |
7140 | denominator = 1.-term1/(term2*term3); | |
7141 | prefactor = term1/(term2*term3); | |
0328db2d | 7142 | if(TMath::Abs(denominator)>1e-6) |
489d5531 | 7143 | { |
7144 | covTwoReducedFourReduced = (twoReducedFourReduced-twoReduced*fourReduced)/denominator; | |
7145 | wCovTwoReducedFourReduced = covTwoReducedFourReduced*prefactor; | |
7146 | fDiffFlowCovariances[t][pe][4]->SetBinContent(b,wCovTwoReducedFourReduced); | |
7147 | } | |
7148 | } | |
7149 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7150 | ||
7151 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCovariances(TString type, TString ptOrEta) | |
7152 | ||
7153 | ||
7154 | //================================================================================================================================ | |
7155 | ||
7156 | ||
7157 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlow(TString type, TString ptOrEta) | |
7158 | { | |
7159 | // calculate differential flow from differential cumulants and previously obtained integrated flow: (to be improved: description) | |
7160 | ||
7161 | Int_t typeFlag = -1; | |
7162 | Int_t ptEtaFlag = -1; | |
7163 | ||
7164 | if(type == "RP") | |
7165 | { | |
7166 | typeFlag = 0; | |
7167 | } else if(type == "POI") | |
7168 | { | |
7169 | typeFlag = 1; | |
7170 | } | |
7171 | ||
7172 | if(ptOrEta == "Pt") | |
7173 | { | |
7174 | ptEtaFlag = 0; | |
7175 | } else if(ptOrEta == "Eta") | |
7176 | { | |
7177 | ptEtaFlag = 1; | |
7178 | } | |
7179 | ||
7180 | // shortcuts: | |
7181 | Int_t t = typeFlag; | |
7182 | Int_t pe = ptEtaFlag; | |
7183 | ||
7184 | // common: | |
7185 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
7186 | ||
7187 | // correlations: | |
7188 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
7189 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> | |
7190 | ||
7191 | // statistical errors of correlations: | |
7192 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); | |
7193 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); | |
7194 | ||
7195 | // reduced correlations: | |
7196 | Double_t twoReduced = 0.; // <<2'>> | |
7197 | Double_t fourReduced = 0.; // <<4'>> | |
7198 | ||
7199 | // statistical errors of reduced correlations: | |
7200 | Double_t twoReducedError = 0.; | |
7201 | Double_t fourReducedError = 0.; | |
7202 | ||
7203 | // covariances: | |
7204 | Double_t wCovTwoFour = fIntFlowCovariances->GetBinContent(1);// // Cov(<2>,<4>) * prefactor(<2>,<4>) | |
7205 | Double_t wCovTwoTwoReduced = 0.; // Cov(<2>,<2'>) * prefactor(<2>,<2'>) | |
7206 | Double_t wCovTwoFourReduced = 0.; // Cov(<2>,<4'>) * prefactor(<2>,<4'>) | |
7207 | Double_t wCovFourTwoReduced = 0.; // Cov(<4>,<2'>) * prefactor(<4>,<2'>) | |
7208 | Double_t wCovFourFourReduced = 0.; // Cov(<4>,<4'>) * prefactor(<4>,<4'>) | |
7209 | Double_t wCovTwoReducedFourReduced = 0.; // Cov(<2'>,<4'>) * prefactor(<2'>,<4'>) | |
7210 | ||
7211 | // differential flow: | |
7212 | Double_t v2Prime = 0.; // v'{2} | |
7213 | Double_t v4Prime = 0.; // v'{4} | |
7214 | ||
7215 | // statistical error of differential flow: | |
7216 | Double_t v2PrimeError = 0.; | |
7217 | Double_t v4PrimeError = 0.; | |
7218 | ||
7219 | // squared statistical error of differential flow: | |
7220 | Double_t v2PrimeErrorSquared = 0.; | |
7221 | Double_t v4PrimeErrorSquared = 0.; | |
7222 | ||
7223 | // loop over pt or eta bins: | |
7224 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
7225 | { | |
7226 | // reduced correlations and statistical errors: | |
7227 | twoReduced = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); | |
7228 | twoReducedError = fDiffFlowCorrelationsHist[t][pe][0]->GetBinError(b); | |
7229 | fourReduced = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); | |
7230 | fourReducedError = fDiffFlowCorrelationsHist[t][pe][1]->GetBinError(b); | |
7231 | // covariances: | |
7232 | wCovTwoTwoReduced = fDiffFlowCovariances[t][pe][0]->GetBinContent(b); | |
7233 | wCovTwoFourReduced = fDiffFlowCovariances[t][pe][1]->GetBinContent(b); | |
7234 | wCovFourTwoReduced = fDiffFlowCovariances[t][pe][2]->GetBinContent(b); | |
7235 | wCovFourFourReduced = fDiffFlowCovariances[t][pe][3]->GetBinContent(b); | |
7236 | wCovTwoReducedFourReduced = fDiffFlowCovariances[t][pe][4]->GetBinContent(b); | |
7237 | // differential flow: | |
7238 | // v'{2}: | |
7239 | if(two>0.) | |
7240 | { | |
7241 | v2Prime = twoReduced/pow(two,0.5); | |
7242 | v2PrimeErrorSquared = (1./4.)*pow(two,-3.)* | |
7243 | (pow(twoReduced,2.)*pow(twoError,2.) | |
7244 | + 4.*pow(two,2.)*pow(twoReducedError,2.) | |
7245 | - 4.*two*twoReduced*wCovTwoTwoReduced); | |
7246 | ||
7247 | ||
7248 | if(v2PrimeErrorSquared>0.) v2PrimeError = pow(v2PrimeErrorSquared,0.5); | |
7249 | fDiffFlow[t][pe][0]->SetBinContent(b,v2Prime); | |
60694576 | 7250 | if(TMath::Abs(v2Prime)>1.e-44)fDiffFlow[t][pe][0]->SetBinError(b,v2PrimeError); |
489d5531 | 7251 | } |
7252 | // differential flow: | |
7253 | // v'{4} | |
7254 | if(2.*pow(two,2.)-four > 0.) | |
7255 | { | |
7256 | v4Prime = (2.*two*twoReduced-fourReduced)/pow(2.*pow(two,2.)-four,3./4.); | |
7257 | v4PrimeErrorSquared = pow(2.*pow(two,2.)-four,-7./2.)* | |
7258 | (pow(2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced,2.)*pow(twoError,2.) | |
7259 | + (9./16.)*pow(2.*two*twoReduced-fourReduced,2.)*pow(fourError,2.) | |
7260 | + 4.*pow(two,2.)*pow(2.*pow(two,2.)-four,2.)*pow(twoReducedError,2.) | |
7261 | + pow(2.*pow(two,2.)-four,2.)*pow(fourReducedError,2.) | |
7262 | - (3./2.)*(2.*two*twoReduced-fourReduced) | |
7263 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoFour | |
7264 | - 4.*two*(2.*pow(two,2.)-four) | |
7265 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoTwoReduced | |
7266 | + 2.*(2.*pow(two,2.)-four) | |
7267 | * (2.*pow(two,2.)*twoReduced-3.*two*fourReduced+2.*four*twoReduced)*wCovTwoFourReduced | |
7268 | + 3.*two*(2.*pow(two,2.)-four)*(2.*two*twoReduced-fourReduced)*wCovFourTwoReduced | |
7269 | - (3./2.)*(2.*pow(two,2.)-four)*(2.*two*twoReduced-fourReduced)*wCovFourFourReduced | |
7270 | - 4.*two*pow(2.*pow(two,2.)-four,2.)*wCovTwoReducedFourReduced); | |
7271 | if(v4PrimeErrorSquared>0.) v4PrimeError = pow(v4PrimeErrorSquared,0.5); | |
7272 | fDiffFlow[t][pe][1]->SetBinContent(b,v4Prime); | |
60694576 | 7273 | if(TMath::Abs(v4Prime)>1.e-44)fDiffFlow[t][pe][1]->SetBinError(b,v4PrimeError); |
489d5531 | 7274 | } |
7275 | ||
7276 | } // end of for(Int_t b=1;b<=fnBinsPtEta[pe];b++) | |
7277 | ||
7278 | ||
7279 | ||
7280 | ||
7281 | /* | |
7282 | // 2D: | |
7283 | for(Int_t nua=0;nua<2;nua++) | |
7284 | { | |
7285 | for(Int_t p=1;p<=fnBinsPt;p++) | |
7286 | { | |
7287 | for(Int_t e=1;e<=fnBinsEta;e++) | |
7288 | { | |
7289 | // differential cumulants: | |
7290 | Double_t qc2Prime = fFinalCumulants2D[t][pW][eW][nua][0]->GetBinContent(fFinalCumulants2D[t][pW][eW][nua][0]->GetBin(p,e)); // QC{2'} | |
7291 | Double_t qc4Prime = fFinalCumulants2D[t][pW][eW][nua][1]->GetBinContent(fFinalCumulants2D[t][pW][eW][nua][1]->GetBin(p,e)); // QC{4'} | |
7292 | // differential flow: | |
7293 | Double_t v2Prime = 0.; | |
7294 | Double_t v4Prime = 0.; | |
7295 | if(v2) | |
7296 | { | |
7297 | v2Prime = qc2Prime/v2; | |
7298 | fFinalFlow2D[t][pW][eW][nua][0]->SetBinContent(fFinalFlow2D[t][pW][eW][nua][0]->GetBin(p,e),v2Prime); | |
7299 | } | |
7300 | if(v4) | |
7301 | { | |
7302 | v4Prime = -qc4Prime/pow(v4,3.); | |
7303 | fFinalFlow2D[t][pW][eW][nua][1]->SetBinContent(fFinalFlow2D[t][pW][eW][nua][1]->GetBin(p,e),v4Prime); | |
7304 | } | |
7305 | } // end of for(Int_t e=1;e<=fnBinsEta;e++) | |
7306 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
7307 | } // end of for(Int_t nua=0;nua<2;nua++) | |
7308 | */ | |
7309 | ||
7310 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlow(TString type, Bool_t useParticleWeights) | |
7311 | ||
489d5531 | 7312 | //================================================================================================================================ |
7313 | ||
489d5531 | 7314 | void AliFlowAnalysisWithQCumulants::StoreIntFlowFlags() |
7315 | { | |
7316 | // a) Store all flags for integrated flow in profile fIntFlowFlags. | |
7317 | ||
7318 | if(!fIntFlowFlags) | |
7319 | { | |
7320 | cout<<"WARNING: fIntFlowFlags is NULL in AFAWQC::SFFIF() !!!!"<<endl; | |
7321 | exit(0); | |
7322 | } | |
7323 | ||
7324 | // particle weights used or not: | |
7325 | fIntFlowFlags->Fill(0.5,(Int_t)fUsePhiWeights||fUsePtWeights||fUseEtaWeights); | |
7326 | // which event weights were used: | |
7327 | if(strcmp(fMultiplicityWeight->Data(),"combinations")) | |
7328 | { | |
7329 | fIntFlowFlags->Fill(1.5,0); // 0 = "combinations" (default) | |
7330 | } else if(strcmp(fMultiplicityWeight->Data(),"unit")) | |
7331 | { | |
7332 | fIntFlowFlags->Fill(1.5,1); // 1 = "unit" | |
7333 | } else if(strcmp(fMultiplicityWeight->Data(),"multiplicity")) | |
7334 | { | |
7335 | fIntFlowFlags->Fill(1.5,2); // 2 = "multiplicity" | |
7336 | } | |
7337 | // corrected for non-uniform acceptance or not: | |
7338 | fIntFlowFlags->Fill(2.5,(Int_t)fApplyCorrectionForNUA); | |
7339 | fIntFlowFlags->Fill(3.5,(Int_t)fPrintFinalResults[0]); | |
7340 | fIntFlowFlags->Fill(4.5,(Int_t)fPrintFinalResults[1]); | |
7341 | fIntFlowFlags->Fill(5.5,(Int_t)fPrintFinalResults[2]); | |
b3dacf6b | 7342 | fIntFlowFlags->Fill(6.5,(Int_t)fPrintFinalResults[3]); |
7343 | fIntFlowFlags->Fill(7.5,(Int_t)fApplyCorrectionForNUAVsM); | |
b77b6434 | 7344 | fIntFlowFlags->Fill(8.5,(Int_t)fPropagateErrorAlsoFromNIT); |
b3dacf6b | 7345 | fIntFlowFlags->Fill(9.5,(Int_t)fCalculateCumulantsVsM); |
0dd3b008 | 7346 | fIntFlowFlags->Fill(10.5,(Int_t)fMinimumBiasReferenceFlow); |
2001bc3a | 7347 | |
489d5531 | 7348 | } // end of void AliFlowAnalysisWithQCumulants::StoreIntFlowFlags() |
7349 | ||
489d5531 | 7350 | //================================================================================================================================ |
7351 | ||
489d5531 | 7352 | void AliFlowAnalysisWithQCumulants::StoreDiffFlowFlags() |
7353 | { | |
7354 | // Store all flags for differential flow in the profile fDiffFlowFlags. | |
7355 | ||
7356 | if(!fDiffFlowFlags) | |
7357 | { | |
7358 | cout<<"WARNING: fDiffFlowFlags is NULL in AFAWQC::SFFDF() !!!!"<<endl; | |
7359 | exit(0); | |
7360 | } | |
7361 | ||
7362 | fDiffFlowFlags->Fill(0.5,fUsePhiWeights||fUsePtWeights||fUseEtaWeights); // particle weights used or not | |
7363 | //fDiffFlowFlags->Fill(1.5,""); // which event weight was used? // to be improved | |
7364 | fDiffFlowFlags->Fill(2.5,fApplyCorrectionForNUA); // corrected for non-uniform acceptance or not | |
7365 | fDiffFlowFlags->Fill(3.5,fCalculate2DFlow); // calculate also 2D differential flow in (pt,eta) or not | |
7366 | ||
7367 | } // end of void AliFlowAnalysisWithQCumulants::StoreDiffFlowFlags() | |
7368 | ||
7369 | ||
7370 | //================================================================================================================================ | |
7371 | ||
7372 | ||
7373 | void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms() | |
7374 | { | |
7375 | // Access all pointers to common control and common result histograms and profiles. | |
7376 | ||
7377 | TString commonHistsName = "AliFlowCommonHistQC"; | |
7378 | commonHistsName += fAnalysisLabel->Data(); | |
7379 | AliFlowCommonHist *commonHist = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHistsName.Data())); | |
b77b6434 | 7380 | if(commonHist) |
7381 | { | |
7382 | this->SetCommonHists(commonHist); | |
7383 | if(fCommonHists->GetHarmonic()) | |
7384 | { | |
7385 | fHarmonic = (Int_t)(fCommonHists->GetHarmonic())->GetBinContent(1); | |
7386 | } | |
7387 | } // end of if(commonHist) | |
489d5531 | 7388 | TString commonHists2ndOrderName = "AliFlowCommonHist2ndOrderQC"; |
7389 | commonHists2ndOrderName += fAnalysisLabel->Data(); | |
7390 | AliFlowCommonHist *commonHist2nd = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHists2ndOrderName.Data())); | |
7391 | if(commonHist2nd) this->SetCommonHists2nd(commonHist2nd); | |
7392 | TString commonHists4thOrderName = "AliFlowCommonHist4thOrderQC"; | |
7393 | commonHists4thOrderName += fAnalysisLabel->Data(); | |
7394 | AliFlowCommonHist *commonHist4th = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHists4thOrderName.Data())); | |
7395 | if(commonHist4th) this->SetCommonHists4th(commonHist4th); | |
7396 | TString commonHists6thOrderName = "AliFlowCommonHist6thOrderQC"; | |
7397 | commonHists6thOrderName += fAnalysisLabel->Data(); | |
7398 | AliFlowCommonHist *commonHist6th = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHists6thOrderName.Data())); | |
7399 | if(commonHist6th) this->SetCommonHists6th(commonHist6th); | |
7400 | TString commonHists8thOrderName = "AliFlowCommonHist8thOrderQC"; | |
7401 | commonHists8thOrderName += fAnalysisLabel->Data(); | |
7402 | AliFlowCommonHist *commonHist8th = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHists8thOrderName.Data())); | |
7403 | if(commonHist8th) this->SetCommonHists8th(commonHist8th); | |
7404 | TString commonHistResults2ndOrderName = "AliFlowCommonHistResults2ndOrderQC"; | |
7405 | commonHistResults2ndOrderName += fAnalysisLabel->Data(); | |
b77b6434 | 7406 | AliFlowCommonHistResults *commonHistRes2nd = dynamic_cast<AliFlowCommonHistResults*> |
7407 | (fHistList->FindObject(commonHistResults2ndOrderName.Data())); | |
489d5531 | 7408 | if(commonHistRes2nd) this->SetCommonHistsResults2nd(commonHistRes2nd); |
7409 | TString commonHistResults4thOrderName = "AliFlowCommonHistResults4thOrderQC"; | |
7410 | commonHistResults4thOrderName += fAnalysisLabel->Data(); | |
7411 | AliFlowCommonHistResults *commonHistRes4th = dynamic_cast<AliFlowCommonHistResults*> | |
7412 | (fHistList->FindObject(commonHistResults4thOrderName.Data())); | |
7413 | if(commonHistRes4th) this->SetCommonHistsResults4th(commonHistRes4th); | |
7414 | TString commonHistResults6thOrderName = "AliFlowCommonHistResults6thOrderQC"; | |
7415 | commonHistResults6thOrderName += fAnalysisLabel->Data(); | |
7416 | AliFlowCommonHistResults *commonHistRes6th = dynamic_cast<AliFlowCommonHistResults*> | |
7417 | (fHistList->FindObject(commonHistResults6thOrderName.Data())); | |
7418 | if(commonHistRes6th) this->SetCommonHistsResults6th(commonHistRes6th); | |
7419 | TString commonHistResults8thOrderName = "AliFlowCommonHistResults8thOrderQC"; | |
7420 | commonHistResults8thOrderName += fAnalysisLabel->Data(); | |
7421 | AliFlowCommonHistResults *commonHistRes8th = dynamic_cast<AliFlowCommonHistResults*> | |
7422 | (fHistList->FindObject(commonHistResults8thOrderName.Data())); | |
7423 | if(commonHistRes8th) this->SetCommonHistsResults8th(commonHistRes8th); | |
7424 | ||
7425 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForCommonHistograms() | |
7426 | ||
7427 | ||
7428 | //================================================================================================================================ | |
7429 | ||
7430 | ||
7431 | void AliFlowAnalysisWithQCumulants::GetPointersForParticleWeightsHistograms() | |
7432 | { | |
7433 | // Get pointers for histograms with particle weights. | |
7434 | ||
7435 | TList *weightsList = dynamic_cast<TList*>(fHistList->FindObject("Weights")); | |
7436 | if(weightsList) this->SetWeightsList(weightsList); | |
7437 | TString fUseParticleWeightsName = "fUseParticleWeightsQC"; // to be improved (hirdwired label QC) | |
7438 | fUseParticleWeightsName += fAnalysisLabel->Data(); | |
7439 | TProfile *useParticleWeights = dynamic_cast<TProfile*>(weightsList->FindObject(fUseParticleWeightsName.Data())); | |
7440 | if(useParticleWeights) | |
7441 | { | |
7442 | this->SetUseParticleWeights(useParticleWeights); | |
7443 | fUsePhiWeights = (Int_t)fUseParticleWeights->GetBinContent(1); | |
7444 | fUsePtWeights = (Int_t)fUseParticleWeights->GetBinContent(2); | |
7445 | fUseEtaWeights = (Int_t)fUseParticleWeights->GetBinContent(3); | |
7446 | } | |
7447 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForParticleWeightsHistograms(); | |
7448 | ||
7449 | ||
7450 | //================================================================================================================================ | |
7451 | ||
7452 | ||
7453 | void AliFlowAnalysisWithQCumulants::GetPointersForIntFlowHistograms() | |
7454 | { | |
7455 | // Get pointers for histograms and profiles relevant for integrated flow: | |
7456 | // a) Get pointer to base list for integrated flow holding profile fIntFlowFlags and lists fIntFlowProfiles and fIntFlowResults. | |
7457 | // b) Get pointer to profile fIntFlowFlags holding all flags for integrated flow. | |
7458 | // c) Get pointer to list fIntFlowProfiles and pointers to all objects that she holds. | |
7459 | // d) Get pointer to list fIntFlowResults and pointers to all objects that she holds. | |
7460 | ||
7461 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data member?) | |
7462 | TString powerFlag[2] = {"linear","quadratic"}; // to be improved (should I promote this to data member?) | |
ff70ca91 | 7463 | TString correlationFlag[4] = {"<<2>>","<<4>>","<<6>>","<<8>>"}; // to be improved (should I promote this to data member?) |
489d5531 | 7464 | |
7465 | // a) Get pointer to base list for integrated flow holding profile fIntFlowFlags and lists fIntFlowProfiles and fIntFlowResults: | |
7466 | TList *intFlowList = NULL; | |
7467 | intFlowList = dynamic_cast<TList*>(fHistList->FindObject("Integrated Flow")); | |
7468 | if(!intFlowList) | |
7469 | { | |
7470 | cout<<"WARNING: intFlowList is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7471 | exit(0); | |
7472 | } | |
7473 | ||
b92ea2b9 | 7474 | // b) Get pointer to profile fIntFlowFlags holding all flags for integrated flow: |
7475 | TString intFlowFlagsName = "fIntFlowFlags"; | |
7476 | intFlowFlagsName += fAnalysisLabel->Data(); | |
7477 | TProfile *intFlowFlags = dynamic_cast<TProfile*>(intFlowList->FindObject(intFlowFlagsName.Data())); | |
7478 | if(intFlowFlags) | |
7479 | { | |
7480 | this->SetIntFlowFlags(intFlowFlags); | |
7481 | fApplyCorrectionForNUA = (Bool_t)intFlowFlags->GetBinContent(3); | |
7482 | fApplyCorrectionForNUAVsM = (Bool_t)intFlowFlags->GetBinContent(8); | |
7483 | fCalculateCumulantsVsM = (Bool_t)intFlowFlags->GetBinContent(10); | |
7484 | } else | |
7485 | { | |
7486 | cout<<"WARNING: intFlowFlags is NULL in FAWQC::GPFIFH() !!!!"<<endl; | |
7487 | } | |
489d5531 | 7488 | |
7489 | // c) Get pointer to list fIntFlowProfiles and pointers to all objects that she holds: | |
7490 | TList *intFlowProfiles = NULL; | |
7491 | intFlowProfiles = dynamic_cast<TList*>(intFlowList->FindObject("Profiles")); | |
7492 | if(intFlowProfiles) | |
7493 | { | |
7494 | // average multiplicities: | |
7495 | TString avMultiplicityName = "fAvMultiplicity"; | |
7496 | avMultiplicityName += fAnalysisLabel->Data(); | |
7497 | TProfile *avMultiplicity = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(avMultiplicityName.Data())); | |
7498 | if(avMultiplicity) | |
7499 | { | |
7500 | this->SetAvMultiplicity(avMultiplicity); | |
7501 | } else | |
7502 | { | |
7503 | cout<<"WARNING: avMultiplicity is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7504 | } | |
7505 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with wrong errors!): | |
7506 | TString intFlowCorrelationsProName = "fIntFlowCorrelationsPro"; | |
7507 | intFlowCorrelationsProName += fAnalysisLabel->Data(); | |
7508 | TProfile *intFlowCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowCorrelationsProName.Data())); | |
7509 | if(intFlowCorrelationsPro) | |
7510 | { | |
7511 | this->SetIntFlowCorrelationsPro(intFlowCorrelationsPro); | |
7512 | } else | |
7513 | { | |
7514 | cout<<"WARNING: intFlowCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
ff70ca91 | 7515 | } |
7516 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> versus multiplicity for all events (error is wrong here): | |
b3dacf6b | 7517 | if(fCalculateCumulantsVsM) |
ff70ca91 | 7518 | { |
b3dacf6b | 7519 | TString intFlowCorrelationsVsMProName = "fIntFlowCorrelationsVsMPro"; |
7520 | intFlowCorrelationsVsMProName += fAnalysisLabel->Data(); | |
7521 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
ff70ca91 | 7522 | { |
b3dacf6b | 7523 | TProfile *intFlowCorrelationsVsMPro = dynamic_cast<TProfile*> |
7524 | (intFlowProfiles->FindObject(Form("%s, %s",intFlowCorrelationsVsMProName.Data(),correlationFlag[ci].Data()))); | |
7525 | if(intFlowCorrelationsVsMPro) | |
7526 | { | |
7527 | this->SetIntFlowCorrelationsVsMPro(intFlowCorrelationsVsMPro,ci); | |
7528 | } else | |
7529 | { | |
7530 | cout<<"WARNING: "<<Form("intFlowCorrelationsVsMPro[%d]",ci)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7531 | } | |
7532 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
7533 | } // end of if(fCalculateCumulantsVsM) | |
489d5531 | 7534 | // average all correlations for integrated flow (with wrong errors!): |
7535 | TString intFlowCorrelationsAllProName = "fIntFlowCorrelationsAllPro"; | |
7536 | intFlowCorrelationsAllProName += fAnalysisLabel->Data(); | |
7537 | TProfile *intFlowCorrelationsAllPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowCorrelationsAllProName.Data())); | |
7538 | if(intFlowCorrelationsAllPro) | |
7539 | { | |
7540 | this->SetIntFlowCorrelationsAllPro(intFlowCorrelationsAllPro); | |
7541 | } else | |
7542 | { | |
7543 | cout<<"WARNING: intFlowCorrelationsAllPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7544 | } | |
7545 | // average extra correlations for integrated flow (which appear only when particle weights are used): | |
7546 | // (to be improved: Weak point in implementation, I am assuming here that method GetPointersForParticleWeightsHistograms() was called) | |
7547 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
7548 | { | |
7549 | TString intFlowExtraCorrelationsProName = "fIntFlowExtraCorrelationsPro"; | |
7550 | intFlowExtraCorrelationsProName += fAnalysisLabel->Data(); | |
7551 | TProfile *intFlowExtraCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowExtraCorrelationsProName.Data())); | |
7552 | if(intFlowExtraCorrelationsPro) | |
7553 | { | |
7554 | this->SetIntFlowExtraCorrelationsPro(intFlowExtraCorrelationsPro); | |
7555 | } else | |
7556 | { | |
7557 | cout<<"WARNING: intFlowExtraCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7558 | } | |
7559 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
7560 | // average products of correlations <2>, <4>, <6> and <8>: | |
7561 | TString intFlowProductOfCorrelationsProName = "fIntFlowProductOfCorrelationsPro"; | |
7562 | intFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
7563 | TProfile *intFlowProductOfCorrelationsPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowProductOfCorrelationsProName.Data())); | |
7564 | if(intFlowProductOfCorrelationsPro) | |
7565 | { | |
7566 | this->SetIntFlowProductOfCorrelationsPro(intFlowProductOfCorrelationsPro); | |
7567 | } else | |
7568 | { | |
7569 | cout<<"WARNING: intFlowProductOfCorrelationsPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
ff70ca91 | 7570 | } |
7571 | // average product of correlations <2>, <4>, <6> and <8> versus multiplicity | |
7572 | // [0=<<2><4>>,1=<<2><6>>,2=<<2><8>>,3=<<4><6>>,4=<<4><8>>,5=<<6><8>>] | |
b3dacf6b | 7573 | if(fCalculateCumulantsVsM) |
7574 | { | |
7575 | TString intFlowProductOfCorrelationsVsMProName = "fIntFlowProductOfCorrelationsVsMPro"; | |
7576 | intFlowProductOfCorrelationsVsMProName += fAnalysisLabel->Data(); | |
7577 | TString productFlag[6] = {"<<2><4>>","<<2><6>>","<<2><8>>","<<4><6>>","<<4><8>>","<<6><8>>"}; | |
7578 | for(Int_t pi=0;pi<6;pi++) | |
7579 | { | |
7580 | TProfile *intFlowProductOfCorrelationsVsMPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(Form("%s, %s",intFlowProductOfCorrelationsVsMProName.Data(),productFlag[pi].Data()))); | |
7581 | if(intFlowProductOfCorrelationsVsMPro) | |
7582 | { | |
7583 | this->SetIntFlowProductOfCorrelationsVsMPro(intFlowProductOfCorrelationsVsMPro,pi); | |
7584 | } else | |
7585 | { | |
7586 | cout<<"WARNING: "<<Form("intFlowProductOfCorrelationsVsMPro[%d]",pi)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7587 | } | |
7588 | } // end of for(Int_t pi=0;pi<6;pi++) | |
7589 | } // end of if(fCalculateCumulantsVsM) | |
489d5531 | 7590 | // average correction terms for non-uniform acceptance (with wrong errors!): |
7591 | for(Int_t sc=0;sc<2;sc++) | |
7592 | { | |
7593 | TString intFlowCorrectionTermsForNUAProName = "fIntFlowCorrectionTermsForNUAPro"; | |
7594 | intFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
7595 | TProfile *intFlowCorrectionTermsForNUAPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject((Form("%s: %s terms",intFlowCorrectionTermsForNUAProName.Data(),sinCosFlag[sc].Data())))); | |
7596 | if(intFlowCorrectionTermsForNUAPro) | |
7597 | { | |
7598 | this->SetIntFlowCorrectionTermsForNUAPro(intFlowCorrectionTermsForNUAPro,sc); | |
7599 | } else | |
7600 | { | |
7601 | cout<<"WARNING: intFlowCorrectionTermsForNUAPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7602 | cout<<"sc = "<<sc<<endl; | |
7603 | } | |
2001bc3a | 7604 | // versus multiplicity: |
b3dacf6b | 7605 | if(fCalculateCumulantsVsM) |
2001bc3a | 7606 | { |
b3dacf6b | 7607 | TString correctionTermFlag[4] = {"(n(phi1))","(n(phi1+phi2))","(n(phi1-phi2-phi3))","(n(2phi1-phi2))"}; // to be improved - hardwired 4 |
7608 | TString intFlowCorrectionTermsForNUAVsMProName = "fIntFlowCorrectionTermsForNUAVsMPro"; | |
7609 | intFlowCorrectionTermsForNUAVsMProName += fAnalysisLabel->Data(); | |
7610 | for(Int_t ci=0;ci<4;ci++) // correction term index (to be improved - hardwired 4) | |
2001bc3a | 7611 | { |
b3dacf6b | 7612 | TProfile *intFlowCorrectionTermsForNUAVsMPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(Form("%s: #LT#LT%s%s#GT#GT",intFlowCorrectionTermsForNUAVsMProName.Data(),sinCosFlag[sc].Data(),correctionTermFlag[ci].Data()))); |
7613 | if(intFlowCorrectionTermsForNUAVsMPro) | |
7614 | { | |
7615 | this->SetIntFlowCorrectionTermsForNUAVsMPro(intFlowCorrectionTermsForNUAVsMPro,sc,ci); | |
7616 | } else | |
7617 | { | |
7618 | cout<<"WARNING: intFlowCorrectionTermsForNUAVsMPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7619 | cout<<"sc = "<<sc<<endl; | |
7620 | cout<<"ci = "<<ci<<endl; | |
7621 | } | |
7622 | } // end of for(Int_t ci=0;ci<4;ci++) // correction term index (to be improved - hardwired 4) | |
7623 | } // end of if(fCalculateCumulantsVsM) | |
489d5531 | 7624 | } // end of for(Int_t sc=0;sc<2;sc++) |
0328db2d | 7625 | // average products of correction terms for NUA: |
7626 | TString intFlowProductOfCorrectionTermsForNUAProName = "fIntFlowProductOfCorrectionTermsForNUAPro"; | |
7627 | intFlowProductOfCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
7628 | TProfile *intFlowProductOfCorrectionTermsForNUAPro = dynamic_cast<TProfile*>(intFlowProfiles->FindObject(intFlowProductOfCorrectionTermsForNUAProName.Data())); | |
7629 | if(intFlowProductOfCorrectionTermsForNUAPro) | |
7630 | { | |
7631 | this->SetIntFlowProductOfCorrectionTermsForNUAPro(intFlowProductOfCorrectionTermsForNUAPro); | |
7632 | } else | |
7633 | { | |
7634 | cout<<"WARNING: intFlowProductOfCorrectionTermsForNUAPro is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7635 | } | |
489d5531 | 7636 | } else // to if(intFlowProfiles) |
7637 | { | |
7638 | cout<<"WARNING: intFlowProfiles is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7639 | } | |
7640 | ||
7641 | // d) Get pointer to list fIntFlowResults and pointers to all objects that she holds. | |
7642 | TList *intFlowResults = NULL; | |
7643 | intFlowResults = dynamic_cast<TList*>(intFlowList->FindObject("Results")); | |
7644 | if(intFlowResults) | |
7645 | { | |
7646 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with correct errors!): | |
7647 | TString intFlowCorrelationsHistName = "fIntFlowCorrelationsHist"; | |
7648 | intFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
7649 | TH1D *intFlowCorrelationsHist = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCorrelationsHistName.Data())); | |
7650 | if(intFlowCorrelationsHist) | |
7651 | { | |
7652 | this->SetIntFlowCorrelationsHist(intFlowCorrelationsHist); | |
7653 | } else | |
7654 | { | |
7655 | cout<<"WARNING: intFlowCorrelationsHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7656 | } | |
ff70ca91 | 7657 | // average correlations <<2>>, <<4>>, <<6>> and <<8>> (with correct errors!) vs M: |
b3dacf6b | 7658 | if(fCalculateCumulantsVsM) |
ff70ca91 | 7659 | { |
b3dacf6b | 7660 | TString intFlowCorrelationsVsMHistName = "fIntFlowCorrelationsVsMHist"; |
7661 | intFlowCorrelationsVsMHistName += fAnalysisLabel->Data(); | |
7662 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
ff70ca91 | 7663 | { |
b3dacf6b | 7664 | TH1D *intFlowCorrelationsVsMHist = dynamic_cast<TH1D*> |
7665 | (intFlowResults->FindObject(Form("%s, %s",intFlowCorrelationsVsMHistName.Data(),correlationFlag[ci].Data()))); | |
7666 | if(intFlowCorrelationsVsMHist) | |
7667 | { | |
7668 | this->SetIntFlowCorrelationsVsMHist(intFlowCorrelationsVsMHist,ci); | |
7669 | } else | |
7670 | { | |
7671 | cout<<"WARNING: "<<Form("intFlowCorrelationsVsMHist[%d]",ci)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7672 | } | |
7673 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
7674 | } // end of if(fCalculateCumulantsVsM) | |
489d5531 | 7675 | // average all correlations for integrated flow (with correct errors!): |
7676 | TString intFlowCorrelationsAllHistName = "fIntFlowCorrelationsAllHist"; | |
7677 | intFlowCorrelationsAllHistName += fAnalysisLabel->Data(); | |
7678 | TH1D *intFlowCorrelationsAllHist = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCorrelationsAllHistName.Data())); | |
7679 | if(intFlowCorrelationsAllHist) | |
7680 | { | |
7681 | this->SetIntFlowCorrelationsAllHist(intFlowCorrelationsAllHist); | |
7682 | } else | |
7683 | { | |
7684 | cout<<"WARNING: intFlowCorrelationsAllHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7685 | } | |
7686 | // average correction terms for non-uniform acceptance (with correct errors!): | |
7687 | TString intFlowCorrectionTermsForNUAHistName = "fIntFlowCorrectionTermsForNUAHist"; | |
7688 | intFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
7689 | for(Int_t sc=0;sc<2;sc++) | |
7690 | { | |
7691 | TH1D *intFlowCorrectionTermsForNUAHist = dynamic_cast<TH1D*>(intFlowResults->FindObject((Form("%s: %s terms",intFlowCorrectionTermsForNUAHistName.Data(),sinCosFlag[sc].Data())))); | |
7692 | if(intFlowCorrectionTermsForNUAHist) | |
7693 | { | |
7694 | this->SetIntFlowCorrectionTermsForNUAHist(intFlowCorrectionTermsForNUAHist,sc); | |
7695 | } else | |
7696 | { | |
7697 | cout<<"WARNING: intFlowCorrectionTermsForNUAHist is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7698 | cout<<"sc = "<<sc<<endl; | |
7699 | } | |
7700 | } // end of for(Int_t sc=0;sc<2;sc++) | |
7701 | // covariances (multiplied with weight dependent prefactor): | |
7702 | TString intFlowCovariancesName = "fIntFlowCovariances"; | |
7703 | intFlowCovariancesName += fAnalysisLabel->Data(); | |
7704 | TH1D *intFlowCovariances = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCovariancesName.Data())); | |
7705 | if(intFlowCovariances) | |
7706 | { | |
7707 | this->SetIntFlowCovariances(intFlowCovariances); | |
7708 | } else | |
7709 | { | |
7710 | cout<<"WARNING: intFlowCovariances is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7711 | } | |
7712 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8>: | |
7713 | TString intFlowSumOfEventWeightsName = "fIntFlowSumOfEventWeights"; | |
7714 | intFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
7715 | for(Int_t power=0;power<2;power++) | |
7716 | { | |
7717 | TH1D *intFlowSumOfEventWeights = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s: %s",intFlowSumOfEventWeightsName.Data(),powerFlag[power].Data()))); | |
7718 | if(intFlowSumOfEventWeights) | |
7719 | { | |
7720 | this->SetIntFlowSumOfEventWeights(intFlowSumOfEventWeights,power); | |
7721 | } else | |
7722 | { | |
7723 | cout<<"WARNING: intFlowSumOfEventWeights is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7724 | cout<<"power = "<<power<<endl; | |
7725 | } | |
7726 | } // end of for(Int_t power=0;power<2;power++) | |
7727 | // sum of products of event weights for correlations <2>, <4>, <6> and <8>: | |
7728 | TString intFlowSumOfProductOfEventWeightsName = "fIntFlowSumOfProductOfEventWeights"; | |
7729 | intFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
7730 | TH1D *intFlowSumOfProductOfEventWeights = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowSumOfProductOfEventWeightsName.Data())); | |
7731 | if(intFlowSumOfProductOfEventWeights) | |
7732 | { | |
7733 | this->SetIntFlowSumOfProductOfEventWeights(intFlowSumOfProductOfEventWeights); | |
7734 | } else | |
7735 | { | |
7736 | cout<<"WARNING: intFlowSumOfProductOfEventWeights is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7737 | } | |
ff70ca91 | 7738 | // final result for covariances of correlations (multiplied with weight dependent prefactor) versus M |
7739 | // [0=Cov(2,4),1=Cov(2,6),2=Cov(2,8),3=Cov(4,6),4=Cov(4,8),5=Cov(6,8)]: | |
b3dacf6b | 7740 | if(fCalculateCumulantsVsM) |
ff70ca91 | 7741 | { |
b3dacf6b | 7742 | TString intFlowCovariancesVsMName = "fIntFlowCovariancesVsM"; |
7743 | intFlowCovariancesVsMName += fAnalysisLabel->Data(); | |
7744 | TString covarianceFlag[6] = {"Cov(<2>,<4>)","Cov(<2>,<6>)","Cov(<2>,<8>)","Cov(<4>,<6>)","Cov(<4>,<8>)","Cov(<6>,<8>)"}; | |
7745 | for(Int_t ci=0;ci<6;ci++) | |
7746 | { | |
7747 | TH1D *intFlowCovariancesVsM = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s, %s",intFlowCovariancesVsMName.Data(),covarianceFlag[ci].Data()))); | |
7748 | if(intFlowCovariancesVsM) | |
ff70ca91 | 7749 | { |
b3dacf6b | 7750 | this->SetIntFlowCovariancesVsM(intFlowCovariancesVsM,ci); |
ff70ca91 | 7751 | } else |
7752 | { | |
b3dacf6b | 7753 | cout<<"WARNING: "<<Form("intFlowCovariancesVsM[%d]",ci)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; |
ff70ca91 | 7754 | } |
b3dacf6b | 7755 | } // end of for(Int_t ci=0;ci<6;ci++) |
7756 | } // end of if(fCalculateCumulantsVsM) | |
7757 | // sum of linear and quadratic event weights for <2>, <4>, <6> and <8> versus multiplicity | |
7758 | // [0=sum{w_{<2>}},1=sum{w_{<4>}},2=sum{w_{<6>}},3=sum{w_{<8>}}][0=linear 1,1=quadratic]: | |
7759 | if(fCalculateCumulantsVsM) | |
7760 | { | |
7761 | TString intFlowSumOfEventWeightsVsMName = "fIntFlowSumOfEventWeightsVsM"; | |
7762 | intFlowSumOfEventWeightsVsMName += fAnalysisLabel->Data(); | |
7763 | 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>}"}, | |
7764 | {"#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}"}}; | |
7765 | for(Int_t si=0;si<4;si++) | |
7766 | { | |
7767 | for(Int_t power=0;power<2;power++) | |
7768 | { | |
7769 | TH1D *intFlowSumOfEventWeightsVsM = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s, %s",intFlowSumOfEventWeightsVsMName.Data(),sumFlag[power][si].Data()))); | |
7770 | if(intFlowSumOfEventWeightsVsM) | |
7771 | { | |
7772 | this->SetIntFlowSumOfEventWeightsVsM(intFlowSumOfEventWeightsVsM,si,power); | |
7773 | } else | |
7774 | { | |
7775 | cout<<"WARNING: "<<Form("intFlowSumOfEventWeightsVsM[%d][%d]",si,power)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7776 | } | |
7777 | } // end of for(Int_t power=0;power<2;power++) | |
7778 | } // end of for(Int_t si=0;si<4;si++) | |
7779 | } // end of if(fCalculateCumulantsVsM) | |
ff70ca91 | 7780 | // sum of products of event weights for correlations <2>, <4>, <6> and <8> vs M |
7781 | // [0=sum{w_{<2>}w_{<4>}},1=sum{w_{<2>}w_{<6>}},2=sum{w_{<2>}w_{<8>}}, | |
7782 | // 3=sum{w_{<4>}w_{<6>}},4=sum{w_{<4>}w_{<8>}},5=sum{w_{<6>}w_{<8>}}]: | |
b3dacf6b | 7783 | if(fCalculateCumulantsVsM) |
ff70ca91 | 7784 | { |
b3dacf6b | 7785 | TString intFlowSumOfProductOfEventWeightsVsMName = "fIntFlowSumOfProductOfEventWeightsVsM"; |
7786 | intFlowSumOfProductOfEventWeightsVsMName += fAnalysisLabel->Data(); | |
7787 | 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>}", | |
7788 | "#sum_{i=1}^{N} w_{<4>} w_{<6>}","#sum_{i=1}^{N} w_{<4>} w_{<8>}","#sum_{i=1}^{N} w_{<6>} w_{<8>}"}; | |
7789 | for(Int_t pi=0;pi<6;pi++) | |
ff70ca91 | 7790 | { |
b3dacf6b | 7791 | TH1D *intFlowSumOfProductOfEventWeightsVsM = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s, %s",intFlowSumOfProductOfEventWeightsVsMName.Data(),sopowFlag[pi].Data()))); |
7792 | if(intFlowSumOfProductOfEventWeightsVsM) | |
7793 | { | |
7794 | this->SetIntFlowSumOfProductOfEventWeightsVsM(intFlowSumOfProductOfEventWeightsVsM,pi); | |
7795 | } else | |
7796 | { | |
7797 | cout<<"WARNING: "<<Form("intFlowSumOfProductOfEventWeightsVsM[%d]",pi)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7798 | } | |
7799 | } // end of for(Int_t pi=0;pi<6;pi++) | |
7800 | } // end of if(fCalculateCumulantsVsM) | |
0328db2d | 7801 | // covariances for NUA (multiplied with weight dependent prefactor): |
7802 | TString intFlowCovariancesNUAName = "fIntFlowCovariancesNUA"; | |
7803 | intFlowCovariancesNUAName += fAnalysisLabel->Data(); | |
7804 | TH1D *intFlowCovariancesNUA = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowCovariancesNUAName.Data())); | |
7805 | if(intFlowCovariancesNUA) | |
7806 | { | |
7807 | this->SetIntFlowCovariancesNUA(intFlowCovariancesNUA); | |
7808 | } else | |
7809 | { | |
7810 | cout<<"WARNING: intFlowCovariancesNUA is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7811 | } | |
7812 | // sum of linear and quadratic event weights NUA terms: | |
7813 | TString intFlowSumOfEventWeightsNUAName = "fIntFlowSumOfEventWeightsNUA"; | |
7814 | intFlowSumOfEventWeightsNUAName += fAnalysisLabel->Data(); | |
7815 | for(Int_t sc=0;sc<2;sc++) | |
7816 | { | |
7817 | for(Int_t power=0;power<2;power++) | |
7818 | { | |
7819 | TH1D *intFlowSumOfEventWeightsNUA = dynamic_cast<TH1D*>(intFlowResults->FindObject(Form("%s: %s, %s",intFlowSumOfEventWeightsNUAName.Data(),powerFlag[power].Data(),sinCosFlag[sc].Data()))); | |
7820 | if(intFlowSumOfEventWeightsNUA) | |
7821 | { | |
7822 | this->SetIntFlowSumOfEventWeightsNUA(intFlowSumOfEventWeightsNUA,sc,power); | |
7823 | } else | |
7824 | { | |
7825 | cout<<"WARNING: intFlowSumOfEventWeightsNUA is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7826 | cout<<"sc = "<<sc<<endl; | |
7827 | cout<<"power = "<<power<<endl; | |
7828 | } | |
7829 | } // end of for(Int_t power=0;power<2;power++) | |
7830 | } // end of for(Int_t sc=0;sc<2;sc++) | |
7831 | // sum of products of event weights for NUA terms: | |
7832 | TString intFlowSumOfProductOfEventWeightsNUAName = "fIntFlowSumOfProductOfEventWeightsNUA"; | |
7833 | intFlowSumOfProductOfEventWeightsNUAName += fAnalysisLabel->Data(); | |
7834 | TH1D *intFlowSumOfProductOfEventWeightsNUA = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowSumOfProductOfEventWeightsNUAName.Data())); | |
7835 | if(intFlowSumOfProductOfEventWeightsNUA) | |
7836 | { | |
7837 | this->SetIntFlowSumOfProductOfEventWeightsNUA(intFlowSumOfProductOfEventWeightsNUA); | |
7838 | } else | |
7839 | { | |
7840 | cout<<"WARNING: intFlowSumOfProductOfEventWeightsNUA is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7841 | } | |
b3dacf6b | 7842 | // Final results for reference Q-cumulants: |
489d5531 | 7843 | TString intFlowQcumulantsName = "fIntFlowQcumulants"; |
7844 | intFlowQcumulantsName += fAnalysisLabel->Data(); | |
7845 | TH1D *intFlowQcumulants = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowQcumulantsName.Data())); | |
7846 | if(intFlowQcumulants) | |
7847 | { | |
7848 | this->SetIntFlowQcumulants(intFlowQcumulants); | |
7849 | } else | |
7850 | { | |
7851 | cout<<"WARNING: intFlowQcumulants is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7852 | } | |
b3dacf6b | 7853 | // Final results for reference Q-cumulants rebinned in M: |
7854 | if(fCalculateCumulantsVsM) | |
7855 | { | |
7856 | TString intFlowQcumulantsRebinnedInMName = "fIntFlowQcumulantsRebinnedInM"; | |
7857 | intFlowQcumulantsRebinnedInMName += fAnalysisLabel->Data(); | |
7858 | TH1D *intFlowQcumulantsRebinnedInM = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowQcumulantsRebinnedInMName.Data())); | |
7859 | if(intFlowQcumulantsRebinnedInM) | |
7860 | { | |
7861 | this->SetIntFlowQcumulantsRebinnedInM(intFlowQcumulantsRebinnedInM); | |
7862 | } else | |
7863 | { | |
7864 | cout<<"WARNING: intFlowQcumulantsRebinnedInM is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7865 | } | |
7866 | } // end of if(fCalculateCumulantsVsM) | |
b92ea2b9 | 7867 | // Ratio between error squared: with/without non-isotropic terms: |
7868 | TString intFlowQcumulantsErrorSquaredRatioName = "fIntFlowQcumulantsErrorSquaredRatio"; | |
7869 | intFlowQcumulantsErrorSquaredRatioName += fAnalysisLabel->Data(); | |
7870 | TH1D *intFlowQcumulantsErrorSquaredRatio = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowQcumulantsErrorSquaredRatioName.Data())); | |
7871 | if(intFlowQcumulantsErrorSquaredRatio) | |
7872 | { | |
7873 | this->SetIntFlowQcumulantsErrorSquaredRatio(intFlowQcumulantsErrorSquaredRatio); | |
7874 | } else | |
7875 | { | |
7876 | cout<<" WARNING: intntFlowQcumulantsErrorSquaredRatio is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7877 | } | |
ff70ca91 | 7878 | // final results for integrated Q-cumulants versus multiplicity: |
ff70ca91 | 7879 | TString cumulantFlag[4] = {"QC{2}","QC{4}","QC{6}","QC{8}"}; |
b3dacf6b | 7880 | if(fCalculateCumulantsVsM) |
ff70ca91 | 7881 | { |
b3dacf6b | 7882 | TString intFlowQcumulantsVsMName = "fIntFlowQcumulantsVsM"; |
7883 | intFlowQcumulantsVsMName += fAnalysisLabel->Data(); | |
7884 | for(Int_t co=0;co<4;co++) // cumulant order | |
ff70ca91 | 7885 | { |
b3dacf6b | 7886 | TH1D *intFlowQcumulantsVsM = dynamic_cast<TH1D*> |
7887 | (intFlowResults->FindObject(Form("%s, %s",intFlowQcumulantsVsMName.Data(),cumulantFlag[co].Data()))); | |
7888 | if(intFlowQcumulantsVsM) | |
7889 | { | |
7890 | this->SetIntFlowQcumulantsVsM(intFlowQcumulantsVsM,co); | |
7891 | } else | |
7892 | { | |
7893 | cout<<"WARNING: "<<Form("intFlowQcumulantsVsM[%d]",co)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7894 | } | |
7895 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
7896 | } // end of if(fCalculateCumulantsVsM) | |
7897 | // Final reference flow estimates from Q-cumulants: | |
489d5531 | 7898 | TString intFlowName = "fIntFlow"; |
7899 | intFlowName += fAnalysisLabel->Data(); | |
7900 | TH1D *intFlow = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowName.Data())); | |
7901 | if(intFlow) | |
7902 | { | |
7903 | this->SetIntFlow(intFlow); | |
7904 | } else | |
7905 | { | |
7906 | cout<<"WARNING: intFlow is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
ff70ca91 | 7907 | } |
b3dacf6b | 7908 | // Final reference flow estimates from Q-cumulants vs M rebinned in M: |
7909 | if(fCalculateCumulantsVsM) | |
ff70ca91 | 7910 | { |
b3dacf6b | 7911 | TString intFlowRebinnedInMName = "fIntFlowRebinnedInM"; |
7912 | intFlowRebinnedInMName += fAnalysisLabel->Data(); | |
7913 | TH1D *intFlowRebinnedInM = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowRebinnedInMName.Data())); | |
7914 | if(intFlowRebinnedInM) | |
ff70ca91 | 7915 | { |
b3dacf6b | 7916 | this->SetIntFlowRebinnedInM(intFlowRebinnedInM); |
7917 | } else | |
ff70ca91 | 7918 | { |
b3dacf6b | 7919 | cout<<"WARNING: intFlowRebinnedInM is NULL in AFAWQC::GPFIFH() !!!!"<<endl; |
7920 | } | |
7921 | } // end of if(fCalculateCumulantsVsM) | |
7922 | // integrated flow from Q-cumulants versus multiplicity: | |
7923 | if(fCalculateCumulantsVsM) | |
7924 | { | |
7925 | TString intFlowVsMName = "fIntFlowVsM"; | |
7926 | intFlowVsMName += fAnalysisLabel->Data(); | |
b77b6434 | 7927 | TString flowFlag[4] = {Form("v_{%d}{2,QC}",fHarmonic),Form("v_{%d}{4,QC}",fHarmonic),Form("v_{%d}{6,QC}",fHarmonic),Form("v_{%d}{8,QC}",fHarmonic)}; |
b3dacf6b | 7928 | for(Int_t co=0;co<4;co++) // cumulant order |
7929 | { | |
7930 | TH1D *intFlowVsM = dynamic_cast<TH1D*> | |
b77b6434 | 7931 | (intFlowResults->FindObject(Form("%s, %s",intFlowVsMName.Data(),flowFlag[co].Data()))); |
b3dacf6b | 7932 | if(intFlowVsM) |
7933 | { | |
7934 | this->SetIntFlowVsM(intFlowVsM,co); | |
7935 | } else | |
7936 | { | |
7937 | cout<<"WARNING: "<<Form("intFlowVsM[%d]",co)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7938 | } | |
7939 | } // end of for(Int_t co=0;co<4;co++) // cumulant order | |
7940 | } // end of if(fCalculateCumulantsVsM) | |
2001bc3a | 7941 | // quantifying detector effects effects to correlations: |
7942 | TString intFlowDetectorBiasName = "fIntFlowDetectorBias"; | |
7943 | intFlowDetectorBiasName += fAnalysisLabel->Data(); | |
7944 | TH1D *intFlowDetectorBias = dynamic_cast<TH1D*>(intFlowResults->FindObject(intFlowDetectorBiasName.Data())); | |
7945 | if(intFlowDetectorBias) | |
7946 | { | |
7947 | this->SetIntFlowDetectorBias(intFlowDetectorBias); | |
7948 | } else | |
7949 | { | |
7950 | cout<<"WARNING: intFlowDetectorBias is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7951 | } | |
7952 | // quantifying detector effects effects to correlations vs multiplicity: | |
b77b6434 | 7953 | if(fCalculateCumulantsVsM) |
2001bc3a | 7954 | { |
3c5d5752 | 7955 | TString intFlowDetectorBiasVsMName = "fIntFlowDetectorBiasVsM"; |
7956 | intFlowDetectorBiasVsMName += fAnalysisLabel->Data(); | |
7957 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
2001bc3a | 7958 | { |
3c5d5752 | 7959 | TH1D *intFlowDetectorBiasVsM = dynamic_cast<TH1D*> |
7960 | (intFlowResults->FindObject(Form("%s for %s",intFlowDetectorBiasVsMName.Data(),cumulantFlag[ci].Data()))); | |
7961 | if(intFlowDetectorBiasVsM) | |
7962 | { | |
7963 | this->SetIntFlowDetectorBiasVsM(intFlowDetectorBiasVsM,ci); | |
7964 | } else | |
7965 | { | |
7966 | cout<<"WARNING: "<<Form("intFlowDetectorBiasVsM[%d]",ci)<<" is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7967 | } | |
7968 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
b77b6434 | 7969 | } // end of if(fCalculateCumulantsVsM) |
489d5531 | 7970 | } else // to if(intFlowResults) |
7971 | { | |
7972 | cout<<"WARNING: intFlowResults is NULL in AFAWQC::GPFIFH() !!!!"<<endl; | |
7973 | } | |
ff70ca91 | 7974 | |
489d5531 | 7975 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForIntFlowHistograms() |
7976 | ||
489d5531 | 7977 | //================================================================================================================================ |
7978 | ||
489d5531 | 7979 | void AliFlowAnalysisWithQCumulants::GetPointersForDiffFlowHistograms() |
7980 | { | |
7981 | // Get pointer to all objects relevant for differential flow. | |
7982 | // a) Define flags locally (to be improved: should I promote flags to data members?); | |
7983 | // b) Get pointer to base list for differential flow fDiffFlowList and nested lists fDiffFlowListProfiles and fDiffFlowListResults; | |
7984 | // c) Get pointer to profile fDiffFlowFlags holding all flags for differential flow; | |
7985 | // d) Get pointers to all nested lists in fDiffFlowListProfiles and to profiles which they hold; | |
7986 | // e) Get pointers to all nested lists in fDiffFlowListResults and to histograms which they hold. | |
7987 | ||
7988 | // a) Define flags locally (to be improved: should I promote flags to data members?): | |
7989 | TString typeFlag[2] = {"RP","POI"}; | |
7990 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; | |
7991 | TString powerFlag[2] = {"linear","quadratic"}; | |
7992 | TString sinCosFlag[2] = {"sin","cos"}; | |
7993 | TString differentialCumulantIndex[4] = {"QC{2'}","QC{4'}","QC{6'}","QC{8'}"}; | |
7994 | TString differentialFlowIndex[4] = {"v'{2}","v'{4}","v'{6}","v'{8}"}; | |
7995 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; | |
7996 | TString mixedCorrelationIndex[8] = {"<2>","<2'>","<4>","<4'>","<6>","<6'>","<8>","<8'>"}; | |
7997 | TString covarianceName[5] = {"Cov(<2>,<2'>)","Cov(<2>,<4'>)","Cov(<4>,<2'>)","Cov(<4>,<4'>)","Cov(<2'>,<4'>)"}; | |
7998 | ||
7999 | // b) Get pointer to base list for differential flow fDiffFlowList and nested lists fDiffFlowListProfiles and fDiffFlowListResults: | |
8000 | TList *diffFlowList = NULL; | |
8001 | diffFlowList = dynamic_cast<TList*>(fHistList->FindObject("Differential Flow")); | |
8002 | if(!diffFlowList) | |
8003 | { | |
8004 | cout<<"WARNING: diffFlowList is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8005 | exit(0); | |
8006 | } | |
8007 | // list holding nested lists containing profiles: | |
8008 | TList *diffFlowListProfiles = NULL; | |
8009 | diffFlowListProfiles = dynamic_cast<TList*>(diffFlowList->FindObject("Profiles")); | |
8010 | if(!diffFlowListProfiles) | |
8011 | { | |
8012 | cout<<"WARNING: diffFlowListProfiles is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8013 | exit(0); | |
8014 | } | |
8015 | // list holding nested lists containing 2D and 1D histograms with final results: | |
8016 | TList *diffFlowListResults = NULL; | |
8017 | diffFlowListResults = dynamic_cast<TList*>(diffFlowList->FindObject("Results")); | |
8018 | if(!diffFlowListResults) | |
8019 | { | |
8020 | cout<<"WARNING: diffFlowListResults is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8021 | exit(0); | |
8022 | } | |
8023 | ||
8024 | // c) Get pointer to profile holding all flags for differential flow; | |
8025 | TString diffFlowFlagsName = "fDiffFlowFlags"; | |
8026 | diffFlowFlagsName += fAnalysisLabel->Data(); | |
8027 | TProfile *diffFlowFlags = dynamic_cast<TProfile*>(diffFlowList->FindObject(diffFlowFlagsName.Data())); | |
8028 | Bool_t bCalculate2DFlow = kFALSE; | |
8029 | if(diffFlowFlags) | |
8030 | { | |
8031 | this->SetDiffFlowFlags(diffFlowFlags); | |
8032 | bCalculate2DFlow = (Int_t)diffFlowFlags->GetBinContent(4); | |
8033 | this->SetCalculate2DFlow(bCalculate2DFlow); // to be improved (shoul I call this setter somewhere else?) | |
8034 | } | |
8035 | ||
8036 | // d) Get pointers to all nested lists in fDiffFlowListProfiles and to profiles which they hold; | |
8037 | // correlations: | |
8038 | TList *diffFlowCorrelationsProList[2][2] = {{NULL}}; | |
8039 | TString diffFlowCorrelationsProName = "fDiffFlowCorrelationsPro"; | |
8040 | diffFlowCorrelationsProName += fAnalysisLabel->Data(); | |
8041 | TProfile *diffFlowCorrelationsPro[2][2][4] = {{{NULL}}}; | |
8042 | // products of correlations: | |
8043 | TList *diffFlowProductOfCorrelationsProList[2][2] = {{NULL}}; | |
8044 | TString diffFlowProductOfCorrelationsProName = "fDiffFlowProductOfCorrelationsPro"; | |
8045 | diffFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
8046 | TProfile *diffFlowProductOfCorrelationsPro[2][2][8][8] = {{{{NULL}}}}; | |
8047 | // corrections: | |
8048 | TList *diffFlowCorrectionsProList[2][2] = {{NULL}}; | |
8049 | TString diffFlowCorrectionTermsForNUAProName = "fDiffFlowCorrectionTermsForNUAPro"; | |
8050 | diffFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
8051 | TProfile *diffFlowCorrectionTermsForNUAPro[2][2][2][10] = {{{{NULL}}}}; | |
8052 | for(Int_t t=0;t<2;t++) | |
8053 | { | |
8054 | for(Int_t pe=0;pe<2;pe++) | |
8055 | { | |
8056 | diffFlowCorrelationsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8057 | if(!diffFlowCorrelationsProList[t][pe]) | |
8058 | { | |
8059 | cout<<"WARNING: diffFlowCorrelationsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8060 | cout<<"t = "<<t<<endl; | |
8061 | cout<<"pe = "<<pe<<endl; | |
8062 | exit(0); | |
8063 | } | |
8064 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
8065 | { | |
8066 | 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()))); | |
8067 | if(diffFlowCorrelationsPro[t][pe][ci]) | |
8068 | { | |
8069 | this->SetDiffFlowCorrelationsPro(diffFlowCorrelationsPro[t][pe][ci],t,pe,ci); | |
8070 | } else | |
8071 | { | |
8072 | cout<<"WARNING: diffFlowCorrelationsPro[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8073 | cout<<"t = "<<t<<endl; | |
8074 | cout<<"pe = "<<pe<<endl; | |
8075 | cout<<"ci = "<<ci<<endl; | |
8076 | } | |
8077 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
8078 | // products of correlations: | |
8079 | diffFlowProductOfCorrelationsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with products of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8080 | if(!diffFlowProductOfCorrelationsProList[t][pe]) | |
8081 | { | |
8082 | cout<<"WARNING: ddiffFlowProductOfCorrelationsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8083 | cout<<"t = "<<t<<endl; | |
8084 | cout<<"pe = "<<pe<<endl; | |
8085 | exit(0); | |
8086 | } | |
8087 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8088 | { | |
8089 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8090 | { | |
8091 | 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()))); | |
8092 | if(diffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]) | |
8093 | { | |
8094 | this->SetDiffFlowProductOfCorrelationsPro(diffFlowProductOfCorrelationsPro[t][pe][mci1][mci2],t,pe,mci1,mci2); | |
8095 | } else | |
8096 | { | |
8097 | cout<<"WARNING: diffFlowCorrelationsPro[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8098 | cout<<"t = "<<t<<endl; | |
8099 | cout<<"pe = "<<pe<<endl; | |
8100 | cout<<"mci1 = "<<mci1<<endl; | |
8101 | cout<<"mci2 = "<<mci2<<endl; | |
8102 | } | |
8103 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
8104 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8105 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8106 | // corrections: | |
8107 | diffFlowCorrectionsProList[t][pe] = dynamic_cast<TList*>(diffFlowListProfiles->FindObject(Form("Profiles with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8108 | if(!diffFlowCorrectionsProList[t][pe]) | |
8109 | { | |
8110 | cout<<"WARNING: diffFlowCorrectionsProList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8111 | cout<<"t = "<<t<<endl; | |
8112 | cout<<"pe = "<<pe<<endl; | |
8113 | exit(0); | |
8114 | } | |
8115 | // correction terms for NUA: | |
8116 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8117 | { | |
8118 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8119 | { | |
8120 | 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))); | |
8121 | if(diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]) | |
8122 | { | |
8123 | this->SetDiffFlowCorrectionTermsForNUAPro(diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti],t,pe,sc,cti); | |
8124 | } else | |
8125 | { | |
8126 | cout<<"WARNING: diffFlowCorrectionTermsForNUAPro[t][pe][sc][cti] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8127 | cout<<"t = "<<t<<endl; | |
8128 | cout<<"pe = "<<pe<<endl; | |
8129 | cout<<"sc = "<<sc<<endl; | |
8130 | cout<<"cti = "<<cti<<endl; | |
8131 | } | |
8132 | } // end of for(Int_t cti=0;cti<9;cti++) // correction term index | |
8133 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8134 | // ... | |
8135 | } // end of for(Int_t pe=0;pe<2;pe++) | |
8136 | } // end of for(Int_t t=0;t<2;t++) | |
8137 | ||
8138 | // e) Get pointers to all nested lists in fDiffFlowListResults and to histograms which they hold. | |
8139 | // reduced correlations: | |
8140 | TList *diffFlowCorrelationsHistList[2][2] = {{NULL}}; | |
8141 | TString diffFlowCorrelationsHistName = "fDiffFlowCorrelationsHist"; | |
8142 | diffFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
8143 | TH1D *diffFlowCorrelationsHist[2][2][4] = {{{NULL}}}; | |
8144 | // corrections for NUA: | |
8145 | TList *diffFlowCorrectionsHistList[2][2] = {{NULL}}; | |
8146 | TString diffFlowCorrectionTermsForNUAHistName = "fDiffFlowCorrectionTermsForNUAHist"; | |
8147 | diffFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
8148 | TH1D *diffFlowCorrectionTermsForNUAHist[2][2][2][10] = {{{{NULL}}}}; | |
8149 | // differential Q-cumulants: | |
8150 | TList *diffFlowCumulantsHistList[2][2] = {{NULL}}; | |
8151 | TString diffFlowCumulantsName = "fDiffFlowCumulants"; | |
8152 | diffFlowCumulantsName += fAnalysisLabel->Data(); | |
8153 | TH1D *diffFlowCumulants[2][2][4] = {{{NULL}}}; | |
8154 | // differential flow estimates from Q-cumulants: | |
8155 | TList *diffFlowHistList[2][2] = {{NULL}}; | |
8156 | TString diffFlowName = "fDiffFlow"; | |
8157 | diffFlowName += fAnalysisLabel->Data(); | |
8158 | TH1D *diffFlow[2][2][4] = {{{NULL}}}; | |
8159 | // differential covariances: | |
8160 | TList *diffFlowCovariancesHistList[2][2] = {{NULL}}; | |
8161 | TString diffFlowCovariancesName = "fDiffFlowCovariances"; | |
8162 | diffFlowCovariancesName += fAnalysisLabel->Data(); | |
8163 | TH1D *diffFlowCovariances[2][2][5] = {{{NULL}}}; | |
8164 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8165 | { | |
8166 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8167 | { | |
8168 | // reduced correlations: | |
8169 | diffFlowCorrelationsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8170 | if(!diffFlowCorrelationsHistList[t][pe]) | |
8171 | { | |
8172 | cout<<"WARNING: diffFlowCorrelationsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8173 | cout<<"t = "<<t<<endl; | |
8174 | cout<<"pe = "<<pe<<endl; | |
8175 | exit(0); | |
8176 | } | |
8177 | for(Int_t index=0;index<4;index++) | |
8178 | { | |
8179 | 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()))); | |
8180 | if(diffFlowCorrelationsHist[t][pe][index]) | |
8181 | { | |
8182 | this->SetDiffFlowCorrelationsHist(diffFlowCorrelationsHist[t][pe][index],t,pe,index); | |
8183 | } else | |
8184 | { | |
8185 | cout<<"WARNING: diffFlowCorrelationsHist[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8186 | cout<<"t = "<<t<<endl; | |
8187 | cout<<"pe = "<<pe<<endl; | |
8188 | cout<<"index = "<<index<<endl; | |
8189 | exit(0); | |
8190 | } | |
8191 | } // end of for(Int_t index=0;index<4;index++) | |
8192 | // corrections: | |
8193 | diffFlowCorrectionsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Histograms with correction terms for NUA (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8194 | if(!diffFlowCorrectionsHistList[t][pe]) | |
8195 | { | |
8196 | cout<<"WARNING: diffFlowCorrectionsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8197 | cout<<"t = "<<t<<endl; | |
8198 | cout<<"pe = "<<pe<<endl; | |
8199 | exit(0); | |
8200 | } | |
8201 | // correction terms for NUA: | |
8202 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8203 | { | |
8204 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8205 | { | |
8206 | 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))); | |
8207 | if(diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti]) | |
8208 | { | |
8209 | this->SetDiffFlowCorrectionTermsForNUAHist(diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti],t,pe,sc,cti); | |
8210 | } else | |
8211 | { | |
8212 | cout<<"WARNING: diffFlowCorrectionTermsForNUAHist[t][pe][sc][cti] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8213 | cout<<"t = "<<t<<endl; | |
8214 | cout<<"pe = "<<pe<<endl; | |
8215 | cout<<"sc = "<<sc<<endl; | |
8216 | cout<<"cti = "<<cti<<endl; | |
8217 | } | |
8218 | } // end of for(Int_t cti=0;cti<9;cti++) // correction term index | |
8219 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8220 | // ... | |
8221 | // differential Q-cumulants: | |
8222 | diffFlowCumulantsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Differential Q-cumulants (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8223 | if(!diffFlowCumulantsHistList[t][pe]) | |
8224 | { | |
8225 | cout<<"WARNING: diffFlowCumulantsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8226 | cout<<"t = "<<t<<endl; | |
8227 | cout<<"pe = "<<pe<<endl; | |
8228 | exit(0); | |
8229 | } | |
8230 | for(Int_t index=0;index<4;index++) | |
8231 | { | |
8232 | 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()))); | |
8233 | if(diffFlowCumulants[t][pe][index]) | |
8234 | { | |
8235 | this->SetDiffFlowCumulants(diffFlowCumulants[t][pe][index],t,pe,index); | |
8236 | } else | |
8237 | { | |
8238 | cout<<"WARNING: diffFlowCumulants[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8239 | cout<<"t = "<<t<<endl; | |
8240 | cout<<"pe = "<<pe<<endl; | |
8241 | cout<<"index = "<<index<<endl; | |
8242 | exit(0); | |
8243 | } | |
8244 | } // end of for(Int_t index=0;index<4;index++) | |
8245 | // differential flow estimates from Q-cumulants: | |
8246 | diffFlowHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Differential flow (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8247 | if(!diffFlowHistList[t][pe]) | |
8248 | { | |
8249 | cout<<"WARNING: diffFlowHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8250 | cout<<"t = "<<t<<endl; | |
8251 | cout<<"pe = "<<pe<<endl; | |
8252 | exit(0); | |
8253 | } | |
8254 | for(Int_t index=0;index<4;index++) | |
8255 | { | |
8256 | 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()))); | |
8257 | if(diffFlow[t][pe][index]) | |
8258 | { | |
8259 | this->SetDiffFlow(diffFlow[t][pe][index],t,pe,index); | |
8260 | } else | |
8261 | { | |
8262 | cout<<"WARNING: diffFlow[t][pe][index] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8263 | cout<<"t = "<<t<<endl; | |
8264 | cout<<"pe = "<<pe<<endl; | |
8265 | cout<<"index = "<<index<<endl; | |
8266 | exit(0); | |
8267 | } | |
8268 | } // end of for(Int_t index=0;index<4;index++) | |
8269 | // differential covariances: | |
8270 | diffFlowCovariancesHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Covariances of correlations (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8271 | if(!diffFlowCovariancesHistList[t][pe]) | |
8272 | { | |
8273 | cout<<"WARNING: diffFlowCovariancesHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8274 | cout<<"t = "<<t<<endl; | |
8275 | cout<<"pe = "<<pe<<endl; | |
8276 | exit(0); | |
8277 | } | |
8278 | for(Int_t covIndex=0;covIndex<5;covIndex++) | |
8279 | { | |
8280 | 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()))); | |
8281 | if(diffFlowCovariances[t][pe][covIndex]) | |
8282 | { | |
8283 | this->SetDiffFlowCovariances(diffFlowCovariances[t][pe][covIndex],t,pe,covIndex); | |
8284 | } else | |
8285 | { | |
8286 | cout<<"WARNING: diffFlowCovariances[t][pe][covIndex] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8287 | cout<<"t = "<<t<<endl; | |
8288 | cout<<"pe = "<<pe<<endl; | |
8289 | cout<<"covIndex = "<<covIndex<<endl; | |
8290 | exit(0); | |
8291 | } | |
8292 | } // end of for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index | |
8293 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8294 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8295 | // sum of event weights for reduced correlations: | |
8296 | TList *diffFlowSumOfEventWeightsHistList[2][2][2] = {{{NULL}}}; | |
8297 | TString diffFlowSumOfEventWeightsName = "fDiffFlowSumOfEventWeights"; | |
8298 | diffFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
8299 | TH1D *diffFlowSumOfEventWeights[2][2][2][4] = {{{{NULL}}}}; | |
8300 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
8301 | { | |
8302 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8303 | { | |
8304 | for(Int_t p=0;p<2;p++) // power of event weights is either 1 or 2 | |
8305 | { | |
8306 | 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()))); | |
8307 | if(!diffFlowSumOfEventWeightsHistList[t][pe][p]) | |
8308 | { | |
8309 | cout<<"WARNING: diffFlowSumOfEventWeightsHistList[t][pe][p] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8310 | cout<<"t = "<<t<<endl; | |
8311 | cout<<"pe = "<<pe<<endl; | |
8312 | cout<<"power = "<<p<<endl; | |
8313 | exit(0); | |
8314 | } | |
8315 | for(Int_t ew=0;ew<4;ew++) // index of reduced correlation | |
8316 | { | |
8317 | 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()))); | |
8318 | if(diffFlowSumOfEventWeights[t][pe][p][ew]) | |
8319 | { | |
8320 | this->SetDiffFlowSumOfEventWeights(diffFlowSumOfEventWeights[t][pe][p][ew],t,pe,p,ew); | |
8321 | } else | |
8322 | { | |
8323 | cout<<"WARNING: diffFlowSumOfEventWeights[t][pe][p][ew] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8324 | cout<<"t = "<<t<<endl; | |
8325 | cout<<"pe = "<<pe<<endl; | |
8326 | cout<<"power = "<<p<<endl; | |
8327 | cout<<"ew = "<<ew<<endl; | |
8328 | exit(0); | |
8329 | } | |
8330 | } | |
8331 | } // end of for(Int_t p=0;p<2;p++) // power of event weights is either 1 or 2 | |
8332 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8333 | } // end of for(Int_t t=0;t<2;t++) // type is RP or POI | |
8334 | // | |
8335 | TList *diffFlowSumOfProductOfEventWeightsHistList[2][2] = {{NULL}}; | |
8336 | TString diffFlowSumOfProductOfEventWeightsName = "fDiffFlowSumOfProductOfEventWeights"; | |
8337 | diffFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
8338 | TH1D *diffFlowSumOfProductOfEventWeights[2][2][8][8] = {{{{NULL}}}}; | |
8339 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
8340 | { | |
8341 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8342 | { | |
8343 | diffFlowSumOfProductOfEventWeightsHistList[t][pe] = dynamic_cast<TList*>(diffFlowListResults->FindObject(Form("Sum of products of event weights (%s, %s)",typeFlag[t].Data(),ptEtaFlag[pe].Data()))); | |
8344 | if(!diffFlowSumOfProductOfEventWeightsHistList[t][pe]) | |
8345 | { | |
8346 | cout<<"WARNING: diffFlowSumOfProductOfEventWeightsHistList[t][pe] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8347 | cout<<"t = "<<t<<endl; | |
8348 | cout<<"pe = "<<pe<<endl; | |
8349 | exit(0); | |
8350 | } | |
8351 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8352 | { | |
8353 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8354 | { | |
8355 | 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()))); | |
8356 | if(diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]) | |
8357 | { | |
8358 | this->SetDiffFlowSumOfProductOfEventWeights(diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2],t,pe,mci1,mci2); | |
8359 | } else | |
8360 | { | |
8361 | cout<<"WARNING: diffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
8362 | cout<<"t = "<<t<<endl; | |
8363 | cout<<"pe = "<<pe<<endl; | |
8364 | cout<<"mci1 = "<<mci1<<endl; | |
8365 | cout<<"mci2 = "<<mci2<<endl; | |
8366 | exit(0); | |
8367 | } | |
8368 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
8369 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8370 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8371 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8372 | } // end of for(Int_t t=0;t<2;t++) // type is RP or POI | |
8373 | ||
8374 | } // end void AliFlowAnalysisWithQCumulants::GetPointersForDiffFlowHistograms() | |
8375 | ||
8376 | ||
8377 | //================================================================================================================================ | |
8378 | ||
8379 | ||
8380 | void AliFlowAnalysisWithQCumulants::BookEverythingForDifferentialFlow() | |
8381 | { | |
8382 | // Book all histograms and profiles needed for differential flow. | |
8383 | // a) Define flags locally (to be improved: should I promote flags to data members?); | |
8384 | // b) Book profile to hold all flags for differential flow; | |
8385 | // c) Book e-b-e quantities; | |
8386 | // d) Book profiles; | |
8387 | // e) Book histograms holding final results. | |
8388 | ||
8389 | // a) Define flags locally (to be improved: should I promote flags to data members?): | |
8390 | TString typeFlag[2] = {"RP","POI"}; | |
8391 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; | |
8392 | TString powerFlag[2] = {"linear","quadratic"}; | |
8393 | TString sinCosFlag[2] = {"sin","cos"}; | |
8394 | TString differentialCumulantIndex[4] = {"QC{2'}","QC{4'}","QC{6'}","QC{8'}"}; | |
8395 | TString differentialFlowIndex[4] = {"v'{2}","v'{4}","v'{6}","v'{8}"}; | |
8396 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; | |
8397 | TString mixedCorrelationIndex[8] = {"<2>","<2'>","<4>","<4'>","<6>","<6'>","<8>","<8'>"}; | |
8398 | TString covarianceName[5] = {"Cov(<2>,<2'>)","Cov(<2>,<4'>)","Cov(<4>,<2'>)","Cov(<4>,<4'>)","Cov(<2'>,<4'>)"}; | |
8399 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
8400 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
8401 | Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
8402 | ||
8403 | // b) Book profile to hold all flags for differential flow: | |
8404 | TString diffFlowFlagsName = "fDiffFlowFlags"; | |
8405 | diffFlowFlagsName += fAnalysisLabel->Data(); | |
8406 | fDiffFlowFlags = new TProfile(diffFlowFlagsName.Data(),"Flags for Differential Flow",4,0,4); | |
8407 | fDiffFlowFlags->SetTickLength(-0.01,"Y"); | |
8408 | fDiffFlowFlags->SetMarkerStyle(25); | |
8409 | fDiffFlowFlags->SetLabelSize(0.05); | |
8410 | fDiffFlowFlags->SetLabelOffset(0.02,"Y"); | |
8411 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(1,"Particle Weights"); | |
8412 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(2,"Event Weights"); | |
8413 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(3,"Corrected for NUA?"); | |
8414 | (fDiffFlowFlags->GetXaxis())->SetBinLabel(4,"Calculated 2D flow?"); | |
8415 | fDiffFlowList->Add(fDiffFlowFlags); | |
8416 | ||
8417 | // c) Book e-b-e quantities: | |
8418 | // Event-by-event r_{m*n,k}(pt,eta), p_{m*n,k}(pt,eta) and q_{m*n,k}(pt,eta) | |
8419 | // Explanantion of notation: | |
8420 | // 1.) n is harmonic, m is multiple of harmonic; | |
8421 | // 2.) k is power of particle weight; | |
8422 | // 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); | |
8423 | // 4.) p_{m*n,k}(pt,eta) = Q-vector evaluated in harmonic m*n for POIs in particular (pt,eta) bin | |
8424 | // (if i-th POI is also RP, than it is weighted with w_i^k); | |
8425 | // 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 | |
8426 | // (i-th RP&&POI is weighted with w_i^k) | |
8427 | ||
8428 | // 1D: | |
8429 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP && POI ) | |
8430 | { | |
8431 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8432 | { | |
8433 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
8434 | { | |
8435 | for(Int_t k=0;k<9;k++) // power of particle weight | |
8436 | { | |
8437 | fReRPQ1dEBE[t][pe][m][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%dpower%dRe",t,pe,m,k), | |
8438 | Form("TypeFlag%dpteta%dmultiple%dpower%dRe",t,pe,m,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8439 | fImRPQ1dEBE[t][pe][m][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%dpower%dIm",t,pe,m,k), | |
8440 | Form("TypeFlag%dpteta%dmultiple%dpower%dIm",t,pe,m,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8441 | } | |
8442 | } | |
8443 | } | |
8444 | } | |
8445 | // to be improved (add explanation of fs1dEBE[t][pe][k]): | |
8446 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI ) | |
8447 | { | |
8448 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8449 | { | |
8450 | for(Int_t k=0;k<9;k++) // power of particle weight | |
8451 | { | |
8452 | fs1dEBE[t][pe][k] = new TProfile(Form("TypeFlag%dpteta%dmultiple%d",t,pe,k), | |
8453 | Form("TypeFlag%dpteta%dmultiple%d",t,pe,k),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8454 | } | |
8455 | } | |
8456 | } | |
8457 | // correction terms for nua: | |
8458 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
8459 | { | |
8460 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8461 | { | |
8462 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8463 | { | |
8464 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8465 | { | |
8466 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][sc][cti] = new TH1D(Form("typeFlag%d pteta%d sincos%d cti%d",t,pe,sc,cti), | |
8467 | Form("typeFlag%d pteta%d sincos%d cti%d",t,pe,sc,cti),nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]); | |
8468 | } | |
8469 | } | |
8470 | } | |
8471 | } | |
8472 | // 2D: | |
b77b6434 | 8473 | if(fCalculate2DFlow) |
8474 | { | |
8475 | TProfile2D styleRe("typeMultiplePowerRe","typeMultiplePowerRe",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax); | |
8476 | TProfile2D styleIm("typeMultiplePowerIm","typeMultiplePowerIm",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax); | |
8477 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI ) | |
8478 | { | |
8479 | for(Int_t m=0;m<4;m++) | |
8480 | { | |
8481 | for(Int_t k=0;k<9;k++) | |
8482 | { | |
8483 | fReRPQ2dEBE[t][m][k] = (TProfile2D*)styleRe.Clone(Form("typeFlag%dmultiple%dpower%dRe",t,m,k)); | |
8484 | fImRPQ2dEBE[t][m][k] = (TProfile2D*)styleIm.Clone(Form("typeFlag%dmultiple%dpower%dIm",t,m,k)); | |
8485 | } | |
8486 | } | |
8487 | } | |
8488 | TProfile2D styleS("typePower","typePower",fnBinsPt,fPtMin,fPtMax,fnBinsEta,fEtaMin,fEtaMax); | |
8489 | for(Int_t t=0;t<3;t++) // typeFlag (0 = RP, 1 = POI, 2 = RP&&POI ) | |
8490 | { | |
489d5531 | 8491 | for(Int_t k=0;k<9;k++) |
8492 | { | |
b77b6434 | 8493 | fs2dEBE[t][k] = (TProfile2D*)styleS.Clone(Form("typeFlag%dpower%d",t,k)); |
489d5531 | 8494 | } |
489d5531 | 8495 | } |
b77b6434 | 8496 | } // end of if(fCalculate2DFlow) |
489d5531 | 8497 | // reduced correlations e-b-e: |
8498 | TString diffFlowCorrelationsEBEName = "fDiffFlowCorrelationsEBE"; | |
8499 | diffFlowCorrelationsEBEName += fAnalysisLabel->Data(); | |
8500 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8501 | { | |
8502 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8503 | { | |
8504 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
8505 | { | |
8506 | 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]); | |
8507 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
8508 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8509 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8510 | // event weights for reduced correlations e-b-e: | |
8511 | TString diffFlowEventWeightsForCorrelationsEBEName = "fDiffFlowEventWeightsForCorrelationsEBE"; | |
8512 | diffFlowEventWeightsForCorrelationsEBEName += fAnalysisLabel->Data(); | |
8513 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8514 | { | |
8515 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8516 | { | |
8517 | for(Int_t rci=0;rci<4;rci++) // event weight for reduced correlation index | |
8518 | { | |
8519 | 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]); | |
8520 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
8521 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8522 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8523 | ||
8524 | // d) Book profiles; | |
8525 | // reduced correlations: | |
8526 | TString diffFlowCorrelationsProName = "fDiffFlowCorrelationsPro"; | |
8527 | diffFlowCorrelationsProName += fAnalysisLabel->Data(); | |
8528 | // corrections terms: | |
8529 | TString diffFlowCorrectionTermsForNUAProName = "fDiffFlowCorrectionTermsForNUAPro"; | |
8530 | diffFlowCorrectionTermsForNUAProName += fAnalysisLabel->Data(); | |
8531 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8532 | { | |
8533 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8534 | { | |
8535 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
8536 | { | |
8537 | // reduced correlations: | |
8538 | 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"); | |
8539 | fDiffFlowCorrelationsPro[t][pe][rci]->SetXTitle(ptEtaFlag[pe].Data()); | |
8540 | fDiffFlowCorrelationsProList[t][pe]->Add(fDiffFlowCorrelationsPro[t][pe][rci]); // to be improved (add dedicated list to hold reduced correlations) | |
8541 | } // end of for(Int_t rci=0;rci<4;rci++) // correlation index | |
8542 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8543 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8544 | // correction terms for nua: | |
8545 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
8546 | { | |
8547 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8548 | { | |
8549 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8550 | { | |
8551 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8552 | { | |
8553 | 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]); | |
8554 | fDiffFlowCorrectionsProList[t][pe]->Add(fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]); | |
8555 | } | |
8556 | } | |
8557 | } | |
8558 | } | |
8559 | // e) Book histograms holding final results. | |
8560 | // reduced correlations: | |
8561 | TString diffFlowCorrelationsHistName = "fDiffFlowCorrelationsHist"; | |
8562 | diffFlowCorrelationsHistName += fAnalysisLabel->Data(); | |
8563 | // corrections terms: | |
8564 | TString diffFlowCorrectionTermsForNUAHistName = "fDiffFlowCorrectionTermsForNUAHist"; | |
8565 | diffFlowCorrectionTermsForNUAHistName += fAnalysisLabel->Data(); | |
8566 | // differential covariances: | |
8567 | TString diffFlowCovariancesName = "fDiffFlowCovariances"; | |
8568 | diffFlowCovariancesName += fAnalysisLabel->Data(); | |
8569 | // differential Q-cumulants: | |
8570 | TString diffFlowCumulantsName = "fDiffFlowCumulants"; | |
8571 | diffFlowCumulantsName += fAnalysisLabel->Data(); | |
8572 | // differential flow: | |
8573 | TString diffFlowName = "fDiffFlow"; | |
8574 | diffFlowName += fAnalysisLabel->Data(); | |
8575 | for(Int_t t=0;t<2;t++) // type: RP or POI | |
8576 | { | |
8577 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8578 | { | |
8579 | for(Int_t index=0;index<4;index++) | |
8580 | { | |
8581 | // reduced correlations: | |
8582 | 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]); | |
8583 | fDiffFlowCorrelationsHist[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data()); | |
8584 | fDiffFlowCorrelationsHistList[t][pe]->Add(fDiffFlowCorrelationsHist[t][pe][index]); | |
8585 | // differential Q-cumulants: | |
8586 | 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]); | |
8587 | fDiffFlowCumulants[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data()); | |
8588 | fDiffFlowCumulantsHistList[t][pe]->Add(fDiffFlowCumulants[t][pe][index]); | |
8589 | // differential flow estimates from Q-cumulants: | |
8590 | 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]); | |
8591 | fDiffFlow[t][pe][index]->SetXTitle(ptEtaFlag[pe].Data()); | |
8592 | fDiffFlowHistList[t][pe]->Add(fDiffFlow[t][pe][index]); | |
8593 | } // end of for(Int_t index=0;index<4;index++) | |
8594 | for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index | |
8595 | { | |
8596 | // differential covariances: | |
8597 | 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]); | |
8598 | fDiffFlowCovariances[t][pe][covIndex]->SetXTitle(ptEtaFlag[pe].Data()); | |
8599 | fDiffFlowCovariancesHistList[t][pe]->Add(fDiffFlowCovariances[t][pe][covIndex]); | |
8600 | } // end of for(Int_t covIndex=0;covIndex<5;covIndex++) // covariance index | |
8601 | // products of both types of correlations: | |
8602 | TString diffFlowProductOfCorrelationsProName = "fDiffFlowProductOfCorrelationsPro"; | |
8603 | diffFlowProductOfCorrelationsProName += fAnalysisLabel->Data(); | |
8604 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8605 | { | |
8606 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8607 | { | |
8608 | 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]); | |
8609 | fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]->SetXTitle(ptEtaFlag[pe].Data()); | |
8610 | fDiffFlowProductOfCorrelationsProList[t][pe]->Add(fDiffFlowProductOfCorrelationsPro[t][pe][mci1][mci2]); | |
8611 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
8612 | } // end of for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8613 | } // end of for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8614 | } // end of for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8615 | } // end of for(Int_t t=0;t<2;t++) // type: RP or POI | |
8616 | // sums of event weights for reduced correlations: | |
8617 | TString diffFlowSumOfEventWeightsName = "fDiffFlowSumOfEventWeights"; | |
8618 | diffFlowSumOfEventWeightsName += fAnalysisLabel->Data(); | |
8619 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
8620 | { | |
8621 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8622 | { | |
8623 | for(Int_t p=0;p<2;p++) // power of weights is either 1 or 2 | |
8624 | { | |
8625 | for(Int_t ew=0;ew<4;ew++) // index of reduced correlation | |
8626 | { | |
8627 | 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]); | |
8628 | fDiffFlowSumOfEventWeights[t][pe][p][ew]->SetXTitle(ptEtaFlag[pe].Data()); | |
8629 | fDiffFlowSumOfEventWeightsHistList[t][pe][p]->Add(fDiffFlowSumOfEventWeights[t][pe][p][ew]); // to be improved (add dedicated list to hold all this) | |
8630 | } | |
8631 | } | |
8632 | } | |
8633 | } | |
8634 | // sum of products of event weights for both types of correlations: | |
8635 | TString diffFlowSumOfProductOfEventWeightsName = "fDiffFlowSumOfProductOfEventWeights"; | |
8636 | diffFlowSumOfProductOfEventWeightsName += fAnalysisLabel->Data(); | |
8637 | for(Int_t t=0;t<2;t++) // type is RP or POI | |
8638 | { | |
8639 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8640 | { | |
8641 | for(Int_t mci1=0;mci1<8;mci1++) // mixed correlation index | |
8642 | { | |
8643 | for(Int_t mci2=mci1+1;mci2<8;mci2++) // mixed correlation index | |
8644 | { | |
8645 | 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]); | |
8646 | fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]->SetXTitle(ptEtaFlag[pe].Data()); | |
8647 | fDiffFlowSumOfProductOfEventWeightsHistList[t][pe]->Add(fDiffFlowSumOfProductOfEventWeights[t][pe][mci1][mci2]); | |
8648 | if(mci1%2 == 0) mci2++; // products which DO NOT include reduced correlations are not stored here | |
8649 | } | |
8650 | } | |
8651 | } | |
8652 | } | |
8653 | // correction terms for nua: | |
8654 | for(Int_t t=0;t<2;t++) // typeFlag (0 = RP, 1 = POI) | |
8655 | { | |
8656 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
8657 | { | |
8658 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
8659 | { | |
8660 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
8661 | { | |
8662 | 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]); | |
8663 | fDiffFlowCorrectionsHistList[t][pe]->Add(fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti]); | |
8664 | } | |
8665 | } | |
8666 | } | |
8667 | } | |
8668 | ||
8669 | } // end of AliFlowAnalysisWithQCumulants::BookEverythingForDifferentialFlow() | |
8670 | ||
489d5531 | 8671 | //================================================================================================================================ |
8672 | ||
489d5531 | 8673 | void AliFlowAnalysisWithQCumulants::CalculateQcumulantsCorrectedForNUAIntFlow() |
8674 | { | |
8675 | // Calculate generalized Q-cumulants (cumulants corrected for non-unifom acceptance). | |
8676 | ||
b92ea2b9 | 8677 | // Isotropic cumulants: |
8678 | Double_t QC2 = fIntFlowQcumulants->GetBinContent(1); | |
8679 | Double_t QC2Error = fIntFlowQcumulants->GetBinError(1); | |
8680 | Double_t QC4 = fIntFlowQcumulants->GetBinContent(2); | |
8681 | Double_t QC4Error = fIntFlowQcumulants->GetBinError(2); | |
8682 | //Double_t QC6 = fIntFlowQcumulants->GetBinContent(3); | |
8683 | //Double_t QC6Error = fIntFlowQcumulants->GetBinError(3); | |
8684 | //Double_t QC8 = fIntFlowQcumulants->GetBinContent(4); | |
8685 | //Double_t QC8Error = fIntFlowQcumulants->GetBinError(4); | |
8686 | ||
8687 | // Measured 2-, 4-, 6- and 8-particle correlations: | |
489d5531 | 8688 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> |
b92ea2b9 | 8689 | Double_t twoError = fIntFlowCorrelationsHist->GetBinError(1); // statistical error of <<2>> |
489d5531 | 8690 | Double_t four = fIntFlowCorrelationsHist->GetBinContent(2); // <<4>> |
b92ea2b9 | 8691 | Double_t fourError = fIntFlowCorrelationsHist->GetBinError(2); // statistical error of <<4>> |
489d5531 | 8692 | //Double_t six = fIntFlowCorrelationsHist->GetBinContent(3); // <<6>> |
489d5531 | 8693 | //Double_t sixError = fIntFlowCorrelationsHist->GetBinError(3); // statistical error of <<6>> |
b92ea2b9 | 8694 | //Double_t eight = fIntFlowCorrelationsHist->GetBinContent(4); // <<8>> |
489d5531 | 8695 | //Double_t eightError = fIntFlowCorrelationsHist->GetBinError(4); // statistical error of <<8>> |
b92ea2b9 | 8696 | |
8697 | // Non-isotropic terms: | |
8698 | Double_t c1 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1); // <<cos(n*phi1)>> | |
8699 | Double_t c1Error = fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(1); // statistical error of <<cos(n*phi1)>> | |
8700 | Double_t c2 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2); // <<cos(n*(phi1+phi2))>> | |
8701 | Double_t c2Error = fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(2); // statistical error of <<cos(n*(phi1+phi2))>> | |
8702 | Double_t c3 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(3); // <<cos(n*(phi1-phi2-phi3))>> | |
8703 | Double_t c3Error = fIntFlowCorrectionTermsForNUAHist[1]->GetBinError(3); // statistical error of <<cos(n*(phi1-phi2-phi3))>> | |
8704 | Double_t s1 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1); // <<sin(n*phi1)>> | |
8705 | Double_t s1Error = fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(1); // statistical error of <<sin(n*phi1)>> | |
8706 | Double_t s2 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2); // <<sin(n*(phi1+phi2))>> | |
8707 | Double_t s2Error = fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(2); // statistical error of <<sin(n*(phi1+phi2))>> | |
8708 | Double_t s3 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(3); // <<sin(n*(phi1-phi2-phi3))>> | |
8709 | Double_t s3Error = fIntFlowCorrectionTermsForNUAHist[0]->GetBinError(3); // statistical error of <<sin(n*(phi1-phi2-phi3))>> | |
8710 | ||
8711 | // Shortcuts: | |
8712 | Double_t a1 = 2.*pow(c1,2.)+2.*pow(s1,2.)-two; | |
8713 | Double_t a2 = 6.*pow(c1,3.)-2.*c1*c2+c3+6.*c1*pow(s1,2.)-2.*s1*s2-4.*c1*two; | |
8714 | Double_t a3 = 2.*pow(s1,2.)-2.*pow(c1,2.)+c2; | |
8715 | Double_t a4 = 6.*pow(s1,3.)+6.*pow(c1,2.)*s1+2.*c2*s1-2.*c1*s2-s3-4.*s1*two; | |
8716 | Double_t a5 = 4.*c1*s1-s2; | |
8717 | ||
8718 | // Covariances (including weight dependent prefactor): | |
8719 | Double_t wCov1 = fIntFlowCovariancesNUA->GetBinContent(1); // w*Cov(<2>,<cos(phi)) | |
8720 | Double_t wCov2 = fIntFlowCovariancesNUA->GetBinContent(2); // w*Cov(<2>,<sin(phi)) | |
8721 | Double_t wCov3 = fIntFlowCovariancesNUA->GetBinContent(3); // w*Cov(<cos(phi),<sin(phi)) | |
8722 | Double_t wCov4 = fIntFlowCovariances->GetBinContent(1); // w*Cov(<2>,<4>) | |
8723 | Double_t wCov5 = fIntFlowCovariancesNUA->GetBinContent(4); // w*Cov(<2>,<cos(#phi_{1}+#phi_{2})>) | |
8724 | Double_t wCov6 = fIntFlowCovariancesNUA->GetBinContent(6); // w*Cov(<2>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>) | |
8725 | Double_t wCov7 = fIntFlowCovariancesNUA->GetBinContent(5); // w*Cov(<2>,<sin(#phi_{1}+#phi_{2})>) | |
8726 | Double_t wCov8 = fIntFlowCovariancesNUA->GetBinContent(7); // w*Cov(<2>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>) | |
8727 | Double_t wCov9 = fIntFlowCovariancesNUA->GetBinContent(8); // w*Cov(<4>,<cos(#phi)> | |
8728 | Double_t wCov10 = fIntFlowCovariancesNUA->GetBinContent(10); // w*Cov(<4>,<cos(#phi_{1}+#phi_{2})>) | |
8729 | Double_t wCov11 = fIntFlowCovariancesNUA->GetBinContent(12); // w*Cov(<4>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>) | |
8730 | Double_t wCov12 = fIntFlowCovariancesNUA->GetBinContent(9); // w*Cov(<4>,<sin(#phi)> | |
8731 | Double_t wCov13 = fIntFlowCovariancesNUA->GetBinContent(11); // w*Cov(<4>,<sin(#phi_{1}+#phi_{2})>) | |
8732 | Double_t wCov14 = fIntFlowCovariancesNUA->GetBinContent(13); // w*Cov(<4>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>) | |
8733 | Double_t wCov15 = fIntFlowCovariancesNUA->GetBinContent(14); // w*Cov(<cos(#phi)>,<cos(#phi_{1}+#phi_{2})>) | |
8734 | Double_t wCov16 = fIntFlowCovariancesNUA->GetBinContent(16); // w*Cov(<cos(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>) | |
8735 | Double_t wCov17 = fIntFlowCovariancesNUA->GetBinContent(15); // w*Cov(<cos(#phi)>,<sin(#phi_{1}+#phi_{2})>) | |
8736 | Double_t wCov18 = fIntFlowCovariancesNUA->GetBinContent(17); // w*Cov(<cos(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>) | |
8737 | Double_t wCov19 = fIntFlowCovariancesNUA->GetBinContent(23); // w*Cov(<cos(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>) | |
8738 | Double_t wCov20 = fIntFlowCovariancesNUA->GetBinContent(18); // w*Cov(<sin(#phi)>,<cos(#phi_{1}+#phi_{2})>) | |
8739 | Double_t wCov21 = fIntFlowCovariancesNUA->GetBinContent(22); // w*Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}+#phi_{2})>) | |
8740 | Double_t wCov22 = fIntFlowCovariancesNUA->GetBinContent(24); // w*Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>) | |
8741 | Double_t wCov23 = fIntFlowCovariancesNUA->GetBinContent(20); // w*Cov(<sin(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>) | |
8742 | Double_t wCov24 = fIntFlowCovariancesNUA->GetBinContent(25); // w*Cov(<sin(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>) | |
8743 | Double_t wCov25 = fIntFlowCovariancesNUA->GetBinContent(27); // w*Cov(<cos(#phi_{1}-#phi_{2}-#phi_{3}>,<sin(#phi_{1}-#phi_{2}-#phi_{3}>) | |
8744 | Double_t wCov26 = fIntFlowCovariancesNUA->GetBinContent(19); // w*Cov(<sin(#phi)>,<sin(#phi_{1}+#phi_{2})>) | |
8745 | Double_t wCov27 = fIntFlowCovariancesNUA->GetBinContent(21); // w*Cov(<sin(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>) | |
8746 | Double_t wCov28 = fIntFlowCovariancesNUA->GetBinContent(26); // w*Cov(<sin(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>) | |
8747 | ||
8748 | // Calculating generalized QC{2}: | |
8749 | // Generalized QC{2}: | |
8750 | Double_t gQC2 = two - pow(c1,2.) - pow(s1,2.); | |
8751 | if(fApplyCorrectionForNUA){fIntFlowQcumulants->SetBinContent(1,gQC2);} | |
8752 | // Statistical error of generalized QC{2}: | |
8753 | Double_t gQC2ErrorSquared = pow(twoError,2.)+4.*pow(c1,2.)*pow(c1Error,2.) | |
8754 | + 4.*pow(s1,2.)*pow(s1Error,2.) | |
8755 | - 4*c1*wCov1-4*s1*wCov2 | |
8756 | + 8.*c1*s1*wCov3; | |
8757 | // Store ratio of error squared - with/without NUA terms: | |
8758 | Double_t ratioErrorSquaredQC2 = 0.; | |
8759 | if(fIntFlowQcumulants->GetBinError(1)>0.) | |
8760 | { | |
8761 | ratioErrorSquaredQC2 = (gQC2ErrorSquared/pow(fIntFlowQcumulants->GetBinError(1),2.)); | |
8762 | fIntFlowQcumulantsErrorSquaredRatio->SetBinContent(1,ratioErrorSquaredQC2); | |
8763 | } | |
8764 | // If enabled, store error by including non-isotropic terms: | |
b77b6434 | 8765 | if(fApplyCorrectionForNUA && fPropagateErrorAlsoFromNIT) |
b92ea2b9 | 8766 | { |
8767 | if(gQC2ErrorSquared>=0.) | |
8768 | { | |
8769 | fIntFlowQcumulants->SetBinError(1,pow(gQC2ErrorSquared,0.5)); | |
8770 | } else | |
8771 | { | |
8772 | fIntFlowQcumulants->SetBinError(1,0.); | |
8773 | cout<<endl; | |
8774 | cout<<" WARNING (QC): Statistical error of generalized QC{2} is imaginary !!!!"<<endl; | |
8775 | cout<<endl; | |
8776 | } | |
b77b6434 | 8777 | } // end of if(fApplyCorrectionForNUA && fPropagateErrorAlsoFromNIT) |
b92ea2b9 | 8778 | // Quantify detector bias to QC{2}: |
8779 | if(TMath::Abs(QC2)>0.) | |
8780 | { | |
8781 | fIntFlowDetectorBias->SetBinContent(1,gQC2/QC2); | |
8782 | if(QC2Error>0.) | |
8783 | { | |
8784 | Double_t errorSquared = gQC2ErrorSquared/pow(QC2,2.)+pow(gQC2,2.)*pow(QC2Error,2.)/pow(QC2,4.); | |
8785 | if(errorSquared>0.) | |
8786 | { | |
8787 | fIntFlowDetectorBias->SetBinError(1,pow(errorSquared,0.5)); | |
8788 | } | |
8789 | } | |
8790 | } // end of if(TMath::Abs(QC2)>0.) | |
8791 | ||
8792 | // Calculating generalized QC{4}: | |
8793 | // Generalized QC{4}: | |
8794 | Double_t gQC4 = four-2.*pow(two,2.) | |
8795 | - 4.*c1*c3+4.*s1*s3-pow(c2,2.)-pow(s2,2.) | |
8796 | + 4.*c2*(pow(c1,2.)-pow(s1,2.))+8.*s2*s1*c1 | |
8797 | + 8.*two*(pow(c1,2.)+pow(s1,2.))-6.*pow((pow(c1,2.)+pow(s1,2.)),2.); | |
8798 | if(fApplyCorrectionForNUA){fIntFlowQcumulants->SetBinContent(2,gQC4);} | |
8799 | // Statistical error of generalized QC{4}: | |
8800 | Double_t gQC4ErrorSquared = 16.*pow(a1,2.)*pow(twoError,2.)+pow(fourError,2.)+16.*pow(a2,2.)*pow(c1Error,2.) | |
8801 | + 4.*pow(a3,2.)*pow(c2Error,2.)+16.*pow(c1,2.)*pow(c3Error,2.) | |
8802 | + 16.*pow(a4,2.)*pow(s1Error,2.)+4.*pow(a5,2.)*pow(s2Error,2.) | |
8803 | + 16.*pow(s1,2.)*pow(s3Error,2.)+8.*a1*wCov4-32.*a1*a2*wCov1 | |
8804 | - 16.*a3*a1*wCov5-32.*c1*a1*wCov6-32.*a1*a4*wCov2+16.*a5*a1*wCov7 | |
8805 | + 32.*s1*a1*wCov8-8.*a2*wCov9-4.*a3*wCov10-8.*c1*wCov11-8.*a4*wCov12 | |
8806 | + 4.*a5*wCov13+8.*s1*wCov14+16.*a3*a2*wCov15+32.*c1*a2*wCov16+32.*a2*a4*wCov3 | |
8807 | - 16.*a5*a2*wCov17-32.*s1*a2*wCov18+16.*c1*a3*wCov19+16.*a3*a4*wCov20 | |
8808 | - 8.*a3*a5*wCov21-16.*s1*a3*wCov22+32.*c1*a4*wCov23-16.*c1*a5*wCov24 | |
8809 | - 32.*c1*s1*wCov25-16.*a5*a4*wCov26-32.*s1*a4*wCov27+16.*s1*a5*wCov28; | |
8810 | // Store ratio of error squared - with/without NUA terms: | |
8811 | Double_t ratioErrorSquaredQC4 = 0.; | |
8812 | if(fIntFlowQcumulants->GetBinError(2)>0.) | |
8813 | { | |
8814 | ratioErrorSquaredQC4 = (gQC4ErrorSquared/pow(fIntFlowQcumulants->GetBinError(2),2.)); | |
8815 | fIntFlowQcumulantsErrorSquaredRatio->SetBinContent(2,ratioErrorSquaredQC4); | |
8816 | } | |
b77b6434 | 8817 | if(fApplyCorrectionForNUA && fPropagateErrorAlsoFromNIT) |
b92ea2b9 | 8818 | { |
8819 | if(gQC4ErrorSquared>=0.) | |
8820 | { | |
8821 | fIntFlowQcumulants->SetBinError(2,pow(gQC4ErrorSquared,0.5)); | |
8822 | } else | |
8823 | { | |
8824 | fIntFlowQcumulants->SetBinError(2,0.); | |
8825 | cout<<endl; | |
8826 | cout<<" WARNING (QC): Statistical error of generalized QC{4} is imaginary !!!!"<<endl; | |
8827 | cout<<endl; | |
8828 | } | |
b77b6434 | 8829 | } // end of if(fApplyCorrectionForNUA && fPropagateErrorAlsoFromNIT) |
b92ea2b9 | 8830 | // Quantify detector bias to QC{4}: |
8831 | if(TMath::Abs(QC4)>0.) | |
8832 | { | |
8833 | fIntFlowDetectorBias->SetBinContent(2,gQC4/QC4); | |
8834 | if(QC4Error>0.) | |
8835 | { | |
8836 | Double_t errorSquared = gQC4ErrorSquared/pow(QC4,2.)+pow(gQC4,2.)*pow(QC4Error,2.)/pow(QC4,4.); | |
8837 | if(errorSquared>0.) | |
8838 | { | |
8839 | fIntFlowDetectorBias->SetBinError(2,pow(errorSquared,0.5)); | |
8840 | } | |
8841 | } | |
8842 | } // end of if(TMath::Abs(QC4)>0.) | |
489d5531 | 8843 | |
b92ea2b9 | 8844 | |
8845 | // .... to be improved (continued for 6th and 8th order) .... | |
8846 | ||
8847 | ||
2001bc3a | 8848 | // versus multiplicity: |
b77b6434 | 8849 | if(fCalculateCumulantsVsM) // to be improved - propagate error for nua terms vs M |
2001bc3a | 8850 | { |
8851 | Int_t nBins = fIntFlowCorrelationsVsMPro[0]->GetNbinsX(); // to be improved (hardwired 0) | |
b77b6434 | 8852 | Double_t value[4] = {0.}; // QCs vs M |
8853 | Double_t error[4] = {0.}; // error of QCs vs M | |
8854 | Double_t dSum1[4] = {0.}; // sum value_i/(error_i)^2 | |
8855 | Double_t dSum2[4] = {0.}; // sum 1/(error_i)^2 | |
2001bc3a | 8856 | for(Int_t b=1;b<=nBins;b++) |
8857 | { | |
b92ea2b9 | 8858 | // Measured correlations: |
2001bc3a | 8859 | two = fIntFlowCorrelationsVsMHist[0]->GetBinContent(b); // <<2>> vs M |
8860 | four = fIntFlowCorrelationsVsMHist[1]->GetBinContent(b); // <<4>> vs M | |
b92ea2b9 | 8861 | // Isotropic cumulants: |
8862 | QC2 = two; | |
8863 | QC4 = four-2.*pow(two,2.); | |
8864 | // Non-isotropic terms: | |
8865 | c1 = fIntFlowCorrectionTermsForNUAVsMPro[1][0]->GetBinContent(b); // <<cos(n*phi1)>> | |
8866 | c2 = fIntFlowCorrectionTermsForNUAVsMPro[1][1]->GetBinContent(b); // <<cos(n*(phi1+phi2))>> | |
8867 | c3 = fIntFlowCorrectionTermsForNUAVsMPro[1][2]->GetBinContent(b); // <<cos(n*(phi1-phi2-phi3))>> | |
8868 | s1 = fIntFlowCorrectionTermsForNUAVsMPro[0][0]->GetBinContent(b); // <<sin(n*phi1)>> | |
8869 | s2 = fIntFlowCorrectionTermsForNUAVsMPro[0][1]->GetBinContent(b); // <<sin(n*(phi1+phi2))>> | |
8870 | s3 = fIntFlowCorrectionTermsForNUAVsMPro[0][2]->GetBinContent(b); // <<sin(n*(phi1-phi2-phi3))>> | |
8871 | // Generalized QC{2} vs M: | |
8872 | gQC2 = two - pow(c1,2.) - pow(s1,2.); | |
b77b6434 | 8873 | if(fApplyCorrectionForNUAVsM){fIntFlowQcumulantsVsM[0]->SetBinContent(b,gQC2);} |
b92ea2b9 | 8874 | // Generalized QC{4} vs M: |
8875 | gQC4 = four-2.*pow(two,2.) | |
8876 | - 4.*c1*c3+4.*s1*s3-pow(c2,2.)-pow(s2,2.) | |
8877 | + 4.*c2*(pow(c1,2.)-pow(s1,2.))+8.*s2*s1*c1 | |
8878 | + 8.*two*(pow(c1,2.)+pow(s1,2.))-6.*pow((pow(c1,2.)+pow(s1,2.)),2.); | |
b77b6434 | 8879 | if(fApplyCorrectionForNUAVsM){fIntFlowQcumulantsVsM[1]->SetBinContent(b,gQC4);} |
b92ea2b9 | 8880 | // Detector bias vs M: |
8881 | if(TMath::Abs(QC2)>0.) | |
8882 | { | |
8883 | fIntFlowDetectorBiasVsM[0]->SetBinContent(b,gQC2/QC2); | |
8884 | } // end of if(TMath::Abs(QC2)>0.) | |
8885 | if(TMath::Abs(QC4)>0.) | |
8886 | { | |
8887 | fIntFlowDetectorBiasVsM[1]->SetBinContent(b,gQC4/QC4); | |
b77b6434 | 8888 | } // end of if(TMath::Abs(QC4)>0.) |
8889 | // Rebin in M: | |
8890 | for(Int_t co=0;co<4;co++) | |
8891 | { | |
8892 | value[co] = fIntFlowQcumulantsVsM[co]->GetBinContent(b); | |
8893 | error[co] = fIntFlowQcumulantsVsM[co]->GetBinError(b); | |
8894 | if(error[co]>0.) | |
8895 | { | |
8896 | dSum1[co]+=value[co]/(error[co]*error[co]); | |
8897 | dSum2[co]+=1./(error[co]*error[co]); | |
8898 | } | |
8899 | } // end of for(Int_t co=0;co<4;co++) | |
8900 | } // end of for(Int_t b=1;b<=nBins;b++) | |
8901 | // Store rebinned Q-cumulants: | |
8902 | if(fApplyCorrectionForNUAVsM) | |
8903 | { | |
8904 | for(Int_t co=0;co<4;co++) | |
8905 | { | |
8906 | if(dSum2[co]>0.) | |
8907 | { | |
8908 | fIntFlowQcumulantsRebinnedInM->SetBinContent(co+1,dSum1[co]/dSum2[co]); | |
8909 | fIntFlowQcumulantsRebinnedInM->SetBinError(co+1,pow(1./dSum2[co],0.5)); | |
8910 | } | |
8911 | } // end of for(Int_t co=0;co<4;co++) | |
8912 | } // end of if(fApplyCorrectionForNUAVsM) | |
8913 | } // end of if(fCalculateCumulantsVsM) | |
2001bc3a | 8914 | |
489d5531 | 8915 | } // end of void AliFlowAnalysisWithQCumulants::CalculateQcumulantsCorrectedForNUAIntFlow() |
0328db2d | 8916 | |
489d5531 | 8917 | //================================================================================================================================ |
8918 | ||
489d5531 | 8919 | void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUAIntFlow() |
8920 | { | |
0328db2d | 8921 | // From profile fIntFlowCorrectionTermsForNUAPro[sc] access measured correction terms for NUA |
489d5531 | 8922 | // and their spread, correctly calculate the statistical errors and store the final |
0328db2d | 8923 | // results and statistical errors for correction terms for NUA in histogram fIntFlowCorrectionTermsForNUAHist[sc]. |
489d5531 | 8924 | // |
8925 | // Remark: Statistical error of correction temrs is calculated as: | |
8926 | // | |
8927 | // statistical error = termA * spread * termB: | |
8928 | // termA = sqrt{sum_{i=1}^{N} w^2}/(sum_{i=1}^{N} w) | |
8929 | // termB = 1/sqrt(1-termA^2) | |
8930 | ||
b92ea2b9 | 8931 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved - promore this to data member? |
8932 | TString nonisotropicTermFlag[4] = {"(n(phi1))","(n(phi1+phi2))","(n(phi1-phi2-phi3))","(n(2phi1-phi2))"}; // to be improved - hardwired 4 | |
8933 | ||
489d5531 | 8934 | for(Int_t sc=0;sc<2;sc++) // sin or cos correction terms |
8935 | { | |
b92ea2b9 | 8936 | for(Int_t ci=1;ci<=4;ci++) // correction term index (to be improved - hardwired 4) |
489d5531 | 8937 | { |
8938 | Double_t correction = fIntFlowCorrectionTermsForNUAPro[sc]->GetBinContent(ci); | |
0328db2d | 8939 | Double_t spread = fIntFlowCorrectionTermsForNUAPro[sc]->GetBinError(ci); |
8940 | Double_t sumOfLinearEventWeights = fIntFlowSumOfEventWeightsNUA[sc][0]->GetBinContent(ci); | |
8941 | Double_t sumOfQuadraticEventWeights = fIntFlowSumOfEventWeightsNUA[sc][1]->GetBinContent(ci); | |
8942 | Double_t termA = 0.; | |
8943 | Double_t termB = 0.; | |
b92ea2b9 | 8944 | if(TMath::Abs(sumOfLinearEventWeights)>1.e-44) |
0328db2d | 8945 | { |
8946 | termA = pow(sumOfQuadraticEventWeights,0.5)/sumOfLinearEventWeights; | |
8947 | } else | |
8948 | { | |
b92ea2b9 | 8949 | cout<<" WARNING (QC): sumOfLinearEventWeights == 0 in AFAWQC::FCTFNIF() !!!!"<<endl; |
8950 | cout<<Form(" (for <<%s[%s]>> non-isotropic term)",sinCosFlag[sc].Data(),nonisotropicTermFlag[ci-1].Data())<<endl; | |
0328db2d | 8951 | } |
489d5531 | 8952 | if(1.-pow(termA,2.) > 0.) |
8953 | { | |
8954 | termB = 1./pow(1-pow(termA,2.),0.5); | |
8955 | } else | |
8956 | { | |
b92ea2b9 | 8957 | cout<<" WARNING (QC): 1.-pow(termA,2.) <= 0 in AFAWQC::FCTFNIF() !!!!"<<endl; |
8958 | cout<<Form(" (for <<%s[%s]>> non-isotropic term)",sinCosFlag[sc].Data(),nonisotropicTermFlag[ci-1].Data())<<endl; | |
489d5531 | 8959 | } |
8960 | Double_t statisticalError = termA * spread * termB; | |
489d5531 | 8961 | fIntFlowCorrectionTermsForNUAHist[sc]->SetBinContent(ci,correction); |
0328db2d | 8962 | fIntFlowCorrectionTermsForNUAHist[sc]->SetBinError(ci,statisticalError); |
b92ea2b9 | 8963 | } // end of for(Int_t ci=1;ci<=4;ci++) // correction term index |
489d5531 | 8964 | } // end of for(Int sc=0;sc<2;sc++) // sin or cos correction terms |
8965 | ||
8966 | } // end of void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUAIntFlow() | |
8967 | ||
489d5531 | 8968 | //================================================================================================================================ |
8969 | ||
489d5531 | 8970 | void AliFlowAnalysisWithQCumulants::GetPointersForNestedLoopsHistograms() |
8971 | { | |
8972 | // Get pointers to all objects relevant for calculations with nested loops. | |
8973 | ||
8974 | TList *nestedLoopsList = dynamic_cast<TList*>(fHistList->FindObject("Nested Loops")); | |
8975 | if(nestedLoopsList) | |
8976 | { | |
8977 | this->SetNestedLoopsList(nestedLoopsList); | |
8978 | } else | |
8979 | { | |
8980 | cout<<"WARNING: nestedLoopsList is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
8981 | exit(0); | |
8982 | } | |
8983 | ||
8984 | TString sinCosFlag[2] = {"sin","cos"}; // to be improved (should I promote this to data members?) | |
8985 | TString typeFlag[2] = {"RP","POI"}; // to be improved (should I promote this to data members?) | |
8986 | TString ptEtaFlag[2] = {"p_{T}","#eta"}; // to be improved (should I promote this to data members?) | |
8987 | TString reducedCorrelationIndex[4] = {"<2'>","<4'>","<6'>","<8'>"}; // to be improved (should I promote this to data members?) | |
8988 | ||
8989 | TString evaluateNestedLoopsName = "fEvaluateNestedLoops"; | |
8990 | evaluateNestedLoopsName += fAnalysisLabel->Data(); | |
8991 | TProfile *evaluateNestedLoops = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(evaluateNestedLoopsName.Data())); | |
8992 | Bool_t bEvaluateIntFlowNestedLoops = kFALSE; | |
8993 | Bool_t bEvaluateDiffFlowNestedLoops = kFALSE; | |
8994 | if(evaluateNestedLoops) | |
8995 | { | |
8996 | this->SetEvaluateNestedLoops(evaluateNestedLoops); | |
8997 | bEvaluateIntFlowNestedLoops = (Int_t)evaluateNestedLoops->GetBinContent(1); | |
8998 | bEvaluateDiffFlowNestedLoops = (Int_t)evaluateNestedLoops->GetBinContent(2); | |
8999 | } | |
9000 | // nested loops relevant for integrated flow: | |
9001 | if(bEvaluateIntFlowNestedLoops) | |
9002 | { | |
9003 | // correlations: | |
9004 | TString intFlowDirectCorrelationsName = "fIntFlowDirectCorrelations"; | |
9005 | intFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
9006 | TProfile *intFlowDirectCorrelations = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(intFlowDirectCorrelationsName.Data())); | |
9007 | if(intFlowDirectCorrelations) | |
9008 | { | |
9009 | this->SetIntFlowDirectCorrelations(intFlowDirectCorrelations); | |
9010 | } else | |
9011 | { | |
9012 | cout<<"WARNING: intFlowDirectCorrelations is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
9013 | exit(0); | |
9014 | } | |
9015 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
9016 | { | |
9017 | TString intFlowExtraDirectCorrelationsName = "fIntFlowExtraDirectCorrelations"; | |
9018 | intFlowExtraDirectCorrelationsName += fAnalysisLabel->Data(); | |
9019 | TProfile *intFlowExtraDirectCorrelations = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(intFlowExtraDirectCorrelationsName.Data())); | |
9020 | if(intFlowExtraDirectCorrelations) | |
9021 | { | |
9022 | this->SetIntFlowExtraDirectCorrelations(intFlowExtraDirectCorrelations); | |
9023 | } else | |
9024 | { | |
9025 | cout<<"WARNING: intFlowExtraDirectCorrelations is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
9026 | exit(0); | |
9027 | } | |
9028 | } // end of if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
9029 | // correction terms for non-uniform acceptance: | |
9030 | TString intFlowDirectCorrectionTermsForNUAName = "fIntFlowDirectCorrectionTermsForNUA"; | |
9031 | intFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
9032 | TProfile *intFlowDirectCorrectionTermsForNUA[2] = {NULL}; | |
9033 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
9034 | { | |
9035 | intFlowDirectCorrectionTermsForNUA[sc] = dynamic_cast<TProfile*>(nestedLoopsList->FindObject(Form("%s: %s terms",intFlowDirectCorrectionTermsForNUAName.Data(),sinCosFlag[sc].Data()))); | |
9036 | if(intFlowDirectCorrectionTermsForNUA[sc]) | |
9037 | { | |
9038 | this->SetIntFlowDirectCorrectionTermsForNUA(intFlowDirectCorrectionTermsForNUA[sc],sc); | |
9039 | } else | |
9040 | { | |
9041 | cout<<"WARNING: intFlowDirectCorrectionTermsForNUA[sc] is NULL in AFAWQC::GPFNLH() !!!!"<<endl; | |
9042 | cout<<"sc = "<<sc<<endl; | |
9043 | exit(0); | |
9044 | } | |
9045 | } // end of for(Int_t sc=0;sc<2;sc++) | |
9046 | } // end of if(bEvaluateIntFlowNestedLoops) | |
9047 | ||
9048 | // nested loops relevant for differential flow: | |
9049 | if(bEvaluateDiffFlowNestedLoops) | |
9050 | { | |
9051 | // correlations: | |
9052 | TString diffFlowDirectCorrelationsName = "fDiffFlowDirectCorrelations"; | |
9053 | diffFlowDirectCorrelationsName += fAnalysisLabel->Data(); | |
9054 | TProfile *diffFlowDirectCorrelations[2][2][4] = {{{NULL}}}; | |
9055 | for(Int_t t=0;t<2;t++) | |
9056 | { | |
9057 | for(Int_t pe=0;pe<2;pe++) | |
9058 | { | |
9059 | for(Int_t ci=0;ci<4;ci++) // correlation index | |
9060 | { | |
9061 | 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()))); | |
9062 | if(diffFlowDirectCorrelations[t][pe][ci]) | |
9063 | { | |
9064 | this->SetDiffFlowDirectCorrelations(diffFlowDirectCorrelations[t][pe][ci],t,pe,ci); | |
9065 | } else | |
9066 | { | |
9067 | cout<<"WARNING: diffFlowDirectCorrelations[t][pe][ci] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
9068 | cout<<"t = "<<t<<endl; | |
9069 | cout<<"pe = "<<pe<<endl; | |
9070 | cout<<"ci = "<<ci<<endl; | |
9071 | } | |
9072 | } // end of for(Int_t ci=0;ci<4;ci++) // correlation index | |
9073 | } // end of for(Int_t pe=0;pe<2;pe++) | |
9074 | } // end of for(Int_t t=0;t<2;t++) | |
9075 | // correction terms for non-uniform acceptance: | |
9076 | TString diffFlowDirectCorrectionTermsForNUAName = "fDiffFlowDirectCorrectionTermsForNUA"; | |
9077 | diffFlowDirectCorrectionTermsForNUAName += fAnalysisLabel->Data(); | |
9078 | TProfile *diffFlowDirectCorrectionTermsForNUA[2][2][2][10] = {{{{NULL}}}}; | |
9079 | for(Int_t t=0;t<2;t++) | |
9080 | { | |
9081 | for(Int_t pe=0;pe<2;pe++) | |
9082 | { | |
9083 | // correction terms for NUA: | |
9084 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9085 | { | |
9086 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
9087 | { | |
9088 | 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))); | |
9089 | if(diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti]) | |
9090 | { | |
9091 | this->SetDiffFlowDirectCorrectionTermsForNUA(diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti],t,pe,sc,cti); | |
9092 | } else | |
9093 | { | |
9094 | cout<<"WARNING: diffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti] is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
9095 | cout<<"t = "<<t<<endl; | |
9096 | cout<<"pe = "<<pe<<endl; | |
9097 | cout<<"sc = "<<sc<<endl; | |
9098 | cout<<"cti = "<<cti<<endl; | |
9099 | } | |
9100 | } // end of for(Int_t cti=0;cti<9;cti++) // correction term index | |
9101 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9102 | } // end of for(Int_t pe=0;pe<2;pe++) | |
9103 | } // end of for(Int_t t=0;t<2;t++) | |
9104 | // number of RPs and POIs in selected pt and eta bins for cross-checkings: | |
9105 | TString noOfParticlesInBinName = "fNoOfParticlesInBin"; | |
9106 | TH1D *noOfParticlesInBin = NULL; | |
9107 | noOfParticlesInBin = dynamic_cast<TH1D*>(nestedLoopsList->FindObject(noOfParticlesInBinName.Data())); | |
9108 | if(noOfParticlesInBin) | |
9109 | { | |
9110 | this->SetNoOfParticlesInBin(noOfParticlesInBin); | |
9111 | } else | |
9112 | { | |
9113 | cout<<endl; | |
9114 | cout<<" WARNING (QC): noOfParticlesInBin is NULL in AFAWQC::GPFDFH() !!!!"<<endl; | |
9115 | cout<<endl; | |
9116 | } | |
9117 | } // end of if(bEvaluateDiffFlowNestedLoops) | |
9118 | ||
9119 | } // end of void AliFlowAnalysisWithQCumulants::GetPointersForNestedLoopsHistograms() | |
9120 | ||
9121 | ||
9122 | //================================================================================================================================ | |
9123 | ||
9124 | ||
9125 | void AliFlowAnalysisWithQCumulants::StoreHarmonic() | |
9126 | { | |
9127 | // Store flow harmonic in common control histograms. | |
9128 | ||
9129 | (fCommonHists->GetHarmonic())->Fill(0.5,fHarmonic); | |
9130 | (fCommonHists2nd->GetHarmonic())->Fill(0.5,fHarmonic); | |
9131 | (fCommonHists4th->GetHarmonic())->Fill(0.5,fHarmonic); | |
9132 | (fCommonHists6th->GetHarmonic())->Fill(0.5,fHarmonic); | |
9133 | (fCommonHists8th->GetHarmonic())->Fill(0.5,fHarmonic); | |
9134 | ||
9135 | } // end of void AliFlowAnalysisWithQCumulants::StoreHarmonic() | |
9136 | ||
9137 | ||
9138 | //================================================================================================================================ | |
9139 | ||
9140 | ||
9141 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelationsUsingParticleWeights(TString type, TString ptOrEta) // type = RP or POI | |
9142 | { | |
9143 | // Calculate all correlations needed for differential flow using particle weights. | |
9144 | ||
9145 | Int_t t = -1; // type flag | |
9146 | Int_t pe = -1; // ptEta flag | |
9147 | ||
9148 | if(type == "RP") | |
9149 | { | |
9150 | t = 0; | |
9151 | } else if(type == "POI") | |
9152 | { | |
9153 | t = 1; | |
9154 | } | |
9155 | ||
9156 | if(ptOrEta == "Pt") | |
9157 | { | |
9158 | pe = 0; | |
9159 | } else if(ptOrEta == "Eta") | |
9160 | { | |
9161 | pe = 1; | |
9162 | } | |
9163 | ||
9164 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9165 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
9166 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
9167 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9168 | ||
9169 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
9170 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
9171 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
9172 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
9173 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
9174 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
9175 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
9176 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
9177 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
9178 | ||
9179 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
9180 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
9181 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
9182 | Double_t dSM1p3k = (*fSMpk)(0,3); | |
9183 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
9184 | Double_t dSM3p1k = (*fSMpk)(2,1); | |
9185 | ||
9186 | // looping over all bins and calculating reduced correlations: | |
9187 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9188 | { | |
9189 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular (pt,eta) bin): | |
9190 | Double_t p1n0kRe = 0.; | |
9191 | Double_t p1n0kIm = 0.; | |
9192 | ||
9193 | // number of POIs in particular (pt,eta) bin): | |
9194 | Double_t mp = 0.; | |
9195 | ||
9196 | // real and imaginary parts of q_{m*n,k}: | |
9197 | // (weighted Q-vector evaluated for particles which are both RPs and POIs in particular (pt,eta) bin) | |
9198 | Double_t q1n2kRe = 0.; | |
9199 | Double_t q1n2kIm = 0.; | |
9200 | Double_t q2n1kRe = 0.; | |
9201 | Double_t q2n1kIm = 0.; | |
9202 | ||
9203 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
9204 | Double_t s1p1k = 0.; | |
9205 | Double_t s1p2k = 0.; | |
9206 | Double_t s1p3k = 0.; | |
9207 | ||
9208 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
9209 | Double_t dM0111 = 0.; | |
9210 | ||
9211 | if(type == "POI") | |
9212 | { | |
9213 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9214 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9215 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9216 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9217 | ||
9218 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9219 | ||
9220 | t = 1; // typeFlag = RP or POI | |
9221 | ||
9222 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
9223 | q1n2kRe = fReRPQ1dEBE[2][pe][0][2]->GetBinContent(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
9224 | * fReRPQ1dEBE[2][pe][0][2]->GetBinEntries(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
9225 | q1n2kIm = fImRPQ1dEBE[2][pe][0][2]->GetBinContent(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
9226 | * fImRPQ1dEBE[2][pe][0][2]->GetBinEntries(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
9227 | q2n1kRe = fReRPQ1dEBE[2][pe][1][1]->GetBinContent(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
9228 | * fReRPQ1dEBE[2][pe][1][1]->GetBinEntries(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
9229 | q2n1kIm = fImRPQ1dEBE[2][pe][1][1]->GetBinContent(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
9230 | * fImRPQ1dEBE[2][pe][1][1]->GetBinEntries(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
9231 | ||
9232 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
9233 | s1p1k = pow(fs1dEBE[2][pe][1]->GetBinContent(b)*fs1dEBE[2][pe][1]->GetBinEntries(b),1.); | |
9234 | s1p2k = pow(fs1dEBE[2][pe][2]->GetBinContent(b)*fs1dEBE[2][pe][2]->GetBinEntries(b),1.); | |
9235 | s1p3k = pow(fs1dEBE[2][pe][3]->GetBinContent(b)*fs1dEBE[2][pe][3]->GetBinEntries(b),1.); | |
9236 | ||
9237 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
9238 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
9239 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
9240 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
9241 | } | |
9242 | else if(type == "RP") | |
9243 | { | |
9244 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
9245 | q1n2kRe = fReRPQ1dEBE[0][pe][0][2]->GetBinContent(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
9246 | * fReRPQ1dEBE[0][pe][0][2]->GetBinEntries(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
9247 | q1n2kIm = fImRPQ1dEBE[0][pe][0][2]->GetBinContent(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
9248 | * fImRPQ1dEBE[0][pe][0][2]->GetBinEntries(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
9249 | q2n1kRe = fReRPQ1dEBE[0][pe][1][1]->GetBinContent(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
9250 | * fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
9251 | q2n1kIm = fImRPQ1dEBE[0][pe][1][1]->GetBinContent(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
9252 | * fImRPQ1dEBE[0][pe][1][1]->GetBinEntries(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
9253 | ||
9254 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
9255 | s1p1k = pow(fs1dEBE[0][pe][1]->GetBinContent(b)*fs1dEBE[0][pe][1]->GetBinEntries(b),1.); | |
9256 | s1p2k = pow(fs1dEBE[0][pe][2]->GetBinContent(b)*fs1dEBE[0][pe][2]->GetBinEntries(b),1.); | |
9257 | s1p3k = pow(fs1dEBE[0][pe][3]->GetBinContent(b)*fs1dEBE[0][pe][3]->GetBinEntries(b),1.); | |
9258 | ||
9259 | // to be improved (cross-checked): | |
9260 | p1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9261 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9262 | p1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9263 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9264 | ||
9265 | mp = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9266 | ||
9267 | t = 0; // typeFlag = RP or POI | |
9268 | ||
9269 | // M0111 from Eq. (118) in QC2c (to be improved (notation)): | |
9270 | dM0111 = mp*(dSM3p1k-3.*dSM1p1k*dSM1p2k+2.*dSM1p3k) | |
9271 | - 3.*(s1p1k*(dSM2p1k-dSM1p2k) | |
9272 | + 2.*(s1p3k-s1p2k*dSM1p1k)); | |
9273 | //............................................................................................... | |
9274 | } | |
9275 | ||
9276 | // 2'-particle correlation: | |
9277 | Double_t two1n1nW0W1 = 0.; | |
9278 | if(mp*dSM1p1k-s1p1k) | |
9279 | { | |
9280 | two1n1nW0W1 = (p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k-s1p1k) | |
9281 | / (mp*dSM1p1k-s1p1k); | |
9282 | ||
9283 | // fill profile to get <<2'>> | |
9284 | fDiffFlowCorrelationsPro[t][pe][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],two1n1nW0W1,mp*dSM1p1k-s1p1k); | |
9285 | // histogram to store <2'> e-b-e (needed in some other methods): | |
9286 | fDiffFlowCorrelationsEBE[t][pe][0]->SetBinContent(b,two1n1nW0W1); | |
9287 | fDiffFlowEventWeightsForCorrelationsEBE[t][pe][0]->SetBinContent(b,mp*dSM1p1k-s1p1k); | |
9288 | } // end of if(mp*dSM1p1k-s1p1k) | |
9289 | ||
9290 | // 4'-particle correlation: | |
9291 | Double_t four1n1n1n1nW0W1W1W1 = 0.; | |
9292 | if(dM0111) | |
9293 | { | |
9294 | four1n1n1n1nW0W1W1W1 = ((pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
9295 | - q2n1kRe*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.)) | |
9296 | - 2.*q2n1kIm*dReQ1n1k*dImQ1n1k | |
9297 | - p1n0kRe*(dReQ1n1k*dReQ2n2k+dImQ1n1k*dImQ2n2k) | |
9298 | + p1n0kIm*(dImQ1n1k*dReQ2n2k-dReQ1n1k*dImQ2n2k) | |
9299 | - 2.*dSM1p2k*(p1n0kRe*dReQ1n1k+p1n0kIm*dImQ1n1k) | |
9300 | - 2.*(pow(dReQ1n1k,2.)+pow(dImQ1n1k,2.))*s1p1k | |
9301 | + 6.*(q1n2kRe*dReQ1n1k+q1n2kIm*dImQ1n1k) | |
9302 | + 1.*(q2n1kRe*dReQ2n2k+q2n1kIm*dImQ2n2k) | |
9303 | + 2.*(p1n0kRe*dReQ1n3k+p1n0kIm*dImQ1n3k) | |
9304 | + 2.*s1p1k*dSM1p2k | |
9305 | - 6.*s1p3k) | |
9306 | / dM0111; // to be improved (notation of dM0111) | |
9307 | ||
9308 | // fill profile to get <<4'>> | |
9309 | fDiffFlowCorrelationsPro[t][pe][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],four1n1n1n1nW0W1W1W1,dM0111); | |
9310 | // histogram to store <4'> e-b-e (needed in some other methods): | |
9311 | fDiffFlowCorrelationsEBE[t][pe][1]->SetBinContent(b,four1n1n1n1nW0W1W1W1); | |
9312 | fDiffFlowEventWeightsForCorrelationsEBE[t][pe][1]->SetBinContent(b,dM0111); | |
9313 | } // end of if(dM0111) | |
9314 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9315 | ||
9316 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrelationsUsingParticleWeights(TString type, TString ptOrEta); // type = RP or POI | |
9317 | ||
9318 | ||
9319 | //================================================================================================================================ | |
9320 | ||
9321 | ||
9322 | void AliFlowAnalysisWithQCumulants::FillCommonControlHistograms(AliFlowEventSimple *anEvent) | |
9323 | { | |
9324 | // Fill common control histograms. | |
9325 | ||
9326 | Int_t nRP = anEvent->GetEventNSelTracksRP(); // number of RPs (i.e. number of particles used to determine the reaction plane) | |
9327 | fCommonHists->FillControlHistograms(anEvent); | |
9328 | if(nRP>1) | |
9329 | { | |
9330 | fCommonHists2nd->FillControlHistograms(anEvent); | |
9331 | if(nRP>3) | |
9332 | { | |
9333 | fCommonHists4th->FillControlHistograms(anEvent); | |
9334 | if(nRP>5) | |
9335 | { | |
9336 | fCommonHists6th->FillControlHistograms(anEvent); | |
9337 | if(nRP>7) | |
9338 | { | |
9339 | fCommonHists8th->FillControlHistograms(anEvent); | |
9340 | } // end of if(nRP>7) | |
9341 | } // end of if(nRP>5) | |
9342 | } // end of if(nRP>3) | |
9343 | } // end of if(nRP>1) | |
9344 | ||
9345 | } // end of void AliFlowAnalysisWithQCumulants::FillCommonControlHistograms(AliFlowEventSimple *anEvent) | |
9346 | ||
9347 | ||
9348 | //================================================================================================================================ | |
9349 | ||
9350 | ||
9351 | void AliFlowAnalysisWithQCumulants::ResetEventByEventQuantities() | |
9352 | { | |
9353 | // Reset all event by event quantities. | |
9354 | ||
9355 | // integrated flow: | |
9356 | fReQ->Zero(); | |
9357 | fImQ->Zero(); | |
9358 | fSMpk->Zero(); | |
9359 | fIntFlowCorrelationsEBE->Reset(); | |
9360 | fIntFlowEventWeightsForCorrelationsEBE->Reset(); | |
9361 | fIntFlowCorrelationsAllEBE->Reset(); | |
9362 | ||
b92ea2b9 | 9363 | for(Int_t sc=0;sc<2;sc++) |
489d5531 | 9364 | { |
b92ea2b9 | 9365 | fIntFlowCorrectionTermsForNUAEBE[sc]->Reset(); |
9366 | fIntFlowEventWeightForCorrectionTermsForNUAEBE[sc]->Reset(); | |
489d5531 | 9367 | } |
9368 | ||
9369 | // differential flow: | |
9370 | // 1D: | |
9371 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
9372 | { | |
9373 | for(Int_t pe=0;pe<2;pe++) // 1D in pt or eta | |
9374 | { | |
9375 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
9376 | { | |
9377 | for(Int_t k=0;k<9;k++) // power of weight | |
9378 | { | |
9379 | if(fReRPQ1dEBE[t][pe][m][k]) fReRPQ1dEBE[t][pe][m][k]->Reset(); | |
9380 | if(fImRPQ1dEBE[t][pe][m][k]) fImRPQ1dEBE[t][pe][m][k]->Reset(); | |
9381 | } | |
9382 | } | |
9383 | } | |
9384 | } | |
9385 | ||
9386 | for(Int_t t=0;t<3;t++) // type (0 = RP, 1 = POI, 2 = RP&&POI ) | |
9387 | { | |
9388 | for(Int_t pe=0;pe<2;pe++) // 1D in pt or eta | |
9389 | { | |
9390 | for(Int_t k=0;k<9;k++) | |
9391 | { | |
9392 | if(fs1dEBE[t][pe][k]) fs1dEBE[t][pe][k]->Reset(); | |
9393 | } | |
9394 | } | |
9395 | } | |
9396 | ||
9397 | // e-b-e reduced correlations: | |
9398 | for(Int_t t=0;t<2;t++) // type (0 = RP, 1 = POI) | |
9399 | { | |
9400 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
9401 | { | |
9402 | for(Int_t rci=0;rci<4;rci++) // reduced correlation index | |
9403 | { | |
9404 | if(fDiffFlowCorrelationsEBE[t][pe][rci]) fDiffFlowCorrelationsEBE[t][pe][rci]->Reset(); | |
9405 | if(fDiffFlowEventWeightsForCorrelationsEBE[t][pe][rci]) fDiffFlowEventWeightsForCorrelationsEBE[t][pe][rci]->Reset(); | |
9406 | } | |
9407 | } | |
9408 | } | |
9409 | ||
9410 | // correction terms for NUA: | |
9411 | for(Int_t t=0;t<2;t++) // type (0 = RP, 1 = POI) | |
9412 | { | |
9413 | for(Int_t pe=0;pe<2;pe++) // pt or eta | |
9414 | { | |
9415 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9416 | { | |
9417 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
9418 | { | |
9419 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][sc][cti]->Reset(); | |
9420 | } | |
9421 | } | |
9422 | } | |
9423 | } | |
9424 | ||
9425 | // 2D (pt,eta) | |
9426 | if(fCalculate2DFlow) | |
9427 | { | |
9428 | for(Int_t t=0;t<3;t++) // type (RP, POI, POI&&RP) | |
9429 | { | |
9430 | for(Int_t m=0;m<4;m++) // multiple of harmonic | |
9431 | { | |
9432 | for(Int_t k=0;k<9;k++) // power of weight | |
9433 | { | |
b77b6434 | 9434 | if(fReRPQ2dEBE[t][m][k]){fReRPQ2dEBE[t][m][k]->Reset();} |
9435 | if(fImRPQ2dEBE[t][m][k]){fImRPQ2dEBE[t][m][k]->Reset();} | |
489d5531 | 9436 | } |
9437 | } | |
9438 | } | |
9439 | for(Int_t t=0;t<3;t++) // type (0 = RP, 1 = POI, 2 = RP&&POI ) | |
9440 | { | |
9441 | for(Int_t k=0;k<9;k++) | |
9442 | { | |
b77b6434 | 9443 | if(fs2dEBE[t][k]){fs2dEBE[t][k]->Reset();} |
489d5531 | 9444 | } |
9445 | } | |
9446 | } // end of if(fCalculate2DFlow) | |
9447 | ||
9448 | } // end of void AliFlowAnalysisWithQCumulants::ResetEventByEventQuantities(); | |
9449 | ||
9450 | ||
9451 | //================================================================================================================================ | |
9452 | ||
9453 | ||
9454 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTerms(TString type, TString ptOrEta) | |
9455 | { | |
9456 | // Calculate correction terms for non-uniform acceptance for differential flow (sin terms). | |
9457 | ||
9458 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][0][cti], where cti runs as follows: | |
9459 | // 0: <<sin n(psi1)>> | |
9460 | // 1: <<sin n(psi1+phi2)>> | |
9461 | // 2: <<sin n(psi1+phi2-phi3)>> | |
9462 | // 3: <<sin n(psi1-phi2-phi3)>>: | |
9463 | // 4: | |
9464 | // 5: | |
9465 | // 6: | |
9466 | ||
9467 | // multiplicity: | |
9468 | Double_t dMult = (*fSMpk)(0,0); | |
9469 | ||
9470 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
9471 | Double_t dReQ1n = (*fReQ)(0,0); | |
9472 | Double_t dReQ2n = (*fReQ)(1,0); | |
9473 | //Double_t dReQ3n = (*fReQ)(2,0); | |
9474 | //Double_t dReQ4n = (*fReQ)(3,0); | |
9475 | Double_t dImQ1n = (*fImQ)(0,0); | |
9476 | Double_t dImQ2n = (*fImQ)(1,0); | |
9477 | //Double_t dImQ3n = (*fImQ)(2,0); | |
9478 | //Double_t dImQ4n = (*fImQ)(3,0); | |
9479 | ||
9480 | Int_t t = -1; // type flag | |
9481 | Int_t pe = -1; // ptEta flag | |
9482 | ||
9483 | if(type == "RP") | |
9484 | { | |
9485 | t = 0; | |
9486 | } else if(type == "POI") | |
9487 | { | |
9488 | t = 1; | |
9489 | } | |
9490 | ||
9491 | if(ptOrEta == "Pt") | |
9492 | { | |
9493 | pe = 0; | |
9494 | } else if(ptOrEta == "Eta") | |
9495 | { | |
9496 | pe = 1; | |
9497 | } | |
9498 | ||
9499 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9500 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
9501 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
9502 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9503 | ||
9504 | // looping over all bins and calculating correction terms: | |
9505 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9506 | { | |
9507 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
9508 | Double_t p1n0kRe = 0.; | |
9509 | Double_t p1n0kIm = 0.; | |
9510 | ||
9511 | // number of POIs in particular pt or eta bin: | |
9512 | Double_t mp = 0.; | |
9513 | ||
9514 | // 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): | |
9515 | Double_t q1n0kRe = 0.; | |
9516 | Double_t q1n0kIm = 0.; | |
9517 | Double_t q2n0kRe = 0.; | |
9518 | Double_t q2n0kIm = 0.; | |
9519 | ||
9520 | // number of particles which are both RPs and POIs in particular pt or eta bin: | |
9521 | Double_t mq = 0.; | |
9522 | ||
9523 | if(type == "POI") | |
9524 | { | |
9525 | // q_{m*n,0}: | |
9526 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
9527 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
9528 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
9529 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
9530 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
9531 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
9532 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
9533 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
9534 | ||
9535 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9536 | } | |
9537 | else if(type == "RP") | |
9538 | { | |
9539 | // q_{m*n,0}: | |
9540 | q1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9541 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9542 | q1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9543 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9544 | q2n0kRe = fReRPQ1dEBE[0][pe][1][0]->GetBinContent(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
9545 | * fReRPQ1dEBE[0][pe][1][0]->GetBinEntries(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
9546 | q2n0kIm = fImRPQ1dEBE[0][pe][1][0]->GetBinContent(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
9547 | * fImRPQ1dEBE[0][pe][1][0]->GetBinEntries(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
9548 | ||
9549 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9550 | } | |
9551 | if(type == "POI") | |
9552 | { | |
9553 | // p_{m*n,0}: | |
9554 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9555 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9556 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9557 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9558 | ||
9559 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9560 | ||
9561 | t = 1; // typeFlag = RP or POI | |
9562 | } | |
9563 | else if(type == "RP") | |
9564 | { | |
9565 | // p_{m*n,0} = q_{m*n,0}: | |
9566 | p1n0kRe = q1n0kRe; | |
9567 | p1n0kIm = q1n0kIm; | |
9568 | ||
9569 | mp = mq; | |
9570 | ||
9571 | t = 0; // typeFlag = RP or POI | |
9572 | } | |
9573 | ||
9574 | // <<sin n(psi1)>>: | |
9575 | Double_t sinP1nPsi = 0.; | |
9576 | if(mp) | |
9577 | { | |
9578 | sinP1nPsi = p1n0kIm/mp; | |
9579 | // fill profile for <<sin n(psi1)>>: | |
9580 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi,mp); | |
9581 | // histogram to store <sin n(psi1)> e-b-e (needed in some other methods): | |
9582 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][0]->SetBinContent(b,sinP1nPsi); | |
9583 | } // end of if(mp) | |
9584 | ||
9585 | // <<sin n(psi1+phi2)>>: | |
9586 | Double_t sinP1nPsiP1nPhi = 0.; | |
9587 | if(mp*dMult-mq) | |
9588 | { | |
9589 | sinP1nPsiP1nPhi = (p1n0kRe*dImQ1n+p1n0kIm*dReQ1n-q2n0kIm)/(mp*dMult-mq); | |
9590 | // fill profile for <<sin n(psi1+phi2)>>: | |
9591 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsiP1nPhi,mp*dMult-mq); | |
9592 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9593 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][1]->SetBinContent(b,sinP1nPsiP1nPhi); | |
9594 | } // end of if(mp*dMult-mq) | |
9595 | ||
9596 | // <<sin n(psi1+phi2-phi3)>>: | |
9597 | Double_t sinP1nPsi1P1nPhi2MPhi3 = 0.; | |
9598 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9599 | { | |
9600 | sinP1nPsi1P1nPhi2MPhi3 = (p1n0kIm*(pow(dImQ1n,2.)+pow(dReQ1n,2.)-dMult) | |
9601 | - 1.*(q2n0kIm*dReQ1n-q2n0kRe*dImQ1n) | |
9602 | - mq*dImQ1n+2.*q1n0kIm) | |
9603 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9604 | // fill profile for <<sin n(psi1+phi2)>>: | |
9605 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1P1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9606 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9607 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][2]->SetBinContent(b,sinP1nPsi1P1nPhi2MPhi3); | |
9608 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9609 | ||
9610 | // <<sin n(psi1-phi2-phi3)>>: | |
9611 | Double_t sinP1nPsi1M1nPhi2MPhi3 = 0.; | |
9612 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9613 | { | |
9614 | sinP1nPsi1M1nPhi2MPhi3 = (p1n0kIm*(pow(dReQ1n,2.)-pow(dImQ1n,2.))-2.*p1n0kRe*dReQ1n*dImQ1n | |
9615 | - 1.*(p1n0kIm*dReQ2n-p1n0kRe*dImQ2n) | |
9616 | + 2.*mq*dImQ1n-2.*q1n0kIm) | |
9617 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9618 | // fill profile for <<sin n(psi1+phi2)>>: | |
9619 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1M1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9620 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9621 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][3]->SetBinContent(b,sinP1nPsi1M1nPhi2MPhi3); | |
9622 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9623 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9624 | ||
9625 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTerms(TString type, TString ptOrEta) | |
9626 | ||
9627 | ||
9628 | //================================================================================================================================ | |
9629 | ||
9630 | ||
9631 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTerms(TString type, TString ptOrEta) | |
9632 | { | |
9633 | // Calculate correction terms for non-uniform acceptance for differential flow (cos terms). | |
9634 | ||
9635 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][1][cti], where cti runs as follows: | |
9636 | // 0: <<cos n(psi)>> | |
9637 | // 1: <<cos n(psi1+phi2)>> | |
9638 | // 2: <<cos n(psi1+phi2-phi3)>> | |
9639 | // 3: <<cos n(psi1-phi2-phi3)>> | |
9640 | // 4: | |
9641 | // 5: | |
9642 | // 6: | |
9643 | ||
9644 | // multiplicity: | |
9645 | Double_t dMult = (*fSMpk)(0,0); | |
9646 | ||
9647 | // real and imaginary parts of non-weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
9648 | Double_t dReQ1n = (*fReQ)(0,0); | |
9649 | Double_t dReQ2n = (*fReQ)(1,0); | |
9650 | //Double_t dReQ3n = (*fReQ)(2,0); | |
9651 | //Double_t dReQ4n = (*fReQ)(3,0); | |
9652 | Double_t dImQ1n = (*fImQ)(0,0); | |
9653 | Double_t dImQ2n = (*fImQ)(1,0); | |
9654 | //Double_t dImQ3n = (*fImQ)(2,0); | |
9655 | //Double_t dImQ4n = (*fImQ)(3,0); | |
9656 | ||
9657 | Int_t t = -1; // type flag | |
9658 | Int_t pe = -1; // ptEta flag | |
9659 | ||
9660 | if(type == "RP") | |
9661 | { | |
9662 | t = 0; | |
9663 | } else if(type == "POI") | |
9664 | { | |
9665 | t = 1; | |
9666 | } | |
9667 | ||
9668 | if(ptOrEta == "Pt") | |
9669 | { | |
9670 | pe = 0; | |
9671 | } else if(ptOrEta == "Eta") | |
9672 | { | |
9673 | pe = 1; | |
9674 | } | |
9675 | ||
9676 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9677 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
9678 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
9679 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9680 | ||
9681 | // looping over all bins and calculating correction terms: | |
9682 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9683 | { | |
9684 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
9685 | Double_t p1n0kRe = 0.; | |
9686 | Double_t p1n0kIm = 0.; | |
9687 | ||
9688 | // number of POIs in particular pt or eta bin: | |
9689 | Double_t mp = 0.; | |
9690 | ||
9691 | // 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): | |
9692 | Double_t q1n0kRe = 0.; | |
9693 | Double_t q1n0kIm = 0.; | |
9694 | Double_t q2n0kRe = 0.; | |
9695 | Double_t q2n0kIm = 0.; | |
9696 | ||
9697 | // number of particles which are both RPs and POIs in particular pt or eta bin: | |
9698 | Double_t mq = 0.; | |
9699 | ||
9700 | if(type == "POI") | |
9701 | { | |
9702 | // q_{m*n,0}: | |
9703 | q1n0kRe = fReRPQ1dEBE[2][pe][0][0]->GetBinContent(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
9704 | * fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
9705 | q1n0kIm = fImRPQ1dEBE[2][pe][0][0]->GetBinContent(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)) | |
9706 | * fImRPQ1dEBE[2][pe][0][0]->GetBinEntries(fImRPQ1dEBE[2][pe][0][0]->GetBin(b)); | |
9707 | q2n0kRe = fReRPQ1dEBE[2][pe][1][0]->GetBinContent(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
9708 | * fReRPQ1dEBE[2][pe][1][0]->GetBinEntries(fReRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
9709 | q2n0kIm = fImRPQ1dEBE[2][pe][1][0]->GetBinContent(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)) | |
9710 | * fImRPQ1dEBE[2][pe][1][0]->GetBinEntries(fImRPQ1dEBE[2][pe][1][0]->GetBin(b)); | |
9711 | ||
9712 | mq = fReRPQ1dEBE[2][pe][0][0]->GetBinEntries(fReRPQ1dEBE[2][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9713 | } | |
9714 | else if(type == "RP") | |
9715 | { | |
9716 | // q_{m*n,0}: | |
9717 | q1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9718 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9719 | q1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
9720 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
9721 | q2n0kRe = fReRPQ1dEBE[0][pe][1][0]->GetBinContent(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
9722 | * fReRPQ1dEBE[0][pe][1][0]->GetBinEntries(fReRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
9723 | q2n0kIm = fImRPQ1dEBE[0][pe][1][0]->GetBinContent(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)) | |
9724 | * fImRPQ1dEBE[0][pe][1][0]->GetBinEntries(fImRPQ1dEBE[0][pe][1][0]->GetBin(b)); | |
9725 | ||
9726 | mq = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9727 | } | |
9728 | if(type == "POI") | |
9729 | { | |
9730 | // p_{m*n,0}: | |
9731 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9732 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9733 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
9734 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
9735 | ||
9736 | mp = fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
9737 | ||
9738 | t = 1; // typeFlag = RP or POI | |
9739 | } | |
9740 | else if(type == "RP") | |
9741 | { | |
9742 | // p_{m*n,0} = q_{m*n,0}: | |
9743 | p1n0kRe = q1n0kRe; | |
9744 | p1n0kIm = q1n0kIm; | |
9745 | ||
9746 | mp = mq; | |
9747 | ||
9748 | t = 0; // typeFlag = RP or POI | |
9749 | } | |
9750 | ||
9751 | // <<cos n(psi1)>>: | |
9752 | Double_t cosP1nPsi = 0.; | |
9753 | if(mp) | |
9754 | { | |
9755 | cosP1nPsi = p1n0kRe/mp; | |
9756 | ||
9757 | // fill profile for <<cos n(psi1)>>: | |
9758 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi,mp); | |
9759 | // histogram to store <cos n(psi1)> e-b-e (needed in some other methods): | |
9760 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][0]->SetBinContent(b,cosP1nPsi); | |
9761 | } // end of if(mp) | |
9762 | ||
9763 | // <<cos n(psi1+phi2)>>: | |
9764 | Double_t cosP1nPsiP1nPhi = 0.; | |
9765 | if(mp*dMult-mq) | |
9766 | { | |
9767 | cosP1nPsiP1nPhi = (p1n0kRe*dReQ1n-p1n0kIm*dImQ1n-q2n0kRe)/(mp*dMult-mq); | |
9768 | // fill profile for <<sin n(psi1+phi2)>>: | |
9769 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsiP1nPhi,mp*dMult-mq); | |
9770 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9771 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][1]->SetBinContent(b,cosP1nPsiP1nPhi); | |
9772 | } // end of if(mp*dMult-mq) | |
9773 | ||
9774 | // <<cos n(psi1+phi2-phi3)>>: | |
9775 | Double_t cosP1nPsi1P1nPhi2MPhi3 = 0.; | |
9776 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9777 | { | |
9778 | cosP1nPsi1P1nPhi2MPhi3 = (p1n0kRe*(pow(dImQ1n,2.)+pow(dReQ1n,2.)-dMult) | |
9779 | - 1.*(q2n0kRe*dReQ1n+q2n0kIm*dImQ1n) | |
9780 | - mq*dReQ1n+2.*q1n0kRe) | |
9781 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9782 | // fill profile for <<sin n(psi1+phi2)>>: | |
9783 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1P1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9784 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9785 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][2]->SetBinContent(b,cosP1nPsi1P1nPhi2MPhi3); | |
9786 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9787 | ||
9788 | // <<cos n(psi1-phi2-phi3)>>: | |
9789 | Double_t cosP1nPsi1M1nPhi2MPhi3 = 0.; | |
9790 | if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9791 | { | |
9792 | cosP1nPsi1M1nPhi2MPhi3 = (p1n0kRe*(pow(dReQ1n,2.)-pow(dImQ1n,2.))+2.*p1n0kIm*dReQ1n*dImQ1n | |
9793 | - 1.*(p1n0kRe*dReQ2n+p1n0kIm*dImQ2n) | |
9794 | - 2.*mq*dReQ1n+2.*q1n0kRe) | |
9795 | / (mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9796 | // fill profile for <<sin n(psi1+phi2)>>: | |
9797 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1M1nPhi2MPhi3,mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)); | |
9798 | // histogram to store <sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
9799 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][3]->SetBinContent(b,cosP1nPsi1M1nPhi2MPhi3); | |
9800 | } // end of if(mq*(dMult-1.)*(dMult-2.)+(mp-mq)*dMult*(dMult-1.)) | |
9801 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9802 | ||
9803 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTerms(TString type, TString ptOrEta) | |
9804 | ||
9805 | ||
9806 | //================================================================================================================================== | |
9807 | ||
9808 | ||
9809 | void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUADiffFlow(TString type, TString ptOrEta) | |
9810 | { | |
9811 | // Transfer prolfiles into histogams and correctly propagate the error (to be improved: description) | |
9812 | ||
9813 | // to be improved: debugged - I do not correctly transfer all profiles into histos (bug appears only after merging) | |
9814 | ||
9815 | Int_t t = -1; // type flag | |
9816 | Int_t pe = -1; // ptEta flag | |
9817 | ||
9818 | if(type == "RP") | |
9819 | { | |
9820 | t = 0; | |
9821 | } else if(type == "POI") | |
9822 | { | |
9823 | t = 1; | |
9824 | } | |
9825 | ||
9826 | if(ptOrEta == "Pt") | |
9827 | { | |
9828 | pe = 0; | |
9829 | } else if(ptOrEta == "Eta") | |
9830 | { | |
9831 | pe = 1; | |
9832 | } | |
9833 | ||
9834 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9835 | //Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
9836 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
9837 | //Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
9838 | ||
9839 | for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9840 | { | |
9841 | for(Int_t cti=0;cti<9;cti++) // correction term index | |
9842 | { | |
9843 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9844 | { | |
9845 | Double_t correctionTerm = fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]->GetBinContent(b); | |
9846 | fDiffFlowCorrectionTermsForNUAHist[t][pe][sc][cti]->SetBinContent(b,correctionTerm); | |
9847 | // to be improved (propagate error correctly) | |
9848 | // ... | |
9849 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9850 | } // correction term index | |
9851 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos | |
9852 | ||
9853 | }// end of void AliFlowAnalysisWithQCumulants::FinalizeCorrectionTermsForNUADiffFlow(TString type, TString ptOrEta) | |
9854 | ||
9855 | ||
9856 | //================================================================================================================================== | |
9857 | ||
9858 | ||
9859 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulantsCorrectedForNUA(TString type, TString ptOrEta) | |
9860 | { | |
9861 | // Calculate generalized differential flow Q-cumulants (corrected for non-uniform acceptance) | |
9862 | ||
9863 | Int_t typeFlag = -1; | |
9864 | Int_t ptEtaFlag = -1; | |
9865 | ||
9866 | if(type == "RP") | |
9867 | { | |
9868 | typeFlag = 0; | |
9869 | } else if(type == "POI") | |
9870 | { | |
9871 | typeFlag = 1; | |
9872 | } | |
9873 | ||
9874 | if(ptOrEta == "Pt") | |
9875 | { | |
9876 | ptEtaFlag = 0; | |
9877 | } else if(ptOrEta == "Eta") | |
9878 | { | |
9879 | ptEtaFlag = 1; | |
9880 | } | |
9881 | ||
9882 | // shortcuts: | |
9883 | Int_t t = typeFlag; | |
9884 | Int_t pe = ptEtaFlag; | |
9885 | ||
9886 | // common: | |
9887 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9888 | ||
9889 | // 2-particle correlation: | |
9890 | Double_t two = fIntFlowCorrelationsHist->GetBinContent(1); // <<2>> | |
9891 | // sin term coming from integrated flow: | |
9892 | Double_t sinP1nPhi = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(1); // <<sin(n*phi1)>> | |
9893 | Double_t sinP1nPhi1P1nPhi2 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(2); // <<sin(n*(phi1+phi2))>> | |
9894 | Double_t sinP1nPhi1M1nPhi2M1nPhi3 = fIntFlowCorrectionTermsForNUAHist[0]->GetBinContent(3); // <<sin(n*(phi1-phi2-phi3))>> | |
9895 | // cos term coming from integrated flow: | |
9896 | Double_t cosP1nPhi = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(1); // <<cos(n*phi1)>> | |
9897 | Double_t cosP1nPhi1P1nPhi2 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(2); // <<cos(n*(phi1+phi2))>> | |
9898 | Double_t cosP1nPhi1M1nPhi2M1nPhi3 = fIntFlowCorrectionTermsForNUAHist[1]->GetBinContent(3); // <<cos(n*(phi1-phi2-phi3))>> | |
9899 | ||
9900 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9901 | { | |
9902 | Double_t twoPrime = fDiffFlowCorrelationsHist[t][pe][0]->GetBinContent(b); // <<2'>> | |
9903 | Double_t fourPrime = fDiffFlowCorrelationsHist[t][pe][1]->GetBinContent(b); // <<4'>> | |
9904 | Double_t sinP1nPsi = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][0]->GetBinContent(b); // <<sin n(Psi)>> | |
9905 | Double_t cosP1nPsi = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][0]->GetBinContent(b); // <<cos n(Psi)>> | |
9906 | Double_t sinP1nPsi1P1nPhi2 = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][1]->GetBinContent(b); // <<sin n(psi1+phi2)>> | |
9907 | Double_t cosP1nPsi1P1nPhi2 = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][1]->GetBinContent(b); // <<cos n(psi1+phi2)>> | |
9908 | Double_t sinP1nPsi1P1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][2]->GetBinContent(b); // <<sin n(psi1+phi2-phi3)>> | |
9909 | Double_t cosP1nPsi1P1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][2]->GetBinContent(b); // <<cos n(psi1+phi2-phi3)>> | |
9910 | Double_t sinP1nPsi1M1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][0][3]->GetBinContent(b); // <<sin n(psi1-phi2-phi3)>> | |
9911 | Double_t cosP1nPsi1M1nPhi2M1nPhi3 = fDiffFlowCorrectionTermsForNUAHist[t][pe][1][3]->GetBinContent(b); // <<cos n(psi1-phi2-phi3)>> | |
9912 | // generalized QC{2'}: | |
9913 | Double_t qc2Prime = twoPrime - sinP1nPsi*sinP1nPhi - cosP1nPsi*cosP1nPhi; | |
9914 | fDiffFlowCumulants[t][pe][0]->SetBinContent(b,qc2Prime); | |
9915 | // generalized QC{4'}: | |
9916 | Double_t qc4Prime = fourPrime-2.*twoPrime*two | |
9917 | - cosP1nPsi*cosP1nPhi1M1nPhi2M1nPhi3 | |
9918 | + sinP1nPsi*sinP1nPhi1M1nPhi2M1nPhi3 | |
9919 | - cosP1nPhi*cosP1nPsi1M1nPhi2M1nPhi3 | |
9920 | + sinP1nPhi*sinP1nPsi1M1nPhi2M1nPhi3 | |
9921 | - 2.*cosP1nPhi*cosP1nPsi1P1nPhi2M1nPhi3 | |
9922 | - 2.*sinP1nPhi*sinP1nPsi1P1nPhi2M1nPhi3 | |
9923 | - cosP1nPsi1P1nPhi2*cosP1nPhi1P1nPhi2 | |
9924 | - sinP1nPsi1P1nPhi2*sinP1nPhi1P1nPhi2 | |
9925 | + 2.*cosP1nPhi1P1nPhi2*(cosP1nPsi*cosP1nPhi-sinP1nPsi*sinP1nPhi) | |
9926 | + 2.*sinP1nPhi1P1nPhi2*(cosP1nPsi*sinP1nPhi+sinP1nPsi*cosP1nPhi) | |
9927 | + 4.*two*(cosP1nPsi*cosP1nPhi+sinP1nPsi*sinP1nPhi) | |
9928 | + 2.*cosP1nPsi1P1nPhi2*(pow(cosP1nPhi,2.)-pow(sinP1nPhi,2.)) | |
9929 | + 4.*sinP1nPsi1P1nPhi2*cosP1nPhi*sinP1nPhi | |
9930 | + 4.*twoPrime*(pow(cosP1nPhi,2.)+pow(sinP1nPhi,2.)) | |
9931 | - 6.*(pow(cosP1nPhi,2.)-pow(sinP1nPhi,2.)) | |
9932 | * (cosP1nPsi*cosP1nPhi-sinP1nPsi*sinP1nPhi) | |
9933 | - 12.*cosP1nPhi*sinP1nPhi | |
9934 | * (sinP1nPsi*cosP1nPhi+cosP1nPsi*sinP1nPhi); | |
9935 | fDiffFlowCumulants[t][pe][1]->SetBinContent(b,qc4Prime); | |
9936 | } // end of for(Int_t p=1;p<=fnBinsPt;p++) | |
9937 | ||
9938 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCumulantsCorrectedForNUA(TString type, TString ptOrEta) | |
9939 | ||
9940 | ||
9941 | //================================================================================================================================== | |
9942 | ||
9943 | ||
9944 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectedForNUA(TString type, TString ptOrEta) | |
9945 | { | |
9946 | // Calculate differential flow corrected for non-uniform acceptance. | |
9947 | ||
9948 | // to be improved (rewritten completely) | |
9949 | ||
9950 | Int_t typeFlag = -1; | |
9951 | Int_t ptEtaFlag = -1; | |
9952 | ||
9953 | if(type == "RP") | |
9954 | { | |
9955 | typeFlag = 0; | |
9956 | } else if(type == "POI") | |
9957 | { | |
9958 | typeFlag = 1; | |
9959 | } | |
9960 | ||
9961 | if(ptOrEta == "Pt") | |
9962 | { | |
9963 | ptEtaFlag = 0; | |
9964 | } else if(ptOrEta == "Eta") | |
9965 | { | |
9966 | ptEtaFlag = 1; | |
9967 | } | |
9968 | ||
9969 | // shortcuts: | |
9970 | Int_t t = typeFlag; | |
9971 | Int_t pe = ptEtaFlag; | |
9972 | ||
9973 | // common: | |
9974 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
9975 | ||
9976 | // to be improved: access here generalized QC{2} and QC{4} instead: | |
9977 | Double_t dV2 = fIntFlow->GetBinContent(1); | |
9978 | Double_t dV4 = fIntFlow->GetBinContent(2); | |
9979 | ||
9980 | // loop over pt or eta bins: | |
9981 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
9982 | { | |
9983 | // generalized QC{2'}: | |
9984 | Double_t gQC2Prime = fDiffFlowCumulants[t][pe][0]->GetBinContent(b); | |
9985 | // v'{2}: | |
9986 | if(dV2>0) | |
9987 | { | |
9988 | Double_t v2Prime = gQC2Prime/dV2; | |
9989 | fDiffFlow[t][pe][0]->SetBinContent(b,v2Prime); | |
9990 | } | |
9991 | // generalized QC{4'}: | |
9992 | Double_t gQC4Prime = fDiffFlowCumulants[t][pe][1]->GetBinContent(b); | |
9993 | // v'{4}: | |
9994 | if(dV4>0) | |
9995 | { | |
9996 | Double_t v4Prime = -gQC4Prime/pow(dV4,3.); | |
9997 | fDiffFlow[t][pe][1]->SetBinContent(b,v4Prime); | |
9998 | } | |
9999 | } // end of for(Int_t b=1;b<=fnBinsPtEta[pe];b++) | |
10000 | ||
10001 | } // end of void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectedForNUA(TString type, TString ptOrEta); | |
10002 | ||
10003 | ||
10004 | //================================================================================================================================== | |
10005 | ||
10006 | ||
0328db2d | 10007 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoops(AliFlowEventSimple * const anEvent) |
489d5531 | 10008 | { |
10009 | // Evaluate with nested loops multiparticle correlations for integrated flow (without using the particle weights). | |
10010 | ||
10011 | // Remark: Results are stored in profile fIntFlowDirectCorrelations whose binning is organized as follows: | |
10012 | // | |
10013 | // 1st bin: <2>_{1n|1n} = two1n1n = cos(n*(phi1-phi2))> | |
10014 | // 2nd bin: <2>_{2n|2n} = two2n2n = cos(2n*(phi1-phi2))> | |
10015 | // 3rd bin: <2>_{3n|3n} = two3n3n = cos(3n*(phi1-phi2))> | |
10016 | // 4th bin: <2>_{4n|4n} = two4n4n = cos(4n*(phi1-phi2))> | |
10017 | // 5th bin: ---- EMPTY ---- | |
10018 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1n = <cos(n*(2.*phi1-phi2-phi3))> | |
10019 | // 7th bin: <3>_{3n|2n,1n} = three3n2n1n = <cos(n*(3.*phi1-2.*phi2-phi3))> | |
10020 | // 8th bin: <3>_{4n|2n,2n} = three4n2n2n = <cos(n*(4.*phi1-2.*phi2-2.*phi3))> | |
10021 | // 9th bin: <3>_{4n|3n,1n} = three4n3n1n = <cos(n*(4.*phi1-3.*phi2-phi3))> | |
10022 | // 10th bin: ---- EMPTY ---- | |
10023 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1n = <cos(n*(phi1+phi2-phi3-phi4))> | |
10024 | // 12th bin: <4>_{2n,1n|2n,1n} = four2n1n2n1n = <cos(2.*n*(phi1+phi2-phi3-phi4))> | |
10025 | // 13th bin: <4>_{2n,2n|2n,2n} = four2n2n2n2n = <cos(n*(2.*phi1+phi2-2.*phi3-phi4))> | |
10026 | // 14th bin: <4>_{3n|1n,1n,1n} = four3n1n1n1n = <cos(n*(3.*phi1-phi2-phi3-phi4))> | |
10027 | // 15th bin: <4>_{3n,1n|3n,1n} = four3n1n3n1n = <cos(n*(4.*phi1-2.*phi2-phi3-phi4))> | |
10028 | // 16th bin: <4>_{3n,1n|2n,2n} = four3n1n2n2n = <cos(n*(3.*phi1+phi2-2.*phi3-2.*phi4))> | |
10029 | // 17th bin: <4>_{4n|2n,1n,1n} = four4n2n1n1n = <cos(n*(3.*phi1+phi2-3.*phi3-phi4))> | |
10030 | // 18th bin: ---- EMPTY ---- | |
10031 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = five2n1n1n1n1n = <cos(n*(2.*phi1+phi2-phi3-phi4-phi5))> | |
10032 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = five2n2n2n1n1n = <cos(n*(2.*phi1+2.*phi2-2.*phi3-phi4-phi5))> | |
10033 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = five3n1n2n1n1n = <cos(n*(3.*phi1+phi2-2.*phi3-phi4-phi5))> | |
10034 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = five4n1n1n1n1n = <cos(n*(4.*phi1-phi2-phi3-phi4-phi5))> | |
10035 | // 23rd bin: ---- EMPTY ---- | |
10036 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = six1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3-phi4-phi5-phi6))> | |
10037 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = six2n1n1n2n1n1n = <cos(n*(2.*phi1+2.*phi2-phi3-phi4-phi5-phi6))> | |
10038 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = six2n2n1n1n1n1n = <cos(n*(3.*phi1+phi2-phi3-phi4-phi5-phi6))> | |
10039 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = six3n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-2.*phi4-phi5-phi6))> | |
10040 | // 28th bin: ---- EMPTY ---- | |
10041 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = seven2n1n1n1n1n1n1n = <cos(n*(2.*phi1+phi2+phi3-phi4-phi5-phi6-phi7))> | |
10042 | // 30th bin: ---- EMPTY ---- | |
10043 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = eight1n1n1n1n1n1n1n1n = <cos(n*(phi1+phi2+phi3+phi4-phi5-phi6-phi7-phi8))> | |
10044 | ||
10045 | Int_t nPrim = anEvent->NumberOfTracks(); | |
10046 | AliFlowTrackSimple *aftsTrack = NULL; | |
10047 | Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.; | |
10048 | Int_t n = fHarmonic; | |
10049 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
10050 | Double_t dMult = (*fSMpk)(0,0); | |
10051 | cout<<endl; | |
10052 | cout<<"Multiparticle correlations: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
10053 | if(dMult<2) | |
10054 | { | |
10055 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; | |
10056 | } else if (dMult>fMaxAllowedMultiplicity) | |
10057 | { | |
10058 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; | |
10059 | } else | |
10060 | { | |
10061 | cout<<"... evaluating nested loops (without using particle weights)..."<<endl; | |
10062 | } | |
10063 | ||
10064 | // 2-particle correlations: | |
10065 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
10066 | { | |
10067 | for(Int_t i1=0;i1<nPrim;i1++) | |
10068 | { | |
10069 | aftsTrack=anEvent->GetTrack(i1); | |
10070 | if(!(aftsTrack->InRPSelection())) continue; | |
10071 | phi1=aftsTrack->Phi(); | |
10072 | for(Int_t i2=0;i2<nPrim;i2++) | |
10073 | { | |
10074 | if(i2==i1)continue; | |
10075 | aftsTrack=anEvent->GetTrack(i2); | |
10076 | if(!(aftsTrack->InRPSelection())) continue; | |
10077 | phi2=aftsTrack->Phi(); | |
10078 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
10079 | // fill the profile with 2-p correlations: | |
10080 | fIntFlowDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),1.); // <cos(n*(phi1-phi2))> | |
10081 | fIntFlowDirectCorrelations->Fill(1.5,cos(2.*n*(phi1-phi2)),1.); // <cos(2n*(phi1-phi2))> | |
10082 | fIntFlowDirectCorrelations->Fill(2.5,cos(3.*n*(phi1-phi2)),1.); // <cos(3n*(phi1-phi2))> | |
10083 | fIntFlowDirectCorrelations->Fill(3.5,cos(4.*n*(phi1-phi2)),1.); // <cos(4n*(phi1-phi2))> | |
10084 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10085 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10086 | } // end of if(nPrim>=2) | |
10087 | ||
10088 | // 3-particle correlations: | |
10089 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
10090 | { | |
10091 | for(Int_t i1=0;i1<nPrim;i1++) | |
10092 | { | |
10093 | aftsTrack=anEvent->GetTrack(i1); | |
10094 | if(!(aftsTrack->InRPSelection())) continue; | |
10095 | phi1=aftsTrack->Phi(); | |
10096 | for(Int_t i2=0;i2<nPrim;i2++) | |
10097 | { | |
10098 | if(i2==i1)continue; | |
10099 | aftsTrack=anEvent->GetTrack(i2); | |
10100 | if(!(aftsTrack->InRPSelection())) continue; | |
10101 | phi2=aftsTrack->Phi(); | |
10102 | for(Int_t i3=0;i3<nPrim;i3++) | |
10103 | { | |
10104 | if(i3==i1||i3==i2)continue; | |
10105 | aftsTrack=anEvent->GetTrack(i3); | |
10106 | if(!(aftsTrack->InRPSelection())) continue; | |
10107 | phi3=aftsTrack->Phi(); | |
10108 | if(nPrim==3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; | |
10109 | // fill the profile with 3-p correlations: | |
10110 | fIntFlowDirectCorrelations->Fill(5.,cos(2.*n*phi1-n*(phi2+phi3)),1.); //<3>_{2n|nn,n} | |
10111 | fIntFlowDirectCorrelations->Fill(6.,cos(3.*n*phi1-2.*n*phi2-n*phi3),1.); //<3>_{3n|2n,n} | |
10112 | fIntFlowDirectCorrelations->Fill(7.,cos(4.*n*phi1-2.*n*phi2-2.*n*phi3),1.); //<3>_{4n|2n,2n} | |
10113 | fIntFlowDirectCorrelations->Fill(8.,cos(4.*n*phi1-3.*n*phi2-n*phi3),1.); //<3>_{4n|3n,n} | |
10114 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10115 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10116 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10117 | } // end of if(nPrim>=3) | |
10118 | ||
10119 | // 4-particle correlations: | |
10120 | if(nPrim>=4 && nPrim<=fMaxAllowedMultiplicity) | |
10121 | { | |
10122 | for(Int_t i1=0;i1<nPrim;i1++) | |
10123 | { | |
10124 | aftsTrack=anEvent->GetTrack(i1); | |
10125 | if(!(aftsTrack->InRPSelection())) continue; | |
10126 | phi1=aftsTrack->Phi(); | |
10127 | for(Int_t i2=0;i2<nPrim;i2++) | |
10128 | { | |
10129 | if(i2==i1)continue; | |
10130 | aftsTrack=anEvent->GetTrack(i2); | |
10131 | if(!(aftsTrack->InRPSelection())) continue; | |
10132 | phi2=aftsTrack->Phi(); | |
10133 | for(Int_t i3=0;i3<nPrim;i3++) | |
10134 | { | |
10135 | if(i3==i1||i3==i2)continue; | |
10136 | aftsTrack=anEvent->GetTrack(i3); | |
10137 | if(!(aftsTrack->InRPSelection())) continue; | |
10138 | phi3=aftsTrack->Phi(); | |
10139 | for(Int_t i4=0;i4<nPrim;i4++) | |
10140 | { | |
10141 | if(i4==i1||i4==i2||i4==i3)continue; | |
10142 | aftsTrack=anEvent->GetTrack(i4); | |
10143 | if(!(aftsTrack->InRPSelection())) continue; | |
10144 | phi4=aftsTrack->Phi(); | |
10145 | if(nPrim==4) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<"\r"<<flush; | |
10146 | // fill the profile with 4-p correlations: | |
10147 | fIntFlowDirectCorrelations->Fill(10.,cos(n*phi1+n*phi2-n*phi3-n*phi4),1.); // <4>_{n,n|n,n} | |
10148 | fIntFlowDirectCorrelations->Fill(11.,cos(2.*n*phi1+n*phi2-2.*n*phi3-n*phi4),1.); // <4>_{2n,n|2n,n} | |
10149 | fIntFlowDirectCorrelations->Fill(12.,cos(2.*n*phi1+2*n*phi2-2.*n*phi3-2.*n*phi4),1.); // <4>_{2n,2n|2n,2n} | |
10150 | fIntFlowDirectCorrelations->Fill(13.,cos(3.*n*phi1-n*phi2-n*phi3-n*phi4),1.); // <4>_{3n|n,n,n} | |
10151 | fIntFlowDirectCorrelations->Fill(14.,cos(3.*n*phi1+n*phi2-3.*n*phi3-n*phi4),1.); // <4>_{3n,n|3n,n} | |
10152 | fIntFlowDirectCorrelations->Fill(15.,cos(3.*n*phi1+n*phi2-2.*n*phi3-2.*n*phi4),1.); // <4>_{3n,n|2n,2n} | |
10153 | fIntFlowDirectCorrelations->Fill(16.,cos(4.*n*phi1-2.*n*phi2-n*phi3-n*phi4),1.); // <4>_{4n|2n,n,n} | |
10154 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10155 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10156 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10157 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10158 | } // end of if(nPrim>=) | |
10159 | ||
10160 | // 5-particle correlations: | |
10161 | if(nPrim>=5 && nPrim<=fMaxAllowedMultiplicity) | |
10162 | { | |
10163 | for(Int_t i1=0;i1<nPrim;i1++) | |
10164 | { | |
10165 | aftsTrack=anEvent->GetTrack(i1); | |
10166 | if(!(aftsTrack->InRPSelection())) continue; | |
10167 | phi1=aftsTrack->Phi(); | |
10168 | for(Int_t i2=0;i2<nPrim;i2++) | |
10169 | { | |
10170 | if(i2==i1)continue; | |
10171 | aftsTrack=anEvent->GetTrack(i2); | |
10172 | if(!(aftsTrack->InRPSelection())) continue; | |
10173 | phi2=aftsTrack->Phi(); | |
10174 | for(Int_t i3=0;i3<nPrim;i3++) | |
10175 | { | |
10176 | if(i3==i1||i3==i2)continue; | |
10177 | aftsTrack=anEvent->GetTrack(i3); | |
10178 | if(!(aftsTrack->InRPSelection())) continue; | |
10179 | phi3=aftsTrack->Phi(); | |
10180 | for(Int_t i4=0;i4<nPrim;i4++) | |
10181 | { | |
10182 | if(i4==i1||i4==i2||i4==i3)continue; | |
10183 | aftsTrack=anEvent->GetTrack(i4); | |
10184 | if(!(aftsTrack->InRPSelection())) continue; | |
10185 | phi4=aftsTrack->Phi(); | |
10186 | for(Int_t i5=0;i5<nPrim;i5++) | |
10187 | { | |
10188 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
10189 | aftsTrack=anEvent->GetTrack(i5); | |
10190 | if(!(aftsTrack->InRPSelection())) continue; | |
10191 | phi5=aftsTrack->Phi(); | |
10192 | if(nPrim==5) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<"\r"<<flush; | |
10193 | // fill the profile with 5-p correlations: | |
10194 | fIntFlowDirectCorrelations->Fill(18.,cos(2.*n*phi1+n*phi2-n*phi3-n*phi4-n*phi5),1.); //<5>_{2n,n|n,n,n} | |
10195 | fIntFlowDirectCorrelations->Fill(19.,cos(2.*n*phi1+2.*n*phi2-2.*n*phi3-n*phi4-n*phi5),1.); //<5>_{2n,2n|2n,n,n} | |
10196 | fIntFlowDirectCorrelations->Fill(20.,cos(3.*n*phi1+n*phi2-2.*n*phi3-n*phi4-n*phi5),1.); //<5>_{3n,n|2n,n,n} | |
10197 | fIntFlowDirectCorrelations->Fill(21.,cos(4.*n*phi1-n*phi2-n*phi3-n*phi4-n*phi5),1.); //<5>_{4n|n,n,n,n} | |
10198 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
10199 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10200 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10201 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10202 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10203 | } // end of if(nPrim>=5) | |
10204 | ||
10205 | // 6-particle correlations: | |
10206 | if(nPrim>=6 && nPrim<=fMaxAllowedMultiplicity) | |
10207 | { | |
10208 | for(Int_t i1=0;i1<nPrim;i1++) | |
10209 | { | |
10210 | aftsTrack=anEvent->GetTrack(i1); | |
10211 | if(!(aftsTrack->InRPSelection())) continue; | |
10212 | phi1=aftsTrack->Phi(); | |
10213 | for(Int_t i2=0;i2<nPrim;i2++) | |
10214 | { | |
10215 | if(i2==i1)continue; | |
10216 | aftsTrack=anEvent->GetTrack(i2); | |
10217 | if(!(aftsTrack->InRPSelection())) continue; | |
10218 | phi2=aftsTrack->Phi(); | |
10219 | for(Int_t i3=0;i3<nPrim;i3++) | |
10220 | { | |
10221 | if(i3==i1||i3==i2)continue; | |
10222 | aftsTrack=anEvent->GetTrack(i3); | |
10223 | if(!(aftsTrack->InRPSelection())) continue; | |
10224 | phi3=aftsTrack->Phi(); | |
10225 | for(Int_t i4=0;i4<nPrim;i4++) | |
10226 | { | |
10227 | if(i4==i1||i4==i2||i4==i3)continue; | |
10228 | aftsTrack=anEvent->GetTrack(i4); | |
10229 | if(!(aftsTrack->InRPSelection())) continue; | |
10230 | phi4=aftsTrack->Phi(); | |
10231 | for(Int_t i5=0;i5<nPrim;i5++) | |
10232 | { | |
10233 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
10234 | aftsTrack=anEvent->GetTrack(i5); | |
10235 | if(!(aftsTrack->InRPSelection())) continue; | |
10236 | phi5=aftsTrack->Phi(); | |
10237 | for(Int_t i6=0;i6<nPrim;i6++) | |
10238 | { | |
10239 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue; | |
10240 | aftsTrack=anEvent->GetTrack(i6); | |
10241 | if(!(aftsTrack->InRPSelection())) continue; | |
10242 | phi6=aftsTrack->Phi(); | |
10243 | if(nPrim==6) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<" "<<i6<<"\r"<<flush; | |
10244 | // fill the profile with 6-p correlations: | |
10245 | fIntFlowDirectCorrelations->Fill(23.,cos(n*phi1+n*phi2+n*phi3-n*phi4-n*phi5-n*phi6),1.); //<6>_{n,n,n|n,n,n} | |
10246 | 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} | |
10247 | 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} | |
10248 | 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} | |
10249 | } // end of for(Int_t i6=0;i6<nPrim;i6++) | |
10250 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
10251 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10252 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10253 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10254 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10255 | } // end of if(nPrim>=6) | |
10256 | ||
10257 | // 7-particle correlations: | |
10258 | if(nPrim>=7 && nPrim<=fMaxAllowedMultiplicity) | |
10259 | { | |
10260 | for(Int_t i1=0;i1<nPrim;i1++) | |
10261 | { | |
10262 | aftsTrack=anEvent->GetTrack(i1); | |
10263 | if(!(aftsTrack->InRPSelection())) continue; | |
10264 | phi1=aftsTrack->Phi(); | |
10265 | for(Int_t i2=0;i2<nPrim;i2++) | |
10266 | { | |
10267 | if(i2==i1)continue; | |
10268 | aftsTrack=anEvent->GetTrack(i2); | |
10269 | if(!(aftsTrack->InRPSelection())) continue; | |
10270 | phi2=aftsTrack->Phi(); | |
10271 | for(Int_t i3=0;i3<nPrim;i3++) | |
10272 | { | |
10273 | if(i3==i1||i3==i2)continue; | |
10274 | aftsTrack=anEvent->GetTrack(i3); | |
10275 | if(!(aftsTrack->InRPSelection())) continue; | |
10276 | phi3=aftsTrack->Phi(); | |
10277 | for(Int_t i4=0;i4<nPrim;i4++) | |
10278 | { | |
10279 | if(i4==i1||i4==i2||i4==i3)continue; | |
10280 | aftsTrack=anEvent->GetTrack(i4); | |
10281 | if(!(aftsTrack->InRPSelection())) continue; | |
10282 | phi4=aftsTrack->Phi(); | |
10283 | for(Int_t i5=0;i5<nPrim;i5++) | |
10284 | { | |
10285 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
10286 | aftsTrack=anEvent->GetTrack(i5); | |
10287 | if(!(aftsTrack->InRPSelection())) continue; | |
10288 | phi5=aftsTrack->Phi(); | |
10289 | for(Int_t i6=0;i6<nPrim;i6++) | |
10290 | { | |
10291 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue; | |
10292 | aftsTrack=anEvent->GetTrack(i6); | |
10293 | if(!(aftsTrack->InRPSelection())) continue; | |
10294 | phi6=aftsTrack->Phi(); | |
10295 | for(Int_t i7=0;i7<nPrim;i7++) | |
10296 | { | |
10297 | if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue; | |
10298 | aftsTrack=anEvent->GetTrack(i7); | |
10299 | if(!(aftsTrack->InRPSelection())) continue; | |
10300 | phi7=aftsTrack->Phi(); | |
10301 | if(nPrim==7) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<" "<<i6<<" "<<i7<<"\r"<<flush; | |
10302 | // fill the profile with 7-p correlation: | |
10303 | 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} | |
10304 | } // end of for(Int_t i7=0;i7<nPrim;i7++) | |
10305 | } // end of for(Int_t i6=0;i6<nPrim;i6++) | |
10306 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
10307 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10308 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10309 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10310 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10311 | } // end of if(nPrim>=7) | |
10312 | ||
10313 | // 8-particle correlations: | |
10314 | if(nPrim>=8 && nPrim<=fMaxAllowedMultiplicity) | |
10315 | { | |
10316 | for(Int_t i1=0;i1<nPrim;i1++) | |
10317 | { | |
10318 | aftsTrack=anEvent->GetTrack(i1); | |
10319 | if(!(aftsTrack->InRPSelection())) continue; | |
10320 | phi1=aftsTrack->Phi(); | |
10321 | for(Int_t i2=0;i2<nPrim;i2++) | |
10322 | { | |
10323 | if(i2==i1)continue; | |
10324 | aftsTrack=anEvent->GetTrack(i2); | |
10325 | if(!(aftsTrack->InRPSelection())) continue; | |
10326 | phi2=aftsTrack->Phi(); | |
10327 | for(Int_t i3=0;i3<nPrim;i3++) | |
10328 | { | |
10329 | if(i3==i1||i3==i2)continue; | |
10330 | aftsTrack=anEvent->GetTrack(i3); | |
10331 | if(!(aftsTrack->InRPSelection())) continue; | |
10332 | phi3=aftsTrack->Phi(); | |
10333 | for(Int_t i4=0;i4<nPrim;i4++) | |
10334 | { | |
10335 | if(i4==i1||i4==i2||i4==i3)continue; | |
10336 | aftsTrack=anEvent->GetTrack(i4); | |
10337 | if(!(aftsTrack->InRPSelection())) continue; | |
10338 | phi4=aftsTrack->Phi(); | |
10339 | for(Int_t i5=0;i5<nPrim;i5++) | |
10340 | { | |
10341 | if(i5==i1||i5==i2||i5==i3||i5==i4)continue; | |
10342 | aftsTrack=anEvent->GetTrack(i5); | |
10343 | if(!(aftsTrack->InRPSelection())) continue; | |
10344 | phi5=aftsTrack->Phi(); | |
10345 | for(Int_t i6=0;i6<nPrim;i6++) | |
10346 | { | |
10347 | if(i6==i1||i6==i2||i6==i3||i6==i4||i6==i5)continue; | |
10348 | aftsTrack=anEvent->GetTrack(i6); | |
10349 | if(!(aftsTrack->InRPSelection())) continue; | |
10350 | phi6=aftsTrack->Phi(); | |
10351 | for(Int_t i7=0;i7<nPrim;i7++) | |
10352 | { | |
10353 | if(i7==i1||i7==i2||i7==i3||i7==i4||i7==i5||i7==i6)continue; | |
10354 | aftsTrack=anEvent->GetTrack(i7); | |
10355 | if(!(aftsTrack->InRPSelection())) continue; | |
10356 | phi7=aftsTrack->Phi(); | |
10357 | for(Int_t i8=0;i8<nPrim;i8++) | |
10358 | { | |
10359 | if(i8==i1||i8==i2||i8==i3||i8==i4||i8==i5||i8==i6||i8==i7)continue; | |
10360 | aftsTrack=anEvent->GetTrack(i8); | |
10361 | if(!(aftsTrack->InRPSelection())) continue; | |
10362 | phi8=aftsTrack->Phi(); | |
10363 | cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<" "<<i5<<" "<<i6<<" "<<i7<<" "<<i8<<"\r"<<flush; | |
10364 | // fill the profile with 8-p correlation: | |
10365 | 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} | |
10366 | } // end of for(Int_t i8=0;i8<nPrim;i8++) | |
10367 | } // end of for(Int_t i7=0;i7<nPrim;i7++) | |
10368 | } // end of for(Int_t i6=0;i6<nPrim;i6++) | |
10369 | } // end of for(Int_t i5=0;i5<nPrim;i5++) | |
10370 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10371 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10372 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10373 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10374 | } // end of if(nPrim>=8) | |
10375 | ||
10376 | cout<<endl; | |
10377 | ||
10378 | } // end of AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoops(AliFlowEventSimple* anEvent) | |
10379 | ||
10380 | ||
10381 | //================================================================================================================================== | |
10382 | ||
10383 | ||
10384 | void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrelations() | |
10385 | { | |
10386 | // Cross-check results for multiparticle correlations needed for int. flow: results from Q-vectors vs results from nested loops. | |
10387 | ||
10388 | cout<<endl; | |
10389 | cout<<endl; | |
10390 | cout<<" *****************************************"<<endl; | |
10391 | cout<<" **** cross-checking the correlations ****"<<endl; | |
10392 | cout<<" **** for integrated flow ****"<<endl; | |
10393 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
10394 | { | |
10395 | cout<<" **** (particle weights not used) ****"<<endl; | |
10396 | } else | |
10397 | { | |
10398 | cout<<" **** (particle weights used) ****"<<endl; | |
10399 | } | |
10400 | cout<<" *****************************************"<<endl; | |
10401 | cout<<endl; | |
10402 | cout<<endl; | |
10403 | ||
10404 | Int_t ciMax = 32; // to be improved (removed eventually when I calculate 6th and 8th order with particle weights) | |
10405 | ||
10406 | if(fUsePhiWeights||fUsePtWeights||fUseEtaWeights) | |
10407 | { | |
10408 | ciMax = 11; | |
10409 | } | |
10410 | ||
10411 | for(Int_t ci=1;ci<=ciMax;ci++) | |
10412 | { | |
10413 | if(strcmp((fIntFlowCorrelationsAllPro->GetXaxis())->GetBinLabel(ci), "") == 0) continue; // to be improved (access finalized histogram here) | |
10414 | cout<<(fIntFlowCorrelationsAllPro->GetXaxis())->GetBinLabel(ci)<<":"<<endl; // to be improved (access finalized histogram here) | |
10415 | cout<<"from Q-vectors = "<<fIntFlowCorrelationsAllPro->GetBinContent(ci)<<endl; // to be improved (access finalized histogram here) | |
10416 | cout<<"from nested loops = "<<fIntFlowDirectCorrelations->GetBinContent(ci)<<endl; | |
10417 | cout<<endl; | |
10418 | } | |
10419 | ||
10420 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrelations() | |
10421 | ||
10422 | ||
10423 | //================================================================================================================================ | |
10424 | ||
10425 | ||
10426 | void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrectionTermsForNUA() | |
10427 | { | |
10428 | // Cross-check results for corrections terms for non-uniform acceptance needed for int. flow: results from Q-vectors vs results from nested loops. | |
10429 | ||
10430 | cout<<endl; | |
10431 | cout<<endl; | |
10432 | cout<<" *********************************************"<<endl; | |
10433 | cout<<" **** cross-checking the correction terms ****"<<endl; | |
10434 | cout<<" **** for non-uniform acceptance relevant ****"<<endl; | |
10435 | cout<<" **** for integrated flow ****"<<endl; | |
10436 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
10437 | { | |
10438 | cout<<" **** (particle weights not used) ****"<<endl; | |
10439 | } else | |
10440 | { | |
10441 | cout<<" **** (particle weights used) ****"<<endl; | |
10442 | } | |
10443 | cout<<" *********************************************"<<endl; | |
10444 | cout<<endl; | |
10445 | cout<<endl; | |
10446 | ||
b92ea2b9 | 10447 | for(Int_t ci=1;ci<=4;ci++) // correction term index (to be improved - hardwired 4) |
489d5531 | 10448 | { |
10449 | for(Int_t sc=0;sc<2;sc++) // sin or cos term | |
10450 | { | |
10451 | if(strcmp((fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->GetBinLabel(ci), "") == 0) continue; // to be improved (access finalized histogram here) | |
10452 | cout<<(fIntFlowCorrectionTermsForNUAPro[sc]->GetXaxis())->GetBinLabel(ci)<<":"<<endl; // to be improved (access finalized histogram here) | |
10453 | cout<<"from Q-vectors = "<<fIntFlowCorrectionTermsForNUAPro[sc]->GetBinContent(ci)<<endl; // to be improved (access finalized histogram here) | |
10454 | cout<<"from nested loops = "<<fIntFlowDirectCorrectionTermsForNUA[sc]->GetBinContent(ci)<<endl; | |
10455 | cout<<endl; | |
10456 | } // end of for(Int_t sc=0;sc<2;sc++) // sin or cos term | |
10457 | } // end of for(Int_t ci=1;ci<=10;ci++) // correction term index | |
10458 | ||
10459 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowCorrectionTermsForNUA() | |
10460 | ||
10461 | ||
10462 | //================================================================================================================================ | |
10463 | ||
10464 | ||
0328db2d | 10465 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple * const anEvent) |
489d5531 | 10466 | { |
10467 | // Evaluate with nested loops multiparticle correlations for integrated flow (using the particle weights). | |
10468 | ||
10469 | // Results are stored in profile fIntFlowDirectCorrelations. | |
10470 | // Remark 1: When particle weights are used the binning of fIntFlowDirectCorrelations is organized as follows: | |
10471 | // | |
10472 | // 1st bin: <2>_{1n|1n} = two1n1nW1W1 = <w1 w2 cos(n*(phi1-phi2))> | |
10473 | // 2nd bin: <2>_{2n|2n} = two2n2nW2W2 = <w1^2 w2^2 cos(2n*(phi1-phi2))> | |
10474 | // 3rd bin: <2>_{3n|3n} = two3n3nW3W3 = <w1^3 w2^3 cos(3n*(phi1-phi2))> | |
10475 | // 4th bin: <2>_{4n|4n} = two4n4nW4W4 = <w1^4 w2^4 cos(4n*(phi1-phi2))> | |
10476 | // 5th bin: ---- EMPTY ---- | |
10477 | // 6th bin: <3>_{2n|1n,1n} = three2n1n1nW2W1W1 = <w1^2 w2 w3 cos(n*(2phi1-phi2-phi3))> | |
10478 | // 7th bin: <3>_{3n|2n,1n} = ... | |
10479 | // 8th bin: <3>_{4n|2n,2n} = ... | |
10480 | // 9th bin: <3>_{4n|3n,1n} = ... | |
10481 | // 10th bin: ---- EMPTY ---- | |
10482 | // 11th bin: <4>_{1n,1n|1n,1n} = four1n1n1n1nW1W1W1W1 = <w1 w2 w3 w4 cos(n*(phi1+phi2-phi3-phi4))> | |
10483 | // 12th bin: <4>_{2n,1n|2n,1n} = ... | |
10484 | // 13th bin: <4>_{2n,2n|2n,2n} = ... | |
10485 | // 14th bin: <4>_{3n|1n,1n,1n} = ... | |
10486 | // 15th bin: <4>_{3n,1n|3n,1n} = ... | |
10487 | // 16th bin: <4>_{3n,1n|2n,2n} = ... | |
10488 | // 17th bin: <4>_{4n|2n,1n,1n} = ... | |
10489 | // 18th bin: ---- EMPTY ---- | |
10490 | // 19th bin: <5>_{2n|1n,1n,1n,1n} = ... | |
10491 | // 20th bin: <5>_{2n,2n|2n,1n,1n} = ... | |
10492 | // 21st bin: <5>_{3n,1n|2n,1n,1n} = ... | |
10493 | // 22nd bin: <5>_{4n|1n,1n,1n,1n} = ... | |
10494 | // 23rd bin: ---- EMPTY ---- | |
10495 | // 24th bin: <6>_{1n,1n,1n|1n,1n,1n} = ... | |
10496 | // 25th bin: <6>_{2n,1n,1n|2n,1n,1n} = ... | |
10497 | // 26th bin: <6>_{2n,2n|1n,1n,1n,1n} = ... | |
10498 | // 27th bin: <6>_{3n,1n|1n,1n,1n,1n} = ... | |
10499 | // 28th bin: ---- EMPTY ---- | |
10500 | // 29th bin: <7>_{2n,1n,1n|1n,1n,1n,1n} = ... | |
10501 | // 30th bin: ---- EMPTY ---- | |
10502 | // 31st bin: <8>_{1n,1n,1n,1n|1n,1n,1n,1n} = ... | |
57340a27 | 10503 | |
489d5531 | 10504 | // Remark 2: When particle weights are used there are some extra correlations. They are stored in |
10505 | // fIntFlowExtraDirectCorrelations binning of which is organized as follows: | |
57340a27 | 10506 | |
489d5531 | 10507 | // 1st bin: two1n1nW3W1 = <w1^3 w2 cos(n*(phi1-phi2))> |
10508 | // 2nd bin: two1n1nW1W1W2 = <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
10509 | // ... | |
57340a27 | 10510 | |
489d5531 | 10511 | Int_t nPrim = anEvent->NumberOfTracks(); |
10512 | AliFlowTrackSimple *aftsTrack = NULL; | |
10513 | //Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.; | |
10514 | //Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1., wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.; | |
10515 | Double_t phi1=0., phi2=0., phi3=0., phi4=0.; | |
10516 | Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1.; | |
10517 | Int_t n = fHarmonic; | |
10518 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
10519 | Double_t dMult = (*fSMpk)(0,0); | |
10520 | cout<<endl; | |
10521 | cout<<"Multiparticle correlations: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
10522 | if(dMult<2) | |
10523 | { | |
10524 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; | |
10525 | } else if (dMult>fMaxAllowedMultiplicity) | |
10526 | { | |
10527 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; | |
10528 | } else | |
10529 | { | |
10530 | cout<<"... evaluating nested loops (using particle weights) ..."<<endl; | |
10531 | } | |
10532 | ||
10533 | // 2-particle correlations: | |
10534 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
10535 | { | |
10536 | // 2 nested loops multiparticle correlations using particle weights: | |
10537 | for(Int_t i1=0;i1<nPrim;i1++) | |
10538 | { | |
10539 | aftsTrack=anEvent->GetTrack(i1); | |
10540 | if(!(aftsTrack->InRPSelection())) continue; | |
10541 | phi1=aftsTrack->Phi(); | |
10542 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
10543 | for(Int_t i2=0;i2<nPrim;i2++) | |
10544 | { | |
10545 | if(i2==i1)continue; | |
10546 | aftsTrack=anEvent->GetTrack(i2); | |
10547 | if(!(aftsTrack->InRPSelection())) continue; | |
10548 | phi2=aftsTrack->Phi(); | |
10549 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
10550 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
10551 | // 2-p correlations using particle weights: | |
10552 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),wPhi1*wPhi2); // <w1 w2 cos( n*(phi1-phi2))> | |
10553 | 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))> | |
10554 | 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))> | |
10555 | 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))> | |
10556 | // extra correlations: | |
10557 | // 2-p extra correlations (do not appear if particle weights are not used): | |
10558 | if(fUsePhiWeights) fIntFlowExtraDirectCorrelations->Fill(0.5,cos(n*(phi1-phi2)),pow(wPhi1,3)*wPhi2); // <w1^3 w2 cos(n*(phi1-phi2))> | |
10559 | // ... | |
10560 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10561 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10562 | } // end of if(nPrim>=2) | |
10563 | ||
10564 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
57340a27 | 10565 | { |
489d5531 | 10566 | // 3 nested loops multiparticle correlations using particle weights: |
10567 | for(Int_t i1=0;i1<nPrim;i1++) | |
57340a27 | 10568 | { |
489d5531 | 10569 | aftsTrack=anEvent->GetTrack(i1); |
10570 | if(!(aftsTrack->InRPSelection())) continue; | |
10571 | phi1=aftsTrack->Phi(); | |
10572 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
10573 | for(Int_t i2=0;i2<nPrim;i2++) | |
10574 | { | |
10575 | if(i2==i1)continue; | |
10576 | aftsTrack=anEvent->GetTrack(i2); | |
10577 | if(!(aftsTrack->InRPSelection())) continue; | |
10578 | phi2=aftsTrack->Phi(); | |
10579 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
10580 | for(Int_t i3=0;i3<nPrim;i3++) | |
10581 | { | |
10582 | if(i3==i1||i3==i2)continue; | |
10583 | aftsTrack=anEvent->GetTrack(i3); | |
10584 | if(!(aftsTrack->InRPSelection())) continue; | |
10585 | phi3=aftsTrack->Phi(); | |
10586 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
10587 | if(nPrim==3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; | |
10588 | // 3-p correlations using particle weights: | |
10589 | 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))> | |
10590 | // ... | |
10591 | // extra correlations: | |
10592 | // 2-p extra correlations (do not appear if particle weights are not used): | |
10593 | if(fUsePhiWeights) fIntFlowExtraDirectCorrelations->Fill(1.5,cos(n*(phi1-phi2)),wPhi1*wPhi2*pow(wPhi3,2)); // <w1 w2 w3^2 cos(n*(phi1-phi2))> | |
10594 | // ... | |
10595 | // 3-p extra correlations (do not appear if particle weights are not used): | |
10596 | // ... | |
10597 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10598 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10599 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10600 | } // end of if(nPrim>=3) | |
57340a27 | 10601 | |
489d5531 | 10602 | if(nPrim>=4 && nPrim<=fMaxAllowedMultiplicity) |
10603 | { | |
10604 | // 4 nested loops multiparticle correlations using particle weights: | |
10605 | for(Int_t i1=0;i1<nPrim;i1++) | |
10606 | { | |
10607 | aftsTrack=anEvent->GetTrack(i1); | |
10608 | if(!(aftsTrack->InRPSelection())) continue; | |
10609 | phi1=aftsTrack->Phi(); | |
10610 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
10611 | for(Int_t i2=0;i2<nPrim;i2++) | |
10612 | { | |
10613 | if(i2==i1)continue; | |
10614 | aftsTrack=anEvent->GetTrack(i2); | |
10615 | if(!(aftsTrack->InRPSelection())) continue; | |
10616 | phi2=aftsTrack->Phi(); | |
10617 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
10618 | for(Int_t i3=0;i3<nPrim;i3++) | |
10619 | { | |
10620 | if(i3==i1||i3==i2)continue; | |
10621 | aftsTrack=anEvent->GetTrack(i3); | |
10622 | if(!(aftsTrack->InRPSelection())) continue; | |
10623 | phi3=aftsTrack->Phi(); | |
10624 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
10625 | for(Int_t i4=0;i4<nPrim;i4++) | |
10626 | { | |
10627 | if(i4==i1||i4==i2||i4==i3)continue; | |
10628 | aftsTrack=anEvent->GetTrack(i4); | |
10629 | if(!(aftsTrack->InRPSelection())) continue; | |
10630 | phi4=aftsTrack->Phi(); | |
10631 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi()))); | |
10632 | if(nPrim>=4) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<"\r"<<flush; // to be improved (replace eventually this if statement with if(nPrim==4)) | |
10633 | // 4-p correlations using particle weights: | |
10634 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(10.5,cos(n*phi1+n*phi2-n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); | |
10635 | // extra correlations: | |
10636 | // 2-p extra correlations (do not appear if particle weights are not used): | |
10637 | // ... | |
10638 | // 3-p extra correlations (do not appear if particle weights are not used): | |
10639 | // ... | |
10640 | // 4-p extra correlations (do not appear if particle weights are not used): | |
10641 | // ... | |
10642 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
10643 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10644 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10645 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10646 | } // end of if(nPrim>=4) | |
57340a27 | 10647 | |
489d5531 | 10648 | cout<<endl; |
57340a27 | 10649 | |
489d5531 | 10650 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent) |
57340a27 | 10651 | |
489d5531 | 10652 | |
10653 | //================================================================================================================================ | |
10654 | ||
10655 | ||
10656 | void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowExtraCorrelations() | |
57340a27 | 10657 | { |
489d5531 | 10658 | // Cross-check results for extra multiparticle correlations needed for int. flow |
10659 | // which appear only when particle weights are used: results from Q-vectors vs results from nested loops. | |
57340a27 | 10660 | |
489d5531 | 10661 | cout<<endl; |
10662 | cout<<endl; | |
10663 | cout<<" ***********************************************"<<endl; | |
10664 | cout<<" **** cross-checking the extra correlations ****"<<endl; | |
10665 | cout<<" **** for integrated flow ****"<<endl; | |
10666 | cout<<" ***********************************************"<<endl; | |
10667 | cout<<endl; | |
10668 | cout<<endl; | |
10669 | ||
10670 | for(Int_t eci=1;eci<=2;eci++) // to be improved (increased eciMax eventually when I calculate 6th and 8th) | |
57340a27 | 10671 | { |
489d5531 | 10672 | if(strcmp((fIntFlowExtraCorrelationsPro->GetXaxis())->GetBinLabel(eci), "") == 0) continue; |
10673 | cout<<(fIntFlowExtraCorrelationsPro->GetXaxis())->GetBinLabel(eci)<<":"<<endl; | |
10674 | cout<<"from Q-vectors = "<<fIntFlowExtraCorrelationsPro->GetBinContent(eci)<<endl; | |
10675 | cout<<"from nested loops = "<<fIntFlowExtraDirectCorrelations->GetBinContent(eci)<<endl; | |
10676 | cout<<endl; | |
10677 | } | |
57340a27 | 10678 | |
489d5531 | 10679 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckIntFlowExtraCorrelations() |
57340a27 | 10680 | |
10681 | ||
489d5531 | 10682 | //================================================================================================================================ |
3b552efe | 10683 | |
10684 | ||
0328db2d | 10685 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrectionsForNUAWithNestedLoops(AliFlowEventSimple * const anEvent) |
489d5531 | 10686 | { |
10687 | // Evaluate with nested loops correction terms for non-uniform acceptance relevant for NONAME integrated flow (to be improved (name)). | |
10688 | // | |
10689 | // Remark: Both sin and cos correction terms are calculated in this method. Sin terms are stored in fIntFlowDirectCorrectionTermsForNUA[0], | |
10690 | // and cos terms in fIntFlowDirectCorrectionTermsForNUA[1]. Binning of fIntFlowDirectCorrectionTermsForNUA[sc] is organized as follows | |
10691 | // (sc stands for either sin or cos): | |
10692 | ||
10693 | // 1st bin: <<sc(n*(phi1))>> | |
10694 | // 2nd bin: <<sc(n*(phi1+phi2))>> | |
10695 | // 3rd bin: <<sc(n*(phi1-phi2-phi3))>> | |
10696 | // 4th bin: <<sc(n*(2phi1-phi2))>> | |
10697 | ||
10698 | Int_t nPrim = anEvent->NumberOfTracks(); | |
10699 | AliFlowTrackSimple *aftsTrack = NULL; | |
10700 | Double_t phi1=0., phi2=0., phi3=0.; | |
10701 | Int_t n = fHarmonic; | |
10702 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
10703 | Double_t dMult = (*fSMpk)(0,0); | |
10704 | cout<<endl; | |
10705 | cout<<"Correction terms for non-uniform acceptance: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
10706 | if(dMult<1) | |
3b552efe | 10707 | { |
489d5531 | 10708 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; |
10709 | } else if (dMult>fMaxAllowedMultiplicity) | |
3b552efe | 10710 | { |
489d5531 | 10711 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; |
10712 | } else | |
10713 | { | |
10714 | cout<<"... evaluating nested loops (without using particle weights)..."<<endl; | |
10715 | } | |
10716 | ||
10717 | if(nPrim>=1 && nPrim<=fMaxAllowedMultiplicity) | |
10718 | { | |
10719 | // 1-particle correction terms for non-uniform acceptance: | |
10720 | for(Int_t i1=0;i1<nPrim;i1++) | |
10721 | { | |
10722 | aftsTrack=anEvent->GetTrack(i1); | |
10723 | if(!(aftsTrack->InRPSelection())) continue; | |
10724 | phi1=aftsTrack->Phi(); | |
10725 | if(nPrim==1) cout<<i1<<"\r"<<flush; | |
10726 | // sin terms: | |
10727 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(0.5,sin(n*phi1),1.); // <sin(n*phi1)> | |
10728 | // cos terms: | |
10729 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(0.5,cos(n*phi1),1.); // <cos(n*phi1)> | |
10730 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10731 | } // end of if(nPrim>=1) | |
10732 | ||
10733 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
10734 | { | |
10735 | // 2-particle correction terms for non-uniform acceptance: | |
10736 | for(Int_t i1=0;i1<nPrim;i1++) | |
10737 | { | |
10738 | aftsTrack=anEvent->GetTrack(i1); | |
10739 | if(!(aftsTrack->InRPSelection())) continue; | |
10740 | phi1=aftsTrack->Phi(); | |
10741 | for(Int_t i2=0;i2<nPrim;i2++) | |
3b552efe | 10742 | { |
489d5531 | 10743 | if(i2==i1)continue; |
10744 | aftsTrack=anEvent->GetTrack(i2); | |
10745 | if(!(aftsTrack->InRPSelection())) continue; | |
10746 | phi2=aftsTrack->Phi(); | |
10747 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
10748 | // sin terms: | |
3b552efe | 10749 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(1.5,sin(n*(phi1+phi2)),1.); // <<sin(n*(phi1+phi2))>> |
489d5531 | 10750 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(3.5,sin(n*(2*phi1-phi2)),1.); // <<sin(n*(2*phi1-phi2))>> |
10751 | // cos terms: | |
3b552efe | 10752 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(1.5,cos(n*(phi1+phi2)),1.); // <<cos(n*(phi1+phi2))>> |
489d5531 | 10753 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(3.5,cos(n*(2*phi1-phi2)),1.); // <<cos(n*(2*phi1-phi2))>> |
10754 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10755 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10756 | } // end of if(nPrim>=2) | |
10757 | ||
10758 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
10759 | { | |
10760 | // 3-particle correction terms for non-uniform acceptance: | |
10761 | for(Int_t i1=0;i1<nPrim;i1++) | |
10762 | { | |
10763 | aftsTrack=anEvent->GetTrack(i1); | |
10764 | if(!(aftsTrack->InRPSelection())) continue; | |
10765 | phi1=aftsTrack->Phi(); | |
10766 | for(Int_t i2=0;i2<nPrim;i2++) | |
10767 | { | |
10768 | if(i2==i1)continue; | |
10769 | aftsTrack=anEvent->GetTrack(i2); | |
10770 | if(!(aftsTrack->InRPSelection())) continue; | |
10771 | phi2=aftsTrack->Phi(); | |
10772 | for(Int_t i3=0;i3<nPrim;i3++) | |
10773 | { | |
10774 | if(i3==i1||i3==i2)continue; | |
10775 | aftsTrack=anEvent->GetTrack(i3); | |
10776 | if(!(aftsTrack->InRPSelection())) continue; | |
10777 | phi3=aftsTrack->Phi(); | |
10778 | if(nPrim>=3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; // to be improved (eventually I will change this if statement) | |
10779 | // sin terms: | |
10780 | fIntFlowDirectCorrectionTermsForNUA[0]->Fill(2.5,sin(n*(phi1-phi2-phi3)),1.); // <<sin(n*(phi1-phi2-phi3))>> | |
10781 | // cos terms: | |
10782 | fIntFlowDirectCorrectionTermsForNUA[1]->Fill(2.5,cos(n*(phi1-phi2-phi3)),1.); // <<cos(n*(phi1-phi2-phi3))>> | |
10783 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
10784 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
10785 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
10786 | } // end of if(nPrim>=3) | |
10787 | ||
10788 | cout<<endl; | |
10789 | } | |
10790 | //================================================================================================================================ | |
0328db2d | 10791 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoops(AliFlowEventSimple * const anEvent, TString type, TString ptOrEta) |
489d5531 | 10792 | { |
10793 | // Evaluate reduced correlations with nested loops without using the particle weights. | |
10794 | ||
10795 | // Remark 1: Reduced correlations are evaluated in pt bin number fCrossCheckInPtBinNo and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
10796 | // Remark 2: Results are stored in 1 bin profiles fDiffFlowDirectCorrelations[t][pe][ci], where indices runs as follows: | |
10797 | // [0=RP,1=POI][0=Pt,1=Eta][0=<2'>,1=<4'>,2=<6'>,3=<8'>] | |
10798 | // Remark 3: <2'> = <cos(n*(psi1-phi2))> | |
10799 | // <4'> = <cos(n*(psi1+phi2-phi3-phi4))> | |
10800 | // ... | |
10801 | ||
10802 | Int_t typeFlag = -1; | |
10803 | Int_t ptEtaFlag = -1; | |
10804 | if(type == "RP") | |
10805 | { | |
10806 | typeFlag = 0; | |
10807 | } else if(type == "POI") | |
10808 | { | |
10809 | typeFlag = 1; | |
10810 | } | |
10811 | if(ptOrEta == "Pt") | |
10812 | { | |
10813 | ptEtaFlag = 0; | |
10814 | } else if(ptOrEta == "Eta") | |
10815 | { | |
10816 | ptEtaFlag = 1; | |
10817 | } | |
10818 | // shortcuts: | |
10819 | Int_t t = typeFlag; | |
10820 | Int_t pe = ptEtaFlag; | |
10821 | ||
10822 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
10823 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
10824 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
10825 | ||
10826 | Int_t nPrim = anEvent->NumberOfTracks(); | |
10827 | AliFlowTrackSimple *aftsTrack = NULL; | |
10828 | ||
10829 | Double_t psi1=0., phi2=0., phi3=0., phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
10830 | ||
3b552efe | 10831 | Int_t n = fHarmonic; |
489d5531 | 10832 | |
10833 | // 2'-particle correlations: | |
10834 | for(Int_t i1=0;i1<nPrim;i1++) | |
10835 | { | |
10836 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 10837 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
10838 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 10839 | { |
10840 | if(ptOrEta == "Pt") | |
10841 | { | |
10842 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10843 | } else if (ptOrEta == "Eta") | |
10844 | { | |
10845 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 10846 | } |
10847 | } else // this is diff flow of RPs | |
10848 | { | |
489d5531 | 10849 | if(ptOrEta == "Pt") |
10850 | { | |
10851 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
10852 | } else if (ptOrEta == "Eta") | |
10853 | { | |
10854 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 10855 | } |
10856 | } | |
489d5531 | 10857 | |
10858 | psi1=aftsTrack->Phi(); | |
10859 | for(Int_t i2=0;i2<nPrim;i2++) | |
10860 | { | |
10861 | if(i2==i1)continue; | |
10862 | aftsTrack=anEvent->GetTrack(i2); | |
10863 | // RP condition (!(first) particle in the correlator must be RP): | |
10864 | if(!(aftsTrack->InRPSelection()))continue; | |
10865 | phi2=aftsTrack->Phi(); | |
10866 | // 2'-particle correlations: | |
10867 | fDiffFlowDirectCorrelations[t][pe][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(1.*n*(psi1-phi2)),1.); // <cos(n*(psi1-phi2)) | |
10868 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
10869 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
10870 | ||
10871 | /* | |
10872 | ||
10873 | // 3'-particle correlations: | |
10874 | for(Int_t i1=0;i1<nPrim;i1++) | |
10875 | { | |
10876 | aftsTrack=anEvent->GetTrack(i1); | |
10877 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) | |
10878 | if(ptOrEta == "Pt") | |
10879 | { | |
10880 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10881 | } else if (ptOrEta == "Eta") | |
10882 | { | |
10883 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10884 | } | |
10885 | psi1=aftsTrack->Phi(); | |
10886 | for(Int_t i2=0;i2<nPrim;i2++) | |
10887 | { | |
10888 | if(i2==i1)continue; | |
10889 | aftsTrack=anEvent->GetTrack(i2); | |
10890 | // RP condition (!(first) particle in the correlator must be RP): | |
10891 | if(!(aftsTrack->InRPSelection())) continue; | |
10892 | phi2=aftsTrack->Phi(); | |
10893 | for(Int_t i3=0;i3<nPrim;i3++) | |
10894 | { | |
10895 | if(i3==i1||i3==i2)continue; | |
10896 | aftsTrack=anEvent->GetTrack(i3); | |
10897 | // RP condition (!(first) particle in the correlator must be RP): | |
10898 | if(!(aftsTrack->InRPSelection())) continue; | |
10899 | phi3=aftsTrack->Phi(); | |
10900 | // 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))> | |
10901 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
10902 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
10903 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
10904 | ||
10905 | */ | |
10906 | ||
10907 | // 4'-particle correlations: | |
10908 | for(Int_t i1=0;i1<nPrim;i1++) | |
10909 | { | |
10910 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 10911 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
10912 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 10913 | { |
10914 | if(ptOrEta == "Pt") | |
10915 | { | |
10916 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10917 | } else if (ptOrEta == "Eta") | |
10918 | { | |
10919 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 10920 | } |
10921 | } else // this is diff flow of RPs | |
10922 | { | |
489d5531 | 10923 | if(ptOrEta == "Pt") |
10924 | { | |
10925 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
10926 | } else if (ptOrEta == "Eta") | |
10927 | { | |
10928 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 10929 | } |
10930 | } | |
489d5531 | 10931 | |
10932 | psi1=aftsTrack->Phi(); | |
10933 | for(Int_t i2=0;i2<nPrim;i2++) | |
10934 | { | |
10935 | if(i2==i1) continue; | |
10936 | aftsTrack=anEvent->GetTrack(i2); | |
10937 | // RP condition (!(first) particle in the correlator must be RP): | |
10938 | if(!(aftsTrack->InRPSelection())) continue; | |
10939 | phi2=aftsTrack->Phi(); | |
10940 | for(Int_t i3=0;i3<nPrim;i3++) | |
10941 | { | |
10942 | if(i3==i1||i3==i2) continue; | |
10943 | aftsTrack=anEvent->GetTrack(i3); | |
10944 | // RP condition (!(first) particle in the correlator must be RP): | |
10945 | if(!(aftsTrack->InRPSelection())) continue; | |
10946 | phi3=aftsTrack->Phi(); | |
10947 | for(Int_t i4=0;i4<nPrim;i4++) | |
10948 | { | |
10949 | if(i4==i1||i4==i2||i4==i3) continue; | |
10950 | aftsTrack=anEvent->GetTrack(i4); | |
10951 | // RP condition (!(first) particle in the correlator must be RP): | |
10952 | if(!(aftsTrack->InRPSelection())) continue; | |
10953 | phi4=aftsTrack->Phi(); | |
10954 | // 4'-particle correlations: | |
10955 | fDiffFlowDirectCorrelations[t][pe][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3-phi4)),1.); // <cos(n(psi1+phi2-phi3-phi4))> | |
10956 | }//end of for(Int_t i4=0;i4<nPrim;i4++) | |
10957 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
10958 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
10959 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
10960 | ||
10961 | // count # of RPs and POIs in selected pt and eta bins for cross-checkings: | |
3b552efe | 10962 | for(Int_t i=0;i<nPrim;i++) |
10963 | { | |
10964 | aftsTrack=anEvent->GetTrack(i); | |
10965 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) | |
10966 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 10967 | { |
10968 | if(ptOrEta == "Pt") | |
10969 | { | |
10970 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
10971 | } else if (ptOrEta == "Eta") | |
10972 | { | |
10973 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 10974 | } |
10975 | } else // this is diff flow of RPs | |
10976 | { | |
489d5531 | 10977 | if(ptOrEta == "Pt") |
10978 | { | |
10979 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
10980 | } else if (ptOrEta == "Eta") | |
10981 | { | |
10982 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 10983 | } |
10984 | } | |
10985 | if(t==1)t++; | |
10986 | fNoOfParticlesInBin->Fill(t+pe+0.5); | |
489d5531 | 10987 | } |
10988 | ||
10989 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoops(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
10990 | ||
10991 | ||
10992 | //================================================================================================================================ | |
10993 | ||
10994 | ||
10995 | void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrelations(TString type, TString ptOrEta) | |
10996 | { | |
10997 | // Compare correlations needed for diff. flow calculated with nested loops and those calculated from Q-vectors | |
10998 | ||
10999 | Int_t typeFlag = -1; | |
11000 | Int_t ptEtaFlag = -1; | |
11001 | if(type == "RP") | |
11002 | { | |
11003 | typeFlag = 0; | |
11004 | } else if(type == "POI") | |
11005 | { | |
11006 | typeFlag = 1; | |
11007 | } | |
11008 | if(ptOrEta == "Pt") | |
11009 | { | |
11010 | ptEtaFlag = 0; | |
11011 | } else if(ptOrEta == "Eta") | |
11012 | { | |
11013 | ptEtaFlag = 1; | |
11014 | } | |
11015 | // shortcuts: | |
11016 | Int_t t = typeFlag; | |
11017 | Int_t pe = ptEtaFlag; | |
11018 | ||
11019 | TString rpORpoiString[2] = {"RP ","POI"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
11020 | TString ptORetaString[2] = {"pt","eta"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
11021 | TString reducedCorrelations[4] = {"<<cos(n(psi1-phi2))>>","<<cos(n(psi1+phi2-phi3-phi4))>>","",""}; // to be improved (access this from pro or hist) | |
11022 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
11023 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
11024 | ||
11025 | Int_t crossCheckInPtEtaBinNo[2] = {fCrossCheckInPtBinNo,fCrossCheckInEtaBinNo}; | |
11026 | ||
11027 | ||
11028 | cout<<endl; | |
11029 | cout<<" *****************************************"<<endl; | |
11030 | cout<<" **** cross-checking the correlations ****"<<endl; | |
11031 | cout<<" **** for differential flow ("<<rpORpoiString[t]<<") ****"<<endl; | |
11032 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
11033 | { | |
11034 | cout<<" **** (particle weights not used) ****"<<endl; | |
11035 | } else | |
11036 | { | |
11037 | cout<<" **** (particle weights used) ****"<<endl; | |
11038 | } | |
11039 | cout<<" *****************************************"<<endl; | |
11040 | cout<<endl; | |
11041 | cout<<" "<<ptORetaString[pe]<<" bin: "<<lowerPtEtaEdge[pe]<<" <= "<<ptORetaString[pe]<<" < "<<upperPtEtaEdge[pe]<<endl; | |
11042 | cout<<endl; | |
11043 | ||
11044 | for(Int_t rci=0;rci<2;rci++) // to be improved (calculate 6th and 8th order) | |
11045 | { | |
11046 | cout<<" "<<reducedCorrelations[rci].Data()<<":"<<endl; | |
11047 | cout<<" from Q-vectors = "<<fDiffFlowCorrelationsPro[t][pe][rci]->GetBinContent(crossCheckInPtEtaBinNo[pe])<<endl; | |
11048 | cout<<" from nested loops = "<<fDiffFlowDirectCorrelations[t][pe][rci]->GetBinContent(1)<<endl; | |
11049 | cout<<endl; | |
11050 | } // end of for(Int_t rci=0;rci<4;rci++) | |
11051 | ||
11052 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrelations(TString type, TString ptOrEta) | |
11053 | ||
3b552efe | 11054 | //================================================================================================================================ |
11055 | ||
489d5531 | 11056 | void AliFlowAnalysisWithQCumulants::PrintNumberOfParticlesInSelectedBin() |
3b552efe | 11057 | { |
11058 | // Print on the screen number of RPs and POIs in selected pt and eta bin for cross checkings. | |
11059 | ||
11060 | cout<<endl; | |
11061 | cout<<"Number of RPs in selected pt bin = "<<fNoOfParticlesInBin->GetBinContent(1)<<endl; | |
11062 | cout<<"Number of RPs in selected eta bin = "<<fNoOfParticlesInBin->GetBinContent(2)<<endl; | |
11063 | cout<<"Number of POIs in selected pt bin = "<<fNoOfParticlesInBin->GetBinContent(3)<<endl; | |
11064 | cout<<"Number of POIs in selected eta bin = "<<fNoOfParticlesInBin->GetBinContent(4)<<endl; | |
11065 | ||
489d5531 | 11066 | } // end of void AliFlowAnalysisWithQCumulants::PrintNumberOfParticlesInSelectedBin() |
11067 | ||
3b552efe | 11068 | //================================================================================================================================ |
11069 | ||
0328db2d | 11070 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple * const anEvent, TString type, TString ptOrEta) |
489d5531 | 11071 | { |
11072 | // Evaluate reduced correlations with nested loops without using the particle weights. | |
11073 | ||
11074 | // Remark 1: Reduced correlations are evaluated in pt bin number fCrossCheckInPtBinNo and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
11075 | // Remark 2: Results are stored in 1 bin profiles fDiffFlowDirectCorrelations[t][pe][ci], where indices runs as follows: | |
11076 | // [0=RP,1=POI][0=Pt,1=Eta][0=<2'>,1=<4'>,2=<6'>,3=<8'>] | |
11077 | // Remark 3: <2'> = <w2 cos(n*(psi1-phi2))> | |
11078 | // <4'> = <w2 w3 w4 cos(n*(psi1+phi2-phi3-phi4))> | |
11079 | // ... | |
11080 | ||
11081 | Int_t typeFlag = -1; | |
11082 | Int_t ptEtaFlag = -1; | |
11083 | if(type == "RP") | |
11084 | { | |
11085 | typeFlag = 0; | |
11086 | } else if(type == "POI") | |
11087 | { | |
11088 | typeFlag = 1; | |
11089 | } | |
11090 | if(ptOrEta == "Pt") | |
11091 | { | |
11092 | ptEtaFlag = 0; | |
11093 | } else if(ptOrEta == "Eta") | |
11094 | { | |
11095 | ptEtaFlag = 1; | |
11096 | } | |
11097 | // shortcuts: | |
11098 | Int_t t = typeFlag; | |
11099 | Int_t pe = ptEtaFlag; | |
11100 | ||
11101 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
11102 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
11103 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
11104 | ||
11105 | Int_t nPrim = anEvent->NumberOfTracks(); | |
11106 | AliFlowTrackSimple *aftsTrack = NULL; | |
11107 | ||
11108 | Double_t psi1=0., phi2=0., phi3=0., phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
11109 | Double_t wPhi2=1., wPhi3=1., wPhi4=1.;// wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.; | |
11110 | ||
11111 | Int_t n = fHarmonic; | |
11112 | ||
11113 | // 2'-particle correlations: | |
11114 | for(Int_t i1=0;i1<nPrim;i1++) | |
11115 | { | |
11116 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11117 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11118 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11119 | { |
11120 | if(ptOrEta == "Pt") | |
11121 | { | |
11122 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11123 | } else if (ptOrEta == "Eta") | |
11124 | { | |
11125 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11126 | } |
11127 | } else // this is diff flow of RPs | |
11128 | { | |
489d5531 | 11129 | if(ptOrEta == "Pt") |
11130 | { | |
11131 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11132 | } else if (ptOrEta == "Eta") | |
11133 | { | |
11134 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11135 | } |
489d5531 | 11136 | } |
11137 | psi1=aftsTrack->Phi(); | |
11138 | for(Int_t i2=0;i2<nPrim;i2++) | |
11139 | { | |
11140 | if(i2==i1) continue; | |
11141 | aftsTrack=anEvent->GetTrack(i2); | |
11142 | // RP condition (!(first) particle in the correlator must be RP): | |
11143 | if(!(aftsTrack->InRPSelection())) continue; | |
11144 | phi2=aftsTrack->Phi(); | |
11145 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11146 | // 2'-particle correlations: | |
11147 | fDiffFlowDirectCorrelations[t][pe][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(1.*n*(psi1-phi2)),wPhi2); // <w2 cos(n*(psi1-phi2)) | |
11148 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
11149 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11150 | ||
11151 | // 4'-particle correlations: | |
11152 | for(Int_t i1=0;i1<nPrim;i1++) | |
11153 | { | |
11154 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11155 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11156 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11157 | { |
11158 | if(ptOrEta == "Pt") | |
11159 | { | |
11160 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11161 | } else if (ptOrEta == "Eta") | |
11162 | { | |
11163 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11164 | } |
11165 | } else // this is diff flow of RPs | |
11166 | { | |
489d5531 | 11167 | if(ptOrEta == "Pt") |
11168 | { | |
11169 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11170 | } else if (ptOrEta == "Eta") | |
11171 | { | |
11172 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11173 | } |
489d5531 | 11174 | } |
11175 | psi1=aftsTrack->Phi(); | |
11176 | for(Int_t i2=0;i2<nPrim;i2++) | |
11177 | { | |
11178 | if(i2==i1) continue; | |
11179 | aftsTrack=anEvent->GetTrack(i2); | |
11180 | // RP condition (!(first) particle in the correlator must be RP): | |
11181 | if(!(aftsTrack->InRPSelection())) continue; | |
11182 | phi2=aftsTrack->Phi(); | |
11183 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11184 | for(Int_t i3=0;i3<nPrim;i3++) | |
11185 | { | |
11186 | if(i3==i1||i3==i2) continue; | |
11187 | aftsTrack=anEvent->GetTrack(i3); | |
11188 | // RP condition (!(first) particle in the correlator must be RP): | |
11189 | if(!(aftsTrack->InRPSelection())) continue; | |
11190 | phi3=aftsTrack->Phi(); | |
11191 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
11192 | for(Int_t i4=0;i4<nPrim;i4++) | |
11193 | { | |
11194 | if(i4==i1||i4==i2||i4==i3) continue; | |
11195 | aftsTrack=anEvent->GetTrack(i4); | |
11196 | // RP condition (!(first) particle in the correlator must be RP): | |
11197 | if(!(aftsTrack->InRPSelection())) continue; | |
11198 | phi4=aftsTrack->Phi(); | |
11199 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi()))); | |
11200 | // 4'-particle correlations <w2 w3 w4 cos(n(psi1+phi2-phi3-phi4))>: | |
11201 | fDiffFlowDirectCorrelations[t][pe][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3-phi4)),wPhi2*wPhi3*wPhi4); | |
11202 | }//end of for(Int_t i4=0;i4<nPrim;i4++) | |
11203 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
11204 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
11205 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11206 | ||
11207 | // count # of RPs and POIs in selected pt and eta bins for cross-checkings: (to be improved - moved to dedicated method) | |
3b552efe | 11208 | for(Int_t i=0;i<nPrim;i++) |
11209 | { | |
489d5531 | 11210 | aftsTrack=anEvent->GetTrack(i); |
11211 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) | |
11212 | if(typeFlag==1) // this is diff flow of POIs | |
11213 | { | |
11214 | if(ptOrEta == "Pt") | |
11215 | { | |
11216 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11217 | } else if (ptOrEta == "Eta") | |
11218 | { | |
11219 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11220 | } | |
11221 | } else // this is diff flow of RPs | |
11222 | { | |
11223 | if(ptOrEta == "Pt") | |
11224 | { | |
11225 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11226 | } else if (ptOrEta == "Eta") | |
11227 | { | |
11228 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11229 | } | |
11230 | } | |
11231 | if(t==1)t++; | |
11232 | fNoOfParticlesInBin->Fill(t+pe+0.5); | |
11233 | } | |
11234 | ||
11235 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrelationsWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
11236 | ||
11237 | ||
11238 | //================================================================================================================================ | |
11239 | ||
11240 | ||
0328db2d | 11241 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(AliFlowEventSimple * const anEvent, TString type, TString ptOrEta) |
489d5531 | 11242 | { |
11243 | // Evaluate with nested loops correction terms for non-uniform acceptance (both sin and cos terms) relevant for differential flow. | |
11244 | ||
11245 | // Remark 1: Reduced correction terms for non-uniform acceptance are evaluated in pt bin number fCrossCheckInPtBinNo | |
11246 | // and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
11247 | // Remark 2: Results are stored in 1 bin profiles fDiffFlowDirectCorrections[t][pe][sc][cti], where first three indices runs as: | |
11248 | // [0=RP,1=POI][0=Pt,1=Eta][0=sin terms,1=cos terms], whilst the cti (correction term index) runs as follows: | |
11249 | // cti: | |
11250 | // 0: <<sc n(psi1)>> | |
11251 | // 1: <<sc n(psi1+phi2)>> | |
11252 | // 2: <<sc n(psi1+phi2-phi3)>> | |
11253 | // 3: <<sc n(psi1-phi2-phi3)>> | |
11254 | // 4: | |
11255 | // 5: | |
11256 | // 6: | |
11257 | ||
11258 | Int_t typeFlag = -1; | |
11259 | Int_t ptEtaFlag = -1; | |
11260 | if(type == "RP") | |
11261 | { | |
11262 | typeFlag = 0; | |
11263 | } else if(type == "POI") | |
11264 | { | |
11265 | typeFlag = 1; | |
11266 | } | |
11267 | if(ptOrEta == "Pt") | |
11268 | { | |
11269 | ptEtaFlag = 0; | |
11270 | } else if(ptOrEta == "Eta") | |
11271 | { | |
11272 | ptEtaFlag = 1; | |
11273 | } | |
11274 | // shortcuts: | |
11275 | Int_t t = typeFlag; | |
11276 | Int_t pe = ptEtaFlag; | |
11277 | ||
11278 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
11279 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
11280 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
11281 | ||
11282 | Int_t nPrim = anEvent->NumberOfTracks(); | |
11283 | AliFlowTrackSimple *aftsTrack = NULL; | |
11284 | ||
11285 | Double_t psi1=0., phi2=0., phi3=0.;// phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
11286 | ||
11287 | Int_t n = fHarmonic; | |
11288 | ||
11289 | // 1-particle correction terms: | |
11290 | for(Int_t i1=0;i1<nPrim;i1++) | |
11291 | { | |
11292 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11293 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11294 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11295 | { |
11296 | if(ptOrEta == "Pt") | |
11297 | { | |
11298 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11299 | } else if (ptOrEta == "Eta") | |
11300 | { | |
11301 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11302 | } |
11303 | } else // this is diff flow of RPs | |
11304 | { | |
489d5531 | 11305 | if(ptOrEta == "Pt") |
11306 | { | |
11307 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11308 | } else if (ptOrEta == "Eta") | |
11309 | { | |
11310 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11311 | } |
11312 | } | |
489d5531 | 11313 | psi1=aftsTrack->Phi(); |
11314 | // sin terms: | |
11315 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*psi1),1.); // <<sin(n*(psi1))>> | |
11316 | // cos terms: | |
11317 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*psi1),1.); // <<cos(n*(psi1))>> | |
11318 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11319 | ||
11320 | // 2-particle correction terms: | |
11321 | for(Int_t i1=0;i1<nPrim;i1++) | |
11322 | { | |
11323 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11324 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11325 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11326 | { |
11327 | if(ptOrEta == "Pt") | |
11328 | { | |
11329 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11330 | } else if (ptOrEta == "Eta") | |
11331 | { | |
11332 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11333 | } |
11334 | } else // this is diff flow of RPs | |
11335 | { | |
489d5531 | 11336 | if(ptOrEta == "Pt") |
11337 | { | |
11338 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11339 | } else if (ptOrEta == "Eta") | |
11340 | { | |
11341 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11342 | } |
489d5531 | 11343 | } |
11344 | psi1=aftsTrack->Phi(); | |
11345 | for(Int_t i2=0;i2<nPrim;i2++) | |
11346 | { | |
11347 | if(i2==i1) continue; | |
11348 | aftsTrack=anEvent->GetTrack(i2); | |
11349 | // RP condition (!(first) particle in the correlator must be RP): | |
11350 | if(!(aftsTrack->InRPSelection())) continue; | |
11351 | phi2=aftsTrack->Phi(); | |
11352 | // sin terms: | |
11353 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2)),1.); // <<sin(n*(psi1+phi2))>> | |
11354 | // cos terms: | |
11355 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2)),1.); // <<cos(n*(psi1+phi2))>> | |
11356 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
11357 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11358 | ||
11359 | // 3-particle correction terms: | |
11360 | for(Int_t i1=0;i1<nPrim;i1++) | |
11361 | { | |
11362 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 11363 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
11364 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 11365 | { |
11366 | if(ptOrEta == "Pt") | |
11367 | { | |
11368 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
11369 | } else if (ptOrEta == "Eta") | |
11370 | { | |
11371 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 11372 | } |
11373 | } else // this is diff flow of RPs | |
11374 | { | |
489d5531 | 11375 | if(ptOrEta == "Pt") |
11376 | { | |
11377 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
11378 | } else if (ptOrEta == "Eta") | |
11379 | { | |
11380 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 11381 | } |
489d5531 | 11382 | } |
11383 | psi1=aftsTrack->Phi(); | |
11384 | for(Int_t i2=0;i2<nPrim;i2++) | |
11385 | { | |
11386 | if(i2==i1) continue; | |
11387 | aftsTrack=anEvent->GetTrack(i2); | |
11388 | // RP condition (!(first) particle in the correlator must be RP): | |
11389 | if(!(aftsTrack->InRPSelection())) continue; | |
11390 | phi2=aftsTrack->Phi(); | |
11391 | for(Int_t i3=0;i3<nPrim;i3++) | |
11392 | { | |
11393 | if(i3==i1||i3==i2) continue; | |
11394 | aftsTrack=anEvent->GetTrack(i3); | |
11395 | // RP condition (!(first) particle in the correlator must be RP): | |
11396 | if(!(aftsTrack->InRPSelection())) continue; | |
11397 | phi3=aftsTrack->Phi(); | |
11398 | // sin terms: | |
11399 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][2]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2-phi3)),1.); // <<sin(n*(psi1+phi2-phi3))>> | |
11400 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][3]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1-phi2-phi3)),1.); // <<sin(n*(psi1-phi2-phi3))>> | |
11401 | // cos terms: | |
11402 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][2]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2-phi3)),1.); // <<cos(n*(psi1+phi2-phi3))>> | |
11403 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][3]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1-phi2-phi3)),1.); // <<cos(n*(psi1-phi2-phi3))>> | |
11404 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
11405 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
11406 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
11407 | ||
11408 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoops(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
11409 | ||
11410 | ||
11411 | //================================================================================================================================ | |
11412 | ||
11413 | ||
11414 | void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrectionTermsForNUA(TString type, TString ptOrEta) | |
11415 | { | |
11416 | // Compare corrections temrs for non-uniform acceptance needed for diff. flow calculated with nested loops and those calculated from Q-vectors | |
11417 | ||
11418 | Int_t typeFlag = -1; | |
11419 | Int_t ptEtaFlag = -1; | |
11420 | if(type == "RP") | |
11421 | { | |
11422 | typeFlag = 0; | |
11423 | } else if(type == "POI") | |
11424 | { | |
11425 | typeFlag = 1; | |
11426 | } | |
11427 | if(ptOrEta == "Pt") | |
11428 | { | |
11429 | ptEtaFlag = 0; | |
11430 | } else if(ptOrEta == "Eta") | |
11431 | { | |
11432 | ptEtaFlag = 1; | |
11433 | } | |
11434 | // shortcuts: | |
11435 | Int_t t = typeFlag; | |
11436 | Int_t pe = ptEtaFlag; | |
11437 | ||
11438 | TString rpORpoiString[2] = {"RP ","POI"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
11439 | TString ptORetaString[2] = {"pt","eta"}; // to be improved (name in the same way as in the other methods, eventually promote to data member) | |
11440 | //TString sinCosFlag[2] = {"sin","cos"}; // to be improved (eventually promote to data member) | |
11441 | 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) | |
11442 | 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) | |
11443 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
11444 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
11445 | ||
11446 | Int_t crossCheckInPtEtaBinNo[2] = {fCrossCheckInPtBinNo,fCrossCheckInEtaBinNo}; | |
11447 | ||
11448 | cout<<endl; | |
11449 | cout<<" ******************************************"<<endl; | |
11450 | cout<<" **** cross-checking the correction ****"<<endl; | |
46b94261 | 11451 | cout<<" **** terms for non-uniform acceptance ****"<<endl; |
489d5531 | 11452 | cout<<" **** for differential flow ("<<rpORpoiString[t]<<") ****"<<endl; |
11453 | if(!(fUsePhiWeights||fUsePtWeights||fUseEtaWeights)) | |
11454 | { | |
11455 | cout<<" **** (particle weights not used) ****"<<endl; | |
11456 | } else | |
11457 | { | |
11458 | cout<<" **** (particle weights used) ****"<<endl; | |
11459 | } | |
11460 | cout<<" ******************************************"<<endl; | |
11461 | cout<<endl; | |
11462 | cout<<" "<<ptORetaString[pe]<<" bin: "<<lowerPtEtaEdge[pe]<<" <= "<<ptORetaString[pe]<<" < "<<upperPtEtaEdge[pe]<<endl; | |
11463 | cout<<endl; | |
11464 | ||
11465 | for(Int_t cti=0;cti<4;cti++) // correction term index | |
11466 | { | |
11467 | for(Int_t sc=0;sc<2;sc++) // sin or cos terms | |
11468 | { | |
11469 | if(sc==0) // to be improved (this can be implemented better) | |
11470 | { | |
11471 | cout<<" "<<reducedCorrectionSinTerms[cti].Data()<<":"<<endl; | |
11472 | } else | |
11473 | { | |
11474 | cout<<" "<<reducedCorrectionCosTerms[cti].Data()<<":"<<endl; | |
11475 | } | |
11476 | cout<<" from Q-vectors = "<<fDiffFlowCorrectionTermsForNUAPro[t][pe][sc][cti]->GetBinContent(crossCheckInPtEtaBinNo[pe])<<endl; | |
11477 | cout<<" from nested loops = "<<fDiffFlowDirectCorrectionTermsForNUA[t][pe][sc][cti]->GetBinContent(1)<<endl; | |
11478 | cout<<endl; | |
11479 | } | |
11480 | } // end of for(Int_t rci=0;rci<4;rci++) | |
11481 | ||
11482 | } // end of void AliFlowAnalysisWithQCumulants::CrossCheckDiffFlowCorrectionTermsForNUA(TString type, TString ptOrEta) | |
11483 | ||
11484 | ||
57340a27 | 11485 | //================================================================================================================================ |
11486 | ||
489d5531 | 11487 | |
11488 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights() | |
11489 | { | |
11490 | // Calculate corrections using particle weights for non-uniform acceptance of the detector for no-name integrated flow (cos terms). | |
11491 | ||
11492 | // ********************************************************************** | |
11493 | // **** weighted corrections for non-uniform acceptance (cos terms): **** | |
11494 | // ********************************************************************** | |
57340a27 | 11495 | |
489d5531 | 11496 | // Remark 1: When particle weights are used the binning of fIntFlowCorrectionTermsForNUAPro[1] is organized as follows: |
57340a27 | 11497 | // |
489d5531 | 11498 | // 1st bin: <<w1 cos(n*(phi1))>> = cosP1nW1 |
11499 | // 2nd bin: <<w1 w2 cos(n*(phi1+phi2))>> = cosP1nP1nW1W1 | |
11500 | // 3rd bin: <<w1 w2 w3 cos(n*(phi1-phi2-phi3))>> = cosP1nM1nM1nW1W1W1 | |
11501 | // ... | |
11502 | ||
11503 | // multiplicity (number of particles used to determine the reaction plane) | |
11504 | Double_t dMult = (*fSMpk)(0,0); | |
11505 | ||
11506 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
11507 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
11508 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
11509 | //Double_t dReQ3n3k = (*fReQ)(2,3); | |
11510 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
11511 | Double_t dReQ1n3k = (*fReQ)(0,3); | |
11512 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
11513 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
11514 | //Double_t dImQ3n3k = (*fImQ)(2,3); | |
11515 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
11516 | //Double_t dImQ1n3k = (*fImQ)(0,3); | |
11517 | ||
11518 | // dMs are variables introduced in order to simplify some Eqs. bellow: | |
11519 | //.............................................................................................. | |
11520 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
57340a27 | 11521 | Double_t dM111 = (*fSMpk)(2,1)-3.*(*fSMpk)(0,2)*(*fSMpk)(0,1) |
489d5531 | 11522 | + 2.*(*fSMpk)(0,3); // dM111 = sum_{i,j,k=1,i!=j!=k}^M w_i w_j w_k |
11523 | //.............................................................................................. | |
ecac11c2 | 11524 | // 1-particle: |
489d5531 | 11525 | Double_t cosP1nW1 = 0.; // <<w1 cos(n*(phi1))>> |
11526 | ||
0328db2d | 11527 | if(dMult>0 && TMath::Abs((*fSMpk)(0,1))>1e-6) |
489d5531 | 11528 | { |
11529 | cosP1nW1 = dReQ1n1k/(*fSMpk)(0,1); | |
11530 | ||
11531 | // average weighted 1-particle correction (cos terms) for non-uniform acceptance for single event: | |
11532 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(1,cosP1nW1); | |
11533 | ||
11534 | // final average weighted 1-particle correction (cos terms) for non-uniform acceptance for all events: | |
11535 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(0.5,cosP1nW1,(*fSMpk)(0,1)); | |
11536 | } | |
11537 | ||
11538 | // 2-particle: | |
11539 | Double_t cosP1nP1nW1W1 = 0.; // <<w1 w2 cos(n*(phi1+phi2))>> | |
11540 | ||
0328db2d | 11541 | if(dMult>1 && TMath::Abs(dM11)>1e-6) |
489d5531 | 11542 | { |
11543 | cosP1nP1nW1W1 = (pow(dReQ1n1k,2)-pow(dImQ1n1k,2)-dReQ2n2k)/dM11; | |
11544 | ||
11545 | // average weighted 2-particle correction (cos terms) for non-uniform acceptance for single event: | |
11546 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(2,cosP1nP1nW1W1); | |
11547 | ||
11548 | // final average weighted 2-particle correction (cos terms) for non-uniform acceptance for all events: | |
11549 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(1.5,cosP1nP1nW1W1,dM11); | |
11550 | } | |
11551 | ||
11552 | // 3-particle: | |
11553 | Double_t cosP1nM1nM1nW1W1W1 = 0.; // <<w1 w2 w3 cos(n*(phi1-phi2-phi3))>> | |
11554 | ||
0328db2d | 11555 | if(dMult>2 && TMath::Abs(dM111)>1e-6) |
489d5531 | 11556 | { |
57340a27 | 11557 | cosP1nM1nM1nW1W1W1 = (dReQ1n1k*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)) |
11558 | - dReQ1n1k*dReQ2n2k-dImQ1n1k*dImQ2n2k | |
11559 | - 2.*((*fSMpk)(0,2))*dReQ1n1k | |
489d5531 | 11560 | + 2.*dReQ1n3k) |
11561 | / dM111; | |
11562 | ||
11563 | // average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for single event: | |
11564 | fIntFlowCorrectionTermsForNUAEBE[1]->SetBinContent(3,cosP1nM1nM1nW1W1W1); | |
11565 | ||
11566 | // final average non-weighted 3-particle correction (cos terms) for non-uniform acceptance for all events: | |
11567 | fIntFlowCorrectionTermsForNUAPro[1]->Fill(2.5,cosP1nM1nM1nW1W1W1,dM111); | |
11568 | } | |
11569 | ||
11570 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUACosTermsUsingParticleWeights() | |
11571 | ||
11572 | ||
11573 | //================================================================================================================================ | |
11574 | ||
11575 | ||
11576 | void AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights() | |
11577 | { | |
11578 | // calculate corrections using particle weights for non-uniform acceptance of the detector for no-name integrated flow (sin terms) | |
11579 | ||
11580 | // ********************************************************************** | |
11581 | // **** weighted corrections for non-uniform acceptance (sin terms): **** | |
11582 | // ********************************************************************** | |
11583 | ||
11584 | // Remark 1: When particle weights are used the binning of fIntFlowCorrectionTermsForNUAPro[0] is organized as follows: | |
57340a27 | 11585 | // |
489d5531 | 11586 | // 1st bin: <<w1 sin(n*(phi1))>> = sinP1nW1 |
11587 | // 2nd bin: <<w1 w2 sin(n*(phi1+phi2))>> = sinP1nP1nW1W1 | |
11588 | // 3rd bin: <<w1 w2 w3 sin(n*(phi1-phi2-phi3))>> = sinP1nM1nM1nW1W1W1 | |
11589 | // ... | |
11590 | ||
11591 | // multiplicity (number of particles used to determine the reaction plane) | |
11592 | Double_t dMult = (*fSMpk)(0,0); | |
11593 | ||
11594 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
11595 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
11596 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
11597 | //Double_t dReQ3n3k = (*fReQ)(2,3); | |
11598 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
11599 | //Double_t dReQ1n3k = (*fReQ)(0,3); | |
11600 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
11601 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
11602 | //Double_t dImQ3n3k = (*fImQ)(2,3); | |
11603 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
11604 | Double_t dImQ1n3k = (*fImQ)(0,3); | |
11605 | ||
11606 | // dMs are variables introduced in order to simplify some Eqs. bellow: | |
11607 | //.............................................................................................. | |
11608 | Double_t dM11 = (*fSMpk)(1,1)-(*fSMpk)(0,2); // dM11 = sum_{i,j=1,i!=j}^M w_i w_j | |
57340a27 | 11609 | Double_t dM111 = (*fSMpk)(2,1)-3.*(*fSMpk)(0,2)*(*fSMpk)(0,1) |
489d5531 | 11610 | + 2.*(*fSMpk)(0,3); // dM111 = sum_{i,j,k=1,i!=j!=k}^M w_i w_j w_k |
11611 | //.............................................................................................. | |
11612 | ||
11613 | // 1-particle: | |
11614 | Double_t sinP1nW1 = 0.; // <<w1 sin(n*(phi1))>> | |
11615 | ||
0328db2d | 11616 | if(dMult>0 && TMath::Abs((*fSMpk)(0,1))>1e-6) |
489d5531 | 11617 | { |
11618 | sinP1nW1 = dImQ1n1k/((*fSMpk)(0,1)); | |
11619 | ||
11620 | // average weighted 1-particle correction (sin terms) for non-uniform acceptance for single event: | |
11621 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(1,sinP1nW1); | |
11622 | ||
11623 | // final average weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
11624 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(0.5,sinP1nW1,(*fSMpk)(0,1)); | |
11625 | } | |
11626 | ||
11627 | // 2-particle: | |
11628 | Double_t sinP1nP1nW1W1 = 0.; // <<w1 w2 sin(n*(phi1+phi2))>> | |
11629 | ||
0328db2d | 11630 | if(dMult>1 && TMath::Abs(dM11)>1e-6) |
489d5531 | 11631 | { |
11632 | sinP1nP1nW1W1 = (2.*dReQ1n1k*dImQ1n1k-dImQ2n2k)/dM11; | |
11633 | ||
11634 | // average weighted 2-particle correction (sin terms) for non-uniform acceptance for single event: | |
11635 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(2,sinP1nP1nW1W1); | |
11636 | ||
11637 | // final average weighted 1-particle correction (sin terms) for non-uniform acceptance for all events: | |
11638 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(1.5,sinP1nP1nW1W1,dM11); | |
11639 | } | |
11640 | ||
11641 | // 3-particle: | |
11642 | Double_t sinP1nM1nM1nW1W1W1 = 0.; // <<w1 w2 w3 sin(n*(phi1-phi2-phi3))>> | |
11643 | ||
0328db2d | 11644 | if(dMult>2 && TMath::Abs(dM111)>1e-6) |
489d5531 | 11645 | { |
57340a27 | 11646 | sinP1nM1nM1nW1W1W1 = (-dImQ1n1k*(pow(dReQ1n1k,2)+pow(dImQ1n1k,2)) |
11647 | + dReQ1n1k*dImQ2n2k-dImQ1n1k*dReQ2n2k | |
11648 | + 2.*((*fSMpk)(0,2))*dImQ1n1k | |
489d5531 | 11649 | - 2.*dImQ1n3k) |
11650 | / dM111; | |
11651 | ||
11652 | // average weighted 3-particle correction (sin terms) for non-uniform acceptance for single event: | |
11653 | fIntFlowCorrectionTermsForNUAEBE[0]->SetBinContent(3,sinP1nM1nM1nW1W1W1); | |
11654 | ||
11655 | // final average weighted 3-particle correction (sin terms) for non-uniform acceptance for all events: | |
11656 | fIntFlowCorrectionTermsForNUAPro[0]->Fill(2.5,sinP1nM1nM1nW1W1W1,dM111); | |
11657 | } | |
11658 | ||
11659 | } // end of AliFlowAnalysisWithQCumulants::CalculateIntFlowCorrectionsForNUASinTermsUsingParticleWeights() | |
11660 | ||
11661 | ||
57340a27 | 11662 | //================================================================================================================================ |
489d5531 | 11663 | |
11664 | ||
0328db2d | 11665 | void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrectionsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple * const anEvent) |
489d5531 | 11666 | { |
11667 | // Evaluate with nested loops correction terms for non-uniform acceptance for integrated flow (using the particle weights). | |
11668 | ||
57340a27 | 11669 | // Results are stored in profiles fIntFlowDirectCorrectionTermsForNUA[0] (sin terms) and |
11670 | // fIntFlowDirectCorrectionTermsForNUA[1] (cos terms). | |
489d5531 | 11671 | |
57340a27 | 11672 | // Remark 1: When particle weights are used the binning of fIntFlowDirectCorrectionTermsForNUA[sc] is |
489d5531 | 11673 | // organized as follows (sc stands for either sin or cos): |
11674 | // | |
11675 | // 1st bin: <<w1 sc(n*(phi1))>> = scP1nW1 | |
11676 | // 2nd bin: <<w1 w2 sc(n*(phi1+phi2))>> = scP1nP1nW1W1 | |
11677 | // 3rd bin: <<w1 w2 w3 sc(n*(phi1-phi2-phi3))>> = scP1nM1nM1nW1W1W1 | |
3b552efe | 11678 | // ... |
489d5531 | 11679 | |
11680 | Int_t nPrim = anEvent->NumberOfTracks(); | |
11681 | AliFlowTrackSimple *aftsTrack = NULL; | |
11682 | //Double_t phi1=0., phi2=0., phi3=0., phi4=0., phi5=0., phi6=0., phi7=0., phi8=0.; | |
11683 | //Double_t wPhi1=1., wPhi2=1., wPhi3=1., wPhi4=1., wPhi5=1., wPhi6=1., wPhi7=1., wPhi8=1.; | |
11684 | Double_t phi1=0., phi2=0., phi3=0.; | |
11685 | Double_t wPhi1=1., wPhi2=1., wPhi3=1.; | |
11686 | Int_t n = fHarmonic; | |
11687 | Int_t eventNo = (Int_t)fAvMultiplicity->GetBinEntries(1); // to be improved (is this casting safe in general?) | |
11688 | Double_t dMult = (*fSMpk)(0,0); | |
11689 | cout<<endl; | |
11690 | cout<<"Correction terms for non-uniform acceptance: Event number: "<<eventNo<<", multiplicity is "<<dMult<<endl; | |
11691 | if(dMult<1) | |
11692 | { | |
11693 | cout<<"... skipping this event (multiplicity too low) ..."<<endl; | |
11694 | } else if (dMult>fMaxAllowedMultiplicity) | |
11695 | { | |
11696 | cout<<"... skipping this event (multiplicity too high) ..."<<endl; | |
11697 | } else | |
11698 | { | |
11699 | cout<<"... evaluating nested loops (using particle weights) ..."<<endl; | |
11700 | } | |
11701 | ||
11702 | // 1-particle correction terms using particle weights: | |
11703 | if(nPrim>=1 && nPrim<=fMaxAllowedMultiplicity) | |
11704 | { | |
11705 | for(Int_t i1=0;i1<nPrim;i1++) | |
11706 | { | |
11707 | aftsTrack=anEvent->GetTrack(i1); | |
11708 | if(!(aftsTrack->InRPSelection())) continue; | |
11709 | phi1=aftsTrack->Phi(); | |
11710 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
57340a27 | 11711 | // 1-particle correction terms using particle weights: |
489d5531 | 11712 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[0]->Fill(0.5,sin(n*phi1),wPhi1); // <w1 sin(n*phi1)> |
11713 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[1]->Fill(0.5,cos(n*phi1),wPhi1); // <w1 cos(n*phi1)> | |
57340a27 | 11714 | } // end of for(Int_t i1=0;i1<nPrim;i1++) |
11715 | } // end of if(nPrim>=1 && nPrim<=fMaxAllowedMultiplicity) | |
11716 | ||
489d5531 | 11717 | // 2-particle correction terms using particle weights: |
11718 | if(nPrim>=2 && nPrim<=fMaxAllowedMultiplicity) | |
11719 | { | |
11720 | for(Int_t i1=0;i1<nPrim;i1++) | |
11721 | { | |
11722 | aftsTrack=anEvent->GetTrack(i1); | |
11723 | if(!(aftsTrack->InRPSelection())) continue; | |
11724 | phi1=aftsTrack->Phi(); | |
11725 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
11726 | for(Int_t i2=0;i2<nPrim;i2++) | |
11727 | { | |
11728 | if(i2==i1)continue; | |
11729 | aftsTrack=anEvent->GetTrack(i2); | |
11730 | if(!(aftsTrack->InRPSelection())) continue; | |
11731 | phi2=aftsTrack->Phi(); | |
11732 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11733 | if(nPrim==2) cout<<i1<<" "<<i2<<"\r"<<flush; | |
57340a27 | 11734 | // 2-p correction terms using particle weights: |
489d5531 | 11735 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[0]->Fill(1.5,sin(n*(phi1+phi2)),wPhi1*wPhi2); // <w1 w2 sin(n*(phi1+phi2))> |
11736 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[1]->Fill(1.5,cos(n*(phi1+phi2)),wPhi1*wPhi2); // <w1 w2 cos(n*(phi1+phi2))> | |
11737 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
11738 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
11739 | } // end of if(nPrim>=2) | |
11740 | ||
11741 | // 3-particle correction terms using particle weights: | |
11742 | if(nPrim>=3 && nPrim<=fMaxAllowedMultiplicity) | |
11743 | { | |
11744 | for(Int_t i1=0;i1<nPrim;i1++) | |
11745 | { | |
11746 | aftsTrack=anEvent->GetTrack(i1); | |
11747 | if(!(aftsTrack->InRPSelection())) continue; | |
11748 | phi1=aftsTrack->Phi(); | |
11749 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
11750 | for(Int_t i2=0;i2<nPrim;i2++) | |
11751 | { | |
11752 | if(i2==i1)continue; | |
11753 | aftsTrack=anEvent->GetTrack(i2); | |
11754 | if(!(aftsTrack->InRPSelection())) continue; | |
11755 | phi2=aftsTrack->Phi(); | |
11756 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11757 | for(Int_t i3=0;i3<nPrim;i3++) | |
11758 | { | |
11759 | if(i3==i1||i3==i2)continue; | |
11760 | aftsTrack=anEvent->GetTrack(i3); | |
11761 | if(!(aftsTrack->InRPSelection())) continue; | |
11762 | phi3=aftsTrack->Phi(); | |
11763 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
11764 | if(nPrim==3) cout<<i1<<" "<<i2<<" "<<i3<<"\r"<<flush; | |
57340a27 | 11765 | // 3-p correction terms using particle weights: |
489d5531 | 11766 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[0]->Fill(2.5,sin(n*(phi1-phi2-phi3)),wPhi1*wPhi2*wPhi3); // <w1 w2 w3 sin(n*(phi1-phi2-phi3))> |
11767 | if(fUsePhiWeights) fIntFlowDirectCorrectionTermsForNUA[1]->Fill(2.5,cos(n*(phi1-phi2-phi3)),wPhi1*wPhi2*wPhi3); // <w1 w2 w3 cos(n*(phi1-phi2-phi3))> | |
11768 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
11769 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
11770 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
11771 | } // end of if(nPrim>=3) | |
11772 | ||
57340a27 | 11773 | /* |
11774 | ||
489d5531 | 11775 | if(nPrim>=4 && nPrim<=fMaxAllowedMultiplicity) |
11776 | { | |
11777 | // 4 nested loops multiparticle correlations using particle weights: | |
11778 | for(Int_t i1=0;i1<nPrim;i1++) | |
11779 | { | |
11780 | aftsTrack=anEvent->GetTrack(i1); | |
11781 | if(!(aftsTrack->InRPSelection())) continue; | |
11782 | phi1=aftsTrack->Phi(); | |
11783 | if(fUsePhiWeights && fPhiWeights) wPhi1 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi1*fnBinsPhi/TMath::TwoPi()))); | |
11784 | for(Int_t i2=0;i2<nPrim;i2++) | |
11785 | { | |
11786 | if(i2==i1)continue; | |
11787 | aftsTrack=anEvent->GetTrack(i2); | |
11788 | if(!(aftsTrack->InRPSelection())) continue; | |
11789 | phi2=aftsTrack->Phi(); | |
11790 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
11791 | for(Int_t i3=0;i3<nPrim;i3++) | |
11792 | { | |
11793 | if(i3==i1||i3==i2)continue; | |
11794 | aftsTrack=anEvent->GetTrack(i3); | |
11795 | if(!(aftsTrack->InRPSelection())) continue; | |
11796 | phi3=aftsTrack->Phi(); | |
11797 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
11798 | for(Int_t i4=0;i4<nPrim;i4++) | |
11799 | { | |
11800 | if(i4==i1||i4==i2||i4==i3)continue; | |
11801 | aftsTrack=anEvent->GetTrack(i4); | |
11802 | if(!(aftsTrack->InRPSelection())) continue; | |
11803 | phi4=aftsTrack->Phi(); | |
11804 | if(fUsePhiWeights && fPhiWeights) wPhi4 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi4*fnBinsPhi/TMath::TwoPi()))); | |
11805 | if(nPrim>=4) cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<"\r"<<flush; // to be improved (replace eventually this if statement with if(nPrim==4)) | |
11806 | // 4-p correlations using particle weights: | |
11807 | if(fUsePhiWeights) fIntFlowDirectCorrelations->Fill(10.5,cos(n*phi1+n*phi2-n*phi3-n*phi4),wPhi1*wPhi2*wPhi3*wPhi4); | |
11808 | // extra correlations: | |
11809 | // 2-p extra correlations (do not appear if particle weights are not used): | |
11810 | // ... | |
11811 | // 3-p extra correlations (do not appear if particle weights are not used): | |
11812 | // ... | |
11813 | // 4-p extra correlations (do not appear if particle weights are not used): | |
11814 | // ... | |
11815 | } // end of for(Int_t i4=0;i4<nPrim;i4++) | |
11816 | } // end of for(Int_t i3=0;i3<nPrim;i3++) | |
11817 | } // end of for(Int_t i2=0;i2<nPrim;i2++) | |
11818 | } // end of for(Int_t i1=0;i1<nPrim;i1++) | |
11819 | } // end of if(nPrim>=4) | |
11820 | ||
11821 | */ | |
11822 | ||
11823 | cout<<endl; | |
11824 | ||
11825 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateIntFlowCorrectionsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent) | |
11826 | ||
11827 | ||
57340a27 | 11828 | //================================================================================================================================ |
489d5531 | 11829 | |
11830 | ||
11831 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights(TString type, TString ptOrEta) | |
11832 | { | |
11833 | // Calculate correction terms for non-uniform acceptance for differential flow (cos terms) using particle weights. | |
57340a27 | 11834 | |
489d5531 | 11835 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][1][cti], where cti runs as follows: |
57340a27 | 11836 | // |
489d5531 | 11837 | // 0: <<cos n(psi)>> |
11838 | // 1: <<w2 cos n(psi1+phi2)>> | |
11839 | // 2: <<w2 w3 cos n(psi1+phi2-phi3)>> | |
11840 | // 3: <<w2 w3 cos n(psi1-phi2-phi3)>> | |
11841 | // 4: | |
11842 | // 5: | |
11843 | // 6: | |
11844 | ||
11845 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
11846 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
11847 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
11848 | //Double_t dReQ1n3k = (*fReQ)(0,3); | |
11849 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
11850 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
11851 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
11852 | //Double_t dImQ1n3k = (*fImQ)(0,3); | |
11853 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
11854 | ||
11855 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
11856 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
11857 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
11858 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
11859 | ||
11860 | Int_t t = -1; // type flag | |
11861 | Int_t pe = -1; // ptEta flag | |
11862 | ||
11863 | if(type == "RP") | |
11864 | { | |
11865 | t = 0; | |
11866 | } else if(type == "POI") | |
11867 | { | |
11868 | t = 1; | |
11869 | } | |
11870 | ||
11871 | if(ptOrEta == "Pt") | |
11872 | { | |
11873 | pe = 0; | |
11874 | } else if(ptOrEta == "Eta") | |
11875 | { | |
11876 | pe = 1; | |
11877 | } | |
11878 | ||
11879 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
11880 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
11881 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
11882 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
11883 | ||
11884 | // looping over all bins and calculating correction terms: | |
11885 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
11886 | { | |
11887 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
11888 | Double_t p1n0kRe = 0.; | |
11889 | Double_t p1n0kIm = 0.; | |
11890 | ||
11891 | // number of POIs in particular pt or eta bin: | |
11892 | Double_t mp = 0.; | |
11893 | ||
11894 | // 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): | |
11895 | Double_t q1n2kRe = 0.; | |
11896 | Double_t q1n2kIm = 0.; | |
11897 | Double_t q2n1kRe = 0.; | |
11898 | Double_t q2n1kIm = 0.; | |
46b94261 | 11899 | |
489d5531 | 11900 | // s_{1,1}, s_{1,2} // to be improved (add explanation) |
11901 | Double_t s1p1k = 0.; | |
11902 | Double_t s1p2k = 0.; | |
46b94261 | 11903 | |
489d5531 | 11904 | // number of particles which are both RPs and POIs in particular pt or eta bin: |
46b94261 | 11905 | Double_t mq = 0.; |
489d5531 | 11906 | |
11907 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
11908 | Double_t dM01 = 0.; | |
11909 | Double_t dM011 = 0.; | |
11910 | ||
11911 | if(type == "POI") | |
11912 | { | |
11913 | // q_{m*n,k}: | |
11914 | q1n2kRe = fReRPQ1dEBE[2][pe][0][2]->GetBinContent(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
11915 | * fReRPQ1dEBE[2][pe][0][2]->GetBinEntries(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
11916 | q1n2kIm = fImRPQ1dEBE[2][pe][0][2]->GetBinContent(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
11917 | * fImRPQ1dEBE[2][pe][0][2]->GetBinEntries(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
11918 | q2n1kRe = fReRPQ1dEBE[2][pe][1][1]->GetBinContent(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
11919 | * fReRPQ1dEBE[2][pe][1][1]->GetBinEntries(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
11920 | q2n1kIm = fImRPQ1dEBE[2][pe][1][1]->GetBinContent(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
11921 | * fImRPQ1dEBE[2][pe][1][1]->GetBinEntries(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
11922 | 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 | 11923 | |
489d5531 | 11924 | s1p1k = pow(fs1dEBE[2][pe][1]->GetBinContent(b)*fs1dEBE[2][pe][1]->GetBinEntries(b),1.); |
11925 | s1p2k = pow(fs1dEBE[2][pe][2]->GetBinContent(b)*fs1dEBE[2][pe][2]->GetBinEntries(b),1.); | |
11926 | }else if(type == "RP") | |
11927 | { | |
11928 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
11929 | q1n2kRe = fReRPQ1dEBE[0][pe][0][2]->GetBinContent(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
11930 | * fReRPQ1dEBE[0][pe][0][2]->GetBinEntries(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
11931 | q1n2kIm = fImRPQ1dEBE[0][pe][0][2]->GetBinContent(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
11932 | * fImRPQ1dEBE[0][pe][0][2]->GetBinEntries(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
11933 | q2n1kRe = fReRPQ1dEBE[0][pe][1][1]->GetBinContent(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
11934 | * fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
11935 | q2n1kIm = fImRPQ1dEBE[0][pe][1][1]->GetBinContent(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
11936 | * fImRPQ1dEBE[0][pe][1][1]->GetBinEntries(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
11937 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
11938 | s1p1k = pow(fs1dEBE[0][pe][1]->GetBinContent(b)*fs1dEBE[0][pe][1]->GetBinEntries(b),1.); | |
11939 | s1p2k = pow(fs1dEBE[0][pe][2]->GetBinContent(b)*fs1dEBE[0][pe][2]->GetBinEntries(b),1.); | |
3b552efe | 11940 | //s1p3k = pow(fs1dEBE[0][pe][3]->GetBinContent(b)*fs1dEBE[0][pe][3]->GetBinEntries(b),1.); |
11941 | ||
489d5531 | 11942 | mq = fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) |
11943 | } | |
3b552efe | 11944 | |
489d5531 | 11945 | if(type == "POI") |
3b552efe | 11946 | { |
11947 | // p_{m*n,k}: | |
489d5531 | 11948 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) |
11949 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
11950 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
3b552efe | 11951 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); |
11952 | 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 | 11953 | // M01 from Eq. (118) in QC2c (to be improved (notation)): |
3b552efe | 11954 | dM01 = mp*dSM1p1k-s1p1k; |
11955 | dM011 = mp*(dSM2p1k-dSM1p2k) | |
11956 | - 2.*(s1p1k*dSM1p1k-s1p2k); | |
11957 | ||
11958 | // typeFlag = RP (0) or POI (1): | |
11959 | t = 1; | |
11960 | } else if(type == "RP") | |
489d5531 | 11961 | { |
11962 | // to be improved (cross-checked): | |
11963 | p1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
11964 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
11965 | p1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
11966 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
11967 | mp = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
11968 | // M01 from Eq. (118) in QC2c (to be improved (notation)): | |
3b552efe | 11969 | dM01 = mp*dSM1p1k-s1p1k; |
11970 | dM011 = mp*(dSM2p1k-dSM1p2k) | |
11971 | - 2.*(s1p1k*dSM1p1k-s1p2k); | |
489d5531 | 11972 | // typeFlag = RP (0) or POI (1): |
3b552efe | 11973 | t = 0; |
11974 | } | |
489d5531 | 11975 | |
11976 | // <<cos n(psi1)>>: | |
11977 | Double_t cosP1nPsi = 0.; | |
11978 | if(mp) | |
11979 | { | |
11980 | cosP1nPsi = p1n0kRe/mp; | |
11981 | ||
11982 | // fill profile for <<cos n(psi1)>>: | |
11983 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi,mp); | |
11984 | // histogram to store <cos n(psi1)> e-b-e (needed in some other methods): | |
11985 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][0]->SetBinContent(b,cosP1nPsi); | |
46b94261 | 11986 | } // end of if(mp) |
57340a27 | 11987 | |
489d5531 | 11988 | // <<w2 cos n(psi1+phi2)>>: |
11989 | Double_t cosP1nPsiP1nPhiW2 = 0.; | |
11990 | if(dM01) | |
11991 | { | |
11992 | cosP1nPsiP1nPhiW2 = (p1n0kRe*dReQ1n1k-p1n0kIm*dImQ1n1k-q2n1kRe)/(dM01); | |
11993 | // fill profile for <<w2 cos n(psi1+phi2)>>: | |
11994 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsiP1nPhiW2,dM01); | |
11995 | // histogram to store <w2 cos n(psi1+phi2)> e-b-e (needed in some other methods): | |
11996 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][1]->SetBinContent(b,cosP1nPsiP1nPhiW2); | |
11997 | } // end of if(dM01) | |
11998 | ||
11999 | // <<w2 w3 cos n(psi1+phi2-phi3)>>: | |
12000 | Double_t cosP1nPsi1P1nPhi2MPhi3W2W3 = 0.; | |
12001 | if(dM011) | |
12002 | { | |
46b94261 | 12003 | cosP1nPsi1P1nPhi2MPhi3W2W3 = (p1n0kRe*(pow(dImQ1n1k,2.)+pow(dReQ1n1k,2.)) |
12004 | - p1n0kRe*dSM1p2k | |
12005 | - q2n1kRe*dReQ1n1k-q2n1kIm*dImQ1n1k | |
12006 | - s1p1k*dReQ1n1k | |
12007 | + 2.*q1n2kRe) | |
12008 | / dM011; | |
489d5531 | 12009 | // fill profile for <<w1 w2 w3 cos n(psi1+phi2)>>: |
12010 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1P1nPhi2MPhi3W2W3,dM011); | |
12011 | // histogram to store <w1 w2 w3 cos n(psi1+phi2)> e-b-e (needed in some other methods): | |
12012 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][2]->SetBinContent(b,cosP1nPsi1P1nPhi2MPhi3W2W3); | |
12013 | } // end of if(dM011) | |
12014 | ||
12015 | // <<w2 w3 cos n(psi1-phi2-phi3)>>: | |
12016 | Double_t cosP1nPsi1M1nPhi2MPhi3W2W3 = 0.; | |
12017 | if(dM011) | |
12018 | { | |
12019 | cosP1nPsi1M1nPhi2MPhi3W2W3 = (p1n0kRe*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.))+2.*p1n0kIm*dReQ1n1k*dImQ1n1k | |
12020 | - 1.*(p1n0kRe*dReQ2n2k+p1n0kIm*dImQ2n2k) | |
46b94261 | 12021 | - 2.*s1p1k*dReQ1n1k |
489d5531 | 12022 | + 2.*q1n2kRe) |
12023 | / dM011; | |
12024 | // fill profile for <<w1 w2 w3 cos n(psi1+phi2)>>: | |
12025 | fDiffFlowCorrectionTermsForNUAPro[t][pe][1][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],cosP1nPsi1M1nPhi2MPhi3W2W3,dM011); | |
12026 | // histogram to store <w1 w2 w3 cos n(psi1+phi2)> e-b-e (needed in some other methods): | |
12027 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][1][3]->SetBinContent(b,cosP1nPsi1M1nPhi2MPhi3W2W3); | |
12028 | } // end of if(dM011) | |
12029 | ||
12030 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
46b94261 | 12031 | |
57340a27 | 12032 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUACosTermsUsingParticleWeights(TString type, TString ptOrEta) |
12033 | ||
489d5531 | 12034 | |
12035 | //================================================================================================================================ | |
12036 | ||
12037 | ||
12038 | void AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights(TString type, TString ptOrEta) | |
12039 | { | |
12040 | // Calculate correction terms for non-uniform acceptance for differential flow (sin terms). | |
12041 | ||
12042 | // Results are stored in fDiffFlowCorrectionTermsForNUAPro[t][pe][0][cti], where cti runs as follows: | |
12043 | // 0: <<sin n(psi1)>> | |
12044 | // 1: <<w2 sin n(psi1+phi2)>> | |
12045 | // 2: <<w2 w3 sin n(psi1+phi2-phi3)>> | |
12046 | // 3: <<w2 w3 sin n(psi1-phi2-phi3)>>: | |
12047 | // 4: | |
12048 | // 5: | |
12049 | // 6: | |
12050 | ||
12051 | // real and imaginary parts of weighted Q-vectors evaluated in harmonics n, 2n, 3n and 4n: | |
12052 | Double_t dReQ1n1k = (*fReQ)(0,1); | |
12053 | Double_t dReQ2n2k = (*fReQ)(1,2); | |
12054 | //Double_t dReQ1n3k = (*fReQ)(0,3); | |
12055 | //Double_t dReQ4n4k = (*fReQ)(3,4); | |
12056 | Double_t dImQ1n1k = (*fImQ)(0,1); | |
12057 | Double_t dImQ2n2k = (*fImQ)(1,2); | |
12058 | //Double_t dImQ1n3k = (*fImQ)(0,3); | |
12059 | //Double_t dImQ4n4k = (*fImQ)(3,4); | |
12060 | ||
12061 | // S^M_{p,k} (see .h file for the definition of fSMpk): | |
12062 | Double_t dSM1p1k = (*fSMpk)(0,1); | |
12063 | Double_t dSM1p2k = (*fSMpk)(0,2); | |
12064 | Double_t dSM2p1k = (*fSMpk)(1,1); | |
12065 | ||
12066 | Int_t t = -1; // type flag | |
12067 | Int_t pe = -1; // ptEta flag | |
12068 | ||
12069 | if(type == "RP") | |
12070 | { | |
12071 | t = 0; | |
12072 | } else if(type == "POI") | |
12073 | { | |
12074 | t = 1; | |
12075 | } | |
12076 | ||
12077 | if(ptOrEta == "Pt") | |
12078 | { | |
12079 | pe = 0; | |
12080 | } else if(ptOrEta == "Eta") | |
12081 | { | |
12082 | pe = 1; | |
12083 | } | |
12084 | ||
12085 | Int_t nBinsPtEta[2] = {fnBinsPt,fnBinsEta}; | |
12086 | Double_t minPtEta[2] = {fPtMin,fEtaMin}; | |
12087 | //Double_t maxPtEta[2] = {fPtMax,fEtaMax}; | |
12088 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
12089 | ||
12090 | // looping over all bins and calculating correction terms: | |
12091 | for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
12092 | { | |
12093 | // real and imaginary parts of p_{m*n,0} (non-weighted Q-vector evaluated for POIs in particular pt or eta bin): | |
12094 | Double_t p1n0kRe = 0.; | |
12095 | Double_t p1n0kIm = 0.; | |
12096 | ||
12097 | // number of POIs in particular pt or eta bin: | |
12098 | Double_t mp = 0.; | |
12099 | ||
12100 | // 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): | |
12101 | Double_t q1n2kRe = 0.; | |
12102 | Double_t q1n2kIm = 0.; | |
12103 | Double_t q2n1kRe = 0.; | |
12104 | Double_t q2n1kIm = 0.; | |
46b94261 | 12105 | |
489d5531 | 12106 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) |
12107 | Double_t s1p1k = 0.; | |
12108 | Double_t s1p2k = 0.; | |
46b94261 | 12109 | |
489d5531 | 12110 | // number of particles which are both RPs and POIs in particular pt or eta bin: |
46b94261 | 12111 | Double_t mq = 0.; |
489d5531 | 12112 | |
12113 | // M0111 from Eq. (118) in QC2c (to be improved (notation)) | |
12114 | Double_t dM01 = 0.; | |
12115 | Double_t dM011 = 0.; | |
12116 | ||
12117 | if(type == "POI") | |
12118 | { | |
12119 | // q_{m*n,k}: | |
12120 | q1n2kRe = fReRPQ1dEBE[2][pe][0][2]->GetBinContent(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
12121 | * fReRPQ1dEBE[2][pe][0][2]->GetBinEntries(fReRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
12122 | q1n2kIm = fImRPQ1dEBE[2][pe][0][2]->GetBinContent(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)) | |
12123 | * fImRPQ1dEBE[2][pe][0][2]->GetBinEntries(fImRPQ1dEBE[2][pe][0][2]->GetBin(b)); | |
12124 | q2n1kRe = fReRPQ1dEBE[2][pe][1][1]->GetBinContent(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
12125 | * fReRPQ1dEBE[2][pe][1][1]->GetBinEntries(fReRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
12126 | q2n1kIm = fImRPQ1dEBE[2][pe][1][1]->GetBinContent(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)) | |
12127 | * fImRPQ1dEBE[2][pe][1][1]->GetBinEntries(fImRPQ1dEBE[2][pe][1][1]->GetBin(b)); | |
12128 | 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 | 12129 | |
489d5531 | 12130 | s1p1k = pow(fs1dEBE[2][pe][1]->GetBinContent(b)*fs1dEBE[2][pe][1]->GetBinEntries(b),1.); |
12131 | s1p2k = pow(fs1dEBE[2][pe][2]->GetBinContent(b)*fs1dEBE[2][pe][2]->GetBinEntries(b),1.); | |
12132 | }else if(type == "RP") | |
12133 | { | |
12134 | // q_{m*n,k}: (Remark: m=1 is 0, k=0 iz zero (to be improved!)) | |
12135 | q1n2kRe = fReRPQ1dEBE[0][pe][0][2]->GetBinContent(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
12136 | * fReRPQ1dEBE[0][pe][0][2]->GetBinEntries(fReRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
12137 | q1n2kIm = fImRPQ1dEBE[0][pe][0][2]->GetBinContent(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)) | |
12138 | * fImRPQ1dEBE[0][pe][0][2]->GetBinEntries(fImRPQ1dEBE[0][pe][0][2]->GetBin(b)); | |
12139 | q2n1kRe = fReRPQ1dEBE[0][pe][1][1]->GetBinContent(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
12140 | * fReRPQ1dEBE[0][pe][1][1]->GetBinEntries(fReRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
12141 | q2n1kIm = fImRPQ1dEBE[0][pe][1][1]->GetBinContent(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)) | |
12142 | * fImRPQ1dEBE[0][pe][1][1]->GetBinEntries(fImRPQ1dEBE[0][pe][1][1]->GetBin(b)); | |
12143 | // s_{1,1}, s_{1,2} and s_{1,3} // to be improved (add explanation) | |
12144 | s1p1k = pow(fs1dEBE[0][pe][1]->GetBinContent(b)*fs1dEBE[0][pe][1]->GetBinEntries(b),1.); | |
12145 | s1p2k = pow(fs1dEBE[0][pe][2]->GetBinContent(b)*fs1dEBE[0][pe][2]->GetBinEntries(b),1.); | |
12146 | //s1p3k = pow(fs1dEBE[0][pe][3]->GetBinContent(b)*fs1dEBE[0][pe][3]->GetBinEntries(b),1.); | |
3b552efe | 12147 | } |
12148 | ||
12149 | if(type == "POI") | |
12150 | { | |
12151 | // p_{m*n,k}: | |
489d5531 | 12152 | p1n0kRe = fReRPQ1dEBE[1][pe][0][0]->GetBinContent(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)) |
12153 | * fReRPQ1dEBE[1][pe][0][0]->GetBinEntries(fReRPQ1dEBE[1][pe][0][0]->GetBin(b)); | |
12154 | p1n0kIm = fImRPQ1dEBE[1][pe][0][0]->GetBinContent(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)) | |
3b552efe | 12155 | * fImRPQ1dEBE[1][pe][0][0]->GetBinEntries(fImRPQ1dEBE[1][pe][0][0]->GetBin(b)); |
12156 | 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 | 12157 | // M01 from Eq. (118) in QC2c (to be improved (notation)): |
3b552efe | 12158 | dM01 = mp*dSM1p1k-s1p1k; |
12159 | dM011 = mp*(dSM2p1k-dSM1p2k) | |
12160 | - 2.*(s1p1k*dSM1p1k-s1p2k); | |
12161 | // typeFlag = RP (0) or POI (1): | |
12162 | t = 1; | |
489d5531 | 12163 | } else if(type == "RP") |
3b552efe | 12164 | { |
489d5531 | 12165 | // to be improved (cross-checked): |
12166 | p1n0kRe = fReRPQ1dEBE[0][pe][0][0]->GetBinContent(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
12167 | * fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
12168 | p1n0kIm = fImRPQ1dEBE[0][pe][0][0]->GetBinContent(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)) | |
12169 | * fImRPQ1dEBE[0][pe][0][0]->GetBinEntries(fImRPQ1dEBE[0][pe][0][0]->GetBin(b)); | |
12170 | mp = fReRPQ1dEBE[0][pe][0][0]->GetBinEntries(fReRPQ1dEBE[0][pe][0][0]->GetBin(b)); // to be improved (cross-checked by accessing other profiles here) | |
12171 | // M01 from Eq. (118) in QC2c (to be improved (notation)): | |
3b552efe | 12172 | dM01 = mp*dSM1p1k-s1p1k; |
12173 | dM011 = mp*(dSM2p1k-dSM1p2k) | |
489d5531 | 12174 | - 2.*(s1p1k*dSM1p1k-s1p2k); |
12175 | // typeFlag = RP (0) or POI (1): | |
3b552efe | 12176 | t = 0; |
12177 | } | |
12178 | ||
489d5531 | 12179 | // <<sin n(psi1)>>: |
12180 | Double_t sinP1nPsi = 0.; | |
12181 | if(mp) | |
12182 | { | |
12183 | sinP1nPsi = p1n0kIm/mp; | |
12184 | ||
12185 | // fill profile for <<sin n(psi1)>>: | |
12186 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][0]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi,mp); | |
12187 | // histogram to store <sin n(psi1)> e-b-e (needed in some other methods): | |
12188 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][0]->SetBinContent(b,sinP1nPsi); | |
46b94261 | 12189 | } // end of if(mp) |
12190 | ||
489d5531 | 12191 | // <<w2 sin n(psi1+phi2)>>: |
12192 | Double_t sinP1nPsiP1nPhiW2 = 0.; | |
12193 | if(dM01) | |
12194 | { | |
12195 | sinP1nPsiP1nPhiW2 = (p1n0kRe*dImQ1n1k+p1n0kIm*dReQ1n1k-q2n1kIm)/(dM01); | |
12196 | // fill profile for <<w2 sin n(psi1+phi2)>>: | |
12197 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][1]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsiP1nPhiW2,dM01); | |
12198 | // histogram to store <w2 sin n(psi1+phi2)> e-b-e (needed in some other methods): | |
12199 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][1]->SetBinContent(b,sinP1nPsiP1nPhiW2); | |
12200 | } // end of if(mp*dMult-mq) | |
12201 | ||
12202 | // <<w2 w3 sin n(psi1+phi2-phi3)>>: | |
12203 | Double_t sinP1nPsi1P1nPhi2MPhi3W2W3 = 0.; | |
12204 | if(dM011) | |
12205 | { | |
46b94261 | 12206 | sinP1nPsi1P1nPhi2MPhi3W2W3 = (p1n0kIm*(pow(dImQ1n1k,2.)+pow(dReQ1n1k,2.)) |
12207 | - p1n0kIm*dSM1p2k | |
12208 | + q2n1kRe*dImQ1n1k-q2n1kIm*dReQ1n1k | |
12209 | - s1p1k*dImQ1n1k | |
12210 | + 2.*q1n2kIm) | |
12211 | / dM011; | |
489d5531 | 12212 | // fill profile for <<w2 w3 sin n(psi1+phi2-phi3)>>: |
12213 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][2]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1P1nPhi2MPhi3W2W3,dM011); | |
12214 | // histogram to store <w2 w3 sin n(psi1+phi2-phi3)> e-b-e (needed in some other methods): | |
12215 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][2]->SetBinContent(b,sinP1nPsi1P1nPhi2MPhi3W2W3); | |
12216 | } // end of if(dM011) | |
12217 | ||
12218 | // <<w2 w3 sin n(psi1-phi2-phi3)>>: | |
12219 | Double_t sinP1nPsi1M1nPhi2MPhi3W2W3 = 0.; | |
12220 | if(dM011) | |
12221 | { | |
12222 | sinP1nPsi1M1nPhi2MPhi3W2W3 = (p1n0kIm*(pow(dReQ1n1k,2.)-pow(dImQ1n1k,2.))-2.*p1n0kRe*dReQ1n1k*dImQ1n1k | |
12223 | + 1.*(p1n0kRe*dImQ2n2k-p1n0kIm*dReQ2n2k) | |
46b94261 | 12224 | + 2.*s1p1k*dImQ1n1k |
489d5531 | 12225 | - 2.*q1n2kIm) |
12226 | / dM011; | |
12227 | // fill profile for <<w2 w3 sin n(psi1-phi2-phi3)>>: | |
12228 | fDiffFlowCorrectionTermsForNUAPro[t][pe][0][3]->Fill(minPtEta[pe]+(b-1)*binWidthPtEta[pe],sinP1nPsi1M1nPhi2MPhi3W2W3,dM011); | |
12229 | // histogram to store <w2 w3 sin n(psi1-phi2-phi3)> e-b-e (needed in some other methods): | |
12230 | fDiffFlowCorrectionTermsForNUAEBE[t][pe][0][3]->SetBinContent(b,sinP1nPsi1M1nPhi2MPhi3W2W3); | |
12231 | } // end of if(dM011) | |
12232 | ||
12233 | } // end of for(Int_t b=1;b<=nBinsPtEta[pe];b++) | |
12234 | ||
12235 | } // end of AliFlowAnalysisWithQCumulants::CalculateDiffFlowCorrectionsForNUASinTermsUsingParticleWeights(TString type, TString ptOrEta) | |
12236 | ||
12237 | ||
12238 | //================================================================================================================================ | |
12239 | ||
12240 | ||
0328db2d | 12241 | void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple * const anEvent, TString type, TString ptOrEta) |
489d5531 | 12242 | { |
57340a27 | 12243 | // Evaluate with nested loops correction terms for non-uniform acceptance |
489d5531 | 12244 | // with using particle weights (both sin and cos terms) relevant for differential flow. |
12245 | ||
57340a27 | 12246 | // Remark 1: "w1" in expressions bellow is a particle weight used only for particles which were |
12247 | // flagged both as POI and RP. | |
489d5531 | 12248 | // Remark 2: Reduced correction terms for non-uniform acceptance are evaluated in pt bin number fCrossCheckInPtBinNo |
12249 | // and eta bin number fCrossCheckInEtaBinNo both for RPs and POIs. | |
12250 | // Remark 3: Results are stored in 1 bin profiles fDiffFlowDirectCorrections[t][pe][sc][cti], where first three indices runs as: | |
12251 | // [0=RP,1=POI][0=Pt,1=Eta][0=sin terms,1=cos terms], whilst the cti (correction term index) runs as follows: | |
12252 | // cti: | |
12253 | // 0: <<sc n(psi1)>> | |
12254 | // 1: <<w2 sc n(psi1+phi2)>> | |
12255 | // 2: <<w2 w3 sc n(psi1+phi2-phi3)>> | |
12256 | // 3: <<w2 w3 sc n(psi1-phi2-phi3)>> | |
12257 | // 4: | |
12258 | // 5: | |
12259 | // 6: | |
46b94261 | 12260 | |
489d5531 | 12261 | Int_t typeFlag = -1; |
12262 | Int_t ptEtaFlag = -1; | |
12263 | if(type == "RP") | |
12264 | { | |
12265 | typeFlag = 0; | |
12266 | } else if(type == "POI") | |
12267 | { | |
12268 | typeFlag = 1; | |
12269 | } | |
12270 | if(ptOrEta == "Pt") | |
12271 | { | |
12272 | ptEtaFlag = 0; | |
12273 | } else if(ptOrEta == "Eta") | |
12274 | { | |
12275 | ptEtaFlag = 1; | |
12276 | } | |
12277 | // shortcuts: | |
12278 | Int_t t = typeFlag; | |
12279 | Int_t pe = ptEtaFlag; | |
12280 | ||
12281 | Double_t lowerPtEtaEdge[2] = {fPtMin+(fCrossCheckInPtBinNo-1)*fPtBinWidth,fEtaMin+(fCrossCheckInEtaBinNo-1)*fEtaBinWidth}; | |
12282 | Double_t upperPtEtaEdge[2] = {fPtMin+fCrossCheckInPtBinNo*fPtBinWidth,fEtaMin+fCrossCheckInEtaBinNo*fEtaBinWidth}; | |
12283 | Double_t binWidthPtEta[2] = {fPtBinWidth,fEtaBinWidth}; | |
12284 | ||
12285 | Int_t nPrim = anEvent->NumberOfTracks(); | |
12286 | AliFlowTrackSimple *aftsTrack = NULL; | |
12287 | ||
12288 | Double_t psi1=0., phi2=0., phi3=0.;// phi4=0.;// phi5=0., phi6=0., phi7=0., phi8=0.; | |
12289 | Double_t wPhi2=1., wPhi3=1.; | |
12290 | ||
12291 | Int_t n = fHarmonic; | |
12292 | ||
12293 | // 1'-particle correction terms: | |
12294 | for(Int_t i1=0;i1<nPrim;i1++) | |
12295 | { | |
12296 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 12297 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
12298 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 12299 | { |
12300 | if(ptOrEta == "Pt") | |
12301 | { | |
12302 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
12303 | } else if (ptOrEta == "Eta") | |
12304 | { | |
12305 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 12306 | } |
12307 | } else // this is diff flow of RPs | |
12308 | { | |
489d5531 | 12309 | if(ptOrEta == "Pt") |
12310 | { | |
12311 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
12312 | } else if (ptOrEta == "Eta") | |
12313 | { | |
12314 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 12315 | } |
489d5531 | 12316 | } |
12317 | psi1=aftsTrack->Phi(); | |
12318 | // sin terms: | |
12319 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*psi1),1.); // <<sin(n*(psi1))>> | |
12320 | // cos terms: | |
12321 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][0]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*psi1),1.); // <<cos(n*(psi1))>> | |
12322 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
12323 | ||
12324 | // 2'-particle correction terms: | |
12325 | for(Int_t i1=0;i1<nPrim;i1++) | |
12326 | { | |
12327 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 12328 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
12329 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 12330 | { |
12331 | if(ptOrEta == "Pt") | |
12332 | { | |
12333 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
12334 | } else if (ptOrEta == "Eta") | |
12335 | { | |
12336 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 12337 | } |
12338 | } else // this is diff flow of RPs | |
12339 | { | |
489d5531 | 12340 | if(ptOrEta == "Pt") |
12341 | { | |
12342 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
12343 | } else if (ptOrEta == "Eta") | |
12344 | { | |
12345 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 12346 | } |
489d5531 | 12347 | } |
12348 | psi1=aftsTrack->Phi(); | |
12349 | for(Int_t i2=0;i2<nPrim;i2++) | |
12350 | { | |
12351 | if(i2==i1) continue; | |
12352 | aftsTrack=anEvent->GetTrack(i2); | |
12353 | // RP condition (!(first) particle in the correlator must be RP): | |
12354 | if(!(aftsTrack->InRPSelection())) continue; | |
46b94261 | 12355 | phi2=aftsTrack->Phi(); |
489d5531 | 12356 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); |
12357 | // sin terms: | |
12358 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][0][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,sin(n*(psi1+phi2)),wPhi2); // <<w2 sin(n*(psi1+phi2))>> | |
12359 | // cos terms: | |
12360 | fDiffFlowDirectCorrectionTermsForNUA[t][pe][1][1]->Fill(lowerPtEtaEdge[pe]+binWidthPtEta[pe]/2.,cos(n*(psi1+phi2)),wPhi2); // <<w2 cos(n*(psi1+phi2))>> | |
12361 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
12362 | }//end of for(Int_t i1=0;i1<nPrim;i1++) | |
12363 | ||
12364 | // 3'-particle correction terms: | |
12365 | for(Int_t i1=0;i1<nPrim;i1++) | |
12366 | { | |
12367 | aftsTrack=anEvent->GetTrack(i1); | |
3b552efe | 12368 | // POI condition (first particle in the correlator must be POI): // to be improved (this can be implemented much better) |
12369 | if(typeFlag==1) // this is diff flow of POIs | |
489d5531 | 12370 | { |
12371 | if(ptOrEta == "Pt") | |
12372 | { | |
12373 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
12374 | } else if (ptOrEta == "Eta") | |
12375 | { | |
12376 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InPOISelection())))continue; | |
3b552efe | 12377 | } |
12378 | } else // this is diff flow of RPs | |
12379 | { | |
489d5531 | 12380 | if(ptOrEta == "Pt") |
12381 | { | |
12382 | if(!((aftsTrack->Pt()>=lowerPtEtaEdge[pe] && aftsTrack->Pt()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
12383 | } else if (ptOrEta == "Eta") | |
12384 | { | |
12385 | if(!((aftsTrack->Eta()>=lowerPtEtaEdge[pe] && aftsTrack->Eta()<upperPtEtaEdge[pe]) && (aftsTrack->InRPSelection())))continue; | |
3b552efe | 12386 | } |
489d5531 | 12387 | } |
12388 | psi1=aftsTrack->Phi(); | |
12389 | for(Int_t i2=0;i2<nPrim;i2++) | |
12390 | { | |
12391 | if(i2==i1) continue; | |
12392 | aftsTrack=anEvent->GetTrack(i2); | |
12393 | // RP condition (!(first) particle in the correlator must be RP): | |
12394 | if(!(aftsTrack->InRPSelection())) continue; | |
12395 | phi2=aftsTrack->Phi(); | |
12396 | if(fUsePhiWeights && fPhiWeights) wPhi2 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi2*fnBinsPhi/TMath::TwoPi()))); | |
12397 | for(Int_t i3=0;i3<nPrim;i3++) | |
12398 | { | |
12399 | if(i3==i1||i3==i2) continue; | |
12400 | aftsTrack=anEvent->GetTrack(i3); | |
12401 | // RP condition (!(first) particle in the correlator must be RP): | |
12402 | if(!(aftsTrack->InRPSelection())) continue; | |
12403 | phi3=aftsTrack->Phi(); | |
12404 | if(fUsePhiWeights && fPhiWeights) wPhi3 = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(phi3*fnBinsPhi/TMath::TwoPi()))); | |
12405 | // sin terms: | |
12406 | 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))>> | |
12407 | 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))>> | |
12408 | // cos terms: | |
12409 | 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))>> | |
12410 | 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))>> | |
12411 | }//end of for(Int_t i3=0;i3<nPrim;i3++) | |
12412 | }//end of for(Int_t i2=0;i2<nPrim;i2++) | |
46b94261 | 12413 | }//end of for(Int_t i1=0;i1<nPrim;i1++) |
489d5531 | 12414 | |
12415 | } // end of void AliFlowAnalysisWithQCumulants::EvaluateDiffFlowCorrectionTermsForNUAWithNestedLoopsUsingParticleWeights(AliFlowEventSimple* anEvent, TString type, TString ptOrEta) | |
12416 | ||
2001bc3a | 12417 | //================================================================================================================================ |
12418 | ||
b3dacf6b | 12419 | void AliFlowAnalysisWithQCumulants::CheckPointersUsedInFinish() |
12420 | { | |
12421 | // Check all pointers used in method Finish(). | |
12422 | ||
b77b6434 | 12423 | if(!fAvMultiplicity) |
12424 | { | |
12425 | cout<<endl; | |
12426 | cout<<" WARNING (QC): fAvMultiplicity is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12427 | cout<<endl; | |
12428 | exit(0); | |
12429 | } | |
b3dacf6b | 12430 | if(!fIntFlowCorrelationsPro) |
12431 | { | |
12432 | cout<<endl; | |
12433 | cout<<" WARNING (QC): fIntFlowCorrelationsPro is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12434 | cout<<endl; | |
12435 | exit(0); | |
12436 | } | |
12437 | if(!fIntFlowCorrelationsHist) | |
12438 | { | |
12439 | cout<<endl; | |
12440 | cout<<" WARNING (QC): fIntFlowCorrelationsHist is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12441 | cout<<endl; | |
12442 | exit(0); | |
12443 | } | |
b77b6434 | 12444 | if((fUsePhiWeights||fUsePtWeights||fUseEtaWeights) && !fIntFlowExtraCorrelationsPro) |
12445 | { | |
12446 | cout<<endl; | |
12447 | cout<<" WARNING (QC): fIntFlowExtraCorrelationsPro is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12448 | cout<<endl; | |
12449 | exit(0); | |
12450 | } | |
b3dacf6b | 12451 | for(Int_t power=0;power<2;power++) |
12452 | { | |
12453 | if(!fIntFlowSumOfEventWeights[power]) | |
12454 | { | |
12455 | cout<<endl; | |
12456 | cout<<Form(" WARNING (QC): fIntFlowSumOfEventWeights[%d] is NULL in CheckPointersUsedInFinish() !!!!",power)<<endl; | |
12457 | cout<<endl; | |
12458 | exit(0); | |
12459 | } | |
12460 | } // end of for(Int_t power=0;power<2;power++) | |
12461 | if(!fIntFlowProductOfCorrelationsPro) | |
12462 | { | |
12463 | cout<<endl; | |
12464 | cout<<" WARNING (QC): fIntFlowProductOfCorrelationsPro is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12465 | cout<<endl; | |
12466 | exit(0); | |
12467 | } | |
12468 | if(!fIntFlowSumOfProductOfEventWeights) | |
12469 | { | |
12470 | cout<<endl; | |
12471 | cout<<" WARNING (QC): fIntFlowSumOfProductOfEventWeights is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12472 | cout<<endl; | |
12473 | exit(0); | |
12474 | } | |
12475 | if(!fIntFlowCovariances) | |
12476 | { | |
12477 | cout<<endl; | |
12478 | cout<<" WARNING (QC): fIntFlowCovariances is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12479 | cout<<endl; | |
12480 | exit(0); | |
12481 | } | |
12482 | if(!fIntFlowQcumulants) | |
12483 | { | |
12484 | cout<<endl; | |
12485 | cout<<" WARNING (QC): fIntFlowQcumulants is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12486 | cout<<endl; | |
12487 | exit(0); | |
12488 | } | |
0dd3b008 | 12489 | if(!fIntFlow) |
12490 | { | |
12491 | cout<<endl; | |
12492 | cout<<" WARNING (QC): fIntFlow is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12493 | cout<<endl; | |
12494 | exit(0); | |
12495 | } | |
12496 | if(!fCommonHists) | |
12497 | { | |
12498 | cout<<endl; | |
12499 | cout<<" WARNING (QC): fCommonHists is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12500 | cout<<endl; | |
12501 | exit(0); | |
12502 | } | |
12503 | if(!(fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && fCommonHistsResults8th)) | |
12504 | { | |
12505 | cout<<endl; | |
12506 | cout<<" WARNING (QC): fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th"<<endl; | |
12507 | cout<<" && fCommonHistsResults8th is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12508 | cout<<endl; | |
12509 | exit(0); | |
12510 | } | |
b3dacf6b | 12511 | |
b92ea2b9 | 12512 | // NUA stuff: |
12513 | for(Int_t sc=0;sc<2;sc++) // sin/cos | |
12514 | { | |
12515 | if(!fIntFlowCorrectionTermsForNUAPro[sc]) | |
12516 | { | |
12517 | cout<<endl; | |
12518 | cout<<Form(" WARNING (QC): fIntFlowCorrectionTermsForNUAPro[%d] is NULL in CheckPointersUsedInFinish() !!!!",sc)<<endl; | |
12519 | cout<<endl; | |
12520 | exit(0); | |
12521 | } | |
12522 | if(!fIntFlowCorrectionTermsForNUAHist[sc]) | |
12523 | { | |
12524 | cout<<endl; | |
12525 | cout<<Form(" WARNING (QC): fIntFlowCorrectionTermsForNUAHist[%d] is NULL in CheckPointersUsedInFinish() !!!!",sc)<<endl; | |
12526 | cout<<endl; | |
12527 | exit(0); | |
12528 | } | |
12529 | for(Int_t lq=0;lq<2;lq++) // linear/quadratic | |
12530 | { | |
12531 | if(!fIntFlowSumOfEventWeightsNUA[sc][lq]) | |
12532 | { | |
12533 | cout<<endl; | |
12534 | cout<<Form(" WARNING (QC): fIntFlowSumOfEventWeightsNUA[%d][%d] is NULL in CheckPointersUsedInFinish() !!!!",sc,lq)<<endl; | |
12535 | cout<<endl; | |
12536 | exit(0); | |
12537 | } | |
12538 | } // end of for(Int_t lq=0;lq<2;lq++) // linear/quadratic | |
12539 | } // end of for(Int_t power=0;power<2;power++) | |
12540 | if(!fIntFlowProductOfCorrectionTermsForNUAPro) | |
12541 | { | |
12542 | cout<<endl; | |
12543 | cout<<" WARNING (QC): fIntFlowProductOfCorrectionTermsForNUAPro is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12544 | cout<<endl; | |
12545 | exit(0); | |
12546 | } | |
12547 | if(!fIntFlowSumOfProductOfEventWeightsNUA) | |
12548 | { | |
12549 | cout<<endl; | |
12550 | cout<<" WARNING (QC): fIntFlowSumOfProductOfEventWeightsNUA is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12551 | cout<<endl; | |
12552 | exit(0); | |
12553 | } | |
12554 | if(!fIntFlowCovariancesNUA) | |
12555 | { | |
12556 | cout<<endl; | |
12557 | cout<<" WARNING (QC): fIntFlowCovariancesNUA is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12558 | cout<<endl; | |
12559 | exit(0); | |
12560 | } | |
12561 | if(!fIntFlowQcumulantsErrorSquaredRatio) | |
12562 | { | |
12563 | cout<<endl; | |
12564 | cout<<" WARNING (QC): fIntFlowQcumulantsErrorSquaredRatio is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12565 | cout<<endl; | |
12566 | exit(0); | |
12567 | } | |
12568 | if(!fIntFlowDetectorBias) | |
12569 | { | |
12570 | cout<<endl; | |
12571 | cout<<" WARNING (QC): fIntFlowDetectorBias is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12572 | cout<<endl; | |
12573 | exit(0); | |
12574 | } | |
12575 | ||
b3dacf6b | 12576 | // Versus multiplicity: |
12577 | if(!fCalculateCumulantsVsM){return;} | |
b77b6434 | 12578 | for(Int_t co=0;co<=3;co++) // cumulant order |
b3dacf6b | 12579 | { |
b77b6434 | 12580 | if(!fIntFlowQcumulantsVsM[co]) |
b3dacf6b | 12581 | { |
12582 | cout<<endl; | |
b77b6434 | 12583 | cout<<Form(" WARNING (QC): fIntFlowQcumulantsVsM[%d] is NULL in CheckPointersUsedInFinish() !!!!",co)<<endl; |
b3dacf6b | 12584 | cout<<endl; |
12585 | exit(0); | |
12586 | } | |
b77b6434 | 12587 | if(!fIntFlowVsM[co]) |
b3dacf6b | 12588 | { |
12589 | cout<<endl; | |
b77b6434 | 12590 | cout<<Form(" WARNING (QC): fIntFlowVsM[%d] is NULL in CheckPointersUsedInFinish() !!!!",co)<<endl; |
12591 | cout<<endl; | |
12592 | exit(0); | |
12593 | } | |
12594 | if(!fIntFlowDetectorBiasVsM[co]) | |
12595 | { | |
12596 | cout<<endl; | |
12597 | cout<<Form(" WARNING (QC): fIntFlowDetectorBiasVsM[%d] is NULL in CheckPointersUsedInFinish() !!!!",co)<<endl; | |
12598 | cout<<endl; | |
12599 | exit(0); | |
12600 | } | |
12601 | } // end of for(Int_t c0=0;c0<=3;c0++) // cumulant order | |
12602 | for(Int_t ci=0;ci<=3;ci++) // correlation index | |
12603 | { | |
12604 | if(!fIntFlowCorrelationsVsMPro[ci]) | |
12605 | { | |
12606 | cout<<endl; | |
12607 | cout<<Form(" WARNING (QC): fIntFlowCorrelationsVsMPro[%d] is NULL in CheckPointersUsedInFinish() !!!!",ci)<<endl; | |
b3dacf6b | 12608 | cout<<endl; |
12609 | exit(0); | |
12610 | } | |
b77b6434 | 12611 | if(!fIntFlowCorrelationsVsMHist[ci]) |
b92ea2b9 | 12612 | { |
12613 | cout<<endl; | |
b77b6434 | 12614 | cout<<Form(" WARNING (QC): fIntFlowCorrelationsVsMHist[%d] is NULL in CheckPointersUsedInFinish() !!!!",ci)<<endl; |
b92ea2b9 | 12615 | cout<<endl; |
12616 | exit(0); | |
12617 | } | |
b3dacf6b | 12618 | for(Int_t power=0;power<2;power++) |
12619 | { | |
12620 | if(!fIntFlowSumOfEventWeightsVsM[ci][power]) | |
12621 | { | |
12622 | cout<<endl; | |
12623 | cout<<Form(" WARNING (QC): fIntFlowSumOfEventWeightsVsM[%d][%d] is NULL in CheckPointersUsedInFinish() !!!!",ci,power)<<endl; | |
12624 | cout<<endl; | |
12625 | exit(0); | |
12626 | } | |
12627 | } // end of for(Int_t power=0;power<2;power++) | |
12628 | } // end of for(Int_t ci=0;ci<=3;ci++) // correlation index | |
12629 | for(Int_t i=0;i<6;i++) | |
12630 | { | |
12631 | if(!fIntFlowProductOfCorrelationsVsMPro[i]) | |
12632 | { | |
12633 | cout<<endl; | |
12634 | cout<<Form(" WARNING (QC): fIntFlowProductOfCorrelationsVsMPro[%d] is NULL in CheckPointersUsedInFinish() !!!!",i)<<endl; | |
12635 | cout<<endl; | |
12636 | exit(0); | |
12637 | } | |
12638 | if(!fIntFlowSumOfProductOfEventWeightsVsM[i]) | |
12639 | { | |
12640 | cout<<endl; | |
12641 | cout<<Form(" WARNING (QC): fIntFlowSumOfProductOfEventWeightsVsM[%d] is NULL in CheckPointersUsedInFinish() !!!!",i)<<endl; | |
12642 | cout<<endl; | |
12643 | exit(0); | |
12644 | } | |
12645 | if(!fIntFlowCovariancesVsM[i]) | |
12646 | { | |
12647 | cout<<endl; | |
12648 | cout<<Form(" WARNING (QC): fIntFlowCovariancesVsM[%d] is NULL in CheckPointersUsedInFinish() !!!!",i)<<endl; | |
12649 | cout<<endl; | |
12650 | exit(0); | |
12651 | } | |
12652 | } // end of for(Int_t i=0;i<6;i++) | |
12653 | if(!fIntFlowRebinnedInM) | |
12654 | { | |
12655 | cout<<endl; | |
12656 | cout<<" WARNING (QC): fIntFlowRebinnedInM is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12657 | cout<<endl; | |
12658 | exit(0); | |
12659 | } | |
12660 | if(!fIntFlowQcumulantsRebinnedInM) | |
12661 | { | |
12662 | cout<<endl; | |
12663 | cout<<" WARNING (QC): fIntFlowQcumulantsRebinnedInM is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
12664 | cout<<endl; | |
12665 | exit(0); | |
12666 | } | |
12667 | ||
12668 | } // end of void AliFlowAnalysisWithQCumulants::CheckPointersUsedInFinish() | |
12669 | ||
12670 | //================================================================================================================================ | |
12671 | ||
12672 | void AliFlowAnalysisWithQCumulants::CheckPointersUsedInMake() | |
12673 | { | |
12674 | // Check all pointers used in method Make(). | |
12675 | ||
b77b6434 | 12676 | if(!fAvMultiplicity) |
12677 | { | |
12678 | cout<<endl; | |
12679 | cout<<" WARNING (QC): fAvMultiplicity is NULL in CheckPointersUsedInMake() !!!!"<<endl; | |
12680 | cout<<endl; | |
12681 | exit(0); | |
12682 | } | |
12683 | if((fUsePhiWeights||fUsePtWeights||fUseEtaWeights) && !fIntFlowExtraCorrelationsPro) | |
12684 | { | |
12685 | cout<<endl; | |
12686 | cout<<" WARNING (QC): fIntFlowExtraCorrelationsPro is NULL in CheckPointersUsedInMake() !!!!"<<endl; | |
12687 | cout<<endl; | |
12688 | exit(0); | |
12689 | } | |
b3dacf6b | 12690 | |
12691 | } // end of void AliFlowAnalysisWithQCumulants::CheckPointersUsedInMake() | |
12692 | ||
57340a27 | 12693 |