]>
Commit | Line | Data |
---|---|---|
37d2f768 | 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" | |
26 | #include "AliAnalysisTaskMultiparticleCorrelations.h" | |
27 | #include "AliFlowAnalysisWithMultiparticleCorrelations.h" | |
28 | #include "AliLog.h" | |
29 | ||
30 | using std::cout; | |
31 | using std::endl; | |
32 | ||
33 | ClassImp(AliAnalysisTaskMultiparticleCorrelations) | |
34 | ||
35 | //================================================================================================================ | |
36 | ||
37 | AliAnalysisTaskMultiparticleCorrelations::AliAnalysisTaskMultiparticleCorrelations(const char *name, Bool_t useParticleWeights): | |
38 | AliAnalysisTaskSE(name), | |
39 | fEvent(NULL), | |
40 | fMPC(NULL), | |
7ecb5af4 | 41 | fHistList(NULL), |
6696a113 | 42 | fUseInternalFlags(kFALSE), |
7ecb5af4 | 43 | fMinNoRPs(-44), |
44 | fMaxNoRPs(-44), | |
45 | fExactNoRPs(-44), | |
9efbd2f5 | 46 | fFillControlHistograms(kFALSE), |
47 | fFillKinematicsHist(kFALSE), | |
48 | fFillMultDistributionsHist(kFALSE), | |
49 | fFillMultCorrelationsHist(kFALSE), | |
50 | fCalculateQvector(kFALSE), | |
68a8e667 | 51 | fCalculateDiffQvectors(kFALSE), |
6696a113 | 52 | fCalculateCorrelations(kFALSE), |
53 | fCalculateIsotropic(kFALSE), | |
54 | fCalculateSame(kFALSE), | |
55 | fSkipZeroHarmonics(kFALSE), | |
56 | fCalculateSameIsotropic(kFALSE), | |
57 | fCalculateAll(kFALSE), | |
58 | fDontGoBeyond(0), | |
68a8e667 | 59 | fCalculateOnlyForHarmonicQC(kFALSE), |
60 | fCalculateOnlyForSC(kFALSE), | |
61 | fCalculateOnlyCos(kFALSE), | |
62 | fCalculateOnlySin(kFALSE), | |
63 | fCalculateEbECumulants(kFALSE), | |
7ecb5af4 | 64 | fCrossCheckWithNestedLoops(kFALSE), |
68a8e667 | 65 | fCrossCheckDiffWithNestedLoops(kFALSE), |
66 | fCalculateStandardCandles(kFALSE), | |
67 | fPropagateErrorSC(kTRUE), | |
68 | fCalculateQcumulants(kFALSE), | |
69 | fHarmonicQC(2), | |
70 | fPropagateErrorQC(kTRUE), | |
dd96bd81 | 71 | fCalculateDiffCorrelations(kFALSE), |
72 | fCalculateDiffCos(kTRUE), | |
73 | fCalculateDiffSin(kFALSE), | |
74 | fCalculateDiffCorrelationsVsPt(kTRUE), | |
75 | fUseDefaultBinning(kTRUE), | |
76 | fnDiffBins(-44), | |
77 | fRangesDiffBins(NULL) | |
37d2f768 | 78 | { |
79 | // Constructor. | |
80 | ||
81 | AliDebug(2,"AliAnalysisTaskMultiparticleCorrelations::AliAnalysisTaskMultiparticleCorrelations(const char *name, Bool_t useParticleWeights)"); | |
37d2f768 | 82 | |
68a8e667 | 83 | // Define input and output slots here |
84 | // Input slot #0 works with an AliFlowEventSimple | |
85 | DefineInput(0, AliFlowEventSimple::Class()); | |
86 | // Input slot #1 is needed for the weights input file: | |
87 | if(useParticleWeights) | |
88 | { | |
89 | DefineInput(1, TList::Class()); | |
90 | } | |
91 | // Output slot #0 is reserved | |
92 | // Output slot #1 writes into a TList container | |
93 | DefineOutput(1, TList::Class()); | |
94 | ||
95 | // Initialize all arrays: | |
96 | for(Int_t rp=0;rp<2;rp++) // [RP,POI] | |
97 | { | |
98 | for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta] | |
99 | { | |
100 | fUseWeights[rp][ppe] = kFALSE; | |
101 | fWeightsHist[rp][ppe] = NULL; | |
102 | } | |
103 | } | |
dd96bd81 | 104 | // For nested loops arrays: |
105 | fCrossCheckDiffCSCOBN[0] = 0; // cos/sin | |
106 | fCrossCheckDiffCSCOBN[1] = 2; // correlator order | |
107 | fCrossCheckDiffCSCOBN[2] = 4; // bin number | |
645e447d | 108 | // Initialize default binning values for fKinematicsHist[2][3]: |
109 | // nBins: | |
110 | fnBins[0][0] = 360; // [RP][phi] | |
111 | fnBins[0][1] = 1000; // [RP][pt] | |
112 | fnBins[0][2] = 1000; // [RP][eta] | |
113 | fnBins[1][0] = 360; // [POI][phi] | |
114 | fnBins[1][1] = 1000; // [POI][pt] | |
115 | fnBins[1][2] = 1000; // [POI][eta] | |
116 | // Min: | |
117 | fMin[0][0] = 0.; // [RP][phi] | |
118 | fMin[0][1] = 0.; // [RP][pt] | |
119 | fMin[0][2] = -1.; // [RP][eta] | |
120 | fMin[1][0] = 0.; // [POI][phi] | |
121 | fMin[1][1] = 0.; // [POI][pt] | |
122 | fMin[1][2] = -1.; // [POI][eta] | |
123 | // Max: | |
124 | fMax[0][0] = TMath::TwoPi(); // [RP][phi] | |
125 | fMax[0][1] = 10.; // [RP][pt] | |
126 | fMax[0][2] = 1.; // [RP][eta] | |
127 | fMax[1][0] = TMath::TwoPi(); // [POI][phi] | |
128 | fMax[1][1] = 10.; // [POI][pt] | |
129 | fMax[1][2] = 1.; // [POI][eta] | |
130 | // Initialize default binning values for fMultCorrelationsHist[3]: | |
131 | // nBins: | |
132 | fnBinsMult[0] = 3000; // [RP] | |
133 | fnBinsMult[1] = 3000; // [POI] | |
134 | fnBinsMult[2] = 3000; // [REF] | |
135 | // Min: | |
136 | fMinMult[0] = 0.; // [RP] | |
137 | fMinMult[1] = 0.; // [POI] | |
138 | fMinMult[2] = 0.; // [REF] | |
139 | // Max: | |
140 | fMaxMult[0] = 3000.; // [RP] | |
141 | fMaxMult[1] = 3000.; // [POI] | |
142 | fMaxMult[2] = 3000.; // [REF] | |
dd96bd81 | 143 | |
37d2f768 | 144 | } // AliAnalysisTaskMultiparticleCorrelations::AliAnalysisTaskMultiparticleCorrelations(const char *name, Bool_t useParticleWeights): |
145 | ||
146 | //================================================================================================================ | |
147 | ||
148 | AliAnalysisTaskMultiparticleCorrelations::AliAnalysisTaskMultiparticleCorrelations(): | |
149 | AliAnalysisTaskSE(), | |
150 | fEvent(NULL), | |
151 | fMPC(NULL), | |
7ecb5af4 | 152 | fHistList(NULL), |
6696a113 | 153 | fUseInternalFlags(kFALSE), |
7ecb5af4 | 154 | fMinNoRPs(-44), |
155 | fMaxNoRPs(-44), | |
156 | fExactNoRPs(-44), | |
157 | fFillControlHistograms(kFALSE), | |
9efbd2f5 | 158 | fFillKinematicsHist(kFALSE), |
159 | fFillMultDistributionsHist(kFALSE), | |
160 | fFillMultCorrelationsHist(kFALSE), | |
161 | fCalculateQvector(kFALSE), | |
68a8e667 | 162 | fCalculateDiffQvectors(kFALSE), |
7ecb5af4 | 163 | fCalculateCorrelations(kFALSE), |
6696a113 | 164 | fCalculateIsotropic(kFALSE), |
165 | fCalculateSame(kFALSE), | |
166 | fSkipZeroHarmonics(kFALSE), | |
167 | fCalculateSameIsotropic(kFALSE), | |
168 | fCalculateAll(kFALSE), | |
169 | fDontGoBeyond(0), | |
68a8e667 | 170 | fCalculateOnlyForHarmonicQC(kFALSE), |
171 | fCalculateOnlyForSC(kFALSE), | |
172 | fCalculateOnlyCos(kFALSE), | |
173 | fCalculateOnlySin(kFALSE), | |
174 | fCalculateEbECumulants(kFALSE), | |
7ecb5af4 | 175 | fCrossCheckWithNestedLoops(kFALSE), |
68a8e667 | 176 | fCrossCheckDiffWithNestedLoops(kFALSE), |
177 | fCalculateStandardCandles(kFALSE), | |
178 | fPropagateErrorSC(kFALSE), | |
179 | fCalculateQcumulants(kFALSE), | |
180 | fHarmonicQC(0), | |
181 | fPropagateErrorQC(kFALSE), | |
dd96bd81 | 182 | fCalculateDiffCorrelations(kFALSE), |
183 | fCalculateDiffCos(kTRUE), | |
184 | fCalculateDiffSin(kFALSE), | |
185 | fCalculateDiffCorrelationsVsPt(kTRUE), | |
186 | fUseDefaultBinning(kTRUE), | |
187 | fnDiffBins(-44), | |
188 | fRangesDiffBins(NULL) | |
37d2f768 | 189 | { |
190 | // Dummy constructor. | |
191 | ||
192 | AliDebug(2,"AliAnalysisTaskMultiparticleCorrelations::AliAnalysisTaskMultiparticleCorrelations()"); | |
193 | ||
68a8e667 | 194 | // Initialize all arrays: |
195 | for(Int_t rp=0;rp<2;rp++) // [RP,POI] | |
196 | { | |
197 | for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta] | |
198 | { | |
199 | fUseWeights[rp][ppe] = kFALSE; | |
200 | fWeightsHist[rp][ppe] = NULL; | |
201 | } | |
202 | } | |
dd96bd81 | 203 | // For nested loops arrays: |
204 | fCrossCheckDiffCSCOBN[0] = 0; // cos/sin | |
205 | fCrossCheckDiffCSCOBN[1] = 2; // correlator order | |
206 | fCrossCheckDiffCSCOBN[2] = 4; // bin number | |
645e447d | 207 | // Initialize default binning values for fKinematicsHist[2][3]: |
208 | // nBins: | |
209 | fnBins[0][0] = 360; // [RP][phi] | |
210 | fnBins[0][1] = 1000; // [RP][pt] | |
211 | fnBins[0][2] = 1000; // [RP][eta] | |
212 | fnBins[1][0] = 360; // [POI][phi] | |
213 | fnBins[1][1] = 1000; // [POI][pt] | |
214 | fnBins[1][2] = 1000; // [POI][eta] | |
215 | // Min: | |
216 | fMin[0][0] = 0.; // [RP][phi] | |
217 | fMin[0][1] = 0.; // [RP][pt] | |
218 | fMin[0][2] = -1.; // [RP][eta] | |
219 | fMin[1][0] = 0.; // [POI][phi] | |
220 | fMin[1][1] = 0.; // [POI][pt] | |
221 | fMin[1][2] = -1.; // [POI][eta] | |
222 | // Max: | |
223 | fMax[0][0] = TMath::TwoPi(); // [RP][phi] | |
224 | fMax[0][1] = 10.; // [RP][pt] | |
225 | fMax[0][2] = 1.; // [RP][eta] | |
226 | fMax[1][0] = TMath::TwoPi(); // [POI][phi] | |
227 | fMax[1][1] = 10.; // [POI][pt] | |
228 | fMax[1][2] = 1.; // [POI][eta] | |
229 | // Initialize default binning values for fMultCorrelationsHist[3]: | |
230 | // nBins: | |
231 | fnBinsMult[0] = 3000; // [RP] | |
232 | fnBinsMult[1] = 3000; // [POI] | |
233 | fnBinsMult[2] = 3000; // [REF] | |
234 | // Min: | |
235 | fMinMult[0] = 0.; // [RP] | |
236 | fMinMult[1] = 0.; // [POI] | |
237 | fMinMult[2] = 0.; // [REF] | |
238 | // Max: | |
239 | fMaxMult[0] = 3000.; // [RP] | |
240 | fMaxMult[1] = 3000.; // [POI] | |
241 | fMaxMult[2] = 3000.; // [REF] | |
37d2f768 | 242 | |
243 | } // AliAnalysisTaskMultiparticleCorrelations::AliAnalysisTaskMultiparticleCorrelations(): | |
244 | ||
245 | //================================================================================================================ | |
246 | ||
247 | void AliAnalysisTaskMultiparticleCorrelations::UserCreateOutputObjects() | |
248 | { | |
249 | // Called at every worker node to initialize. | |
250 | ||
251 | AliDebug(2,"AliAnalysisTaskMultiparticleCorrelations::UserCreateOutputObjects()"); | |
68a8e667 | 252 | TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::UserCreateOutputObjects()"; |
37d2f768 | 253 | |
254 | // Analyser: | |
255 | fMPC = new AliFlowAnalysisWithMultiparticleCorrelations(); | |
256 | ||
257 | // Setters: | |
6696a113 | 258 | if(fUseInternalFlags){fMPC->SetMinNoRPs(fMinNoRPs);} |
259 | if(fUseInternalFlags){fMPC->SetMaxNoRPs(fMaxNoRPs);} | |
260 | if(fUseInternalFlags){fMPC->SetExactNoRPs(fExactNoRPs);} | |
7ecb5af4 | 261 | fMPC->SetFillControlHistograms(fFillControlHistograms); |
6696a113 | 262 | fMPC->SetFillKinematicsHist(fFillKinematicsHist); |
263 | fMPC->SetFillMultDistributionsHist(fFillMultDistributionsHist); | |
264 | fMPC->SetFillMultCorrelationsHist(fFillMultCorrelationsHist); | |
9efbd2f5 | 265 | fMPC->SetCalculateQvector(fCalculateQvector); |
68a8e667 | 266 | fMPC->SetCalculateDiffQvectors(fCalculateDiffQvectors); |
7ecb5af4 | 267 | fMPC->SetCalculateCorrelations(fCalculateCorrelations); |
6696a113 | 268 | fMPC->SetCalculateIsotropic(fCalculateIsotropic); |
269 | fMPC->SetCalculateSame(fCalculateSame); | |
270 | fMPC->SetSkipZeroHarmonics(fSkipZeroHarmonics); | |
271 | fMPC->SetCalculateSameIsotropic(fCalculateSameIsotropic); | |
272 | fMPC->SetCalculateAll(fCalculateAll); | |
273 | fMPC->SetDontGoBeyond(fDontGoBeyond); | |
68a8e667 | 274 | fMPC->SetCalculateOnlyForHarmonicQC(fCalculateOnlyForHarmonicQC); |
275 | fMPC->SetCalculateOnlyForSC(fCalculateOnlyForSC); | |
276 | fMPC->SetCalculateOnlyCos(fCalculateOnlyCos); | |
277 | fMPC->SetCalculateOnlySin(fCalculateOnlySin); | |
278 | fMPC->SetCalculateEbECumulants(fCalculateEbECumulants); | |
7ecb5af4 | 279 | fMPC->SetCrossCheckWithNestedLoops(fCrossCheckWithNestedLoops); |
68a8e667 | 280 | fMPC->SetCrossCheckDiffWithNestedLoops(fCrossCheckDiffWithNestedLoops); |
dd96bd81 | 281 | fMPC->SetCrossCheckDiffCSCOBN(fCrossCheckDiffCSCOBN[0],fCrossCheckDiffCSCOBN[1],fCrossCheckDiffCSCOBN[2]); |
7ecb5af4 | 282 | fMPC->SetCalculateStandardCandles(fCalculateStandardCandles); |
68a8e667 | 283 | fMPC->SetPropagateErrorSC(fPropagateErrorSC); |
284 | fMPC->SetCalculateQcumulants(fCalculateQcumulants); | |
285 | fMPC->SetHarmonicQC(fHarmonicQC); | |
286 | fMPC->SetPropagateErrorQC(fPropagateErrorQC); | |
287 | fMPC->SetCalculateDiffCorrelations(fCalculateDiffCorrelations); | |
dd96bd81 | 288 | fMPC->SetCalculateDiffCos(fCalculateDiffCos); |
289 | fMPC->SetCalculateDiffSin(fCalculateDiffSin); | |
290 | fMPC->SetCalculateDiffCorrelationsVsPt(fCalculateDiffCorrelationsVsPt); | |
291 | fMPC->SetUseDefaultBinning(fUseDefaultBinning); | |
292 | fMPC->SetnDiffBins(fnDiffBins); | |
293 | fMPC->SetRangesDiffBins(fRangesDiffBins); | |
294 | ||
68a8e667 | 295 | // Weights: |
296 | TString type[2] = {"RP","POI"}; | |
297 | TString variable[3] = {"phi","pt","eta"}; | |
298 | for(Int_t rp=0;rp<2;rp++) // [RP,POI] | |
299 | { | |
300 | for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta] | |
301 | { | |
302 | if(fUseWeights[rp][ppe]) | |
303 | { | |
304 | if(!fWeightsHist[rp][ppe]){Fatal(sMethodName.Data(),"fWeightsHist[%d][%d]",rp,ppe);} | |
305 | else{fMPC->SetWeightsHist(fWeightsHist[rp][ppe],type[rp].Data(),variable[ppe].Data());} | |
306 | } | |
307 | } // for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta] | |
308 | } // for(Int_t rp=0;rp<2;rp++) // [RP,POI] | |
37d2f768 | 309 | |
645e447d | 310 | // Control histos: |
311 | // Kinematics: | |
312 | //TString typeKine[2] = {"RP","POI"}; | |
313 | //TString variable[3] = {"phi","pt","eta"}; | |
314 | for(Int_t rp=0;rp<2;rp++) // [RP,POI] | |
315 | { | |
316 | for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta] | |
317 | { | |
318 | fMPC->SetnBins(type[rp].Data(),variable[ppe].Data(),fnBins[rp][ppe]); | |
319 | fMPC->SetMin(type[rp].Data(),variable[ppe].Data(),fMin[rp][ppe]); | |
320 | fMPC->SetMax(type[rp].Data(),variable[ppe].Data(),fMax[rp][ppe]); | |
321 | } // for(Int_t ppe=0;ppe<3;ppe++) // [phi,pt,eta] | |
322 | } // for(Int_t rp=0;rp<2;rp++) // [RP,POI] | |
323 | // Multiplicites: | |
324 | TString typeMult[3] = {"RP","POI","REF"}; | |
325 | for(Int_t rpr=0;rpr<3;rpr++) // [RP,POI,REF] | |
326 | { | |
327 | fMPC->SetnBinsMult(typeMult[rpr].Data(),fnBinsMult[rpr]); | |
328 | fMPC->SetMinMult(typeMult[rpr].Data(),fMinMult[rpr]); | |
329 | fMPC->SetMaxMult(typeMult[rpr].Data(),fMaxMult[rpr]); | |
330 | } // for(Int_t rpr=0;rpr<3;rpr++) // [RP,POI,REF] | |
331 | ||
37d2f768 | 332 | // Initialize: |
333 | fMPC->Init(); | |
334 | if(fMPC->GetHistList()) | |
335 | { | |
336 | fHistList = fMPC->GetHistList(); | |
337 | // fHistList->Print(); | |
338 | } else | |
339 | { | |
340 | Printf("ERROR: Could not retrieve histogram list (MPC, Task::UserCreateOutputObjects()) !!!!"); | |
341 | } | |
342 | ||
343 | PostData(1,fHistList); | |
344 | ||
345 | } // void AliAnalysisTaskMultiparticleCorrelations::UserCreateOutputObjects() | |
346 | ||
347 | //================================================================================================================ | |
348 | ||
349 | void AliAnalysisTaskMultiparticleCorrelations::UserExec(Option_t *) | |
350 | { | |
351 | // Main loop (called for each event). | |
352 | ||
353 | fEvent = dynamic_cast<AliFlowEventSimple*>(GetInputData(0)); | |
354 | ||
355 | // It's time for multi-particle correlations: | |
356 | if(fEvent) | |
357 | { | |
358 | fMPC->Make(fEvent); | |
359 | } else | |
360 | { | |
361 | cout<<" WARNING: No input data (MPC, Task::UserExec()) !!!!"<<endl; | |
362 | cout<<endl; | |
363 | } | |
364 | ||
365 | PostData(1,fHistList); | |
366 | ||
367 | } // void AliAnalysisTaskMultiparticleCorrelations::UserExec(Option_t *) | |
368 | ||
369 | //================================================================================================================ | |
370 | ||
371 | void AliAnalysisTaskMultiparticleCorrelations::Terminate(Option_t *) | |
372 | { | |
373 | // Accessing the merged output list. | |
374 | ||
375 | fHistList = (TList*)GetOutputData(1); | |
376 | ||
377 | fMPC = new AliFlowAnalysisWithMultiparticleCorrelations(); | |
378 | ||
379 | if(fHistList) | |
380 | { | |
381 | fMPC->GetOutputHistograms(fHistList); | |
382 | fMPC->Finish(); | |
383 | PostData(1,fHistList); | |
384 | } else | |
385 | { | |
386 | cout<<" WARNING: fHistList is NULL (MPC, Task::Terminate()) !!!!"<<endl; | |
387 | cout<<endl; | |
388 | } | |
389 | ||
390 | } // end of void AliAnalysisTaskMultiparticleCorrelations::Terminate(Option_t *) | |
391 | ||
392 | //================================================================================================================ | |
393 | ||
68a8e667 | 394 | void AliAnalysisTaskMultiparticleCorrelations::SetWeightsHist(TH1D* const hist, const char *type, const char *variable) |
395 | { | |
396 | // Pass histogram holding weights from an external file to the corresponding data member. | |
397 | ||
398 | TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetWeightsHist(TH1D* const hist, const char *type, const char *variable)"; | |
399 | ||
400 | // Basic protection: | |
401 | if(!hist){Fatal(sMethodName.Data(),"hist");} | |
402 | if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI"))){Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type);} | |
403 | if(!(TString(variable).EqualTo("phi") || TString(variable).EqualTo("pt") || TString(variable).EqualTo("eta"))){Fatal(sMethodName.Data(),"!(TString(variable).EqualTo... variable = %s ",variable);} | |
404 | ||
405 | Int_t rp = 0; // [RP,POI] | |
406 | if(TString(type).EqualTo("POI")){rp=1;} | |
407 | ||
408 | Int_t ppe = 0; // [phi,pt,eta] | |
409 | if(TString(variable).EqualTo("pt")){ppe=1;} | |
410 | if(TString(variable).EqualTo("eta")){ppe=2;} | |
411 | ||
412 | // Finally: | |
413 | hist->SetDirectory(0); | |
414 | fWeightsHist[rp][ppe] = (TH1D*)hist->Clone(); | |
415 | if(!fWeightsHist[rp][ppe]){Fatal(sMethodName.Data(),"fWeightsHist[%d][%d]",rp,ppe);} | |
416 | ||
417 | fUseWeights[rp][ppe] = kTRUE; | |
418 | ||
419 | } // void AliAnalysisTaskMultiparticleCorrelations::SetWeightsHist(TH1D* const hwh, const char *type, const char *variable) | |
420 | ||
421 | //================================================================================================================ | |
422 | ||
645e447d | 423 | void AliAnalysisTaskMultiparticleCorrelations::SetnBins(const char *type, const char *variable, const Int_t nBins) |
424 | { | |
425 | // Set number of bins for histograms fKinematicsHist[2][3]. | |
426 | ||
427 | TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetnBins(const char *type, const char *variable, const Int_t nBins)"; | |
428 | ||
429 | // Basic protection: | |
430 | if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI"))) | |
431 | { | |
432 | cout<<"Well, it would be better for you to use RP or POI here..."<<endl; | |
433 | Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type); | |
434 | } | |
435 | if(!(TString(variable).EqualTo("phi") || TString(variable).EqualTo("pt") || TString(variable).EqualTo("eta"))) | |
436 | { | |
437 | cout<<"phi, pt or eta, please!"<<endl; | |
438 | Fatal(sMethodName.Data(),"!(TString(variable).EqualTo... variable = %s ",variable); | |
439 | } | |
440 | ||
441 | Int_t rp = 0; // [RP,POI] | |
442 | if(TString(type).EqualTo("POI")){rp=1;} | |
443 | ||
444 | Int_t ppe = 0; // [phi,pt,eta] | |
445 | if(TString(variable).EqualTo("pt")){ppe=1;} | |
446 | if(TString(variable).EqualTo("eta")){ppe=2;} | |
447 | ||
448 | fnBins[rp][ppe] = nBins; | |
449 | ||
450 | } // void AliAnalysisTaskMultiparticleCorrelations::SetnBins(const char *type, const char *variable, const Int_t nBins) | |
451 | ||
452 | //======================================================================================================================= | |
453 | ||
454 | void AliAnalysisTaskMultiparticleCorrelations::SetMin(const char *type, const char *variable, const Double_t min) | |
455 | { | |
456 | // Set min bin range for histograms fKinematicsHist[2][3]. | |
457 | ||
458 | TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetMin(const char *type, const char *variable, const Double_t min)"; | |
459 | ||
460 | // Basic protection: | |
461 | if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI"))) | |
462 | { | |
463 | cout<<"Well, it would be better for you to use RP or POI here..."<<endl; | |
464 | Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type); | |
465 | } | |
466 | if(!(TString(variable).EqualTo("phi") || TString(variable).EqualTo("pt") || TString(variable).EqualTo("eta"))) | |
467 | { | |
468 | cout<<"phi, pt or eta, please!"<<endl; | |
469 | Fatal(sMethodName.Data(),"!(TString(variable).EqualTo... variable = %s ",variable); | |
470 | } | |
471 | ||
472 | Int_t rp = 0; // [RP,POI] | |
473 | if(TString(type).EqualTo("POI")){rp=1;} | |
474 | ||
475 | Int_t ppe = 0; // [phi,pt,eta] | |
476 | if(TString(variable).EqualTo("pt")){ppe=1;} | |
477 | if(TString(variable).EqualTo("eta")){ppe=2;} | |
478 | ||
479 | fMin[rp][ppe] = min; | |
480 | ||
481 | } // void AliAnalysisTaskMultiparticleCorrelations::SetMin(const char *type, const char *variable, const Double_t min) | |
482 | ||
483 | //======================================================================================================================= | |
484 | ||
485 | void AliAnalysisTaskMultiparticleCorrelations::SetMax(const char *type, const char *variable, const Double_t max) | |
486 | { | |
487 | // Set max bin range for histograms fKinematicsHist[2][3]. | |
488 | ||
489 | TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetMax(const char *type, const char *variable, const Double_t max)"; | |
490 | ||
491 | // Basic protection: | |
492 | if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI"))) | |
493 | { | |
494 | cout<<"Well, it would be better for you to use RP or POI here..."<<endl; | |
495 | Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type); | |
496 | } | |
497 | if(!(TString(variable).EqualTo("phi") || TString(variable).EqualTo("pt") || TString(variable).EqualTo("eta"))) | |
498 | { | |
499 | cout<<"phi, pt or eta, please!"<<endl; | |
500 | Fatal(sMethodName.Data(),"!(TString(variable).EqualTo... variable = %s ",variable); | |
501 | } | |
502 | ||
503 | Int_t rp = 0; // [RP,POI] | |
504 | if(TString(type).EqualTo("POI")){rp=1;} | |
505 | ||
506 | Int_t ppe = 0; // [phi,pt,eta] | |
507 | if(TString(variable).EqualTo("pt")){ppe=1;} | |
508 | if(TString(variable).EqualTo("eta")){ppe=2;} | |
509 | ||
510 | fMax[rp][ppe] = max; | |
511 | ||
512 | } // void AliAnalysisTaskMultiparticleCorrelations::SetMax(const char *type, const char *variable, const Double_t min) | |
513 | ||
514 | //======================================================================================================================= | |
515 | ||
516 | void AliAnalysisTaskMultiparticleCorrelations::SetnBinsMult(const char *type, const Int_t nBinsMult) | |
517 | { | |
518 | // Set number of bins for histograms fMultDistributionsHist[3]. | |
519 | ||
520 | TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetnBinsMult(const char *type, const Int_t nBinsMult)"; | |
521 | ||
522 | // Basic protection: | |
523 | if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI") || TString(type).EqualTo("REF"))) | |
524 | { | |
525 | cout<<"Well, it would be better for you to use RP, POI or REF here..."<<endl; | |
526 | Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type); | |
527 | } | |
528 | ||
529 | Int_t rpr = 0; // [RP,POI,REF] | |
530 | if(TString(type).EqualTo("POI")){rpr=1;} | |
531 | else if(TString(type).EqualTo("REF")){rpr=2;} | |
532 | ||
533 | fnBinsMult[rpr] = nBinsMult; | |
534 | ||
535 | } // void AliAnalysisTaskMultiparticleCorrelations::SetnBinsMult(const char *type, const Int_t nBinsMult) | |
536 | ||
537 | //======================================================================================================================= | |
538 | ||
539 | void AliAnalysisTaskMultiparticleCorrelations::SetMinMult(const char *type, const Double_t minMult) | |
540 | { | |
541 | // Set min bin range for histograms fMultDistributionsHist[3]. | |
542 | ||
543 | TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetMinMult(const char *type, const Double_t minMult)"; | |
544 | ||
545 | // Basic protection: | |
546 | if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI") || TString(type).EqualTo("REF"))) | |
547 | { | |
548 | cout<<"Well, it would be better for you to use RP, POI or REF here..."<<endl; | |
549 | Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type); | |
550 | } | |
551 | ||
552 | Int_t rpr = 0; // [RP,POI,REF] | |
553 | if(TString(type).EqualTo("POI")){rpr=1;} | |
554 | else if(TString(type).EqualTo("REF")){rpr=2;} | |
555 | ||
556 | fMinMult[rpr] = minMult; | |
557 | ||
558 | } // void AliAnalysisTaskMultiparticleCorrelations::SetMinMult(const char *type const Double_t minMult) | |
559 | ||
560 | //======================================================================================================================= | |
561 | ||
562 | void AliAnalysisTaskMultiparticleCorrelations::SetMaxMult(const char *type, const Double_t maxMult) | |
563 | { | |
564 | // Set max bin range for histograms fMultDistributionsHist[3]. | |
565 | ||
566 | TString sMethodName = "void AliAnalysisTaskMultiparticleCorrelations::SetMaxMult(const char *type, const Double_t maxMult)"; | |
567 | ||
568 | // Basic protection: | |
569 | if(!(TString(type).EqualTo("RP") || TString(type).EqualTo("POI") || TString(type).EqualTo("REF"))) | |
570 | { | |
571 | cout<<"Well, it would be better for you to use RP, POI or REF here..."<<endl; | |
572 | Fatal(sMethodName.Data(),"!(TString(type).EqualTo... type = %s ",type); | |
573 | } | |
574 | ||
575 | Int_t rpr = 0; // [RP,POI,REF] | |
576 | if(TString(type).EqualTo("POI")){rpr=1;} | |
577 | else if(TString(type).EqualTo("REF")){rpr=2;} | |
578 | ||
579 | fMaxMult[rpr] = maxMult; | |
580 | ||
581 | } // void AliAnalysisTaskMultiparticleCorrelations::SetMaxMult(const char *type, const Double_t minMult) | |
582 | ||
583 | //======================================================================================================================= | |
584 | ||
585 | ||
586 | ||
68a8e667 | 587 | |
588 |