Commit in hps-java/src/main/java/org/lcsim/hps/users/phansson on MAIN
WTrack.java+8-91.5 -> 1.6
Fixed debug flags

hps-java/src/main/java/org/lcsim/hps/users/phansson
WTrack.java 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- WTrack.java	27 Nov 2012 02:17:29 -0000	1.5
+++ WTrack.java	9 Feb 2013 00:32:06 -0000	1.6
@@ -165,7 +165,7 @@
          * Find the approximate path length to the point xp 
          * in arbitrary oriented, constant magnetic field with unit vector h
          */
-        boolean debug = true;
+        
         double a = track.getBfieldConstant();
         Hep3Vector p0 = track.getP0();
         Hep3Vector x0 = track.getX0();
@@ -199,7 +199,7 @@
 //            System.out.println(" I should never get here! (root1=" + root1 + " root2=" + root2+")");
 //            System.exit(1);
 //        }
-        if((debug)) {
+        if(_debug) {
                 System.out.println(" getPathLengthToPlaneApprox ");
                 System.out.println(" " + track.toString());
                 System.out.println(" xp " + xp.toString());
@@ -262,7 +262,7 @@
          * point xp is the point 
          * h is a unit vector in the direction of the magnetic field
          */
-        boolean debug = true;
+        
         // Find track parameters at that path length
         Hep3Vector p = getMomentumOnHelix(track, s, h);
         Hep3Vector x = getPointOnHelix(track,s, h);
@@ -270,7 +270,7 @@
         Hep3Vector p_tmp = getMomentumOnHelix(track, s);
         Hep3Vector x_tmp = getPointOnHelix(track, s);
         
-        if((debug)) {
+        if(_debug) {
             System.out.println(" point on helix at s");
             System.out.println(" p  " + p.toString() + "   p_tmp " + p_tmp.toString());
             System.out.println(" x  " + x.toString() + "   x_tmp " + x_tmp.toString());
@@ -301,7 +301,6 @@
          * eta: unit vector of the plane
          * h: unit vector of magnetic field
          */
-        boolean debug = true;
         
         
         int iteration = 1;
@@ -310,19 +309,19 @@
         //List<WTrack> tracks = new ArrayList<WTrack>();
         WTrack trk = new WTrack(track);
         while(iteration<=max_iterations_intercept && Math.abs(s_prev)>epsilon_intercept) {
-            if((debug)) System.out.printf("%s: Iteration %d:  s_pref =%.3f delta_s=%.3f\ntrk params: [%s] \n",this.getClass().getSimpleName(),iteration,s_prev,delta_s,paramsToString());
+            if(_debug) System.out.printf("%s: Iteration %d:  s_pref =%.3f delta_s=%.3f\ntrk params: [%s] \n",this.getClass().getSimpleName(),iteration,s_prev,delta_s,paramsToString());
                 
             // Start by approximating the path length to the point
             double s = getPathLengthToPlaneApprox(trk, xp, eta, h);
             
-            if((debug)) System.out.printf("%s: Iteration %d: path length step s=%.3f\n",this.getClass().getSimpleName(),iteration,s);
+            if(_debug) System.out.printf("%s: Iteration %d: path length step s=%.3f\n",this.getClass().getSimpleName(),iteration,s);
             
             // Find the track parameters at this point
             double[] params = getHelixParametersAtPathLength(trk, s, h);
             // update the track parameters           
             trk.setTrackParameters(params);
             
-            if((debug)) System.out.printf("%s: Iteration %d: updated trak params: [%s]\n",this.getClass().getSimpleName(),iteration,trk.paramsToString());
+            if(_debug) System.out.printf("%s: Iteration %d: updated trak params: [%s]\n",this.getClass().getSimpleName(),iteration,trk.paramsToString());
             
             //tracks.add(trk);
             iteration++;
@@ -335,7 +334,7 @@
             
         }
         
-        if((debug)) System.out.printf("%s: final s=%.3f and ds=%.3f after %d iterations with track params: [%s]\n",this.getClass().getSimpleName(),s_prev,delta_s,iteration,trk.paramsToString());
+        if(_debug) System.out.printf("%s: final s=%.3f and ds=%.3f after %d iterations with track params: [%s]\n",this.getClass().getSimpleName(),s_prev,delta_s,iteration,trk.paramsToString());
         
         Hep3Vector point = trk.getX0();
         return point;
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1