Skip to content

Commit

Permalink
check if any tracks were added before parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
slava77 authored Mar 1, 2024
1 parent 0bd0f14 commit cb42603
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions RecoVertex/PrimaryVertexProducer/src/DAClusterizerInZ_vect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,12 @@ DAClusterizerInZ_vect::track_t DAClusterizerInZ_vect::fill(const vector<reco::Tr
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 cb42603

Please sign in to comment.