Skip to content

Commit

Permalink
Update PFClusterFromHGCalMultiCluster.cc
Browse files Browse the repository at this point in the history
Check if the multicluster is empty and move to the next one before  having to compute the trackster PID, as it was implemented in the 11_1 "backport" PR #31907 (it avoids computing the probabilities when not needed)
@rovere @felicepantaleo
  • Loading branch information
perrotta authored Nov 21, 2020
1 parent d3024a8 commit 3bb3cc9
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,23 @@ void PFClusterFromHGCalMultiCluster::buildClusters(const edm::Handle<reco::PFRec
}

int iMultiClus = -1;

for (const auto& mcl : hgcalMultiClusters) {
iMultiClus++;

// Skip empty multiclusters
if (mcl.hitsAndFractions().empty()) {
continue;
}
// Filter using trackster PID
if (filterByTracksterPID_) {
float probTotal = 0.0f;

for (int cat : filter_on_categories_) {
probTotal += tracksters[iMultiClus].id_probabilities(cat);
}

if (probTotal < pid_threshold_) {
continue;
}
}

if (mcl.hitsAndFractions().empty()) {
continue;
}
DetId seed;
double energy = 0.0, highest_energy = 0.0;
output.emplace_back();
Expand Down

0 comments on commit 3bb3cc9

Please sign in to comment.