Fix for division by zero in RecoBTag/PerformanceDB: Forward port from 7_2_X to 7_3_X

Forward port of #5415