include check for centrality == 0
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Jun 2012 10:02:28 +0000 (10:02 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Jun 2012 10:02:28 +0000 (10:02 +0000)
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBF.cxx

index a3ce34f..798f4d8 100755 (executable)
@@ -660,6 +660,10 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
       //Centrality stuff (centrality in AOD header)
       if(fUseCentrality) {
        fCentrality = aodHeader->GetCentralityP()->GetCentralityPercentile(fCentralityEstimator.Data());
+
+       // in OLD AODs (i.e. AOD049) fCentrality can be == 0
+       if(fCentrality == 0) 
+         return;
        
        // QA for centrality estimators
        fHistCentStats->Fill(0.,aodHeader->GetCentralityP()->GetCentralityPercentile("V0M"));