AliPhysics  d497547 (d497547)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskMultiparticleCorrelations.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 flow analysis with *
18  * multi-particle correlations *
19  * *
20  * author: Ante Bilandzic *
21  * (abilandzic@gmail.com) *
22  ***************************************/
23 
24 #include "Riostream.h"
25 #include "AliFlowEventSimple.h"
28 #include "AliLog.h"
29 
30 using std::cout;
31 using std::endl;
32 
34 
35 //================================================================================================================
36 
38  AliAnalysisTaskSE(name),
39  fEvent(NULL),
40  fMPC(NULL),
41  fHistList(NULL),
42  fUseInternalFlags(kFALSE),
43  fMinNoRPs(-44),
44  fMaxNoRPs(-44),
45  fExactNoRPs(-44),
46  fAnalysisTag(""),
47  fDumpThePoints(kFALSE),
48  fMaxNoEventsPerFile(100),
49  fSelectRandomlyRPs(kFALSE),
50  fnSelectedRandomlyRPs(-44),
51  fFillControlHistograms(kFALSE),
52  fFillKinematicsHist(kFALSE),
53  fFillMultDistributionsHist(kFALSE),
54  fFillMultCorrelationsHist(kFALSE),
55  fSkipSomeIntervals(kFALSE),
56  fCalculateQvector(kFALSE),
57  fCalculateDiffQvectors(kFALSE),
58  fProduction(""),
59  fCalculateCorrelations(kFALSE),
60  fCalculateIsotropic(kFALSE),
61  fCalculateSame(kFALSE),
62  fSkipZeroHarmonics(kFALSE),
63  fCalculateSameIsotropic(kFALSE),
64  fCalculateAll(kFALSE),
65  fDontGoBeyond(0),
66  fCalculateOnlyForHarmonicQC(kFALSE),
67  fCalculateOnlyForSC(kFALSE),
68  fCalculateOnlyCos(kFALSE),
69  fCalculateOnlySin(kFALSE),
70  fCalculateEbECumulants(kFALSE),
71  fCrossCheckWithNestedLoops(kFALSE),
72  fCrossCheckDiffWithNestedLoops(kFALSE),
73  fCalculateStandardCandles(kFALSE),
74  fPropagateErrorSC(kTRUE),
75  fCalculateQcumulants(kFALSE),
76  fHarmonicQC(2),
77  fPropagateErrorQC(kTRUE),
78  fCalculateDiffCorrelations(kFALSE),
79  fCalculateDiffCos(kTRUE),
80  fCalculateDiffSin(kFALSE),
81  fCalculateDiffCorrelationsVsPt(kTRUE),
82  fUseDefaultBinning(kTRUE),
83  fnDiffBins(-44),
84  fRangesDiffBins(NULL),
85  fCalculateSymmetryPlanes(kFALSE),
86  fCalculateEtaGaps(kFALSE)
87  {
88  // Constructor.
89 
90  AliDebug(2,"AliAnalysisTaskMultiparticleCorrelations::AliAnalysisTaskMultiparticleCorrelations(const char *name, Bool_t useParticleWeights)");
91 
92  // Define input and output slots here
93  // Input slot #0 works with an AliFlowEventSimple
94  DefineInput(0, AliFlowEventSimple::Class());
95  // Input slot #1 is needed for the weights input file:
96  if(useParticleWeights)
97  {
98  DefineInput(1, TList::Class());
99  }
100  // Output slot #0 is reserved
101  // Output slot #1 writes into a TList container
102  DefineOutput(1, TList::Class());
103 
104  // Initialize all arrays:
105  for(Int_t rp=0;rp<2;rp++) // [RP,POI]
106  {
107  for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta]
108  {
109  fUseWeights[rp][ppe] = kFALSE;
110  fWeightsHist[rp][ppe] = NULL;
111  }
112  }
113  // For nested loops arrays:
114  fCrossCheckDiffCSCOBN[0] = 0; // cos/sin
115  fCrossCheckDiffCSCOBN[1] = 2; // correlator order
116  fCrossCheckDiffCSCOBN[2] = 4; // bin number
117  // Initialize default vaulues for fDontFill[3]:
118  fDontFill[0] = kFALSE;
119  fDontFill[1] = kFALSE;
120  fDontFill[2] = kFALSE;
121  // Initialize default binning values for fKinematicsHist[2][3]:
122  // nBins:
123  fnBins[0][0] = 360; // [RP][phi]
124  fnBins[0][1] = 1000; // [RP][pt]
125  fnBins[0][2] = 1000; // [RP][eta]
126  fnBins[1][0] = 360; // [POI][phi]
127  fnBins[1][1] = 1000; // [POI][pt]
128  fnBins[1][2] = 1000; // [POI][eta]
129  // Min:
130  fMin[0][0] = 0.; // [RP][phi]
131  fMin[0][1] = 0.; // [RP][pt]
132  fMin[0][2] = -1.; // [RP][eta]
133  fMin[1][0] = 0.; // [POI][phi]
134  fMin[1][1] = 0.; // [POI][pt]
135  fMin[1][2] = -1.; // [POI][eta]
136  // Max:
137  fMax[0][0] = TMath::TwoPi(); // [RP][phi]
138  fMax[0][1] = 10.; // [RP][pt]
139  fMax[0][2] = 1.; // [RP][eta]
140  fMax[1][0] = TMath::TwoPi(); // [POI][phi]
141  fMax[1][1] = 10.; // [POI][pt]
142  fMax[1][2] = 1.; // [POI][eta]
143  // Initialize default binning values for fMultCorrelationsHist[3]:
144  // nBins:
145  fnBinsMult[0] = 3000; // [RP]
146  fnBinsMult[1] = 3000; // [POI]
147  fnBinsMult[2] = 3000; // [REF]
148  // Min:
149  fMinMult[0] = 0.; // [RP]
150  fMinMult[1] = 0.; // [POI]
151  fMinMult[2] = 0.; // [REF]
152  // Max:
153  fMaxMult[0] = 3000.; // [RP]
154  fMaxMult[1] = 3000.; // [POI]
155  fMaxMult[2] = 3000.; // [REF]
156  // Initialize default rp, phi and eta intervals to be skipped:
157  for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta]
158  {
159  for(Int_t i=0;i<10;i++) // interval boundaries, 5 intervals, 10 boundaries TBI
160  {
161  fSkip[ppe][i] = -44.;
162  }
163  } // for(Int_t ppe=0;ppe<3;ppe++)
164 
165 } // AliAnalysisTaskMultiparticleCorrelations::AliAnalysisTaskMultiparticleCorrelations(const char *name, Bool_t useParticleWeights):
166 
167 //================================================================================================================
168 
171  fEvent(NULL),
172  fMPC(NULL),
173  fHistList(NULL),
174  fUseInternalFlags(kFALSE),
175  fMinNoRPs(-44),
176  fMaxNoRPs(-44),
177  fExactNoRPs(-44),
178  fAnalysisTag(""),
179  fDumpThePoints(kFALSE),
180  fMaxNoEventsPerFile(0),
181  fSelectRandomlyRPs(kFALSE),
182  fnSelectedRandomlyRPs(-44),
183  fFillControlHistograms(kFALSE),
184  fFillKinematicsHist(kFALSE),
185  fFillMultDistributionsHist(kFALSE),
186  fFillMultCorrelationsHist(kFALSE),
187  fSkipSomeIntervals(kFALSE),
188  fCalculateQvector(kFALSE),
189  fCalculateDiffQvectors(kFALSE),
190  fProduction(""),
191  fCalculateCorrelations(kFALSE),
192  fCalculateIsotropic(kFALSE),
193  fCalculateSame(kFALSE),
194  fSkipZeroHarmonics(kFALSE),
195  fCalculateSameIsotropic(kFALSE),
196  fCalculateAll(kFALSE),
197  fDontGoBeyond(0),
198  fCalculateOnlyForHarmonicQC(kFALSE),
199  fCalculateOnlyForSC(kFALSE),
200  fCalculateOnlyCos(kFALSE),
201  fCalculateOnlySin(kFALSE),
202  fCalculateEbECumulants(kFALSE),
203  fCrossCheckWithNestedLoops(kFALSE),
204  fCrossCheckDiffWithNestedLoops(kFALSE),
205  fCalculateStandardCandles(kFALSE),
206  fPropagateErrorSC(kFALSE),
207  fCalculateQcumulants(kFALSE),
208  fHarmonicQC(0),
209  fPropagateErrorQC(kFALSE),
210  fCalculateDiffCorrelations(kFALSE),
211  fCalculateDiffCos(kTRUE),
212  fCalculateDiffSin(kFALSE),
213  fCalculateDiffCorrelationsVsPt(kTRUE),
214  fUseDefaultBinning(kTRUE),
215  fnDiffBins(-44),
216  fRangesDiffBins(NULL),
217  fCalculateSymmetryPlanes(kFALSE),
218  fCalculateEtaGaps(kFALSE)
219  {
220  // Dummy constructor.
221 
222  AliDebug(2,"AliAnalysisTaskMultiparticleCorrelations::AliAnalysisTaskMultiparticleCorrelations()");
223 
224  // Initialize all arrays:
225  for(Int_t rp=0;rp<2;rp++) // [RP,POI]
226  {
227  for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta]
228  {
229  fUseWeights[rp][ppe] = kFALSE;
230  fWeightsHist[rp][ppe] = NULL;
231  }
232  }
233  // For nested loops arrays:
234  fCrossCheckDiffCSCOBN[0] = 0; // cos/sin
235  fCrossCheckDiffCSCOBN[1] = 2; // correlator order
236  fCrossCheckDiffCSCOBN[2] = 4; // bin number
237  // Initialize default vaulues for fDontFill[3]:
238  fDontFill[0] = kFALSE;
239  fDontFill[1] = kFALSE;
240  fDontFill[2] = kFALSE;
241  // Initialize default binning values for fKinematicsHist[2][3]:
242  // nBins:
243  fnBins[0][0] = 360; // [RP][phi]
244  fnBins[0][1] = 1000; // [RP][pt]
245  fnBins[0][2] = 1000; // [RP][eta]
246  fnBins[1][0] = 360; // [POI][phi]
247  fnBins[1][1] = 1000; // [POI][pt]
248  fnBins[1][2] = 1000; // [POI][eta]
249  // Min:
250  fMin[0][0] = 0.; // [RP][phi]
251  fMin[0][1] = 0.; // [RP][pt]
252  fMin[0][2] = -1.; // [RP][eta]
253  fMin[1][0] = 0.; // [POI][phi]
254  fMin[1][1] = 0.; // [POI][pt]
255  fMin[1][2] = -1.; // [POI][eta]
256  // Max:
257  fMax[0][0] = TMath::TwoPi(); // [RP][phi]
258  fMax[0][1] = 10.; // [RP][pt]
259  fMax[0][2] = 1.; // [RP][eta]
260  fMax[1][0] = TMath::TwoPi(); // [POI][phi]
261  fMax[1][1] = 10.; // [POI][pt]
262  fMax[1][2] = 1.; // [POI][eta]
263  // Initialize default binning values for fMultCorrelationsHist[3]:
264  // nBins:
265  fnBinsMult[0] = 3000; // [RP]
266  fnBinsMult[1] = 3000; // [POI]
267  fnBinsMult[2] = 3000; // [REF]
268  // Min:
269  fMinMult[0] = 0.; // [RP]
270  fMinMult[1] = 0.; // [POI]
271  fMinMult[2] = 0.; // [REF]
272  // Max:
273  fMaxMult[0] = 3000.; // [RP]
274  fMaxMult[1] = 3000.; // [POI]
275  fMaxMult[2] = 3000.; // [REF]
276  // Initialize default rp, phi and eta intervals to be skipped:
277  for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta]
278  {
279  for(Int_t i=0;i<10;i++) // interval boundaries, 10 boundaries at max
280  {
281  fSkip[ppe][i] = -44.;
282  }
283  } // for(Int_t ppe=0;ppe<3;ppe++)
284 
285 } // AliAnalysisTaskMultiparticleCorrelations::AliAnalysisTaskMultiparticleCorrelations():
286 
287 //================================================================================================================
288 
290 {
291  // Called at every worker node to initialize.
292 
293  AliDebug(2,"AliAnalysisTaskMultiparticleCorrelations::UserCreateOutputObjects()");
294  TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::UserCreateOutputObjects()";
295 
296  // Analyser:
298 
299  // Setters:
307  if(fDontFill[0]){fMPC->SetDontFill("RP");}
308  if(fDontFill[1]){fMPC->SetDontFill("POI");}
309  if(fDontFill[2]){fMPC->SetDontFill("REF");}
344 
345  // Weights:
346  TString type[2] = {"RP","POI"};
347  TString variable[3] = {"phi","pt","eta"};
348  for(Int_t rp=0;rp<2;rp++) // [RP,POI]
349  {
350  for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta]
351  {
352  if(fUseWeights[rp][ppe])
353  {
354  if(!fWeightsHist[rp][ppe])
355  {
356  if(fProduction.EqualTo("")){Fatal(sMethodName.Data(),"fProduction is empty, for one reason or another...");}
357  fWeightsHist[rp][ppe] = GetHistogramWithWeights(TString(Form("%s/%s",gSystem->pwd(),"weights.root")).Data(),TString(this->fName).Data(),type[rp].Data(),variable[ppe].Data(),fProduction.Data());
358  }
359  if(!fWeightsHist[rp][ppe])
360  {
361  Fatal(sMethodName.Data(),"fWeightsHist[%d][%d]",rp,ppe);
362  } else{fMPC->SetWeightsHist(fWeightsHist[rp][ppe],type[rp].Data(),variable[ppe].Data());}
363  } // if(fUseWeights[rp][ppe])
364  } // for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta]
365  } // for(Int_t rp=0;rp<2;rp++) // [RP,POI]
366 
367  // Control histos:
368  // Kinematics:
369  //TString typeKine[2] = {"RP","POI"};
370  //TString variable[3] = {"phi","pt","eta"};
371  for(Int_t rp=0;rp<2;rp++) // [RP,POI]
372  {
373  for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta]
374  {
375  fMPC->SetnBins(type[rp].Data(),variable[ppe].Data(),fnBins[rp][ppe]);
376  fMPC->SetMin(type[rp].Data(),variable[ppe].Data(),fMin[rp][ppe]);
377  fMPC->SetMax(type[rp].Data(),variable[ppe].Data(),fMax[rp][ppe]);
378  } // for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta]
379  } // for(Int_t rp=0;rp<2;rp++) // [RP,POI]
380  // Multiplicites:
381  TString typeMult[3] = {"RP","POI","REF"};
382  for(Int_t rpr=0;rpr<3;rpr++) // [RP,POI,REF]
383  {
384  fMPC->SetnBinsMult(typeMult[rpr].Data(),fnBinsMult[rpr]);
385  fMPC->SetMinMult(typeMult[rpr].Data(),fMinMult[rpr]);
386  fMPC->SetMaxMult(typeMult[rpr].Data(),fMaxMult[rpr]);
387  } // for(Int_t rpr=0;rpr<3;rpr++) // [RP,POI,REF]
388 
389  // Intervals to skip:
391  {
392  // TBI some things are clearly hardwired here:
393  fMPC->SetIntervalsToSkip("Phi",10,fSkip[0]);
394  fMPC->SetIntervalsToSkip("Pt",10,fSkip[1]);
395  fMPC->SetIntervalsToSkip("Eta",10,fSkip[2]);
396  }
397 
398  // Initialize:
399  fMPC->Init();
400  if(fMPC->GetHistList())
401  {
403  // fHistList->Print();
404  } else
405  {
406  Printf("ERROR: Could not retrieve histogram list (MPC, Task::UserCreateOutputObjects()) !!!!");
407  }
408 
409  PostData(1,fHistList);
410 
411 } // void AliAnalysisTaskMultiparticleCorrelations::UserCreateOutputObjects()
412 
413 //================================================================================================================
414 
416 {
417  // Main loop (called for each event).
418 
419  fEvent = dynamic_cast<AliFlowEventSimple*>(GetInputData(0));
420 
421  // It's time for multi-particle correlations:
422  if(fEvent)
423  {
424  fMPC->Make(fEvent);
425  } else
426  {
427  cout<<" WARNING: No input data (MPC, Task::UserExec()) !!!!"<<endl;
428  cout<<endl;
429  }
430 
431  PostData(1,fHistList);
432 
433 } // void AliAnalysisTaskMultiparticleCorrelations::UserExec(Option_t *)
434 
435 //================================================================================================================
436 
438 {
439  // Accessing the merged output list.
440 
441  fHistList = (TList*)GetOutputData(1);
442 
444 
445  if(fHistList)
446  {
448  fMPC->Finish();
449  PostData(1,fHistList);
450  } else
451  {
452  cout<<" WARNING: fHistList is NULL (MPC, Task::Terminate()) !!!!"<<endl;
453  cout<<endl;
454  }
455 
456 } // end of void AliAnalysisTaskMultiparticleCorrelations::Terminate(Option_t *)
457 
458 //================================================================================================================
459 
460 void AliAnalysisTaskMultiparticleCorrelations::SetWeightsHist(TH1D* const hist, const char *type, const char *variable)
461 {
462  // Pass histogram holding weights from an external file to the corresponding data member.
463 
464  TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetWeightsHist(TH1D* const hist, const char *type, const char *variable)";
465 
466  // Basic protection:
467  if(!hist){Fatal(sMethodName.Data(),"hist");}
468  if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI"))){Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type);}
469  if(!(TString(variable).EqualTo("phi") || TString(variable).EqualTo("pt") || TString(variable).EqualTo("eta"))){Fatal(sMethodName.Data(),"!(TString(variable).EqualTo... variable = %s ",variable);}
470 
471  Int_t rp = 0; // [RP,POI]
472  if(TString(type).EqualTo("POI")){rp=1;}
473 
474  Int_t ppe = 0; // [phi,pt,eta]
475  if(TString(variable).EqualTo("pt")){ppe=1;}
476  if(TString(variable).EqualTo("eta")){ppe=2;}
477 
478  // Finally:
479  hist->SetDirectory(0);
480  fWeightsHist[rp][ppe] = (TH1D*)hist->Clone();
481  if(!fWeightsHist[rp][ppe]){Fatal(sMethodName.Data(),"fWeightsHist[%d][%d]",rp,ppe);}
482 
483  fUseWeights[rp][ppe] = kTRUE;
484 
485 } // void AliAnalysisTaskMultiparticleCorrelations::SetWeightsHist(TH1D* const hwh, const char *type, const char *variable)
486 
487 //================================================================================================================
488 
489 void AliAnalysisTaskMultiparticleCorrelations::SetnBins(const char *type, const char *variable, Int_t nBins)
490 {
491  // Set number of bins for histograms fKinematicsHist[2][3].
492 
493  TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetnBins(const char *type, const char *variable, Int_t nBins)";
494 
495  // Basic protection:
496  if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI")))
497  {
498  cout<<"Well, it would be better for you to use RP or POI here..."<<endl;
499  Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type);
500  }
501  if(!(TString(variable).EqualTo("phi") || TString(variable).EqualTo("pt") || TString(variable).EqualTo("eta")))
502  {
503  cout<<"phi, pt or eta, please!"<<endl;
504  Fatal(sMethodName.Data(),"!(TString(variable).EqualTo... variable = %s ",variable);
505  }
506 
507  Int_t rp = 0; // [RP,POI]
508  if(TString(type).EqualTo("POI")){rp=1;}
509 
510  Int_t ppe = 0; // [phi,pt,eta]
511  if(TString(variable).EqualTo("pt")){ppe=1;}
512  if(TString(variable).EqualTo("eta")){ppe=2;}
513 
514  fnBins[rp][ppe] = nBins;
515 
516 } // void AliAnalysisTaskMultiparticleCorrelations::SetnBins(const char *type, const char *variable, Int_t nBins)
517 
518 //=======================================================================================================================
519 
520 void AliAnalysisTaskMultiparticleCorrelations::SetMin(const char *type, const char *variable, Double_t min)
521 {
522  // Set min bin range for histograms fKinematicsHist[2][3].
523 
524  TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetMin(const char *type, const char *variable, Double_t min)";
525 
526  // Basic protection:
527  if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI")))
528  {
529  cout<<"Well, it would be better for you to use RP or POI here..."<<endl;
530  Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type);
531  }
532  if(!(TString(variable).EqualTo("phi") || TString(variable).EqualTo("pt") || TString(variable).EqualTo("eta")))
533  {
534  cout<<"phi, pt or eta, please!"<<endl;
535  Fatal(sMethodName.Data(),"!(TString(variable).EqualTo... variable = %s ",variable);
536  }
537 
538  Int_t rp = 0; // [RP,POI]
539  if(TString(type).EqualTo("POI")){rp=1;}
540 
541  Int_t ppe = 0; // [phi,pt,eta]
542  if(TString(variable).EqualTo("pt")){ppe=1;}
543  if(TString(variable).EqualTo("eta")){ppe=2;}
544 
545  fMin[rp][ppe] = min;
546 
547 } // void AliAnalysisTaskMultiparticleCorrelations::SetMin(const char *type, const char *variable, Double_t min)
548 
549 //=======================================================================================================================
550 
551 void AliAnalysisTaskMultiparticleCorrelations::SetMax(const char *type, const char *variable, Double_t max)
552 {
553  // Set max bin range for histograms fKinematicsHist[2][3].
554 
555  TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetMax(const char *type, const char *variable, Double_t max)";
556 
557  // Basic protection:
558  if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI")))
559  {
560  cout<<"Well, it would be better for you to use RP or POI here..."<<endl;
561  Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type);
562  }
563  if(!(TString(variable).EqualTo("phi") || TString(variable).EqualTo("pt") || TString(variable).EqualTo("eta")))
564  {
565  cout<<"phi, pt or eta, please!"<<endl;
566  Fatal(sMethodName.Data(),"!(TString(variable).EqualTo... variable = %s ",variable);
567  }
568 
569  Int_t rp = 0; // [RP,POI]
570  if(TString(type).EqualTo("POI")){rp=1;}
571 
572  Int_t ppe = 0; // [phi,pt,eta]
573  if(TString(variable).EqualTo("pt")){ppe=1;}
574  if(TString(variable).EqualTo("eta")){ppe=2;}
575 
576  fMax[rp][ppe] = max;
577 
578 } // void AliAnalysisTaskMultiparticleCorrelations::SetMax(const char *type, const char *variable, Double_t min)
579 
580 //=======================================================================================================================
581 
583 {
584  // Set number of bins for histograms fMultDistributionsHist[3].
585 
586  TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetnBinsMult(const char *type, Int_t nBinsMult)";
587 
588  // Basic protection:
589  if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI") || TString(type).EqualTo("REF")))
590  {
591  cout<<"Well, it would be better for you to use RP, POI or REF here..."<<endl;
592  Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type);
593  }
594 
595  Int_t rpr = 0; // [RP,POI,REF]
596  if(TString(type).EqualTo("POI")){rpr=1;}
597  else if(TString(type).EqualTo("REF")){rpr=2;}
598 
599  fnBinsMult[rpr] = nBinsMult;
600 
601 } // void AliAnalysisTaskMultiparticleCorrelations::SetnBinsMult(const char *type, Int_t nBinsMult)
602 
603 //=======================================================================================================================
604 
606 {
607  // Set min bin range for histograms fMultDistributionsHist[3].
608 
609  TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetMinMult(const char *type, Double_t minMult)";
610 
611  // Basic protection:
612  if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI") || TString(type).EqualTo("REF")))
613  {
614  cout<<"Well, it would be better for you to use RP, POI or REF here..."<<endl;
615  Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type);
616  }
617 
618  Int_t rpr = 0; // [RP,POI,REF]
619  if(TString(type).EqualTo("POI")){rpr=1;}
620  else if(TString(type).EqualTo("REF")){rpr=2;}
621 
622  fMinMult[rpr] = minMult;
623 
624 } // void AliAnalysisTaskMultiparticleCorrelations::SetMinMult(const char *type, Double_t minMult)
625 
626 //=======================================================================================================================
627 
629 {
630  // Set max bin range for histograms fMultDistributionsHist[3].
631 
632  TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetMaxMult(const char *type, Double_t maxMult)";
633 
634  // Basic protection:
635  if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI") || TString(type).EqualTo("REF")))
636  {
637  cout<<"Well, it would be better for you to use RP, POI or REF here..."<<endl;
638  Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type);
639  }
640 
641  Int_t rpr = 0; // [RP,POI,REF]
642  if(TString(type).EqualTo("POI")){rpr=1;}
643  else if(TString(type).EqualTo("REF")){rpr=2;}
644 
645  fMaxMult[rpr] = maxMult;
646 
647 } // void AliAnalysisTaskMultiparticleCorrelations::SetMaxMult(const char *type, Double_t minMult)
648 
649 //=======================================================================================================================
650 
651 void AliAnalysisTaskMultiparticleCorrelations::SetIntervalsToSkip(const char *ppe, Int_t nBoundaries, Double_t *boundaries)
652 {
653  // Set all pt, phi and eta intervals to be skipped.
654 
655  // Example usage in the steering macro (before Init()):
656  // Double_t skip[4] = {-0.1,0.2,0.8,0.9};
657  // taskMPC->SetIntervalsToSkip("Eta",4,skip);
658 
659  TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetIntervalsToSkip(const char *ppe, Int_t n, Double_t *boundaries)";
660 
661  // Basic protection:
662  if(!(TString(ppe).EqualTo("Phi") || TString(ppe).EqualTo("Pt") || TString(ppe).EqualTo("Eta")))
663  {
664  cout<<"Well, could you perhaps try to use only Phi, Pt or Eta here..."<<endl;
665  Fatal(sMethodName.Data(),"!(TString(ppe).EqualTo... type = %s ",ppe);
666  }
667 
668  if(nBoundaries>10)
669  {
670  cout<<"Maximum number of boundaries is hardwired to be 10 at the moment, sorry..."<<endl;
671  Fatal(sMethodName.Data(),"nBoundaries = %d ",nBoundaries);
672  }
673 
674  fSkipSomeIntervals = kTRUE;
675 
676  Int_t index = -44;
677  if(TString(ppe).EqualTo("Phi"))
678  {
679  index = 0;
680  }
681  else if(TString(ppe).EqualTo("Pt"))
682  {
683  index = 1;
684  }
685  else
686  {
687  index = 2;
688  }
689 
690  for(Int_t b=0;b<nBoundaries;b++) // boundaries
691  {
692  fSkip[index][b] = boundaries[b];
693  }
694 
695 } // void AliAnalysisTaskMultiparticleCorrelations::SetIntervalsToSkip(const char *ppe, Int_t n, Double_t *boundaries)
696 
697 //=======================================================================================================================
698 
700 {
701  // Set harmonics for all differential correlators.
702 
703  TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetDiffHarmonics(Int_t order, Int_t *harmonics)";
704 
705  // TBI to be finalized, along the same lines as it was done in void AliFlowAnalysisWithMultiparticleCorrelations::SetDiffHarmonics(Int_t order, Int_t *harmonics)
706  order = harmonics[0]; // TBI eliminating temporarily the warnings
707  if(order>44) harmonics[0] = -44; // TBI eliminating temporarily the warnings, the implementation of this method has to be finalized one day...
708 
709 } // void AliAnalysisTaskMultiparticleCorrelations::SetDiffHarmonics(Int_t order, Int_t *harmonics)
710 
711 //=======================================================================================================================
712 
713 
714 
715 
void SetMin(const char *type, const char *variable, Double_t min)
double Double_t
Definition: External.C:58
void SetMax(const char *type, const char *variable, Double_t max)
void SetMin(const char *type, const char *variable, Double_t min)
TSystem * gSystem
void SetWeightsHist(TH1D *const hist, const char *type, const char *variable)
void SetIntervalsToSkip(const char *ppe, Int_t n, Double_t *boundaries)
int Int_t
Definition: External.C:63
void SetnBins(const char *type, const char *variable, Int_t nBins)
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
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
void SetMax(const char *type, const char *variable, Double_t max)
const char Option_t
Definition: External.C:48
void SetIntervalsToSkip(const char *ppe, Int_t n, Double_t *boundaries)
bool Bool_t
Definition: External.C:53
void SetnBins(const char *type, const char *variable, Int_t nBins)
Double_t maxMult