Commit in lcsim/src/org/lcsim/contrib/uiowa on MAIN
ShowerPointFinder.java+6-31.6 -> 1.7
change value for optimization

lcsim/src/org/lcsim/contrib/uiowa
ShowerPointFinder.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- ShowerPointFinder.java	22 Jul 2008 17:39:04 -0000	1.6
+++ ShowerPointFinder.java	12 Aug 2008 23:03:23 -0000	1.7
@@ -151,8 +151,11 @@
 
 		if (exam > 2) {
 		    if(debug) System.out.println("Debug: showering is already started " + exam + " layers ago" );
-		    if(mipclus.getCalorimeterHits().size() < 5) break; // if hit size is fewer than 5, don't remove 
-		    else for(int k=0; k < 3 ; k++) {
+                    double numRemove = 0;
+		    if(mipclus.getCalorimeterHits().size() < 4) {
+                        numRemove = mipclus.getCalorimeterHits().size() - 1 ; 
+                    } 
+		    for(int k=0; k < numRemove ; k++) {
 			CalorimeterHit toRemove = mipclus.getCalorimeterHits().get(mipclus.getCalorimeterHits().size()-1);
 			mipclus.removeHit(toRemove);
 		    }
@@ -190,7 +193,7 @@
 	    for(long neighbourID : neighbours)
 		if (allHitIDs.contains(neighbourID)) count[i]++;
 	}
-	if ( count[2] >=2 ) exam++ ; // if number of neighbour hits in 5x5 is larger than 1, count 1 
+	if ( count[2] >=1 ) exam++ ; // if number of neighbour hits in 5x5 is larger than 1, count 1 
 	else exam = 0; // if number of neighbour is none, set to zero and start again from 0 
 
 	if(debug){
CVSspam 0.2.8