Skip to content

Commit

Permalink
Do not add vertices w/o contributors to temporary array
Browse files Browse the repository at this point in the history
  • Loading branch information
shahor02 committed Jul 29, 2014
1 parent d2c0316 commit 4be49af
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions STEER/ESD/AliVertexerTracks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1928,6 +1928,11 @@ Bool_t AliVertexerTracks::FindNextVertexMV()
// create indices
int ntrk = fTrkArraySel.GetEntries();
int nindices = fCurrentVertex->GetNContributors() - (fConstraint ? 1:0);
if (nindices<1) {
delete fCurrentVertex;
fCurrentVertex = 0;
return kFALSE;
}
UShort_t *indices = 0;
if (nindices>0) indices = new UShort_t[nindices];
int nadded = 0;
Expand All @@ -1937,8 +1942,10 @@ Bool_t AliVertexerTracks::FindNextVertexMV()
t->SetBit(kBitAccounted);
indices[nadded++] = fIdSel[itr];
}
if (nadded!=nindices) printf("Mismatch : NInd: %d Nadd: %d\n",nindices,nadded);
fCurrentVertex->SetIndices(nindices,indices);
if (nadded!=nindices) {
printf("Mismatch : NInd: %d Nadd: %d\n",nindices,nadded);
}
fCurrentVertex->SetIndices(nadded,indices);
// set vertex title
TString title="VertexerTracksMVNoConstraint";
if(fConstraint) title="VertexerTracksMVWithConstraint";
Expand Down

0 comments on commit 4be49af

Please sign in to comment.