Protection
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 14 Feb 2011 16:04:48 +0000 (16:04 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 14 Feb 2011 16:04:48 +0000 (16:04 +0000)
PWG3/vertexingHF/AliAnalysisTaskSEDStarSpectra.cxx

index 9ec26a0..233b2c9 100644 (file)
@@ -250,6 +250,7 @@ void AliAnalysisTaskSEDStarSpectra::UserExec(Option_t *)
 
     // D* candidates and D0 from D*
     AliAODRecoCascadeHF* dstarD0pi = (AliAODRecoCascadeHF*)arrayDStartoD0pi->At(iDStartoD0pi);
+    if(!dstarD0pi->GetSecondaryVtx()) continue;
     AliAODRecoDecayHF2Prong* theD0particle = (AliAODRecoDecayHF2Prong*)dstarD0pi->Get2Prong();
     if (!theD0particle) continue;