use excahnge container as input
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 27 Feb 2009 12:59:03 +0000 (12:59 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 27 Feb 2009 12:59:03 +0000 (12:59 +0000)
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskLYZEventPlane.cxx
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskLYZEventPlane.h
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskLeeYangZeros.cxx
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskLeeYangZeros.h
PWG2/FLOW/macros/runAliAnalysisTaskFlow.C

index 4cd1223..0806ff1 100644 (file)
 
 class AliAnalysisTask;
 #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 "AliAnalysisTaskLYZEventPlane.h"
-#include "AliFlowEventSimpleMaker.h"
 #include "AliFlowCommonHist.h"
 #include "AliFlowCommonHistResults.h"
 #include "AliFlowLYZEventPlane.h"
@@ -50,51 +38,33 @@ class AliAnalysisTask;
 ClassImp(AliAnalysisTaskLYZEventPlane)
 
 //________________________________________________________________________
-AliAnalysisTaskLYZEventPlane::AliAnalysisTaskLYZEventPlane(const char *name, Bool_t on) : 
+AliAnalysisTaskLYZEventPlane::AliAnalysisTaskLYZEventPlane(const char *name) : 
   AliAnalysisTask(name, ""), 
-  fESD(NULL), 
-  fAOD(NULL),
-  fAnalysisType("ESD"), 
+  fEvent(NULL), 
   fLyzEp(NULL),
   fLyz(NULL),
-  fEventMaker(NULL),
-  fCFManager1(NULL),
-  fCFManager2(NULL),
   fListHistos(NULL),
-  fSecondRunFile(NULL),
-  fQAInt(NULL),
-  fQADiff(NULL),
-  fQA(on)
+  fSecondRunFile(NULL)
 {
   // Constructor
   cout<<"AliAnalysisTaskLYZEventPlane::AliAnalysisTaskLYZEventPlane(const char *name)"<<endl;
 
   // Define input and output slots here
-  // Input slot #0 works with a TChain
-  DefineInput(0, TChain::Class());
+  // Input slot #0 works with an AliFlowEventSimple
+  DefineInput(0, AliFlowEventSimple::Class());
   DefineInput(1, TList::Class());
   // Output slot #0 writes into a TList container
   DefineOutput(0, TList::Class());
-  if(on) {
-    DefineOutput(1, TList::Class());
-    DefineOutput(2, TList::Class()); } 
+  
 }
 
 //________________________________________________________________________
 AliAnalysisTaskLYZEventPlane::AliAnalysisTaskLYZEventPlane() : 
-  fESD(NULL), 
-  fAOD(NULL),
-  fAnalysisType("ESD"), 
+  fEvent(NULL), 
   fLyzEp(NULL),
   fLyz(NULL),
-  fEventMaker(NULL),
-  fCFManager1(NULL),
-  fCFManager2(NULL),
   fListHistos(NULL),
-  fSecondRunFile(NULL),
-  fQAInt(NULL),
-  fQADiff(NULL),
-  fQA(kFALSE)
+  fSecondRunFile(NULL)
 {
   // Constructor
   cout<<"AliAnalysisTaskLYZEventPlane::AliAnalysisTaskLYZEventPlane()"<<endl;
@@ -114,51 +84,7 @@ void AliAnalysisTaskLYZEventPlane::ConnectInputData(Option_t *)
   // Connect ESD or AOD here
   // Called once
   cout<<"AliAnalysisTaskLYZEventPlane::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!");
-      exit(1);
-
-    }
-  }  
+  
 }
 
 //________________________________________________________________________
@@ -166,14 +92,7 @@ void AliAnalysisTaskLYZEventPlane::CreateOutputObjects()
 {
   // Called once
   cout<<"AliAnalysisTaskLYZEventPlane::CreateOutputObjects()"<<endl;
-
-  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();
+  
   //lee yang zeros event plane
   fLyzEp = new AliFlowLYZEventPlane() ;
   //Analyser
@@ -191,7 +110,7 @@ void AliAnalysisTaskLYZEventPlane::CreateOutputObjects()
 
   if (fLyz->GetHistList()) {
     fListHistos = fLyz->GetHistList();
-    fListHistos->Print();
+    //fListHistos->Print();
   }
   else { cout<<"ERROR: Could not retrieve histogram list"<<endl;}
 
@@ -204,99 +123,15 @@ void AliAnalysisTaskLYZEventPlane::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());
-
-    //lee yang zeros analysis 
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(mcEvent,fCFManager1,fCFManager2);
+  fEvent = dynamic_cast<AliFlowEventSimple*>(GetInputData(0));
+  if (fEvent) {
     fLyz->Make(fEvent,fLyzEp);
-
-    delete fEvent;
   }
-  else if (fAnalysisType == "ESD") {
-    if (!fESD) {
-      Printf("ERROR: fESD not available");
-      return;
-    }
-    Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
+  else {
+    cout << "Warning no input data!!!" << endl;}
     
-    //lee yang zeros analysis 
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,fCFManager1,fCFManager2);
-    fLyz->Make(fEvent,fLyzEp);
-    delete fEvent;
-  }
-  else if (fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1") {
-    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);
-
-    //lee yang zeros 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,0);  //0 = kine from ESD, 1 = kine from MC
-    }
-
-    fLyz->Make(fEvent,fLyzEp);
-    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());
-
-    //lee yang zeros analysis 
-    //for the moment don't use CF
-    //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fAOD,fCFManager1,fCFManager2);
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fAOD);
-    fLyz->Make(fEvent,fLyzEp);
-    delete fEvent;
-  }
-  
   PostData(0,fListHistos);
-  if (fQA) {
-    PostData(1,fQAInt);
-    PostData(2,fQADiff); }
+  
 }      
 
 //________________________________________________________________________
index 0fe9216..6a488ba 100644 (file)
 // Author: 
 //        Naomi van der Kolk (kolk@nikhef.nl)
 
-class AliESDEvent;
-class AliAODEvent;
-class AliCFManager;
+class AliFlowEventSimple;
 class AliFlowLYZEventPlane;
 class AliFlowAnalysisWithLYZEventPlane;
-class AliFlowEventSimpleMaker;
 class TFile;
 class TList;
 
@@ -26,7 +23,7 @@ class TList;
 class AliAnalysisTaskLYZEventPlane : public AliAnalysisTask {
  public:
   AliAnalysisTaskLYZEventPlane();
-  AliAnalysisTaskLYZEventPlane(const char *name, Bool_t QAon = kFALSE);
+  AliAnalysisTaskLYZEventPlane(const char *name);
   virtual ~AliAnalysisTaskLYZEventPlane();
   
   virtual void   ConnectInputData(Option_t *);
@@ -34,40 +31,17 @@ class AliAnalysisTaskLYZEventPlane : 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() const         {return this->fCFManager1; }
-  void           SetCFManager2(AliCFManager* cfmgr) {this->fCFManager2 = cfmgr; }
-  AliCFManager*  GetCFManager2() const         {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; }
-
  private:
  
   AliAnalysisTaskLYZEventPlane(const AliAnalysisTaskLYZEventPlane& aAnalysis);
   AliAnalysisTaskLYZEventPlane& operator=(const AliAnalysisTaskLYZEventPlane& aAnalysis);
 
-  AliESDEvent*  fESD;                     //ESD object
-  AliAODEvent*  fAOD;                     //AOD object
-  TString fAnalysisType;                  //string to set the kind of input for the analysis: ESD, AOD or MC
-  AliFlowLYZEventPlane* fLyzEp;           //LYZ EP object
-  AliFlowAnalysisWithLYZEventPlane* fLyz; //LYZ EP analysis object
-  AliFlowEventSimpleMaker* fEventMaker;   //FlowEventSimple maker object
-  AliCFManager* fCFManager1;              //Correction framework manager
-  AliCFManager* fCFManager2;              //Correction framework manager
-  TList*        fListHistos;              //collection of output hists
-  TFile*        fSecondRunFile;           //output from the second LYZ loop
-  TList*        fQAInt;                   // QA histogram list
-  TList*        fQADiff;                  // QA histogram list
-
-  Bool_t        fQA;                      // flag to set the filling of the QA hostograms
-    
+  AliFlowEventSimple*               fEvent;         // input event
+  AliFlowLYZEventPlane*             fLyzEp;         //LYZ EP object
+  AliFlowAnalysisWithLYZEventPlane* fLyz;           //LYZ EP analysis object
+  TList*                            fListHistos;    //collection of output hists
+  TFile*                            fSecondRunFile; //output from the second LYZ loop
+      
   ClassDef(AliAnalysisTaskLYZEventPlane, 1); // example of analysis
 };
 
index be02c1b..698422e 100644 (file)
 
 class AliAnalysisTask;
 #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 "AliFlowLYZConstants.h"   
 #include "AliAnalysisTaskLeeYangZeros.h"
-#include "AliFlowEventSimpleMaker.h"
 #include "AliFlowCommonHist.h"
 #include "AliFlowCommonHistResults.h"
 #include "AliFlowLYZHist1.h"
@@ -50,55 +38,35 @@ class AliAnalysisTask;
 ClassImp(AliAnalysisTaskLeeYangZeros)
 
 //________________________________________________________________________
-AliAnalysisTaskLeeYangZeros::AliAnalysisTaskLeeYangZeros(const char *name, Bool_t firstrun, Bool_t on) : 
+AliAnalysisTaskLeeYangZeros::AliAnalysisTaskLeeYangZeros(const char *name, Bool_t firstrun) : 
   AliAnalysisTask(name, ""), 
-  fESD(0),
-  fAOD(0),
-  fAnalysisType("ESD"), 
-  fCFManager1(NULL),
-  fCFManager2(NULL),
+  fEvent(0),
   fLyz(0),
-  fEventMaker(0),
   fFirstRunFile(0),
   fListHistos(NULL),
-  fQAInt(NULL),
-  fQADiff(NULL),
-  fFirstRunLYZ(firstrun),  //set boolean for firstrun to initial value
-  fUseSumLYZ(kTRUE),       //set boolean for use sum to initial value
-  fQA(on)
+  fFirstRunLYZ(firstrun), //set boolean for firstrun to initial value
+  fUseSumLYZ(kTRUE)       //set boolean for use sum to initial value
 {
   // Constructor
   cout<<"AliAnalysisTaskLeeYangZeros::AliAnalysisTaskLeeYangZeros(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());
   if (!firstrun) DefineInput(1, TList::Class()); //for second loop 
   // Output slot #0 writes into a TList container
   DefineOutput(0, TList::Class());  
-  if(on) {
-    DefineOutput(1, TList::Class());
-    DefineOutput(2, TList::Class()); }  
+   
 } 
 
-
-
 //________________________________________________________________________
 AliAnalysisTaskLeeYangZeros::AliAnalysisTaskLeeYangZeros() :  
-  fESD(0),
-  fAOD(0),
-  fAnalysisType("ESD"), 
-  fCFManager1(NULL),
-  fCFManager2(NULL),
+  fEvent(0),
   fLyz(0),
-  fEventMaker(0),
   fFirstRunFile(0),
   fListHistos(NULL),
-  fQAInt(NULL),
-  fQADiff(NULL),
   fFirstRunLYZ(kTRUE), //set boolean for firstrun to initial value
-  fUseSumLYZ(kTRUE),    //set boolean for use sum to initial value
-  fQA(kFALSE)
+  fUseSumLYZ(kTRUE)    //set boolean for use sum to initial value
 {
   // Constructor
   cout<<"AliAnalysisTaskLeeYangZeros::AliAnalysisTaskLeeYangZeros()"<<endl;
@@ -119,51 +87,7 @@ void AliAnalysisTaskLeeYangZeros::ConnectInputData(Option_t *)
   // Connect ESD or AOD here
   // Called once
   cout<<"AliAnalysisTaskLeeYangZeros::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!");
-
-    }
-  }
 }
 
 //________________________________________________________________________
@@ -172,16 +96,9 @@ void AliAnalysisTaskLeeYangZeros::CreateOutputObjects()
   // Called once
   cout<<"AliAnalysisTaskLeeYangZeros::CreateOutputObjects()"<<endl;
 
-  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
   fLyz = new AliFlowAnalysisWithLeeYangZeros() ;
-   
   fLyz -> SetFirstRun(GetFirstRunLYZ());   //set first run true or false
   fLyz -> SetUseSum(GetUseSumLYZ());       //set use sum true or false
 
@@ -208,98 +125,16 @@ void AliAnalysisTaskLeeYangZeros::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());
-
-    //lee yang zeros analysis 
-    //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(mcEvent);
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(mcEvent,fCFManager1,fCFManager2);
-    fLyz->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());
-    
-    //lee yang zeros analysis 
-    //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD);
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,fCFManager1,fCFManager2);
+  fEvent = dynamic_cast<AliFlowEventSimple*>(GetInputData(0));
+  if (fEvent) {
     fLyz->Make(fEvent);
-    delete fEvent;
-  }
-  else if (fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1") {
-    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);
-
-    //lee yang zeros analysis 
-    //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,mcEvent,0); //0 = kine from ESD, 1 = kine from MC
-    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
-    }
-    fLyz->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());
-
-    //lee yang zeros analysis 
-    AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fAOD); //no CF yet!
-    fLyz->Make(fEvent);
-    delete fEvent;
   }
+  else {
+    cout << "Warning no input data!!!" << endl; }
   
   PostData(0,fListHistos); //here for CAF
-  if (fQA) {
-    PostData(1,fQAInt);
-    PostData(2,fQADiff); }
+  
 }      
 
 //________________________________________________________________________
@@ -314,7 +149,7 @@ void AliAnalysisTaskLeeYangZeros::Terminate(Option_t *)
   fLyzTerm -> SetUseSum(GetUseSumLYZ());       //set use sum true or false
    
   fListHistos = (TList*)GetOutputData(0);
-  cout << "histogram list in Terminate" << endl;
+  //cout << "histogram list in Terminate" << endl;
 
   if (fListHistos) {
 
@@ -442,7 +277,7 @@ void AliAnalysisTaskLeeYangZeros::Terminate(Option_t *)
           
     //    fListHistos->Print(); 
   }    
-  else { cout << "histogram list pointer is empty" << endl;}
+  else { cout << "histogram list pointer in Lee-Yang Zeros is empty" << endl;}
 
-  cout<<".....finished"<<endl;
+  //cout<<".....finished"<<endl;
 }
index 03120dc..787b8f5 100644 (file)
 // Author: 
 // Naomi van der Kolk (kolk@nikhef.nl)             
 
-class AliESDEvent;
-class AliAODEvent;
-class AliCFManager;
+class AliFlowEventSimple;
 class AliFlowAnalysisWithLeeYangZeros;
-class AliFlowEventSimpleMaker;
 class TFile;
 class TList;
 
@@ -26,7 +23,7 @@ class TList;
 class AliAnalysisTaskLeeYangZeros : public AliAnalysisTask {
  public:
   AliAnalysisTaskLeeYangZeros();
-  AliAnalysisTaskLeeYangZeros(const char *name, Bool_t firstrun, Bool_t QAon);
+  AliAnalysisTaskLeeYangZeros(const char *name, Bool_t firstrun);
   virtual ~AliAnalysisTaskLeeYangZeros();
   
   virtual void   ConnectInputData(Option_t *);
@@ -39,43 +36,22 @@ class AliAnalysisTaskLeeYangZeros : public AliAnalysisTask {
   Bool_t         GetFirstRunLYZ() const        { return this->fFirstRunLYZ ; }
   void           SetUseSumLYZ(Bool_t kt)       { this->fUseSumLYZ = kt ;  }
   Bool_t         GetUseSumLYZ() const          { return this->fUseSumLYZ ; }
-  void           SetAnalysisType(TString type) {this->fAnalysisType = type ; }
-  TString        GetAnalysisType()             {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; }
-
  private:
  
   AliAnalysisTaskLeeYangZeros(const AliAnalysisTaskLeeYangZeros& aAnalysis);
   AliAnalysisTaskLeeYangZeros& operator=(const AliAnalysisTaskLeeYangZeros& aAnalysis);
 
-  AliESDEvent*     fESD;                  // ESD object
-  AliAODEvent*     fAOD;                  // AOD 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
+  AliFlowEventSimple* fEvent;             // input event
   AliFlowAnalysisWithLeeYangZeros* fLyz;  // LYZ analysis object
-  AliFlowEventSimpleMaker* fEventMaker;   // FlowEventSimple maker object
-
+  
   TFile*           fFirstRunFile;         // file from the first loop over events
   TList*           fListHistos;           // collection of output
-  TList*           fQAInt;                // QA histogram list
-  TList*           fQADiff;               // QA histogram list
-
+  
   //flags
   Bool_t fFirstRunLYZ ;    // flag for lyz analysis 
   Bool_t fUseSumLYZ ;      // flag for lyz analysis 
-  Bool_t fQA;              // flag to set the filling of the QA hostograms
-  
-      
+        
   ClassDef(AliAnalysisTaskLeeYangZeros, 1);  //AliAnalysisTaskLeeYangZeros class object
 };
 
index b252af4..9774b77 100644 (file)
@@ -39,13 +39,13 @@ enum anaModes {mLocal,mLocalPAR,mPROOF,mGRID};
 
 // Flow analysis method can be:(set to kTRUE or kFALSE)
 Bool_t SP    = kTRUE;
-Bool_t LYZ1  = kTRUE;
+Bool_t LYZ1  = kFALSE;
 Bool_t LYZ2  = kFALSE;
-Bool_t LYZEP = kFALSE;
-Bool_t GFC   = kTRUE;
-Bool_t QC    = kTRUE;
-Bool_t FQD   = kTRUE;
-Bool_t MCEP  = kTRUE;
+Bool_t LYZEP = kTRUE;
+Bool_t GFC   = kFALSE;
+Bool_t QC    = kFALSE;
+Bool_t FQD   = kFALSE;
+Bool_t MCEP  = kFALSE;
 
 // Analysis type can be ESD, AOD, MC, ESDMC0, ESDMC1
 const TString type = "ESD";
@@ -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 = 64, 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) 
 
 {
@@ -420,28 +420,19 @@ if (mode==mLocal || mode == mLocalPAR || mode == mGRID) {
    mgr->AddTask(taskSP);
  }
  if (LYZ1){
-   AliAnalysisTaskLeeYangZeros *taskLYZ1 = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZeros",kTRUE,kFALSE);
-   taskLYZ1->SetAnalysisType(type);
+   AliAnalysisTaskLeeYangZeros *taskLYZ1 = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZeros",kTRUE);
    taskLYZ1->SetFirstRunLYZ(kTRUE);
    taskLYZ1->SetUseSumLYZ(kTRUE);
-   taskLYZ1->SetCFManager1(cfmgr1);
-   taskLYZ1->SetCFManager2(cfmgr2);
    mgr->AddTask(taskLYZ1);
  }
  if (LYZ2){
-   AliAnalysisTaskLeeYangZeros *taskLYZ2 = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZeros",kFALSE,kFALSE);
-   taskLYZ2->SetAnalysisType(type);
+   AliAnalysisTaskLeeYangZeros *taskLYZ2 = new AliAnalysisTaskLeeYangZeros("TaskLeeYangZeros",kFALSE);
    taskLYZ2->SetFirstRunLYZ(kFALSE);
    taskLYZ2->SetUseSumLYZ(kTRUE);
-   taskLYZ2->SetCFManager1(cfmgr1);
-   taskLYZ2->SetCFManager2(cfmgr2);
    mgr->AddTask(taskLYZ2);
  }
  if (LYZEP){
-   AliAnalysisTaskLYZEventPlane *taskLYZEP = new AliAnalysisTaskLYZEventPlane("TaskLYZEventPlane",kFALSE);
-   taskLYZEP->SetAnalysisType(type);
-   taskLYZEP->SetCFManager1(cfmgr1);
-   taskLYZEP->SetCFManager2(cfmgr2);
+   AliAnalysisTaskLYZEventPlane *taskLYZEP = new AliAnalysisTaskLYZEventPlane("TaskLYZEventPlane");
    mgr->AddTask(taskLYZEP);
  }
  if (GFC){
@@ -576,17 +567,17 @@ if (mode==mLocal || mode == mLocalPAR || mode == mGRID) {
    mgr->ConnectOutput(taskSP,0,coutputSP);
  } 
  if (LYZ1) { 
-   mgr->ConnectInput(taskLYZ1,0,cinput1); 
+   mgr->ConnectInput(taskLYZ1,0,coutputFE); 
    mgr->ConnectOutput(taskLYZ1,0,coutputLYZ1);
  }  
  if (LYZ2) { 
-   mgr->ConnectInput(taskLYZ2,0,cinput1); 
+   mgr->ConnectInput(taskLYZ2,0,coutputFE); 
    mgr->ConnectInput(taskLYZ2,1,cinputLYZ2);
    mgr->ConnectOutput(taskLYZ2,0,coutputLYZ2);
    cinputLYZ2->SetData(fInputListLYZ2);
  }  
  if (LYZEP) { 
-   mgr->ConnectInput(taskLYZEP,0,cinput1); 
+   mgr->ConnectInput(taskLYZEP,0,coutputFE); 
    mgr->ConnectInput(taskLYZEP,1,cinputLYZEP);
    mgr->ConnectOutput(taskLYZEP,0,coutputLYZEP);
    cinputLYZEP->SetData(fInputListLYZEP);