message: Fix Ds Task an cleaning
diff: @@ -679,7 +679,7 @@ void AliAnalysisTaskSEDs::UserExec(Option_t * /*option*/)
  // vHF object is needed to call the method that refills the missing info of the candidates
  // if they have been deleted in dAOD reconstruction phase
  // in order to reduce the size of the file
  - AliAnalysisVertexingHF *vHF = new AliAnalysisVertexingHF();
  + AliAnalysisVertexingHF vHF = AliAnalysisVertexingHF();
  for (Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++)
  {
  @@ -693,7 +693,7 @@ void AliAnalysisTaskSEDs::UserExec(Option_t * /*option*/)
  TObjArray arrTracks(3);
  for(Int_t ipr=0;ipr<3;ipr++){
  - AliAODTrack *tr=vHF->GetProng(aod,d,ipr);
  + AliAODTrack *tr=vHF.GetProng(aod,d,ipr);
  arrTracks.AddAt(tr,ipr);
  }
  if(!fAnalysisCuts->PreSelect(arrTracks)){
  @@ -701,7 +701,7 @@ void AliAnalysisTaskSEDs::UserExec(Option_t * /*option*/)
  continue;
  }
  - if (!(vHF->FillRecoCand(aod, d)))
  + if (!(vHF.FillRecoCand(aod, d)))
  { ////Fill the data members of the candidate only if they are empty.
  fHistNEvents->Fill(14); //monitor how often this fails
  continue;
  @@ -731,14 +731,23 @@ void AliAnalysisTaskSEDs::UserExec(Option_t * /*option*/)
  Double_t invMass_KKpi = 0.;
  Double_t invMass_piKK = 0.;
  - if(fCreateMLtree && fEnableCandSampling) { // apply sampling in pt
  + if (fCreateMLtree && fEnableCandSampling) // apply sampling in pt
  + {
  Double_t pseudoRand = ptCand * 1000. - (long)(ptCand * 1000);
  if (pseudoRand > fFracCandToKeep && ptCand < fMaxCandPtSampling)
  + {
  + if (unsetvtx)
  + d->UnsetOwnPrimaryVtx();
  continue;
  }
  + }
  - if (isFidAcc)
  + if (!isFidAcc) // check if candidate is in acceptance
  {
  + if (unsetvtx)
  + d->UnsetOwnPrimaryVtx();
  + continue;
  + }
  Int_t retCodeAnalysisCuts = fAnalysisCuts->IsSelected(d, AliRDHFCuts::kAll, aod);
  Int_t retCodeNoRes = retCodeAnalysisCuts;
  @@ -778,8 +787,13 @@ void AliAnalysisTaskSEDs::UserExec(Option_t * /*option*/)
  Int_t isK0starKKpi = retCodeAnalysisCuts & 16;
  Int_t isK0starpiKK = retCodeAnalysisCuts & 32;
  - if (retCodeAnalysisCuts > 0)
  + if (retCodeAnalysisCuts <= 0)
  {
  + if (unsetvtx)
  + d->UnsetOwnPrimaryVtx();
  + continue;
  + }
  +
  if (fAnalysisCuts->GetIsPrimaryWithoutDaughters())
  {
  if (d->GetOwnPrimaryVtx())
  @@ -1362,8 +1376,6 @@ void AliAnalysisTaskSEDs::UserExec(Option_t * /*option*/)
  }
  }
  }
  - } //if(retCodeAnalysisCuts)
  - } // if(isFidAcc)
  if (unsetvtx)
  d->UnsetOwnPrimaryVtx();
  @@ -1374,8 +1386,6 @@ void AliAnalysisTaskSEDs::UserExec(Option_t * /*option*/)
  fCounter->StoreCandidates(aod, nFiltered, kTRUE);
  fCounter->StoreCandidates(aod, nSelected, kFALSE);
  - delete vHF;
  -
  PostData(1, fOutput);
  PostData(3, fCounter);
  