uncertainties back in, incase of weights still behaving funny
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowTasks / AliAnalysisTaskCumulants.cxx
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 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"
28 #include "TChain.h"
29 #include "TTree.h"
30 #include "TFile.h"
31 #include "TList.h"
32 #include "TH1.h"
33 #include "TProfile.h"
34 #include "TProfile2D.h"
35 #include "TProfile3D.h"
36
37 #include "AliAnalysisTask.h"
38 #include "AliAnalysisDataSlot.h"
39 #include "AliAnalysisDataContainer.h"
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
51 #include "AliCFManager.h"
52
53 #include "AliAnalysisTaskCumulants.h"
54 #include "AliFlowEventSimpleMaker.h"
55 #include "AliFlowAnalysisWithCumulants.h"
56 #include "AliFlowCumuConstants.h"
57 #include "AliFlowCommonConstants.h"
58 #include "AliFlowCommonHist.h"
59 #include "AliFlowCommonHistResults.h"
60 #include "AliCumulantsFunctions.h"
61
62 ClassImp(AliAnalysisTaskCumulants)
63
64 //================================================================================================================
65
66 AliAnalysisTaskCumulants::AliAnalysisTaskCumulants(const char *name, Bool_t on, Bool_t useWeights): 
67  AliAnalysisTask(name,""), 
68  fESD(NULL),
69  fAOD(NULL),
70  fGFC(NULL),//Generating Function Cumulant (GFC) analysis object
71  fEventMaker(NULL),
72  fAnalysisType("ESD"), 
73  fCFManager1(NULL),
74  fCFManager2(NULL),
75  fListHistos(NULL),
76  fQAInt(NULL),
77  fQADiff(NULL),
78  fQA(on),
79  fUseWeights(useWeights),
80  fUsePhiWeights(kFALSE),
81  fUsePtWeights(kFALSE),
82  fUseEtaWeights(kFALSE),
83  fListWeights(NULL)
84 {
85 //constructor
86  cout<<"AliAnalysisTaskCumulants::AliAnalysisTaskCumulants(const char *name)"<<endl;
87  
88  // Define input and output slots here
89  // Input slot #0 works with a TChain
90  DefineInput(0, TChain::Class());
91  
92  // Input slot #1 is needed for the weights 
93  if(useWeights)
94  {
95   DefineInput(1, TList::Class());   
96  }
97   
98  // Output slot #0 writes into a TList container
99  DefineOutput(0, TList::Class());  
100  if(on) 
101  {
102   DefineOutput(1, TList::Class());
103   DefineOutput(2, TList::Class()); 
104  }  
105 }
106
107 AliAnalysisTaskCumulants::AliAnalysisTaskCumulants(): 
108  fESD(NULL),
109  fAOD(NULL), 
110  fGFC(NULL),//Generating Function Cumulant (GFC) analysis object
111  fEventMaker(NULL),
112  fAnalysisType("ESD"),
113  fCFManager1(NULL),
114  fCFManager2(NULL),
115  fListHistos(NULL),  
116  fQAInt(NULL),
117  fQADiff(NULL),
118  fQA(kFALSE),
119  fUseWeights(kFALSE),
120  fUsePhiWeights(kFALSE),
121  fUsePtWeights(kFALSE),
122  fUseEtaWeights(kFALSE),
123  fListWeights(NULL)
124 {
125  //dummy constructor
126  cout<<"AliAnalysisTaskCumulants::AliAnalysisTaskCumulants()"<<endl;
127 }
128
129 //================================================================================================================
130
131 void AliAnalysisTaskCumulants::ConnectInputData(Option_t *) 
132 {
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
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
184 //================================================================================================================
185
186 void AliAnalysisTaskCumulants::CreateOutputObjects() 
187 {
188  //called at every worker node to initialize
189  cout<<"AliAnalysisTaskCumulants::CreateOutputObjects()"<<endl;
190
191  
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
205  fGFC = new AliFlowAnalysisWithCumulants();
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  }
223
224  if(fGFC->GetHistList()) 
225  {
226   fListHistos = fGFC->GetHistList();
227   //fListHistos->Print();
228  }
229  else 
230  {
231   Printf("ERROR: Could not retrieve histogram list"); 
232  }
233 }
234
235 //================================================================================================================
236
237 void AliAnalysisTaskCumulants::Exec(Option_t *) 
238 {
239  //main loop (called for each event)
240  if (fAnalysisType == "MC") {
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
256
257     fCFManager1->SetEventInfo(mcEvent);
258     fCFManager2->SetEventInfo(mcEvent);
259
260     Printf("MC particles: %d", mcEvent->GetNumberOfTracks());
261
262     //cumulant analysis 
263     AliFlowEventSimple* fEvent = fEventMaker->FillTracks(mcEvent,fCFManager1,fCFManager2);
264     fGFC->Make(fEvent);
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     
274     //cumulant analysis 
275     AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,fCFManager1,fCFManager2);//cuts
276     //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD);
277     
278     fGFC->Make(fEvent);
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
300     fCFManager1->SetEventInfo(mcEvent);
301     fCFManager2->SetEventInfo(mcEvent);
302
303     //cumulant analysis 
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     }
310     fGFC->Make(fEvent);
311     delete fEvent;
312     //delete mcEvent;
313   }
314   
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
322     // analysis 
323     //For the moment don't use CF //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fAOD,fCFManager1,fCFManager2);
324     AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fAOD);
325     fGFC->Make(fEvent);
326     delete fEvent;
327   }
328
329
330   PostData(0,fListHistos); 
331   if(fQA) 
332   {
333    PostData(1,fQAInt);
334    PostData(2,fQADiff); 
335   }
336 }
337
338 //================================================================================================================
339
340 void AliAnalysisTaskCumulants::Terminate(Option_t *) 
341 {  
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)
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   
361   //common control histogram
362   AliFlowCommonHist *commonHists = dynamic_cast<AliFlowCommonHist*>(fListHistos->FindObject("AliFlowCommonHistGFC"));
363   
364   //profiles with average values of generating functions for int. and diff. flow
365   TProfile2D *intFlowGenFun    = dynamic_cast<TProfile2D*>(fListHistos->FindObject("fIntFlowGenFun")); 
366   
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.  
371   
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"));
386   
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"));
391   
392   //average selected multiplicity (for int. flow) 
393   TProfile *avMult = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlowGFC"));
394   
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.
399   
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>) 
401   TProfile *qVectorComponents = dynamic_cast<TProfile*>(fListHistos->FindObject("fQVectorComponentsGFC"));
402   
403   //<w^2> 
404   TProfile *averageOfSquaredWeight = dynamic_cast<TProfile*>(fListHistos->FindObject("fAverageOfSquaredWeight"));
405       
406   /*
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")); 
423   */
424
425   //profile with avarage selected multiplicity for int. flow 
426   //TProfile *avMult = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow"));
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>) 
429   //TProfile *QVectorComponents = dynamic_cast<TProfile*>(fListHistos->FindObject("fQVectorComponents"));
430   
431   //q-distribution
432   //TH1D *qDist = dynamic_cast<TH1D*>(fListHistos->FindObject("fQDist"));
433   
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);
435   
436   //AliCumulantsFunctions finalResults(intFlowGenFun,diffFlowPtGenFunRe,diffFlowPtGenFunIm, intFlowResults,diffFlowResults2,diffFlowResults4,diffFlowResults6,diffFlowResults8,avMult,QVectorComponents,qDist);
437          
438   //finalResults.Calculate();  
439   
440   
441   
442   //----------------------------------------------------
443  
444   fGFC = new AliFlowAnalysisWithCumulants();  
445  
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   
457   fGFC->SetCommonHists(commonHists);
458   
459   fGFC->SetIntFlowGenFun(intFlowGenFun);
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.
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);     
473   
474   fGFC->SetDiffFlowPtPOIGenFunRe(diffFlowPtPOIGenFunRe);
475   fGFC->SetDiffFlowPtPOIGenFunIm(diffFlowPtPOIGenFunIm);
476   fGFC->SetNumberOfParticlesPerPtBinPOI(ptBinPOINoOfParticles);
477   
478   fGFC->SetDiffFlowEtaPOIGenFunRe(diffFlowEtaPOIGenFunRe);
479   fGFC->SetDiffFlowEtaPOIGenFunIm(diffFlowEtaPOIGenFunIm);
480   fGFC->SetNumberOfParticlesPerEtaBinPOI(etaBinPOINoOfParticles);
481   
482   fGFC->SetAverageMultiplicity(avMult);
483   
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.
488   
489   fGFC->SetQVectorComponents(qVectorComponents);
490   
491   fGFC->SetAverageOfSquaredWeight(averageOfSquaredWeight);
492   
493   fGFC->Finish();
494   
495   //----------------------------------------------------
496  }
497  else
498  {
499   cout<<"histogram list pointer is empty"<<endl;
500  }
501 }
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522