From 6e43ca4ddbc7604cc6821ee343140bc32d5d56bb Mon Sep 17 00:00:00 2001 From: akioogawa <85249930+akioogawa@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:25:38 -0500 Subject: [PATCH] A minor logic fix in StFcsClusterMaker::isNeighbor() (#633) Kumar found a logic flaw in isNeighbor() thus fixing it. Effect is minor --- StRoot/StFcsClusterMaker/StFcsClusterMaker.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StRoot/StFcsClusterMaker/StFcsClusterMaker.cxx b/StRoot/StFcsClusterMaker/StFcsClusterMaker.cxx index 050df3cfbe6..6a92d4d5acf 100644 --- a/StRoot/StFcsClusterMaker/StFcsClusterMaker.cxx +++ b/StRoot/StFcsClusterMaker/StFcsClusterMaker.cxx @@ -285,7 +285,7 @@ float StFcsClusterMaker::isNeighbor(StFcsHit* hit, StFcsCluster* clu){ if(ehp==1) thr=mNeighborDistance_Hcal; float d = distance(hit,h); float e = h->energy(); - if(d < thr) ne=e; + if(d < thr && e>ne) ne=e; } return ne; }