Charged jets (pPb): Implemented more reasonable failsafe vtx cut
authorrhaake <ruediger.haake@cern.ch>
Tue, 29 Apr 2014 10:32:44 +0000 (12:32 +0200)
committerrhaake <ruediger.haake@cern.ch>
Tue, 29 Apr 2014 10:33:15 +0000 (12:33 +0200)
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskChargedJetsPA.cxx

index c978df7..57fbef7 100644 (file)
@@ -553,7 +553,7 @@ inline Bool_t AliAnalysisTaskChargedJetsPA::IsEventInAcceptance(AliVEvent* event
   }
   else // Failsafe vertex cut
   {
-    if(TMath::Abs(event->GetPrimaryVertex()->GetZ()) > 10.0)
+    if(!event->GetPrimaryVertex() || (TMath::Abs(event->GetPrimaryVertex()->GetZ()) > 10.0) || (event->GetPrimaryVertex()->GetNContributors()<1)) 
       return kFALSE;
   }