AliPhysics  48852ec (48852ec)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskMultiparticleCorrelations.h
Go to the documentation of this file.
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"
20 #include "AliFlowEventSimple.h"
21 
22 //================================================================================================================
23 
25  public:
27  AliAnalysisTaskMultiparticleCorrelations(const char *name, Bool_t useParticleWeights=kFALSE);
29 
30  virtual void UserCreateOutputObjects();
31  virtual void UserExec(Option_t *option);
32  virtual void Terminate(Option_t *);
33 
34  // Internal flags:
35  void SetMinNoRPs(Int_t min) {fUseInternalFlags = kTRUE; this->fMinNoRPs = min;};
36  Int_t GetMinNoRPs() const {return this->fMinNoRPs;};
37  void SetMaxNoRPs(Int_t max) {fUseInternalFlags = kTRUE; this->fMaxNoRPs = max;};
38  Int_t GetMaxNoRPs() const {return this->fMaxNoRPs;};
39  void SetExactNoRPs(Int_t exact) {fUseInternalFlags = kTRUE; this->fExactNoRPs = exact;};
40  Int_t GetExactNoRPs() const {return this->fExactNoRPs;};
41  void SetAnalysisTag(const char *at) {this->fAnalysisTag = TString(at);};
42  TString GetAnalysisTag() const {return this->fAnalysisTag;};
43  void SetDumpThePoints(Bool_t dtp, Int_t max) {this->fDumpThePoints = dtp; this->fMaxNoEventsPerFile = max;};
44  void SetSelectRandomlyRPs(Int_t nSelectedRandomlyRPs) {this->fSelectRandomlyRPs = kTRUE; this->fnSelectedRandomlyRPs = nSelectedRandomlyRPs;}
45 
46  // Control histograms:
55  void SetDontFill(const char *type)
56  {
57  if(TString(type).EqualTo("RP")){this->fDontFill[0] = kTRUE;}
58  else if(TString(type).EqualTo("POI")){this->fDontFill[1] = kTRUE;}
59  else if(TString(type).EqualTo("REF")){this->fDontFill[2] = kTRUE;}
60  else{Fatal("void SetDontFill(const char *type)","type = %s ???? Allowed: RP, POI and REF.",type);}
61  }; // void SetDontFill(const char *type)
62  void SetnBins(const char *type, const char *variable, Int_t nBins); // .cxx
63  void SetMin(const char *type, const char *variable, Double_t min); // .cxx
64  void SetMax(const char *type, const char *variable, Double_t max); // .cxx
65  void SetnBinsMult(const char *type, Int_t nBinsMult); // .cxx
66  void SetMinMult(const char *type, Double_t minMult); // .cxx
67  void SetMaxMult(const char *type, Double_t maxMult); // .cxx
68  void SetIntervalsToSkip(const char *ppe, Int_t n, Double_t *boundaries); // .cxx
69 
70  // Q-vectors:
71  void SetCalculateQvector(Bool_t cqv) {this->fCalculateQvector = cqv;};
72  Bool_t GetCalculateQvector() const {return this->fCalculateQvector;};
75 
76  // Weights:
77  void SetWeightsHist(TH1D* const hist, const char *type, const char *variable); // .cxx
78  TH1D* GetHistogramWithWeights(const char *filePath, const char *listName, const char *type, const char *variable, const char *production)
79  {
80  fProduction = TString(production);
82  return mpc->GetHistogramWithWeights(filePath,listName,type,variable,production);
83  };
84 
85  // Correlations:
90  void SetCalculateSame(Bool_t csh) {this->fCalculateSame = csh;};
91  Bool_t GetCalculateSame() const {return this->fCalculateSame;};
96  void SetCalculateAll(Bool_t ca) {this->fCalculateAll = ca;};
97  Bool_t GetCalculateAll() const {return this->fCalculateAll;};
98  void SetDontGoBeyond(Int_t dgb) {this->fDontGoBeyond = dgb;};
99  Int_t GetDontGoBeyond() const {return this->fDontGoBeyond;};
102  void SetCalculateOnlyForSC(Bool_t cofsc) {this->fCalculateOnlyForSC = cofsc;};
104  void SetCalculateOnlyCos(Bool_t coc) {this->fCalculateOnlyCos = coc;};
106  void SetCalculateOnlySin(Bool_t cos) {this->fCalculateOnlySin = cos;};
108 
109  // Event-by-event cumulants:
112 
113  // Nested loops:
119  {
120  this->fCrossCheckDiffCSCOBN[0] = cs; // cos/sin
121  this->fCrossCheckDiffCSCOBN[1] = co; // correlator order [1p,2p,3p,4p]
122  this->fCrossCheckDiffCSCOBN[2] = bn; // bin number
123  };
124 
125  // 'Standard candles':
128  void SetPropagateErrorSC(Bool_t pesc) {this->fPropagateErrorSC = pesc;};
130 
131  // Q-cumulants:
134  void SetHarmonicQC(Int_t hqc) {this->fHarmonicQC = hqc;};
135  Int_t GetHarmonicQC() const {return this->fHarmonicQC;};
136  void SetPropagateErrorQC(Bool_t peqc) {this->fPropagateErrorQC = peqc;};
138 
139  // Differential correlations:
142  void SetDiffHarmonics(Int_t order, Int_t *harmonics); // TBI only skeleton is implemented in .cxx file
143  void SetCalculateDiffCos(Bool_t cdc) {this->fCalculateDiffCos = cdc;};
145  void SetCalculateDiffSin(Bool_t cds) {this->fCalculateDiffSin = cds;};
151  void SetnDiffBins(Int_t ndb) {this->fnDiffBins = ndb;};
152  Int_t GetnDiffBins() const {return this->fnDiffBins;};
153  void SetRangesDiffBins(Double_t* const rdb) {this->fRangesDiffBins = rdb;};
154  Double_t* GetRangesDiffBins() const {return this->fRangesDiffBins;};
155 
156  // Symmetry plane correlations:
159 
160  // Eta gaps:
161  void SetCalculateEtaGaps(Bool_t ceg) {this->fCalculateEtaGaps = ceg;};
163 
164  private:
167 
168  AliFlowEventSimple *fEvent; // the input event
169  AliFlowAnalysisWithMultiparticleCorrelations *fMPC; // "multi-particle correlations" object
170  TList *fHistList; // base list to hold all output object (a.k.a. grandmother of all lists)
171 
172  // Internal flags:
173  Bool_t fUseInternalFlags; // use internal flags (automatically set if some internal flag is used)
174  Int_t fMinNoRPs; // minimum number of RPs required for the analysis
175  Int_t fMaxNoRPs; // maximum number of RPs allowed for the analysis
176  Int_t fExactNoRPs; // exact (randomly shuffled) number of RPs selected for the analysis
177  TString fAnalysisTag; // tag internally this analysis
178  Bool_t fDumpThePoints; // dump the data points into the external file
179  Int_t fMaxNoEventsPerFile; // maximum number of events to be dumped in a single file
180  Bool_t fSelectRandomlyRPs; // enable random shuffling to estimate 'fake flow'
181  Int_t fnSelectedRandomlyRPs; // how many RPs will be taken for the analysis after random shuffling?
182 
183  // Control histograms:
184  Bool_t fFillControlHistograms; // fill or not control histograms (by default they are filled)
185  Bool_t fFillKinematicsHist; // fill or not fKinematicsHist[2][3]
186  Bool_t fFillMultDistributionsHist; // fill or not TH1D *fMultDistributionsHist[3]
187  Bool_t fFillMultCorrelationsHist; // fill or not TH2D *fMultCorrelationsHist[3]
188  Bool_t fDontFill[3]; // don't fill control histograms [0=RP,1=POI,2=REF]
189  Int_t fnBins[2][3]; // [RP,POI][phi,pt,eta], corresponds to fKinematicsHist[2][3]
190  Double_t fMin[2][3]; // [RP,POI][phi,pt,eta], corresponds to fKinematicsHist[2][3]
191  Double_t fMax[2][3]; // [RP,POI][phi,pt,eta], corresponds to fKinematicsHist[2][3]
192  Int_t fnBinsMult[3]; // [RP,POI,REF], corresponds to fMultDistributionsHist[3]
193  Double_t fMinMult[3]; // [RP,POI,REF], corresponds to fMultDistributionsHist[3]
194  Double_t fMaxMult[3]; // [RP,POI,REF], corresponds to fMultDistributionsHist[3]
195  Bool_t fSkipSomeIntervals; // skip intervals in phi, pt and eta
196  Double_t fSkip[3][10]; // determine intervals in phi, pt and eta to be skipped. TBI hardwired is max 5 intervals. TBI promote this eventually to AFTC class
197 
198  // Q-vectors:
199  Bool_t fCalculateQvector; // to calculate or not to calculate Q-vector components, that's a Boolean...
200  Bool_t fCalculateDiffQvectors; // to calculate or not to calculate p- and q-vector components, that's a Boolean...
201 
202  // Weights:
203  Bool_t fUseWeights[2][3]; // use weights [RP,POI][phi,pt,eta]
204  TH1D *fWeightsHist[2][3]; // histograms holding weights [RP,POI][phi,pt,eta]
205  TString fProduction; // TBI most likely an overkill
206 
207  // Correlations:
208  Bool_t fCalculateCorrelations; // calculate and store correlations, or perhaps not, if the weather is bad...
209  Bool_t fCalculateIsotropic; // calculate only isotropic correlations
210  Bool_t fCalculateSame; // calculate only 'same abs harmonics' correlations TBI
211  Bool_t fSkipZeroHarmonics; // skip correlations which have some of the harmonicc equal to zero
212  Bool_t fCalculateSameIsotropic; // calculate all isotropic correlations in 'same abs harmonic' TBI this can be implemented better
213  Bool_t fCalculateAll; // calculate all possible correlations
214  Int_t fDontGoBeyond; // do not go beyond fDontGoBeyond-p correlators
215  Bool_t fCalculateOnlyForHarmonicQC; // calculate only isotropic correlations in |fHarmonicQC|
216  Bool_t fCalculateOnlyForSC; // calculate only correlations needed for 'standard candles'
217  Bool_t fCalculateOnlyCos; // calculate only 'cos' correlations
218  Bool_t fCalculateOnlySin; // calculate only 'sin' correlations
219 
220  // Event-by-event cumulants:
221  Bool_t fCalculateEbECumulants; // calculate and store event-by-event cumulants
222 
223  // Nested loops:
224  Bool_t fCrossCheckWithNestedLoops; // cross-check results with nested loops
225  Bool_t fCrossCheckDiffWithNestedLoops; // cross-check differential correlators with nested loops
226  Int_t fCrossCheckDiffCSCOBN[3]; // [0=cos,1=sin][1p,2p,...,4p][binNo]
227 
228  // 'Standard candles':
229  Bool_t fCalculateStandardCandles; // calculate and store 'standard candles'
230  Bool_t fPropagateErrorSC; // propagate and store error for 'standard candles'
231 
232  // Q-cumulants:
233  Bool_t fCalculateQcumulants; // calculate and store Q-cumulants
234  Int_t fHarmonicQC; // calculate Q-cumulants in this harmonic (default is 2)
235  Bool_t fPropagateErrorQC; // propagate and store error for Q-cumulants
236 
237  // Differential correlations:
238  Bool_t fCalculateDiffCorrelations; // calculate and store differential correlations
239  Bool_t fCalculateDiffCos; // calculate and store differential cosine correlations (kTRUE by default)
240  Bool_t fCalculateDiffSin; // calculate and store differential sinus correlations (kFALSE by default)
241  Bool_t fCalculateDiffCorrelationsVsPt; // calculate differential correlations vs pt (default), or vs eta
242  Bool_t fUseDefaultBinning; // use default binning in pt or in eta
243  Int_t fnDiffBins; // number of differential bins in pt or in eta (when non-default binning is used)
244  Double_t *fRangesDiffBins; // ranges for differential bins in pt or in eta (when non-default binning is used)
245 
246  // Symmetry plane correlations:
247  Bool_t fCalculateSymmetryPlanes; // calculate correlations between symmetry planes
248 
249  // Eta gaps:
250  Bool_t fCalculateEtaGaps; // calculate correlations with eta gaps
251 
253 
254 };
255 
256 //================================================================================================================
257 
258 #endif
259 
260 
261 
262 
263 
264 
265 
266 
267 
268 
269 
AliAnalysisTaskMultiparticleCorrelations & operator=(const AliAnalysisTaskMultiparticleCorrelations &aatqc)
const Color_t cc[]
Definition: DrawKs.C:1
void SetMin(const char *type, const char *variable, Double_t min)
double Double_t
Definition: External.C:58
ClassDef(AliAnalysisTaskMultiparticleCorrelations, 6)
TH1D * GetHistogramWithWeights(const char *filePath, const char *listName, const char *type, const char *variable, const char *production)
void SetIntervalsToSkip(const char *ppe, Int_t n, Double_t *boundaries)
int Int_t
Definition: External.C:63
TH1D * GetHistogramWithWeights(const char *filePath, const char *listName, const char *type, const char *variable, const char *production)
Definition: External.C:212
void SetWeightsHist(TH1D *const hist, const char *type, const char *variable)
AliFlowAnalysisWithMultiparticleCorrelations * fMPC
void SetMax(const char *type, const char *variable, Double_t max)
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
void SetnBins(const char *type, const char *variable, Int_t nBins)
Double_t maxMult