]>
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. * | |
d66d46f7 | 14 | **************************************************************************/ |
15 | ||
489d5531 | 16 | /* $Id$ */ |
17 | ||
d66d46f7 | 18 | /********************************************************** |
19 | * In this class azimuthal correlators in mixed harmonics * | |
20 | * are implemented in terms of Q-vectors. This approach * | |
21 | * doesn't require evaluation of nested loops. This class * | |
22 | * can be used to: * | |
23 | * * | |
24 | * a) Extract subdominant harmonics (like v1 and v4); * | |
5c078806 | 25 | * b) Study flow of two-particle resonances; * |
26 | * c) Study strong parity violation. * | |
d66d46f7 | 27 | * * |
28 | * Author: Ante Bilandzic (abilandzic@gmail.com) * | |
489d5531 | 29 | *********************************************************/ |
30 | ||
31 | #define AliFlowAnalysisWithMixedHarmonics_cxx | |
32 | ||
33 | #include "Riostream.h" | |
34 | #include "AliFlowCommonConstants.h" | |
35 | #include "AliFlowCommonHist.h" | |
36 | #include "AliFlowCommonHistResults.h" | |
37 | ||
38 | #include "TMath.h" | |
39 | #include "TFile.h" | |
40 | #include "TList.h" | |
d66d46f7 | 41 | #include "TProfile.h" |
489d5531 | 42 | #include "TProfile2D.h" |
43 | ||
44 | #include "AliFlowEventSimple.h" | |
45 | #include "AliFlowTrackSimple.h" | |
46 | #include "AliFlowAnalysisWithMixedHarmonics.h" | |
47 | ||
48 | class TH1; | |
49 | class TList; | |
50 | ClassImp(AliFlowAnalysisWithMixedHarmonics) | |
51 | ||
d66d46f7 | 52 | //================================================================================================================ |
489d5531 | 53 | AliFlowAnalysisWithMixedHarmonics::AliFlowAnalysisWithMixedHarmonics(): |
d66d46f7 | 54 | fHistList(NULL), |
489d5531 | 55 | fHistListName(NULL), |
e999459d | 56 | fHarmonic(1), |
d66d46f7 | 57 | fAnalysisLabel(NULL), |
58 | fAnalysisSettings(NULL), | |
b71a354b | 59 | fNoOfMultipicityBins(100), |
60 | fMultipicityBinWidth(1), | |
61 | fMinMultiplicity(3), | |
e999459d | 62 | fOppositeChargesPOI(kFALSE), |
63 | fEvaluateDifferential3pCorrelator(kFALSE), | |
b71a354b | 64 | fCorrectForDetectorEffects(kFALSE), |
5c078806 | 65 | fPrintOnTheScreen(kTRUE), |
b71a354b | 66 | fCalculateVsM(kFALSE), |
67 | fShowBinLabelsVsM(kFALSE), | |
d66d46f7 | 68 | fCommonHists(NULL), |
489d5531 | 69 | fnBinsPhi(0), |
70 | fPhiMin(0), | |
71 | fPhiMax(0), | |
72 | fPhiBinWidth(0), | |
73 | fnBinsPt(0), | |
74 | fPtMin(0), | |
75 | fPtMax(0), | |
76 | fPtBinWidth(0), | |
77 | fnBinsEta(0), | |
78 | fEtaMin(0), | |
79 | fEtaMax(0), | |
d66d46f7 | 80 | fEtaBinWidth(0), |
489d5531 | 81 | fWeightsList(NULL), |
82 | fUsePhiWeights(kFALSE), | |
83 | fUsePtWeights(kFALSE), | |
84 | fUseEtaWeights(kFALSE), | |
85 | fUseParticleWeights(NULL), | |
86 | fPhiWeights(NULL), | |
87 | fPtWeights(NULL), | |
d66d46f7 | 88 | fEtaWeights(NULL), |
489d5531 | 89 | fReQnk(NULL), |
90 | fImQnk(NULL), | |
d66d46f7 | 91 | fSpk(NULL), |
ecac11c2 | 92 | fProfileList(NULL), |
d66d46f7 | 93 | f3pCorrelatorPro(NULL), |
97d82c42 | 94 | f5pCorrelatorPro(NULL), |
d66d46f7 | 95 | fNonIsotropicTermsPro(NULL), |
96 | f3pCorrelatorVsMPro(NULL), | |
41e6d9e4 | 97 | f3pPOICorrelatorVsM(NULL), |
d66d46f7 | 98 | fNonIsotropicTermsVsMPro(NULL), |
e409ac85 | 99 | f2pCorrelatorCosPsiDiff(NULL), |
100 | f2pCorrelatorCosPsiSum(NULL), | |
101 | f2pCorrelatorSinPsiDiff(NULL), | |
102 | f2pCorrelatorSinPsiSum(NULL), | |
d66d46f7 | 103 | fResultsList(NULL), |
104 | f3pCorrelatorHist(NULL), | |
105 | fDetectorBiasHist(NULL), | |
e558a733 | 106 | f3pCorrelatorVsMHist(NULL), |
e409ac85 | 107 | fDetectorBiasVsMHist(NULL) |
489d5531 | 108 | { |
109 | // Constructor. | |
5c078806 | 110 | |
111 | // Base list to hold all output objects: | |
d66d46f7 | 112 | fHistList = new TList(); |
489d5531 | 113 | fHistListName = new TString("cobjMH"); |
114 | fHistList->SetName(fHistListName->Data()); | |
d66d46f7 | 115 | fHistList->SetOwner(kTRUE); |
116 | ||
489d5531 | 117 | // List to hold histograms with phi, pt and eta weights: |
d66d46f7 | 118 | fWeightsList = new TList(); |
119 | ||
ecac11c2 | 120 | // List to hold all all-event profiles: |
121 | fProfileList = new TList(); | |
122 | ||
489d5531 | 123 | // List to hold objects with final results: |
d66d46f7 | 124 | fResultsList = new TList(); |
5c078806 | 125 | |
126 | // Initialize all arrays: | |
127 | this->InitializeArrays(); | |
489d5531 | 128 | |
129 | } // AliFlowAnalysisWithMixedHarmonics::AliFlowAnalysisWithMixedHarmonics() | |
130 | ||
131 | //================================================================================================================ | |
132 | ||
133 | AliFlowAnalysisWithMixedHarmonics::~AliFlowAnalysisWithMixedHarmonics() | |
134 | { | |
135 | // Destructor. | |
136 | ||
137 | delete fHistList; | |
138 | ||
139 | } // end of AliFlowAnalysisWithMixedHarmonics::~AliFlowAnalysisWithMixedHarmonics() | |
140 | ||
141 | //================================================================================================================ | |
142 | ||
143 | void AliFlowAnalysisWithMixedHarmonics::Init() | |
d66d46f7 | 144 | { |
145 | // Initialize and book all objects. | |
146 | ||
147 | // a) Cross check if the user settings make sense before starting; | |
148 | // b) Access all common constants; | |
489d5531 | 149 | // c) Book and nest all lists in the base list fHistList; |
d66d46f7 | 150 | // d) Book common control histograms; |
151 | // e) Book all event-by-event quantities; | |
152 | // f) Book all all-event quantities; | |
5c078806 | 153 | // g) Book and fill histograms to hold phi, pt and eta weights; |
e999459d | 154 | // h) Store harmonic n used in cos[n*(phi1+phi2-2phi3)] and cos[n*(psi1+psi2-2phi3)]. |
5c078806 | 155 | |
489d5531 | 156 | //save old value and prevent histograms from being added to directory |
157 | //to avoid name clashes in case multiple analaysis objects are used | |
158 | //in an analysis | |
159 | Bool_t oldHistAddStatus = TH1::AddDirectoryStatus(); | |
160 | TH1::AddDirectory(kFALSE); | |
161 | ||
5c078806 | 162 | TH1::SetDefaultSumw2(); |
163 | ||
489d5531 | 164 | this->CrossCheckSettings(); |
d66d46f7 | 165 | this->AccessConstants(); |
166 | this->BookAndNestAllLists(); | |
489d5531 | 167 | this->BookProfileHoldingSettings(); |
d66d46f7 | 168 | this->BookCommonHistograms(); |
169 | this->BookAllEventByEventQuantities(); | |
170 | this->BookAllAllEventQuantities(); | |
489d5531 | 171 | this->BookAndFillWeightsHistograms(); |
e999459d | 172 | this->StoreHarmonic(); |
489d5531 | 173 | |
174 | TH1::AddDirectory(oldHistAddStatus); | |
5c078806 | 175 | |
489d5531 | 176 | } // end of void AliFlowAnalysisWithMixedHarmonics::Init() |
177 | ||
178 | //================================================================================================================ | |
179 | ||
180 | void AliFlowAnalysisWithMixedHarmonics::Make(AliFlowEventSimple* anEvent) | |
181 | { | |
182 | // Running over data only in this method. | |
d66d46f7 | 183 | |
5c078806 | 184 | // a) Check all pointers used in this method; |
185 | // b) Define local variables; | |
186 | // c) Fill common control histograms; | |
187 | // d) Loop over data and calculate e-b-e quantities Q_{n,k} and S_{p,k}; | |
e999459d | 188 | // e) Calculate 3-p azimuthal correlator cos[n(phi1+phi2-2*phi3)] and non-isotropic terms in terms of Q_{n,k} and S_{p,k}; |
189 | // f) Calculate differential 3-p azimuthal correlator cos[n(psi1+psi2-2*phi3)] in terms of Q_{2n} and p_{n}: | |
5c078806 | 190 | // g) Reset all event-by-event quantities. |
d66d46f7 | 191 | |
5c078806 | 192 | // a) Check all pointers used in this method: |
d66d46f7 | 193 | this->CheckPointersUsedInMake(); |
194 | ||
5c078806 | 195 | // b) Define local variables: |
489d5531 | 196 | Double_t dPhi = 0.; // azimuthal angle in the laboratory frame |
197 | Double_t dPt = 0.; // transverse momentum | |
198 | Double_t dEta = 0.; // pseudorapidity | |
199 | Double_t wPhi = 1.; // phi weight | |
200 | Double_t wPt = 1.; // pt weight | |
d66d46f7 | 201 | Double_t wEta = 1.; // eta weight |
202 | AliFlowTrackSimple *aftsTrack = NULL; // simple track | |
203 | ||
5c078806 | 204 | // c) Fill common control histograms: |
d66d46f7 | 205 | fCommonHists->FillControlHistograms(anEvent); |
206 | ||
5c078806 | 207 | // d) Loop over data and calculate e-b-e quantities: |
e999459d | 208 | Int_t nPrim = anEvent->NumberOfTracks(); // nPrim = total number of primary tracks, i.e. nPrim = nRP + nPOI |
489d5531 | 209 | // nRP = # of particles used to determine the reaction plane ("Reference Particles"); |
210 | // nPOI = # of particles of interest for a detailed flow analysis ("Particles of Interest"); | |
41e6d9e4 | 211 | |
212 | Int_t nRefMult = anEvent->GetReferenceMultiplicity(); | |
213 | ||
d66d46f7 | 214 | // Start loop over data: |
489d5531 | 215 | for(Int_t i=0;i<nPrim;i++) |
216 | { | |
217 | aftsTrack=anEvent->GetTrack(i); | |
218 | if(aftsTrack) | |
219 | { | |
220 | if(!(aftsTrack->InRPSelection() || aftsTrack->InPOISelection())) continue; // consider only tracks which are either RPs or POIs | |
e999459d | 221 | Int_t n = fHarmonic; |
489d5531 | 222 | if(aftsTrack->InRPSelection()) // checking RP condition: |
223 | { | |
224 | dPhi = aftsTrack->Phi(); | |
225 | dPt = aftsTrack->Pt(); | |
226 | dEta = aftsTrack->Eta(); | |
227 | if(fUsePhiWeights && fPhiWeights && fnBinsPhi) // determine phi-weight for this particle: | |
228 | { | |
229 | wPhi = fPhiWeights->GetBinContent(1+(Int_t)(TMath::Floor(dPhi*fnBinsPhi/TMath::TwoPi()))); | |
230 | } | |
231 | if(fUsePtWeights && fPtWeights && fnBinsPt) // determine pt-weight for this particle: | |
232 | { | |
233 | wPt = fPtWeights->GetBinContent(1+(Int_t)(TMath::Floor((dPt-fPtMin)/fPtBinWidth))); | |
234 | } | |
235 | if(fUseEtaWeights && fEtaWeights && fEtaBinWidth) // determine eta-weight for this particle: | |
236 | { | |
237 | wEta = fEtaWeights->GetBinContent(1+(Int_t)(TMath::Floor((dEta-fEtaMin)/fEtaBinWidth))); | |
238 | } | |
97d82c42 | 239 | // Calculate Re[Q_{m,k}] and Im[Q_{m,k}], (m = 1,2,3,4,5,6 and k = 0,1,2,3) for this event: |
240 | for(Int_t m=0;m<6;m++) | |
489d5531 | 241 | { |
e999459d | 242 | for(Int_t k=0;k<4;k++) // to be improved (what is the maximum k that I need?) |
489d5531 | 243 | { |
244 | (*fReQnk)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Cos((m+1)*n*dPhi); | |
245 | (*fImQnk)(m,k)+=pow(wPhi*wPt*wEta,k)*TMath::Sin((m+1)*n*dPhi); | |
246 | } | |
247 | } | |
248 | // Calculate partially S_{p,k} for this event (final calculation of S_{p,k} follows after the loop over data bellow): | |
249 | for(Int_t p=0;p<4;p++) // to be improved (what is maximum p that I need?) | |
250 | { | |
251 | for(Int_t k=0;k<4;k++) // to be improved (what is maximum k that I need?) | |
252 | { | |
253 | (*fSpk)(p,k)+=pow(wPhi*wPt*wEta,k); | |
254 | } | |
255 | } | |
5c078806 | 256 | } // end of if(aftsTrack->InRPSelection()) |
257 | // POIs: | |
e999459d | 258 | if(fEvaluateDifferential3pCorrelator) |
5c078806 | 259 | { |
e999459d | 260 | if(aftsTrack->InPOISelection()) // 1st POI |
5c078806 | 261 | { |
e999459d | 262 | Double_t dPsi1 = aftsTrack->Phi(); |
263 | Double_t dPt1 = aftsTrack->Pt(); | |
41e6d9e4 | 264 | Double_t dEta1 = aftsTrack->Eta(); |
e999459d | 265 | Int_t iCharge1 = aftsTrack->Charge(); |
266 | Bool_t b1stPOIisAlsoRP = kFALSE; | |
267 | if(aftsTrack->InRPSelection()){b1stPOIisAlsoRP = kTRUE;} | |
268 | for(Int_t j=0;j<nPrim;j++) | |
5c078806 | 269 | { |
e999459d | 270 | if(j==i){continue;} |
271 | aftsTrack=anEvent->GetTrack(j); | |
272 | if(aftsTrack->InPOISelection()) // 2nd POI | |
273 | { | |
274 | Double_t dPsi2 = aftsTrack->Phi(); | |
275 | Double_t dPt2 = aftsTrack->Pt(); | |
41e6d9e4 | 276 | Double_t dEta2 = aftsTrack->Eta(); |
e999459d | 277 | Int_t iCharge2 = aftsTrack->Charge(); |
278 | if(fOppositeChargesPOI && iCharge1 == iCharge2){continue;} | |
279 | Bool_t b2ndPOIisAlsoRP = kFALSE; | |
280 | if(aftsTrack->InRPSelection()){b2ndPOIisAlsoRP = kTRUE;} | |
41e6d9e4 | 281 | |
282 | // Fill:Pt | |
e999459d | 283 | fRePEBE[0]->Fill((dPt1+dPt2)/2.,TMath::Cos(n*(dPsi1+dPsi2)),1.); |
284 | fImPEBE[0]->Fill((dPt1+dPt2)/2.,TMath::Sin(n*(dPsi1+dPsi2)),1.); | |
285 | fRePEBE[1]->Fill(TMath::Abs(dPt1-dPt2),TMath::Cos(n*(dPsi1+dPsi2)),1.); | |
286 | fImPEBE[1]->Fill(TMath::Abs(dPt1-dPt2),TMath::Sin(n*(dPsi1+dPsi2)),1.); | |
41e6d9e4 | 287 | |
288 | // Fill:Eta | |
289 | fReEtaEBE[0]->Fill((dEta1+dEta2)/2.,TMath::Cos(n*(dPsi1+dPsi2)),1.); | |
290 | fImEtaEBE[0]->Fill((dEta1+dEta2)/2.,TMath::Sin(n*(dPsi1+dPsi2)),1.); | |
291 | fReEtaEBE[1]->Fill(TMath::Abs(dEta1-dEta2),TMath::Cos(n*(dPsi1+dPsi2)),1.); | |
292 | fImEtaEBE[1]->Fill(TMath::Abs(dEta1-dEta2),TMath::Sin(n*(dPsi1+dPsi2)),1.); | |
293 | ||
294 | //2particle correlator <cos(n*(psi1 - ps12))> | |
e409ac85 | 295 | f2pCorrelatorCosPsiDiff->Fill(TMath::Abs(dPt1-dPt2),TMath::Cos(n*(dPsi1-dPsi2))); |
296 | f2pCorrelatorCosPsiSum->Fill(TMath::Abs(dPt1-dPt2),TMath::Cos(n*(dPsi1+dPsi2))); | |
297 | f2pCorrelatorSinPsiDiff->Fill(TMath::Abs(dPt1-dPt2),TMath::Sin(n*(dPsi1-dPsi2))); | |
298 | f2pCorrelatorSinPsiSum->Fill(TMath::Abs(dPt1-dPt2),TMath::Sin(n*(dPsi1+dPsi2))); | |
41e6d9e4 | 299 | |
e999459d | 300 | if(b1stPOIisAlsoRP) |
301 | { | |
302 | fOverlapEBE[0][0]->Fill((dPt1+dPt2)/2.,TMath::Cos(n*(dPsi1-dPsi2)),1.); | |
303 | fOverlapEBE[0][1]->Fill(TMath::Abs(dPt1-dPt2),TMath::Cos(n*(dPsi1-dPsi2)),1.); | |
41e6d9e4 | 304 | fOverlapEBE2[0][0]->Fill((dEta1+dEta2)/2.,TMath::Cos(n*(dPsi1-dPsi2)),1.); |
305 | fOverlapEBE2[0][1]->Fill(TMath::Abs(dEta1-dEta2),TMath::Cos(n*(dPsi1-dPsi2)),1.); | |
e999459d | 306 | } |
307 | if(b2ndPOIisAlsoRP) | |
308 | { | |
309 | fOverlapEBE[1][0]->Fill((dPt1+dPt2)/2.,TMath::Cos(n*(dPsi1-dPsi2)),1.); | |
310 | fOverlapEBE[1][1]->Fill(TMath::Abs(dPt1-dPt2),TMath::Cos(n*(dPsi1-dPsi2)),1.); | |
41e6d9e4 | 311 | fOverlapEBE2[1][0]->Fill((dEta1+dEta2)/2.,TMath::Cos(n*(dPsi1-dPsi2)),1.); |
312 | fOverlapEBE2[1][1]->Fill(TMath::Abs(dEta1-dEta2),TMath::Cos(n*(dPsi1-dPsi2)),1.); | |
e999459d | 313 | } |
314 | } // end of if(aftsTrack->InPOISelection()) // 2nd POI | |
315 | } // end of for(Int_t j=i+1;j<nPrim;j++) | |
316 | } // end of if(aftsTrack->InPOISelection()) // 1st POI | |
317 | } // end of if(fEvaluateDifferential3pCorrelator) | |
489d5531 | 318 | } else // to if(aftsTrack) |
319 | { | |
320 | cout<<endl; | |
e999459d | 321 | cout<<" WARNING (MH): No particle! (i.e. aftsTrack is a NULL pointer in Make().)"<<endl; |
489d5531 | 322 | cout<<endl; |
323 | } | |
324 | } // end of for(Int_t i=0;i<nPrim;i++) | |
325 | ||
326 | // Calculate the final expressions for S_{p,k}: | |
327 | for(Int_t p=0;p<4;p++) // to be improved (what is maximum p that I need?) | |
328 | { | |
e999459d | 329 | for(Int_t k=0;k<4;k++) // to be improved (what is maximum k that I need?) |
489d5531 | 330 | { |
331 | (*fSpk)(p,k)=pow((*fSpk)(p,k),p+1); | |
332 | } | |
d66d46f7 | 333 | } |
334 | ||
e999459d | 335 | // e) Calculate 3-p correlator cos[n(phi1+phi2-2*phi3)] in terms of Q_{n,k} and S_{p,k}: |
d66d46f7 | 336 | if(anEvent->GetEventNSelTracksRP() >= 3) |
337 | { | |
338 | this->Calculate3pCorrelator(); | |
d66d46f7 | 339 | this->CalculateNonIsotropicTerms(); |
97d82c42 | 340 | if(anEvent->GetEventNSelTracksRP() >= 5) |
341 | { | |
342 | this->Calculate5pCorrelator(); | |
343 | } // end of if(anEvent->GetEventNSelTracksRP() >= 5) | |
344 | } // end of if(anEvent->GetEventNSelTracksRP() >= 3) | |
d66d46f7 | 345 | |
e999459d | 346 | // f) Calculate differential 3-p azimuthal correlator cos[n(psi1+psi2-2*phi3)] in terms of Q_{2n} and p_{n}: |
347 | if(fEvaluateDifferential3pCorrelator && anEvent->GetEventNSelTracksRP() >= 1) | |
348 | { | |
41e6d9e4 | 349 | Double_t gIntegrated3pCorrelator = 0.; |
350 | this->CalculateDifferential3pCorrelator(gIntegrated3pCorrelator); // to be improved - add relevant if statements for the min # POIs as well | |
351 | ||
352 | //3particle correlator vs ref. mult | |
cf6d56bc | 353 | if(fCalculateVsM) |
354 | f3pPOICorrelatorVsM->Fill(nRefMult,gIntegrated3pCorrelator); | |
e999459d | 355 | } |
5c078806 | 356 | |
357 | // g) Reset all event-by-event quantities: | |
d66d46f7 | 358 | this->ResetEventByEventQuantities(); |
5c078806 | 359 | |
489d5531 | 360 | } // end of AliFlowAnalysisWithMixedHarmonics::Make(AliFlowEventSimple* anEvent) |
5c078806 | 361 | |
489d5531 | 362 | //================================================================================================================ |
363 | ||
364 | void AliFlowAnalysisWithMixedHarmonics::Finish() | |
365 | { | |
d66d46f7 | 366 | // Calculate the final results. |
367 | ||
368 | // a) Check all pointers used in this method; | |
369 | // b) Access settings for analysis with mixed harmonics; | |
5c078806 | 370 | // c) Correct for detector effects; |
371 | // d) Print on the screen the final results. | |
d66d46f7 | 372 | |
373 | this->CheckPointersUsedInFinish(); | |
374 | this->AccessSettings(); | |
b71a354b | 375 | this->CorrectForDetectorEffects(); |
376 | if(fCalculateVsM){this->CorrectForDetectorEffectsVsM();} | |
377 | if(fPrintOnTheScreen){this->PrintOnTheScreen();} | |
489d5531 | 378 | |
379 | } // end of AliFlowAnalysisWithMixedHarmonics::Finish() | |
380 | ||
381 | //================================================================================================================ | |
382 | ||
383 | void AliFlowAnalysisWithMixedHarmonics::GetOutputHistograms(TList *outputListHistos) | |
384 | { | |
d66d46f7 | 385 | // Get pointers to all objects saved in the output file. |
386 | ||
ecac11c2 | 387 | // a) Get pointers for common control histograms. |
489d5531 | 388 | if(outputListHistos) |
389 | { | |
d66d46f7 | 390 | this->SetHistList(outputListHistos); |
391 | if(!fHistList) | |
392 | { | |
393 | cout<<endl; | |
e999459d | 394 | cout<<" WARNING (MH): fHistList is NULL in GetOutputHistograms() !!!!"<<endl; |
d66d46f7 | 395 | cout<<endl; |
396 | exit(0); | |
397 | } | |
ecac11c2 | 398 | this->GetPointersForBaseHistograms(); |
d66d46f7 | 399 | this->GetPointersForCommonHistograms(); |
ecac11c2 | 400 | this->GetPointersForAllEventProfiles(); |
489d5531 | 401 | this->GetPointersForResultsHistograms(); |
d66d46f7 | 402 | } else |
403 | { | |
404 | cout<<endl; | |
e999459d | 405 | cout<<" WARNING (MH): outputListHistos is NULL in GetOutputHistograms() !!!!"<<endl; |
d66d46f7 | 406 | cout<<endl; |
407 | exit(0); | |
408 | } | |
489d5531 | 409 | |
410 | } // end of void AliFlowAnalysisWithMixedHarmonics::GetOutputHistograms(TList *outputListHistos) | |
411 | ||
d66d46f7 | 412 | //================================================================================================================ |
413 | ||
ecac11c2 | 414 | void AliFlowAnalysisWithMixedHarmonics::GetPointersForBaseHistograms() |
415 | { | |
416 | // Get pointers to base histograms. | |
417 | ||
418 | TString analysisSettingsName = "fAnalysisSettings"; | |
419 | TProfile *analysisSettings = dynamic_cast<TProfile*>(fHistList->FindObject(analysisSettingsName.Data())); | |
420 | if(analysisSettings) | |
421 | { | |
422 | this->SetAnalysisSettings(analysisSettings); | |
423 | } else | |
424 | { | |
425 | cout<<endl; | |
e999459d | 426 | cout<<" WARNING (MH): analysisSettings is NULL in GetPointersForBaseHistograms() !!!!"<<endl; |
ecac11c2 | 427 | cout<<endl; |
428 | exit(0); | |
429 | } | |
430 | ||
431 | } // end of void AliFlowAnalysisWithMixedHarmonics::GetPointersForBaseHistograms() | |
432 | ||
433 | //================================================================================================================ | |
434 | ||
489d5531 | 435 | void AliFlowAnalysisWithMixedHarmonics::GetPointersForCommonHistograms() |
436 | { | |
437 | // Get pointers to common control histograms. | |
438 | ||
439 | TString commonHistsName = "AliFlowCommonHistMH"; | |
440 | AliFlowCommonHist *commonHist = dynamic_cast<AliFlowCommonHist*>(fHistList->FindObject(commonHistsName.Data())); | |
d66d46f7 | 441 | if(commonHist) |
442 | { | |
443 | this->SetCommonHists(commonHist); | |
444 | } else | |
445 | { | |
446 | cout<<endl; | |
e999459d | 447 | cout<<" WARNING (MH): commonHist is NULL in GetPointersForCommonHistograms() !!!!"<<endl; |
d66d46f7 | 448 | cout<<endl; |
449 | exit(0); | |
450 | } | |
451 | ||
452 | } // end of void AliFlowAnalysisWithMixedHarmonics::GetPointersForCommonHistograms() | |
453 | ||
454 | //================================================================================================================ | |
455 | ||
ecac11c2 | 456 | void AliFlowAnalysisWithMixedHarmonics::GetPointersForAllEventProfiles() |
457 | { | |
5c078806 | 458 | // Get pointers to profiles holding final results. |
ecac11c2 | 459 | |
460 | TList *profileList = NULL; | |
461 | profileList = dynamic_cast<TList*>(fHistList->FindObject("Profiles")); | |
462 | if(!profileList) | |
463 | { | |
e999459d | 464 | cout<<endl; |
465 | cout<<" WARNING (MH): profileList is NULL in GetPointersForAllEventProfiles() !!!!"<<endl; | |
466 | cout<<endl; | |
ecac11c2 | 467 | exit(0); |
468 | } | |
469 | ||
470 | TString s3pCorrelatorProName = "f3pCorrelatorPro"; | |
5c078806 | 471 | TProfile *p3pCorrelatorPro = dynamic_cast<TProfile*>(profileList->FindObject(s3pCorrelatorProName.Data())); |
472 | if(p3pCorrelatorPro) | |
ecac11c2 | 473 | { |
5c078806 | 474 | this->Set3pCorrelatorPro(p3pCorrelatorPro); |
ecac11c2 | 475 | } |
476 | TString s3pCorrelatorVsMProName = "f3pCorrelatorVsMPro"; | |
5c078806 | 477 | TProfile *p3pCorrelatorVsMPro = dynamic_cast<TProfile*>(profileList->FindObject(s3pCorrelatorVsMProName.Data())); |
478 | if(p3pCorrelatorVsMPro) | |
ecac11c2 | 479 | { |
5c078806 | 480 | this->Set3pCorrelatorVsMPro(p3pCorrelatorVsMPro); |
ecac11c2 | 481 | } |
41e6d9e4 | 482 | TString s3pPOICorrelatorVsMName = "f3pPOICorrelatorVsM"; |
483 | TProfile *p3pPOICorrelatorVsM = dynamic_cast<TProfile*>(profileList->FindObject(s3pPOICorrelatorVsMName.Data())); | |
484 | if(p3pPOICorrelatorVsM) | |
485 | { | |
486 | this->Set3pPOICorrelatorVsM(p3pPOICorrelatorVsM); | |
487 | } | |
ecac11c2 | 488 | TString nonIsotropicTermsProName = "fNonIsotropicTermsPro"; |
489 | TProfile *nonIsotropicTermsPro = dynamic_cast<TProfile*>(profileList->FindObject(nonIsotropicTermsProName.Data())); | |
490 | if(nonIsotropicTermsPro) | |
491 | { | |
492 | this->SetNonIsotropicTermsPro(nonIsotropicTermsPro); | |
493 | } | |
494 | TString nonIsotropicTermsVsMProName = "fNonIsotropicTermsVsMPro"; | |
495 | TProfile2D *nonIsotropicTermsVsMPro = dynamic_cast<TProfile2D*>(profileList->FindObject(nonIsotropicTermsVsMProName.Data())); | |
496 | if(nonIsotropicTermsVsMPro) | |
497 | { | |
498 | this->SetNonIsotropicTermsVsMPro(nonIsotropicTermsVsMPro); | |
5c078806 | 499 | } |
500 | TString psdFlag[2] = {"PtSum","PtDiff"}; | |
501 | for(Int_t sd=0;sd<2;sd++) | |
502 | { | |
503 | TProfile *p3pCorrelatorVsPtSumDiffPro = dynamic_cast<TProfile*>(profileList->FindObject(Form("f3pCorrelatorVs%sPro",psdFlag[sd].Data()))); | |
504 | if(p3pCorrelatorVsPtSumDiffPro) | |
505 | { | |
506 | this->Set3pCorrelatorVsPtSumDiffPro(p3pCorrelatorVsPtSumDiffPro,sd); | |
507 | } | |
e409ac85 | 508 | } |
509 | ||
510 | TProfile *g2pCorrelatorCosPsiDiff = dynamic_cast<TProfile *>(profileList->FindObject("f2pCorrelatorCosPsiDiff")); | |
511 | if(g2pCorrelatorCosPsiDiff) | |
512 | this->Set2pCorrelatorCosPsiDiff(g2pCorrelatorCosPsiDiff); | |
513 | TProfile *g2pCorrelatorCosPsiSum = dynamic_cast<TProfile *>(profileList->FindObject("f2pCorrelatorCosPsiSum")); | |
514 | if(g2pCorrelatorCosPsiSum) | |
515 | this->Set2pCorrelatorCosPsiSum(g2pCorrelatorCosPsiSum); | |
516 | TProfile *g2pCorrelatorSinPsiDiff = dynamic_cast<TProfile *>(profileList->FindObject("f2pCorrelatorSinPsiDiff")); | |
517 | if(g2pCorrelatorSinPsiDiff) | |
518 | this->Set2pCorrelatorSinPsiDiff(g2pCorrelatorSinPsiDiff); | |
519 | TProfile *g2pCorrelatorSinPsiSum = dynamic_cast<TProfile *>(profileList->FindObject("f2pCorrelatorSinPsiSum")); | |
520 | if(g2pCorrelatorSinPsiSum) | |
521 | this->Set2pCorrelatorSinPsiSum(g2pCorrelatorSinPsiSum); | |
97d82c42 | 522 | |
523 | TString s5pCorrelatorProName = "f5pCorrelatorPro"; | |
524 | TProfile *p5pCorrelatorPro = dynamic_cast<TProfile*>(profileList->FindObject(s5pCorrelatorProName.Data())); | |
525 | if(p5pCorrelatorPro) | |
526 | { | |
527 | this->Set5pCorrelatorPro(p5pCorrelatorPro); | |
528 | } | |
5c078806 | 529 | |
ecac11c2 | 530 | } // end of void AliFlowAnalysisWithMixedHarmonics::GetPointersForAllEventProfiles() |
531 | ||
532 | //================================================================================================================ | |
533 | ||
489d5531 | 534 | void AliFlowAnalysisWithMixedHarmonics::GetPointersForResultsHistograms() |
535 | { | |
536 | // Get pointers to histograms holding final results. | |
537 | ||
538 | TList *resultsList = NULL; | |
539 | resultsList = dynamic_cast<TList*>(fHistList->FindObject("Results")); | |
540 | if(!resultsList) | |
541 | { | |
e999459d | 542 | cout<<endl; |
543 | cout<<" WARNING (MH): resultsList is NULL in GetPointersForResultsHistograms() !!!!"<<endl; | |
544 | cout<<endl; | |
489d5531 | 545 | exit(0); |
d66d46f7 | 546 | } |
489d5531 | 547 | TString s3pCorrelatorHistName = "f3pCorrelatorHist"; |
548 | TH1D *h3pCorrelatorHist = dynamic_cast<TH1D*>(resultsList->FindObject(s3pCorrelatorHistName.Data())); | |
549 | if(h3pCorrelatorHist) | |
550 | { | |
551 | this->Set3pCorrelatorHist(h3pCorrelatorHist); | |
d66d46f7 | 552 | } |
e558a733 | 553 | TString s3pCorrelatorVsMHistName = "f3pCorrelatorVsMHist"; |
554 | TH1D *h3pCorrelatorVsMHist = dynamic_cast<TH1D*>(resultsList->FindObject(s3pCorrelatorVsMHistName.Data())); | |
555 | if(h3pCorrelatorVsMHist) | |
556 | { | |
557 | this->Set3pCorrelatorVsMHist(h3pCorrelatorVsMHist); | |
558 | } | |
489d5531 | 559 | TString detectorBiasHistName = "fDetectorBiasHist"; |
560 | TH1D *detectorBiasHist = dynamic_cast<TH1D*>(resultsList->FindObject(detectorBiasHistName.Data())); | |
561 | if(detectorBiasHist) | |
562 | { | |
563 | this->SetDetectorBiasHist(detectorBiasHist); | |
d66d46f7 | 564 | } |
ecac11c2 | 565 | TString detectorBiasVsMHistName = "fDetectorBiasVsMHist"; |
566 | TH1D *detectorBiasVsMHist = dynamic_cast<TH1D*>(resultsList->FindObject(detectorBiasVsMHistName.Data())); | |
567 | if(detectorBiasVsMHist) | |
568 | { | |
569 | this->SetDetectorBiasVsMHist(detectorBiasVsMHist); | |
570 | } | |
ecac11c2 | 571 | |
d66d46f7 | 572 | } // end of void AliFlowAnalysisWithMixedHarmonics::GetPointersForResultsHistograms() |
489d5531 | 573 | |
d66d46f7 | 574 | //================================================================================================================ |
575 | ||
489d5531 | 576 | void AliFlowAnalysisWithMixedHarmonics::WriteHistograms(TString outputFileName) |
577 | { | |
578 | // Store the final results in output .root file. | |
579 | TFile *output = new TFile(outputFileName.Data(),"RECREATE"); | |
580 | fHistList->Write(fHistList->GetName(),TObject::kSingleKey); | |
581 | delete output; | |
582 | } | |
583 | ||
584 | //================================================================================================================ | |
d66d46f7 | 585 | |
586 | void AliFlowAnalysisWithMixedHarmonics::WriteHistograms(TDirectoryFile *outputFileName) | |
587 | { | |
588 | // Store the final results in output .root file. | |
589 | fHistList->SetName("cobjMH"); | |
590 | fHistList->SetOwner(kTRUE); | |
591 | outputFileName->Add(fHistList); | |
592 | outputFileName->Write(outputFileName->GetName(),TObject::kSingleKey); | |
593 | } | |
594 | ||
595 | //================================================================================================================ | |
596 | ||
e999459d | 597 | void AliFlowAnalysisWithMixedHarmonics::StoreHarmonic() |
598 | { | |
599 | // Store harmonic n used in cos[n*(phi1+phi2-2phi3)] and cos[n*(psi1+psi2-2phi3)]. | |
600 | ||
601 | (fCommonHists->GetHarmonic())->Fill(0.5,fHarmonic); | |
602 | ||
603 | } // end of void AliFlowAnalysisWithMixedHarmonics::StoreHarmonic() | |
604 | ||
605 | //================================================================================================================ | |
606 | ||
5c078806 | 607 | void AliFlowAnalysisWithMixedHarmonics::InitializeArrays() |
608 | { | |
609 | // Initialize arrays. | |
610 | ||
611 | for(Int_t sd=0;sd<2;sd++) | |
612 | { | |
613 | fRePEBE[sd] = NULL; | |
614 | fImPEBE[sd] = NULL; | |
41e6d9e4 | 615 | fReEtaEBE[sd] = NULL; |
616 | fImEtaEBE[sd] = NULL; | |
5c078806 | 617 | f3pCorrelatorVsPtSumDiffPro[sd] = NULL; |
41e6d9e4 | 618 | f3pCorrelatorVsEtaSumDiffPro[sd] = NULL; |
5c078806 | 619 | } |
e999459d | 620 | for(Int_t fs=0;fs<2;fs++) // 1st/2nd POI which is also RP |
621 | { | |
622 | for(Int_t sd=0;sd<2;sd++) | |
623 | { | |
624 | fOverlapEBE[fs][sd] = NULL; | |
41e6d9e4 | 625 | fOverlapEBE2[fs][sd] = NULL; |
e999459d | 626 | } |
627 | } | |
5c078806 | 628 | |
629 | } // end of AliFlowAnalysisWithMixedHarmonics::InitializeArrays() | |
630 | ||
631 | //================================================================================================================ | |
632 | ||
489d5531 | 633 | void AliFlowAnalysisWithMixedHarmonics::BookAndNestAllLists() |
d66d46f7 | 634 | { |
635 | // Book and nest all list in base list fHistList. | |
636 | ||
637 | // Weights: | |
489d5531 | 638 | fWeightsList->SetName("Weights"); |
639 | fWeightsList->SetOwner(kTRUE); | |
d66d46f7 | 640 | fHistList->Add(fWeightsList); |
ecac11c2 | 641 | // Profiles: |
642 | fProfileList->SetName("Profiles"); | |
643 | fProfileList->SetOwner(kTRUE); | |
644 | fHistList->Add(fProfileList); | |
d66d46f7 | 645 | // Results: |
489d5531 | 646 | fResultsList->SetName("Results"); |
647 | fResultsList->SetOwner(kTRUE); | |
d66d46f7 | 648 | fHistList->Add(fResultsList); |
649 | ||
650 | } // end of void AliFlowAnalysisWithMixedHarmonics::BookAndNestAllLists() | |
651 | ||
652 | //================================================================================================================ | |
653 | ||
489d5531 | 654 | void AliFlowAnalysisWithMixedHarmonics::BookProfileHoldingSettings() |
d66d46f7 | 655 | { |
656 | // Book profile to hold all analysis settings. | |
657 | ||
489d5531 | 658 | TString analysisSettingsName = "fAnalysisSettings"; |
b71a354b | 659 | fAnalysisSettings = new TProfile(analysisSettingsName.Data(),"Settings for analysis with mixed harmonics",10,0,10); |
e999459d | 660 | fAnalysisSettings->SetStats(kFALSE); |
661 | fAnalysisSettings->GetXaxis()->SetLabelSize(0.03); | |
662 | fAnalysisSettings->GetXaxis()->SetBinLabel(1,"Corr. for det. effects?"); | |
663 | fAnalysisSettings->Fill(0.5,(Int_t)fCorrectForDetectorEffects); | |
664 | fAnalysisSettings->GetXaxis()->SetBinLabel(2,"# of mult. bins"); | |
665 | fAnalysisSettings->Fill(1.5,fNoOfMultipicityBins); | |
666 | fAnalysisSettings->GetXaxis()->SetBinLabel(3,"Width of mult. bins"); | |
667 | fAnalysisSettings->Fill(2.5,fMultipicityBinWidth); | |
668 | fAnalysisSettings->GetXaxis()->SetBinLabel(4,"Minimal mult."); | |
669 | fAnalysisSettings->Fill(3.5,fMinMultiplicity); | |
670 | fAnalysisSettings->GetXaxis()->SetBinLabel(5,"Print on the screen?"); | |
671 | fAnalysisSettings->Fill(4.5,(Int_t)fPrintOnTheScreen); | |
672 | fAnalysisSettings->GetXaxis()->SetBinLabel(6,"fHarmonic"); | |
673 | fAnalysisSettings->Fill(5.5,(Int_t)fHarmonic); | |
674 | fAnalysisSettings->GetXaxis()->SetBinLabel(7,"fOppositeChargesPOI"); | |
675 | fAnalysisSettings->Fill(6.5,(Int_t)fOppositeChargesPOI); | |
676 | fAnalysisSettings->GetXaxis()->SetBinLabel(8,"fEvaluateDifferential3pCorrelator"); | |
677 | fAnalysisSettings->Fill(7.5,(Int_t)fOppositeChargesPOI); | |
b71a354b | 678 | fAnalysisSettings->GetXaxis()->SetBinLabel(9,"fCalculateVsM"); |
679 | fAnalysisSettings->Fill(8.5,(Int_t)fCalculateVsM); | |
680 | fAnalysisSettings->GetXaxis()->SetBinLabel(10,"fShowBinLabelsVsM"); | |
681 | fAnalysisSettings->Fill(9.5,(Int_t)fShowBinLabelsVsM); | |
d66d46f7 | 682 | fHistList->Add(fAnalysisSettings); |
683 | ||
684 | } // end of void AliFlowAnalysisWithMixedHarmonics::BookProfileHoldingSettings() | |
489d5531 | 685 | |
d66d46f7 | 686 | //================================================================================================================ |
687 | ||
489d5531 | 688 | void AliFlowAnalysisWithMixedHarmonics::BookCommonHistograms() |
689 | { | |
d66d46f7 | 690 | // Book common control histograms and common histograms for final results. |
489d5531 | 691 | |
692 | TString commonHistsName = "AliFlowCommonHistMH"; | |
693 | fCommonHists = new AliFlowCommonHist(commonHistsName.Data()); | |
694 | fHistList->Add(fCommonHists); | |
695 | ||
696 | } // end of void AliFlowAnalysisWithMixedHarmonics::BookCommonHistograms() | |
d66d46f7 | 697 | |
698 | //================================================================================================================ | |
699 | ||
489d5531 | 700 | void AliFlowAnalysisWithMixedHarmonics::BookAllEventByEventQuantities() |
701 | { | |
d66d46f7 | 702 | // Book all event-by-event quantitites. |
703 | ||
97d82c42 | 704 | // Q_{n,k} and S{p,k}: |
705 | fReQnk = new TMatrixD(6,9); // to be improved (check bound on k!) | |
706 | fImQnk = new TMatrixD(6,9); // to be improved (check bound on k!) | |
707 | fSpk = new TMatrixD(4,4); // to be improved (check bound on p and k!) | |
5c078806 | 708 | |
709 | // p_n vs [(p1+p2)/2,|p1-p2|] | |
e999459d | 710 | if(!fEvaluateDifferential3pCorrelator){return;} |
5c078806 | 711 | TString psdFlag[2] = {"PtSum","PtDiff"}; |
41e6d9e4 | 712 | TString p2sdFlag[2] = {"PtSum","PtDiff"}; |
e999459d | 713 | TString fsFlag[2] = {"1st","2nd"}; |
5c078806 | 714 | for(Int_t sd=0;sd<2;sd++) |
715 | { | |
5c078806 | 716 | fRePEBE[sd] = new TProfile(Form("fRePEBE%s",psdFlag[sd].Data()),"",fnBinsPt,0.,fPtMax); |
717 | fImPEBE[sd] = new TProfile(Form("fImPEBE%s",psdFlag[sd].Data()),"",fnBinsPt,0.,fPtMax); | |
41e6d9e4 | 718 | fReEtaEBE[sd] = new TProfile(Form("fReEtaEBE%s",p2sdFlag[sd].Data()),"",fnBinsEta,fEtaMin,fEtaMax); |
719 | fImEtaEBE[sd] = new TProfile(Form("fImEtaEBE%s",p2sdFlag[sd].Data()),"",fnBinsEta,fEtaMin,fEtaMax); | |
5c078806 | 720 | } |
e999459d | 721 | for(Int_t fs=0;fs<2;fs++) |
722 | { | |
723 | for(Int_t sd=0;sd<2;sd++) | |
724 | { | |
725 | fOverlapEBE[fs][sd] = new TProfile(Form("%s POI, %s",fsFlag[sd].Data(),psdFlag[sd].Data()),"",fnBinsPt,0.,fPtMax); | |
41e6d9e4 | 726 | fOverlapEBE2[fs][sd] = new TProfile(Form("%s POI 2, %s",fsFlag[sd].Data(),p2sdFlag[sd].Data()),"",fnBinsEta,fEtaMin,fEtaMax); |
e999459d | 727 | } |
728 | } | |
729 | ||
489d5531 | 730 | } // end fo void AliFlowAnalysisWithMixedHarmonics::BookAllEventByEventQuantities() |
5c078806 | 731 | |
d66d46f7 | 732 | //================================================================================================================ |
733 | ||
734 | void AliFlowAnalysisWithMixedHarmonics::BookAllAllEventQuantities() | |
735 | { | |
736 | // Book all all-event quantitites. | |
737 | ||
b71a354b | 738 | // a) Book histos and profiles without any binning in multiplicity, pt or eta; |
5c078806 | 739 | // b) Book quantites with multiplicity binning; |
b71a354b | 740 | // c) Book quantites with binning in (p1+p2)/2 and |p1-p2|. |
5c078806 | 741 | |
b71a354b | 742 | this->BookDefault(); |
743 | if(fCalculateVsM){this->BookVsM();} | |
744 | if(fEvaluateDifferential3pCorrelator){this->BookDifferential();} | |
745 | ||
746 | } // end of void AliFlowAnalysisWithMixedHarmonics::BookAllAllEventQuantities() | |
747 | ||
748 | //================================================================================================================ | |
749 | ||
750 | void AliFlowAnalysisWithMixedHarmonics::BookDefault() | |
751 | { | |
752 | // Book histos and profiles without any binning in multiplicity, pt or eta. | |
753 | ||
754 | // a) 3-p correlator <<cos[n*(phi1+phi2-2phi3)]>> for all events (not corrected for detector effects); | |
755 | // b) Non-isotropic terms in the decomposition of <<cos[n(phi1+phi2-2phi3)]>>; | |
756 | // c) 3-p correlator <<cos[n(phi1+phi2-2phi3)]>> corrected for detector effects; | |
97d82c42 | 757 | // d) Histogram which quantifies bias coming from detector inefficiencies to 3-p correlator <<cos[n(phi1+phi2-2phi3)]>>; |
758 | // e) 5-p correlator <<cos[n*(2phi1+2phi2+2phi3-3phi4-3phi5)]>> for all events (not corrected for detector effects - not supported yet). | |
b71a354b | 759 | |
760 | // a) 3-p correlator <<cos[n*(phi1+phi2-2phi3)]>> for all events (not corrected for detector effects); | |
489d5531 | 761 | TString s3pCorrelatorProName = "f3pCorrelatorPro"; |
5c078806 | 762 | f3pCorrelatorPro = new TProfile(s3pCorrelatorProName.Data(),"",1,0,1); |
e999459d | 763 | f3pCorrelatorPro->SetStats(kFALSE); |
5c078806 | 764 | f3pCorrelatorPro->GetXaxis()->SetLabelOffset(0.01); |
765 | f3pCorrelatorPro->GetXaxis()->SetLabelSize(0.05); | |
e999459d | 766 | if(fHarmonic == 1) |
5c078806 | 767 | { |
e999459d | 768 | f3pCorrelatorPro->GetXaxis()->SetBinLabel(1,"#LT#LTcos(#phi_{1}+#phi_{2}-2#phi_{3})#GT#GT"); |
5c078806 | 769 | } else |
770 | { | |
e999459d | 771 | f3pCorrelatorPro->GetXaxis()->SetBinLabel(1,Form("#LT#LTcos[%i(#phi_{1}+#phi_{2}-2#phi_{3})]#GT#GT",fHarmonic)); |
5c078806 | 772 | } |
ecac11c2 | 773 | fProfileList->Add(f3pCorrelatorPro); |
b71a354b | 774 | |
775 | // b) Non-isotropic terms in the decomposition of <<cos[n(phi1+phi2-2phi3)]>>: | |
489d5531 | 776 | TString nonIsotropicTermsProName = "fNonIsotropicTermsPro"; |
e999459d | 777 | fNonIsotropicTermsPro = new TProfile(nonIsotropicTermsProName.Data(),"",8,0,8); |
778 | fNonIsotropicTermsPro->SetStats(kFALSE); | |
779 | if(fHarmonic == 1) | |
5c078806 | 780 | { |
e999459d | 781 | fNonIsotropicTermsPro->SetTitle("Non-isotropic terms in decomposition of #LT#LTcos(#phi_{1}+#phi_{2}-2#phi_{3})#GT#GT"); |
5c078806 | 782 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(1,"cos(#phi_{1})"); |
783 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(2,"sin(#phi_{1})"); | |
784 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(3,"cos(2#phi_{1})"); | |
785 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(4,"sin(2#phi_{1})"); | |
786 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(5,"cos(#phi_{1}+#phi_{2})"); | |
787 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(6,"sin(#phi_{1}+#phi_{2})"); | |
788 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(7,"cos(2#phi_{1}-#phi_{2})"); | |
789 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(8,"sin(2#phi_{1}-#phi_{2})"); | |
e999459d | 790 | // fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(9,"cos(#phi_{1}-#phi_{2}-#phi_{3})"); // not needed |
791 | // fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(10,"sin(#phi_{1}-#phi_{2}-#phi_{3})"); // not needed | |
5c078806 | 792 | } else |
793 | { | |
e999459d | 794 | fNonIsotropicTermsPro->SetTitle(Form("Non-isotropic terms in decomposition of #LT#LTcos[%i(#phi_{1}+#phi_{2}-2#phi_{3})]#GT#GT",fHarmonic)); |
795 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(1,Form("cos(%d#phi_{1})",fHarmonic)); | |
796 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(2,Form("sin(%d#phi_{1})",fHarmonic)); | |
797 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(3,Form("cos(%d#phi_{1})",2*fHarmonic)); | |
798 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(4,Form("sin(%d#phi_{1})",2*fHarmonic)); | |
799 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(5,Form("cos[%d(#phi_{1}+#phi_{2})]",fHarmonic)); | |
800 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(6,Form("sin[%d(#phi_{1}+#phi_{2})]",fHarmonic)); | |
801 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(7,Form("cos[%d(2#phi_{1}-#phi_{2})]",fHarmonic)); | |
802 | fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(8,Form("sin[%d(2#phi_{1}-#phi_{2})]",fHarmonic)); | |
803 | // fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(9,Form("cos(%d(#phi_{1}-#phi_{2}-#phi_{3}))",fHarmonic)); // not needed | |
804 | // fNonIsotropicTermsPro->GetXaxis()->SetBinLabel(10,Form("sin(%d(#phi_{1}-#phi_{2}-#phi_{3}))",fHarmonic)); // not needed | |
5c078806 | 805 | } |
ecac11c2 | 806 | fProfileList->Add(fNonIsotropicTermsPro); |
b71a354b | 807 | |
808 | // c) 3-p correlator <<cos[n(phi1+phi2-2phi3)]>> corrected for detector effects: | |
5c078806 | 809 | TString s3pCorrelatorHistName = "f3pCorrelatorHist"; |
810 | f3pCorrelatorHist = new TH1D(s3pCorrelatorHistName.Data(),"",1,0,1); | |
e999459d | 811 | f3pCorrelatorHist->SetStats(kFALSE); |
5c078806 | 812 | f3pCorrelatorHist->GetXaxis()->SetLabelOffset(0.01); |
813 | f3pCorrelatorHist->GetXaxis()->SetLabelSize(0.05); | |
e999459d | 814 | if(fHarmonic == 1) |
5c078806 | 815 | { |
e999459d | 816 | f3pCorrelatorHist->GetXaxis()->SetBinLabel(1,"#LT#LTcos(#phi_{1}+#phi_{2}-2#phi_{3})#GT#GT"); |
5c078806 | 817 | } else |
818 | { | |
e999459d | 819 | f3pCorrelatorHist->GetXaxis()->SetBinLabel(1,Form("#LT#LTcos[%i(#phi_{1}+#phi_{2}-2#phi_{3})]#GT#GT",fHarmonic)); |
5c078806 | 820 | } |
821 | fResultsList->Add(f3pCorrelatorHist); | |
b71a354b | 822 | |
823 | // d) Histogram which quantifies bias coming from detector inefficiencies to 3-p correlator <<cos[n(phi1+phi2-2phi3)]>>: | |
489d5531 | 824 | TString detectorBiasHistName = "fDetectorBiasHist"; |
d66d46f7 | 825 | fDetectorBiasHist = new TH1D(detectorBiasHistName.Data(),"Bias coming from detector inefficiences",1,0,1); |
e999459d | 826 | fDetectorBiasHist->SetStats(kFALSE); |
827 | if(fHarmonic == 1) | |
828 | { | |
829 | fDetectorBiasHist->GetXaxis()->SetBinLabel(1,"#frac{corrected}{measured} #LT#LTcos(#phi_{1}+#phi_{2}-2#phi_{3})#GT#GT"); | |
830 | } else | |
831 | { | |
832 | fDetectorBiasHist->GetXaxis()->SetBinLabel(1,Form("#frac{corrected}{measured} #LT#LTcos[%i(#phi_{1}+#phi_{2}-2#phi_{3})]#GT#GT",fHarmonic)); | |
833 | } | |
d66d46f7 | 834 | fResultsList->Add(fDetectorBiasHist); |
835 | ||
97d82c42 | 836 | // e) 5-p correlator <<cos[n*(2phi1+2phi2+2phi3-3phi4-3phi5)]>> for all events (not corrected for detector effects - not supported yet): |
837 | TString s5pCorrelatorProName = "f5pCorrelatorPro"; | |
838 | f5pCorrelatorPro = new TProfile(s5pCorrelatorProName.Data(),"",1,0,1); | |
839 | f5pCorrelatorPro->SetStats(kFALSE); | |
840 | f5pCorrelatorPro->GetXaxis()->SetLabelOffset(0.01); | |
841 | f5pCorrelatorPro->GetXaxis()->SetLabelSize(0.05); | |
842 | if(fHarmonic == 1) | |
843 | { | |
844 | f5pCorrelatorPro->GetXaxis()->SetBinLabel(1,"#LT#LTcos(2#phi_{1}+2#phi_{2}+2#phi_{3}-3#phi_{4}-3#phi_{5})#GT#GT"); | |
845 | } else | |
846 | { | |
847 | f5pCorrelatorPro->GetXaxis()->SetBinLabel(1,Form("#LT#LTcos[%i(2#phi_{1}+2#phi_{2}+2#phi_{3}-3#phi_{4}-3#phi_{5})]#GT#GT",fHarmonic)); | |
848 | } | |
849 | fProfileList->Add(f5pCorrelatorPro); | |
850 | ||
b71a354b | 851 | } // end of void AliFlowAnalysisWithMixedHarmonics::BookDefault() |
852 | ||
853 | //================================================================================================================ | |
854 | ||
855 | void AliFlowAnalysisWithMixedHarmonics::BookVsM() | |
856 | { | |
857 | // Book histos and profiles holding results vs multiplicity. | |
858 | ||
859 | // a) 3-p correlator <<cos[n*(phi1+phi2-2phi3)]>> for all events (not corrected for detector effects) vs M; | |
860 | // b) Non-isotropic terms in the decomposition of <<cos[n(phi1+phi2-2phi3)]>> vs M; | |
861 | // c) 3-p correlator <<cos[n(phi1+phi2-2phi3)]>> corrected for detector effects vs M; | |
862 | // d) Histogram which quantifies bias coming from detector inefficiencies to 3-p correlator <<cos[n(phi1+phi2-2phi3)]>> vs M. | |
863 | ||
864 | // a) 3-p correlator <<cos[n*(phi1+phi2-2phi3)]>> for all events (not corrected for detector effects) vs M: | |
489d5531 | 865 | TString s3pCorrelatorVsMProName = "f3pCorrelatorVsMPro"; |
5c078806 | 866 | f3pCorrelatorVsMPro = new TProfile(s3pCorrelatorVsMProName.Data(),"",fNoOfMultipicityBins+2,0,fNoOfMultipicityBins+2); |
e999459d | 867 | f3pCorrelatorVsMPro->SetStats(kFALSE); |
868 | if(fHarmonic == 1) | |
d66d46f7 | 869 | { |
e999459d | 870 | f3pCorrelatorVsMPro->SetTitle("#LT#LTcos(#phi_{1}+#phi_{2}-2#phi_{3})#GT#GT #font[72]{vs} M"); |
5c078806 | 871 | } else |
872 | { | |
e999459d | 873 | f3pCorrelatorVsMPro->SetTitle(Form("#LT#LTcos[%d(#phi_{1}+#phi_{2}-2#phi_{3})]#GT#GT #font[72]{vs} M",fHarmonic)); |
5c078806 | 874 | } |
b71a354b | 875 | if(fShowBinLabelsVsM) |
d66d46f7 | 876 | { |
b71a354b | 877 | f3pCorrelatorVsMPro->GetXaxis()->SetBinLabel(1,Form("M < %d",(Int_t)fMinMultiplicity)); |
878 | for(Int_t b=2;b<=fNoOfMultipicityBins+1;b++) | |
879 | { | |
880 | f3pCorrelatorVsMPro->GetXaxis()->SetBinLabel(b,Form("%d #leq M < %d",(Int_t)(fMinMultiplicity+(b-2)*fMultipicityBinWidth),(Int_t)(fMinMultiplicity+(b-1)*fMultipicityBinWidth))); | |
881 | } | |
882 | f3pCorrelatorVsMPro->GetXaxis()->SetBinLabel(fNoOfMultipicityBins+2,Form(" M #geq %d",(Int_t)(fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth))); | |
883 | } else | |
884 | { | |
885 | f3pCorrelatorVsMPro->GetXaxis()->SetTitle("M"); | |
886 | } | |
e558a733 | 887 | fProfileList->Add(f3pCorrelatorVsMPro); |
41e6d9e4 | 888 | |
889 | TString s3pPOICorrelatorVsMName = "f3pPOICorrelatorVsM"; | |
890 | f3pPOICorrelatorVsM = new TProfile(s3pPOICorrelatorVsMName.Data(),"",fNoOfMultipicityBins+2,0,fNoOfMultipicityBins+2); | |
891 | f3pPOICorrelatorVsM->SetStats(kFALSE); | |
892 | if(fHarmonic == 1) | |
893 | { | |
894 | f3pPOICorrelatorVsM->SetTitle("#LT#LTcos(#psi_{1}+#psi_{2}-2#phi_{3})#GT#GT #font[72]{vs} M"); | |
895 | } else | |
896 | { | |
897 | f3pPOICorrelatorVsM->SetTitle(Form("#LT#LTcos[%d(#psi_{1}+#psi_{2}-2#phi_{3})]#GT#GT #font[72]{vs} M",fHarmonic)); | |
898 | } | |
899 | if(fShowBinLabelsVsM) | |
900 | { | |
901 | f3pPOICorrelatorVsM->GetXaxis()->SetBinLabel(1,Form("M < %d",(Int_t)fMinMultiplicity)); | |
902 | for(Int_t b=2;b<=fNoOfMultipicityBins+1;b++) | |
903 | { | |
904 | f3pPOICorrelatorVsM->GetXaxis()->SetBinLabel(b,Form("%d #leq M < %d",(Int_t)(fMinMultiplicity+(b-2)*fMultipicityBinWidth),(Int_t)(fMinMultiplicity+(b-1)*fMultipicityBinWidth))); | |
905 | } | |
906 | f3pPOICorrelatorVsM->GetXaxis()->SetBinLabel(fNoOfMultipicityBins+2,Form(" M #geq %d",(Int_t)(fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth))); | |
907 | } else | |
908 | { | |
909 | f3pPOICorrelatorVsM->GetXaxis()->SetTitle("M"); | |
910 | } | |
911 | fProfileList->Add(f3pPOICorrelatorVsM); | |
b71a354b | 912 | |
913 | // b) Non-isotropic terms in the decomposition of <<cos[n(phi1+phi2-2phi3)]>> vs M: | |
e558a733 | 914 | TString s3pCorrelatorVsMHistName = "f3pCorrelatorVsMHist"; |
915 | f3pCorrelatorVsMHist = new TH1D(s3pCorrelatorVsMHistName.Data(),"",fNoOfMultipicityBins+2,0,fNoOfMultipicityBins+2); | |
e999459d | 916 | f3pCorrelatorVsMHist->SetStats(kFALSE); |
917 | if(fHarmonic == 1) | |
e558a733 | 918 | { |
e999459d | 919 | f3pCorrelatorVsMHist->SetTitle("cos(#phi_{1}+#phi_{2}-2#phi_{3}) #font[72]{vs} M"); |
e558a733 | 920 | } else |
921 | { | |
e999459d | 922 | f3pCorrelatorVsMHist->SetTitle(Form("cos[%d(#phi_{1}+#phi_{2}-2#phi_{3})] #font[72]{vs} M",fHarmonic)); |
e558a733 | 923 | } |
b71a354b | 924 | if(fShowBinLabelsVsM) |
925 | { | |
926 | f3pCorrelatorVsMHist->GetXaxis()->SetBinLabel(1,Form("M < %d",(Int_t)fMinMultiplicity)); | |
927 | for(Int_t b=2;b<=fNoOfMultipicityBins+1;b++) | |
928 | { | |
929 | f3pCorrelatorVsMHist->GetXaxis()->SetBinLabel(b,Form("%d #leq M < %d",(Int_t)(fMinMultiplicity+(b-2)*fMultipicityBinWidth),(Int_t)(fMinMultiplicity+(b-1)*fMultipicityBinWidth))); | |
930 | } | |
931 | f3pCorrelatorVsMHist->GetXaxis()->SetBinLabel(fNoOfMultipicityBins+2,Form(" M #geq %d",(Int_t)(fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth))); | |
932 | } else | |
933 | { | |
934 | f3pCorrelatorVsMHist->GetXaxis()->SetTitle("M"); | |
935 | } | |
e558a733 | 936 | fResultsList->Add(f3pCorrelatorVsMHist); |
b71a354b | 937 | |
938 | // c) 3-p correlator <<cos[n(phi1+phi2-2phi3)]>> corrected for detector effects vs M: | |
489d5531 | 939 | TString nonIsotropicTermsVsMProName = "fNonIsotropicTermsVsMPro"; |
e999459d | 940 | fNonIsotropicTermsVsMPro = new TProfile2D(nonIsotropicTermsVsMProName.Data(),"",8,0,8,fNoOfMultipicityBins+2,0,fNoOfMultipicityBins+2); |
941 | fNonIsotropicTermsVsMPro->SetStats(kFALSE); | |
942 | if(fHarmonic == 1) | |
d66d46f7 | 943 | { |
e999459d | 944 | fNonIsotropicTermsVsMPro->SetTitle("Non-isotropic terms in decomposition of #LT#LTcos(#phi_{1}+#phi_{2}-2#phi_{3})#GT#GT #font[72]{vs} M"); |
5c078806 | 945 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(1,"cos(#phi_{1})"); |
946 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(2,"sin(#phi_{1})"); | |
947 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(3,"cos(2#phi_{1})"); | |
948 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(4,"sin(2#phi_{1})"); | |
949 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(5,"cos(#phi_{1}+#phi_{2})"); | |
950 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(6,"sin(#phi_{1}+#phi_{2})"); | |
951 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(7,"cos(2#phi_{1}-#phi_{2})"); | |
952 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(8,"sin(2#phi_{1}-#phi_{2})"); | |
e999459d | 953 | // fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(9,"cos(#phi_{1}-#phi_{2}-#phi_{3})"); // not needed |
954 | // fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(10,"sin(#phi_{1}-#phi_{2}-#phi_{3})"); // not needed | |
5c078806 | 955 | } else |
956 | { | |
e999459d | 957 | fNonIsotropicTermsVsMPro->SetTitle(Form("Non-isotropic terms in decomposition of #LT#LTcos[%d(#phi_{1}+#phi_{2}-2#phi_{3})]#GT#GT",fHarmonic)); |
958 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(1,Form("cos(%d#phi_{1})",fHarmonic)); | |
959 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(2,Form("sin(%d#phi_{1})",fHarmonic)); | |
960 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(3,Form("cos(%d#phi_{1})",2*fHarmonic)); | |
961 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(4,Form("sin(%d#phi_{1})",2*fHarmonic)); | |
962 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(5,Form("cos[%d(#phi_{1}+#phi_{2})]",fHarmonic)); | |
963 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(6,Form("sin[%d(#phi_{1}+#phi_{2})]",fHarmonic)); | |
964 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(7,Form("cos[%d(2#phi_{1}-#phi_{2})]",fHarmonic)); | |
965 | fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(8,Form("sin[%d(2#phi_{1}-#phi_{2})]",fHarmonic)); | |
966 | // fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(9,Form("cos(%d(#phi_{1}-#phi_{2}-#phi_{3}))",fHarmonic)); // not needed | |
967 | // fNonIsotropicTermsVsMPro->GetXaxis()->SetBinLabel(10,Form("sin(%d(#phi_{1}-#phi_{2}-#phi_{3}))",fHarmonic)); // not needed | |
5c078806 | 968 | } |
b71a354b | 969 | if(fShowBinLabelsVsM) |
970 | { | |
971 | fNonIsotropicTermsVsMPro->GetYaxis()->SetBinLabel(1,Form("M < %d",(Int_t)fMinMultiplicity)); | |
972 | for(Int_t b=2;b<=fNoOfMultipicityBins+1;b++) | |
973 | { | |
974 | fNonIsotropicTermsVsMPro->GetYaxis()->SetBinLabel(b,Form("%d #leq M < %d",(Int_t)(fMinMultiplicity+(b-2)*fMultipicityBinWidth),(Int_t)(fMinMultiplicity+(b-1)*fMultipicityBinWidth))); | |
975 | } | |
976 | fNonIsotropicTermsVsMPro->GetYaxis()->SetBinLabel(fNoOfMultipicityBins+2,Form(" M #geq %d",(Int_t)(fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth))); | |
977 | } else | |
978 | { | |
979 | fNonIsotropicTermsVsMPro->GetYaxis()->SetTitle("M"); | |
980 | } | |
5c078806 | 981 | fProfileList->Add(fNonIsotropicTermsVsMPro); |
b71a354b | 982 | |
983 | // d) Histogram which quantifies bias coming from detector inefficiencies to 3-p correlator <<cos[n(phi1+phi2-2phi3)]>> vs M: | |
489d5531 | 984 | TString detectorBiasVsMHistName = "fDetectorBiasVsMHist"; |
e558a733 | 985 | fDetectorBiasVsMHist = new TH1D(detectorBiasVsMHistName.Data(),"",fNoOfMultipicityBins+2,0,fNoOfMultipicityBins+2); |
e999459d | 986 | fDetectorBiasVsMHist->SetStats(kFALSE); |
987 | if(fHarmonic == 1) | |
e558a733 | 988 | { |
e999459d | 989 | fDetectorBiasVsMHist->SetTitle("#frac{corrected}{measured} #LT#LTcos(#phi_{1}+#phi_{2}-2#phi_{3})#GT#GT #font[72]{vs} M"); |
e558a733 | 990 | } else |
991 | { | |
e999459d | 992 | fDetectorBiasVsMHist->SetTitle(Form("#frac{corrected}{measured} #LT#LTcos[%d(#phi_{1}+#phi_{2}-2#phi_{3})]#GT#GT #font[72]{vs} M",fHarmonic)); |
e558a733 | 993 | } |
b71a354b | 994 | if(fShowBinLabelsVsM) |
995 | { | |
996 | fDetectorBiasVsMHist->GetXaxis()->SetBinLabel(1,Form("M < %d",(Int_t)fMinMultiplicity)); | |
997 | for(Int_t b=2;b<=fNoOfMultipicityBins+1;b++) | |
998 | { | |
999 | fDetectorBiasVsMHist->GetXaxis()->SetBinLabel(b,Form("%d #leq M < %d",(Int_t)(fMinMultiplicity+(b-2)*fMultipicityBinWidth),(Int_t)(fMinMultiplicity+(b-1)*fMultipicityBinWidth))); | |
1000 | } | |
1001 | fDetectorBiasVsMHist->GetXaxis()->SetBinLabel(fNoOfMultipicityBins+2,Form(" M #geq %d",(Int_t)(fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth))); | |
1002 | } else | |
1003 | { | |
1004 | fDetectorBiasVsMHist->GetXaxis()->SetTitle("M"); | |
1005 | } | |
e558a733 | 1006 | fResultsList->Add(fDetectorBiasVsMHist); |
b71a354b | 1007 | |
1008 | } // end of void AliFlowAnalysisWithMixedHarmonics::BookVsM() | |
1009 | ||
1010 | //================================================================================================================ | |
1011 | ||
1012 | void AliFlowAnalysisWithMixedHarmonics::BookDifferential() | |
1013 | { | |
1014 | // Book histos and profiles holding results vs (p1+p2)/2 and |p1-p2|. | |
d66d46f7 | 1015 | |
5c078806 | 1016 | TString psdFlag[2] = {"PtSum","PtDiff"}; |
e999459d | 1017 | TString psdTitleFlag[2] = {"(p_{T,1}+ p_{T,2})/2","#left|p_{T,1}- p_{T,2}#right|"}; |
41e6d9e4 | 1018 | TString psdFlag2[2] = {"EtaSum","EtaDiff"}; |
1019 | TString psdTitleFlag2[2] = {"(#eta_{1}+ #eta_{2})/2","#left|#eta_{1}- #eta_{2}#right|"}; | |
5c078806 | 1020 | //TString s3pCorrelatorVsPtSumDiffProName = "f3pCorrelatorVsPtSumDiffPro"; |
1021 | for(Int_t sd=0;sd<2;sd++) | |
1022 | { | |
5c078806 | 1023 | f3pCorrelatorVsPtSumDiffPro[sd] = new TProfile(Form("f3pCorrelatorVs%sPro",psdFlag[sd].Data()),"",fnBinsPt,0.,fPtMax); |
e999459d | 1024 | f3pCorrelatorVsPtSumDiffPro[sd]->SetStats(kFALSE); |
41e6d9e4 | 1025 | f3pCorrelatorVsEtaSumDiffPro[sd] = new TProfile(Form("f3pCorrelatorVs%sPro",psdFlag2[sd].Data()),"",fnBinsEta,fEtaMin,fEtaMax); |
1026 | f3pCorrelatorVsEtaSumDiffPro[sd]->SetStats(kFALSE); | |
5c078806 | 1027 | //f3pCorrelatorVsPtSumDiffPro[sd]->SetLabelSize(0.05); |
1028 | //f3pCorrelatorVsPtSumDiffPro[sd]->SetMarkerStyle(25); | |
e999459d | 1029 | if(fHarmonic == 1) |
1030 | { | |
1031 | f3pCorrelatorVsPtSumDiffPro[sd]->SetTitle(Form("#LT#LTcos(#psi_{1}+#psi_{2}-2#phi_{3})#GT#GT #font[72]{vs} %s",psdTitleFlag[sd].Data())); | |
41e6d9e4 | 1032 | f3pCorrelatorVsEtaSumDiffPro[sd]->SetTitle(Form("#LT#LTcos(#psi_{1}+#psi_{2}-2#phi_{3})#GT#GT #font[72]{vs} %s",psdTitleFlag2[sd].Data())); |
e999459d | 1033 | } else |
1034 | { | |
1035 | f3pCorrelatorVsPtSumDiffPro[sd]->SetTitle(Form("#LT#LTcos[%d(#psi_{1}+#psi_{2}-2#phi_{3})]#GT#GT #font[72]{vs} %s",fHarmonic,psdTitleFlag[sd].Data())); | |
41e6d9e4 | 1036 | f3pCorrelatorVsEtaSumDiffPro[sd]->SetTitle(Form("#LT#LTcos[%d(#psi_{1}+#psi_{2}-2#phi_{3})]#GT#GT #font[72]{vs} %s",fHarmonic,psdTitleFlag2[sd].Data())); |
e999459d | 1037 | } |
5c078806 | 1038 | f3pCorrelatorVsPtSumDiffPro[sd]->GetXaxis()->SetTitle(psdTitleFlag[sd].Data()); |
1039 | fProfileList->Add(f3pCorrelatorVsPtSumDiffPro[sd]); | |
41e6d9e4 | 1040 | f3pCorrelatorVsEtaSumDiffPro[sd]->GetXaxis()->SetTitle(psdTitleFlag2[sd].Data()); |
1041 | fProfileList->Add(f3pCorrelatorVsEtaSumDiffPro[sd]); | |
e409ac85 | 1042 | } |
1043 | ||
1044 | f2pCorrelatorCosPsiDiff = new TProfile("f2pCorrelatorCosPsiDiff","",fnBinsPt,0.,fPtMax); | |
1045 | f2pCorrelatorCosPsiDiff->SetStats(kFALSE); | |
1046 | f2pCorrelatorCosPsiSum = new TProfile("f2pCorrelatorCosPsiSum","",fnBinsPt,0.,fPtMax); | |
1047 | f2pCorrelatorCosPsiSum->SetStats(kFALSE); | |
1048 | f2pCorrelatorSinPsiDiff = new TProfile("f2pCorrelatorSinPsiDiff","",fnBinsPt,0.,fPtMax); | |
1049 | f2pCorrelatorSinPsiDiff->SetStats(kFALSE); | |
1050 | f2pCorrelatorSinPsiSum = new TProfile("f2pCorrelatorSinPsiSum","",fnBinsPt,0.,fPtMax); | |
1051 | f2pCorrelatorSinPsiSum->SetStats(kFALSE); | |
1052 | if(fHarmonic == 1) { | |
1053 | f2pCorrelatorCosPsiDiff->SetTitle(Form("#LT#LTcos(#psi_{1}-#psi_{2})#GT#GT #font[72]{vs} %s",psdTitleFlag[1].Data())); | |
1054 | f2pCorrelatorCosPsiSum->SetTitle(Form("#LT#LTcos(#psi_{1}+#psi_{2})#GT#GT #font[72]{vs} %s",psdTitleFlag[1].Data())); | |
1055 | f2pCorrelatorSinPsiDiff->SetTitle(Form("#LT#LTsin(#psi_{1}-#psi_{2})#GT#GT #font[72]{vs} %s",psdTitleFlag[1].Data())); | |
1056 | f2pCorrelatorSinPsiSum->SetTitle(Form("#LT#LTsin(#psi_{1}+#psi_{2})#GT#GT #font[72]{vs} %s",psdTitleFlag[1].Data())); | |
1057 | } | |
1058 | else { | |
1059 | f2pCorrelatorCosPsiDiff->SetTitle(Form("#LT#LTcos[%d(#psi_{1}-#psi_{2})]#GT#GT #font[72]{vs} %s",fHarmonic,psdTitleFlag2[1].Data())); | |
1060 | f2pCorrelatorCosPsiSum->SetTitle(Form("#LT#LTcos[%d(#psi_{1}+#psi_{2})]#GT#GT #font[72]{vs} %s",fHarmonic,psdTitleFlag2[1].Data())); | |
1061 | f2pCorrelatorSinPsiDiff->SetTitle(Form("#LT#LTsin[%d(#psi_{1}-#psi_{2})]#GT#GT #font[72]{vs} %s",fHarmonic,psdTitleFlag2[1].Data())); | |
1062 | f2pCorrelatorSinPsiSum->SetTitle(Form("#LT#LTsin[%d(#psi_{1}+#psi_{2})]#GT#GT #font[72]{vs} %s",fHarmonic,psdTitleFlag2[1].Data())); | |
1063 | } | |
1064 | fProfileList->Add(f2pCorrelatorCosPsiDiff); | |
1065 | fProfileList->Add(f2pCorrelatorCosPsiSum); | |
1066 | fProfileList->Add(f2pCorrelatorSinPsiDiff); | |
1067 | fProfileList->Add(f2pCorrelatorSinPsiSum); | |
1068 | ||
b71a354b | 1069 | } // end of void AliFlowAnalysisWithMixedHarmonics::BookDifferential() |
1070 | ||
d66d46f7 | 1071 | //================================================================================================================ |
1072 | ||
489d5531 | 1073 | void AliFlowAnalysisWithMixedHarmonics::AccessConstants() |
1074 | { | |
1075 | // Access needed common constants from AliFlowCommonConstants. | |
1076 | ||
1077 | fnBinsPhi = AliFlowCommonConstants::GetMaster()->GetNbinsPhi(); | |
1078 | fPhiMin = AliFlowCommonConstants::GetMaster()->GetPhiMin(); | |
1079 | fPhiMax = AliFlowCommonConstants::GetMaster()->GetPhiMax(); | |
1080 | if(fnBinsPhi) fPhiBinWidth = (fPhiMax-fPhiMin)/fnBinsPhi; | |
1081 | fnBinsPt = AliFlowCommonConstants::GetMaster()->GetNbinsPt(); | |
1082 | fPtMin = AliFlowCommonConstants::GetMaster()->GetPtMin(); | |
1083 | fPtMax = AliFlowCommonConstants::GetMaster()->GetPtMax(); | |
1084 | if(fnBinsPt) fPtBinWidth = (fPtMax-fPtMin)/fnBinsPt; | |
1085 | fnBinsEta = AliFlowCommonConstants::GetMaster()->GetNbinsEta(); | |
1086 | fEtaMin = AliFlowCommonConstants::GetMaster()->GetEtaMin(); | |
1087 | fEtaMax = AliFlowCommonConstants::GetMaster()->GetEtaMax(); | |
1088 | if(fnBinsEta) fEtaBinWidth = (fEtaMax-fEtaMin)/fnBinsEta; | |
1089 | ||
d66d46f7 | 1090 | } // end of void AliFlowAnalysisWithMixedHarmonics::AccessConstants() |
1091 | ||
489d5531 | 1092 | //================================================================================================================ |
1093 | ||
1094 | void AliFlowAnalysisWithMixedHarmonics::CrossCheckSettings() | |
1095 | { | |
1096 | // Cross-check if the user settings make sense. | |
1097 | ||
e999459d | 1098 | // ... |
1099 | ||
489d5531 | 1100 | } // end of void AliFlowAnalysisWithMixedHarmonics::CrossCheckSettings() |
1101 | ||
1102 | //================================================================================================================ | |
1103 | ||
1104 | void AliFlowAnalysisWithMixedHarmonics::BookAndFillWeightsHistograms() | |
1105 | { | |
1106 | // Book and fill (by accessing file "weights.root") histograms which hold phi, pt and eta weights. | |
1107 | ||
1108 | if(!fWeightsList) | |
1109 | { | |
e999459d | 1110 | cout<<endl; |
1111 | cout<<" WARNING (MH): fWeightsList is NULL in BookAndFillWeightsHistograms() !!!!"<<endl; | |
1112 | cout<<endl; | |
489d5531 | 1113 | exit(0); |
1114 | } | |
1115 | // Profile to hold flags for weights: | |
1116 | TString fUseParticleWeightsName = "fUseParticleWeightsMH"; | |
1117 | fUseParticleWeights = new TProfile(fUseParticleWeightsName.Data(),"0 = particle weight not used, 1 = particle weight used ",3,0,3); | |
e999459d | 1118 | fUseParticleWeights->SetStats(kFALSE); |
489d5531 | 1119 | fUseParticleWeights->SetLabelSize(0.06); |
1120 | (fUseParticleWeights->GetXaxis())->SetBinLabel(1,"w_{#phi}"); | |
1121 | (fUseParticleWeights->GetXaxis())->SetBinLabel(2,"w_{p_{T}}"); | |
1122 | (fUseParticleWeights->GetXaxis())->SetBinLabel(3,"w_{#eta}"); | |
1123 | fUseParticleWeights->Fill(0.5,(Int_t)fUsePhiWeights); | |
1124 | fUseParticleWeights->Fill(1.5,(Int_t)fUsePtWeights); | |
1125 | fUseParticleWeights->Fill(2.5,(Int_t)fUseEtaWeights); | |
1126 | fWeightsList->Add(fUseParticleWeights); | |
1127 | // Phi-weights: | |
1128 | if(fUsePhiWeights) | |
1129 | { | |
1130 | if(fWeightsList->FindObject("phi_weights")) | |
1131 | { | |
1132 | fPhiWeights = dynamic_cast<TH1F*>(fWeightsList->FindObject("phi_weights")); | |
54451c00 | 1133 | if (!fPhiWeights) |
1134 | { | |
1135 | printf("WARNING: no phi weights. bye!\n"); | |
1136 | exit(0); | |
1137 | } | |
489d5531 | 1138 | if(TMath::Abs(fPhiWeights->GetBinWidth(1)-fPhiBinWidth)>pow(10.,-6.)) |
1139 | { | |
d66d46f7 | 1140 | cout<<endl; |
e999459d | 1141 | cout<<" WARNING (MH): Inconsistent binning in histograms for phi-weights throughout the code."<<endl; |
d66d46f7 | 1142 | cout<<endl; |
489d5531 | 1143 | exit(0); |
1144 | } | |
1145 | } else | |
1146 | { | |
e999459d | 1147 | cout<<endl; |
1148 | cout<<" WARNING (MH): fWeightsList->FindObject(\"phi_weights\") is NULL in BookAndFillWeightsHistograms() !!!!"<<endl; | |
1149 | cout<<endl; | |
489d5531 | 1150 | exit(0); |
1151 | } | |
1152 | } // end of if(fUsePhiWeights) | |
1153 | // Pt-weights: | |
1154 | if(fUsePtWeights) | |
1155 | { | |
1156 | if(fWeightsList->FindObject("pt_weights")) | |
1157 | { | |
1158 | fPtWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("pt_weights")); | |
54451c00 | 1159 | if (!fPtWeights) |
1160 | { | |
1161 | printf("WARNING: no pt weights. bye!\n"); | |
1162 | exit(0); | |
1163 | } | |
489d5531 | 1164 | if(TMath::Abs(fPtWeights->GetBinWidth(1)-fPtBinWidth)>pow(10.,-6.)) |
1165 | { | |
d66d46f7 | 1166 | cout<<endl; |
e999459d | 1167 | cout<<" WARNING (MH): Inconsistent binning in histograms for pt-weights throughout the code."<<endl; |
d66d46f7 | 1168 | cout<<endl; |
489d5531 | 1169 | exit(0); |
1170 | } | |
1171 | } else | |
1172 | { | |
e999459d | 1173 | cout<<endl; |
1174 | cout<<" WARNING (MH): fWeightsList->FindObject(\"pt_weights\") is NULL in BookAndFillWeightsHistograms() !!!!"<<endl; | |
1175 | cout<<endl; | |
489d5531 | 1176 | exit(0); |
1177 | } | |
1178 | } // end of if(fUsePtWeights) | |
1179 | // Eta-weights: | |
1180 | if(fUseEtaWeights) | |
1181 | { | |
1182 | if(fWeightsList->FindObject("eta_weights")) | |
1183 | { | |
1184 | fEtaWeights = dynamic_cast<TH1D*>(fWeightsList->FindObject("eta_weights")); | |
54451c00 | 1185 | if (!fEtaWeights) |
1186 | { | |
1187 | printf("WARNING: no pt weights. bye!\n"); | |
1188 | exit(0); | |
1189 | } | |
489d5531 | 1190 | if(TMath::Abs(fEtaWeights->GetBinWidth(1)-fEtaBinWidth)>pow(10.,-6.)) |
1191 | { | |
d66d46f7 | 1192 | cout<<endl; |
e999459d | 1193 | cout<<" WARNING (MH): Inconsistent binning in histograms for eta-weights throughout the code."<<endl; |
d66d46f7 | 1194 | cout<<endl; |
489d5531 | 1195 | exit(0); |
1196 | } | |
1197 | } else | |
1198 | { | |
e999459d | 1199 | cout<<endl; |
1200 | cout<<" WARNING (MH): fUseEtaWeights && fWeightsList->FindObject(\"eta_weights\") is NULL in BookAndFillWeightsHistograms() !!!!"<<endl; | |
1201 | cout<<endl; | |
489d5531 | 1202 | exit(0); |
1203 | } | |
1204 | } // end of if(fUseEtaWeights) | |
1205 | ||
d66d46f7 | 1206 | } // end of AliFlowAnalysisWithMixedHarmonics::BookAndFillWeightsHistograms() |
1207 | ||
1208 | //================================================================================================================ | |
489d5531 | 1209 | |
1210 | void AliFlowAnalysisWithMixedHarmonics::CheckPointersUsedInMake() | |
1211 | { | |
1212 | // Check pointers used in method Make(). | |
d66d46f7 | 1213 | |
e558a733 | 1214 | if(!fReQnk || !fImQnk || !fSpk ) |
d66d46f7 | 1215 | { |
1216 | cout<<endl; | |
e999459d | 1217 | cout<<" WARNING (MH): fReQnk || fImQnk || fSpk is NULL in CheckPointersUsedInMake() !!!!"<<endl; |
d66d46f7 | 1218 | cout<<endl; |
1219 | exit(0); | |
1220 | } | |
1221 | if(!f3pCorrelatorPro) | |
1222 | { | |
1223 | cout<<endl; | |
e999459d | 1224 | cout<<" WARNING (MH): f3pCorrelatorPro is NULL in CheckPointersUsedInMake() !!!!"<<endl; |
d66d46f7 | 1225 | cout<<endl; |
1226 | exit(0); | |
5c078806 | 1227 | } |
97d82c42 | 1228 | if(!f5pCorrelatorPro) |
1229 | { | |
1230 | cout<<endl; | |
1231 | cout<<" WARNING (MH): f5pCorrelatorPro is NULL in CheckPointersUsedInMake() !!!!"<<endl; | |
1232 | cout<<endl; | |
1233 | exit(0); | |
1234 | } | |
5c078806 | 1235 | if(!fNonIsotropicTermsPro) |
1236 | { | |
1237 | cout<<endl; | |
e999459d | 1238 | cout<<" WARNING (MH): fNonIsotropicTermsPro is NULL in CheckPointersUsedInMake() !!!!"<<endl; |
5c078806 | 1239 | cout<<endl; |
1240 | exit(0); | |
1241 | } | |
b71a354b | 1242 | if(!f3pCorrelatorVsMPro && fCalculateVsM) |
5c078806 | 1243 | { |
1244 | cout<<endl; | |
e999459d | 1245 | cout<<" WARNING (MH): f3pCorrelatorVsMPro is NULL in CheckPointersUsedInMake() !!!!"<<endl; |
5c078806 | 1246 | cout<<endl; |
1247 | exit(0); | |
1248 | } | |
41e6d9e4 | 1249 | if(!f3pPOICorrelatorVsM && fCalculateVsM) |
1250 | { | |
1251 | cout<<endl; | |
1252 | cout<<" WARNING (MH): f3pPOICorrelatorVsM is NULL in CheckPointersUsedInMake() !!!!"<<endl; | |
1253 | cout<<endl; | |
1254 | exit(0); | |
1255 | } | |
b71a354b | 1256 | if(!fNonIsotropicTermsVsMPro && fCalculateVsM) |
5c078806 | 1257 | { |
1258 | cout<<endl; | |
e999459d | 1259 | cout<<" WARNING (MH): fNonIsotropicTermsVsMPro is NULL in CheckPointersUsedInMake() !!!!"<<endl; |
5c078806 | 1260 | cout<<endl; |
1261 | exit(0); | |
1262 | } | |
97d82c42 | 1263 | |
1264 | // Differential correlators: | |
e999459d | 1265 | if(!fEvaluateDifferential3pCorrelator){return;} |
5c078806 | 1266 | for(Int_t sd=0;sd<2;sd++) |
1267 | { | |
1268 | if(!(f3pCorrelatorVsPtSumDiffPro[sd])) | |
1269 | { | |
1270 | cout<<endl; | |
e999459d | 1271 | cout<<" WARNING (MH): "<<Form("f3pCorrelatorVsPtSumDiffPro[%d]",sd)<<" is NULL in CheckPointersUsedInMake() !!!!"<<endl; |
5c078806 | 1272 | cout<<endl; |
1273 | exit(0); | |
1274 | } | |
41e6d9e4 | 1275 | if(!(f3pCorrelatorVsEtaSumDiffPro[sd])) |
1276 | { | |
1277 | cout<<endl; | |
1278 | cout<<" WARNING (MH): "<<Form("f3pCorrelatorVsEtaSumDiffPro[%d]",sd)<<" is NULL in CheckPointersUsedInMake() !!!!"<<endl; | |
1279 | cout<<endl; | |
1280 | exit(0); | |
1281 | } | |
d66d46f7 | 1282 | } |
e999459d | 1283 | for(Int_t sd=0;sd<2;sd++) |
1284 | { | |
1285 | if(!fRePEBE[sd]||!fImPEBE[sd]) | |
1286 | { | |
1287 | cout<<endl; | |
3c14341e | 1288 | cout<<" WARNING (MH): "<<Form("!fRePEBE[%d]||!fImPEBE[%d]",sd,sd)<<" is NULL in CheckPointersUsedInMake() !!!!"<<endl; |
e999459d | 1289 | cout<<endl; |
1290 | exit(0); | |
1291 | } | |
41e6d9e4 | 1292 | if(!fReEtaEBE[sd]||!fImEtaEBE[sd]) |
1293 | { | |
1294 | cout<<endl; | |
1295 | cout<<" WARNING (MH): "<<Form("!fReEtaEBE[%d]||!fImEtaEBE[%d]",sd,sd)<<" is NULL in CheckPointersUsedInMake() !!!!"<<endl; | |
1296 | cout<<endl; | |
1297 | exit(0); | |
1298 | } | |
1299 | for(Int_t fs=0;fs<2;fs++) | |
e999459d | 1300 | { |
1301 | if(!fOverlapEBE[fs][sd]||!fOverlapEBE[fs][sd]) | |
1302 | { | |
1303 | cout<<endl; | |
3c14341e | 1304 | cout<<" WARNING (MH): "<<Form("!fOverlapEBE[%d][%d]||!fOverlapEBE[%d][%d]",fs,sd,fs,sd)<<" is NULL in CheckPointersUsedInMake() !!!!"<<endl; |
e999459d | 1305 | cout<<endl; |
1306 | exit(0); | |
1307 | } | |
41e6d9e4 | 1308 | if(!fOverlapEBE2[fs][sd]||!fOverlapEBE2[fs][sd]) |
1309 | { | |
1310 | cout<<endl; | |
1311 | cout<<" WARNING (MH): "<<Form("!fOverlapEBE2[%d][%d]||!fOverlapEBE2[%d][%d]",fs,sd,fs,sd)<<" is NULL in CheckPointersUsedInMake() !!!!"<<endl; | |
1312 | cout<<endl; | |
1313 | exit(0); | |
1314 | } | |
e999459d | 1315 | } // end of for(Int_t fs=0;fs<2;fs++) |
1316 | } // end of for(Int_t sd=0;sd<2;sd++) | |
97d82c42 | 1317 | |
1318 | if(!f2pCorrelatorCosPsiDiff) { | |
1319 | cout<<endl; | |
1320 | cout<<" WARNING (MH): f2pCorrelatorCosPsiDiff is NULL in CheckPointersUsedInMake() !!!!"<<endl; | |
1321 | cout<<endl; | |
1322 | exit(0); | |
1323 | } | |
1324 | if(!f2pCorrelatorCosPsiSum) { | |
1325 | cout<<endl; | |
1326 | cout<<" WARNING (MH): f2pCorrelatorCosPsiSum is NULL in CheckPointersUsedInMake() !!!!"<<endl; | |
1327 | cout<<endl; | |
1328 | exit(0); | |
1329 | } | |
1330 | if(!f2pCorrelatorSinPsiDiff) { | |
1331 | cout<<endl; | |
1332 | cout<<" WARNING (MH): f2pCorrelatorSinPsiDiff is NULL in CheckPointersUsedInMake() !!!!"<<endl; | |
1333 | cout<<endl; | |
1334 | exit(0); | |
1335 | } | |
1336 | if(!f2pCorrelatorSinPsiSum) { | |
1337 | cout<<endl; | |
1338 | cout<<" WARNING (MH): f2pCorrelatorSinPsiSum is NULL in CheckPointersUsedInMake() !!!!"<<endl; | |
1339 | cout<<endl; | |
1340 | exit(0); | |
1341 | } | |
489d5531 | 1342 | |
d66d46f7 | 1343 | } // end of AliFlowAnalysisWithMixedHarmonics::CheckPointersUsedInMake() |
1344 | ||
1345 | //================================================================================================================ | |
489d5531 | 1346 | |
1347 | void AliFlowAnalysisWithMixedHarmonics::CheckPointersUsedInFinish() | |
1348 | { | |
d66d46f7 | 1349 | // Check pointers used in method Finish(). |
ecac11c2 | 1350 | |
1351 | if(!fAnalysisSettings) | |
1352 | { | |
1353 | cout<<endl; | |
e999459d | 1354 | cout<<" WARNING (MH): fAnalysisSettings is NULL in CheckPointersUsedInFinish() !!!!"<<endl; |
ecac11c2 | 1355 | cout<<endl; |
1356 | exit(0); | |
1357 | } | |
1358 | if(!f3pCorrelatorPro) | |
1359 | { | |
1360 | cout<<endl; | |
e999459d | 1361 | cout<<" WARNING (MH): f3pCorrelatorPro is NULL in CheckPointersUsedInFinish() !!!!"<<endl; |
ecac11c2 | 1362 | cout<<endl; |
1363 | exit(0); | |
1364 | } | |
1365 | if(!fNonIsotropicTermsPro) | |
1366 | { | |
1367 | cout<<endl; | |
e999459d | 1368 | cout<<" WARNING (MH): fNonIsotropicTermsPro is NULL in CheckPointersUsedInFinish() !!!!"<<endl; |
ecac11c2 | 1369 | cout<<endl; |
1370 | exit(0); | |
1371 | } | |
41e6d9e4 | 1372 | if(!f3pPOICorrelatorVsM && fCalculateVsM) |
1373 | { | |
1374 | cout<<endl; | |
1375 | cout<<" WARNING (MH): f3pPOICorrelatorVsM is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
1376 | cout<<endl; | |
1377 | exit(0); | |
1378 | } | |
b71a354b | 1379 | if(!f3pCorrelatorVsMPro && fCalculateVsM) |
ecac11c2 | 1380 | { |
1381 | cout<<endl; | |
e999459d | 1382 | cout<<" WARNING (MH): f3pCorrelatorVsMPro is NULL in CheckPointersUsedInFinish() !!!!"<<endl; |
ecac11c2 | 1383 | cout<<endl; |
1384 | exit(0); | |
1385 | } | |
b71a354b | 1386 | if(!f3pCorrelatorVsMHist && fCalculateVsM) |
e558a733 | 1387 | { |
1388 | cout<<endl; | |
e999459d | 1389 | cout<<" WARNING (MH): f3pCorrelatorVsMHist is NULL in CheckPointersUsedInFinish() !!!!"<<endl; |
e558a733 | 1390 | cout<<endl; |
1391 | exit(0); | |
1392 | } | |
b71a354b | 1393 | if(!fNonIsotropicTermsVsMPro && fCalculateVsM) |
ecac11c2 | 1394 | { |
1395 | cout<<endl; | |
e999459d | 1396 | cout<<" WARNING (MH): fNonIsotropicTermsVsMPro is NULL in CheckPointersUsedInFinish() !!!!"<<endl; |
ecac11c2 | 1397 | cout<<endl; |
1398 | exit(0); | |
1399 | } | |
e409ac85 | 1400 | |
ecac11c2 | 1401 | if(!f3pCorrelatorHist) |
1402 | { | |
1403 | cout<<endl; | |
e999459d | 1404 | cout<<" WARNING (MH): f3pCorrelatorHist is NULL in CheckPointersUsedInFinish() !!!!"<<endl; |
ecac11c2 | 1405 | cout<<endl; |
1406 | exit(0); | |
5c078806 | 1407 | } |
ecac11c2 | 1408 | if(!fDetectorBiasHist) |
1409 | { | |
1410 | cout<<endl; | |
e999459d | 1411 | cout<<" WARNING (MH): fDetectorBiasHist is NULL in CheckPointersUsedInFinish() !!!!"<<endl; |
ecac11c2 | 1412 | cout<<endl; |
1413 | exit(0); | |
1414 | } | |
5c078806 | 1415 | /* to be improved - enabled eventually |
b71a354b | 1416 | if(!fDetectorBiasVsMHist && fCalculateVsM) |
ecac11c2 | 1417 | { |
1418 | cout<<endl; | |
e999459d | 1419 | cout<<" WARNING (MH): !fDetectorBiasVsMHist is NULL in CheckPointersUsedInFinish() !!!!"<<endl; |
ecac11c2 | 1420 | cout<<endl; |
1421 | exit(0); | |
5c078806 | 1422 | } |
1423 | */ | |
97d82c42 | 1424 | |
1425 | // Differential correlators: | |
e999459d | 1426 | if(!fEvaluateDifferential3pCorrelator){return;} |
5c078806 | 1427 | for(Int_t sd=0;sd<2;sd++) |
1428 | { | |
1429 | if(!(f3pCorrelatorVsPtSumDiffPro[sd])) | |
1430 | { | |
1431 | cout<<endl; | |
e999459d | 1432 | cout<<" WARNING (MH): "<<Form("f3pCorrelatorVsPtSumDiffPro[%d]",sd)<<" is NULL in CheckPointersUsedInFinish() !!!!"<<endl; |
5c078806 | 1433 | cout<<endl; |
1434 | exit(0); | |
1435 | } | |
41e6d9e4 | 1436 | if(!(f3pCorrelatorVsEtaSumDiffPro[sd])) |
1437 | { | |
1438 | cout<<endl; | |
1439 | cout<<" WARNING (MH): "<<Form("f3pCorrelatorVsEtaSumDiffPro[%d]",sd)<<" is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
1440 | cout<<endl; | |
1441 | exit(0); | |
1442 | } | |
5c078806 | 1443 | } |
ecac11c2 | 1444 | |
97d82c42 | 1445 | if(!f2pCorrelatorCosPsiDiff) { |
1446 | cout<<endl; | |
1447 | cout<<" WARNING (MH): f2pCorrelatorCosPsiDiff is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
1448 | cout<<endl; | |
1449 | exit(0); | |
1450 | } | |
1451 | if(!f2pCorrelatorCosPsiSum) { | |
1452 | cout<<endl; | |
1453 | cout<<" WARNING (MH): f2pCorrelatorCosPsiSum is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
1454 | cout<<endl; | |
1455 | exit(0); | |
1456 | } | |
1457 | if(!f2pCorrelatorSinPsiDiff) { | |
1458 | cout<<endl; | |
1459 | cout<<" WARNING (MH): f2pCorrelatorSinPsiDiff is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
1460 | cout<<endl; | |
1461 | exit(0); | |
1462 | } | |
1463 | if(!f2pCorrelatorSinPsiSum) { | |
1464 | cout<<endl; | |
1465 | cout<<" WARNING (MH): f2pCorrelatorSinPsiSum is NULL in CheckPointersUsedInFinish() !!!!"<<endl; | |
1466 | cout<<endl; | |
1467 | exit(0); | |
1468 | } | |
1469 | ||
489d5531 | 1470 | } // end of AliFlowAnalysisWithMixedHarmonics::CheckPointersUsedInFinish() |
d66d46f7 | 1471 | |
1472 | //================================================================================================================ | |
489d5531 | 1473 | |
5c078806 | 1474 | void AliFlowAnalysisWithMixedHarmonics::PrintOnTheScreen() |
1475 | { | |
1476 | // Print the final results on the screen. | |
1477 | ||
b71a354b | 1478 | // <<cos[n*(phi1+phi2-2phi3)]>>: |
1479 | Double_t d3pCorrelator = 0.; | |
1480 | Double_t d3pCorrelatorError = 0.; | |
1481 | if(!fCorrectForDetectorEffects) | |
1482 | { | |
1483 | d3pCorrelator = f3pCorrelatorPro->GetBinContent(1); | |
1484 | d3pCorrelatorError = f3pCorrelatorPro->GetBinError(1); | |
1485 | } else | |
1486 | { | |
1487 | d3pCorrelator = f3pCorrelatorHist->GetBinContent(1); | |
1488 | d3pCorrelatorError = f3pCorrelatorHist->GetBinError(1); | |
1489 | } | |
1490 | ||
e409ac85 | 1491 | // <<cos[n*(psi1+psi2-2phi3)]>>: |
1492 | Double_t d3pCorrelatorPoi = 0.; | |
1493 | Double_t d3pCorrelatorPoiError = 0.; | |
97d82c42 | 1494 | if(fEvaluateDifferential3pCorrelator) |
1495 | { | |
1496 | GetCorrelatorAndError(f3pCorrelatorVsPtSumDiffPro[0], | |
e409ac85 | 1497 | d3pCorrelatorPoi, |
1498 | d3pCorrelatorPoiError); | |
97d82c42 | 1499 | } |
5c078806 | 1500 | cout<<endl; |
1501 | cout<<"*******************************************************"<<endl; | |
1502 | cout<<"*******************************************************"<<endl; | |
1503 | cout<<" Mixed Harmonics "<<endl; | |
1504 | cout<<endl; | |
e999459d | 1505 | if(fHarmonic!=1) |
5c078806 | 1506 | { |
b71a354b | 1507 | cout<<" cos["<<fHarmonic<<"(phi1+phi2-2phi3)] = "<<d3pCorrelator<<" +/- "<<d3pCorrelatorError<<endl; |
e409ac85 | 1508 | cout<<" cos["<<fHarmonic<<"(psi1+psi2-2phi3)] = "<<d3pCorrelatorPoi<<" +/- "<<d3pCorrelatorPoiError<<endl; |
b71a354b | 1509 | } else |
1510 | { | |
1511 | cout<<" cos(phi1+phi2-2phi3) = "<<d3pCorrelator<<" +/- "<<d3pCorrelatorError<<endl; | |
e409ac85 | 1512 | cout<<" cos(psi1+psi2-2phi3) = "<<d3pCorrelatorPoi<<" +/- "<<d3pCorrelatorPoiError<<endl; |
b71a354b | 1513 | } |
1514 | if(!fCorrectForDetectorEffects) | |
1515 | { | |
1516 | cout<<" Detector Bias = "<<fDetectorBiasHist->GetBinContent(1)<<" (not corrected for)"<<endl; | |
5c078806 | 1517 | } else |
1518 | { | |
b71a354b | 1519 | cout<<" Detector Bias = "<<fDetectorBiasHist->GetBinContent(1)<<" (corrected for)"<<endl; |
5c078806 | 1520 | } |
5c078806 | 1521 | cout<<endl; |
e999459d | 1522 | cout<<" nEvts = "<<(Int_t)fCommonHists->GetHistMultRP()->GetEntries()<<", <M> = "<<(Double_t)fCommonHists->GetHistMultRP()->GetMean()<<endl; |
5c078806 | 1523 | cout<<"*******************************************************"<<endl; |
1524 | cout<<"*******************************************************"<<endl; | |
1525 | ||
1526 | } // end of void AliFlowAnalysisWithMixedHarmonics::PrintOnTheScreen() | |
1527 | ||
1528 | //================================================================================================================ | |
1529 | ||
489d5531 | 1530 | void AliFlowAnalysisWithMixedHarmonics::AccessSettings() |
1531 | { | |
d66d46f7 | 1532 | // Access the settings for analysis with mixed harmonics. |
1533 | ||
e999459d | 1534 | fCorrectForDetectorEffects = (Bool_t)fAnalysisSettings->GetBinContent(1); |
1535 | fNoOfMultipicityBins = (Int_t)fAnalysisSettings->GetBinContent(2); | |
1536 | fMultipicityBinWidth = (Double_t)fAnalysisSettings->GetBinContent(3); | |
1537 | fMinMultiplicity = (Double_t)fAnalysisSettings->GetBinContent(4); | |
1538 | fPrintOnTheScreen = (Bool_t)fAnalysisSettings->GetBinContent(5); | |
1539 | fHarmonic = (Int_t)fAnalysisSettings->GetBinContent(6); | |
1540 | fOppositeChargesPOI = (Bool_t)fAnalysisSettings->GetBinContent(7); | |
b71a354b | 1541 | fEvaluateDifferential3pCorrelator = (Bool_t)fAnalysisSettings->GetBinContent(8); |
1542 | fCalculateVsM = (Bool_t)fAnalysisSettings->GetBinContent(9); | |
1543 | fShowBinLabelsVsM = (Bool_t)fAnalysisSettings->GetBinContent(10); | |
1544 | ||
d66d46f7 | 1545 | } // end of AliFlowAnalysisWithMixedHarmonics::AccessSettings() |
1546 | ||
1547 | //================================================================================================================ | |
489d5531 | 1548 | |
1549 | void AliFlowAnalysisWithMixedHarmonics::CorrectForDetectorEffects() | |
1550 | { | |
e999459d | 1551 | // Correct measured 3-p correlator cos[n(phi1+phi2-2phi3)] for detector effects. |
5c078806 | 1552 | |
d66d46f7 | 1553 | Double_t measured3pCorrelator = f3pCorrelatorPro->GetBinContent(1); // biased by detector effects |
1554 | Double_t corrected3pCorrelator = 0.; // corrected for detector effects | |
1555 | Double_t nonIsotropicTerms[10] = {0.}; // there are 10 distinct non-isotropic terms | |
1556 | for(Int_t nit=0;nit<10;nit++) | |
1557 | { | |
1558 | nonIsotropicTerms[nit] = fNonIsotropicTermsPro->GetBinContent(nit+1); | |
1559 | } | |
1560 | // Calculate corrected 3-p correlator: | |
1561 | corrected3pCorrelator = measured3pCorrelator | |
1562 | - nonIsotropicTerms[2]*nonIsotropicTerms[4] | |
1563 | - nonIsotropicTerms[3]*nonIsotropicTerms[5] | |
1564 | - 2.*nonIsotropicTerms[0]*nonIsotropicTerms[6] | |
1565 | - 2.*nonIsotropicTerms[1]*nonIsotropicTerms[7] | |
1566 | + 2.*nonIsotropicTerms[2]*(pow(nonIsotropicTerms[0],2.)-pow(nonIsotropicTerms[1],2.)) | |
5c078806 | 1567 | + 4.*nonIsotropicTerms[3]*nonIsotropicTerms[0]*nonIsotropicTerms[1]; |
1568 | // Store corrected correlator: | |
b71a354b | 1569 | if(fCorrectForDetectorEffects) |
1570 | { | |
1571 | f3pCorrelatorHist->SetBinContent(1,corrected3pCorrelator); | |
1572 | f3pCorrelatorHist->SetBinError(1,f3pCorrelatorPro->GetBinError(1)); // to be improved (propagate error for non-isotropic terms) | |
1573 | } | |
5c078806 | 1574 | // Quantify bias from detector inefficiences to 3-p correlator. Remark: Bias is quantified as a |
1575 | // ratio between corrected and measured 3-p correlator: | |
1576 | // bias = corrected/measured | |
1577 | // This bias is stored in histogram fDetectorBias. | |
1578 | Double_t bias = 0.; | |
b71a354b | 1579 | if(TMath::Abs(measured3pCorrelator)>1.e-44) |
5c078806 | 1580 | { |
1581 | bias = corrected3pCorrelator/measured3pCorrelator; | |
1582 | fDetectorBiasHist->SetBinContent(1,bias); | |
e558a733 | 1583 | } |
489d5531 | 1584 | |
d66d46f7 | 1585 | } // end of AliFlowAnalysisWithMixedHarmonics::CorrectForDetectorEffects() |
1586 | ||
1587 | //================================================================================================================ | |
489d5531 | 1588 | |
e558a733 | 1589 | void AliFlowAnalysisWithMixedHarmonics::CorrectForDetectorEffectsVsM() |
1590 | { | |
e999459d | 1591 | // Correct measured 3-p correlator cos[n(phi1+phi2-2phi3)] vs M for detector effects. |
e558a733 | 1592 | |
1593 | for(Int_t b=1;b<=fNoOfMultipicityBins+2;b++) | |
1594 | { | |
1595 | Double_t measured3pCorrelator = f3pCorrelatorVsMPro->GetBinContent(b); // biased by detector effects | |
1596 | Double_t corrected3pCorrelator = 0.; // corrected for detector effects | |
1597 | Double_t nonIsotropicTerms[10] = {0.}; // there are 10 distinct non-isotropic terms | |
1598 | for(Int_t nit=0;nit<10;nit++) | |
1599 | { | |
1600 | nonIsotropicTerms[nit] = fNonIsotropicTermsVsMPro->GetBinContent(fNonIsotropicTermsVsMPro->GetBin(nit+1,b)); | |
1601 | } | |
1602 | // Calculate corrected 3-p correlator: | |
1603 | corrected3pCorrelator = measured3pCorrelator | |
1604 | - nonIsotropicTerms[2]*nonIsotropicTerms[4] | |
1605 | - nonIsotropicTerms[3]*nonIsotropicTerms[5] | |
1606 | - 2.*nonIsotropicTerms[0]*nonIsotropicTerms[6] | |
1607 | - 2.*nonIsotropicTerms[1]*nonIsotropicTerms[7] | |
1608 | + 2.*nonIsotropicTerms[2]*(pow(nonIsotropicTerms[0],2.)-pow(nonIsotropicTerms[1],2.)) | |
1609 | + 4.*nonIsotropicTerms[3]*nonIsotropicTerms[0]*nonIsotropicTerms[1]; | |
1610 | // Store corrected correlator: | |
b71a354b | 1611 | if(fCorrectForDetectorEffects) |
1612 | { | |
1613 | f3pCorrelatorVsMHist->SetBinContent(b,corrected3pCorrelator); | |
1614 | f3pCorrelatorVsMHist->SetBinError(b,f3pCorrelatorVsMPro->GetBinError(b)); // to be improved (propagate error for non-isotropic terms) | |
1615 | } | |
e558a733 | 1616 | // Quantify bias from detector inefficiences to 3-p correlator. Remark: Bias is quantified as a |
1617 | // ratio between corrected and measured 3-p correlator: | |
1618 | // bias = corrected/measured | |
1619 | // This bias is stored in histogram fDetectorBias. | |
1620 | Double_t bias = 0.; | |
1621 | if(measured3pCorrelator) | |
1622 | { | |
1623 | bias = corrected3pCorrelator/measured3pCorrelator; | |
1624 | fDetectorBiasVsMHist->SetBinContent(b,bias); | |
1625 | } | |
1626 | } // end of for(Int_t b=1;b<=fNoOfMultipicityBins;b++) | |
1627 | ||
1628 | } // end of AliFlowAnalysisWithMixedHarmonics::CorrectForDetectorEffectsVsM() | |
1629 | ||
1630 | //================================================================================================================ | |
1631 | ||
489d5531 | 1632 | void AliFlowAnalysisWithMixedHarmonics::ResetEventByEventQuantities() |
1633 | { | |
b71a354b | 1634 | // Reset all event-by-event quantities. |
489d5531 | 1635 | |
1636 | fReQnk->Zero(); | |
1637 | fImQnk->Zero(); | |
d66d46f7 | 1638 | fSpk->Zero(); |
e558a733 | 1639 | |
e999459d | 1640 | if(!fEvaluateDifferential3pCorrelator){return;} |
5c078806 | 1641 | for(Int_t sd=0;sd<2;sd++) |
1642 | { | |
1643 | fRePEBE[sd]->Reset(); | |
1644 | fImPEBE[sd]->Reset(); | |
41e6d9e4 | 1645 | fReEtaEBE[sd]->Reset(); |
1646 | fImEtaEBE[sd]->Reset(); | |
5c078806 | 1647 | } |
e999459d | 1648 | for(Int_t fs=0;fs<2;fs++) |
1649 | { | |
1650 | for(Int_t sd=0;sd<2;sd++) | |
1651 | { | |
1652 | fOverlapEBE[fs][sd]->Reset(); | |
41e6d9e4 | 1653 | fOverlapEBE2[fs][sd]->Reset(); |
e999459d | 1654 | } |
1655 | } | |
5c078806 | 1656 | |
d66d46f7 | 1657 | } // end of void AliFlowAnalysisWithMixedHarmonics::ResetEventByEventQuantities() |
1658 | ||
1659 | //================================================================================================================ | |
1660 | ||
489d5531 | 1661 | void AliFlowAnalysisWithMixedHarmonics::Calculate3pCorrelator() |
1662 | { | |
e999459d | 1663 | // Calculate 3-p azimuthal correlator cos[n(phi1+phi2-2phi3)] in terms of Q_{n,k} and S_{p,k}. |
d66d46f7 | 1664 | |
1665 | // a) Calculate 3-p correlator without using particle weights; | |
1666 | // b) Calculate 3-p correlator with using particle weights. | |
1667 | ||
489d5531 | 1668 | // a) Calculate 3-p correlator without using particle weights: |
d66d46f7 | 1669 | if(!(fUsePhiWeights || fUsePtWeights || fUseEtaWeights)) |
1670 | { | |
489d5531 | 1671 | // Multiplicity (number of RPs): |
1672 | Double_t dMult = (*fSpk)(0,0); | |
1673 | // Real and imaginary parts of non-weighted Q-vectors (Q_{n,0}) evaluated in harmonics n and 2n: | |
1674 | Double_t dReQ1n = (*fReQnk)(0,0); | |
1675 | Double_t dReQ2n = (*fReQnk)(1,0); | |
1676 | Double_t dImQ1n = (*fImQnk)(0,0); | |
d66d46f7 | 1677 | Double_t dImQ2n = (*fImQnk)(1,0); |
e999459d | 1678 | // 3-particle azimuthal correlator <cos(n*(phi1+phi2-2phi3))>: |
1679 | Double_t three1n1n2n = (pow(dReQ1n,2.)*dReQ2n + 2.*dReQ1n*dImQ1n*dImQ2n - pow(dImQ1n,2.)*dReQ2n | |
489d5531 | 1680 | - 2.*(pow(dReQ1n,2.)+pow(dImQ1n,2.)) |
1681 | - (pow(dReQ2n,2.)+pow(dImQ2n,2.))+2.*dMult) | |
d66d46f7 | 1682 | / (dMult*(dMult-1.)*(dMult-2.)); |
e999459d | 1683 | |
e558a733 | 1684 | // Fill all-events profile: |
e999459d | 1685 | f3pCorrelatorPro->Fill(0.5,three1n1n2n,dMult*(dMult-1.)*(dMult-2.)); |
5c078806 | 1686 | |
e999459d | 1687 | // 3-particle azimuthal correlator <cos(n*(phi1+phi2-2phi3))> vs multiplicity: |
b71a354b | 1688 | if(fCalculateVsM) |
5c078806 | 1689 | { |
b71a354b | 1690 | if(dMult<fMinMultiplicity) |
1691 | { | |
1692 | f3pCorrelatorVsMPro->Fill(0.5,three1n1n2n,dMult*(dMult-1.)*(dMult-2.)); | |
1693 | } else if(dMult>=fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth) | |
1694 | { | |
1695 | f3pCorrelatorVsMPro->Fill(0.5+fNoOfMultipicityBins+1,three1n1n2n,dMult*(dMult-1.)*(dMult-2.)); | |
1696 | } else | |
1697 | { | |
1698 | f3pCorrelatorVsMPro->Fill(1.5+(Int_t)((dMult-fMinMultiplicity)/fMultipicityBinWidth),three1n1n2n,dMult*(dMult-1.)*(dMult-2.)); | |
1699 | } | |
1700 | } // end of if(fCalculateVsM) | |
5c078806 | 1701 | |
d66d46f7 | 1702 | } // end of if(!(fUsePhiWeights || fUsePtWeights || fUseEtaWeights)) |
1703 | ||
e999459d | 1704 | // b) Calculate 3-p correlator with using particle weights: |
d66d46f7 | 1705 | if(fUsePhiWeights || fUsePtWeights || fUseEtaWeights) |
1706 | { | |
e999459d | 1707 | // ... |
d66d46f7 | 1708 | } // end of if(fUsePhiWeights || fUsePtWeights || fUseEtaWeights) |
1709 | ||
1710 | } // end of void AliFlowAnalysisWithMixedHarmonics::Calculate3pCorrelator() | |
1711 | ||
1712 | //================================================================================================================ | |
97d82c42 | 1713 | |
1714 | void AliFlowAnalysisWithMixedHarmonics::Calculate5pCorrelator() | |
1715 | { | |
1716 | // Calculate 5-p azimuthal correlator cos[n(2phi1+2phi2+2phi3-3phi4-3phi5)] in terms of Q_{n,k} and S_{p,k}. | |
1717 | ||
1718 | // a) Calculate 5-p correlator without using particle weights; | |
1719 | // b) Calculate 5-p correlator with using particle weights. | |
1720 | ||
1721 | // a) Calculate 5-p correlator without using particle weights: | |
1722 | if(!(fUsePhiWeights || fUsePtWeights || fUseEtaWeights)) | |
1723 | { | |
1724 | // Multiplicity (number of RPs): | |
1725 | Double_t dMult = (*fSpk)(0,0); | |
1726 | // Real and imaginary parts of non-weighted Q-vectors (Q_{n,0}) evaluated in harmonics n,2n,...,6n: | |
1727 | Double_t dReQ1n = (*fReQnk)(0,0); | |
1728 | Double_t dReQ2n = (*fReQnk)(1,0); | |
1729 | Double_t dReQ3n = (*fReQnk)(2,0); | |
1730 | Double_t dReQ4n = (*fReQnk)(3,0); | |
1731 | //Double_t dReQ5n = (*fReQnk)(4,0); // not needed | |
1732 | Double_t dReQ6n = (*fReQnk)(5,0); | |
1733 | Double_t dImQ1n = (*fImQnk)(0,0); | |
1734 | Double_t dImQ2n = (*fImQnk)(1,0); | |
1735 | Double_t dImQ3n = (*fImQnk)(2,0); | |
1736 | Double_t dImQ4n = (*fImQnk)(3,0); | |
1737 | //Double_t dImQ5n = (*fImQnk)(4,0); // not needed | |
1738 | Double_t dImQ6n = (*fImQnk)(5,0); | |
1739 | ||
1740 | // 5-particle azimuthal correlator: | |
1741 | Double_t five2n2n2n3n3n = 0.; // <cos[n(2phi1+2phi2+2phi3-3phi4-3phi5)]> | |
1742 | Double_t reQ2nQ2nQ2nQ3nstarQ3nstar = pow(dReQ2n,3.)*pow(dReQ3n,2.) | |
1743 | - 3.*dReQ2n*pow(dReQ3n,2.)*pow(dImQ2n,2.) | |
1744 | + 6.*pow(dReQ2n,2.)*dReQ3n*dImQ2n*dImQ3n | |
1745 | - 2.*dReQ3n*pow(dImQ2n,3.)*dImQ3n-pow(dReQ2n,3.)*pow(dImQ3n,2.) | |
1746 | + 3.*dReQ2n*pow(dImQ2n,2.)*pow(dImQ3n,2.); | |
1747 | Double_t reQ2nQ2nQ2nQ6nstar = dReQ6n*pow(dReQ2n,3)-3.*dReQ2n*dReQ6n*pow(dImQ2n,2) | |
1748 | + 3.*dImQ2n*dImQ6n*pow(dReQ2n,2)-dImQ6n*pow(dImQ2n,3); | |
1749 | Double_t reQ4nQ2nQ3nstarQ3nstar = (dReQ4n*dReQ2n-dImQ4n*dImQ2n)*(dReQ3n*dReQ3n-dImQ3n*dImQ3n) | |
1750 | + 2.*(dReQ4n*dImQ2n+dImQ4n*dReQ2n)*dReQ3n*dImQ3n; | |
1751 | Double_t reQ2nQ2nQ1nstarQ3nstar = (pow(dReQ2n,2.)-pow(dImQ2n,2.))*(dReQ3n*dReQ1n-dImQ3n*dImQ1n) | |
1752 | + 2.*dReQ2n*dImQ2n*(dReQ3n*dImQ1n+dImQ3n*dReQ1n); | |
1753 | Double_t reQ6nQ3nstarQ3nstar = pow(dReQ3n,2.)*dReQ6n + 2.*dReQ3n*dImQ3n*dImQ6n | |
1754 | - pow(dImQ3n,2.)*dReQ6n; | |
1755 | Double_t reQ4nQ2nQ6nstar = dReQ6n*dReQ4n*dReQ2n-dReQ6n*dImQ4n*dImQ2n+dImQ6n*dReQ4n*dImQ2n | |
1756 | + dImQ6n*dImQ4n*dReQ2n; | |
1757 | Double_t reQ4nQ1nstarQ3nstar = dReQ4n*(dReQ3n*dReQ1n-dImQ3n*dImQ1n)+dImQ4n*(dReQ3n*dImQ1n+dImQ3n*dReQ1n); | |
1758 | Double_t reQ2nQ2nQ4nstar = pow(dReQ2n,2.)*dReQ4n+2.*dReQ2n*dImQ2n*dImQ4n-pow(dImQ2n,2.)*dReQ4n; | |
1759 | Double_t reQ2nQ1nQ3nstar = dReQ3n*dReQ2n*dReQ1n-dReQ3n*dImQ2n*dImQ1n+dImQ3n*dReQ2n*dImQ1n | |
1760 | + dImQ3n*dImQ2n*dReQ1n; | |
1761 | Double_t reQ2nQ1nstarQ1nstar = pow(dReQ1n,2.)*dReQ2n + 2.*dReQ1n*dImQ1n*dImQ2n - pow(dImQ1n,2.)*dReQ2n; | |
1762 | // Analytic expression for 5-particle azimuthal correlator: | |
1763 | five2n2n2n3n3n = (reQ2nQ2nQ2nQ3nstarQ3nstar-reQ2nQ2nQ2nQ6nstar-3.*reQ4nQ2nQ3nstarQ3nstar | |
1764 | - 6.*reQ2nQ2nQ1nstarQ3nstar+2.*reQ6nQ3nstarQ3nstar+3.*reQ4nQ2nQ6nstar | |
1765 | + 6.*reQ4nQ1nstarQ3nstar+6.*reQ2nQ2nQ4nstar | |
1766 | + 12.*reQ2nQ1nQ3nstar+6.*reQ2nQ1nstarQ1nstar | |
1767 | - 2.*((pow(dReQ6n,2.)+pow(dImQ6n,2.)) | |
1768 | + 3.*(pow(dReQ4n,2.)+pow(dImQ4n,2.)) | |
1769 | + 6.*(pow(dReQ3n,2.)+pow(dImQ3n,2.)) | |
1770 | + 9.*(pow(dReQ2n,2.)+pow(dImQ2n,2.)) | |
1771 | + 6.*(pow(dReQ1n,2.)+pow(dImQ1n,2.))-12.*dMult)) | |
1772 | /(dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
1773 | // Fill all-events profile: | |
1774 | f5pCorrelatorPro->Fill(0.5,five2n2n2n3n3n,dMult*(dMult-1.)*(dMult-2.)*(dMult-3.)*(dMult-4.)); | |
1775 | } // end of if(!(fUsePhiWeights || fUsePtWeights || fUseEtaWeights)) | |
1776 | ||
1777 | // b) Calculate 5-p correlator with using particle weights: | |
1778 | if(fUsePhiWeights || fUsePtWeights || fUseEtaWeights) | |
1779 | { | |
1780 | // ... | |
1781 | } // end of if(fUsePhiWeights || fUsePtWeights || fUseEtaWeights) | |
1782 | ||
1783 | } // end of void AliFlowAnalysisWithMixedHarmonics::Calculate5pCorrelator() | |
1784 | ||
1785 | //================================================================================================================ | |
d66d46f7 | 1786 | |
1787 | void AliFlowAnalysisWithMixedHarmonics::CalculateNonIsotropicTerms() | |
1788 | { | |
e999459d | 1789 | // Calculate non-isotropic terms which appear in the decomposition of 3-p correlator <cos[n(phi1+phi2-2phi3)]>. |
d66d46f7 | 1790 | |
b71a354b | 1791 | // a) Calculate without using particle weights; |
1792 | // b) Calculate using particle weights. | |
1793 | ||
5c078806 | 1794 | // For detector with uniform acceptance all these terms vanish. These non-isotropic terms are stored in fNonIsotropicTermsPro. |
1795 | // Binning of fNonIsotropicTermsPro is organized as follows: | |
489d5531 | 1796 | // 1st bin: <<cos(n*phi1)>> |
d66d46f7 | 1797 | // 2nd bin: <<sin(n*phi1)>> |
489d5531 | 1798 | // 3rd bin: <<cos(2n*phi1)>> |
d66d46f7 | 1799 | // 4th bin: <<sin(2n*phi1)>> |
489d5531 | 1800 | // 5th bin: <<cos(n*(phi1+phi2)>> |
d66d46f7 | 1801 | // 6th bin: <<sin(n*(phi1+phi2)>> |
489d5531 | 1802 | // 7th bin: <<cos(n*(2phi1-phi2)>> |
d66d46f7 | 1803 | // 8th bin: <<sin(n*(2phi1-phi2)>> |
e999459d | 1804 | // 9th bin: <<cos(n*(phi1-phi2-phi3)>> // not needed |
b71a354b | 1805 | // 10th bin: <<sin(n*(phi1-phi2-phi3)>> // not needed |
5c078806 | 1806 | |
b71a354b | 1807 | // a) Calculate without using particle weights: |
d66d46f7 | 1808 | if(!(fUsePhiWeights || fUsePtWeights || fUseEtaWeights)) |
1809 | { | |
489d5531 | 1810 | // Multiplicity (number of RPs): |
1811 | Double_t dMult = (*fSpk)(0,0); | |
1812 | // Real and imaginary parts of non-weighted Q-vectors (Q_{n,0}) evaluated in harmonics n and 2n: | |
1813 | Double_t dReQ1n = (*fReQnk)(0,0); | |
1814 | Double_t dReQ2n = (*fReQnk)(1,0); | |
1815 | Double_t dImQ1n = (*fImQnk)(0,0); | |
d66d46f7 | 1816 | Double_t dImQ2n = (*fImQnk)(1,0); |
489d5531 | 1817 | // 1-particle terms: |
d66d46f7 | 1818 | Double_t cosP1n = 0.; // <cos(n*(phi1))> |
1819 | Double_t sinP1n = 0.; // <sin(n*(phi1))> | |
1820 | Double_t cosP2n = 0.; // <cos(2n*(phi1))> | |
489d5531 | 1821 | Double_t sinP2n = 0.; // <sin(2n*(phi1))> |
1822 | if(dMult>0) | |
1823 | { | |
d66d46f7 | 1824 | cosP1n = dReQ1n/dMult; |
1825 | sinP1n = dImQ1n/dMult; | |
1826 | cosP2n = dReQ2n/dMult; | |
1827 | sinP2n = dImQ2n/dMult; | |
e999459d | 1828 | // All-event avarages: |
d66d46f7 | 1829 | fNonIsotropicTermsPro->Fill(0.5,cosP1n,dMult); // <<cos(n*(phi1))>> |
1830 | fNonIsotropicTermsPro->Fill(1.5,sinP1n,dMult); // <<sin(n*(phi1))>> | |
1831 | fNonIsotropicTermsPro->Fill(2.5,cosP2n,dMult); // <<cos(2n*(phi1))>> | |
489d5531 | 1832 | fNonIsotropicTermsPro->Fill(3.5,sinP2n,dMult); // <<sin(2n*(phi1))>> |
e999459d | 1833 | // All-event avarages vs M: |
b71a354b | 1834 | if(fCalculateVsM) |
e558a733 | 1835 | { |
b71a354b | 1836 | if(dMult<fMinMultiplicity) |
1837 | { | |
1838 | fNonIsotropicTermsVsMPro->Fill(0.5,0.5,cosP1n,dMult); // <<cos(n*(phi1))>> | |
1839 | fNonIsotropicTermsVsMPro->Fill(1.5,0.5,sinP1n,dMult); // <<sin(n*(phi1))>> | |
1840 | fNonIsotropicTermsVsMPro->Fill(2.5,0.5,cosP2n,dMult); // <<cos(2n*(phi1))>> | |
1841 | fNonIsotropicTermsVsMPro->Fill(3.5,0.5,sinP2n,dMult); // <<sin(2n*(phi1))>> | |
1842 | } else if(dMult>=fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth) | |
1843 | { | |
1844 | fNonIsotropicTermsVsMPro->Fill(0.5,0.5+fNoOfMultipicityBins+1,cosP1n,dMult); // <<cos(n*(phi1))>> | |
1845 | fNonIsotropicTermsVsMPro->Fill(1.5,0.5+fNoOfMultipicityBins+1,sinP1n,dMult); // <<sin(n*(phi1))>> | |
1846 | fNonIsotropicTermsVsMPro->Fill(2.5,0.5+fNoOfMultipicityBins+1,cosP2n,dMult); // <<cos(2n*(phi1))>> | |
1847 | fNonIsotropicTermsVsMPro->Fill(3.5,0.5+fNoOfMultipicityBins+1,sinP2n,dMult); // <<sin(2n*(phi1))>> | |
1848 | } else | |
1849 | { | |
1850 | fNonIsotropicTermsVsMPro->Fill(0.5,1.5+(Int_t)((dMult-fMinMultiplicity)/fMultipicityBinWidth),cosP1n,dMult); // <<cos(n*(phi1))>> | |
1851 | fNonIsotropicTermsVsMPro->Fill(1.5,1.5+(Int_t)((dMult-fMinMultiplicity)/fMultipicityBinWidth),sinP1n,dMult); // <<sin(n*(phi1))>> | |
1852 | fNonIsotropicTermsVsMPro->Fill(2.5,1.5+(Int_t)((dMult-fMinMultiplicity)/fMultipicityBinWidth),cosP2n,dMult); // <<cos(2n*(phi1))>> | |
1853 | fNonIsotropicTermsVsMPro->Fill(3.5,1.5+(Int_t)((dMult-fMinMultiplicity)/fMultipicityBinWidth),sinP2n,dMult); // <<sin(2n*(phi1))>> | |
1854 | } | |
1855 | } // end of if(fCalculateVsM) | |
e558a733 | 1856 | } // end of if(dMult>0) |
489d5531 | 1857 | // 2-particle terms: |
d66d46f7 | 1858 | Double_t cosP1nP1n = 0.; // <cos(n*(phi1+phi2))> |
1859 | Double_t sinP1nP1n = 0.; // <sin(n*(phi1+phi2))> | |
1860 | Double_t cosP2nM1n = 0.; // <cos(n*(2phi1-phi2))> | |
489d5531 | 1861 | Double_t sinP2nM1n = 0.; // <sin(n*(2phi1-phi2))> |
1862 | if(dMult>1) | |
1863 | { | |
d66d46f7 | 1864 | cosP1nP1n = (pow(dReQ1n,2)-pow(dImQ1n,2)-dReQ2n)/(dMult*(dMult-1)); |
489d5531 | 1865 | sinP1nP1n = (2.*dReQ1n*dImQ1n-dImQ2n)/(dMult*(dMult-1)); |
d66d46f7 | 1866 | cosP2nM1n = (dReQ2n*dReQ1n+dImQ2n*dImQ1n-dReQ1n)/(dMult*(dMult-1)); |
489d5531 | 1867 | sinP2nM1n = (dImQ2n*dReQ1n-dReQ2n*dImQ1n-dImQ1n)/(dMult*(dMult-1)); |
e999459d | 1868 | // All-event avarages: |
d66d46f7 | 1869 | fNonIsotropicTermsPro->Fill(4.5,cosP1nP1n,dMult*(dMult-1.)); // <<cos(n*(phi1+phi2))>> |
489d5531 | 1870 | fNonIsotropicTermsPro->Fill(5.5,sinP1nP1n,dMult*(dMult-1.)); // <<sin(n*(phi1+phi2))>> |
d66d46f7 | 1871 | fNonIsotropicTermsPro->Fill(6.5,cosP2nM1n,dMult*(dMult-1.)); // <<cos(n*(2phi1-phi2))>> |
489d5531 | 1872 | fNonIsotropicTermsPro->Fill(7.5,sinP2nM1n,dMult*(dMult-1.)); // <<sin(n*(2phi1-phi2))>> |
e999459d | 1873 | // All-event avarages vs M: |
b71a354b | 1874 | if(fCalculateVsM) |
e558a733 | 1875 | { |
b71a354b | 1876 | if(dMult<fMinMultiplicity) |
1877 | { | |
1878 | fNonIsotropicTermsVsMPro->Fill(4.5,0.5,cosP1nP1n,dMult*(dMult-1.)); // <<cos(n*(phi1+phi2))>> | |
1879 | fNonIsotropicTermsVsMPro->Fill(5.5,0.5,sinP1nP1n,dMult*(dMult-1.)); // <<sin(n*(phi1+phi2))>> | |
1880 | fNonIsotropicTermsVsMPro->Fill(6.5,0.5,cosP2nM1n,dMult*(dMult-1.)); // <<cos(n*(2phi1-phi2))>> | |
1881 | fNonIsotropicTermsVsMPro->Fill(7.5,0.5,sinP2nM1n,dMult*(dMult-1.)); // <<sin(n*(2phi1-phi2))>> | |
1882 | } else if(dMult>=fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth) | |
1883 | { | |
1884 | fNonIsotropicTermsVsMPro->Fill(4.5,0.5+fNoOfMultipicityBins+1,cosP1nP1n,dMult*(dMult-1.)); // <<cos(n*(phi1+phi2))>> | |
1885 | fNonIsotropicTermsVsMPro->Fill(5.5,0.5+fNoOfMultipicityBins+1,sinP1nP1n,dMult*(dMult-1.)); // <<sin(n*(phi1+phi2))>> | |
1886 | fNonIsotropicTermsVsMPro->Fill(6.5,0.5+fNoOfMultipicityBins+1,cosP2nM1n,dMult*(dMult-1.)); // <<cos(n*(2phi1-phi2))>> | |
1887 | fNonIsotropicTermsVsMPro->Fill(7.5,0.5+fNoOfMultipicityBins+1,sinP2nM1n,dMult*(dMult-1.)); // <<sin(n*(2phi1-phi2))>> | |
1888 | } else | |
1889 | { | |
1890 | fNonIsotropicTermsVsMPro->Fill(4.5,1.5+(Int_t)((dMult-fMinMultiplicity)/fMultipicityBinWidth),cosP1nP1n,dMult*(dMult-1.)); // <<cos(n*(phi1+phi2))>> | |
1891 | fNonIsotropicTermsVsMPro->Fill(5.5,1.5+(Int_t)((dMult-fMinMultiplicity)/fMultipicityBinWidth),sinP1nP1n,dMult*(dMult-1.)); // <<sin(n*(phi1+phi2))>> | |
1892 | fNonIsotropicTermsVsMPro->Fill(6.5,1.5+(Int_t)((dMult-fMinMultiplicity)/fMultipicityBinWidth),cosP2nM1n,dMult*(dMult-1.)); // <<cos(n*(2phi1-phi2))>> | |
1893 | fNonIsotropicTermsVsMPro->Fill(7.5,1.5+(Int_t)((dMult-fMinMultiplicity)/fMultipicityBinWidth),sinP2nM1n,dMult*(dMult-1.)); // <<sin(n*(2phi1-phi2))>> | |
1894 | } | |
1895 | } // end of if(fCalculateVsM) | |
e558a733 | 1896 | } // end of if(dMult>1) |
e999459d | 1897 | // 3-particle: correct and ready but not needed, hence commented out. |
1898 | /* | |
489d5531 | 1899 | Double_t cosP1nM1nM1n = 0.; // <cos(n*(phi1-phi2-phi3))> |
1900 | Double_t sinP1nM1nM1n = 0.; // <sin(n*(phi1-phi2-phi3))> | |
1901 | if(dMult>2) | |
1902 | { | |
1903 | cosP1nM1nM1n = (dReQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))-dReQ1n*dReQ2n-dImQ1n*dImQ2n-2.*(dMult-1)*dReQ1n) | |
d66d46f7 | 1904 | / (dMult*(dMult-1)*(dMult-2)); |
489d5531 | 1905 | sinP1nM1nM1n = (-dImQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))+dReQ1n*dImQ2n-dImQ1n*dReQ2n+2.*(dMult-1)*dImQ1n) |
1906 | / (dMult*(dMult-1)*(dMult-2)); | |
489d5531 | 1907 | // All-events avarages: |
d66d46f7 | 1908 | fNonIsotropicTermsPro->Fill(8.5,cosP1nM1nM1n,dMult*(dMult-1.)*(dMult-2.)); // <<cos(n*(phi1-phi2-phi3))>> |
e558a733 | 1909 | fNonIsotropicTermsPro->Fill(9.5,sinP1nM1nM1n,dMult*(dMult-1.)*(dMult-2.)); // <<sin(n*(phi1-phi2-phi3))>> |
1910 | // All-events avarages vs M: | |
b71a354b | 1911 | if(fCalculateVsM) |
e558a733 | 1912 | { |
b71a354b | 1913 | if(dMult<fMinMultiplicity) |
1914 | { | |
1915 | fNonIsotropicTermsVsMPro->Fill(8.5,0.5,cosP1nM1nM1n,dMult*(dMult-1.)*(dMult-2.)); // <<cos(n*(phi1-phi2-phi3))>> | |
1916 | fNonIsotropicTermsVsMPro->Fill(9.5,0.5,sinP1nM1nM1n,dMult*(dMult-1.)*(dMult-2.)); // <<sin(n*(phi1-phi2-phi3))>> | |
1917 | } else if(dMult>=fMinMultiplicity+fNoOfMultipicityBins*fMultipicityBinWidth) | |
1918 | { | |
1919 | fNonIsotropicTermsVsMPro->Fill(8.5,0.5+fNoOfMultipicityBins+1,cosP1nM1nM1n,dMult*(dMult-1.)*(dMult-2.)); // <<cos(n*(phi1-phi2-phi3))>> | |
1920 | fNonIsotropicTermsVsMPro->Fill(9.5,0.5+fNoOfMultipicityBins+1,sinP1nM1nM1n,dMult*(dMult-1.)*(dMult-2.)); // <<sin(n*(phi1-phi2-phi3))>> | |
1921 | } else | |
1922 | { | |
1923 | fNonIsotropicTermsVsMPro->Fill(8.5,1.5+(Int_t)((dMult-fMinMultiplicity)/fMultipicityBinWidth), | |
1924 | cosP1nM1nM1n,dMult*(dMult-1.)*(dMult-2.)); // <<cos(n*(phi1-phi2-phi3))>> | |
1925 | fNonIsotropicTermsVsMPro->Fill(9.5,1.5+(Int_t)((dMult-fMinMultiplicity)/fMultipicityBinWidth), | |
1926 | sinP1nM1nM1n,dMult*(dMult-1.)*(dMult-2.)); // <<sin(n*(phi1-phi2-phi3))>> | |
1927 | } | |
1928 | } // end of if(fCalculateVsM) | |
e558a733 | 1929 | } // end of if(dMult>2) |
e999459d | 1930 | */ |
d66d46f7 | 1931 | } // end of if(!(fUsePhiWeights || fUsePtWeights || fUseEtaWeights)) |
1932 | ||
b71a354b | 1933 | // b) Calculate using particle weights: |
d66d46f7 | 1934 | if(fUsePhiWeights || fUsePtWeights || fUseEtaWeights) |
1935 | { | |
e999459d | 1936 | // ... |
d66d46f7 | 1937 | } // end of if(fUsePhiWeights || fUsePtWeights || fUseEtaWeights) |
1938 | ||
1939 | } // end of void AliFlowAnalysisWithMixedHarmonics::CalculateNonIsotropicTerms() | |
1940 | ||
5c078806 | 1941 | //================================================================================================================ |
1942 | ||
41e6d9e4 | 1943 | void AliFlowAnalysisWithMixedHarmonics::CalculateDifferential3pCorrelator(Double_t &gIntegratedValue) |
5c078806 | 1944 | { |
e999459d | 1945 | // Calculate differential 3-p azimuthal correlator cos[n(psi1+psi2-2phi3)] in terms of Q_{2n}, p_{n}, q1_{n} and q2_{n}. |
5c078806 | 1946 | |
1947 | // a) Calculate differential 3-p correlator without using particle weights; | |
1948 | // b) Calculate differential 3-p correlator with using particle weights. | |
1949 | ||
1950 | // a) Calculate differential 3-p correlator without using particle weights: | |
1951 | if(!(fUsePhiWeights || fUsePtWeights || fUseEtaWeights)) | |
1952 | { | |
41e6d9e4 | 1953 | Int_t iBinCounter = 0; |
1954 | Double_t gSumBinContentTimesWeight = 0., gSumWeight = 0.; | |
1955 | Double_t gSumBinContentTimesWeightSquared = 0.; | |
1956 | ||
5c078806 | 1957 | // Multiplicity (number of RPs): |
1958 | Double_t dMult = (*fSpk)(0,0); | |
1959 | // Real and imaginary parts of non-weighted Q-vectors (Q_{n,0}) evaluated in harmonic 2n: | |
1960 | Double_t dReQ2n = (*fReQnk)(1,0); | |
1961 | Double_t dImQ2n = (*fImQnk)(1,0); | |
41e6d9e4 | 1962 | for(Int_t sd=0;sd<2;sd++) |
5c078806 | 1963 | { |
41e6d9e4 | 1964 | // [(p1+p2)/2,|p1-p2|] |
5c078806 | 1965 | // looping over all bins and calculating reduced correlations: |
1966 | for(Int_t b=1;b<=fnBinsPt;b++) | |
1967 | { | |
1968 | // real and imaginary parts of p_{n}: | |
1969 | Double_t p1nRe = fRePEBE[sd]->GetBinContent(b)*fRePEBE[sd]->GetBinEntries(b); | |
1970 | Double_t p1nIm = fImPEBE[sd]->GetBinContent(b)*fImPEBE[sd]->GetBinEntries(b); | |
e999459d | 1971 | // overlap 1: to be improved (terminology) |
1972 | Double_t overlap1 = fOverlapEBE[0][sd]->GetBinContent(b)*fOverlapEBE[0][sd]->GetBinEntries(b); | |
1973 | // overlap 2: to be improved (terminology) | |
1974 | Double_t overlap2 = fOverlapEBE[1][sd]->GetBinContent(b)*fOverlapEBE[1][sd]->GetBinEntries(b); | |
5c078806 | 1975 | // number of pairs of POIs in particular (p1+p2)/2 or |p1-p2| bin: |
1976 | Double_t mp = fRePEBE[sd]->GetBinEntries(b); | |
e999459d | 1977 | // number of pairs of POI1/RP and POI2 in particular (p1+p2)/2 or |p1-p2| bin: |
1978 | Double_t mOverlap1 = fOverlapEBE[0][sd]->GetBinEntries(b); | |
1979 | // number of pairs of POI2/RP and POI1 in particular (p1+p2)/2 or |p1-p2| bin: | |
1980 | Double_t mOverlap2 = fOverlapEBE[1][sd]->GetBinEntries(b); | |
1981 | // e-b-e weight for cos[n(psi1+psi2-2phi3)]: | |
1982 | Double_t weight = mp*dMult-mOverlap1-mOverlap2; | |
1983 | ||
1984 | Double_t cosP2nphi1M1npsi2M1npsi2 = 0; // cos[n(psi1+psi2-2phi3)] | |
1985 | if(weight>0.) | |
5c078806 | 1986 | { |
e999459d | 1987 | cosP2nphi1M1npsi2M1npsi2 = (p1nRe*dReQ2n+p1nIm*dImQ2n-overlap1-overlap2)/(weight); |
5c078806 | 1988 | } |
e999459d | 1989 | f3pCorrelatorVsPtSumDiffPro[sd]->Fill(fPtMin+(b-1)*fPtBinWidth,cosP2nphi1M1npsi2M1npsi2,weight); |
41e6d9e4 | 1990 | if(sd == 0) { |
1991 | iBinCounter += 1; | |
1992 | ||
1993 | gSumBinContentTimesWeight += f3pCorrelatorVsPtSumDiffPro[sd]->GetBinContent(b)*f3pCorrelatorVsPtSumDiffPro[sd]->GetBinEntries(b); | |
1994 | gSumWeight += f3pCorrelatorVsPtSumDiffPro[sd]->GetBinEntries(b); | |
1995 | gSumBinContentTimesWeightSquared += TMath::Power(gSumBinContentTimesWeight,2); | |
1996 | } | |
5c078806 | 1997 | } // end of for(Int_t b=1;b<=fnBinsPt;b++) |
41e6d9e4 | 1998 | |
1999 | // [(eta1+eta2)/2,|eta1-eta2|] | |
2000 | // looping over all bins and calculating reduced correlations: | |
2001 | for(Int_t k=1;k<=fnBinsEta;k++) | |
2002 | { | |
2003 | // real and imaginary parts of p_{n}: | |
2004 | Double_t p1nRe = fReEtaEBE[sd]->GetBinContent(k)*fReEtaEBE[sd]->GetBinEntries(k); | |
2005 | Double_t p1nIm = fImEtaEBE[sd]->GetBinContent(k)*fImEtaEBE[sd]->GetBinEntries(k); | |
2006 | // overlap 1: to be improved (terminology) | |
2007 | Double_t overlap1 = fOverlapEBE2[0][sd]->GetBinContent(k)*fOverlapEBE2[0][sd]->GetBinEntries(k); | |
2008 | // overlap 2: to be improved (terminology) | |
2009 | Double_t overlap2 = fOverlapEBE2[1][sd]->GetBinContent(k)*fOverlapEBE2[1][sd]->GetBinEntries(k); | |
2010 | // number of pairs of POIs in particular (eta1+eta2)/2 or |eta1-eta2| bin: | |
2011 | Double_t mp = fReEtaEBE[sd]->GetBinEntries(k); | |
2012 | // number of pairs of POI1/RP and POI2 in particular (eta1+eta2)/2 or |eta1-eta2| bin: | |
2013 | Double_t mOverlap1 = fOverlapEBE2[0][sd]->GetBinEntries(k); | |
2014 | // number of pairs of POI2/RP and POI1 in particular (eta1+eta2)/2 or |eta1-eta2| bin: | |
2015 | Double_t mOverlap2 = fOverlapEBE2[1][sd]->GetBinEntries(k); | |
2016 | // e-b-e weight for cos[n(psi1+psi2-2phi3)]: | |
2017 | Double_t weight = mp*dMult-mOverlap1-mOverlap2; | |
2018 | ||
2019 | Double_t cosP2nphi1M1npsi2M1npsi2 = 0; // cos[n(psi1+psi2-2phi3)] | |
2020 | if(weight>0.) | |
2021 | { | |
2022 | cosP2nphi1M1npsi2M1npsi2 = (p1nRe*dReQ2n+p1nIm*dImQ2n-overlap1-overlap2)/(weight); | |
2023 | } | |
2024 | f3pCorrelatorVsEtaSumDiffPro[sd]->Fill(fEtaMin+(k-1)*fEtaBinWidth,cosP2nphi1M1npsi2M1npsi2,weight); | |
2025 | } // end of for(Int_t k=1;k<=fnBinsEta;k++) | |
5c078806 | 2026 | } // end of for(Int_t sd=0;sd<2;sd++) |
41e6d9e4 | 2027 | |
2028 | gIntegratedValue = -1000.; | |
2029 | if((gSumWeight)&&(iBinCounter)) | |
e409ac85 | 2030 | gIntegratedValue = gSumBinContentTimesWeight/gSumWeight; |
5c078806 | 2031 | } // end of if(!(fUsePhiWeights || fUsePtWeights || fUseEtaWeights)) |
2032 | ||
2033 | // b) Calculate differential 3-p correlator by using particle weights: | |
2034 | if(fUsePhiWeights || fUsePtWeights || fUseEtaWeights) | |
2035 | { | |
e999459d | 2036 | // ... |
5c078806 | 2037 | } // end of if(fUsePhiWeights || fUsePtWeights || fUseEtaWeights) |
2038 | ||
2039 | } // end of void AliFlowAnalysisWithMixedHarmonics::CalculateDifferential3pCorrelator() | |
2040 | ||
2041 | //================================================================================================================ | |
2042 | ||
e409ac85 | 2043 | void AliFlowAnalysisWithMixedHarmonics::GetCorrelatorAndError(TProfile *g3pCorrelatorVsPt, Double_t &g3pCorrelatorValue, Double_t &g3pCorrelatorError) { |
2044 | //Retrieves the 3p correlator <<cos[n(psi1+psi2-2phi3)]>> | |
2045 | //and its error | |
2046 | Double_t gSumXi = 0.; | |
2047 | Double_t gSumYi = 0.; | |
2048 | Double_t gSumXiYi = 0.; | |
2049 | Double_t gSumXiYi2 = 0.; | |
2050 | Double_t gSumXi2Yi2 = 0.; | |
2051 | Double_t gSumDeltaXi2 = 0.; | |
2052 | Double_t gSumYi2DeltaXi2 = 0.; | |
2053 | ||
2054 | for(Int_t iBin = 1; iBin <= g3pCorrelatorVsPt->GetNbinsX(); iBin++) { | |
2055 | gSumXi += g3pCorrelatorVsPt->GetBinEntries(iBin); | |
2056 | gSumYi += g3pCorrelatorVsPt->GetBinContent(iBin); | |
2057 | gSumXiYi += g3pCorrelatorVsPt->GetBinEntries(iBin)*g3pCorrelatorVsPt->GetBinContent(iBin); | |
2058 | gSumXiYi2 += g3pCorrelatorVsPt->GetBinEntries(iBin)*TMath::Power(g3pCorrelatorVsPt->GetBinContent(iBin),2); | |
2059 | gSumXi2Yi2 += TMath::Power(g3pCorrelatorVsPt->GetBinEntries(iBin)*g3pCorrelatorVsPt->GetBinContent(iBin),2); | |
2060 | gSumDeltaXi2 += TMath::Power(g3pCorrelatorVsPt->GetBinError(iBin),2); | |
2061 | gSumYi2DeltaXi2 += TMath::Power(g3pCorrelatorVsPt->GetBinContent(iBin),2) + TMath::Power(g3pCorrelatorVsPt->GetBinError(iBin),2); | |
2062 | } | |
2063 | ||
2064 | g3pCorrelatorValue = -1000.; | |
2065 | g3pCorrelatorError = 1000.; | |
2066 | ||
2067 | if(gSumXi != 0.) | |
2068 | g3pCorrelatorValue = gSumXiYi/gSumXi; | |
2069 | if((gSumXi != 0.)&&(gSumXiYi != 0.)) | |
2070 | g3pCorrelatorError = TMath::Abs((gSumXiYi/gSumXi))*TMath::Sqrt(TMath::Power((TMath::Sqrt(gSumYi2DeltaXi2)/gSumXiYi),2) + TMath::Power((gSumDeltaXi2/gSumXi),2)); | |
2071 | } | |
2072 | //================================================================================================================ | |
2073 |