Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ahinzmann committed Aug 23, 2021
1 parent 3c78672 commit 838904e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CommonTools/RecoAlgos/src/PrimaryVertexAssignment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ std::pair<int, PrimaryVertexAssignment::Quality> PrimaryVertexAssignment::charge
}
}

auto firstVertexDz = std::abs(track->dz(vertices.at(0).position()));
double firstVertexDz = std::numeric_limits<double>::max();
if (vertices.size() > 0)
firstVertexDz = std::abs(track->dz(vertices.at(0).position()));
// recover cases where the primary vertex is split
if (useVertexFit_ && (iVertex > 0) && (iVertex <= fNumOfPUVtxsForCharged_) &&
firstVertexDz < fDzCutForChargedFromPUVtxs_)
Expand Down

0 comments on commit 838904e

Please sign in to comment.