lcsim/src/org/lcsim/recon/cluster/mipfinder
diff -u -r1.4 -r1.5
--- NonProjectiveMipFinder.java 3 Jul 2008 00:14:34 -0000 1.4
+++ NonProjectiveMipFinder.java 22 Oct 2008 22:52:17 -0000 1.5
@@ -29,7 +29,7 @@
* and curving MIPs better.
*
* @author Mat Charles <[log in to unmask]>
- * @version $Id: NonProjectiveMipFinder.java,v 1.4 2008/07/03 00:14:34 jeremy Exp $
+ * @version $Id: NonProjectiveMipFinder.java,v 1.5 2008/10/22 22:52:17 mcharles Exp $
*/
public class NonProjectiveMipFinder extends Driver implements Clusterer
@@ -820,6 +820,8 @@
id.setID(neighbour);
long[] neighboursOfNeighbour = id.getNeighbourIDs(0,1,1);
if (neighboursOfNeighbour.length == 0) {
+ // Minor geometry problem -- not fatal.
+ if (m_debug) {
System.out.println("ERROR: Hit has no neighbours!");
Hep3Vector hit2pos = new BasicHep3Vector(lastNeighbourHit.getPosition());
long tryAgainID = id.findCellContainingXYZ(hit2pos.x(), hit2pos.y(), hit2pos.z());
@@ -829,6 +831,7 @@
} else {
System.out.println("id.findCellContainingXYZ maps "+neighbour+" at ("+hit2pos.x()+", "+hit2pos.y()+", "+hit2pos.z()+") -> "+tryAgainID+" -- ERROR");
}
+ }
}
boolean foundReverseMap = false;
for (long neighbourOfNeighbour : neighboursOfNeighbour) {
@@ -864,9 +867,10 @@
double non_y = id.getY();
double non_z = id.getZ();
double non_r = Math.sqrt(non_x*non_x + non_y*non_y);
- System.out.println(" * Hit "+neighbour+" has neighbour "+neighbourOfNeighbour+" at ("+non_x+", "+non_y+", "+non_z+") -- r="+non_r);
+ if (m_debug) { System.out.println(" * Hit "+neighbour+" has neighbour "+neighbourOfNeighbour+" at ("+non_x+", "+non_y+", "+non_z+") -- r="+non_r); }
}
- System.out.println("Inconsistency in neighbours map: Hit (id="+hitID+") in layer "+getLayer(hit)+" has neighbour "+neighbour
+ if (m_debug) {
+ System.out.println("Inconsistency in neighbours map: Hit (id="+hitID+") in layer "+getLayer(hit)+" has neighbour "+neighbour
+", but hit "+neighbour+" in layer "+getLayer(lastNeighbourHit)+" does not have "+hitID+" as a neighbour."
+" hit1 is at (r="+r1+", costh="+costh1+", x="+hit1pos.x()+", y="+hit1pos.y()+", z="+hit1pos.z()+");"
+" hit2 is at (r="+r2+", costh="+costh2+", x="+hit2pos.x()+", y="+hit2pos.y()+", z="+hit2pos.z()+");"
@@ -874,7 +878,8 @@
+" -- hit1 has "+neighbours.length+" neighbours and hit2 has "+neighboursOfNeighbour.length+" neighbours."
+" -- hit1 has phi="+hit1_phi+" and gridphi="+hit1_gridphi+" and dphi="+hit1_dphi
+" -- hit2 has phi="+hit2_phi+" and gridphi="+hit2_gridphi
- );
+ );
+ }
vetoHitIDs.add(hitID);
vetoHitIDs.add(neighbour);
vetoHits.add(hit);