Skip to content

Commit

Permalink
check if any tracks were added before parsing the data
Browse files Browse the repository at this point in the history
  • Loading branch information
slava77 authored Mar 1, 2024
1 parent 609dfd1 commit 0bd0f14
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,12 @@ DAClusterizerInZT_vect::track_t DAClusterizerInZT_vect::fill(const vector<reco::
sumtkwt += t_tkwt;
}

tks.extractRaw();
tks.osumtkwt = sumtkwt > 0 ? 1. / sumtkwt : 0.;
if (sumtkwt > 0) {
tks.extractRaw();
tks.osumtkwt = 1. / sumtkwt;
} else {
tks.osumtkwt = 0.;
}

#ifdef DEBUG
if (DEBUGLEVEL > 0) {
Expand Down

0 comments on commit 0bd0f14

Please sign in to comment.