hps-java/src/main/java/org/lcsim/hps/recon/tracking
diff -u -r1.20 -r1.21
--- TrackUtils.java 3 Jul 2013 23:23:23 -0000 1.20
+++ TrackUtils.java 12 Jul 2013 20:58:55 -0000 1.21
@@ -28,7 +28,7 @@
/**
*
* @author Omar Moreno <[log in to unmask]>
- * @version $Id: TrackUtils.java,v 1.20 2013/07/03 23:23:23 phansson Exp $
+ * @version $Id: TrackUtils.java,v 1.21 2013/07/12 20:58:55 phansson Exp $
* TODO: Switch to JLab coordinates
*/
@@ -270,9 +270,11 @@
* Use code in WTrack to find the iterative solution to the interception
*/
boolean debug = false;
- WTrack wtrack = new WTrack(helfit,bfield,true); // B-field sign is flipped so flip!
- if(debug) System.out.printf("getHelixPlaneIntercept:find intercept between plane defined by point on plane %s, unit vec %s, bfield %.3f, and WTrack \n%s \n",point_on_plane.toString(),unit_vec_normal_to_plane.toString(), bfield,wtrack.toString());
- Hep3Vector intercept_point = wtrack.getHelixAndPlaneIntercept(wtrack,point_on_plane, unit_vec_normal_to_plane, new BasicHep3Vector(0,0,1));
+ boolean flipBfield = true; // be careful
+ Hep3Vector B = new BasicHep3Vector(0,0,flipBfield?-1:1);
+ WTrack wtrack = new WTrack(helfit,bfield,flipBfield); //
+ if(debug) System.out.printf("getHelixPlaneIntercept:find intercept between plane defined by point on plane %s, unit vec %s, bfield %.3f, h=%s and WTrack \n%s \n",point_on_plane.toString(),unit_vec_normal_to_plane.toString(), bfield, B.toString(),wtrack.toString());
+ Hep3Vector intercept_point = wtrack.getHelixAndPlaneIntercept(point_on_plane, unit_vec_normal_to_plane, B);
if(debug) System.out.printf("getHelixPlaneIntercept: found intercept point at %s\n",intercept_point.toString());
return intercept_point;
}