Removed hardcoded selection of the offline trigger mask.
authorpolicheh <Boris.Polishchuk@cern.ch>
Sun, 12 Oct 2014 12:24:09 +0000 (16:24 +0400)
committerpolicheh <Boris.Polishchuk@cern.ch>
Sun, 12 Oct 2014 12:25:56 +0000 (16:25 +0400)
PWGGA/PHOSTasks/PHOS_pPb/AddTaskPHOSPi0pPbMC.C
PWGGA/PHOSTasks/PHOS_pPb/AddTaskPHOSPi0pPbMCAOD.C

index 7bea71d..115b6c2 100644 (file)
@@ -1,40 +1,40 @@
-AliAnalysisTaskPi0FlowMC* AddTaskPHOSPi0pPbMC (Bool_t kWeightsApplied = kFALSE,    
-                                              const char* name = "PHOSPi0pPbMC",
-                                              const char* options = "",
-                                              UInt_t offlineTriggerMask = AliVEvent::kINT7,
-                                              const char* centrality = "V0M",
-                                              const Int_t nCentBins = 5,
-                                              const Int_t centEdge0 = 0,
-                                              const Int_t centEdge1 = 20,
-                                              const Int_t centEdge2 = 40,
-                                              const Int_t centEdge3 = 60,
-                                              const Int_t centEdge4 = 80,
-                                              const Int_t centEdge5 = 100)
+AliAnalysisTaskPi0FlowMC* AddTaskPHOSPi0pPbMC (Bool_t kWeightsApplied = kFALSE,
+                                               const char* name = "PHOSPi0pPbMC",
+                                               const char* options = "",
+                                               UInt_t offlineTriggerMask = AliVEvent::kINT7,
+                                               const char* centrality = "V0M",
+                                               const Int_t nCentBins = 5,
+                                               const Int_t centEdge0 = 0,
+                                               const Int_t centEdge1 = 20,
+                                               const Int_t centEdge2 = 40,
+                                               const Int_t centEdge3 = 60,
+                                               const Int_t centEdge4 = 80,
+                                               const Int_t centEdge5 = 100)
 {
-  //Add a task AliAnalysisTaskPi0FlowMC to the analysis train, for LHC13 PbP MC productions
-  //Author:  Paul Baetzing
-  /* $Id$ */
-
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskPHOSPi0pPbMC", "No analysis manager to connect to");
-    return NULL;
-  }
-  
-  if (!mgr->GetInputEventHandler()) {
-    ::Error("AddTaskPHOSPi0pPbMC", "This task requires an input event handler");
-    return NULL;
-  }
-
-  AliAnalysisTaskPi0FlowMC* task;
-
-  if(kWeightsApplied) task  = new AliAnalysisTaskPi0FlowMCParamWeights(Form("%sTask", name));
-  else task  = new AliAnalysisTaskPi0FlowMC(Form("%sTask", name));
-
-  if( AliVEvent::kINT7 == offlineTriggerMask ) {
+    //Add a task AliAnalysisTaskPi0FlowMC to the analysis train, for LHC13 PbP MC productions
+    //Author:  Paul Baetzing
+    /* $Id$ */
+    
+    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+    if (!mgr) {
+        ::Error("AddTaskPHOSPi0pPbMC", "No analysis manager to connect to");
+        return NULL;
+    }
+    
+    if (!mgr->GetInputEventHandler()) {
+        ::Error("AddTaskPHOSPi0pPbMC", "This task requires an input event handler");
+        return NULL;
+    }
+    
+    AliAnalysisTaskPi0FlowMC* task;
+    
+    if(kWeightsApplied) task  = new AliAnalysisTaskPi0FlowMCParamWeights(Form("%sTask", name));
+    else task  = new AliAnalysisTaskPi0FlowMC(Form("%sTask", name));
+    
+    
     if (nCentBins<1) {
-      ::Error("AddTaskPHOSPi0pPb", Form("Invalid number of centrality bins: %d",nCentBins));
-      return NULL;
+        ::Error("AddTaskPHOSPi0pPb", Form("Invalid number of centrality bins: %d",nCentBins));
+        return NULL;
     }
     Double_t *cbin = new Double_t[nCentBins+1];
     cbin[0] = centEdge0;
@@ -44,29 +44,29 @@ AliAnalysisTaskPi0FlowMC* AddTaskPHOSPi0pPbMC (Bool_t kWeightsApplied = kFALSE,
     if (nCentBins > 3) cbin[4] = centEdge4;
     if (nCentBins > 4) cbin[5] = centEdge5;
     TArrayD tbin(nCentBins+1, cbin);
-
+    
     Int_t    *nMixed = new Int_t[nCentBins];
     for (Int_t ibin=0; ibin<nCentBins; ibin++) nMixed[ibin] = 20;
     TArrayI tNMixed(nCentBins, nMixed);
     task->SetCentralityBinning(tbin, tNMixed);
-  }
-
-  task->SetCentralityEstimator(centrality);
-
-
-  //task->SetEventMixingRPBinning(9);
-  //task->SetMixingArraysLength(10);
-  task->SelectCollisionCandidates(offlineTriggerMask);
-  
-  task->SetEnablePHOSModule(2, kFALSE);
-
-  mgr->AddTask(task);
-  mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() );
-  
-  TString cname(Form("%sCoutput1", name));
-  TString pname(Form("%s:%s", AliAnalysisManager::GetCommonFileName(), name));
-  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(cname.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, pname.Data());
-  mgr->ConnectOutput(task, 1, coutput1);
-  
-  return task;
+    
+    
+    task->SetCentralityEstimator(centrality);
+    
+    
+    //task->SetEventMixingRPBinning(9);
+    //task->SetMixingArraysLength(10);
+    task->SelectCollisionCandidates(offlineTriggerMask);
+    
+    task->SetEnablePHOSModule(2, kFALSE);
+    
+    mgr->AddTask(task);
+    mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() );
+    
+    TString cname(Form("%sCoutput1", name));
+    TString pname(Form("%s:%s", AliAnalysisManager::GetCommonFileName(), name));
+    AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(cname.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, pname.Data());
+    mgr->ConnectOutput(task, 1, coutput1);
+    
+    return task;
 }
index f3d6d60..e85986b 100644 (file)
@@ -1,37 +1,38 @@
 AliAnalysisTaskPi0FlowMCAOD* AddTaskPHOSPi0pPbMCAOD (const char* name = "PHOSPi0pPbMCAOD",
-                                           const char* options = "",
-                                              UInt_t offlineTriggerMask = AliVEvent::kINT7,
-                                              const char* centrality = "V0M",
-                                              const Int_t nCentBins = 5,
-                                              const Int_t centEdge0 = 0,
-                                              const Int_t centEdge1 = 20,
-                                              const Int_t centEdge2 = 40,
-                                              const Int_t centEdge3 = 60,
-                                              const Int_t centEdge4 = 80,
-                                              const Int_t centEdge5 = 100)
+                                                     const char* options = "",
+                                                     UInt_t offlineTriggerMask = AliVEvent::kINT7,
+                                                     const char* centrality = "V0M",
+                                                     const Int_t nCentBins = 5,
+                                                     const Int_t centEdge0 = 0,
+                                                     const Int_t centEdge1 = 20,
+                                                     const Int_t centEdge2 = 40,
+                                                     const Int_t centEdge3 = 60,
+                                                     const Int_t centEdge4 = 80,
+                                                     const Int_t centEdge5 = 100)
 {
-  //Add a task AliAnalysisTaskPi0FlowMCAOD to the analysis train, for LHC13 pbP MC productions
-  //Author:  Paul Baetzing
-  /* $Id$ */
-
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskPHOSPi0pPbMCAOD", "No analysis manager to connect to");
-    return NULL;
-  }
-  
-  if (!mgr->GetInputEventHandler()) {
-    ::Error("AddTaskPHOSPi0pPbMCAOD", "This task requires an input event handler");
-    return NULL;
-  }
-
-  AliAnalysisTaskPi0FlowMCAOD* task = new AliAnalysisTaskPi0FlowMCAOD(Form("%sTask", name));
-
-  if( AliVEvent::kINT7 == offlineTriggerMask ) {
+    //Add a task AliAnalysisTaskPi0FlowMCAOD to the analysis train, for LHC13 pbP MC productions
+    //Author:  Paul Baetzing
+    /* $Id$ */
+    
+    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+    if (!mgr) {
+        ::Error("AddTaskPHOSPi0pPbMCAOD", "No analysis manager to connect to");
+        return NULL;
+    }
+    
+    if (!mgr->GetInputEventHandler()) {
+        ::Error("AddTaskPHOSPi0pPbMCAOD", "This task requires an input event handler");
+        return NULL;
+    }
+    
+    AliAnalysisTaskPi0FlowMCAOD* task = new AliAnalysisTaskPi0FlowMCAOD(Form("%sTask", name));
+    
+    
     if (nCentBins<1) {
-      ::Error("AddTaskPHOSPi0pPbMCAOD", Form("Invalid number of centrality bins: %d",nCentBins));
-      return NULL;
+        ::Error("AddTaskPHOSPi0pPbMCAOD", Form("Invalid number of centrality bins: %d",nCentBins));
+        return NULL;
     }
+    
     Double_t *cbin = new Double_t[nCentBins+1];
     cbin[0] = centEdge0;
     cbin[1] = centEdge1;
@@ -40,29 +41,29 @@ AliAnalysisTaskPi0FlowMCAOD* AddTaskPHOSPi0pPbMCAOD (const char* name = "PHOSPi0
     if (nCentBins > 3) cbin[4] = centEdge4;
     if (nCentBins > 4) cbin[5] = centEdge5;
     TArrayD tbin(nCentBins+1, cbin);
-
+    
     Int_t    *nMixed = new Int_t[nCentBins];
     for (Int_t ibin=0; ibin<nCentBins; ibin++) nMixed[ibin] = 20;
     TArrayI tNMixed(nCentBins, nMixed);
     task->SetCentralityBinning(tbin, tNMixed);
-  }
-
-  task->SetCentralityEstimator(centrality);
-
-
-  //task->SetEventMixingRPBinning(9);
-  //task->SetMixingArraysLength(10);
-  task->SelectCollisionCandidates(offlineTriggerMask);
-  
-  task->SetEnablePHOSModule(2, kFALSE);
-
-  mgr->AddTask(task);
-  mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() );
-  
-  TString cname(Form("%sCoutput1", name));
-  TString pname(Form("%s:%s", AliAnalysisManager::GetCommonFileName(), name));
-  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(cname.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, pname.Data());
-  mgr->ConnectOutput(task, 1, coutput1);
-  
-  return task;
+    
+    
+    task->SetCentralityEstimator(centrality);
+    
+    
+    //task->SetEventMixingRPBinning(9);
+    //task->SetMixingArraysLength(10);
+    task->SelectCollisionCandidates(offlineTriggerMask);
+    
+    task->SetEnablePHOSModule(2, kFALSE);
+    
+    mgr->AddTask(task);
+    mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() );
+    
+    TString cname(Form("%sCoutput1", name));
+    TString pname(Form("%s:%s", AliAnalysisManager::GetCommonFileName(), name));
+    AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(cname.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, pname.Data());
+    mgr->ConnectOutput(task, 1, coutput1);
+    
+    return task;
 }