Extension for AOD
[u/mrichter/AliRoot.git] / ANALYSIS / macros / AddTaskEventplane.C
index 1856e85..3d33454 100644 (file)
@@ -13,19 +13,18 @@ AliEPSelectionTask *AddTaskEventplane()
     return NULL;
   }
   TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
-  if (inputDataType != "ESD") {
-    ::Error("AddTaskEventplane", "This task works only on ESD analysis");
-    return NULL;
-  }
   
   AliEPSelectionTask *eventplaneTask = new AliEPSelectionTask("EventplaneSelection");
   eventplaneTask->SelectCollisionCandidates(AliVEvent::kMB);
-  eventplaneTask->SetESDtrackCuts("TPC");
-//   eventplaneTask->SetUseMCRP();
-//   eventplaneTask->SetPhiDistribution("Phidist.root","EPStat");
+  if (inputDataType == "AOD"){
+    eventplaneTask->SetInput("AOD");
+  }
+  eventplaneTask->SetTrackType("TPC");
   eventplaneTask->SetUsePtWeight();
-//   eventplaneTask->SetUsePhiWeight();
-//   eventplaneTask->SetSaveTrackContribution();
+  eventplaneTask->SetUsePhiWeight();
+  eventplaneTask->SetSaveTrackContribution();
+  
   mgr->AddTask(eventplaneTask);
 
   AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer();