From 49554ecc617aa88eb2cdc0870e5361863ff878c8 Mon Sep 17 00:00:00 2001 From: Abhirikshma Date: Thu, 28 Apr 2022 20:15:43 +0200 Subject: [PATCH] Fix incorrect inclusion of tracks in candidates Tracks from the barrel were being included in produced TICLCandidates due to an incorrect for loop in charged candidate creation. --- RecoHGCal/TICL/plugins/LinkingAlgoByPCAGeometric.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RecoHGCal/TICL/plugins/LinkingAlgoByPCAGeometric.cc b/RecoHGCal/TICL/plugins/LinkingAlgoByPCAGeometric.cc index cc8e2697bbb04..3be353d6bea0c 100644 --- a/RecoHGCal/TICL/plugins/LinkingAlgoByPCAGeometric.cc +++ b/RecoHGCal/TICL/plugins/LinkingAlgoByPCAGeometric.cc @@ -144,6 +144,7 @@ void LinkingAlgoByPCAGeometric::linkTracksters(const edm::Handle candidateTrackIds; for (unsigned i = 0; i < tracks.size(); ++i) { const auto tk = tracks[i]; reco::TrackRef trackref = reco::TrackRef(tkH, i); @@ -153,6 +154,9 @@ void LinkingAlgoByPCAGeometric::linkTracksters(const edm::Handle chargedCandidates; std::vector chargedHadronsFromTk; int chargedMask[tracksters.size()] = {0}; - for (unsigned i = 0; i < tracks.size(); ++i) { + for (unsigned i : candidateTrackIds) { if (tracksters_near[i].empty() && tsNearTkAtInt[i].empty()) { // nothing linked to track, make charged hadrons TICLCandidate chargedHad; const auto &tk = tracks[i];