bug fix
authormcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Dec 2012 14:58:55 +0000 (14:58 +0000)
committermcosenti <mcosenti@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Dec 2012 14:58:55 +0000 (14:58 +0000)
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx

index 5d2bc898231c837de4c2838ef6cea0bfb8c93c96..26d2b8124ab0a0e2c14895f5338f3c01a2501723 100644 (file)
@@ -253,10 +253,10 @@ void AliAnalysisTaskEMCALIsoPhoton::UserExec(Option_t *)
     printf("fESD is ok\n");
   
   AliESDVertex *pv = (AliESDVertex*)fESD->GetPrimaryVertex();
-  if(!pv) {
-    fRecoPV->Fill(0);
+  if(!pv)
     return;
-  }
+  if(!pv->GetStatus())
+    fRecoPV->Fill(0);
   else
     fRecoPV->Fill(1);
   fPVtxZ->Fill(pv->GetZ());