Skip to content

Commit 155ba76

Browse files
authored
Refactor loop for cluster size calculation
1 parent 660cef5 commit 155ba76

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎reconstruction/dc/src/main/java/org/jlab/rec/dc/cluster/ClusterFitter.java‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,13 @@ public FittedCluster BestClusterSelector(List<FittedCluster> clusters, String sy
240240
for (int i=0; i<size; i++) {
241241
if (isBrickWall(clusters.get(i))) {
242242
int LRSum=0;
243-
for(int j=0; j<clusters.get(i).size(); j++) {
243+
int size2 = clusters.get(i).size();
244+
for (int j=0; j<size2; j++) {
244245
LRSum += clusters.get(i).get(j).get_LeftRightAmb();
245246
}
246-
if(LRSum!=0)
247+
if (LRSum != 0) {
247248
continue;
249+
}
248250
}
249251
// set the array of measurements according to the system used in the analysis
250252
SetFitArray(clusters.get(i), system);

0 commit comments

Comments
 (0)