cumulant tasks now use exchange container FlowEvent Task fills reaction plane
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Feb 2009 10:19:16 +0000 (10:19 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Feb 2009 10:19:16 +0000 (10:19 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskCumulants.cxx
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskCumulants.h
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.h
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskQCumulants.cxx
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskQCumulants.h
PWG2/FLOW/macros/runAliAnalysisTaskFlow.C

index 3faadb8..02be023 100644 (file)
@@ -44,6 +44,7 @@ AliFlowEventSimple::AliFlowEventSimple():
   fTrackCollection(NULL),
   fNumberOfTracks(0),
   fEventNSelTracksIntFlow(0),
+  fMCReactionPlaneAngle(0.),
   fNumberOfTracksWrap(NULL),
   fEventNSelTracksIntFlowWrap(NULL),
   fMCReactionPlaneAngleWrap(NULL)
@@ -57,6 +58,7 @@ AliFlowEventSimple::AliFlowEventSimple(Int_t aLenght):
   fTrackCollection(NULL),
   fNumberOfTracks(0),
   fEventNSelTracksIntFlow(0),
+  fMCReactionPlaneAngle(0.),
   fNumberOfTracksWrap(NULL),
   fEventNSelTracksIntFlowWrap(NULL),
   fMCReactionPlaneAngleWrap(NULL)
@@ -250,7 +252,7 @@ void AliFlowEventSimple::Print(Option_t *option) const
   //   -*-*-*-*-*Print some global quantities for this histogram collection class *-*-*-*-*-*-*-*
   //             ===============================================
   //   printf( "TH1.Print Name  = %s, Entries= %d, Total sum= %g\n",GetName(),Int_t(fEntries),GetSumOfWeights());
-  printf( "Class.Print Name = %s, Total number of tracks= %d, Number of selected tracks= %d, MC EventPlaneAngle= %d",
+  printf( "Class.Print Name = %s, Total number of tracks= %d, Number of selected tracks= %d, MC EventPlaneAngle= %f",
          GetName(),fNumberOfTracks, fEventNSelTracksIntFlow, fMCReactionPlaneAngle );
 
   if (fTrackCollection) {  
@@ -274,7 +276,7 @@ void AliFlowEventSimple::Print(Option_t *option) const
     b->Add(fEventNSelTracksIntFlowWrap);
   }
   if (!fMCReactionPlaneAngleWrap) {
-     fMCReactionPlaneAngleWrap = new TParameter<double>(" fMCReactionPlaneAngle",  fMCReactionPlaneAngle);
+    fMCReactionPlaneAngleWrap = new TParameter<double>(" fMCReactionPlaneAngle",  fMCReactionPlaneAngle);
     b->Add( fMCReactionPlaneAngleWrap);
   }
   if (fTrackCollection) b->Add(fTrackCollection,"AliFlowTracksSimple");
index c08de8e..69e2781 100644 (file)
 #include "AliAnalysisDataContainer.h"
 #include "AliAnalysisManager.h"
 
-#include "AliESDEvent.h"
-#include "AliESDInputHandler.h"
-
-#include "AliAODEvent.h"
-#include "AliAODInputHandler.h"
-
-#include "AliMCEventHandler.h"
-#include "AliMCEvent.h"
-
-#include "AliCFManager.h"
-
+#include "AliFlowEventSimple.h"
 #include "AliAnalysisTaskCumulants.h"
-#include "AliFlowEventSimpleMaker.h"
 #include "AliFlowAnalysisWithCumulants.h"
 #include "AliFlowCumuConstants.h"
 #include "AliFlowCommonConstants.h"
@@ -63,31 +52,23 @@ ClassImp(AliAnalysisTaskCumulants)
 
 //================================================================================================================
 
-AliAnalysisTaskCumulants::AliAnalysisTaskCumulants(const char *name, Bool_t on, Bool_t useWeights): 
+AliAnalysisTaskCumulants::AliAnalysisTaskCumulants(const char *name, Bool_t useWeights): 
  AliAnalysisTask(name,""), 
- fESD(NULL),
- fAOD(NULL),
- fGFC(NULL),//Generating Function Cumulant (GFC) analysis object
- fEventMaker(NULL),
- fAnalysisType("ESD"), 
- fCFManager1(NULL),
- fCFManager2(NULL),
+ fEvent(NULL),
+ fGFCA(NULL), // Generating Function Cumulant (GFCA) analysis object
  fListHistos(NULL),
- fQAInt(NULL),
- fQADiff(NULL),
- fQA(on),
  fUseWeights(useWeights),
  fUsePhiWeights(kFALSE),
  fUsePtWeights(kFALSE),
  fUseEtaWeights(kFALSE),
  fListWeights(NULL)
 {
-//constructor
+ // constructor
  cout<<"AliAnalysisTaskCumulants::AliAnalysisTaskCumulants(const char *name)"<<endl;
  
  // Define input and output slots here
  // Input slot #0 works with a TChain
- DefineInput(0, TChain::Class());
+ DefineInput(0, AliFlowEventSimple::Class());
  
  // Input slot #1 is needed for the weights 
  if(useWeights)
@@ -96,33 +77,20 @@ AliAnalysisTaskCumulants::AliAnalysisTaskCumulants(const char *name, Bool_t on,
  }
   
  // Output slot #0 writes into a TList container
- DefineOutput(0, TList::Class());  
- if(on) 
- {
-  DefineOutput(1, TList::Class());
-  DefineOutput(2, TList::Class()); 
- }  
+ DefineOutput(0, TList::Class());   
 }
 
-AliAnalysisTaskCumulants::AliAnalysisTaskCumulants(): 
- fESD(NULL),
- fAOD(NULL), 
- fGFC(NULL),//Generating Function Cumulant (GFC) analysis object
- fEventMaker(NULL),
- fAnalysisType("ESD"),
- fCFManager1(NULL),
- fCFManager2(NULL),
- fListHistos(NULL),  
- fQAInt(NULL),
- fQADiff(NULL),
- fQA(kFALSE),
+AliAnalysisTaskCumulants::AliAnalysisTaskCumulants():
+ fEvent(NULL),
+ fGFCA(NULL), // Generating Function Cumulant (GFCA) analysis object
+ fListHistos(NULL),
  fUseWeights(kFALSE),
  fUsePhiWeights(kFALSE),
  fUsePtWeights(kFALSE),
  fUseEtaWeights(kFALSE),
  fListWeights(NULL)
 {
- //dummy constructor
+ // dummy constructor
  cout<<"AliAnalysisTaskCumulants::AliAnalysisTaskCumulants()"<<endl;
 }
 
@@ -130,105 +98,45 @@ AliAnalysisTaskCumulants::AliAnalysisTaskCumulants():
 
 void AliAnalysisTaskCumulants::ConnectInputData(Option_t *) 
 {
- //connect ESD or AOD (called once)
+ // connect ESD or AOD (called once)
  cout<<"AliAnalysisTaskCumulants::ConnectInputData(Option_t *)"<<endl;
-
- TTree* tree = dynamic_cast<TTree*> (GetInputData(0));
- if (!tree) 
- {
-  Printf("ERROR: Could not read chain from input slot 0");
- } 
- else 
- {
- //disable all branches and enable only the needed ones
-  if (fAnalysisType == "MC") {
-     // we want to process only MC
-      tree->SetBranchStatus("*", kFALSE);
-
-      AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-
-      if (!esdH) {
-       Printf("ERROR: Could not get ESDInputHandler");
-      } else {
-       fESD = esdH->GetEvent();
-      }
-    }
-    else if (fAnalysisType == "ESD" || fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1"  ) {
-      tree->SetBranchStatus("*", kFALSE);
-      tree->SetBranchStatus("Tracks.*", kTRUE);
-
-      AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-
-      if (!esdH) {
-       Printf("ERROR: Could not get ESDInputHandler");
-      } else
-       fESD = esdH->GetEvent();
-    }
-    else if (fAnalysisType == "AOD") {
-      AliAODInputHandler *aodH = dynamic_cast<AliAODInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-
-      if (!aodH) {
-       Printf("ERROR: Could not get AODInputHandler");
-      }
-      else {
-       fAOD = aodH->GetEvent();
-      }
-    }
-    else {
-      Printf("Wrong analysis type: Only ESD, ESDMC0, ESDMC1, AOD and MC types are allowed!");
-
-    }
-  }
 }
 
 //================================================================================================================
 
 void AliAnalysisTaskCumulants::CreateOutputObjects() 
 {
- //called at every worker node to initialize
+ // called at every worker node to initialize
  cout<<"AliAnalysisTaskCumulants::CreateOutputObjects()"<<endl;
 
- //OpenFile(0);
-
- if(!(fAnalysisType == "AOD" || fAnalysisType == "ESD" || fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" || fAnalysisType == "MC")) 
- {
-  cout<<"WRONG ANALYSIS TYPE! only ESD, ESDMC0, ESDMC1, AOD and MC are allowed."<<endl;
-  exit(1);
- }
- //event maker
- fEventMaker = new AliFlowEventSimpleMaker();
-  
- //analyser
- fGFC = new AliFlowAnalysisWithCumulants();
- fGFC->Init();
+ // analyser
+ fGFCA = new AliFlowAnalysisWithCumulants();
+ fGFCA->Init();
  
  //weights:
  if(fUseWeights)
  {
   //pass the flags to class:
-  if(fUsePhiWeights) fGFC->SetUsePhiWeights(fUsePhiWeights);
-  if(fUsePtWeights) fGFC->SetUsePtWeights(fUsePtWeights);
-  if(fUseEtaWeights) fGFC->SetUseEtaWeights(fUseEtaWeights);
+  if(fUsePhiWeights) fGFCA->SetUsePhiWeights(fUsePhiWeights);
+  if(fUsePtWeights) fGFCA->SetUsePtWeights(fUsePtWeights);
+  if(fUseEtaWeights) fGFCA->SetUseEtaWeights(fUseEtaWeights);
   //get data from input slot #1 which is used for weights:
   if(GetNinputs()==2) 
   {                   
    fListWeights = (TList*)GetInputData(1); 
   }
   //pass the list with weights to class:
-  if(fListWeights) fGFC->SetWeightsList(fListWeights);
+  if(fListWeights) fGFCA->SetWeightsList(fListWeights);
  }
 
- if(fGFC->GetHistList()) 
+ if(fGFCA->GetHistList()) 
  {
-  fListHistos = fGFC->GetHistList();
+  fListHistos = fGFCA->GetHistList();
   //fListHistos->Print();
  }
- else 
+ else
  {
-  Printf("ERROR: Could not retrieve histogram list"); 
+  Printf(" ERROR: Could not retrieve histogram list (GFCA, Task::COO)"); 
  }
 }
 
@@ -236,103 +144,20 @@ void AliAnalysisTaskCumulants::CreateOutputObjects()
 
 void AliAnalysisTaskCumulants::Exec(Option_t *) 
 {
- //main loop (called for each event)
- if (fAnalysisType == "MC") {
-    // Process MC truth, therefore we receive the AliAnalysisManager and ask it for the AliMCEventHandler
-    // This handler can return the current MC event
-
-    AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-    if (!eventHandler) {
-      Printf("ERROR: Could not retrieve MC event handler");
-      return;
-    }
-
-    AliMCEvent* mcEvent = eventHandler->MCEvent();
-    if (!mcEvent) {
-      Printf("ERROR: Could not retrieve MC event");
-      return;
-    }
-
-
-    fCFManager1->SetEventInfo(mcEvent);
-    fCFManager2->SetEventInfo(mcEvent);
-
-    Printf("MC particles: %d", mcEvent->GetNumberOfTracks());
-
-    //cumulant analysis 
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(mcEvent,fCFManager1,fCFManager2);
-    fGFC->Make(fEvent);
-    delete fEvent;
-  }
-  else if (fAnalysisType == "ESD") {
-    if (!fESD) {
-      Printf("ERROR: fESD not available");
-      return;
-    }
-    Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
-    
-    //cumulant analysis 
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,fCFManager1,fCFManager2);//cuts
-    //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD);
-    
-    fGFC->Make(fEvent);
-    delete fEvent;
-  }
-  else if (fAnalysisType == "ESDMC0") {
-    if (!fESD) {
-      Printf("ERROR: fESD not available");
-      return;
-    }
-    Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
-    
-    AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-    if (!eventHandler) {
-      Printf("ERROR: Could not retrieve MC event handler");
-      return;
-    }
-
-    AliMCEvent* mcEvent = eventHandler->MCEvent();
-    if (!mcEvent) {
-      Printf("ERROR: Could not retrieve MC event");
-      return;
-    }
-
-    fCFManager1->SetEventInfo(mcEvent);
-    fCFManager2->SetEventInfo(mcEvent);
-
-    //cumulant analysis 
-    AliFlowEventSimple* fEvent=NULL;
-    if (fAnalysisType == "ESDMC0") { 
-      fEvent = fEventMaker->FillTracks(fESD, mcEvent, fCFManager1, fCFManager2, 0); //0 = kine from ESD, 1 = kine from MC
-    } else if (fAnalysisType == "ESDMC1") {
-      fEvent = fEventMaker->FillTracks(fESD, mcEvent, fCFManager1, fCFManager2, 1); //0 = kine from ESD, 1 = kine from MC
-    }
-    fGFC->Make(fEvent);
-    delete fEvent;
-    //delete mcEvent;
-  }
-  
-  else if (fAnalysisType == "AOD") {
-    if (!fAOD) {
-      Printf("ERROR: fAOD not available");
-      return;
-    }
-    Printf("There are %d tracks in this event", fAOD->GetNumberOfTracks());
-
-    // analysis 
-    //For the moment don't use CF //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fAOD,fCFManager1,fCFManager2);
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fAOD);
-    fGFC->Make(fEvent);
-    delete fEvent;
-  }
-
+ // main loop (called for each event)
+ fEvent = dynamic_cast<AliFlowEventSimple*>(GetInputData(0));
 
-  PostData(0,fListHistos); 
-  if(fQA) 
+ // generating function cumulants
+ if(fEvent) 
+ {
+  fGFCA->Make(fEvent);
+ }else 
   {
-   PostData(1,fQAInt);
-   PostData(2,fQADiff); 
+   cout<<" WARNING: No input data (GFCA, Task::E) !!!"<<endl;
+   cout<<endl;
   }
+  
+ PostData(0,fListHistos);
 }
 
 //================================================================================================================
@@ -392,10 +217,10 @@ void AliAnalysisTaskCumulants::Terminate(Option_t *)
   //average selected multiplicity (for int. flow) 
   TProfile *avMult = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlowGFC"));
   
-  TProfile *avMult4  = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow4GFC"));  //only for other system of Eq.
-  TProfile *avMult6  = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow6GFC"));  //only for other system of Eq.
-  TProfile *avMult8  = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow8GFC"));  //only for other system of Eq.
-  TProfile *avMult16 = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow16GFC")); //only for other system of Eq.
+  TProfile *avMult4  = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow4GFCA"));  //only for other system of Eq.
+  TProfile *avMult6  = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow6GFCA"));  //only for other system of Eq.
+  TProfile *avMult8  = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow8GFCA"));  //only for other system of Eq.
+  TProfile *avMult16 = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow16GFCA")); //only for other system of Eq.
   
   //average values of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, 3rd bin: <(Q_x)^2>, 4th bin: <(Q_y)^2>) 
   TProfile *qVectorComponents = dynamic_cast<TProfile*>(fListHistos->FindObject("fQVectorComponentsGFC"));
@@ -441,62 +266,63 @@ void AliAnalysisTaskCumulants::Terminate(Option_t *)
   
   //----------------------------------------------------
  
-  fGFC = new AliFlowAnalysisWithCumulants();  
+  fGFCA = new AliFlowAnalysisWithCumulants();  
  
-  fGFC->SetIntFlowResults(intFlowResults); 
-  fGFC->SetDiffFlowResults2nd(diffFlowResults2);
-  fGFC->SetDiffFlowResults4th(diffFlowResults4);
-  fGFC->SetDiffFlowResults6th(diffFlowResults6);
-  fGFC->SetDiffFlowResults8th(diffFlowResults8); 
+  fGFCA->SetIntFlowResults(intFlowResults); 
+  fGFCA->SetDiffFlowResults2nd(diffFlowResults2);
+  fGFCA->SetDiffFlowResults4th(diffFlowResults4);
+  fGFCA->SetDiffFlowResults6th(diffFlowResults6);
+  fGFCA->SetDiffFlowResults8th(diffFlowResults8); 
   
-  fGFC->SetCommonHistsResults2nd(commonHistRes2nd); 
-  fGFC->SetCommonHistsResults4th(commonHistRes4th);
-  fGFC->SetCommonHistsResults6th(commonHistRes6th);
-  fGFC->SetCommonHistsResults8th(commonHistRes8th);
+  fGFCA->SetCommonHistsResults2nd(commonHistRes2nd); 
+  fGFCA->SetCommonHistsResults4th(commonHistRes4th);
+  fGFCA->SetCommonHistsResults6th(commonHistRes6th);
+  fGFCA->SetCommonHistsResults8th(commonHistRes8th);
   
-  fGFC->SetCommonHists(commonHists);
+  fGFCA->SetCommonHists(commonHists);
   
-  fGFC->SetIntFlowGenFun(intFlowGenFun);
+  fGFCA->SetIntFlowGenFun(intFlowGenFun);
   
-  fGFC->SetIntFlowGenFun4(intFlowGenFun4);   //only for other system of Eq.
-  fGFC->SetIntFlowGenFun6(intFlowGenFun6);   //only for other system of Eq.
-  fGFC->SetIntFlowGenFun8(intFlowGenFun8);   //only for other system of Eq.
-  fGFC->SetIntFlowGenFun16(intFlowGenFun16); //only for other system of Eq. 
+  fGFCA->SetIntFlowGenFun4(intFlowGenFun4);   //only for other system of Eq.
+  fGFCA->SetIntFlowGenFun6(intFlowGenFun6);   //only for other system of Eq.
+  fGFCA->SetIntFlowGenFun8(intFlowGenFun8);   //only for other system of Eq.
+  fGFCA->SetIntFlowGenFun16(intFlowGenFun16); //only for other system of Eq. 
   
-  fGFC->SetDiffFlowPtRPGenFunRe(diffFlowPtRPGenFunRe);
-  fGFC->SetDiffFlowPtRPGenFunIm(diffFlowPtRPGenFunIm);
-  fGFC->SetNumberOfParticlesPerPtBinRP(ptBinRPNoOfParticles);
+  fGFCA->SetDiffFlowPtRPGenFunRe(diffFlowPtRPGenFunRe);
+  fGFCA->SetDiffFlowPtRPGenFunIm(diffFlowPtRPGenFunIm);
+  fGFCA->SetNumberOfParticlesPerPtBinRP(ptBinRPNoOfParticles);
   
-  fGFC->SetDiffFlowEtaRPGenFunRe(diffFlowEtaRPGenFunRe);
-  fGFC->SetDiffFlowEtaRPGenFunIm(diffFlowEtaRPGenFunIm);
-  fGFC->SetNumberOfParticlesPerEtaBinRP(etaBinRPNoOfParticles);     
+  fGFCA->SetDiffFlowEtaRPGenFunRe(diffFlowEtaRPGenFunRe);
+  fGFCA->SetDiffFlowEtaRPGenFunIm(diffFlowEtaRPGenFunIm);
+  fGFCA->SetNumberOfParticlesPerEtaBinRP(etaBinRPNoOfParticles);     
   
-  fGFC->SetDiffFlowPtPOIGenFunRe(diffFlowPtPOIGenFunRe);
-  fGFC->SetDiffFlowPtPOIGenFunIm(diffFlowPtPOIGenFunIm);
-  fGFC->SetNumberOfParticlesPerPtBinPOI(ptBinPOINoOfParticles);
+  fGFCA->SetDiffFlowPtPOIGenFunRe(diffFlowPtPOIGenFunRe);
+  fGFCA->SetDiffFlowPtPOIGenFunIm(diffFlowPtPOIGenFunIm);
+  fGFCA->SetNumberOfParticlesPerPtBinPOI(ptBinPOINoOfParticles);
   
-  fGFC->SetDiffFlowEtaPOIGenFunRe(diffFlowEtaPOIGenFunRe);
-  fGFC->SetDiffFlowEtaPOIGenFunIm(diffFlowEtaPOIGenFunIm);
-  fGFC->SetNumberOfParticlesPerEtaBinPOI(etaBinPOINoOfParticles);
+  fGFCA->SetDiffFlowEtaPOIGenFunRe(diffFlowEtaPOIGenFunRe);
+  fGFCA->SetDiffFlowEtaPOIGenFunIm(diffFlowEtaPOIGenFunIm);
+  fGFCA->SetNumberOfParticlesPerEtaBinPOI(etaBinPOINoOfParticles);
   
-  fGFC->SetAverageMultiplicity(avMult);
+  fGFCA->SetAverageMultiplicity(avMult);
   
-  fGFC->SetAverageMultiplicity4(avMult4);   //only for other system of Eq.
-  fGFC->SetAverageMultiplicity6(avMult6);   //only for other system of Eq.
-  fGFC->SetAverageMultiplicity8(avMult8);   //only for other system of Eq.
-  fGFC->SetAverageMultiplicity16(avMult16); //only for other system of Eq.
+  fGFCA->SetAverageMultiplicity4(avMult4);   //only for other system of Eq.
+  fGFCA->SetAverageMultiplicity6(avMult6);   //only for other system of Eq.
+  fGFCA->SetAverageMultiplicity8(avMult8);   //only for other system of Eq.
+  fGFCA->SetAverageMultiplicity16(avMult16); //only for other system of Eq.
   
-  fGFC->SetQVectorComponents(qVectorComponents);
+  fGFCA->SetQVectorComponents(qVectorComponents);
   
-  fGFC->SetAverageOfSquaredWeight(averageOfSquaredWeight);
+  fGFCA->SetAverageOfSquaredWeight(averageOfSquaredWeight);
   
-  fGFC->Finish();
+  fGFCA->Finish();
   
   //----------------------------------------------------
  }
  else
  {
-  cout<<"histogram list pointer is empty"<<endl;
+  cout<<" WARNING: histogram list pointer is empty (GFC, Task::T)"<<endl;
+  cout<<endl;
  }
 }
 
index cdabc4d..ecd948c 100644 (file)
@@ -15,8 +15,8 @@
  *           (anteb@nikhef.nl)        * 
  * ***********************************/
 
-#ifndef AliAnalysisTaskCumulants_H
-#define AliAnalysisTaskCumulants_H
+#ifndef ALIANALYSISTASKCUMULANTS_H
+#define ALIANALYSISTASKCUMULANTS_H
 
 #include "AliAnalysisTask.h"
 
@@ -32,7 +32,7 @@ class TFile;
 class AliAnalysisTaskCumulants : public AliAnalysisTask{
  public:
   AliAnalysisTaskCumulants();
-  AliAnalysisTaskCumulants(const char *name, Bool_t QAon = kFALSE, Bool_t useWeights=kFALSE);
+  AliAnalysisTaskCumulants(const char *name, Bool_t useWeights=kFALSE);
   virtual ~AliAnalysisTaskCumulants(){}; 
   
   virtual void   ConnectInputData(Option_t *);
@@ -40,20 +40,6 @@ class AliAnalysisTaskCumulants : public AliAnalysisTask{
   virtual void   Exec(Option_t *option);
   virtual void   Terminate(Option_t *);
   
-  void           SetAnalysisType(TString type) {this->fAnalysisType = type;}
-  TString GetAnalysisType() const {return this->fAnalysisType;}
-  
-  void SetCFManager1(AliCFManager* cfmgr) {this->fCFManager1 = cfmgr;} 
-  AliCFManager* GetCFManager1()           {return this->fCFManager1;}
-  void SetCFManager2(AliCFManager* cfmgr) {this->fCFManager2 = cfmgr;} 
-  AliCFManager* GetCFManager2()           {return this->fCFManager2;} 
-  void          SetQAList1(TList* list)   {this->fQAInt = list; }
-  TList*        GetQAList1()              {return this->fQAInt; }
-  void          SetQAList2(TList* list)   {this->fQADiff = list; }
-  TList*        GetQAList2()              {return this->fQADiff; }
-  void          SetQAOn(Bool_t kt)        {this->fQA = kt; }
-  Bool_t        GetQAOn()                 {return this->fQA; }
-  
   void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
   Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
   void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
@@ -65,25 +51,15 @@ class AliAnalysisTaskCumulants : public AliAnalysisTask{
   AliAnalysisTaskCumulants(const AliAnalysisTaskCumulants& aatc);
   AliAnalysisTaskCumulants& operator=(const AliAnalysisTaskCumulants& aatc);
 
-  AliESDEvent *fESD;                      //ESD object
-  AliAODEvent* fAOD;                      //AOD object
-  AliFlowAnalysisWithCumulants* fGFC;     //Generating Function Cumulant (GFC) analysis object
-  AliFlowEventSimpleMaker* fEventMaker;   //FlowEventSimple maker object
-  TString fAnalysisType;                  //string to select which kind of input to analyse (ESD, AOD or MC)
-  AliCFManager* fCFManager1;              //correction framework manager
-  AliCFManager* fCFManager2;              //correction framework manager
-  TList  *fListHistos;                    //collection of output 
-  
-  TList*        fQAInt;                   // QA histogram list
-  TList*        fQADiff;                  // QA histogram list
+  AliFlowEventSimple *fEvent;          // the input event
+  AliFlowAnalysisWithCumulants *fGFCA; // Generating Function Cumulant (GFC) analysis object
+  TList *fListHistos;                  // collection of output 
 
-  Bool_t fQA;                             // flag to set the filling of the QA hostograms   
-  
-  Bool_t       fUseWeights;               // use any weights
-  Bool_t       fUsePhiWeights;            // phi weights
-  Bool_t       fUsePtWeights;             // v_2(pt) weights
-  Bool_t       fUseEtaWeights;            // v_2(eta) weights  
-  TList*       fListWeights;              // list with weights
+  Bool_t fUseWeights;                  // use any weights
+  Bool_t fUsePhiWeights;               // use phi weights
+  Bool_t fUsePtWeights;                // use pt weights
+  Bool_t fUseEtaWeights;               // use eta weights  
+  TList  *fListWeights;                // list with weights
            
   ClassDef(AliAnalysisTaskCumulants, 1); 
 };
index b6e15a1..f4d7218 100644 (file)
 #include "TFile.h" //needed as include
 #include "TList.h"
 
-
+// ALICE Analysis Framework
 class AliAnalysisTask;
 #include "AliAnalysisManager.h"
 
+// ESD interface
 #include "AliESDEvent.h"
 #include "AliESDInputHandler.h"
 
+// AOD interface
 #include "AliAODEvent.h"
 #include "AliAODInputHandler.h"
 
+// Monte Carlo Event
 #include "AliMCEventHandler.h"
 #include "AliMCEvent.h"
 
+// ALICE Correction Framework
 #include "AliCFManager.h"
 
-#include "AliAnalysisTaskFlowEvent.h"
+// Interface to Event generators to get Reaction Plane Angle
+#include "AliGenCocktailEventHeader.h"
+#include "AliGenHijingEventHeader.h"
+
+// Interface to make the Flow Event Simple used in the flow analysis methods
 #include "AliFlowEventSimpleMaker.h"
 
+#include "AliAnalysisTaskFlowEvent.h"
+
 // AliAnalysisTaskFlowEvent:
 //
 // analysis task for filling the flow event
@@ -183,19 +193,32 @@ void AliAnalysisTaskFlowEvent::Exec(Option_t *)
   // Main loop
   // Called for each event
   AliFlowEventSimple* fEvent = NULL;
+  Double_t fRP = 0.; // the monte carlo reaction plane angle
+  AliMCEvent* mcEvent = NULL;
+  // See if we can get Monte Carlo Information and if so get the reaction plane
+
+  AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
+  if (eventHandler) {
+    mcEvent = eventHandler->MCEvent();
+    if (mcEvent) {
+      AliGenCocktailEventHeader *header = dynamic_cast<AliGenCocktailEventHeader *> (mcEvent-> GenEventHeader()); 
+      if (header) {
+       TList *lhd = header->GetHeaders();
+       if (lhd) {
+         AliGenHijingEventHeader *hdh = dynamic_cast<AliGenHijingEventHeader *> (lhd->At(0)); 
+         if (hdh) {
+           fRP = hdh->ReactionPlaneAngle();
+           cout<<"The reactionPlane is: "<< fRP <<endl;
+         }
+       }
+      }
+    }
+  }
         
   if (fAnalysisType == "MC") {
 
     // Process MC truth, therefore we receive the AliAnalysisManager and ask it for the AliMCEventHandler
     // This handler can return the current MC event
-
-    AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-    if (!eventHandler) {
-      Printf("ERROR: Could not retrieve MC event handler");
-      return;
-    }
-
-    AliMCEvent* mcEvent = eventHandler->MCEvent();
     if (!mcEvent) {
       Printf("ERROR: Could not retrieve MC event");
       return;
@@ -203,13 +226,12 @@ void AliAnalysisTaskFlowEvent::Exec(Option_t *)
 
     fCFManager1->SetEventInfo(mcEvent);
     fCFManager2->SetEventInfo(mcEvent);
-
+    
     // analysis 
-    Printf("MC particles: %d", mcEvent->GetNumberOfTracks());
+    Printf("Number of MC particles: %d", mcEvent->GetNumberOfTracks());
     fEvent = fEventMaker->FillTracks(mcEvent,fCFManager1,fCFManager2);
     // here we have the fEvent and want to make it available as an output stream
-    // so no
-    //   delete fEvent;
+    // so no delete fEvent;
   }
   else if (fAnalysisType == "ESD") {
     if (!fESD) {
@@ -228,13 +250,6 @@ void AliAnalysisTaskFlowEvent::Exec(Option_t *)
     }
     Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
     
-    AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-    if (!eventHandler) {
-      Printf("ERROR: Could not retrieve MC event handler");
-      return;
-    }
-
-    AliMCEvent* mcEvent = eventHandler->MCEvent();
     if (!mcEvent) {
       Printf("ERROR: Could not retrieve MC event");
       return;
@@ -249,8 +264,6 @@ void AliAnalysisTaskFlowEvent::Exec(Option_t *)
     } else if (fAnalysisType == "ESDMC1") {
       fEvent = fEventMaker->FillTracks(fESD, mcEvent, fCFManager1, fCFManager2, 1); //0 = kine from ESD, 1 = kine from MC
     }
-    //delete fEvent;
-    //delete mcEvent;
   }
   
   else if (fAnalysisType == "AOD") {
index a5bb770..4cdc886 100644 (file)
@@ -32,9 +32,9 @@ class AliAnalysisTaskFlowEvent : public AliAnalysisTask {
   void SetAnalysisType(TString type) { this->fAnalysisType = type; }
   TString GetAnalysisType() const    { return this->fAnalysisType; }
 
-  void SetCFManager1(AliCFManager* cfmgr) {this->fCFManager1 = cfmgr; } 
+  void          SetCFManager1(AliCFManager* cfmgr) {this->fCFManager1 = cfmgr; } 
   AliCFManager* GetCFManager1()           {return this->fCFManager1; }
-  void SetCFManager2(AliCFManager* cfmgr) {this->fCFManager2 = cfmgr; } 
+  void          SetCFManager2(AliCFManager* cfmgr) {this->fCFManager2 = cfmgr; } 
   AliCFManager* GetCFManager2()           {return this->fCFManager2; }
   void          SetQAList1(TList* list)   {this->fQAInt = list; }
   TList*        GetQAList1()              {return this->fQAInt; }
index 7ce4540..8107e9c 100644 (file)
 #include "AliAnalysisDataContainer.h"
 #include "AliAnalysisManager.h"
 
-#include "AliESDEvent.h"
-#include "AliESDInputHandler.h"
-
-#include "AliAODEvent.h"
-#include "AliAODInputHandler.h"
-
-#include "AliMCEventHandler.h"
-#include "AliMCEvent.h"
-
-#include "AliCFManager.h"
-
+#include "AliFlowEventSimple.h"
 #include "AliAnalysisTaskQCumulants.h"
-#include "AliFlowEventSimpleMaker.h"
 #include "AliFlowAnalysisWithQCumulants.h"
 #include "AliFlowCumuConstants.h"
 #include "AliFlowCommonConstants.h"
@@ -64,31 +53,22 @@ ClassImp(AliAnalysisTaskQCumulants)
 
 //================================================================================================================
 
-AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants(const char *name, Bool_t on, Bool_t useWeights): 
+AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants(const char *name, Bool_t useWeights): 
  AliAnalysisTask(name,""), 
- fESD(NULL),
- fAOD(NULL),
- fQCA(NULL),//Q-cumulant Analysis (QCA) object
- fEventMaker(NULL),
- fAnalysisType("ESD"), 
- fCFManager1(NULL),
- fCFManager2(NULL),
- fListHistos(NULL),
- fQAInt(NULL),
- fQADiff(NULL),
- fQA(on),
+ fEvent(NULL),
+ fQCA(NULL), // Q-cumulant Analysis (QCA) object
  fUseWeights(useWeights),
  fUsePhiWeights(kFALSE),
  fUsePtWeights(kFALSE),
  fUseEtaWeights(kFALSE),
  fListWeights(NULL)
 {
- //constructor
+ // constructor
  cout<<"AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants(const char *name)"<<endl;
  
  // Define input and output slots here
  // Input slot #0 works with a TChain
- DefineInput(0, TChain::Class());
+ DefineInput(0, AliFlowEventSimple::Class());
   
  // Input slot #1 is needed for the weights 
  if(useWeights)
@@ -98,33 +78,20 @@ AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants(const char *name, Bool_t on
         
  // Output slot #0 writes into a TList container
  DefineOutput(0, TList::Class());  
- if(on) 
- {
-  DefineOutput(1, TList::Class());
-  DefineOutput(2, TList::Class()); 
- }  
  
 }
 
 AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants(): 
- fESD(NULL),
- fAOD(NULL), 
+ fEvent(NULL),
  fQCA(NULL),//Q-cumulant Analysis (QCA) object
- fEventMaker(NULL),
- fAnalysisType("ESD"),
- fCFManager1(NULL),
- fCFManager2(NULL),
- fListHistos(NULL),  
- fQAInt(NULL),
- fQADiff(NULL),
- fQA(kFALSE),
+ fListHistos(NULL),
  fUseWeights(kFALSE),
  fUsePhiWeights(kFALSE),
  fUsePtWeights(kFALSE),
  fUseEtaWeights(kFALSE),
  fListWeights(NULL)
 {
- //dummy constructor
+ // dummy constructor
  cout<<"AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants()"<<endl;
 }
 
@@ -132,78 +99,18 @@ AliAnalysisTaskQCumulants::AliAnalysisTaskQCumulants():
 
 void AliAnalysisTaskQCumulants::ConnectInputData(Option_t *) 
 {
- //connect ESD or AOD (called once)
+ // connect ESD or AOD (called once)
  cout<<"AliAnalysisTaskQCumulants::ConnectInputData(Option_t *)"<<endl;
-
- TTree* tree = dynamic_cast<TTree*> (GetInputData(0));
- if (!tree) 
- {
-  Printf("ERROR: Could not read chain from input slot 0");
- } 
- else 
- {
- //disable all branches and enable only the needed ones
-  if (fAnalysisType == "MC") {
-     // we want to process only MC
-      tree->SetBranchStatus("*", kFALSE);
-
-      AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-
-      if (!esdH) {
-       Printf("ERROR: Could not get ESDInputHandler");
-      } else {
-       fESD = esdH->GetEvent();
-      }
-    }
-    else if (fAnalysisType == "ESD" || fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1"  ) {
-      tree->SetBranchStatus("*", kFALSE);
-      tree->SetBranchStatus("Tracks.*", kTRUE);
-
-      AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-
-      if (!esdH) {
-       Printf("ERROR: Could not get ESDInputHandler");
-      } else
-       fESD = esdH->GetEvent();
-    }
-    else if (fAnalysisType == "AOD") {
-      AliAODInputHandler *aodH = dynamic_cast<AliAODInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-
-      if (!aodH) {
-       Printf("ERROR: Could not get AODInputHandler");
-      }
-      else {
-       fAOD = aodH->GetEvent();
-      }
-    }
-    else {
-      Printf("Wrong analysis type: Only ESD, ESDMC0, ESDMC1, AOD and MC types are allowed!");
-
-    }
-  }
 }
 
 //================================================================================================================
 
 void AliAnalysisTaskQCumulants::CreateOutputObjects() 
 {
- //called at every worker node to initialize
+ // called at every worker node to initialize
  cout<<"AliAnalysisTaskQCumulants::CreateOutputObjects()"<<endl;
 
- //OpenFile(0);
-
- if(!(fAnalysisType == "AOD" || fAnalysisType == "ESD" || fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" || fAnalysisType == "MC")) 
- {
-  cout<<"WRONG ANALYSIS TYPE! only ESD, ESDMC0, ESDMC1, AOD and MC are allowed."<<endl;
-  exit(1);
- }
- //event maker
- fEventMaker = new AliFlowEventSimpleMaker();
- //analyser
+ // analyser
  fQCA = new AliFlowAnalysisWithQCumulants();
  fQCA->Init();
  
@@ -230,7 +137,7 @@ void AliAnalysisTaskQCumulants::CreateOutputObjects()
  }
  else 
  {
-  Printf("ERROR: Could not retrieve histogram list"); 
+  Printf(" ERROR: Could not retrieve histogram list (QC, Task::COO)"); 
  }
 
  //PostData(0,fListHistos);
@@ -241,101 +148,20 @@ void AliAnalysisTaskQCumulants::CreateOutputObjects()
 
 void AliAnalysisTaskQCumulants::Exec(Option_t *) 
 {
- //main loop (called for each event)
- if (fAnalysisType == "MC") {
-    // Process MC truth, therefore we receive the AliAnalysisManager and ask it for the AliMCEventHandler
-    // This handler can return the current MC event
-
-    AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-    if (!eventHandler) {
-      Printf("ERROR: Could not retrieve MC event handler");
-      return;
-    }
-
-    AliMCEvent* mcEvent = eventHandler->MCEvent();
-    if (!mcEvent) {
-      Printf("ERROR: Could not retrieve MC event");
-      return;
-    }
-
-    Printf("MC particles: %d", mcEvent->GetNumberOfTracks());
-    fCFManager1->SetEventInfo(mcEvent);
-    fCFManager2->SetEventInfo(mcEvent);
-
-    //Q-cumulant analysis 
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(mcEvent,fCFManager1,fCFManager2);
-    fQCA->Make(fEvent);
-    delete fEvent;
-  }
-  else if (fAnalysisType == "ESD") {
-    if (!fESD) {
-      Printf("ERROR: fESD not available");
-      return;
-    }
-    Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
-    
-    //Q-cumulant analysis    
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,fCFManager1,fCFManager2);//cuts
-    //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD);
-    
-    fQCA->Make(fEvent); 
-    
-    delete fEvent;
-  }
-  else if (fAnalysisType == "ESDMC0") {
-    if (!fESD) {
-      Printf("ERROR: fESD not available");
-      return;
-    }
-    Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
-    
-    AliMCEventHandler* eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-    if (!eventHandler) {
-      Printf("ERROR: Could not retrieve MC event handler");
-      return;
-    }
-
-    AliMCEvent* mcEvent = eventHandler->MCEvent();
-    if (!mcEvent) {
-      Printf("ERROR: Could not retrieve MC event");
-      return;
-    }
-
-    fCFManager1->SetEventInfo(mcEvent);
-    fCFManager2->SetEventInfo(mcEvent);
-
-    //Q-cumulant analysis 
-    AliFlowEventSimple* fEvent=NULL;
-    if (fAnalysisType == "ESDMC0") { 
-      fEvent = fEventMaker->FillTracks(fESD, mcEvent, fCFManager1, fCFManager2, 0); //0 = kine from ESD, 1 = kine from MC
-    } else if (fAnalysisType == "ESDMC1") {
-      fEvent = fEventMaker->FillTracks(fESD, mcEvent, fCFManager1, fCFManager2, 1); //0 = kine from ESD, 1 = kine from MC
-    }
-    fQCA->Make(fEvent);
-    delete fEvent;
-    //delete mcEvent;
-  }
-  
-  else if (fAnalysisType == "AOD") {
-    if (!fAOD) {
-      Printf("ERROR: fAOD not available");
-      return;
-    }
-    Printf("There are %d tracks in this event", fAOD->GetNumberOfTracks());
-
-    // analysis 
-    //For the moment don't use CF //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fAOD,fCFManager1,fCFManager2);
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fAOD);
-    fQCA->Make(fEvent);
-    delete fEvent;
+  // main loop (called for each event)
+ fEvent = dynamic_cast<AliFlowEventSimple*>(GetInputData(0));
+
+ // Q-cumulants
+ if(fEvent) 
+ {
+  fQCA->Make(fEvent);
+ }else 
+  {
+   cout<<" WARNING: No input data (QC, Task::E) !!!"<<endl;
+   cout<<endl;
   }
   
-  PostData(0,fListHistos); 
-  if(fQA) 
-  {
-   PostData(1,fQAInt);
-   PostData(2,fQADiff); 
-  }  
+ PostData(0,fListHistos);
 }
 
 //================================================================================================================
@@ -493,7 +319,7 @@ void AliAnalysisTaskQCumulants::Terminate(Option_t *)
  }
  else
  {
-  cout<<" WARNING: QC histogram list pointer is NULL."<<endl;
+  cout<<" WARNING: histogram list pointer is empty (QC, Task::T)"<<endl;
   cout<<endl;
  }
 }
index 7719e64..76bbccd 100644 (file)
@@ -32,7 +32,7 @@ class TFile;
 class AliAnalysisTaskQCumulants : public AliAnalysisTask{
  public:
   AliAnalysisTaskQCumulants();
-  AliAnalysisTaskQCumulants(const char *name, Bool_t QAon = kFALSE, Bool_t useWeights=kFALSE);
+  AliAnalysisTaskQCumulants(const char *name, Bool_t useWeights=kFALSE);
   virtual ~AliAnalysisTaskQCumulants(){}; 
   
   virtual void   ConnectInputData(Option_t *);
@@ -40,20 +40,6 @@ class AliAnalysisTaskQCumulants : public AliAnalysisTask{
   virtual void   Exec(Option_t *option);
   virtual void   Terminate(Option_t *);
   
-  void           SetAnalysisType(TString type) {this->fAnalysisType = type;}
-  TString GetAnalysisType() const {return this->fAnalysisType;}
-  
-  void SetCFManager1(AliCFManager* cfmgr) {this->fCFManager1 = cfmgr;} 
-  AliCFManager* GetCFManager1()           {return this->fCFManager1;}
-  void SetCFManager2(AliCFManager* cfmgr) {this->fCFManager2 = cfmgr;} 
-  AliCFManager* GetCFManager2()           {return this->fCFManager2;} 
-  void          SetQAList1(TList* list)   {this->fQAInt = list; }
-  TList*        GetQAList1()              {return this->fQAInt; }
-  void          SetQAList2(TList* list)   {this->fQADiff = list; }
-  TList*        GetQAList2()              {return this->fQADiff; }
-  void          SetQAOn(Bool_t kt)        {this->fQA = kt; }
-  Bool_t        GetQAOn()                 {return this->fQA; }
-  
   void SetUsePhiWeights(Bool_t const uPhiW) {this->fUsePhiWeights = uPhiW;};
   Bool_t GetUsePhiWeights() const {return this->fUsePhiWeights;};
   void SetUsePtWeights(Bool_t const uPtW) {this->fUsePtWeights = uPtW;};
@@ -64,26 +50,16 @@ class AliAnalysisTaskQCumulants : public AliAnalysisTask{
  private:
   AliAnalysisTaskQCumulants(const AliAnalysisTaskQCumulants& aatqc);
   AliAnalysisTaskQCumulants& operator=(const AliAnalysisTaskQCumulants& aatqc);
-
-  AliESDEvent *fESD;                      //ESD object
-  AliAODEvent* fAOD;                      //AOD object
-  AliFlowAnalysisWithQCumulants* fQCA;    //Q-cumulant Analysis (QCA) object
-  AliFlowEventSimpleMaker* fEventMaker;   //FlowEventSimple maker object
-  TString fAnalysisType;                  //string to select which kind of input to analyse (ESD, AOD or MC)
-  AliCFManager* fCFManager1;              //correction framework manager
-  AliCFManager* fCFManager2;              //correction framework manager
-  TList  *fListHistos;                    //collection of output 
-     
-  TList*       fQAInt;                    // QA histogram list
-  TList*       fQADiff;                   // QA histogram list
-
-  Bool_t       fQA;                       // flag to set the filling of the QA hostograms 
   
-  Bool_t       fUseWeights;               // use any weights
-  Bool_t       fUsePhiWeights;            // phi weights
-  Bool_t       fUsePtWeights;             // v_2(pt) weights
-  Bool_t       fUseEtaWeights;            // v_2(eta) weights  
-  TList*       fListWeights;              // list with weights
+  AliFlowEventSimple *fEvent;          // the input event
+  AliFlowAnalysisWithQCumulants *fQCA; // Q-cumulant Analysis (QCA) object
+  TList  *fListHistos;                 // collection of output 
+
+  Bool_t fUseWeights;                  // use any weights
+  Bool_t fUsePhiWeights;               // use phi weights
+  Bool_t fUsePtWeights;                // use pt weights
+  Bool_t fUseEtaWeights;               // use eta weights  
+  TList *fListWeights;                 // list with weights
      
   ClassDef(AliAnalysisTaskQCumulants, 1); 
 };
index 5bda22f..b544b4d 100644 (file)
@@ -97,11 +97,11 @@ const Int_t maxnsigmatovertex2 = 3;
 //void runAliAnalysisTaskFlow(Int_t mode=mPROOF, const Char_t* data="/PWG2/akisiel/Therminator_midcentral_AOD", Int_t nRuns=44, Int_t offset=0)
 
 // Data at Nikhef
-//void runAliAnalysisTaskFlow(Int_t mode=mLocal, Int_t nRuns = 4, const Char_t* dataDir="/data/alice2/kolk/Therminator_midcentral", Int_t offset = 0) 
+void runAliAnalysisTaskFlow(Int_t mode=mLocal, Int_t nRuns = 64, const Char_t* dataDir="/data/alice2/kolk/Therminator_midcentral", Int_t offset = 0) 
 //void runAliAnalysisTaskFlow(Int_t mode=mLocalPAR, Int_t nRuns = 55, const Char_t* dataDir="/data/alice2/kolk/Therminator_midcentral", Int_t offset = 0) 
 
 // Data on my mac
-void runAliAnalysisTaskFlow(Int_t mode=mLocal, Int_t nRuns = -1, const Char_t* dataDir="/Users/snelling/alice_data/Therminator_midcentral", Int_t offset = 0) 
+//void runAliAnalysisTaskFlow(Int_t mode=mLocal, Int_t nRuns = -1, const Char_t* dataDir="/Users/snelling/alice_data/Therminator_midcentral", Int_t offset = 0) 
 //void runAliAnalysisTaskFlow(Int_t mode=mLocalPAR, Int_t nRuns = 55, const Char_t* dataDir="/Users/snelling/alice_data/Therminator_midcentral", Int_t offset = 0) 
 
 {
@@ -445,23 +445,17 @@ if (mode==mLocal || mode == mLocalPAR || mode == mGRID) {
    mgr->AddTask(taskLYZEP);
  }
  if (GFC){
-   AliAnalysisTaskCumulants *taskGFC = new AliAnalysisTaskCumulants("TaskCumulants",kFALSE,useWeights);
-   taskGFC->SetAnalysisType(type);
+   AliAnalysisTaskCumulants *taskGFC = new AliAnalysisTaskCumulants("TaskCumulants",useWeights);
    taskGFC->SetUsePhiWeights(usePhiWeights); 
    taskGFC->SetUsePtWeights(usePtWeights);
    taskGFC->SetUseEtaWeights(useEtaWeights); 
-   taskGFC->SetCFManager1(cfmgr1);
-   taskGFC->SetCFManager2(cfmgr2);
    mgr->AddTask(taskGFC);
  }
  if (QC){
-   AliAnalysisTaskQCumulants *taskQC = new AliAnalysisTaskQCumulants("TaskQCumulants",kFALSE,useWeights);
-   taskQC->SetAnalysisType(type);
+   AliAnalysisTaskQCumulants *taskQC = new AliAnalysisTaskQCumulants("TaskQCumulants",useWeights);
    taskQC->SetUsePhiWeights(usePhiWeights); 
    taskQC->SetUsePtWeights(usePtWeights);
    taskQC->SetUseEtaWeights(useEtaWeights); 
-   taskQC->SetCFManager1(cfmgr1);
-   taskQC->SetCFManager2(cfmgr2);
    mgr->AddTask(taskQC);
  }
  if (MCEP){
@@ -601,7 +595,7 @@ if (mode==mLocal || mode == mLocalPAR || mode == mGRID) {
    cinputLYZEP->SetData(fInputListLYZEP);
  }
  if (GFC) { 
-   mgr->ConnectInput(taskGFC,0,cinput1); 
+   mgr->ConnectInput(taskGFC,0,coutputFE); 
    mgr->ConnectOutput(taskGFC,0,coutputGFC);
    if (useWeights) {
      mgr->ConnectInput(taskGFC,1,cinputWeights);
@@ -609,7 +603,7 @@ if (mode==mLocal || mode == mLocalPAR || mode == mGRID) {
    } 
  }  
  if (QC) { 
-   mgr->ConnectInput(taskQC,0,cinput1); 
+   mgr->ConnectInput(taskQC,0,coutputFE); 
    mgr->ConnectOutput(taskQC,0,coutputQC);
    if (useWeights) {
      mgr->ConnectInput(taskQC,1,cinputWeights);