Skip to content

Commit

Permalink
Merge pull request cms-sw#11 from Abhirikshma/geometric_linking_CMSSW…
Browse files Browse the repository at this point in the history
…_12_4_0_pre2

Fix incorrect inclusion of tracks in candidates
  • Loading branch information
felicepantaleo authored Apr 29, 2022
2 parents 82bf232 + 49554ec commit f299c53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion RecoHGCal/TICL/plugins/LinkingAlgoByPCAGeometric.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ void LinkingAlgoByPCAGeometric::linkTracksters(const edm::Handle<std::vector<rec
};

// Propagate tracks
std::vector<unsigned> candidateTrackIds;
for (unsigned i = 0; i < tracks.size(); ++i) {
const auto tk = tracks[i];
reco::TrackRef trackref = reco::TrackRef(tkH, i);
Expand All @@ -153,6 +154,9 @@ void LinkingAlgoByPCAGeometric::linkTracksters(const edm::Handle<std::vector<rec
if (!cutTk((tk)) or muId != -1) {
continue;
}
// record tracks that can used to make a ticlcandidate
candidateTrackIds.push_back(i);

// don't consider tracks below 2 GeV for linking
if (std::sqrt(tk.p() * tk.p() + mpion2) < 2.0)
continue;
Expand Down Expand Up @@ -410,7 +414,7 @@ void LinkingAlgoByPCAGeometric::linkTracksters(const edm::Handle<std::vector<rec
std::vector<TICLCandidate> chargedCandidates;
std::vector<TICLCandidate> 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];
Expand Down

0 comments on commit f299c53

Please sign in to comment.