AliPhysics  9b6b435 (9b6b435)
AliAnalysisTaskTwoMultiCorrelations.h
Go to the documentation of this file.
1 
2 //--------------------------------------------------------------------------------------//
3 // Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. //
4 // See cxx source for full Copyright notice //
5 // $Id$ //
6 //--------------------------------------------------------------------------------------//
7 
8 //--------------------------------------------------------------------------------------//
9 // Analysis task for the computation of the multiparticle correlations with different //
10 // flow harmonics v_n. This script can takes the Monte Carlo simulations data (e.g. //
11 // HIJING), as well as the experimental Pb-Pb data taken by the ALICE experiment. //
12 // The current script computes the multiparticle correlators using the method of the //
13 // Q-vectors for a maximum of 6 different harmonics and 8 particles). //
14 // //
15 // Author: Cindy Mordasini (cindy.mordasini@cern.ch) //
16 // Version: 12.02.2019 //
17 //--------------------------------------------------------------------------------------//
18 
19 #ifndef ALIANALYSISTASKTWOMULTICORRELATIONS_H
20 #define ALIANALYSISTASKTWOMULTICORRELATIONS_H
21 
22 #include "AliAnalysisTaskSE.h"
23 #include "AliAODTrack.h"
24 #include "AliAODEvent.h"
25 #include "AliMCEvent.h"
26 #include "AliAODMCParticle.h"
27 #include "AliVEvent.h"
28 #include "TProfile.h"
29 #include "TComplex.h"
30 #include "TH1D.h"
31 
32 //======================================================================================//
33 // Definition of the class.
35 public:
36 /* The six following functions are mandatory for AliAnalysisTaskSE to use the class properly. */
38  AliAnalysisTaskTwoMultiCorrelations(const char *name, Bool_t useParticleWeights=kFALSE);
40 
41  virtual void UserCreateOutputObjects();
42  virtual void UserExec(Option_t *);
43  virtual void Terminate(Option_t *);
44 
45 //--------------------------------------------------------------------------------------//
46 // Setters and getters for all the data members.
47  void SetGeneralParameters(Int_t maxNumberCorrelations, Int_t highestHarmonic, Int_t nbHarmonics, Bool_t useParticleWeights, Bool_t computeNestedLoops)
48  {
49  this->fMaxNumberCorrelations = maxNumberCorrelations;
50  this->fMaxFlowHarmonic = highestHarmonic;
51  this->fNumberHarmonicsInSC = nbHarmonics;
52  this->fUseParticleWeights = useParticleWeights;
53  this->fComputeNestedLoops = computeNestedLoops;
54  } // End: void SetGeneralParameters().
55 
56  void SetControlListEventCuts(TList* const sclec) {this->fControlListEventCuts = sclec;};
58  void SetControlListTrackCuts(TList* const scltc) {this->fControlListTrackCuts = scltc;};
60  void SetListCorrelations(TList* const slc) {this->fListCorrelations = slc;};
61  TList* GetListCorrelations() const {return this->fListCorrelations;}
62 
63  void SetAnalysisType(Bool_t bothAnalysis, Bool_t mcAnalysis, Bool_t aodAnalysis)
64  {
65  this->fProcessBothKineAndReco = bothAnalysis;
66  this->fProcessOnlyKine = mcAnalysis;
67  this->fProcessOnlyReco = aodAnalysis;
68  } // End: SetAnalysisType().
69 
70  void SetCentralityEstimation(Bool_t useSPD, Bool_t useVzero, Int_t const nBins, Float_t minCentrality, Float_t maxCentrality)
71  {
72  this->fUseSPDForCentrality = useSPD;
73  this->fUseVZeroForCentrality = useVzero;
74  this->fCentralityMin = minCentrality;
75  this->fCentralityMax = maxCentrality;
76  } // End: void SetCentralityEstimation().
77 
78  void SetEventSelection(Bool_t cutOnVertexX, Float_t minVertexX, Float_t maxVertexX, Bool_t cutOnVertexY, Float_t minVertexY, Float_t maxVertexY, Bool_t cutOnVertexZ, Float_t minVertexZ, Float_t maxVertexZ)
79  {
80  this->fCutOnVertexX = cutOnVertexX;
81  this->fVertexMinX = minVertexX;
82  this->fVertexMaxX = maxVertexX;
83  this->fCutOnVertexY = cutOnVertexY;
84  this->fVertexMinY = minVertexY;
85  this->fVertexMaxY = maxVertexY;
86  this->fCutOnVertexZ = cutOnVertexZ;
87  this->fVertexMinZ = minVertexZ;
88  this->fVertexMaxZ = maxVertexZ;
89  } // End: void SetEventSelection().
90 
91  void SetTrackSelection(Float_t minPt, Float_t maxPt, Float_t minEta, Float_t maxEta, Int_t minNumberOfClustersTPC, Float_t maxDCAxy, Float_t maxDCAz)
92  {
93  this->fPtMin = minPt;
94  this->fPtMax = maxPt;
95  this->fEtaMin = minEta;
96  this->fEtaMax = maxEta;
97  this->fNumberOfTPCMin = minNumberOfClustersTPC;
98  this->fDCAxyMax = maxDCAxy;
99  this->fDCAzMax = maxDCAz;
100  } // End: void SetTrackSelection().
101 
102  void SetHarmonics(Int_t nOne, Int_t nTwo, Int_t nThree, Int_t nFour, Int_t nFive, Int_t nSix, Int_t nSeven, Int_t nEight)
103  {
104  this->fHarmonicOne = nOne;
105  this->fHarmonicTwo = nTwo;
106  this->fHarmonicThree = nThree;
107  this->fHarmonicFour = nFour;
108  this->fHarmonicFive = nFive;
109  this->fHarmonicSix = nSix;
110  this->fHarmonicSeven = nSeven;
111  this->fHarmonicEight = nEight;
112  } // End: void SetHarmonics().
113 
114 // Methods called in the constructor.
115  virtual void InitialiseArraysOfQvectors();
116  virtual void InitialiseArraysOfTProfiles();
117 
118 // Methods called in UserCreateOutputObjects().
119  virtual void BookAllLists();
120  virtual void BookControlListEventCuts();
121  virtual void BookControlListTrackCuts();
122  virtual void BookListCorrelations();
123 
124 // Methods called in UserExec(Option_t *).
125  virtual void AODanalysis(AliAODEvent *aAODevent);
126  virtual void MCanalysis(AliMCEvent *aMCevent);
127  Bool_t CreateTrackSelection(Double_t currentPt, Double_t currentEta, Int_t currentNumberOfTPC, Double_t currentDCAXY, Double_t currentDCAZ);
128  virtual void CalculateQvectors(long long nParticles, Double_t angles[], Double_t weights[]);
129  virtual void GSCfullAnalysis(long long nParticles, Double_t angles[], Double_t weights[]);
130  TComplex Q(Int_t n, Int_t p);
131  TComplex CalculateRecursion(Int_t n, Int_t *harmonic, Int_t mult=1, Int_t skip=0);
132  Double_t ComputeTwoNestedLoops(long long nParticles, Int_t *harmonic, Double_t angles[], Double_t weights[], TProfile *profile);
133  Double_t ComputeThreeNestedLoops(long long nParticles, Int_t *harmonic, Double_t angles[], Double_t weights[], TProfile *profile);
134  Double_t ComputeFourNestedLoops(long long nParticles, Int_t *harmonic, Double_t angles[], Double_t weights[], TProfile *profile);
135 
136 // Methods called in Terminate(Option_t *).
137 
138 //--------------------------------------------------------------------------------------//
139 private:
142 
143 // General parameters.
144  Int_t fMaxNumberCorrelations; // Maximum number of particles in the correlator (default: 8).
145  Int_t fMaxFlowHarmonic; // Maximum harmonic n for v_n (default: 6).
146  TComplex fQvectors[49][9]; // All needed combinations of Q-vectors (size: [fMaxFlowHarmonic*fMaxNumberCorrelations+1][fMaxNumberCorrelations+1]).
147  Int_t fNumberHarmonicsInSC; // Number of harmonics in the GSC (default: 3).
148  Bool_t fUseParticleWeights; // Use non-unit particle weights (default: kFALSE).
149  Bool_t fComputeNestedLoops; // Compute the nested loops for cross-check (default: kFALSE).
150 
151 // Structure of the output file.
152  TList *fMainList; // Main output list.
153  TList *fControlListEventCuts; // Secondary list with the observables for the event cuts.
154  TList *fControlListTrackCuts; // Secondary list with the observables for the track cuts.
155  TList *fListCorrelations; // Secondary list with the results for all the correlations.
156  TList *fListTwoParticles; // Tertiary list with the 2-p correlations.
157  TList *fListThreeParticles; // Tertiary list with the 3-p correlations.
158  TList *fListFourParticles; // Tertiary list with the 4-p correlations.
159  TList *fListSixParticles; // Tertiary list with the 6- and 8-p correlations.
160 
161 // Control histograms for the distribution of observables for the event selection.
171 
172 // Control histrograms for the distribution of observables for the track selection.
186 
187 // TProfiles with the final multiparticle correlations.
190  TProfile *fProfileTwoCosine[5];
198 
199 // Type of analysis.
201  Bool_t fProcessBothKineAndReco; // Process both MC and AOD (default: kFALSE).
202  Bool_t fProcessOnlyKine; // Process only MC (default: kFALSE).
203  Bool_t fProcessOnlyReco; // Process only AOD (default: kFALSE).
204 
205 // Determination of the centrality.
207  Bool_t fUseSPDForCentrality; // Use the SPD detector (default: kFALSE).
208  Bool_t fUseVZeroForCentrality; // Use the V0 detector (default: kFALSE).
209  Double_t fCentralityMin; // Minimum value for the centrality percentile (default: 0).
210  Double_t fCentralityMax; // Maximum value for the centrality percentile (default: 100).
211 
212 // Event selection.
213  Bool_t fCutOnVertexX; // Apply the cuts on the x-position of the PV (default: kFALSE).
214  Double_t fVertexMinX; // Minimum of the x-position of the PV (default: -44).
215  Double_t fVertexMaxX; // Maximum of the x-position of the PV (default: -44).
216 
217  Bool_t fCutOnVertexY; // Apply the cuts on the y-position of the PV (default: kFALSE).
218  Double_t fVertexMinY; // Minimum of the y-position of the PV (default: -44).
219  Double_t fVertexMaxY; // Maximum of the y-position of the PV (default: -44).
220 
221  Bool_t fCutOnVertexZ; // Apply the cuts on the y-position of the PV (default: kFALSE).
222  Double_t fVertexMinZ; // Minimum of the z-position of the PV (default: -10 cm).
223  Double_t fVertexMaxZ; // Maximum of the z-position of the PV (default: 10 cm).
224 
225 // Track selection.
226  Double_t fPtMin; // Minimum value of the transverse momentum (default: 0.2 GeV).
227  Double_t fPtMax; // Maximum value of the transverse momentum (default: 5 GeV).
228 
229  Double_t fEtaMin; // Minimum value of the pseudorapidity (default: -0.8).
230  Double_t fEtaMax; // Maximum value of the pseudorapidity (default: 0.8).
231 
232  Double_t fNumberOfTPCMin; // Minimum number of TPC clusters (default: 70?).
233 
234  Double_t fDCAxyMax; // Maximum value for the xy-coordinate of the DCA (default: 3.2 cm).
235  Double_t fDCAzMax; // Maximum value for the z-coordinate of the DCA (default: 2.4 cm).
236 
237 // Harmonics.
238  Int_t fHarmonicOne; // Harmonic n_1 (default: 2).
239  Int_t fHarmonicTwo; // Harmonic n_2 (default: -2).
240  Int_t fHarmonicThree; // Harmonic n_3 (default: 3).
241  Int_t fHarmonicFour; // Harmonic n_4 (default: -3).
242  Int_t fHarmonicFive; // Harmonic n_5 (default: 4).
243  Int_t fHarmonicSix; // Harmonic n_6 (default: -4).
244  Int_t fHarmonicSeven; // Harmonic n_7 (default: 0).
245  Int_t fHarmonicEight; // Harmonic n_8 (default: 0).
246 
247 // Version counter for the submissions on Grid.
251 
252 }; // End: class AliAnalysisTaskTwoMultiCorrelations().
253 
254 #endif
255 
TH1D * fHistoVertexYAfterEventCuts
x-position of the PV after the event selection.
TProfile * fProfileCosineTwoNestedLoops[6]
<2>_{j,-j}, j: k,l,m,n,(k+l),(k-l).
TProfile * fProfileCosineTwoParticles[6]
z-coordinate of the DCA after the track selection.
double Double_t
Definition: External.C:58
Bool_t CreateTrackSelection(Double_t currentPt, Double_t currentEta, Int_t currentNumberOfTPC, Double_t currentDCAXY, Double_t currentDCAZ)
TH1D * fHistoVertexZAfterEventCuts
y-position of the PV after the event selection.
AliAnalysisTaskTwoMultiCorrelations & operator=(const AliAnalysisTaskTwoMultiCorrelations &aattmc)
TProfile * fProfileCosineThreeParticles[4]
N<<2>_{i,-i}<2>_{j,-j}> with nested loops.
TH1D * fHistoDCAXYBeforeCuts
Number of TPC clusters after the track selection.
TH1D * fHistoPtBeforeCuts
Number of tracks remaining after both the event and the track selection.
TProfile * fProfileCosineSixParticles[4]
<4>_{i,j,-i,-j} with nested loops.
TH1D * fHistoEtaAfterCuts
Pseudorapidity distribution before the track selection.
void SetCentralityEstimation(Bool_t useSPD, Bool_t useVzero, Int_t const nBins, Float_t minCentrality, Float_t maxCentrality)
TH1D * fHistoVertexXBeforeCuts
Number of tracks remaining after the event selection.
virtual void CalculateQvectors(long long nParticles, Double_t angles[], Double_t weights[])
TH1D * fHistoPhiAfterCuts
Azimuthal angles distribution before the track selection.
TH1D * fHistoTPCClustersBeforeCuts
Azimuthal angles distribution after the track selection.
TH1D * fHistoVertexZBeforeCuts
y-position of the PV before the event selection.
TH1D * fHistoDCAXYAfterCuts
z-coordinate of the DCA before the track selection.
int Int_t
Definition: External.C:63
TH1D * fHistoTPCClustersAfterCuts
Number of TPC clusters before the track selection.
float Float_t
Definition: External.C:68
void SetEventSelection(Bool_t cutOnVertexX, Float_t minVertexX, Float_t maxVertexX, Bool_t cutOnVertexY, Float_t minVertexY, Float_t maxVertexY, Bool_t cutOnVertexZ, Float_t minVertexZ, Float_t maxVertexZ)
TH1D * fHistoPtAfterCuts
Transverse momentum before the track selection.
TH1D * fHistoEtaBeforeCuts
Transverse momentum distribution after the track selection.
TProfile * fProfileCosineEightParticles
<6>_{h,i,j,-h,-i,-j}, hij: klm,kln,kmn,lmn.
void SetAnalysisType(Bool_t bothAnalysis, Bool_t mcAnalysis, Bool_t aodAnalysis)
Definition: External.C:212
Bool_t fUseSPDForCentrality
Detector for the centrality estimation: SPD (CL1) or V0 (V0M).
void SetGeneralParameters(Int_t maxNumberCorrelations, Int_t highestHarmonic, Int_t nbHarmonics, Bool_t useParticleWeights, Bool_t computeNestedLoops)
TH1D * fHistoNumberOfTracksBeforeCuts
Centrality distribution.
TString * fAnalysisType
<8>_{k,l,m,n,-k,-l,-m,-n}.
TProfile * fProfileTwoCosine[5]
<2>_{j,-j} with nested loops.
TH1D * fHistoVertexXAfterEventCuts
z-position of the PV before the event selection.
Double_t ComputeThreeNestedLoops(long long nParticles, Int_t *harmonic, Double_t angles[], Double_t weights[], TProfile *profile)
TH1D * fHistoPhiBeforeCuts
Pseudorapidity distribution after the track selection.
Double_t ComputeFourNestedLoops(long long nParticles, Int_t *harmonic, Double_t angles[], Double_t weights[], TProfile *profile)
TH1D * fHistoNumberOfTracksAfterAllCuts
z-position of the PV after the event selection.
TProfile * fProfileCosineFourNestedLoops[6]
<4>_{i,j,-i,-j}, ij: kl,km,lm,kn,ln,mn.
TComplex CalculateRecursion(Int_t n, Int_t *harmonic, Int_t mult=1, Int_t skip=0)
void SetHarmonics(Int_t nOne, Int_t nTwo, Int_t nThree, Int_t nFour, Int_t nFive, Int_t nSix, Int_t nSeven, Int_t nEight)
const char Option_t
Definition: External.C:48
TProfile * fProfileCosineFourParticles[6]
<3>_{h,i,j} with nested loops.
bool Bool_t
Definition: External.C:53
TH1D * fHistoVertexYBeforeCuts
x-position of the PV before the event selection.
TH1D * fHistoDCAZAfterCuts
xy-plane of the DCA after the track selection.
void SetTrackSelection(Float_t minPt, Float_t maxPt, Float_t minEta, Float_t maxEta, Int_t minNumberOfClustersTPC, Float_t maxDCAxy, Float_t maxDCAz)
TH1D * fHistoDCAZBeforeCuts
xy-plane of the DCA before the track selection.
TProfile * fProfileCosineThreeNestedLoops[4]
<3>_{h,i,j}, h: (k+l),(k-l) (first two), j: (l-k),(-k-l) (last two).
Bool_t fProcessBothKineAndReco
Type of analysis: MC or AOD.
TH1D * fHistoNumberOfTracksAfterEventCuts
Number of tracks in the event before any selection.
TProfile * fProfileTwoCosineNestedLoops[5]
<<2>_{i,-i}<2>_{j,-j}> for ij: kl,km,lm, and <<2>_{i,-i}<2>_{j,-j}<2>_{h,-h}>, ijh: klm and <<4>_{k...
virtual void GSCfullAnalysis(long long nParticles, Double_t angles[], Double_t weights[])
Double_t ComputeTwoNestedLoops(long long nParticles, Int_t *harmonic, Double_t angles[], Double_t weights[], TProfile *profile)