Skip to content

Commit

Permalink
Merge pull request #31725 from ats2008/PVClusterComparer_BugFix
Browse files Browse the repository at this point in the history
Fix initialisation of maxChi2 data member in PVClusterComparer
  • Loading branch information
cmsbuild committed Oct 12, 2020
2 parents 0da1310 + f46dea9 commit 260347d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,12 @@ double PVClusterComparer::pTSquaredSum(const reco::Vertex &v) {
}

void PVClusterComparer::setChisquareQuantile() {
std::vector<double> maxChi2(20, 0.);
maxChi2_.clear();
maxChi2_.resize(20, 0.0);
if (track_prob_min_ >= 0. && track_prob_min_ <= 1.)
for (size_t ndof = 0; ndof < maxChi2_.size(); ++ndof)
// http://root.cern.ch/root/html/TMath.html#TMath:ChisquareQuantile
maxChi2[ndof] = TMath::ChisquareQuantile(1 - track_prob_min_, ndof);

maxChi2_ = maxChi2;
maxChi2_[ndof] = TMath::ChisquareQuantile(1 - track_prob_min_, ndof);
}

void PVClusterComparer::updateChisquareQuantile(size_t ndof) {
Expand Down

0 comments on commit 260347d

Please sign in to comment.