Added request for B-field initialization to AddCentralityTask
authorRuben Shahoyan <ruben.shahoyan@cern.ch>
Fri, 6 Dec 2013 21:26:20 +0000 (22:26 +0100)
committerRuben Shahoyan <ruben.shahoyan@cern.ch>
Fri, 6 Dec 2013 21:26:20 +0000 (22:26 +0100)
ANALYSIS/macros/AddTaskCentrality.C

index aeb2496..52d4452 100644 (file)
@@ -17,6 +17,10 @@ AliCentralitySelectionTask *AddTaskCentrality(Bool_t fillHistos=kTRUE, Bool_t ao
     ::Error("AddTaskCentrality", "This task works only on ESD analysis");
     return NULL;
   }
+  //
+  AliInputEventHandler* hdl = (AliInputEventHandler*)mgr->GetInputEventHandler();
+  if (hdl) hdl->SetNeedField(); 
+  //
   AliCentralitySelectionTask *centralityTask = new AliCentralitySelectionTask("CentralitySelection");
   centralityTask->SetInput(inputDataType);
   centralityTask->SelectCollisionCandidates(AliVEvent::kAny);