Skip to content

KLFitterTool: protect against negative number of jets to cut

fixed bug in KLFitterTool: In rare cases the number of jets to delete could become a negative number. The vector::erase() would then remove more jets than available (but still succeed in our tests) but leave the vector with a size of 2^64-1. Subsequent attempts to copy the vector then fail with bad_alloc(). The fix simply makes 0 the lower limit of the cut, such that erase will never start at a memory location prior to begin().

Merge request reports