Adding addTask macro for tracking uncertainty.
authorakalweit <akalweit@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 24 Oct 2013 12:08:49 +0000 (12:08 +0000)
committerakalweit <akalweit@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 24 Oct 2013 12:08:49 +0000 (12:08 +0000)
PWGPP/EvTrkSelection/macros/AddTaskTrackingUncert.C [new file with mode: 0644]

diff --git a/PWGPP/EvTrkSelection/macros/AddTaskTrackingUncert.C b/PWGPP/EvTrkSelection/macros/AddTaskTrackingUncert.C
new file mode 100644 (file)
index 0000000..26d3f32
--- /dev/null
@@ -0,0 +1,45 @@
+AliAnalysisTask *AddTaskTrackingUncert() {
+  //
+  // add task of tracking uncertainty
+  //
+  //
+  //get the current analysis manager
+  //
+  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+  if (!mgr) {
+    Error("AddTaskTrackingUncert", "No analysis manager found.");
+    return 0;
+  }
+  //  
+  //========= Add task for standard analysis to the ANALYSIS manager ====
+  //
+  AliAnalysisTrackingUncertainties *task    = new AliAnalysisTrackingUncertainties("trackingUncertainty");
+  //
+  task->SelectCollisionCandidates(AliVEvent::kMB);
+  mgr->AddTask(task);
+  //  
+  //  
+  //======================================================================
+  //              data containers
+  //======================================================================
+  //            find input container
+  //below the trunk version
+  AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
+
+  //dummy output container
+  AliAnalysisDataContainer *coutput0 = mgr->CreateContainer("dummyTreeUncert",TTree::Class(),AliAnalysisManager::kExchangeContainer,"defaultTreeUncert");
+
+  //define output containers
+  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("trackingUncert", TList::Class(),AliAnalysisManager::kOutputContainer,"trackingUncert.root");
+
+  //connect containers
+  mgr->ConnectInput  (task, 0, cinput );
+  mgr->ConnectOutput (task, 0, coutput0);
+  mgr->ConnectOutput (task, 1, coutput1);
+  //
+  //
+  //
+  return task;
+
+}
+