uncertainties back in, incase of weights still behaving funny
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowTasks / AliAnalysisTaskCumulants.cxx
CommitLineData
924fafb7 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
2188af53 16/**************************************
17 * analysis task for cumulant method *
18 * *
19 * authors: Naomi van der Kolk *
20 * (kolk@nikhef.nl) *
21 * Raimond Snellings *
22 * (snelling@nikhef.nl) *
23 * Ante Bilandzic *
24 * (anteb@nikhef.nl) *
25 * ***********************************/
26
27#include "Riostream.h"
924fafb7 28#include "TChain.h"
29#include "TTree.h"
30#include "TFile.h"
aaebd73d 31#include "TList.h"
32#include "TH1.h"
aaebd73d 33#include "TProfile.h"
34#include "TProfile2D.h"
35#include "TProfile3D.h"
924fafb7 36
aaebd73d 37#include "AliAnalysisTask.h"
38#include "AliAnalysisDataSlot.h"
39#include "AliAnalysisDataContainer.h"
924fafb7 40#include "AliAnalysisManager.h"
41
42#include "AliESDEvent.h"
43#include "AliESDInputHandler.h"
44
45#include "AliAODEvent.h"
46#include "AliAODInputHandler.h"
47
48#include "AliMCEventHandler.h"
49#include "AliMCEvent.h"
50
29b61d43 51#include "AliCFManager.h"
aaebd73d 52
924fafb7 53#include "AliAnalysisTaskCumulants.h"
54#include "AliFlowEventSimpleMaker.h"
55#include "AliFlowAnalysisWithCumulants.h"
aaebd73d 56#include "AliFlowCumuConstants.h"
57#include "AliFlowCommonConstants.h"
813a4157 58#include "AliFlowCommonHist.h"
aaebd73d 59#include "AliFlowCommonHistResults.h"
aaebd73d 60#include "AliCumulantsFunctions.h"
924fafb7 61
924fafb7 62ClassImp(AliAnalysisTaskCumulants)
63
2188af53 64//================================================================================================================
65
e5e75b58 66AliAnalysisTaskCumulants::AliAnalysisTaskCumulants(const char *name, Bool_t on, Bool_t useWeights):
2188af53 67 AliAnalysisTask(name,""),
68 fESD(NULL),
69 fAOD(NULL),
52021ae2 70 fGFC(NULL),//Generating Function Cumulant (GFC) analysis object
2188af53 71 fEventMaker(NULL),
72 fAnalysisType("ESD"),
73 fCFManager1(NULL),
74 fCFManager2(NULL),
6d4fa5d3 75 fListHistos(NULL),
76 fQAInt(NULL),
77 fQADiff(NULL),
e5e75b58 78 fQA(on),
79 fUseWeights(useWeights),
80 fUsePhiWeights(kFALSE),
81 fUsePtWeights(kFALSE),
82 fUseEtaWeights(kFALSE),
83 fListWeights(NULL)
924fafb7 84{
fe488c8a 85//constructor
52021ae2 86 cout<<"AliAnalysisTaskCumulants::AliAnalysisTaskCumulants(const char *name)"<<endl;
fe488c8a 87
88 // Define input and output slots here
89 // Input slot #0 works with a TChain
2188af53 90 DefineInput(0, TChain::Class());
e5e75b58 91
92 // Input slot #1 is needed for the weights
93 if(useWeights)
94 {
95 DefineInput(1, TList::Class());
96 }
fe488c8a 97
98 // Output slot #0 writes into a TList container
2188af53 99 DefineOutput(0, TList::Class());
fe488c8a 100 if(on)
101 {
102 DefineOutput(1, TList::Class());
103 DefineOutput(2, TList::Class());
104 }
924fafb7 105}
2188af53 106
107AliAnalysisTaskCumulants::AliAnalysisTaskCumulants():
108 fESD(NULL),
109 fAOD(NULL),
52021ae2 110 fGFC(NULL),//Generating Function Cumulant (GFC) analysis object
2188af53 111 fEventMaker(NULL),
112 fAnalysisType("ESD"),
113 fCFManager1(NULL),
114 fCFManager2(NULL),
6d4fa5d3 115 fListHistos(NULL),
116 fQAInt(NULL),
117 fQADiff(NULL),
e5e75b58 118 fQA(kFALSE),
119 fUseWeights(kFALSE),
120 fUsePhiWeights(kFALSE),
121 fUsePtWeights(kFALSE),
122 fUseEtaWeights(kFALSE),
123 fListWeights(NULL)
aaebd73d 124{
2188af53 125 //dummy constructor
126 cout<<"AliAnalysisTaskCumulants::AliAnalysisTaskCumulants()"<<endl;
127}
128
129//================================================================================================================
924fafb7 130
924fafb7 131void AliAnalysisTaskCumulants::ConnectInputData(Option_t *)
132{
2188af53 133 //connect ESD or AOD (called once)
134 cout<<"AliAnalysisTaskCumulants::ConnectInputData(Option_t *)"<<endl;
135
136 TTree* tree = dynamic_cast<TTree*> (GetInputData(0));
137 if (!tree)
138 {
139 Printf("ERROR: Could not read chain from input slot 0");
140 }
141 else
142 {
143 //disable all branches and enable only the needed ones
144 if (fAnalysisType == "MC") {
145 // we want to process only MC
924fafb7 146 tree->SetBranchStatus("*", kFALSE);
147
148 AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
149
150 if (!esdH) {
151 Printf("ERROR: Could not get ESDInputHandler");
152 } else {
153 fESD = esdH->GetEvent();
154 }
155 }
156 else if (fAnalysisType == "ESD" || fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" ) {
157 tree->SetBranchStatus("*", kFALSE);
158 tree->SetBranchStatus("Tracks.*", kTRUE);
159
160 AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
161
162 if (!esdH) {
163 Printf("ERROR: Could not get ESDInputHandler");
164 } else
165 fESD = esdH->GetEvent();
166 }
167 else if (fAnalysisType == "AOD") {
168 AliAODInputHandler *aodH = dynamic_cast<AliAODInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
169
170 if (!aodH) {
171 Printf("ERROR: Could not get AODInputHandler");
172 }
173 else {
174 fAOD = aodH->GetEvent();
175 }
176 }
177 else {
178 Printf("Wrong analysis type: Only ESD, ESDMC0, ESDMC1, AOD and MC types are allowed!");
179
180 }
181 }
182}
183
2188af53 184//================================================================================================================
185
924fafb7 186void AliAnalysisTaskCumulants::CreateOutputObjects()
187{
2188af53 188 //called at every worker node to initialize
189 cout<<"AliAnalysisTaskCumulants::CreateOutputObjects()"<<endl;
924fafb7 190
aaebd73d 191
2188af53 192 //OpenFile(0);
193
194
195 if(!(fAnalysisType == "AOD" || fAnalysisType == "ESD" || fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" || fAnalysisType == "MC"))
196 {
197 cout<<"WRONG ANALYSIS TYPE! only ESD, ESDMC0, ESDMC1, AOD and MC are allowed."<<endl;
198 exit(1);
199 }
200
201 //event maker
202 fEventMaker = new AliFlowEventSimpleMaker();
203
204 //analyser
52021ae2 205 fGFC = new AliFlowAnalysisWithCumulants();
e5e75b58 206 fGFC->Init();
207
208 //weights:
209 if(fUseWeights)
210 {
211 //pass the flags to class:
212 if(fUsePhiWeights) fGFC->SetUsePhiWeights(fUsePhiWeights);
213 if(fUsePtWeights) fGFC->SetUsePtWeights(fUsePtWeights);
214 if(fUseEtaWeights) fGFC->SetUseEtaWeights(fUseEtaWeights);
215 //get data from input slot #1 which is used for weights:
216 if(GetNinputs()==2)
217 {
218 fListWeights = (TList*)GetInputData(1);
219 }
220 //pass the list with weights to class:
221 if(fListWeights) fGFC->SetWeightsList(fListWeights);
222 }
2188af53 223
52021ae2 224 if(fGFC->GetHistList())
2188af53 225 {
52021ae2 226 fListHistos = fGFC->GetHistList();
2188af53 227 //fListHistos->Print();
aaebd73d 228 }
2188af53 229 else
230 {
231 Printf("ERROR: Could not retrieve histogram list");
232 }
2188af53 233}
234
235//================================================================================================================
924fafb7 236
924fafb7 237void AliAnalysisTaskCumulants::Exec(Option_t *)
238{
2188af53 239 //main loop (called for each event)
240 if (fAnalysisType == "MC") {
924fafb7 241 // Process MC truth, therefore we receive the AliAnalysisManager and ask it for the AliMCEventHandler
242 // This handler can return the current MC event
243
244 AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
245 if (!eventHandler) {
246 Printf("ERROR: Could not retrieve MC event handler");
247 return;
248 }
249
250 AliMCEvent* mcEvent = eventHandler->MCEvent();
251 if (!mcEvent) {
252 Printf("ERROR: Could not retrieve MC event");
253 return;
254 }
255
a58fb92e 256
aaebd73d 257 fCFManager1->SetEventInfo(mcEvent);
258 fCFManager2->SetEventInfo(mcEvent);
924fafb7 259
a58fb92e 260 Printf("MC particles: %d", mcEvent->GetNumberOfTracks());
261
aaebd73d 262 //cumulant analysis
263 AliFlowEventSimple* fEvent = fEventMaker->FillTracks(mcEvent,fCFManager1,fCFManager2);
52021ae2 264 fGFC->Make(fEvent);
924fafb7 265 delete fEvent;
266 }
267 else if (fAnalysisType == "ESD") {
268 if (!fESD) {
269 Printf("ERROR: fESD not available");
270 return;
271 }
272 Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
273
2188af53 274 //cumulant analysis
b6cd16a9 275 AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,fCFManager1,fCFManager2);//cuts
276 //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD);
277
52021ae2 278 fGFC->Make(fEvent);
924fafb7 279 delete fEvent;
280 }
281 else if (fAnalysisType == "ESDMC0") {
282 if (!fESD) {
283 Printf("ERROR: fESD not available");
284 return;
285 }
286 Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
287
288 AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
289 if (!eventHandler) {
290 Printf("ERROR: Could not retrieve MC event handler");
291 return;
292 }
293
294 AliMCEvent* mcEvent = eventHandler->MCEvent();
295 if (!mcEvent) {
296 Printf("ERROR: Could not retrieve MC event");
297 return;
298 }
299
aaebd73d 300 fCFManager1->SetEventInfo(mcEvent);
301 fCFManager2->SetEventInfo(mcEvent);
924fafb7 302
2188af53 303 //cumulant analysis
aaebd73d 304 AliFlowEventSimple* fEvent=NULL;
305 if (fAnalysisType == "ESDMC0") {
306 fEvent = fEventMaker->FillTracks(fESD, mcEvent, fCFManager1, fCFManager2, 0); //0 = kine from ESD, 1 = kine from MC
307 } else if (fAnalysisType == "ESDMC1") {
308 fEvent = fEventMaker->FillTracks(fESD, mcEvent, fCFManager1, fCFManager2, 1); //0 = kine from ESD, 1 = kine from MC
309 }
52021ae2 310 fGFC->Make(fEvent);
924fafb7 311 delete fEvent;
312 //delete mcEvent;
313 }
aaebd73d 314
924fafb7 315 else if (fAnalysisType == "AOD") {
316 if (!fAOD) {
317 Printf("ERROR: fAOD not available");
318 return;
319 }
320 Printf("There are %d tracks in this event", fAOD->GetNumberOfTracks());
321
aaebd73d 322 // analysis
323 //For the moment don't use CF //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fAOD,fCFManager1,fCFManager2);
924fafb7 324 AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fAOD);
52021ae2 325 fGFC->Make(fEvent);
924fafb7 326 delete fEvent;
327 }
aaebd73d 328
329
330 PostData(0,fListHistos);
6d4fa5d3 331 if(fQA)
332 {
333 PostData(1,fQAInt);
334 PostData(2,fQADiff);
335 }
924fafb7 336}
337
2188af53 338//================================================================================================================
339
924fafb7 340void AliAnalysisTaskCumulants::Terminate(Option_t *)
aaebd73d 341{
2188af53 342 //accessing the output list which contains the merged 2D and 3D profiles from all worker nodes
343 fListHistos = (TList*)GetOutputData(0);
344 //fListHistos->Print();
345
346 if(fListHistos)
52021ae2 347 {
348 //histograms to store the final results
349 TH1D *intFlowResults = dynamic_cast<TH1D*>(fListHistos->FindObject("fIntFlowResultsGFC"));
350 TH1D *diffFlowResults2 = dynamic_cast<TH1D*>(fListHistos->FindObject("fDiffFlowResults2ndOrderGFC"));
351 TH1D *diffFlowResults4 = dynamic_cast<TH1D*>(fListHistos->FindObject("fDiffFlowResults4thOrderGFC"));
352 TH1D *diffFlowResults6 = dynamic_cast<TH1D*>(fListHistos->FindObject("fDiffFlowResults6thOrderGFC"));
353 TH1D *diffFlowResults8 = dynamic_cast<TH1D*>(fListHistos->FindObject("fDiffFlowResults8thOrderGFC"));
354
355 //common histograms to store the final results the integrated and differential flow
356 AliFlowCommonHistResults *commonHistRes2nd = dynamic_cast<AliFlowCommonHistResults*>(fListHistos->FindObject("AliFlowCommonHistResults2ndOrderGFC"));
357 AliFlowCommonHistResults *commonHistRes4th = dynamic_cast<AliFlowCommonHistResults*>(fListHistos->FindObject("AliFlowCommonHistResults4thOrderGFC"));
358 AliFlowCommonHistResults *commonHistRes6th = dynamic_cast<AliFlowCommonHistResults*>(fListHistos->FindObject("AliFlowCommonHistResults6thOrderGFC"));
359 AliFlowCommonHistResults *commonHistRes8th = dynamic_cast<AliFlowCommonHistResults*>(fListHistos->FindObject("AliFlowCommonHistResults8thOrderGFC"));
360
813a4157 361 //common control histogram
362 AliFlowCommonHist *commonHists = dynamic_cast<AliFlowCommonHist*>(fListHistos->FindObject("AliFlowCommonHistGFC"));
363
52021ae2 364 //profiles with average values of generating functions for int. and diff. flow
365 TProfile2D *intFlowGenFun = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fIntFlowGenFun"));
b6cd16a9 366
cb308e83 367 TProfile2D *intFlowGenFun4 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fIntFlowGenFun4")); //only for other system of Eq.
368 TProfile2D *intFlowGenFun6 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fIntFlowGenFun6")); //only for other system of Eq.
369 TProfile2D *intFlowGenFun8 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fIntFlowGenFun8")); //only for other system of Eq.
370 TProfile2D *intFlowGenFun16 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fIntFlowGenFun16")); //only for other system of Eq.
b6cd16a9 371
813a4157 372 //RP, Pt:
373 TProfile3D *diffFlowPtRPGenFunRe = dynamic_cast<TProfile3D*>(fListHistos->FindObject("fDiffFlowPtRPGenFunRe"));
374 TProfile3D *diffFlowPtRPGenFunIm = dynamic_cast<TProfile3D*>(fListHistos->FindObject("fDiffFlowPtRPGenFunIm"));
375 TProfile *ptBinRPNoOfParticles = dynamic_cast<TProfile*>(fListHistos->FindObject("fPtBinRPNoOfParticles"));
376
377 //RP, Eta:
378 TProfile3D *diffFlowEtaRPGenFunRe = dynamic_cast<TProfile3D*>(fListHistos->FindObject("fDiffFlowEtaRPGenFunRe"));
379 TProfile3D *diffFlowEtaRPGenFunIm = dynamic_cast<TProfile3D*>(fListHistos->FindObject("fDiffFlowEtaRPGenFunIm"));
380 TProfile *etaBinRPNoOfParticles = dynamic_cast<TProfile*>(fListHistos->FindObject("fEtaBinRPNoOfParticles"));
381
382 //POI, Pt:
383 TProfile3D *diffFlowPtPOIGenFunRe = dynamic_cast<TProfile3D*>(fListHistos->FindObject("fDiffFlowPtPOIGenFunRe"));
384 TProfile3D *diffFlowPtPOIGenFunIm = dynamic_cast<TProfile3D*>(fListHistos->FindObject("fDiffFlowPtPOIGenFunIm"));
385 TProfile *ptBinPOINoOfParticles = dynamic_cast<TProfile*>(fListHistos->FindObject("fPtBinPOINoOfParticles"));
52021ae2 386
813a4157 387 //POI, Eta:
388 TProfile3D *diffFlowEtaPOIGenFunRe = dynamic_cast<TProfile3D*>(fListHistos->FindObject("fDiffFlowEtaPOIGenFunRe"));
389 TProfile3D *diffFlowEtaPOIGenFunIm = dynamic_cast<TProfile3D*>(fListHistos->FindObject("fDiffFlowEtaPOIGenFunIm"));
390 TProfile *etaBinPOINoOfParticles = dynamic_cast<TProfile*>(fListHistos->FindObject("fEtaBinPOINoOfParticles"));
52021ae2 391
392 //average selected multiplicity (for int. flow)
813a4157 393 TProfile *avMult = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlowGFC"));
52021ae2 394
813a4157 395 TProfile *avMult4 = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow4GFC")); //only for other system of Eq.
396 TProfile *avMult6 = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow6GFC")); //only for other system of Eq.
397 TProfile *avMult8 = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow8GFC")); //only for other system of Eq.
398 TProfile *avMult16 = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow16GFC")); //only for other system of Eq.
cb308e83 399
52021ae2 400 //average values of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, 3rd bin: <(Q_x)^2>, 4th bin: <(Q_y)^2>)
813a4157 401 TProfile *qVectorComponents = dynamic_cast<TProfile*>(fListHistos->FindObject("fQVectorComponentsGFC"));
9dd53ff2 402
403 //<w^2>
404 TProfile *averageOfSquaredWeight = dynamic_cast<TProfile*>(fListHistos->FindObject("fAverageOfSquaredWeight"));
aaebd73d 405
52021ae2 406 /*
813a4157 407 TProfile2D *diffFlowPtGenFunRe0 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunRe0"));
408 TProfile2D *diffFlowPtGenFunRe1 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunRe1"));
409 TProfile2D *diffFlowPtGenFunRe2 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunRe2"));
410 TProfile2D *diffFlowPtGenFunRe3 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunRe3"));
411 TProfile2D *diffFlowPtGenFunRe4 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunRe4"));
412 TProfile2D *diffFlowPtGenFunRe5 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunRe5"));
413 TProfile2D *diffFlowPtGenFunRe6 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunRe6"));
414 TProfile2D *diffFlowPtGenFunRe7 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunRe7"));
415 TProfile2D *diffFlowPtGenFunIm0 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunIm0"));
416 TProfile2D *diffFlowPtGenFunIm1 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunIm1"));
417 TProfile2D *diffFlowPtGenFunIm2 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunIm2"));
418 TProfile2D *diffFlowPtGenFunIm3 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunIm3"));
419 TProfile2D *diffFlowPtGenFunIm4 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunIm4"));
420 TProfile2D *diffFlowPtGenFunIm5 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunIm5"));
421 TProfile2D *diffFlowPtGenFunIm6 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunIm6"));
422 TProfile2D *diffFlowPtGenFunIm7 = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fdiffFlowPtGenFunIm7"));
52021ae2 423 */
2188af53 424
425 //profile with avarage selected multiplicity for int. flow
52021ae2 426 //TProfile *avMult = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow"));
2188af53 427
428 //profile with avarage values of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, 3rd bin: <(Q_x)^2>, 4th bin: <(Q_y)^2>)
52021ae2 429 //TProfile *QVectorComponents = dynamic_cast<TProfile*>(fListHistos->FindObject("fQVectorComponents"));
2188af53 430
431 //q-distribution
52021ae2 432 //TH1D *qDist = dynamic_cast<TH1D*>(fListHistos->FindObject("fQDist"));
2188af53 433
813a4157 434 //AliCumulantsFunctions finalResults(intFlowGenFun,NULL,NULL, intFlowResults,diffFlowResults2,diffFlowResults4,diffFlowResults6,diffFlowResults8,avMult,QVectorComponents,qDist,diffFlowPtGenFunRe0,diffFlowPtGenFunRe1,diffFlowPtGenFunRe2, diffFlowPtGenFunRe3,diffFlowPtGenFunRe4,diffFlowPtGenFunRe5,diffFlowPtGenFunRe6,diffFlowPtGenFunRe7,diffFlowPtGenFunIm0,diffFlowPtGenFunIm1, diffFlowPtGenFunIm2,diffFlowPtGenFunIm3,diffFlowPtGenFunIm4,diffFlowPtGenFunIm5,diffFlowPtGenFunIm6,diffFlowPtGenFunIm7);
52021ae2 435
813a4157 436 //AliCumulantsFunctions finalResults(intFlowGenFun,diffFlowPtGenFunRe,diffFlowPtGenFunIm, intFlowResults,diffFlowResults2,diffFlowResults4,diffFlowResults6,diffFlowResults8,avMult,QVectorComponents,qDist);
2188af53 437
52021ae2 438 //finalResults.Calculate();
439
440
441
442 //----------------------------------------------------
443
444 fGFC = new AliFlowAnalysisWithCumulants();
2188af53 445
52021ae2 446 fGFC->SetIntFlowResults(intFlowResults);
447 fGFC->SetDiffFlowResults2nd(diffFlowResults2);
448 fGFC->SetDiffFlowResults4th(diffFlowResults4);
449 fGFC->SetDiffFlowResults6th(diffFlowResults6);
450 fGFC->SetDiffFlowResults8th(diffFlowResults8);
451
452 fGFC->SetCommonHistsResults2nd(commonHistRes2nd);
453 fGFC->SetCommonHistsResults4th(commonHistRes4th);
454 fGFC->SetCommonHistsResults6th(commonHistRes6th);
455 fGFC->SetCommonHistsResults8th(commonHistRes8th);
456
813a4157 457 fGFC->SetCommonHists(commonHists);
458
52021ae2 459 fGFC->SetIntFlowGenFun(intFlowGenFun);
cb308e83 460
461 fGFC->SetIntFlowGenFun4(intFlowGenFun4); //only for other system of Eq.
462 fGFC->SetIntFlowGenFun6(intFlowGenFun6); //only for other system of Eq.
463 fGFC->SetIntFlowGenFun8(intFlowGenFun8); //only for other system of Eq.
813a4157 464 fGFC->SetIntFlowGenFun16(intFlowGenFun16); //only for other system of Eq.
465
466 fGFC->SetDiffFlowPtRPGenFunRe(diffFlowPtRPGenFunRe);
467 fGFC->SetDiffFlowPtRPGenFunIm(diffFlowPtRPGenFunIm);
468 fGFC->SetNumberOfParticlesPerPtBinRP(ptBinRPNoOfParticles);
469
470 fGFC->SetDiffFlowEtaRPGenFunRe(diffFlowEtaRPGenFunRe);
471 fGFC->SetDiffFlowEtaRPGenFunIm(diffFlowEtaRPGenFunIm);
472 fGFC->SetNumberOfParticlesPerEtaBinRP(etaBinRPNoOfParticles);
b6cd16a9 473
813a4157 474 fGFC->SetDiffFlowPtPOIGenFunRe(diffFlowPtPOIGenFunRe);
475 fGFC->SetDiffFlowPtPOIGenFunIm(diffFlowPtPOIGenFunIm);
476 fGFC->SetNumberOfParticlesPerPtBinPOI(ptBinPOINoOfParticles);
52021ae2 477
813a4157 478 fGFC->SetDiffFlowEtaPOIGenFunRe(diffFlowEtaPOIGenFunRe);
479 fGFC->SetDiffFlowEtaPOIGenFunIm(diffFlowEtaPOIGenFunIm);
480 fGFC->SetNumberOfParticlesPerEtaBinPOI(etaBinPOINoOfParticles);
52021ae2 481
813a4157 482 fGFC->SetAverageMultiplicity(avMult);
cb308e83 483
813a4157 484 fGFC->SetAverageMultiplicity4(avMult4); //only for other system of Eq.
485 fGFC->SetAverageMultiplicity6(avMult6); //only for other system of Eq.
486 fGFC->SetAverageMultiplicity8(avMult8); //only for other system of Eq.
487 fGFC->SetAverageMultiplicity16(avMult16); //only for other system of Eq.
cb308e83 488
813a4157 489 fGFC->SetQVectorComponents(qVectorComponents);
52021ae2 490
9dd53ff2 491 fGFC->SetAverageOfSquaredWeight(averageOfSquaredWeight);
492
52021ae2 493 fGFC->Finish();
494
495 //----------------------------------------------------
2188af53 496 }
497 else
498 {
499 cout<<"histogram list pointer is empty"<<endl;
500 }
aaebd73d 501}
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
924fafb7 518
924fafb7 519
924fafb7 520
924fafb7 521
c75fdbdc 522