Print

Print


Commit in lcsim/src/org/lcsim/event/base on MAIN
BaseTrack.java+13-121.14 -> 1.15
change BaseTrack to use TrackStates in get methods

lcsim/src/org/lcsim/event/base
BaseTrack.java 1.14 -> 1.15
diff -u -r1.14 -r1.15
--- BaseTrack.java	4 Jul 2012 15:54:35 -0000	1.14
+++ BaseTrack.java	18 Oct 2012 19:32:29 -0000	1.15
@@ -20,14 +20,15 @@
  * 
  * @author Norman Graf
  * @author Jeremy McCormick
- * @version $Id: BaseTrack.java,v 1.14 2012/07/04 15:54:35 grefe Exp $
+ * @version $Id: BaseTrack.java,v 1.15 2012/10/18 19:32:29 jeremy Exp $
  */
 // FIXME: Needs to be made compatible with LCIO 2.0 which has TrackStates.
 public class BaseTrack implements Track
 {
-    // These three now stored in TrackStates but kept here for backward compatibility.
+    // These three now stored in TrackStates but kept here for backward compatibility. 
     protected double[] _refPoint = new double[3];
     protected double[] _parameters = new double[5];
+    
     protected SymmetricMatrix _covMatrix = new SymmetricMatrix(5);
     
     protected double[] _momentum = new double[3];
@@ -250,7 +251,7 @@
 // TODO augment this with a SpacePoint.
     public double[] getReferencePoint()
     {
-        return _refPoint;
+        return getFirstTrackState().getReferencePoint();
     }
     /**
      * Return the x position of the reference point for this track.
@@ -258,7 +259,7 @@
      */
     public double getReferencePointX()
     {
-        return _refPoint[0];
+        return getFirstTrackState().getReferencePoint()[0];
     }
     /**
      * Return the y position of the reference point for this track.
@@ -266,7 +267,7 @@
      */
     public double getReferencePointY()
     {
-        return _refPoint[1];
+        return getFirstTrackState().getReferencePoint()[1];
     }
     /**
      * Return the z position of the reference point for this track.
@@ -274,7 +275,7 @@
      */
     public double getReferencePointZ()
     {
-        return _refPoint[2];
+        return getFirstTrackState().getReferencePoint()[2];
     }
     /**
      * Is the reference point for this track the DCA? This needs clarification
@@ -291,7 +292,7 @@
      */
     public double[] getMomentum()
     {
-        return _momentum;
+        return getFirstTrackState().getMomentum();
     }
     /**
      * The x component of the momentum of this track.
@@ -299,7 +300,7 @@
      */
     public double getPX()
     {
-        return _momentum[0];
+        return getFirstTrackState().getMomentum()[0];
     }
     /**
      * The y component of the momentum of this track.
@@ -307,7 +308,7 @@
      */
     public double getPY()
     {
-        return _momentum[1];
+        return getFirstTrackState().getMomentum()[1];
     }
     /**
      * The z component of the momentum of this track.
@@ -315,7 +316,7 @@
      */
     public double getPZ()
     {
-        return _momentum[2];
+        return getFirstTrackState().getMomentum()[2];
     }
     
     /**
@@ -334,7 +335,7 @@
      */
     public double getTrackParameter(int i)
     {
-        return _parameters[i];
+        return getFirstTrackState().getParameter(i);
     }
     /**
      * Return the track parameters.
@@ -343,7 +344,7 @@
      */
     public double[] getTrackParameters()
     {
-        return _parameters;
+        return getFirstTrackState().getParameters();
     }
 
     /**
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