AliPhysics  2c6b7ad (2c6b7ad)
AliAnalysisTaskTwoMultiCorrelations.cxx
Go to the documentation of this file.
1 /*************************************************************************
2 * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15 
16 //--------------------------------------------------------------------------------------//
17 // Analysis task for the data analysis of the correlations between the anisotropic flow //
18 // harmonics v_n with the Pb-Pb data taken by the ALICE experiment. //
19 // The current script computes the multiparticle correlators using the method of the //
20 // Q-vectors for a maximum of 6 different harmonics and 8 particles). //
21 // //
22 // Author: Cindy Mordasini (cindy.mordasini@cern.ch) //
23 //--------------------------------------------------------------------------------------//
24 
25 #include "Riostream.h"
26 #include <vector>
28 #include "AliLog.h"
29 #include "AliAODEvent.h"
30 #include "AliAODInputHandler.h"
31 #include "AliAnalysisManager.h"
32 #include "AliMultSelection.h"
33 #include "TFile.h"
34 #include "TComplex.h"
35 #include "TMath.h"
36 
37 using std::cout;
38 using std::endl;
39 
41 
42 //======================================================================================//
43 
45  AliAnalysisTaskSE(name),
46  fMaxNumberCorrelations(8), // General parameters
47  fHighHarmonic(6),
48  fNumberDifferentHarmonics(2),
49  fUseParticleWeights(kFALSE),
50  fComputeNestedLoops(kFALSE),
51  fComputeSine(kFALSE),
52  fHarmonicOne(2), // Harmonics
53  fHarmonicTwo(-2),
54  fHarmonicThree(4),
55  fHarmonicFour(-4),
56  fHarmonicFive(0),
57  fHarmonicSix(0),
58  fHarmonicSeven(0),
59  fHarmonicEight(0),
60  fMinCentrality(0.0), // Ranges
61  fMaxCentrality(100.0),
62  fMinPtCut(0.2),
63  fMaxPtCut(5.0),
64  fMinEtaCut(-0.8),
65  fMaxEtaCut(0.8),
66  fOutputMainList(NULL), // Structure of the output file
67  fPreCutControlList(NULL),
68  fPostCutControlList(NULL),
69  fCorrelationResultsList(NULL),
70  fCentralityPreCutHisto(NULL), // Control histograms before the cuts
71  fMultiplicityPreCutHisto(NULL),
72  fPtPreCutControlHisto(NULL),
73  fEtaPreCutControlHisto(NULL),
74  fPhiPreCutHisto(NULL),
75  fMultiplicityPostCutHisto(NULL), // Control histograms after the cuts
76  fPtPostCutControlHisto(NULL),
77  fEtaPostCutControlHisto(NULL),
78  fPhiPostCutHisto(NULL)
79 {
80 // Constructor of the class
81  AliDebug(2, "AliAnalysisTaskTwoMultiCorrelations::AliAnalysisTaskTwoMultiCorrelations(const char *name, Bool_t useParticleWeights)");
82 
83 // Creation of a new main list
84  fOutputMainList = new TList();
85  fOutputMainList->SetName("outputAnalysis");
86  fOutputMainList->SetOwner(kTRUE);
87 
88 // Definition of the input and output slots
89  DefineOutput(1, TList::Class());
90 
91 // Initialisation of the fQvectors to zero
92  InitialiseArraysOfQvectors();
93 
94 // Initialisation of the pointers for the TProfiles to NULL
95  InitialiseArraysOfTProfiles();
96 
97 // Use of the particle weights
98  if(useParticleWeights)
99  {
100  // not needed for the time being, maybe insert here the call for the file with particle weights???
101  }
102 } // End of the constructor
103 
104 //======================================================================================//
105 
108  fMaxNumberCorrelations(8), // General parameters
109  fHighHarmonic(6),
110  fNumberDifferentHarmonics(2),
111  fUseParticleWeights(kFALSE),
112  fComputeNestedLoops(kFALSE),
113  fComputeSine(kFALSE),
114  fHarmonicOne(2), // Harmonics
115  fHarmonicTwo(-2),
116  fHarmonicThree(4),
117  fHarmonicFour(-4),
118  fHarmonicFive(0),
119  fHarmonicSix(0),
120  fHarmonicSeven(0),
121  fHarmonicEight(0),
122  fMinCentrality(0.0), // Ranges
123  fMaxCentrality(100.0),
124  fMinPtCut(0.2),
125  fMaxPtCut(5.0),
126  fMinEtaCut(-0.8),
127  fMaxEtaCut(0.8),
128  fOutputMainList(NULL), // Structure of the output file
129  fPreCutControlList(NULL),
130  fPostCutControlList(NULL),
131  fCorrelationResultsList(NULL),
132  fCentralityPreCutHisto(NULL), // Control histograms before the cuts
133  fMultiplicityPreCutHisto(NULL),
134  fPtPreCutControlHisto(NULL),
135  fEtaPreCutControlHisto(NULL),
136  fPhiPreCutHisto(NULL),
137  fMultiplicityPostCutHisto(NULL), // Control histograms after the cuts
138  fPtPostCutControlHisto(NULL),
139  fEtaPostCutControlHisto(NULL),
140  fPhiPostCutHisto(NULL)
141  //fEstimatedFlowWithQcProfile(NULL) // Anisotropic flow estimated with Q-cumulants
142 {
143 // Dummy constructor of the class
144 
145  AliDebug(2, "AliAnalysisTaskTwoMultiCorrelations::AliAnalysisTaskTwoMultiCorrelations(const char *name, Bool_t useParticleWeights)");
146 
147 // Initialisation of the ffQvectors to zero
149 
150 // Initialisation of the pointers for the TProfiles to NULL
152 } // End of the dummy constructor
153 
154 //======================================================================================//
155 
157 {
158 // Destructor of the class
159  // Delete the main TList => delete automatically everything holds in it
160 
161  if(fOutputMainList) {delete fOutputMainList;}
162 } // End of the destructor
163 
164 //======================================================================================//
165 
167 {
168 // Method called at every worker node to initialise the lists
169 
170 // First part of the trick to avoid name clashes
171  Bool_t oldHistAddStatus = TH1::AddDirectoryStatus();
172  TH1::AddDirectory(kFALSE);
173 
174 // Booking and nesting of all the lists
175  this->BookAndNestAllLists();
176 
177 // Booking of all the secondary lists
178  this->BookPreCutControlList();
179  this->BookPostCutControlList();
181 
182 // Second part of the trick to avoid name clashes
183  TH1::AddDirectory(oldHistAddStatus);
184 
185  PostData(1,fOutputMainList);
186 } // End of AliAnalysisTaskTwoMultiCorrelations::UserCreateOutputObjects()
187 
188 //======================================================================================//
189 
191 {
192 // Method called for each event, contains all the calculations
194 
195 // Obtention of the pointer to the AOD event (from TaskSE)
196  AliAODEvent *currentEvent = dynamic_cast<AliAODEvent*>(InputEvent());
197  if(!currentEvent){return;} // Protection against NULL pointer
198 
199 // Gestion of the centrality
200  AliMultSelection *ams = (AliMultSelection*)currentEvent->FindListObject("MultSelection");
201  if(!ams){return;}
202  if(ams->GetMultiplicityPercentile("V0M") >= fMinCentrality && ams->GetMultiplicityPercentile("V0M") < fMaxCentrality)
203  {
204  fCentralityPreCutHisto->Fill(ams->GetMultiplicityPercentile("V0M"));
205  }
206  else {return;} // This event does not belong to the centrality class specified for this particular analysis
207 
208 // Loop over the multiplicity of the event
209  Int_t nParticles = currentEvent->GetNumberOfTracks(); // Number of particles in the event
210  Int_t nParticlesAfterCuts = 0; // Number of particles remaining after the cuts
211  Int_t *goodIndices = new Int_t[nParticles](); // Array where the index of a particle which passes the cuts is saved with 1 and if not with 0
212 
213  // Filling of the control histogram for the multiplicity before the cuts
214  fMultiplicityPreCutHisto->Fill(nParticles);
215 
216  for (Int_t iParticle = 0; iParticle < nParticles; iParticle++)
217  {
218  // Obtention of the pointer to the current particle
219  AliAODTrack *currentParticle = dynamic_cast<AliAODTrack*>(currentEvent->GetTrack(iParticle));
220  if(!currentParticle){continue;} // Protection against NULL pointer
221  if(!currentParticle->TestFilterBit(128)){continue;} // Filter bit 128 denotes TPC-only tracks
222 
223  // Filling of some control histograms before the application of the cuts
224  Double_t preCutPt = currentParticle->Pt(); // Transverse momentum
225  Double_t preCutEta = currentParticle->Eta(); // Pseudorapidity
226  Double_t preCutPhi = currentParticle->Phi(); // Azimuthal angles
227 
228  fPtPreCutControlHisto->Fill(preCutPt);
229  fEtaPreCutControlHisto->Fill(preCutEta);
230  fPhiPreCutHisto->Fill(preCutPhi);
231 
232  // Determination of the number of particles which pass the cuts and set the flag 1/0 of goodIndices[iParticle]
233  if ( (fMinEtaCut < preCutEta) && (preCutEta < fMaxEtaCut) && (fMinPtCut < preCutPt) && (preCutPt < fMaxPtCut) )
234  {
235  nParticlesAfterCuts++;
236  goodIndices[iParticle] = 1;
237  }
238  else {goodIndices[iParticle] = 0;}
239 
240  } // End: for (Int_t iParticle = 0; iParticle < nParticles; iParticle++)
241 
242 // Filling of the control histogram for the multiplicity after the cuts
243  fMultiplicityPostCutHisto->Fill(nParticlesAfterCuts);
244 
245 // Definition of the varibles for the analysis
246  Double_t *pt = new Double_t[nParticlesAfterCuts](); // Array of transverse momenta
247  Double_t *eta = new Double_t[nParticlesAfterCuts](); // Array of pseudorapidity
248  Double_t *phi = new Double_t[nParticlesAfterCuts](); // Array of azimuthal angles
249  Double_t *particleWeights = new Double_t[nParticlesAfterCuts](); // Array of ├╝article weights
250  Int_t fullHarmonicsArray[8] = {fHarmonicOne, fHarmonicTwo, fHarmonicThree, fHarmonicFour, fHarmonicFive, fHarmonicSix, fHarmonicSeven, fHarmonicEight}; // Harmonics (n_1,... n_8)
251  Int_t *harmonics = new Int_t[2*fNumberDifferentHarmonics]();
252  Int_t index = 0; // Index of the "good index", increased when the loop reaches a 1 in goodIndices
253 
254 // Filling of the harmonics' array
255  for (Int_t iArray = 0; iArray < 2*fNumberDifferentHarmonics; iArray++)
256  {
257  harmonics[iArray] = fullHarmonicsArray[iArray];
258  } // End: for (Int_t iArray = 0; iArray < 2*fNumberDifferentHarmonics; iArray++)
259 
260 // Do the analysis only if the number of particles after the cuts is higher than the one for the m-particle correlation (in order to avoid the division by zero)
261  if (nParticlesAfterCuts > (2*fNumberDifferentHarmonics))
262  {
263  // Loop over the initial number of particles, index takes care of keeping only the ones which pass the cuts
264  for (Int_t iiParticle = 0; iiParticle < nParticles; iiParticle++)
265  {
266  // Obtention of the pointer to the current particle
267  AliAODTrack *keptParticle = dynamic_cast<AliAODTrack*>(currentEvent->GetTrack(iiParticle));
268  if(!keptParticle){continue;} // Protection against NULL pointer
269  if(!keptParticle->TestFilterBit(128)){continue;} // Filter bit 128 denotes TPC-only tracks
270 
271  // Filling of the azimuthal angles and particle weights and the control histograms only if goodIndices[iiParticle] == 1
272  if (goodIndices[iiParticle] == 1)
273  {
274  pt[index] = keptParticle->Pt();
275  eta[index] = keptParticle->Eta();
276  phi[index] = keptParticle->Phi();
277  particleWeights[index] = 1.;
278  //if (fUseParticleWeights) {continue;} // Note to self: add the gestion of non-unit weight from external file
279  //else {particleWeights[iiParticle] = 1.;}
280 
281  fPtPostCutControlHisto->Fill(pt[index]);
282  fEtaPostCutControlHisto->Fill(eta[index]);
283  fPhiPostCutHisto->Fill(phi[index]);
284 
285  index++;
286  }
287  else {continue;} // End of if ( (-0.8 < eta) && (eta < 0.8) && (0.2 < pT) && (pT < 5.0) )
288  } // End: for (Int_t iiParticle = 0; iiParticle < nParticlesAfterCuts; iiParticle++)
289 
290  // Computation of the Q-vectors for the current event
291  CalculateQvectors(nParticlesAfterCuts, phi, particleWeights);
292 
293  // Computation of the multiparticle correlations
295  for (Int_t iDiffHarmo = 0; iDiffHarmo < fNumberDifferentHarmonics; iDiffHarmo++)
296  {
297  Int_t numeratorFirstTwoParticle[2] = {harmonics[2*iDiffHarmo],harmonics[(2*iDiffHarmo)+1]}; // iDiffHarmo-th pair of harmonics for the numerator
298  Int_t numeratorLastTwoParticle[2] = {harmonics[2],harmonics[3]}; // the alternative expression is computed only for 2 different harmonics, which implies harmonics has a length of 4
299  ComputeTwoParticleCorrelationWithQvectors(numeratorFirstTwoParticle, numeratorLastTwoParticle, iDiffHarmo);
300 
301  if (fComputeNestedLoops) {ComputeCorrelationsWithTwoNestedLoops(numeratorFirstTwoParticle, numeratorLastTwoParticle, iDiffHarmo, nParticles, phi, particleWeights);}
302  } // End: for (Int_t iDiffHarmo = 0; iDiffHarmo < fNumberDifferentHarmonics; iDiffHarmo++)
303 
305  if (fNumberDifferentHarmonics >= 2)
306  {
307  Int_t iCombi = 0; // i-th combination of 4 ordonnated elements without repetition out of fNumberDifferentHarmonics*2
308  for (Int_t i = 0; i < fNumberDifferentHarmonics-1; i++)
309  {
310  // Loop for the first two particles' harmonics
311  for (Int_t j = i+1; j < fNumberDifferentHarmonics; j++)
312  {
313  Int_t numeratorFourParticle[4] = {harmonics[2*i],harmonics[(2*i)+1], harmonics[2*j],harmonics[(2*j)+1]};
314  ComputeFourParticleCorrelationWithQvectors(numeratorFourParticle, iCombi);
315 
316  if (fComputeNestedLoops) {ComputeCorrelationsWithFourNestedLoops(numeratorFourParticle, iCombi, nParticles, phi, particleWeights);}
317  iCombi++;
318  } // End: for (Int_t j = i+1; j <= fkNumberDifferentHarmonics; j++)
319  } // End: for (Int_t i = 0; i < fkNumberDifferentHarmonics, i++)
320  } // End: if (fNumberDifferentHarmonics >= 2)
321 
323  if (fNumberDifferentHarmonics >= 3)
324  {
325  Int_t jCombi = 0; // (i-1)-th combination of 6 ordonnated elements without repetition out of fkNumberDifferentHarmonics*2
326  for (Int_t i = 0; i < fNumberDifferentHarmonics-2; i++)
327  {
328  // Loop over the first two particles' harmonics
329  for (Int_t j = i+1; j < fNumberDifferentHarmonics-1; j++)
330  {
331  // Loop over the second particle pair's harmonics
332  for (Int_t k = j+1; k < fNumberDifferentHarmonics; k++)
333  {
334  // Loop over the third particle pair's harmonics
335  Int_t numeratorSixParticle[6] = {harmonics[2*i],harmonics[(2*i)+1], harmonics[2*j],harmonics[(2*j)+1],harmonics[2*k],harmonics[(2*k)+1]};
336  ComputeSixParticleCorrelationWithQvectors(numeratorSixParticle, jCombi);
337  jCombi++;
338  } // End: for (Int_t k = j+1; k < fNumberDifferentHarmonics; k++)
339  } // End: for (Int_t j = i+1; j < fNumberDifferentHarmonics-1; j++)
340  } // End: for (Int_t i = 0; i < fNumberDifferentHarmonics-2; i++)
341  } // End: if (fNumberDifferentHarmonics >= 3)
342 
344  if (fNumberDifferentHarmonics >= 4)
345  {
347  } // End: if (fNumberDifferentHarmonics >= 4)
348 
349  // Release of the allocated memory
350  delete [] harmonics;
351  delete [] goodIndices;
352  delete [] pt;
353  delete [] eta;
354  delete [] phi;
355  delete [] particleWeights;
356 
357  } // End of if (nParticlesAfterCuts >= fNparticlesCorrelations)
358 
359 // PostData
360  PostData(1,fOutputMainList);
361 } // End of void AliAnalysisTaskTwoMultiCorrelations::UserExec(Option_t *)
362 
363 //======================================================================================//
364 
366 {
367 // Method called at the end of the execution, once the run over the events is over
368 // Organisation of the method
369  // 1.) Access to the merged output list
370  // 2.) Estimation of anisotropic flow with Q-cumulants
371  // 3.) Creation of the output file and save of the main list in it
372 
373 // 1.) Access to the merged output list
374  fOutputMainList = (TList*)GetOutputData(1);
375  if(!fOutputMainList){exit(1);}
376 
377 // 3.) Creation of the output file and save of the main list in it
378  TFile *outputFile = new TFile("AnalysisResults.root", "RECREATE");
379  fOutputMainList->Write(fOutputMainList->GetName(),TObject::kSingleKey);
380  delete outputFile;
381 } // End of void AliAnalysisTaskTwoMultiCorrelations::Terminate(Option_t *)
382 
383 //======================================================================================//
384 
386 {
387 // Method to initialise the Q-vectors to zero
388  for (Int_t iHarmo = 0; iHarmo < (fHighHarmonic*fMaxNumberCorrelations)+1; iHarmo++)
389  {
390  for (Int_t iPower = 0; iPower < fMaxNumberCorrelations+1; iPower++)
391  {
392  fQvectors[iHarmo][iPower] = TComplex(0.,0.);
393  } // End: for (Int_t iPower = 0; iPower < fMaxNumberCorrelations+1; iPower++)
394  } // End: for (Int_t iHarmo = 0; iHarmo < maxHarmo; iHarmo++)
395 
396 } // End: void InitialiseArraysOffQvectors()
397 
398 //======================================================================================//
399 
401 {
402 // Method to initialise the 1-d and 2-d arrays of TProfiles containing the results
403  for (Int_t cs = 0; cs < 2; cs++)
404  {
405  for (Int_t t = 0; t < 4; t++) // 2-p and 6-p correlations
406  {
407  fTwoParticleCorrelationProfile[cs][t] = NULL;
408  fSixParticleCorrelationProfile[cs][t] = NULL;
409  fTwoCosineAverageProfile[cs][t] = NULL;
410  fTwoNestedCorrelationProfile[cs][t] = NULL;
411  fTwoCosineAverageNestedProfile[cs][t] = NULL;
412  } // End: for (Int_t t = 0; t < 4; t++)
413 
414  for (Int_t f = 0; f < 6; f++) // 4-p correlations
415  {
416  fFourParticleCorrelationProfile[cs][f] = NULL;
417  fFourNestedCorrelationProfile[cs][f] = NULL;
418  } // End: for (Int_t f = 0; f < 6; f++)
419 
420  fEightParticleCorrelationProfile[cs] = NULL; // 8-p correlations
421 
422  } // End: for (Int_t cs = 0; cs < endCs; cs++)
423 } // End: void InitialiseArraysOfTProfiles()
424 
425 //======================================================================================//
426 
428 {
429 // Method to book and nest all the lists where the results are kept in the output file
430 
431  TString sMethodName = "void AliAnalysisTaskTwoMultiCorrelations::BookAndNestAllLists()";
432  if(!fOutputMainList){Fatal(sMethodName.Data(),"Main list fOutputMainList is NULL");}
433 
434 // Control histograms before the cuts
435  fPreCutControlList = new TList();
436  fPreCutControlList->SetName("PreCutControlList");
437  fPreCutControlList->SetOwner(kTRUE);
438  fOutputMainList->Add(fPreCutControlList);
439 
440 // Control histograms after the cuts
441  fPostCutControlList = new TList();
442  fPostCutControlList->SetName("PostCutControlList");
443  fPostCutControlList->SetOwner(kTRUE);
445 
446 // Results for the multiparticle correlations
448  fCorrelationResultsList->SetName("CorrelationResultsList");
449  fCorrelationResultsList->SetOwner(kTRUE);
451 } // End: AliAnalysisTaskTwoMultiCorrelations::BookAndNestAllLists()
452 
453 //======================================================================================//
454 
456 {
457 // Method to prepare the list with the control histograms before the application of the cuts
463 
464 // Centrality distribution
465  fCentralityPreCutHisto = new TH1D("fCentralityPreCutHisto", "Centrality distribution before the cuts", 100, 0., 100.);
466  fCentralityPreCutHisto->SetStats(kTRUE);
467  fCentralityPreCutHisto->GetXaxis()->SetTitle("Centrality percentile");
469 
470 // Multiplicity distribution
471  fMultiplicityPreCutHisto = new TH1D("fMultiplicityPreCutHisto", "Multiplicity distribution before the cuts", 10000000, 0., 10000000.);
472  fMultiplicityPreCutHisto->SetStats(kTRUE);
473  fMultiplicityPreCutHisto->GetXaxis()->SetTitle("Multiplicity");
475 
476 // Transverse momentum distribution
477  fPtPreCutControlHisto = new TH1D("fPtPreCutControlHisto", "Transverse momentum distribution before the cuts", 1000, 0., 20.);
478  fPtPreCutControlHisto->SetStats(kTRUE);
479  fPtPreCutControlHisto->GetXaxis()->SetTitle("p_{T}");
481 
482 // Pseudorapidity distribution
483  fEtaPreCutControlHisto = new TH1D("fEtaPreCutControlHisto", "Pseudorapidity distribution before the cuts", 1000, -1., 1.);
484  fEtaPreCutControlHisto->SetStats(kTRUE);
485  fEtaPreCutControlHisto->GetXaxis()->SetTitle("eta");
487 
488 // Azimuthal angles
489  fPhiPreCutHisto = new TH1D("fPhiPreCutHisto", "Azimuthal angles distribution before the cuts", 1000, 0., 6.3);
490  fPhiPreCutHisto->SetStats(kTRUE);
491  fPhiPreCutHisto->GetXaxis()->SetTitle("phi");
493 } // End: void AliAnalysisTaskTwoMultiCorrelations::BookPreCutControlList()
494 
495 //======================================================================================//
496 
498 {
499 // Method to prepare the list with the control histograms after the application of the cuts
504 
505 // Multiplicity distribution
506  fMultiplicityPostCutHisto = new TH1D("fMultiplicityPostCutHisto", "Multiplicity distribution after the cuts", 10000000, 0., 10000000.);
507  fMultiplicityPostCutHisto->SetStats(kTRUE);
508  fMultiplicityPostCutHisto->GetXaxis()->SetTitle("Multiplicity");
510 
511 // Transverse momentum distribution
512  fPtPostCutControlHisto = new TH1D("fPtPostCutControlHisto", "Transverse momentum distribution after the cuts", 1000, 0., 20.);
513  fPtPostCutControlHisto->SetStats(kTRUE);
514  fPtPostCutControlHisto->GetXaxis()->SetTitle("p_{T}");
516 
517 // Pseudorapidity distribution
518  fEtaPostCutControlHisto = new TH1D("fEtaPostCutControlHisto", "Pseudorapidity distribution after the cuts", 1000, -1., 1.);
519  fEtaPostCutControlHisto->SetStats(kTRUE);
520  fEtaPostCutControlHisto->GetXaxis()->SetTitle("eta");
522 
523 // Azimuthal angles
524  fPhiPostCutHisto = new TH1D("fPhiPostCutHisto", "Azimuthal angles distribution after the cuts", 1000, 0., 6.3);
525  fPhiPostCutHisto->SetStats(kTRUE);
526  fPhiPostCutHisto->GetXaxis()->SetTitle("phi");
528 } // End: void AliAnalysisTaskTwoMultiCorrelations::BookPreCutControlList()
529 
530 //======================================================================================//
531 
533 {
534 // Method to prepare the list with the results from the computation of Q-vectors and nested loops
538 
539  Int_t endCs = 1; // Number of components to save (1: only Cosine, 2: Cosine and Sine)
540  if (fComputeSine) {endCs = 2;}
541 
542  for (Int_t cs = 0; cs < endCs; cs++)
543  {
544  for (Int_t t = 0; t < 4; t++)
545  {
546  // TProfiles for 2-p and 6-p correlations
547  // cs: {cos, sin}, t: {m,n,p,q} for 2-p and t: {mnp, mnq, mpq, npq} for 6-p
548  fTwoParticleCorrelationProfile[cs][t] = new TProfile("", "", 1, 0., 1.);
549  fTwoParticleCorrelationProfile[cs][t]->SetStats(kTRUE);
550  fTwoParticleCorrelationProfile[cs][t]->SetName(Form("fTwoParticleCorrelationProfile_cs%d_combi%d", cs, t));
551  fTwoParticleCorrelationProfile[cs][t]->SetTitle(Form("Q-vectors, #LT #LT 2 #GT #GT, cs = %d, combi = %d", cs, t));
552  fTwoParticleCorrelationProfile[cs][t]->Sumw2();
553  fTwoParticleCorrelationProfile[cs][t]->GetXaxis()->SetTitle("#LT #LT 2 #GT #GT");
555 
556  fSixParticleCorrelationProfile[cs][t] = new TProfile("", "", 1, 0., 1.);
557  fSixParticleCorrelationProfile[cs][t]->SetStats(kTRUE);
558  fSixParticleCorrelationProfile[cs][t]->SetName(Form("fSixParticleCorrelationProfile_cs%d_combi%d", cs, t));
559  fSixParticleCorrelationProfile[cs][t]->SetTitle(Form("Q-vectors, #LT #LT 6 #GT #GT, cs = %d, combi = %d", cs, t));
560  fSixParticleCorrelationProfile[cs][t]->Sumw2();
561  fSixParticleCorrelationProfile[cs][t]->GetXaxis()->SetTitle("#LT #LT 6 #GT #GT");
563 
564  fTwoCosineAverageProfile[cs][t] = new TProfile("", "", 2, 0., 2.);
565  fTwoCosineAverageProfile[cs][t]->SetStats(kTRUE);
566  fTwoCosineAverageProfile[cs][t]->SetName(Form("fTwoCosineAverageProfile_cs%d_combi%d", cs, t));
567  fTwoCosineAverageProfile[cs][t]->SetTitle(Form("Q-vectors, #LT #LT cos(m (phi1-phi2)) #GT #LT cos(n (phi1-phi2)) #GT #GT, cs = %d, combi = %d", cs, t)); // only [cos,sin][0] is useful)
568  fTwoCosineAverageProfile[cs][t]->Sumw2();
569  fTwoCosineAverageProfile[cs][t]->GetXaxis()->SetTitle("#LT #LT cos(m (phi1-phi2)) #GT #LT cos(n (phi1-phi2)) #GT #GT");
571 
573  {
574  fTwoNestedCorrelationProfile[cs][t] = new TProfile("", "", 1, 0., 1.);
575  fTwoNestedCorrelationProfile[cs][t]->SetStats(kTRUE);
576  fTwoNestedCorrelationProfile[cs][t]->SetName(Form("fTwoNestedCorrelationProfile_cs%d_combi%d", cs, t));
577  fTwoNestedCorrelationProfile[cs][t]->SetTitle(Form("Nested loops, #LT #LT 2 #GT #GT, cs = %d, combi = %d", cs, t));
578  fTwoNestedCorrelationProfile[cs][t]->Sumw2();
579  fTwoNestedCorrelationProfile[cs][t]->GetXaxis()->SetTitle("#LT #LT 2 #GT #GT");
581 
582  fTwoCosineAverageNestedProfile[cs][t] = new TProfile("", "", 1, 0., 1.);
583  fTwoCosineAverageNestedProfile[cs][t]->SetStats(kTRUE);
584  fTwoCosineAverageNestedProfile[cs][t]->SetName(Form("fTwoCosineAverageNestedProfile_cs%d_combi%d", cs, t));
585  fTwoCosineAverageNestedProfile[cs][t]->SetTitle(Form("Nested loops, #LT #LT cos(m (phi1-phi2)) #GT #LT cos(n (phi1-phi2)) #GT #GT, cs = %d, combi = %d", cs, t));
586  fTwoCosineAverageNestedProfile[cs][t]->Sumw2();
587  fTwoCosineAverageNestedProfile[cs][t]->GetXaxis()->SetTitle("#LT #LT cos(m (phi1-phi2)) #GT #LT cos(n (phi1-phi2)) #GT #GT");
589  } // End: if (fComputeNestedLoops)
590  } // End: for (Int_t t = 0; t < 4; t++)
591 
592  for (Int_t t = 0; t < 6; t++)
593  {
594  // TProfiles for 4-p correlations
595  // cs: {cos, sin}, f: {mn,mp,mq,np,nq,pq}
596  fFourParticleCorrelationProfile[cs][t] = new TProfile("", "", 1, 0., 1.);
597  fFourParticleCorrelationProfile[cs][t]->SetStats(kTRUE);
598  fFourParticleCorrelationProfile[cs][t]->SetName(Form("fFourParticleCorrelationProfile_cs%d_combi%d", cs, t));
599  fFourParticleCorrelationProfile[cs][t]->SetTitle(Form("Q-vectors, #LT #LT 4 #GT #GT, cs = %d, combi = %d", cs, t));
600  fFourParticleCorrelationProfile[cs][t]->Sumw2();
601  fFourParticleCorrelationProfile[cs][t]->GetXaxis()->SetTitle("#LT #LT 4 #GT #GT");
603 
605  {
606  fFourNestedCorrelationProfile[cs][t] = new TProfile("", "", 1, 0., 1.);
607  fFourNestedCorrelationProfile[cs][t]->SetStats(kTRUE);
608  fFourNestedCorrelationProfile[cs][t]->SetName(Form("fFourNestedCorrelationProfile_cs%d_combi%d", cs, t));
609  fFourNestedCorrelationProfile[cs][t]->SetTitle(Form("Nested loops, #LT #LT 4 #GT #GT, cs = %d, combi = %d", cs, t));
610  fFourNestedCorrelationProfile[cs][t]->Sumw2();
611  fFourNestedCorrelationProfile[cs][t]->GetXaxis()->SetTitle("#LT #LT 4 #GT #GT");
613  } // End: if (fComputeNestedLoops)
614  } // End: for (Int_t t = 0; t < 6; t++)
615 
616  // TProfiles for 8-p correlations
617  fEightParticleCorrelationProfile[cs] = new TProfile("", "", 1, 0., 1.);
618  fEightParticleCorrelationProfile[cs]->SetStats(kTRUE);
619  fEightParticleCorrelationProfile[cs]->SetName(Form("fEightParticleCorrelationProfile_cs%d", cs));
620  fEightParticleCorrelationProfile[cs]->SetTitle(Form("Q-vectors, #LT #LT 8 #GT #GT, cs = %d", cs));
622  fEightParticleCorrelationProfile[cs]->GetXaxis()->SetTitle("#LT #LT 8 #GT #GT");
624  } // End: for (Int_t cs = 0; cs < endCs; cs++)
625 } // End: void AliAnalysisTaskTwoMultiCorrelations::BookCorrelationResultsList()
626 
627 //======================================================================================//
628 
630 {
631 // Method calculating the "general" definition of the Q-vector Q_(n,p) for arbitrary (n,p)
632  Double_t pWeightPowerP = 0.; // Particle weight rised to the power p
633 
634 // Filling of the array of Q-vectors
635  for (Int_t iParticle = 0; iParticle < nParticles; iParticle++)
636  {
637  for (Int_t iHarmo = 0; iHarmo < (fHighHarmonic*fMaxNumberCorrelations)+1; iHarmo++)
638  {
639  for (Int_t iPower = 0; iPower < fMaxNumberCorrelations+1; iPower++)
640  {
641  pWeightPowerP = pow(particleWeight[iParticle], iPower);
642  fQvectors[iHarmo][iPower] += TComplex(pWeightPowerP*TMath::Cos(iHarmo*phi[iParticle]),pWeightPowerP*TMath::Sin(iHarmo*phi[iParticle]));
643  } // End: for (Int_t iPower = 0; iPower < maxPower; iPower++)
644  } // End: for (Int_t iHarmo = 0; iHarmo < maxHarmo; iHarmo++)
645  } // End: for (Int_t iParticle = 0; iParticle < nParticles; iParticle++)
646 } // End: void AliAnalysisTaskTwoMultiCorrelations::CalculateQvectors(Int_t nParticles, Double_t phi[], Double_t particleWeight[])
647 
648 //======================================================================================//
649 
651 {
652 // Method used to simply the usage of the Q-vectors with the fact that Q(-n,p)=Q(n,p)*
653  if (n >= 0) {return fQvectors[n][p];}
654  return TComplex::Conjugate(fQvectors[-n][p]);
655 } // End: TComplex AliAnalysisTaskTwoMultiCorrelations::Q(Int_t n, Int_p)
656 
657 //======================================================================================//
658 
660 {
661 // Calculate the recursion for the numerator of the m-particle correlations using the Q-vectors according to the generic framework
662 // The recursion method was originally developped by Kristjan Gulbrandsen (gulbrand@nbi.dk)
663  Int_t nMinusOne = 0; // Harmonic n-1
664  TComplex stopQvector = TComplex(0.,0.); // Stop condition of the recusion
665  Int_t pPlusOne = 0; // Power p+1
666  Int_t nMinusTwo = 0; // Harmonic n-2
667  Int_t counterOne = 0; // First counter for the intermediate indices
668  Int_t hHold = 0; // Temporary harmonic
669  TComplex tempQvector = TComplex(0,0); // Temporary Q-vector
670  Int_t counterTwo = 0; // Second counter for the intermediate indices
671 
672 // Stop conditions of the recursion
673  nMinusOne = nPartCorr-1;
674  stopQvector = Q(harmonics[nMinusOne],p);
675 
676  if (nMinusOne == 0) {return stopQvector;}
677  stopQvector *= CalculateRecursionWithQvectors(nMinusOne, harmonics);
678  if (nMinusOne == skip) {return stopQvector;}
679 
680 // Computation of the recursion itself
681  pPlusOne = p+1;
682  nMinusTwo = nPartCorr-2;
683  hHold = harmonics[counterOne];
684  harmonics[counterOne] = harmonics[nMinusTwo];
685  harmonics[nMinusTwo] = hHold + harmonics[nMinusOne];
686  tempQvector = CalculateRecursionWithQvectors(nMinusOne, harmonics, pPlusOne, nMinusTwo);
687  counterTwo = nPartCorr-3;
688 
689  while (counterTwo >= skip)
690  {
691  harmonics[nMinusTwo] = harmonics[counterOne];
692  harmonics[counterOne] = hHold;
693  ++counterOne;
694 
695  hHold = harmonics[counterOne];
696  harmonics[counterOne] = harmonics[nMinusTwo];
697  harmonics[nMinusTwo] = hHold + harmonics[nMinusOne];
698  tempQvector += CalculateRecursionWithQvectors(nMinusOne, harmonics, pPlusOne, counterTwo);
699  --counterTwo;
700  } // End: while (counterTwo >= skip)
701 
702  harmonics[nMinusTwo] = harmonics[counterOne];
703  harmonics[counterOne] = hHold;
704 
705 // Return of the result after the recursion
706  if (p == 1) {return stopQvector - tempQvector;}
707  return stopQvector - (Double_t(p)*tempQvector);
708 
709 // Reset of the variables to zero
710  nMinusOne = 0;
711  stopQvector = TComplex(0.,0.);
712  pPlusOne = 0;
713  nMinusTwo = 0;
714  counterOne = 0;
715  hHold = 0;
716  tempQvector = TComplex(0,0);
717  counterTwo = 0;
718 
719 } // End: TComplex AliAnalysisTaskTwoMultiCorrelations::CalculateRecursionWithQvectors(TComplex Qvectors[][9], Int_t nPartCorr, Int_t harmonics[], Int_t p, Int_t skip)
720 
721 //======================================================================================//
722 
723 void AliAnalysisTaskTwoMultiCorrelations::ComputeTwoParticleCorrelationWithQvectors(Int_t numeratorFirstTwoParticleHarmonics[], Int_t numeratorLastTwoParticleHarmonics[], Int_t indexTProfile)
724 {
725 // Method to compute the 2-p correlation with the Q-vectors (<<cos(h1*phi1+h2*phi2)>>,<<sin(h1*phi1+h2*phi2)>>)
726  Int_t denominatorTwoParticleHarmonics[2] = {0,0}; // Harmonics with value 0 for the denominator
727  Double_t denominator = 0.; // Denominator (and event weight of the TProfile)
728  TComplex firstTwoParticleCorrelation = TComplex(0.,0.); // 2-p correlation for the two first particle, used in the "normal" expression
729  TComplex lastTwoParticleCorrelation = TComplex(0.,0.); // 2-p correlation to compute <<cos(m(phi1-phi2))><cos(n(phi1-phi2))>>
730 
731 // Computation of the 2-p correlations
732  denominator = (CalculateRecursionWithQvectors(2, denominatorTwoParticleHarmonics)).Re();
733  firstTwoParticleCorrelation = (CalculateRecursionWithQvectors(2, numeratorFirstTwoParticleHarmonics))/denominator;
734  lastTwoParticleCorrelation = (CalculateRecursionWithQvectors(2, numeratorLastTwoParticleHarmonics))/denominator;
735 
736 // Filling of the TProfiles
737  fTwoParticleCorrelationProfile[0][indexTProfile]->Fill(0.5,firstTwoParticleCorrelation.Re(),denominator); // Cosine component
738  fTwoCosineAverageProfile[0][indexTProfile]->Fill(1.5,lastTwoParticleCorrelation.Re());
739  fTwoCosineAverageProfile[0][indexTProfile]->Fill(0.5,(fTwoParticleCorrelationProfile[0][indexTProfile]->GetBinContent(1))*(fTwoCosineAverageProfile[0][indexTProfile]->GetBinContent(2)));
740  if (fComputeSine) {fTwoParticleCorrelationProfile[1][indexTProfile]->Fill(0.5,firstTwoParticleCorrelation.Im(),denominator);} // Sine component
741 
742 // Reset of the variables to zero
743  denominator = 0;
744  firstTwoParticleCorrelation = TComplex(0.,0.);
745  lastTwoParticleCorrelation = TComplex(0.,0.);
746 } // End: void AliAnalysisTaskTwoMultiCorrelations::ComputeTwoParticleCorrelationWithQvectors(Int_t numeratorFirstTwoParticleHarmonics[], Int_t numeratorLastTwoParticleHarmonics[], Int_t indexTProfile)
747 
748 //======================================================================================//
749 
751 {
752 // Method to compute the 4-p correlation with the Q-vectors (<<cos(h1*phi1+h2*phi2+h3*phi3+h4*phi4)>>,<<sin(h1*phi1+h2*phi2+h3*phi3+h4*phi4)>>)
753  Int_t denominatorFourParticleHarmonics[4] = {0,0,0,0}; // Harmonics with value 0 for the denominator
754  Double_t denominator = 0.; // Denominator (and event weight of the TProfile)
755  TComplex fourParticleCorrelation = TComplex(0.,0.); // 4-p correlation
756 
757 // Computation of the 4-p correlation
758  denominator = (CalculateRecursionWithQvectors(4, denominatorFourParticleHarmonics)).Re();
759  fourParticleCorrelation = CalculateRecursionWithQvectors(4, numeratorFourParticleHarmonics)/denominator;
760 
761 // Filling of the TProfiles
762  fFourParticleCorrelationProfile[0][indexTProfile]->Fill(0.5,fourParticleCorrelation.Re(),denominator); // Cosine component
763  if (fComputeSine) {fFourParticleCorrelationProfile[1][indexTProfile]->Fill(0.5,fourParticleCorrelation.Im(),denominator);} // Sine component
764 } // End: void AliAnalysisTaskTwoMultiCorrelations::ComputeFourParticleCorrelationWithQvectors(Int_t numeratorFourParticleHarmonics[], Int_t indexTProfile)
765 
766 //======================================================================================//
767 
769 {
770 // Method to compute the 6-p correlation with the Q-vectors (<<cos(h1*phi1+h2*phi2+h3*phi3+h4*phi4+h5*phi5+h6*phi6)>>,<<sin(h1*phi1+h2*phi2+h3*phi3+h4*phi4+h5*phi5+h6*phi6)>>)
771  Int_t denominatorSixParticleHarmonics[6] = {0,0,0,0,0,0}; // Harmonics with value 0 for the denominator
772  Double_t denominator = 0.; // Denominator = event weight for the TProfile
773  TComplex sixParticleCorrelation = TComplex(0.,0.); // 6-p correlation
774 
775 // Computation of the 6-p correlation
776  denominator = (CalculateRecursionWithQvectors(6, denominatorSixParticleHarmonics)).Re();
777  sixParticleCorrelation = CalculateRecursionWithQvectors(6, numeratorSixParticleHarmonics)/denominator;
778 
779 // Filling of the TProfiles
780  fSixParticleCorrelationProfile[0][indexTProfile]->Fill(0.5, sixParticleCorrelation.Re(), denominator); // Cosine component
781  if (fComputeSine) {fSixParticleCorrelationProfile[1][indexTProfile]->Fill(0.5, sixParticleCorrelation.Im(), denominator);} // Sine component
782 } // End: void AliAnalysisTaskTwoMultiCorrelations::ComputeSixParticleCorrelationWithQvectors(Int_t numeratorSixParticleHarmonics[], Int_t indexTProfile)
783 
784 //======================================================================================//
785 
787 {
788 // Method to compute the 8-p correlation with the Q-vectors (<<cos(h1*phi1+h2*phi2+h3*phi3+h4*phi4+h5*phi5+h6*phi6+h7*phi7+h8*phi8)>>,<<sin(h1*phi1+h2*phi2+h3*phi3+h4*phi4+h5*phi5+h6*phi6+h7*phi7+h8*phi8)>>)
789  Int_t denominatorEightParticleHarmonics[8] = {0,0,0,0,0,0,0,0}; // Harmonics with value 0 for the denominator
790  Double_t denominator = 0.; // Denominator = event weight for the TProfile
791  TComplex eightParticleCorrelation = TComplex(0.,0.); // (<<cos>>,<<sin>>)
792 
793 // Computation of the 8-p correlation
794  denominator = (CalculateRecursionWithQvectors(8, denominatorEightParticleHarmonics)).Re();
795  eightParticleCorrelation = CalculateRecursionWithQvectors(8, numeratorEightParticleHarmonics)/denominator;
796 
797 // Filling of the TProfiles
798  fEightParticleCorrelationProfile[0]->Fill(0.5, eightParticleCorrelation.Re(), denominator); // Cosine component
799  if(fComputeSine) {fEightParticleCorrelationProfile[1]->Fill(0.5, eightParticleCorrelation.Im(), denominator);} // Sine component
800 } // End: void AliAnalysisTaskTwoMultiCorrelations::ComputeEightParticleCorrelationWithQvectors(Int_t numeratorEightParticleHarmonics[], Int_t indexTProfile)
801 
802 //======================================================================================//
803 
804 void AliAnalysisTaskTwoMultiCorrelations::ComputeCorrelationsWithTwoNestedLoops(Int_t numeratorTwoParticleHarmonics[], Int_t numeratorTwoLastParticleHarmonics[], Int_t indexTProfile, Int_t nParticles, Double_t phi[], Double_t particleWeight[])
805 {
806 // Method to compute the 2-particle correlation with two nested loops (for cross-checking results)
807  Double_t twoParticleCos = 0.; // Cos component of the correlation = single-event 2-p correlation, <2>_(n1...nm)
808  Double_t twoParticleSecondCos = 0.; // Second cosine average in the average with two cosine
809  Double_t twoParticleSin = 0.; // Sin component of the correlation
810  Double_t totalParticleWeight = 0.; // Particle weight for the 2-p correlation
811 
812 // Computation of the 2-p single-event average, <2>
813  for (Int_t k = 0; k < nParticles; k++)
814  {
815  for (Int_t l = 0; l < nParticles; l++)
816  {
817  // Removal of the autocorrelations k == l
818  if (k == l) {continue;}
819 
820  // Computation of <2> for a pair of particles
821  twoParticleCos = TMath::Cos(numeratorTwoParticleHarmonics[0]*phi[k] + numeratorTwoParticleHarmonics[1]*phi[l]);
822  twoParticleSecondCos = TMath::Cos(numeratorTwoLastParticleHarmonics[0]*phi[k] + numeratorTwoLastParticleHarmonics[1]*phi[l]);
823 
824  if (fComputeSine) {twoParticleSin = TMath::Sin(numeratorTwoParticleHarmonics[0]*phi[k] + numeratorTwoParticleHarmonics[1]*phi[l]);}
825  totalParticleWeight = particleWeight[k] * particleWeight[l];
826 
827  // Filling of the TProfile
828  fTwoNestedCorrelationProfile[0][indexTProfile]->Fill(0.5, twoParticleCos,totalParticleWeight);
829  fTwoCosineAverageNestedProfile[0][indexTProfile]->Fill(1.5,twoParticleSecondCos);
830  if (fComputeSine) {fTwoNestedCorrelationProfile[1][indexTProfile]->Fill(0.5, twoParticleSin,totalParticleWeight);}
831  } // End of the loop over the second particle of the pair
832  } // End of the loop over the first particle of the pair
833 
834 // Filling of the TProfile bin for <<cos><cos>>
835  fTwoCosineAverageNestedProfile[0][indexTProfile]->Fill(0.5,(fTwoNestedCorrelationProfile[0][indexTProfile]->GetBinContent(1))*(fTwoCosineAverageNestedProfile[0][indexTProfile]->GetBinContent(2)));
836 
837 // Reset of the local variables before changing the event
838  twoParticleCos = 0.;
839  twoParticleSecondCos = 0.;
840  twoParticleSin = 0.;
841  totalParticleWeight = 0.;
842 
843 } // End: void AliAnalysisTaskTwoMultiCorrelations::ComputeCorrelationsWithTwoNestedLoops(Int_t numeratorTwoParticleHarmonics[], Int_t numeratorTwoLastParticleHarmonics[], Int_t indexTProfile, Int_t nParticles, Double_t phi[], Double_t particleWeight[])
844 
845 //======================================================================================//
846 
847 void AliAnalysisTaskTwoMultiCorrelations::ComputeCorrelationsWithFourNestedLoops(Int_t numeratorFourParticleHarmonics[], Int_t indexTProfile, Int_t nParticles, Double_t phi[], Double_t particleWeight[])
848 {
849 // Method to compute the 4-particle correlation with four nested loops (for cross-checking results)
850  Double_t fourParticleCos = 0.; // Cos component of the correlation = single-event 4-p correlation, <4>_(n1,... nm)
851  Double_t fourParticleSin = 0.; // Sin component of the correlation
852  Double_t totalParticleWeight = 0.; // Particle weight for the 4-p correlation
853 
854 // Computation of the 4-p correlation, <4>
855  for (Int_t k = 0; k < nParticles; k++)
856  {
857  for (Int_t l = 0; l < nParticles; l++)
858  {
859  // Removal of the autocorrelations k == l
860  if (k == l) {continue;}
861 
862  for (Int_t m = 0; m < nParticles; m++)
863  {
864  // Removal of the autocorrelations k == m, l == m
865  if ((k == m) || (l == m)) {continue;}
866 
867  for (Int_t n = 0; n < nParticles; n++)
868  {
869  // Removal of the autocorrelations k == n, l == n, m == n
870  if ((k == n) || (l == n) || (m == n)) {continue;}
871 
872  // Computation of <4> for a quadruplet of particles
873  fourParticleCos = TMath::Cos(numeratorFourParticleHarmonics[0]*phi[k] + numeratorFourParticleHarmonics[1]*phi[l] + numeratorFourParticleHarmonics[2]*phi[m] + numeratorFourParticleHarmonics[3]*phi[n]);
874  if (fComputeSine) {fourParticleSin = TMath::Sin(numeratorFourParticleHarmonics[0]*phi[k] + numeratorFourParticleHarmonics[1]*phi[l] + numeratorFourParticleHarmonics[2]*phi[m] + numeratorFourParticleHarmonics[3]*phi[n]);}
875  totalParticleWeight = particleWeight[k]*particleWeight[l]*particleWeight[m]*particleWeight[n];
876 
877  // Filling of the TProfile
878  fFourNestedCorrelationProfile[0][indexTProfile]->Fill(0.5, fourParticleCos,totalParticleWeight);
879  if (fComputeSine) {fFourNestedCorrelationProfile[1][indexTProfile]->Fill(0.5, fourParticleSin,totalParticleWeight);}
880 
881  } // End of the loop over the fourth particle of the quadruplet
882  } // End of the loop over the third particle of the quadruplet
883  } // End of the loop over the second particle of the quadruplet
884  } // End of the loop over the first particle of the quadruplet
885 
886 // 3.) Reset of the local variables before changing the event
887  fourParticleCos = 0.;
888  fourParticleSin = 0.;
889  totalParticleWeight = 0.;
890 
891 } // End: void AliAnalysisTaskTwoMultiCorrelations::ComputeCorrelationsWithFourNestedLoops(Int_t numeratorFourParticleHarmonics[], Int_t indexTProfile, Int_t nParticles, Double_t phi[], Double_t particleWeight[])
892 
893 //======================================================================================//
TProfile * fTwoParticleCorrelationProfile[2][4]
Azimuthal angles distribution.
double Double_t
Definition: External.C:58
TProfile * fEightParticleCorrelationProfile[2]
6-p correlations ([cos,sin][max number of combinations of 3 elements out of 4]) with Q-vectors ...
virtual void ComputeFourParticleCorrelationWithQvectors(Int_t numeratorFourParticleHarmonics[], Int_t indexTProfile)
TComplex CalculateRecursionWithQvectors(Int_t nPartCorr, Int_t harmonics[], Int_t p=1, Int_t skip=0)
TProfile * fTwoNestedCorrelationProfile[2][4]
[<<cos(m(phi1-phi2))><cos(n(phi1-phi2))>>,<<sin(m(phi1-phi2))><sin(n(phi1-phi2))>>][6] with Q-vectors...
TProfile * fSixParticleCorrelationProfile[2][4]
4-p correlations ([cos,sin][max number of combinations of 2 elements out of 4]) with Q-vectors ...
TProfile * fTwoCosineAverageNestedProfile[2][4]
4-p correlations ([cos,sin][max number of combinations of 2 elements out of 4]) with nested loops ...
TH1D * fPtPreCutControlHisto
Multiplicity distribution.
int Int_t
Definition: External.C:63
TH1D * fPtPostCutControlHisto
Multiplicity distribution.
virtual void ComputeCorrelationsWithTwoNestedLoops(Int_t numeratorTwoParticleHarmonics[], Int_t numeratorTwoLastParticleHarmonics[], Int_t indexTProfile, Int_t nParticles, Double_t phi[], Double_t particleWeight[])
Definition: External.C:212
TH1D * fEtaPreCutControlHisto
Transverse momentum distribution.
TProfile * fTwoCosineAverageProfile[2][4]
8-p correlations ([cos,sin]) with Q-vectors
TH1D * fPhiPreCutHisto
Pseudorapidity distribution.
TH1D * fPhiPostCutHisto
Pseudorapidity distribution.
virtual void ComputeCorrelationsWithFourNestedLoops(Int_t numeratorFourParticleHarmonics[], Int_t indexTProfile, Int_t nParticles, Double_t phi[], Double_t particleWeight[])
TH1D * fMultiplicityPostCutHisto
Azimuthal angles distribution.
TH1D * fMultiplicityPreCutHisto
Centrality distribution.
TProfile * fFourParticleCorrelationProfile[2][6]
2-p correlations ([cos,sin][m,n,p,q]) with Q-vectors
TH1D * fEtaPostCutControlHisto
Transverse momentum distribution.
const char Option_t
Definition: External.C:48
virtual void ComputeEightParticleCorrelationWithQvectors(Int_t numeratorEightParticleHarmonics[])
TProfile * fFourNestedCorrelationProfile[2][6]
2-p correlations ([cos,sin][m,n,p,q]) with nested loops
bool Bool_t
Definition: External.C:53
virtual void ComputeSixParticleCorrelationWithQvectors(Int_t numeratorSixParticleHarmonics[], Int_t indexTProfile)
virtual void CalculateQvectors(Int_t nParticles, Double_t phi[], Double_t particleWeight[])
virtual void ComputeTwoParticleCorrelationWithQvectors(Int_t numeratorFirstTwoParticleHarmonics[], Int_t numeratorLastTwoParticleHarmonics[], Int_t indexTProfile)