]>
Commit | Line | Data |
---|---|---|
37d2f768 | 1 | /* |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. | |
3 | * See cxx source for full Copyright notice | |
4 | * $Id$ | |
5 | */ | |
6 | ||
7 | /**************************************** | |
8 | * analysis task for flow analysis with * | |
9 | * multi-particle correlations * | |
10 | * * | |
11 | * author: Ante Bilandzic * | |
12 | * (abilandzic@gmail.com) * | |
13 | ***************************************/ | |
14 | ||
15 | #ifndef ALIANALYSISTASKMULTIPARTICLECORRELATIONS_H | |
16 | #define ALIANALYSISTASKMULTIPARTICLECORRELATIONS_H | |
17 | ||
18 | #include "AliAnalysisTaskSE.h" | |
19 | #include "AliFlowAnalysisWithMultiparticleCorrelations.h" | |
20 | #include "AliFlowEventSimple.h" | |
21 | ||
22 | //================================================================================================================ | |
23 | ||
24 | class AliAnalysisTaskMultiparticleCorrelations : public AliAnalysisTaskSE{ | |
25 | public: | |
26 | AliAnalysisTaskMultiparticleCorrelations(); | |
27 | AliAnalysisTaskMultiparticleCorrelations(const char *name, Bool_t useParticleWeights=kFALSE); | |
28 | virtual ~AliAnalysisTaskMultiparticleCorrelations(){}; | |
29 | ||
30 | virtual void UserCreateOutputObjects(); | |
31 | virtual void UserExec(Option_t *option); | |
32 | virtual void Terminate(Option_t *); | |
33 | ||
7ecb5af4 | 34 | // Internal flags: |
6696a113 | 35 | void SetMinNoRPs(Int_t const min) {fUseInternalFlags = kTRUE; this->fMinNoRPs = min;}; |
7ecb5af4 | 36 | Int_t GetMinNoRPs() const {return this->fMinNoRPs;}; |
6696a113 | 37 | void SetMaxNoRPs(Int_t const max) {fUseInternalFlags = kTRUE; this->fMaxNoRPs = max;}; |
7ecb5af4 | 38 | Int_t GetMaxNoRPs() const {return this->fMaxNoRPs;}; |
6696a113 | 39 | void SetExactNoRPs(Int_t const exact) {fUseInternalFlags = kTRUE; this->fExactNoRPs = exact;}; |
7ecb5af4 | 40 | Int_t GetExactNoRPs() const {return this->fExactNoRPs;}; |
4ffd61b4 | 41 | void SetAnalysisTag(const char *at) {this->fAnalysisTag = TString(at);}; |
42 | TString GetAnalysisTag() const {return this->fAnalysisTag;}; | |
43 | void SetDumpThePoints(Bool_t const dtp, Int_t const max) {this->fDumpThePoints = dtp; this->fMaxNoEventsPerFile = max;}; | |
6696a113 | 44 | |
7ecb5af4 | 45 | // Control histograms: |
46 | void SetFillControlHistograms(Bool_t const fch) {this->fFillControlHistograms = fch;}; | |
47 | Bool_t GetFillControlHistograms() const {return this->fFillControlHistograms;}; | |
6696a113 | 48 | void SetFillKinematicsHist(Bool_t const fkh) {this->fFillKinematicsHist = fkh;}; |
49 | Bool_t GetFillKinematicsHist() const {return this->fFillKinematicsHist;}; | |
50 | void SetFillMultDistributionsHist(Bool_t const mdh) {this->fFillMultDistributionsHist = mdh;}; | |
51 | Bool_t GetFillMultDistributionsHist() const {return this->fFillMultDistributionsHist;}; | |
52 | void SetFillMultCorrelationsHist(Bool_t const mch) {this->fFillMultCorrelationsHist = mch;}; | |
53 | Bool_t GetFillMultCorrelationsHist() const {return this->fFillMultCorrelationsHist;}; | |
03823be7 | 54 | void SetDontFill(const char *type) |
55 | { | |
56 | if(TString(type).EqualTo("RP")){this->fDontFill[0] = kTRUE;} | |
57 | else if(TString(type).EqualTo("POI")){this->fDontFill[1] = kTRUE;} | |
58 | else if(TString(type).EqualTo("REF")){this->fDontFill[2] = kTRUE;} | |
59 | else{Fatal("void SetDontFill(const char *type)","type = %s ???? Allowed: RP, POI and REF.",type);} | |
60 | }; // void SetDontFill(const char *type) | |
645e447d | 61 | void SetnBins(const char *type, const char *variable, const Int_t nBins); // .cxx |
62 | void SetMin(const char *type, const char *variable, const Double_t min); // .cxx | |
63 | void SetMax(const char *type, const char *variable, const Double_t max); // .cxx | |
64 | void SetnBinsMult(const char *type, const Int_t nBinsMult); // .cxx | |
65 | void SetMinMult(const char *type, const Double_t minMult); // .cxx | |
66 | void SetMaxMult(const char *type, const Double_t maxMult); // .cxx | |
7ecb5af4 | 67 | |
68a8e667 | 68 | // Q-vectors: |
9efbd2f5 | 69 | void SetCalculateQvector(Bool_t const cqv) {this->fCalculateQvector = cqv;}; |
70 | Bool_t GetCalculateQvector() const {return this->fCalculateQvector;}; | |
68a8e667 | 71 | void SetCalculateDiffQvectors(Bool_t const cdqv) {this->fCalculateDiffQvectors = cdqv;}; |
72 | Bool_t GetCalculateDiffQvectors() const {return this->fCalculateDiffQvectors;}; | |
9efbd2f5 | 73 | |
68a8e667 | 74 | // Weights: |
75 | void SetWeightsHist(TH1D* const hist, const char *type, const char *variable); // .cxx | |
4ffd61b4 | 76 | TH1D* GetHistogramWithWeights(const char *filePath, const char *listName, const char *type, const char *variable) |
77 | { | |
791b0161 | 78 | AliFlowAnalysisWithMultiparticleCorrelations *mpc = new AliFlowAnalysisWithMultiparticleCorrelations(); |
4ffd61b4 | 79 | return mpc->GetHistogramWithWeights(filePath,listName,type,variable); |
80 | }; | |
7ecb5af4 | 81 | |
82 | // Correlations: | |
83 | void SetCalculateCorrelations(Bool_t const cc) {this->fCalculateCorrelations = cc;}; | |
84 | Bool_t GetCalculateCorrelations() const {return this->fCalculateCorrelations;}; | |
6696a113 | 85 | void SetCalculateIsotropic(Bool_t const ci) {this->fCalculateIsotropic = ci;}; |
86 | Bool_t GetCalculateIsotropic() const {return this->fCalculateIsotropic;}; | |
87 | void SetCalculateSame(Bool_t const csh) {this->fCalculateSame = csh;}; | |
88 | Bool_t GetCalculateSame() const {return this->fCalculateSame;}; | |
89 | void SetSkipZeroHarmonics(Bool_t const szh) {this->fSkipZeroHarmonics = szh;}; | |
90 | Bool_t GetSkipZeroHarmonics() const {return this->fSkipZeroHarmonics;}; | |
91 | void SetCalculateSameIsotropic(Bool_t const csi) {this->fCalculateSameIsotropic = csi;}; | |
92 | Bool_t GetCalculateSameIsotropic() const {return this->fCalculateSameIsotropic;}; | |
93 | void SetCalculateAll(Bool_t const ca) {this->fCalculateAll = ca;}; | |
94 | Bool_t GetCalculateAll() const {return this->fCalculateAll;}; | |
95 | void SetDontGoBeyond(Int_t const dgb) {this->fDontGoBeyond = dgb;}; | |
96 | Int_t GetDontGoBeyond() const {return this->fDontGoBeyond;}; | |
68a8e667 | 97 | void SetCalculateOnlyForHarmonicQC(Bool_t const cofhqc) {this->fCalculateOnlyForHarmonicQC = cofhqc;}; |
98 | Bool_t GetCalculateOnlyForHarmonicQC() const {return this->fCalculateOnlyForHarmonicQC;}; | |
99 | void SetCalculateOnlyForSC(Bool_t const cofsc) {this->fCalculateOnlyForSC = cofsc;}; | |
100 | Bool_t GetCalculateOnlyForSC() const {return this->fCalculateOnlyForSC;}; | |
101 | void SetCalculateOnlyCos(Bool_t const coc) {this->fCalculateOnlyCos = coc;}; | |
102 | Bool_t GetCalculateOnlyCos() const {return this->fCalculateOnlyCos;}; | |
103 | void SetCalculateOnlySin(Bool_t const cos) {this->fCalculateOnlySin = cos;}; | |
104 | Bool_t GetCalculateOnlySin() const {return this->fCalculateOnlySin;}; | |
105 | ||
106 | // Event-by-event cumulants: | |
107 | void SetCalculateEbECumulants(Bool_t const cebec) {this->fCalculateEbECumulants = cebec;}; | |
108 | Bool_t GetCalculateEbECumulants() const {return this->fCalculateEbECumulants;}; | |
7ecb5af4 | 109 | |
110 | // Nested loops: | |
111 | void SetCrossCheckWithNestedLoops(Bool_t const ccwnl) {this->fCrossCheckWithNestedLoops = ccwnl;}; | |
112 | Bool_t GetCrossCheckWithNestedLoops() const {return this->fCrossCheckWithNestedLoops;}; | |
68a8e667 | 113 | void SetCrossCheckDiffWithNestedLoops(Bool_t const ccdwnl) {this->fCrossCheckDiffWithNestedLoops = ccdwnl;}; |
114 | Bool_t GetCrossCheckDiffWithNestedLoops() const {return this->fCrossCheckDiffWithNestedLoops;}; | |
dd96bd81 | 115 | void SetCrossCheckDiffCSCOBN(Int_t const cs, Int_t const co, Int_t const bn) |
116 | { | |
117 | this->fCrossCheckDiffCSCOBN[0] = cs; // cos/sin | |
118 | this->fCrossCheckDiffCSCOBN[1] = co; // correlator order [1p,2p,3p,4p] | |
119 | this->fCrossCheckDiffCSCOBN[2] = bn; // bin number | |
120 | }; | |
121 | ||
7ecb5af4 | 122 | // 'Standard candles': |
123 | void SetCalculateStandardCandles(Bool_t const csc) {this->fCalculateStandardCandles = csc;}; | |
124 | Bool_t GetCalculateStandardCandles() const {return this->fCalculateStandardCandles;}; | |
68a8e667 | 125 | void SetPropagateErrorSC(Bool_t const pesc) {this->fPropagateErrorSC = pesc;}; |
126 | Bool_t GetPropagateErrorSC() const {return this->fPropagateErrorSC;}; | |
127 | ||
128 | // Q-cumulants: | |
129 | void SetCalculateQcumulants(Bool_t const cqc) {this->fCalculateQcumulants = cqc;}; | |
130 | Bool_t GetCalculateQcumulants() const {return this->fCalculateQcumulants;}; | |
131 | void SetHarmonicQC(Int_t const hqc) {this->fHarmonicQC = hqc;}; | |
132 | Int_t GetHarmonicQC() const {return this->fHarmonicQC;}; | |
133 | void SetPropagateErrorQC(Bool_t const peqc) {this->fPropagateErrorQC = peqc;}; | |
134 | Bool_t GetPropagateErrorQC() const {return this->fPropagateErrorQC;}; | |
135 | ||
136 | // Differential correlations: | |
137 | void SetCalculateDiffCorrelations(Bool_t const cdc) {this->fCalculateDiffCorrelations = cdc;}; | |
138 | Bool_t GetCalculateDiffCorrelations() const {return this->fCalculateDiffCorrelations;}; | |
dd96bd81 | 139 | void SetDiffHarmonics(Int_t order, Int_t *harmonics); // see implementation in .cxx file |
140 | void SetCalculateDiffCos(Bool_t const cdc) {this->fCalculateDiffCos = cdc;}; | |
141 | Bool_t GetCalculateDiffCos() const {return this->fCalculateDiffCos;}; | |
142 | void SetCalculateDiffSin(Bool_t const cds) {this->fCalculateDiffSin = cds;}; | |
143 | Bool_t GetCalculateDiffSin() const {return this->fCalculateDiffSin;}; | |
144 | void SetCalculateDiffCorrelationsVsPt(Bool_t const cdcvspt) {this->fCalculateDiffCorrelationsVsPt = cdcvspt;}; | |
145 | Bool_t GetCalculateDiffCorrelationsVsPt() const {return this->fCalculateDiffCorrelationsVsPt;}; | |
146 | void SetUseDefaultBinning(Bool_t const udb) {this->fUseDefaultBinning = udb;}; | |
147 | Bool_t GetUseDefaultBinning() const {return this->fUseDefaultBinning;}; | |
148 | void SetnDiffBins(Int_t const ndb) {this->fnDiffBins = ndb;}; | |
149 | Int_t GetnDiffBins() const {return this->fnDiffBins;}; | |
150 | void SetRangesDiffBins(Double_t* const rdb) {this->fRangesDiffBins = rdb;}; | |
151 | Double_t* GetRangesDiffBins() const {return this->fRangesDiffBins;}; | |
37d2f768 | 152 | |
153 | private: | |
154 | AliAnalysisTaskMultiparticleCorrelations(const AliAnalysisTaskMultiparticleCorrelations& aatqc); | |
155 | AliAnalysisTaskMultiparticleCorrelations& operator=(const AliAnalysisTaskMultiparticleCorrelations& aatqc); | |
156 | ||
157 | AliFlowEventSimple *fEvent; // the input event | |
158 | AliFlowAnalysisWithMultiparticleCorrelations *fMPC; // "multi-particle correlations" object | |
159 | TList *fHistList; // base list to hold all output object (a.k.a. grandmother of all lists) | |
7ecb5af4 | 160 | |
161 | // Internal flags: | |
4ffd61b4 | 162 | Bool_t fUseInternalFlags; // use internal flags (automatically set if some internal flag is used) |
163 | Int_t fMinNoRPs; // minimum number of RPs required for the analysis | |
164 | Int_t fMaxNoRPs; // maximum number of RPs allowed for the analysis | |
165 | Int_t fExactNoRPs; // exact (randomly shuffled) number of RPs selected for the analysis | |
166 | TString fAnalysisTag; // tag internally this analysis | |
167 | Bool_t fDumpThePoints; // dump the data points into the external file | |
168 | Int_t fMaxNoEventsPerFile; // maximum number of events to be dumped in a single file | |
7ecb5af4 | 169 | |
170 | // Control histograms: | |
6696a113 | 171 | Bool_t fFillControlHistograms; // fill or not control histograms (by default they are filled) |
172 | Bool_t fFillKinematicsHist; // fill or not fKinematicsHist[2][3] | |
173 | Bool_t fFillMultDistributionsHist; // fill or not TH1D *fMultDistributionsHist[3] | |
174 | Bool_t fFillMultCorrelationsHist; // fill or not TH2D *fMultCorrelationsHist[3] | |
03823be7 | 175 | Bool_t fDontFill[3]; // don't fill control histograms [0=RP,1=POI,2=REF] |
4ffd61b4 | 176 | Int_t fnBins[2][3]; // [RP,POI][phi,pt,eta], corresponds to fKinematicsHist[2][3] |
177 | Double_t fMin[2][3]; // [RP,POI][phi,pt,eta], corresponds to fKinematicsHist[2][3] | |
178 | Double_t fMax[2][3]; // [RP,POI][phi,pt,eta], corresponds to fKinematicsHist[2][3] | |
179 | Int_t fnBinsMult[3]; // [RP,POI,REF], corresponds to fMultDistributionsHist[3] | |
180 | Double_t fMinMult[3]; // [RP,POI,REF], corresponds to fMultDistributionsHist[3] | |
181 | Double_t fMaxMult[3]; // [RP,POI,REF], corresponds to fMultDistributionsHist[3] | |
7ecb5af4 | 182 | |
68a8e667 | 183 | // Q-vectors: |
184 | Bool_t fCalculateQvector; // to calculate or not to calculate Q-vector components, that's a Boolean... | |
185 | Bool_t fCalculateDiffQvectors; // to calculate or not to calculate p- and q-vector components, that's a Boolean... | |
9efbd2f5 | 186 | |
7ecb5af4 | 187 | // Weights: |
68a8e667 | 188 | Bool_t fUseWeights[2][3]; // use weights [RP,POI][phi,pt,eta] |
189 | TH1D *fWeightsHist[2][3]; // histograms holding weights [RP,POI][phi,pt,eta] | |
7ecb5af4 | 190 | |
191 | // Correlations: | |
68a8e667 | 192 | Bool_t fCalculateCorrelations; // calculate and store correlations, or perhaps not, if the weather is bad... |
193 | Bool_t fCalculateIsotropic; // calculate only isotropic correlations | |
194 | Bool_t fCalculateSame; // calculate only 'same abs harmonics' correlations TBI | |
195 | Bool_t fSkipZeroHarmonics; // skip correlations which have some of the harmonicc equal to zero | |
196 | Bool_t fCalculateSameIsotropic; // calculate all isotropic correlations in 'same abs harmonic' TBI this can be implemented better | |
197 | Bool_t fCalculateAll; // calculate all possible correlations | |
198 | Int_t fDontGoBeyond; // do not go beyond fDontGoBeyond-p correlators | |
199 | Bool_t fCalculateOnlyForHarmonicQC; // calculate only isotropic correlations in |fHarmonicQC| | |
200 | Bool_t fCalculateOnlyForSC; // calculate only correlations needed for 'standard candles' | |
201 | Bool_t fCalculateOnlyCos; // calculate only 'cos' correlations | |
202 | Bool_t fCalculateOnlySin; // calculate only 'sin' correlations | |
203 | ||
204 | // Event-by-event cumulants: | |
205 | Bool_t fCalculateEbECumulants; // calculate and store event-by-event cumulants | |
7ecb5af4 | 206 | |
207 | // Nested loops: | |
68a8e667 | 208 | Bool_t fCrossCheckWithNestedLoops; // cross-check results with nested loops |
209 | Bool_t fCrossCheckDiffWithNestedLoops; // cross-check differential correlators with nested loops | |
dd96bd81 | 210 | Int_t fCrossCheckDiffCSCOBN[3]; // [0=cos,1=sin][1p,2p,...,4p][binNo] |
7ecb5af4 | 211 | |
212 | // 'Standard candles': | |
213 | Bool_t fCalculateStandardCandles; // calculate and store 'standard candles' | |
68a8e667 | 214 | Bool_t fPropagateErrorSC; // propagate and store error for 'standard candles' |
215 | ||
216 | // Q-cumulants: | |
217 | Bool_t fCalculateQcumulants; // calculate and store Q-cumulants | |
218 | Int_t fHarmonicQC; // calculate Q-cumulants in this harmonic (default is 2) | |
219 | Bool_t fPropagateErrorQC; // propagate and store error for Q-cumulants | |
220 | ||
221 | // Differential correlations: | |
dd96bd81 | 222 | Bool_t fCalculateDiffCorrelations; // calculate and store differential correlations |
223 | Bool_t fCalculateDiffCos; // calculate and store differential cosine correlations (kTRUE by default) | |
224 | Bool_t fCalculateDiffSin; // calculate and store differential sinus correlations (kFALSE by default) | |
225 | Bool_t fCalculateDiffCorrelationsVsPt; // calculate differential correlations vs pt (default), or vs eta | |
226 | Bool_t fUseDefaultBinning; // use default binning in pt or in eta | |
227 | Int_t fnDiffBins; // number of differential bins in pt or in eta (when non-default binning is used) | |
228 | Double_t *fRangesDiffBins; // ranges for differential bins in pt or in eta (when non-default binning is used) | |
229 | ||
9efbd2f5 | 230 | ClassDef(AliAnalysisTaskMultiparticleCorrelations,1); |
37d2f768 | 231 | |
232 | }; | |
233 | ||
234 | //================================================================================================================ | |
235 | ||
236 | #endif | |
237 | ||
238 | ||
239 | ||
240 | ||
241 | ||
242 | ||
243 | ||
244 | ||
245 | ||
246 | ||
247 |