Skip to content

Commit 81f3502

Browse files
tongtongcaobaltzell
authored andcommitted
update ClusterCleanerUtilities::OverlappingClusterResolver()
1 parent b8d6ef4 commit 81f3502

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

reconstruction/dc/src/main/java/org/jlab/rec/dc/cluster/ClusterCleanerUtilities.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ public FittedCluster SecondariesRemover(DataEvent event, FittedCluster clus, Clu
704704
* @return the selected cluster
705705
*/
706706
public FittedCluster OverlappingClusterResolver(FittedCluster thisclus, List<FittedCluster> clusters) {
707-
707+
// Get list for overlapped clusters
708708
List<FittedCluster> overlapingClusters = new ArrayList<>();
709709

710710
for (FittedCluster cls : clusters) {
@@ -742,7 +742,19 @@ public FittedCluster OverlappingClusterResolver(FittedCluster thisclus, List<Fit
742742
}
743743

744744
}
745-
Collections.sort(overlapingClusters);
745+
746+
// Remove clusters in R1&R2 from lists, whose slope is out of limit
747+
// If slope for all of clusters is out of limit, keep all
748+
if(overlapingClusters.size() > 1){
749+
List<FittedCluster> rmClusters = new ArrayList<>();
750+
for(FittedCluster overlapingCls : overlapingClusters){
751+
if(overlapingCls.get_Superlayer() <=4 && Math.abs(overlapingCls.get_clusterLineFitSlope()) > 0.578) //tan(30 deg)
752+
rmClusters.add(overlapingCls);
753+
}
754+
if(overlapingClusters.size() > rmClusters.size()) overlapingClusters.removeAll(rmClusters);
755+
}
756+
757+
Collections.sort(overlapingClusters); // Order overlapping clusters; 1st priortiy: cluster size; 2nd priority if same cluster size : fitting quality
746758

747759
// return the largest cluster.
748760
return overlapingClusters.get(0);

0 commit comments

Comments
 (0)