hps-java/src/main/java/org/lcsim/hps/recon/vertexing
diff -u -r1.1 -r1.2
--- TwoLineVertexer.java 22 Dec 2012 20:42:51 -0000 1.1
+++ TwoLineVertexer.java 28 Feb 2013 00:00:33 -0000 1.2
@@ -15,7 +15,7 @@
* @author phansson
*/
public class TwoLineVertexer implements SimpleVertexer {
-
+ protected boolean _debug = false;
public TwoLineVertexer() {
}
@@ -30,7 +30,7 @@
* A0 = A1 + (nA/d)*(A2-A1);
* B0 = B1 + (nB/d)*(B2-B1);
*/
- System.out.printf("%s: A1=%s A2=%s B1=%s B2=%s\n", this.getClass().getSimpleName(), A1.toString(), A2.toString(), B1.toString(), B2.toString());
+ if(_debug) System.out.printf("%s: A1=%s A2=%s B1=%s B2=%s\n", this.getClass().getSimpleName(), A1.toString(), A2.toString(), B1.toString(), B2.toString());
double nA = VecOp.dot(VecOp.cross(VecOp.sub(B2, B1), VecOp.sub(A1, B1)), VecOp.cross(VecOp.sub(A2, A1), VecOp.sub(B2, B1)));
double nB = VecOp.dot(VecOp.cross(VecOp.sub(A2, A1), VecOp.sub(A1, B1)), VecOp.cross(VecOp.sub(A2, A1), VecOp.sub(B2, B1)));
double d = VecOp.dot(VecOp.cross(VecOp.sub(A2, A1), VecOp.sub(B2, B1)), VecOp.cross(VecOp.sub(A2, A1), VecOp.sub(B2, B1)));
@@ -39,7 +39,7 @@
Hep3Vector diff = VecOp.sub(B0, A0);
Hep3Vector tmp = VecOp.mult(0.5, diff);
Hep3Vector vertexPos = VecOp.add(A0, tmp);
- System.out.printf("%s: A0=%s B0=%s ==> vtxPos=%s (tmp=%s)\n", this.getClass().getSimpleName(), A0.toString(), B0.toString(), vertexPos.toString(), tmp.toString());
+ if(_debug) System.out.printf("%s: A0=%s B0=%s ==> vtxPos=%s (tmp=%s)\n", this.getClass().getSimpleName(), A0.toString(), B0.toString(), vertexPos.toString(), tmp.toString());
return vertexPos;
}