Possibility to use MB + Central triggers in AddTaskBalanceCentralityTrain.C
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 22 Feb 2012 10:10:54 +0000 (10:10 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 22 Feb 2012 10:10:54 +0000 (10:10 +0000)
PWGCF/EBYE/macros/AddTaskBalanceCentralityTrain.C

index 19b9171..1bc91d0 100644 (file)
@@ -30,6 +30,7 @@ AliAnalysisTaskBF *AddTaskBalanceCentralityTrain(Double_t centrMin=0.,
                                                 Int_t minNClustersTPC = -1,\r
                                                 Bool_t kUsePID = kFALSE,\r
                                                 Int_t AODfilterBit = 128,\r
+                                                Bool_t bCentralTrigger = kFALSE,\r
                                                 TString fileNameBase="AnalysisResults") {\r
 \r
   // Creates a balance function analysis task and adds it to the analysis manager.\r
@@ -60,6 +61,8 @@ AliAnalysisTaskBF *AddTaskBalanceCentralityTrain(Double_t centrMin=0.,
   centralityName+=Form("%d",minNClustersTPC);\r
   centralityName+="_Bit";\r
   centralityName+=Form("%d",AODfilterBit);\r
+  if(bCentralTrigger)   centralityName+="_withCentralTrigger";\r
+\r
 \r
 \r
 \r
@@ -145,8 +148,9 @@ AliAnalysisTaskBF *AddTaskBalanceCentralityTrain(Double_t centrMin=0.,
   // taskBF->UseOfflineTrigger(); // NOT used (selection is done with the AliAnalysisTaskSE::SelectCollisionCandidates()) \r
   // with this only selected events are analyzed (first 2 bins in event QA histogram are the same))\r
   // documentation in https://twiki.cern.ch/twiki/bin/viewauth/ALICE/PWG1EvSelDocumentation\r
-  taskBF->SelectCollisionCandidates(AliVEvent::kMB);\r
-  \r
+  if(bCentralTrigger) taskBF->SelectCollisionCandidates(AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral);\r
+  else                taskBF->SelectCollisionCandidates(AliVEvent::kMB);\r
+\r
   // centrality estimator (default = V0M)\r
   taskBF->SetCentralityEstimator(centralityEstimator);\r
   \r
@@ -172,7 +176,7 @@ AliAnalysisTaskBF *AddTaskBalanceCentralityTrain(Double_t centrMin=0.,
   mgr->ConnectOutput(taskBF, 1, coutQA);\r
   mgr->ConnectOutput(taskBF, 2, coutBF);\r
   if(gRunShuffling) mgr->ConnectOutput(taskBF, 3, coutBFS);\r
-  if(kUsePID) mgr->ConnectOutput(taskBF, 4, coutQAPID);\r
+  if(kUsePID && analysisType == "ESD") mgr->ConnectOutput(taskBF, 4, coutQAPID);\r
 \r
   return taskBF;\r
 }\r