Added script
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Feb 2011 13:57:27 +0000 (13:57 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Feb 2011 13:57:27 +0000 (13:57 +0000)
PWG2/FORWARD/analysis2/AddTaskCentraldNdeta.C [new file with mode: 0644]

diff --git a/PWG2/FORWARD/analysis2/AddTaskCentraldNdeta.C b/PWG2/FORWARD/analysis2/AddTaskCentraldNdeta.C
new file mode 100644 (file)
index 0000000..ef39fb4
--- /dev/null
@@ -0,0 +1,46 @@
+/**
+ * @file   AddTaskCentraldNdeta.C
+ * @author Christian Holm Christensen <cholm@nbi.dk>
+ * @date   Fri Jan 28 10:22:26 2011
+ * 
+ * @brief Script to add a multiplicity task for the central
+ *        @f$\eta@f$ region
+ * 
+ * 
+ */
+AliAnalysisTask*
+AddTaskCentraldNdeta(const char* trig="INEL", Double_t vzMin=-10, Double_t vzMax=10)
+{
+  // analysis manager
+  AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
+  
+  // Make our object.  2nd argumenent is absolute max Eta 
+  // 3rd argument is absolute max Vz
+  AliCentraldNdetaTask* task = new AliCentraldNdetaTask("Central");
+  task->SetVertexRange(vzMin, vzMax);
+  task->SetTriggerMask(trig);
+  mgr->AddTask(task);
+
+  // create containers for input/output
+  AliAnalysisDataContainer *sums = 
+    mgr->CreateContainer("CentralSums", TList::Class(), 
+                        AliAnalysisManager::kOutputContainer, 
+                        AliAnalysisManager::GetCommonFileName());
+  AliAnalysisDataContainer *output = 
+    mgr->CreateContainer("CentralResults", TList::Class(), 
+                        AliAnalysisManager::kParamContainer, 
+                        AliAnalysisManager::GetCommonFileName());
+  
+  // connect input/output
+  mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
+  mgr->ConnectOutput(task, 1, sums);
+  mgr->ConnectOutput(task, 2, output);
+
+  return task;
+}
+
+  
+//________________________________________________________________________
+//
+// EOF
+//