]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/FORWARD/analysis2/AddTaskForwarddNdeta.C
Segregated the Landau+Gaus function from the AliForwardUtil dumping ground. Other...
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AddTaskForwarddNdeta.C
index 0556d474f8c6350f280bbd8a386b3d3ec0805431..4e84b99ffbb1e789a416e62576f0b965b56bb7aa 100644 (file)
  * @param useCent   Whether to use the centrality or not
  * @param scheme    Normalisation scheme
  * @param cutEdges  Whether to cut edges when rebinning 
+ * @param trigEff   Trigger efficiency 
+ * @param trigEff0  Trigger efficiency for 0-bin
+ * @param corrEmpty Correct for empty bins 
+ * @param satVtx    Set to true for satellite analysis
  * @param mcanalysisfilename Take final MC corrections from this - if present
  * 
  * @return Newly created and configured task
@@ -34,7 +38,8 @@ AddTaskForwarddNdeta(const char* trig     = "INEL",
                     Double_t    trigEff  = 1, 
                     Double_t    trigEff0 = 1,
                     Bool_t      corrEmpty= false,
-                    const char* mcanalysisfilename = "none")
+                    Bool_t      satVtx   = false,
+                    const char* mcanalysisfilename = "/home/hehi/alex/work/dispVtxDNdeta/mcCorrectionPos.root")
 {
   // --- Load libraries ----------------------------------------------
   gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2");
@@ -57,7 +62,7 @@ AddTaskForwarddNdeta(const char* trig     = "INEL",
   task->SetMCFinalCorrFilename(mcanalysisfilename);
   
   // Set the vertex range to use 
-  task->SetVertexRange(vzMin, vzMax);
+  task->SetIpZRange(vzMin, vzMax);
   // Set the trigger mask to use (INEL,INEL>0,NSD)
   task->SetTriggerMask(trig);
   // Set the trigger efficiency 
@@ -95,26 +100,13 @@ AddTaskForwarddNdeta(const char* trig     = "INEL",
   // inclusive to b exclusive.  An upper bound of 100 is treated
   // especially, and the upper bound is inclusive in that case .
   if (useCent) {
-    Short_t bins[] = { 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
-    task->SetCentralityAxis(11, bins);
+    Short_t bins[] = { 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 100 };
+    task->SetCentralityAxis(10, bins);
   }
-  mgr->AddTask(task);
-
-  // --- create containers for input/output --------------------------
-  AliAnalysisDataContainer *sums = 
-    mgr->CreateContainer("ForwardSums", TList::Class(), 
-                        AliAnalysisManager::kOutputContainer, 
-                        AliAnalysisManager::GetCommonFileName());
-  AliAnalysisDataContainer *output = 
-    mgr->CreateContainer("ForwardResults", 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);
+  // Set satellite vertex flag
+  task->SetSatelliteVertices(satVtx);
 
+  task->Connect(0,0);
   return task;
 }