Commit in lcsim/src/org/lcsim/recon/cluster/mipfinder on MAIN
FlexibleMIPFinder.java+10-21.2 -> 1.3
MJC: Allow for another case of geometry confusion

lcsim/src/org/lcsim/recon/cluster/mipfinder
FlexibleMIPFinder.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- FlexibleMIPFinder.java	18 Oct 2007 17:05:19 -0000	1.2
+++ FlexibleMIPFinder.java	18 Oct 2007 17:46:35 -0000	1.3
@@ -22,7 +22,7 @@
  * and have 1 or 2 other hits within a 5x5x3 grid
  *
  * @author Mat Charles
- * @version $Id: FlexibleMIPFinder.java,v 1.2 2007/10/18 17:05:19 mcharles Exp $
+ * @version $Id: FlexibleMIPFinder.java,v 1.3 2007/10/18 17:46:35 mcharles Exp $
  */
 
 public class FlexibleMIPFinder extends Driver
@@ -138,7 +138,15 @@
 		} else {
 		    // This is not a wide-window hit.
 		    List<CalorimeterHit> neighboursOfNeighbour = cacheNeighbours.get(neighbour);
-		    if (neighboursOfNeighbour.contains(hit)) { throw new AssertionError("Book-keeping error"); }
+		    if (neighboursOfNeighbour.contains(hit)) { 
+			// We shouldn't be a near-neighbour of this hit if it isn't a near-neighbour of ours...
+			// ... unless this is The Bug again. Check:
+			if (buggedNeighbourRelationships.get(neighbour.getCellID()) != null && buggedNeighbourRelationships.get(neighbour.getCellID()).contains(hit.getCellID())) {
+			    // No worries -- it's the bug
+			} else {
+			    throw new AssertionError("Book-keeping error"); 
+			}
+		    }
 		    if (neighboursOfNeighbour.size() > 2) {
 			// This is a DoubleHit so we can't add any more to it
 		    } else {
CVSspam 0.2.8