diff --git a/reconstruction/htcc/src/main/java/org/jlab/rec/htcc/HTCCReconstruction.java b/reconstruction/htcc/src/main/java/org/jlab/rec/htcc/HTCCReconstruction.java index 4b503bc51..ca3d0bcf2 100644 --- a/reconstruction/htcc/src/main/java/org/jlab/rec/htcc/HTCCReconstruction.java +++ b/reconstruction/htcc/src/main/java/org/jlab/rec/htcc/HTCCReconstruction.java @@ -61,9 +61,9 @@ public void processEvent(DataEvent event) { // Place all of the hits into clusters List clusters = new ArrayList(); - HTCCCluster cluster; - while (!remainingHits.isEmpty() && (cluster = findCluster(remainingHits)) != null) { - clusters.add(cluster); + while (!remainingHits.isEmpty()) { + HTCCCluster cluster = findCluster(remainingHits); + if(cluster!=null) clusters.add(cluster); } // Push all of the clusters into the bank and print the results