Skip to content

Commit

Permalink
Merge pull request #26896 from perrotta/byConstructionANodeCannotHave…
Browse files Browse the repository at this point in the history
…JustOneSon

Fix HGCal KDTreeLinkerAlgoT.h: in the non-leaf case both left and right sons must exist
  • Loading branch information
cmsbuild committed May 24, 2019
2 parents 319d932 + 3ccddf3 commit 7087b99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RecoLocalCalo/HGCalRecAlgos/interface/KDTreeLinkerAlgoT.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ KDTreeLinkerAlgo<DATA,DIM>::recSearch(const KDTreeNodeT<DATA,DIM> *current,
((current->left != 0) && (current->right == 0))));
*/

if ((current->left == nullptr) && (current->right == nullptr)) {//leaf case
if ((current->left == nullptr) || (current->right == nullptr)) {//leaf case

// If point inside the rectangle/area
bool isInside = true;
Expand Down

0 comments on commit 7087b99

Please sign in to comment.