AliPhysics  608b256 (608b256)
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 for the flow //
10 // harmonics v_1 to v_6. This version of the script compute the 2-, 4- and 6- particle //
11 // correlations for all the useful combinations of these six harmonics. It can take //
12 // Monte Carlo simulations data (e.g. HIJING), as well as the experimental Pb-Pb data //
13 // taken by the ALICE experiment. //
14 // The method used to compute the multiparticle correlations is the Generic Framework //
15 // based on Q-vectors. A setter lets open the possibility to cross-check the results //
16 // with nested loops. //
17 // //
18 // Author: Cindy Mordasini (cindy.mordasini@cern.ch) //
19 // Version: 27.02.2019 //
20 //--------------------------------------------------------------------------------------//
21 
22 #ifndef ALIANALYSISTASKTWOMULTICORRELATIONS_H
23 #define ALIANALYSISTASKTWOMULTICORRELATIONS_H
24 
25 #include "AliAnalysisTaskSE.h"
26 #include "AliAODEvent.h"
27 #include "AliMCEvent.h"
28 #include "AliVEvent.h"
29 #include "AliAODTrack.h"
30 #include "TList.h"
31 #include "TComplex.h"
32 #include "TH1D.h"
33 #include "TH1I.h"
34 #include "TProfile.h"
35 
36 //######################################################################################//
37 // Definition of the class.
38 //======================================================================================//
40 {
41 public:
42 /* These six functions are mandatory for the class to work properly. */
44  AliAnalysisTaskTwoMultiCorrelations(const char *name, Bool_t useParticleWeights=kFALSE);
46 
47  virtual void UserCreateOutputObjects();
48  virtual void UserExec(Option_t *);
49  virtual void Terminate(Option_t *);
50 
51 //--------------------------------------------------------------------------------------//
52 // Setters and getters for the data members.
53  void SetQAListBeforeSelection(TList* const slbs) {this->fQAListBeforeSelection = slbs;};
55  void SetQAListAfterSelection(TList* const slas) {this->fQAListAfterSelection = slas;};
57  void SetListCorrelations(TList* const slc) {this->fListCorrelations = slc;};
58  TList* GetListCorrelations() const {return this->fListCorrelations;}
59 
60  void SetGeneralParameters(Int_t maxParticlesInCorrelations, Int_t maxFlowHarmonic, Bool_t useNonUnitWeights, Bool_t crossCheckFourParticle, Bool_t crossCheckNestedLoops)
61  {
62  this->fMaxNumberOfParticlesInCorrelations = maxParticlesInCorrelations;
63  this->fHighestFlowHarmonic = maxFlowHarmonic;
64  this->fUseParticleWeights = useNonUnitWeights;
65  this->fCrossCheckFourParticleCorrelations = crossCheckFourParticle;
66  this->fCrossCheckWithNestedLoops = crossCheckNestedLoops;
67  }
68 
69  void SetAnalysisType(Bool_t aodFiles, Bool_t mcFiles, Bool_t bothFiles)
70  {
71  this->fProcessOnlyAOD = aodFiles;
72  this->fProcessOnlyMC = mcFiles;
73  this->fProcessBothMCandAOD = bothFiles;
74  }
75 
76  void SetCentralityEstimation(Bool_t useVZero, Bool_t useSPD, Int_t const nBins, Double_t minCentrality, Double_t maxCentrality)
77  {
78  this->fCentralityFromVZero = useVZero;
79  this->fCentralityFromSPD = useSPD;
80  this->fCentralityMin = minCentrality;
81  this->fCentralityMax = maxCentrality;
82  }
83 
84  void SetEventSelection(Bool_t cutOnVertexX, Double_t minVertexX, Double_t maxVertexX, Bool_t cutOnVertexY, Double_t minVertexY, Double_t maxVertexY, Bool_t cutOnVertexZ, Double_t minVertexZ, Double_t maxVertexZ, Int_t minNumberOfTracks)
85  {
86  this->fCutOnVertexX = cutOnVertexX;
87  this->fVertexMinX = minVertexX;
88  this->fVertexMaxX = maxVertexX;
89  this->fCutOnVertexY = cutOnVertexY;
90  this->fVertexMinY = minVertexY;
91  this->fVertexMaxY = maxVertexY;
92  this->fCutOnVertexZ = cutOnVertexZ;
93  this->fVertexMinZ = minVertexZ;
94  this->fVertexMaxZ = maxVertexZ;
95  this->fNumberOfTracksMin = minNumberOfTracks;
96  }
97 
98  void SetTrackSelection(Double_t minPt, Double_t maxPt, Double_t minEta, Double_t maxEta, Int_t minNumberOfClustersTPC, Double_t minChiSquareTPC, Double_t maxChiSquareTPC, Double_t maxDCAxy, Double_t maxDCAz)
99  {
100  this->fPtMin = minPt;
101  this->fPtMax = maxPt;
102  this->fEtaMin = minEta;
103  this->fEtaMax = maxEta;
104  this->fNumberOfTPCMin = minNumberOfClustersTPC;
105  this->fChiSquarePInTPCMin = minChiSquareTPC;
106  this->fChiSquarePInTPCMax = maxChiSquareTPC;
107  this->fDCAxyMax = maxDCAxy;
108  this->fDCAzMax = maxDCAz;
109  }
110 
112  {
113  this->fHNOTNumberOfBins = HNOTbins;
114  this->fHNOTMax = HNOTmax;
115  }
116 
117 //--------------------------------------------------------------------------------------//
118 // Methods called in the constructors.
119  virtual void InitialiseArraysOfQvectors();
120 
121 //--------------------------------------------------------------------------------------//
122 // Methods called in 'UserCreateOutputObjects'.
123  virtual void BookAllLists();
124  virtual void BookQAListBeforeSelection();
125  virtual void BookQAListAfterSelection();
126  virtual void BookListCorrelations();
127 
128 //--------------------------------------------------------------------------------------//
129 // Methods called in 'UserExec'.
130  virtual void AnalyseAODevent(AliAODEvent *aAODevent);
131  virtual void AnalyseMCevent(AliMCEvent *aMCevent);
132  Bool_t ApplyTrackSelection(Double_t momentum, Double_t pseudorapidity, Int_t NclustersInTPC, Double_t TPCchiSquare, Double_t xyDCA, Double_t zDCA);
133  virtual void CalculateQvectors(long long numberOfParticles, Double_t angles[], Double_t pWeights[]);
134  TComplex Q(Int_t n, Int_t p);
135  virtual void ComputeMultiparticleCorrelations(long long numberOfParticles, Double_t angles[], Double_t pWeights[]);
136  TComplex CalculateRecursion(Int_t n, Int_t *harmonic, Int_t mult=1, Int_t skip=0);
137  virtual void ComputeTwoNestedLoops(long long nParticles, Int_t *harmonic, Double_t aAngles[], Double_t weights[], TProfile *profile, Double_t middleBin);
138  virtual void ComputeFourNestedLoops(long long nParticles, Int_t *harmonic, Double_t aAngles[], Double_t weights[], TProfile *profile, Double_t middleBin);
139 
140 //--------------------------------------------------------------------------------------//
141 // Methods called in 'Terminate'.
142 
143 
144 //======================================================================================//
145 // Data members.
146 //--------------------------------------------------------------------------------------//
147 private:
150 
151 // Structure of the output file.
152  TList *fMainList; // Mother list inside the output file.
153  TList *fQAListBeforeSelection; // Daughter list with the observables before selection (event or track).
154  TList *fQAListAfterSelection; // Daughter list with the observables after the full selection.
155  TList *fListCorrelations; // Daughter list with the multiparticle correlations.
156 
157 // General parameters.
158  Int_t fMaxNumberOfParticlesInCorrelations; // Maximum number of particles in the correlations. (default: 8)
159  Int_t fHighestFlowHarmonic; // Highest flow harmonic taken into account. (default: v_6).
160  TComplex fQvectors[49][9]; // All needed combinations of Q-vectors. (size: [fHighestFlowHarmonic*fMaxNumberCorrelations+1][fMaxNumberCorrelations+1])
161  Bool_t fUseParticleWeights; // Use non-unit particle weights. (default: kFALSE)
162  Bool_t fCrossCheckFourParticleCorrelations; // Compute the doubled combinations of harmonics for <4> to cross-check the results. (default: kFALSE)
163  Bool_t fCrossCheckWithNestedLoops; // Compute the nested loops for the 2- and 4-particle correlations to cross-check the results. (default: kFALSE)
164 
165 // Type of files used in the analysis.
166  Bool_t fProcessOnlyAOD; // Process only AOD files (or Reco). (default: kFALSE)
167  Bool_t fProcessOnlyMC; // Process only MC files (or Kine). (default: kFALSE)
168  Bool_t fProcessBothMCandAOD; // Process both MC and AOD files. (default: kFALSE)
169 
170 // Determination of the centrality.
171  Bool_t fCentralityFromVZero; // Use the V0 detector to estimate the centrality of the events. (default: kFALSE)
172  Bool_t fCentralityFromSPD; // Use the SPD detector to estimate the centrality of the events. (default: kFALSE)
173  Double_t fCentralityMin; // Minimum value for the centrality percentile. (default: 0)
174  Double_t fCentralityMax; // Maximum value for the centrality percentile. (default: 100)
175 
176 // Event selection.
177  Bool_t fCutOnVertexX; // Apply the cuts on the x-position of the PV? (default: kFALSE)
178  Double_t fVertexMinX; // Minimum of the x-position of the PV. (default: -44)
179  Double_t fVertexMaxX; // Maximum of the x-position of the PV. (default: -44)
180 
181  Bool_t fCutOnVertexY; // Apply the cuts on the y-position of the PV? (default: kFALSE)
182  Double_t fVertexMinY; // Minimum of the y-position of the PV. (default: -44)
183  Double_t fVertexMaxY; // Maximum of the y-position of the PV. (default: -44)
184 
185  Bool_t fCutOnVertexZ; // Apply the cuts on the y-position of the PV? (default: kFALSE)
186  Double_t fVertexMinZ; // Minimum of the z-position of the PV. (default: -10 cm)
187  Double_t fVertexMaxZ; // Maximum of the z-position of the PV. (default: 10 cm)
188 
189  Int_t fNumberOfTracksMin; // Strict minimum number of tracks needed in an event to have an event weight which makes sense. (default: 6)
190 
191 // Track selection.
192  Double_t fPtMin; // Minimum value of the transverse momentum. (default: 0.2 GeV)
193  Double_t fPtMax; // Maximum value of the transverse momentum. (default: 5 GeV)
194 
195  Double_t fEtaMin; // Minimum value of the pseudorapidity. (default: -0.8)
196  Double_t fEtaMax; // Maximum value of the pseudorapidity. (default: 0.8)
197 
198  Int_t fFilter; // Filter bit used on the tracks. (default: 128)
199  Int_t fNumberOfTPCMin; // Minimum number of TPC clusters. (default: 70)
200  Double_t fChiSquarePInTPCMin; // Minimum value of chi^2 of the track momentum in TPC. (default: 0.1)
201  Double_t fChiSquarePInTPCMax; // Maximum value of chi^2 of the track momentum in TPC. (default: 4.)
202 
203  Double_t fDCAxyMax; // Maximum value for the xy-coordinate of the DCA. (default: 3.2 cm)
204  Double_t fDCAzMax; // Maximum value for the z-coordinate of the DCA. (default: 2.4 cm)
205 
206 // TH1D with the observables for the event selection.
211  Int_t fHNOTNumberOfBins; // Number of bins for 'fHisto*NumberOfTracks'. (default: 30000)
212  Double_t fHNOTMax; // Maximum value for 'fHisto*NumberOfTracks'. (default: 30000)
219 
220 // TH1D with the observables for the track selection.
235 
236 // TProfiles with the final multiparticle correlations.
243 
244 //--------------------------------------------------------------------------------------//
245 // Version number to handle properly objects written before and after the changes.
246 // Version 7, date: 2019-02-27.
248 
249 }; // End: class AliAnalysisTaskTwoMultiCorrelations.
250 
251 #endif
TProfile * fProfileTwoParticleCorrelationsNestedLoops
<6>_{j,k,l,-j,-k,-l} for j = 1..4, k = 2..5 (k > j), l = 3..6 (l > k). (20 bins)
TH1D * fHistoPtAfterSelection
Distribution of the transverse momentum before the track selection.
void SetAnalysisType(Bool_t aodFiles, Bool_t mcFiles, Bool_t bothFiles)
double Double_t
Definition: External.C:58
TH1I * fHistoInitialNumberOfTracks
Distribution of the centrality of the events.
TH1D * fHistoDCAZAfterSelection
Distribution of the z-coordinate of the DCA before the track selection.
virtual void ComputeFourNestedLoops(long long nParticles, Int_t *harmonic, Double_t aAngles[], Double_t weights[], TProfile *profile, Double_t middleBin)
TH1D * fHistoEtaBeforeSelection
Distribution of the transverse momentum after the full selection.
TH1D * fHistoTPCChiSquareAfterSelection
Distribution of the chi square of the track momentum in the TPC before the track selection.
void SetGeneralParameters(Int_t maxParticlesInCorrelations, Int_t maxFlowHarmonic, Bool_t useNonUnitWeights, Bool_t crossCheckFourParticle, Bool_t crossCheckNestedLoops)
AliAnalysisTaskTwoMultiCorrelations & operator=(const AliAnalysisTaskTwoMultiCorrelations &aattmc)
TH1I * fHistoTPCClustersBeforeSelection
Distribution of the azimuthal angles after the full selection.
TH1D * fHistoPtBeforeSelection
Distribution of the PV z-position after the full selection.
TProfile * fProfileTwoParticleCorrelations
Distribution of the z-coordinate of the DCA after the full selection.
TH1I * fHistoNumberOfTracksBeforeTrackSelection
Distribution of the initial number of tracks.
TH1D * fHistoDCAZBeforeSelection
Distribution of the xy-plane of the DCA after the full selection.
TProfile * fProfileFourParticleCorrelationsNestedLoops
<2>_{j,-j} for j = 1..6 with nested loops. (6 bins)
int Int_t
Definition: External.C:63
Definition: External.C:204
TH1I * fHistoTPCClustersAfterSelection
Distribution of the number of TPC clusters before the track selection.
TH1D * fHistoVertexZBeforeSelection
Distribution of the PV y-position after the full selection.
TH1D * fHistoEtaAfterSelection
Distribution of the pseudorapidity before the track selection.
TH1D * fHistoPhiAfterSelection
Distribution of the azimuthal angles before the track selection.
Definition: External.C:212
virtual void CalculateQvectors(long long numberOfParticles, Double_t angles[], Double_t pWeights[])
TH1D * fHistoDCAXYBeforeSelection
Distribution of the chi square of the track momentum in the TPC after the full selection.
void SetTrackSelection(Double_t minPt, Double_t maxPt, Double_t minEta, Double_t maxEta, Int_t minNumberOfClustersTPC, Double_t minChiSquareTPC, Double_t maxChiSquareTPC, Double_t maxDCAxy, Double_t maxDCAz)
TH1D * fHistoVertexZAfterSelection
Distribution of the initial PV z-position.
virtual void ComputeTwoNestedLoops(long long nParticles, Int_t *harmonic, Double_t aAngles[], Double_t weights[], TProfile *profile, Double_t middleBin)
TH1D * fHistoVertexYAfterSelection
Distribution of the initial PV y-position.
TH1D * fHistoDCAXYAfterSelection
Distribution of the xy-plane of the DCA before the track selection.
TProfile * fProfileFourParticleCorrelationsCrossCheck
<4>_{j,k,-j,-k} for j = 1..6, k = j..6. (21 bins)
TH1D * fHistoPhiBeforeSelection
Distribution of the pseudorapidity after the full selection.
TH1D * fHistoVertexYBeforeSelection
Distribution of the PV x-position after the full selection.
TH1D * fHistoTPCChiSquareBeforeSelection
Distribution of the number of TPC clusters after the full selection.
TH1I * fHistoFinalNumberOfTracks
Distribution of the number of tracks before the track selection.
TProfile * fProfileFourParticleCorrelations
<2>_{j,-j} for j = 1..6. (6 bins)
TProfile * fProfileSixParticleCorrelations
<4>_{j,k,-j,-k} for j = 2..6, k = 1..j-1. (15 bins, cross-check purpose)
TComplex CalculateRecursion(Int_t n, Int_t *harmonic, Int_t mult=1, Int_t skip=0)
virtual void AnalyseAODevent(AliAODEvent *aAODevent)
const char Option_t
Definition: External.C:48
void SetCentralityEstimation(Bool_t useVZero, Bool_t useSPD, Int_t const nBins, Double_t minCentrality, Double_t maxCentrality)
void SetEventSelection(Bool_t cutOnVertexX, Double_t minVertexX, Double_t maxVertexX, Bool_t cutOnVertexY, Double_t minVertexY, Double_t maxVertexY, Bool_t cutOnVertexZ, Double_t minVertexZ, Double_t maxVertexZ, Int_t minNumberOfTracks)
TH1D * fHistoVertexXAfterSelection
Distribution of the initial PV x-position.
bool Bool_t
Definition: External.C:53
virtual void ComputeMultiparticleCorrelations(long long numberOfParticles, Double_t angles[], Double_t pWeights[])
Bool_t ApplyTrackSelection(Double_t momentum, Double_t pseudorapidity, Int_t NclustersInTPC, Double_t TPCchiSquare, Double_t xyDCA, Double_t zDCA)
void SetQAHistoForEventSelection(Int_t HNOTbins, Double_t HNOTmax)