Print

Print


Commit in lcsim/src/org/lcsim/contrib/garfield on MAIN
SimTrackerHitBasic.java-921.4 removed
tester/DocaTrackParameters.java-7651.1 removed
      /MCTrack.java-1851.2 removed
      /TrackingTestKs.java-691.1 removed
      /package-info.java.bkp-51.1 removed
-1116
5 removed files


lcsim/src/org/lcsim/contrib/garfield
SimTrackerHitBasic.java removed after 1.4
diff -N SimTrackerHitBasic.java
--- SimTrackerHitBasic.java	23 Oct 2006 19:42:33 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,92 +0,0 @@
-package org.lcsim.contrib.garfield;
-
-import org.lcsim.event.MCParticle;
-import org.lcsim.event.SimTrackerHit;
-import org.lcsim.event.EventHeader.LCMetaData;
-import org.lcsim.geometry.IDDecoder;
-import org.lcsim.geometry.Subdetector;
-
-/**
- *
- * @author D. Onoprienko
- * @version $Id: SimTrackerHitBasic.java,v 1.4 2006/10/23 19:42:33 tonyj Exp $
- * InternalRelease 2.02.01 Feb 23, 2006
- */
-public class SimTrackerHitBasic implements org.lcsim.event.SimTrackerHit {
-  
-  // -- Private fields :  ------------------------------------------------------
-  
-  private SimTrackerHit hit;
-  private IDDecoder decoder;
-  
-  // -- Constructors :  --------------------------------------------------------
-  
-  public SimTrackerHitBasic(SimTrackerHit hit, IDDecoder decoder) {
-    this.hit = hit;
-    this.decoder = decoder;
-  }
-  
-  public SimTrackerHitBasic(SimTrackerHit hit, LCMetaData meta) {
-    this.hit = hit;
-    this.decoder = meta.getIDDecoder();
-  }
-
-  // -- Getters :  -------------------------------------------------------------
-  
-  public double getdEdx() {return hit.getdEdx();}
-
-  public double getTime() {return hit.getTime();}
-
-  public double[] getPoint() {return hit.getPoint();}
-
-  public MCParticle getMCParticle() {return hit.getMCParticle();}
-
-  public int getCellID() {return hit.getCellID();}
-
-  public double[] getMomentum() {return hit.getMomentum();}
-  
-  public SimTrackerHit getSimTrackerHit() {return hit;}
-  
-  public IDDecoder getIDDecoder() {
-    decoder.setID(hit.getCellID());
-    return decoder;
-  }
-
-  public double getX() {return (hit.getPoint())[0];}
-
-  public double getY() {return (hit.getPoint())[1];}
-
-  public double getZ() {return (hit.getPoint())[2];}
-
-  public int getSystemNumber() {return getIDDecoder().getSystemID();}
-
-  public int getLayer() {return getIDDecoder().getLayer();}
-
-  public double getPhi() {return getIDDecoder().getPhi();}
-
-  public double getTheta() {return getIDDecoder().getTheta();}
-
-  public boolean isBarrel() {return getIDDecoder().getBarrelEndcapFlag().isBarrel();}
-
-  public boolean isEndcap() {return getIDDecoder().getBarrelEndcapFlag().isEndcap();}
-
-  public boolean isEndcapNorth() {return getIDDecoder().getBarrelEndcapFlag().isEndcapNorth();}
-
-  public boolean isEndcapSouth() {return getIDDecoder().getBarrelEndcapFlag().isEndcapSouth();}
-  
-  public boolean isVXD() {
-    int sys = getIDDecoder().getSystemID();
-    return (sys == Const.codeVXDBarrel || sys == Const.codeVXDEndcap);
-  }
-
-   public double getPathLength()
-   {
-      return hit.getPathLength();
-   }
-
-   public Subdetector getSubdetector()
-   {
-      return null; // Fixme
-   }
-
-}

lcsim/src/org/lcsim/contrib/garfield/tester
DocaTrackParameters.java removed after 1.1
diff -N DocaTrackParameters.java
--- DocaTrackParameters.java	23 Feb 2006 19:10:09 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,765 +0,0 @@
-package org.lcsim.contrib.garfield.tester;
-
-import Jama.Matrix;
-
-import hep.physics.particle.Particle;
-
-import hep.physics.vec.BasicHep3Vector;
-import hep.physics.vec.Hep3Vector;
-import hep.physics.vec.VecOp;
-import org.lcsim.constants.Constants;
-
-
-/**
- *    MODIFIED COPY OF org.lcsim.mc.fast.tracking.DocaTrackParameters.
- *    (wish it was public)
- *
- * Holds DOCA parameters and error matrix of track. Can be initialized
- * with a MC truth particle. <br>
- *
- * OriginalAuthor  Tony Johnson, Wolfgang Walkowiak
- * OriginalVersion DocaTrackParameters.java,v 1.5 2005/08/20 23:24:14 tonyj
- * 
- * @version $Id: DocaTrackParameters.java,v 1.1 2006/02/23 19:10:09 onoprien Exp $
- * InternalRelease 2.02.01 Feb 23, 2006
- */
-class DocaTrackParameters
-{
-   private Hep3Vector m_pdoca_ref = null;
-   private Hep3Vector m_xdoca_ref = null;
-   private Hep3Vector m_xref = null;
-   private double[][] m_err = new double[5][5];
-   private double[] m_parm = new double[5];
-   private double m_Bz = 0.;
-   private double m_chi2 = -1.;
-   private double m_l0 = 0.;
-   private double m_l_ref = 0.;
-   private int m_ndf = 5;
-
-   //====================================================
-   //
-   //  Constructors
-   //
-   //====================================================
-   DocaTrackParameters(double bField)
-   {
-      reset();
-      m_Bz = bField;
-   }
-
-   DocaTrackParameters(double bField, Particle p)
-   {
-      this(bField, p.getMomentum(), p.getOrigin(), p.getType().getCharge());
-   }
-
-   DocaTrackParameters(double bField, Hep3Vector momentum, Hep3Vector x, double q)
-   {
-      reset();
-      m_Bz = bField;
-      calculateDoca(momentum, x, q);
-   }
-
-   DocaTrackParameters(double bField, double[] momentum, double[] x, double q)
-   {
-      reset();
-      m_Bz = bField;
-      calculateDoca(momentum, x, q);
-   }
-
-   DocaTrackParameters(double bField, double[] momentum, double[] x, double q, double[][] errorMatrix)
-   {
-      this(bField, momentum, x, q);
-      fillErrorMatrix(errorMatrix);
-   }
-
-   DocaTrackParameters(double bField, double[] parameters)
-   {
-      m_Bz = bField;
-      m_parm = parameters;
-   }
-
-   DocaTrackParameters(double bField, double[] parameters, double[][] errorMatrix)
-   {
-      this(bField, parameters);
-      fillErrorMatrix(errorMatrix);
-   }
-
-   DocaTrackParameters(double bField, double[] parameters, double[][] errorMatrix, double chi2)
-   {
-      this(bField, parameters);
-      fillErrorMatrix(errorMatrix);
-      setChi2(chi2);
-   }
-
-   DocaTrackParameters(double bField, double[] parameters, double[][] errorMatrix, double chi2, int ndf)
-   {
-      this(bField, parameters);
-      fillErrorMatrix(errorMatrix);
-      setChi2(chi2);
-      setNDF(ndf);
-   }
-
-   public double getD0()
-   {
-      return m_parm[0];
-   }
-
-   /**
-    * Get the error matrix as a 2-D array
-    * @see #getTrackParameter
-    */
-   public double[][] getErrorMatrix()
-   {
-      return m_err;
-   }
-
-   /**
-    * Get an individual element of the error matrix
-    * @see #getTrackParameter
-    */
-   public double getErrorMatrixElement(int i, int j)
-   {
-      return (i < j) ? m_err[j][i] : m_err[i][j];
-   }
-
-   /**
-    * Get momentum at DOCA.
-    */
-   public double[] getMomentum()
-   {
-      return new double[] { getPX(), getPY(), getPZ() };
-   }
-
-   public double getOmega()
-   {
-      return m_parm[2];
-   }
-
-   public double getPX()
-   {
-      return getPt() * Math.cos(m_parm[1]);
-   }
-
-   public double getPY()
-   {
-      return getPt() * Math.sin(m_parm[1]);
-   }
-
-   public double getPZ()
-   {
-      return getPt() * m_parm[4];
-   }
-
-   public double getPhi0()
-   {
-      return m_parm[1];
-   }
-
-   /**
-    * Get total momentum at DOCA.
-    */
-   public double getPtot()
-   {
-      return Math.sqrt((getPX() * getPX()) + (getPY() * getPY()) + (getPZ() * getPZ()));
-   }
-
-   public double getTanL()
-   {
-      return m_parm[4];
-   }
-
-   /**
-    * Get an individual track parameter. <br>
-    *
-    * The track parameters for LCD are defined as follows
-    * <table>
-    * <tr><th>Index</th><th>Meaning</th></tr>
-    * <tr><td> 0 </td><td> d0 = XY impact parameter </td><tr>
-    * <tr><td> 1 </td><td> phi0 </td><tr> </td><tr>
-    * <tr><td> 2 </td><td> omega = 1/curv.radius (negative for negative tracks) </td><tr>
-    * <tr><td> 3 </td><td> z0 = z of track  (z impact parameter) </td><tr>
-    * <tr><td> 4 </td><td> s = tan lambda </td><tr>
-    * </table>
-    * @param i The index of the track parameter
-    * @return The track parameter with the specified index
-    *
-    * All parameters are given at the DOCA.
-    */
-   public double getTrackParameter(int i)
-   {
-      return m_parm[i];
-   }
-
-   /**
-    * Get the track parameters as an array
-    * @see #getTrackParameter
-    */
-   public double[] getTrackParameters()
-   {
-      return m_parm;
-   }
-
-   /**
-    * Get the unit charge, ie +1, 0, -1.
-    */
-   public int getUnitCharge()
-   {
-      if (m_Bz != 0)
-      {
-         return (int) Math.signum(m_parm[2]);
-      }
-      else
-      {
-         return 0;
-      }
-   }
-
-   public double getZ0()
-   {
-      return m_parm[3];
-   }
-
-   /**
-    * Get cos(Theta) as calculated from the
-    * momentum vector at the DOCA. <br>
-    *
-    * Note: This is the same as getCosTheta()
-    */
-
-   public double magnitude()
-   {
-      return Math.sqrt(VecOp.dot(getDocaVec(), getDocaVec()));
-   }
-   public double magnitudeSquared()
-   {
-      return VecOp.dot(getDocaVec(), getDocaVec());
-   }
-
-   public double[] v()
-   {
-      return getDoca();
-   }
-
-   // IHep3Vector methods
-   public double x()
-   {
-      return getDocaX();
-   }
-
-   public double y()
-   {
-      return getDocaY();
-   }
-
-   public double z()
-   {
-      return getDocaZ();
-   }
-
-   /**
-    * Store the chi2.
-    */
-   void setChi2(double chi2)
-   {
-      m_chi2 = chi2;
-   }
-
-   /**
-    * Return the chi2 from smearing. <br>
-    *
-    * Note: The chi2 is to be calculated and
-    * stored by the smearing routine
-    * using setChi2().
-    */
-   double getChi2()
-   {
-      return m_chi2;
-   }
-
-   /**
-    * get cos(theta) at DOCA.
-    */
-   double getCosTheta()
-   {
-      return getPZ() / getPtot();
-   }
-
-   /**
-    * Get coordinates of DOCA.
-    */
-   double[] getDoca()
-   {
-      return new double[] { getDocaX(), getDocaY(), getDocaZ() };
-   }
-
-   double[] getDocaMomentum(double[] refPoint)
-   {
-      return getDocaMomentumVec(refPoint).v();
-   }
-
-   /**
-    * Calculate and get Doca momentum on track with respect to any space point.
-    */
-   Hep3Vector getDocaMomentumVec(Hep3Vector refPoint)
-   {
-      if ((refPoint.x() != 0.) && (refPoint.y() != 0.))
-      {
-         checkCalcDoca(refPoint);
-
-         return m_pdoca_ref;
-      }
-      else
-      {
-         return getMomentumVec();
-      }
-   }
-
-   Hep3Vector getDocaMomentumVec(double[] refPoint)
-   {
-      return getDocaMomentumVec(new BasicHep3Vector(refPoint[0], refPoint[1], refPoint[2]));
-   }
-
-   double[] getDocaPosition(double[] refPoint)
-   {
-      return getDocaPositionVec(refPoint).v();
-   }
-
-   //====================================================
-   //
-   //  methods
-   //
-   //====================================================
-
-   /**
-    * Calculate and get Doca position on track with respect to
-    * any space point.
-    */
-   Hep3Vector getDocaPositionVec(Hep3Vector refPoint)
-   {
-      if ((refPoint.x() != 0.) && (refPoint.y() != 0.))
-      {
-         checkCalcDoca(refPoint);
-
-         return m_xdoca_ref;
-      }
-      else
-      {
-         return getDocaVec();
-      }
-   }
-
-   Hep3Vector getDocaPositionVec(double[] refPoint)
-   {
-      return getDocaPositionVec(new BasicHep3Vector(refPoint[0], refPoint[1], refPoint[2]));
-   }
-
-   /**
-    * Calculate and get path length on track for a doca to any space point
-    * in respect to the track defining doca (with respect to the origin).
-    * The length l is given in the transverse plane. <br>
-    * Use L = l*tan(lambda) to convert.
-    */
-   double getDocaTransversePathLength(Hep3Vector refPoint)
-   {
-      if ((refPoint.x() != 0.) && (refPoint.y() != 0))
-      {
-         checkCalcDoca(refPoint);
-
-         return m_l_ref;
-      }
-      else
-      {
-         return 0.;
-      }
-   }
-
-   double getDocaTransversePathLength(double[] refPoint)
-   {
-      return getDocaTransversePathLength(new BasicHep3Vector(refPoint[0], refPoint[1], refPoint[2]));
-   }
-
-   /**
-    * Get coordinates of DOCA.
-    */
-   Hep3Vector getDocaVec()
-   {
-      return new BasicHep3Vector(getDocaX(), getDocaY(), getDocaZ());
-   }
-
-   double getDocaX()
-   {
-      return (-m_parm[0] * Math.sin(m_parm[1]));
-   }
-
-   double getDocaY()
-   {
-      return (m_parm[0] * Math.cos(m_parm[1]));
-   }
-
-   double getDocaZ()
-   {
-      return (m_parm[3]);
-   }
-
-   /**
-    * Set the (transverse) path length l0 to original track vertex.
-    */
-   void setL0(double l0)
-   {
-      m_l0 = l0;
-   }
-
-   /**
-    * Get the (transverse) path length l0 to original track vertex.
-    */
-   double getL0()
-   {
-      return m_l0;
-   }
-
-   double[] getMomentum(double l)
-   {
-      return getMomentumVec(l).v();
-   }
-
-   /**
-    * Calculate and get momentum on track with respect to
-    * any path length l on track (l in xy plane).
-    */
-   Hep3Vector getMomentumVec(double l)
-   {
-      double phi0 = m_parm[1];
-      double omega = m_parm[2];
-      double tanl = m_parm[4];
-
-      int iq = getUnitCharge();
-
-      double phi = phi0 + (omega * l);
-      double pt = Constants.fieldConversion * iq * m_Bz / omega;
-
-      double px = pt * Math.cos(phi);
-      double py = pt * Math.sin(phi);
-      double pz = pt * tanl;
-
-      //  	System.out.println("l: "+l+" p: ("+px+", "+py+", "+pz+")");
-      return new BasicHep3Vector(px, py, pz);
-   }
-
-   Hep3Vector getMomentumVec()
-   {
-      return new BasicHep3Vector(getPX(), getPY(), getPZ());
-   }
-
-   /**
-    * Change the number degrees of freedom.
-    */
-   void setNDF(int ndf)
-   {
-      m_ndf = ndf;
-   }
-
-   /**
-    * Get the number degrees of freedom.
-    *
-    * Default is 5 unless changed with setNDF().
-    */
-   int getNDF()
-   {
-      return m_ndf;
-   }
-
-   double[] getPosition(double l)
-   {
-      return getPositionVec(l).v();
-   }
-
-   /**
-    * Calculate and get position on track with respect to
-    * any path length l on track (l in xy plane).
-    */
-   Hep3Vector getPositionVec(double l)
-   {
-      double d0 = m_parm[0];
-      double phi0 = m_parm[1];
-      double omega = m_parm[2];
-      double z0 = m_parm[3];
-      double tanl = m_parm[4];
-
-      double phi = phi0 + omega;
-      double rho = 1 / omega;
-
-      double x = (rho * Math.sin(phi)) - ((rho + d0) * Math.sin(phi0));
-      double y = (-rho * Math.cos(phi)) + ((rho + d0) * Math.cos(phi0));
-      double z = z0 + (l * tanl);
-
-      return new BasicHep3Vector(x, y, z);
-   }
-
-   /**
-    * Get transverse momentum at DOCA.
-    */
-   double getPt()
-   {
-      if (m_parm[2] != 0.)
-      {
-         return Math.abs(Constants.fieldConversion * m_Bz / m_parm[2]);
-      }
-      else
-      {
-         return 0.;
-      }
-   }
-
-   /**
-    * Get theta angle at DOCA.
-    */
-   double getTheta()
-   {
-      return Math.atan2(getPt(), getPZ());
-   }
-
-   /**
-    * Calculate the error matrix for the momentum
-    * for a point on the track specified by l.
-    * Result is given as a 3x3 array for the matrix.
-    */
-   double[][] calcMomentumErrorMatrix(double l)
-   {
-      double rho = 1. / getOmega();
-      double phi = getPhi0() + (getOmega() * l);
-      double tanl = getTanL();
-      double c = Constants.fieldConversion * Math.abs(m_Bz);
-      double sphi = Math.sin(phi);
-      double cphi = Math.cos(phi);
-
-      Matrix tMatrix = new Matrix(5, 3, 0.);
-      tMatrix.set(1, 0, -c * rho * sphi);
-      tMatrix.set(1, 1, c * rho * cphi);
-      tMatrix.set(2, 0, (-c * rho * rho * cphi) - (c * rho * l * sphi));
-      tMatrix.set(2, 1, (-c * rho * rho * sphi) + (c * rho * l * cphi));
-      tMatrix.set(2, 2, -c * rho * rho * tanl);
-      tMatrix.set(4, 2, c * rho);
-
-      Matrix errorMatrix = new Matrix(getErrorMatrix());
-      Matrix pErrorMatrix = tMatrix.transpose().times(errorMatrix.times(tMatrix));
-
-      return pErrorMatrix.getArrayCopy();
-   }
-
-   /**
-    * Calculate the error matrix for the position coordinates
-    * for a point on the track specified by l.
-    * Result is given as a 3x3 array for the matrix.
-    */
-   double[][] calcPositionErrorMatrix(double l)
-   {
-      double d0 = getD0();
-      double rho = 1. / getOmega();
-      double phi = getPhi0() + (getOmega() * l);
-      double sphi0 = Math.sin(getPhi0());
-      double cphi0 = Math.cos(getPhi0());
-      double sphi = Math.sin(phi);
-      double cphi = Math.cos(phi);
-
-      Matrix tMatrix = new Matrix(5, 3, 0.);
-      tMatrix.set(0, 0, -sphi0);
-      tMatrix.set(0, 1, cphi0);
-      tMatrix.set(1, 0, (rho * cphi) - ((rho + d0) * cphi0));
-      tMatrix.set(1, 1, (rho * sphi) - ((rho + d0) * sphi0));
-      tMatrix.set(2, 0, (rho * l * cphi) - (rho * rho * (sphi - sphi0)));
-      tMatrix.set(2, 1, (rho * l * sphi) + (rho * rho * (cphi - cphi0)));
-      tMatrix.set(3, 2, 1.);
-      tMatrix.set(4, 2, l);
-
-      Matrix errorMatrix = new Matrix(getErrorMatrix());
-
-      // MyContext.println(MyContext.getHeader());
-      // MyContext.printMatrix("Error matrix:",errorMatrix,10,15);
-      // MyContext.printMatrix("Transf matrix:",tMatrix,10,15);
-      Matrix xErrorMatrix = tMatrix.transpose().times(errorMatrix.times(tMatrix));
-
-      return xErrorMatrix.getArrayCopy();
-   }
-
-   void fillErrorMatrix(double[][] errorMatrix)
-   {
-      m_err = errorMatrix;
-
-      // fill upper triangle from lower triangle
-      for (int i = 0; i < 5; i++)
-         for (int j = 0; j < i; j++)
-            m_err[j][i] = m_err[i][j];
-   }
-
-   //====================================================
-   //
-   //  private methods
-   //
-   //====================================================
-
-   /*
-    * Calculate the DOCA for a set of parameters with respect to the origin.
-    */
-   private void calculateDoca(double[] momentum, double[] trackPoint, double q)
-   {
-      Hep3Vector p = new BasicHep3Vector(momentum[0], momentum[1], momentum[2]);
-      Hep3Vector x = new BasicHep3Vector(trackPoint[0], trackPoint[1], trackPoint[2]);
-      calculateDoca(p, x, q);
-   }
-
-   /*
-    * Calculate the DOCA for a set of parameters in vectors with respect to the origin.
-    */
-   private void calculateDoca(Hep3Vector momentum, Hep3Vector trackPoint, double charge)
-   {
-      reset();
-
-      Hep3Vector xOrigin = new BasicHep3Vector(0., 0., 0.);
-
-      Hep3Vector[] result = calculateDoca(momentum, trackPoint, charge, xOrigin);
-      Hep3Vector xdoca = result[0];
-      Hep3Vector pdoca = result[1];
-      Hep3Vector dphdl = result[2];
-
-      int iq = (int) (charge / Math.abs(charge));
-      double pt = Math.sqrt((pdoca.x() * pdoca.x()) + (pdoca.y() * pdoca.y()));
-
-      // now calculate track parameters
-      double d0 = Math.sqrt((xdoca.x() * xdoca.x()) + (xdoca.y() * xdoca.y()));
-      if (VecOp.cross(xdoca, pdoca).z() > 0)
-      {
-         d0 = -d0;
-      }
-
-      double phi0 = Math.atan2(pdoca.y(), pdoca.x());
-      if (phi0 > Math.PI)
-      {
-         phi0 -= (2 * Math.PI);
-      }
-      if (phi0 < -Math.PI)
-      {
-         phi0 += (2 * Math.PI);
-      }
-
-      double omega = Constants.fieldConversion * iq * m_Bz / pt;
-      double tanl = pdoca.z() / pt;
-      double z0 = xdoca.z();
-
-      // now fill trackparameters
-      m_parm[0] = d0;
-      m_parm[1] = phi0;
-      m_parm[2] = omega;
-      m_parm[3] = z0;
-      m_parm[4] = tanl;
-
-      // save the distance to orignial track vertex
-      m_l0 = -dphdl.y();
-
-      //  	System.out.println("DocaTrackParameters: xdoca = ("+
-      //  			   xdoca.x()+", "+xdoca.y()+", "+xdoca.z()+")");
-      //  	System.out.println("DocaTrackParameters: pdoca = ("+
-      //  			   pdoca.x()+", "+pdoca.y()+", "+pdoca.z()+")");
-      //  	System.out.println("DocaTrackParameters: d0: "+m_parm[0]+
-      //  			   " phi0: "+m_parm[1]+" omega: "+m_parm[2]+
-      //  			   " z0: "+m_parm[3]+" tanl: "+m_parm[4]);
-      //  	System.out.println("DocaTrackParameters: m_l0 = "+m_l0);
-   }
-
-   /*
-    * Calculate DOCA position and momentum vectors with respect to any
-    * space point.
-    */
-   private Hep3Vector[] calculateDoca(Hep3Vector momentum, Hep3Vector trackPoint, double charge, Hep3Vector refPoint)
-   {
-      // subtract refPoint
-      Hep3Vector xp = VecOp.sub(trackPoint, refPoint);
-
-      int iq = (int) (charge / Math.abs(charge));
-      double pt = Math.sqrt((momentum.x() * momentum.x()) + (momentum.y() * momentum.y()));
-      double tanl = momentum.z() / pt;
-      double rho = pt / (m_Bz * Constants.fieldConversion);
-
-      BasicHep3Vector xdoca;
-      Hep3Vector pdoca;
-      Hep3Vector dphdl;
-
-      //  	System.out.println("calculateDoca: m_flip: "+m_flip+" iq: "+iq);
-      if (xp.magnitude() > 0.) // no need for calculation if xp = (0,0,0) !
-      {
-         // calculate position and momentum at doca
-         Hep3Vector nzv = new BasicHep3Vector(0., 0., iq);
-         Hep3Vector xxc = new BasicHep3Vector(VecOp.cross(momentum, nzv).x(), VecOp.cross(momentum, nzv).y(), 0.);
-         Hep3Vector nxxc = VecOp.unit(xxc);
-         BasicHep3Vector xc = (BasicHep3Vector) VecOp.add(xp, VecOp.mult(rho, nxxc));
-         xc.setV(xc.x(), xc.y(), 0.);
-
-         Hep3Vector nxc = VecOp.unit(xc);
-
-         BasicHep3Vector catMC = (BasicHep3Vector) VecOp.cross(nzv, nxc);
-         catMC.setV(catMC.x(), catMC.y(), 0.);
-
-         Hep3Vector ncatMC = VecOp.unit(catMC);
-
-         pdoca = new BasicHep3Vector(pt * ncatMC.x(), pt * ncatMC.y(), momentum.z());
-
-         double dphi = Math.asin(VecOp.cross(nxxc, nxc).z());
-         double dl = -dphi * rho * iq;
-
-         xdoca = (BasicHep3Vector) VecOp.add(xc, VecOp.mult(-rho, nxc));
-         xdoca.setV(xdoca.x(), xdoca.y(), xp.z() + (dl * tanl));
-
-         // save dphi and dl
-         dphdl = new BasicHep3Vector(dphi, dl, 0.);
-      }
-      else
-      {
-         xdoca = (BasicHep3Vector) xp;
-         pdoca = momentum;
-         dphdl = new BasicHep3Vector();
-      }
-
-      // add refPoint back in again
-      xdoca = (BasicHep3Vector) VecOp.add(xdoca, refPoint);
-
-      return new Hep3Vector[] { xdoca, pdoca, dphdl };
-   }
-
-   /*
-    * Calculate Doca for this track with respect to any space point,
-    * if this has not been done before.
-    */
-   private void checkCalcDoca(Hep3Vector refPoint)
-   {
-      // hassle with calculation only, if not done before yet!
-      if ((m_xref == null) || (refPoint.x() != m_xref.x()) || (refPoint.y() != m_xref.y()) || (refPoint.z() != m_xref.z()))
-      {
-         m_xref = refPoint;
-
-         // find doca vectors
-         Hep3Vector xdoca = getDocaVec();
-         Hep3Vector pdoca = getMomentumVec();
-         int iq = getUnitCharge();
-
-         // calculate doca to refPoint
-         Hep3Vector[] result = calculateDoca(pdoca, xdoca, (double) iq, refPoint);
-         m_xdoca_ref = result[0];
-         m_pdoca_ref = result[1];
-
-         // distance along track to original point
-         m_l_ref = result[2].y();
-      }
-   }
-
-   private void reset()
-   {
-      for (int i = 0; i < 5; i++)
-      {
-         m_parm[i] = 0;
-         for (int j = 0; j < 5; j++)
-         {
-            m_err[i][j] = 0;
-         }
-      }
-      m_l0 = 0.;
-   }
-}

lcsim/src/org/lcsim/contrib/garfield/tester
MCTrack.java removed after 1.2
diff -N MCTrack.java
--- MCTrack.java	23 Oct 2006 19:42:33 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,185 +0,0 @@
-package org.lcsim.contrib.garfield.tester;
-
-import hep.physics.matrix.SymmetricMatrix;
-import java.util.*;
-import org.lcsim.event.*;
-import org.lcsim.contrib.garfield.*;
-
-
-/**
- * This class represents a Monte Carlo track - Monte Carlo particle that produced 
- * hits in a tracker. Provides access to the underlying {@link MCParticle} object
- * and to associated tracker hits and reconstructed tracks. 
- * <p>
- * An object of this class can be assigned any number of integer status codes through
- * the call to {@link #setStatus(int,int) setStatus(int category, int status)} method.
- * This allows users to mark Monte Carlo tracks that belong to a certain group, for example.
- * Assigned statuses are retrieved by {@link #getStatus(int) getStatus(int category)}.
- *
- * @author D. Onoprienko
- * @version $Id: MCTrack.java,v 1.2 2006/10/23 19:42:33 tonyj Exp $
- * InternalRelease 2.02.01 Feb 23, 2006
- */
-public class MCTrack implements Track {
-  
-// -- Private fields :  --------------------------------------------------------
-  
-  private MCParticle _mcParticle;
-  private ArrayList<TrackerHit> _trackerHits;
-  private ArrayList<Track> _tracks;
-  private boolean _hitsSorted;
-  
-  HashMap<Integer,Integer> _status;
-  
-  static private double[] _cacheTrackParameters;
-  static private MCTrack _trackInCache;
-  
-// -- Constructors :  ----------------------------------------------------------
-  
-  public MCTrack(MCParticle mcParticle) {
-    _mcParticle = mcParticle;
-    _trackerHits = new ArrayList<TrackerHit>(10);
-    _tracks = new ArrayList<Track>(1);
-    _hitsSorted = false;
-    _status = new HashMap<Integer,Integer>(2);
-  }
-  
-// -- Getters :  ---------------------------------------------------------------
-  
-  /** Returns MCParticle that produced this track. */
-  public MCParticle getMCParticle() {return _mcParticle;}
-  
-  /** Returns a list of associated reconstructed tracks. */
-  public List<Track> getTracks() {return _tracks;}
-  
-  /** Returns a list of associated tracker hits. */
-  public List<TrackerHit> getTrackerHits() {
-    if (!_hitsSorted) {
-      sortHits();
-      _hitsSorted = true;
-    }
-    return _trackerHits;
-  }
-  
-  /**
-   * Returns a status flag that has been previously assigned to this track through
-   * the call to {@link #setStatus(int,int) setStatus(int category, int status)}.
-   */
-  public int getStatus(int category) {
-    return _status.get(category);
-  }
-  
-  /** Returns transverse momentum of the track. */
-  public double getPt() {
-    double[] p = getMomentum();
-    return Math.sqrt(p[0]*p[0]+p[1]*p[1]);
-  }
-  
-  /** Returns momentum of the track. */
-  public double getP() {
-    double[] p = getMomentum();
-    return Math.sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]);
-  }
-    
-  
-// -- Setters :  ---------------------------------------------------------------
-  
-  /** Add track to the list of reconstructed tracks associated with this Monte Carlo track. */
-  public void addTrack(Track track) {_tracks.add(track);}
-  
-  /** Add hit to the list of tracker hits associated with this Monte Carlo track. */
-  public void addHit(TrackerHit hit) {_trackerHits.add(hit);}
-  
-  /** Add hits to the list of tracker hits associated with this Monte Carlo track. */
-  public void addHits(List<TrackerHit> hitList) {
-    for (TrackerHit hit : hitList) if (!_trackerHits.contains(hit)) _trackerHits.add(hit);
-  }
-  
-  /**
-   * Set an integer status flag for this track.
-   *
-   *  @param category  Identifier of a status category. A track can be assigned 
-   *                   statuses in any number of categories.
-   *  @param status    Status flag that can be later retrieved through the call to
-   *                   {@link #getStatus(int) getStatus(int category)}
-   */
-  public void setStatus(int category, int status) {_status.put(category, status);}
-  
-// -- Implement org.lcsim.event.Track : ----------------------------------------
-  
-  public double getTrackParameter(int param) {
-    return getTrackParameters()[param];
-  }
-  
-  public double[] getTrackParameters() {
-    if (_trackInCache != this) {
-      _cacheTrackParameters = (new DocaTrackParameters(Const.bField, _mcParticle)).getTrackParameters();
-      _trackInCache = this;
-    }
-    return _cacheTrackParameters;
-  }
-  
-  public boolean isReferencePointPCA() {return false;}
-  public double getReferencePointX() {return _mcParticle.getOriginX();}
-  public double getReferencePointY() {return _mcParticle.getOriginY();}
-  public double getReferencePointZ() {return _mcParticle.getOriginZ();}
-  public double[] getReferencePoint() {return _mcParticle.getOrigin().v();}
-  
-  public double getdEdx() {return 0.;}
-  public double getdEdxError() {return 0.;}
-  public int getType() {return 0;}
-  public boolean fitSuccess() {return true;}
-  public double getChi2() {return 0.;}
-  public int getNDF() {return 0;}
-  public SymmetricMatrix getErrorMatrix() {return new SymmetricMatrix(5);}
-  
-  public int[] getSubdetectorHitNumbers() {
-    return new int[]{0,0,0,0};
-  }
-  
-  public int getCharge() {
-    double charge = _mcParticle.getCharge();
-    int iCharge;
-    if (charge < -0.7) iCharge = -1;
-    else if (charge > 0.7) iCharge = 1;
-    else iCharge = 0;
-    return iCharge;
-  }
-  
-  public double[] getMomentum() {return _mcParticle.getMomentum().v();}
-  public double getPX() {return _mcParticle.getPX();}
-  public double getPY() {return _mcParticle.getPY();}
-  public double getPZ() {return _mcParticle.getPZ();}
-  
-  public double getRadiusOfInnermostHit() {
-    double rad = 0.;
-    if (!_trackerHits.isEmpty()) {
-      if (!_hitsSorted) {
-        sortHits();
-        _hitsSorted = true;
-      }
-      double[] pos = _trackerHits.get(0).getPosition();
-      rad = Math.hypot(pos[0], pos[1]);
-    }
-    return rad;
-  }
-  
-// -- Private helper methods :  ------------------------------------------------
-  
-  /**
-   * Sort hits in the order of increasing distance from the detector center.
-   */
-  private void sortHits() {
-    Collections.sort(_trackerHits, new Comparator<TrackerHit>() {
-      public int compare(TrackerHit hit1, TrackerHit hit2) {
-        double[] pos = hit1.getPosition();
-        double r1 = pos[0]*pos[0]+pos[1]*pos[1]+pos[2]*pos[2];
-        pos = hit2.getPosition();
-        double r2 = pos[0]*pos[0]+pos[1]*pos[1]+pos[2]*pos[2];
-        return (int)Math.signum(r1-r2);
-      }
-    });
-    
-  }
-  
-}

lcsim/src/org/lcsim/contrib/garfield/tester
TrackingTestKs.java removed after 1.1
diff -N TrackingTestKs.java
--- TrackingTestKs.java	23 Feb 2006 19:10:10 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,69 +0,0 @@
-package org.lcsim.contrib.garfield.tester;
-
-import java.util.*;
-import java.lang.reflect.*;
-import org.lcsim.event.*;
-import org.lcsim.event.MCParticle.SimulatorStatus;
-import org.lcsim.event.EventHeader.LCMetaData;
-import org.lcsim.util.Driver;
-import hep.physics.particle.Particle;
-import org.lcsim.util.aida.AIDA;
-import hep.aida.ITree;
-
-
-/**
- * An example of track finding performance test that looks at reconstruction of
- * charged pions produced in K short decays.
- *
- * @author D. Onoprienko
- * @version $Id: TrackingTestKs.java,v 1.1 2006/02/23 19:10:10 onoprien Exp $
- * InternalRelease 2.02.01 Feb 23, 2006
- */
-public class TrackingTestKs extends TrackingTest {
-  
-// -- Indices into the statistics (per event and cumulative) arrays :  ---------
-  
-  protected final int _I_eKshortsPFraction;
-  
-// -- Constructors :  ----------------------------------------------------------
-  
-  public TrackingTestKs(String name) {
-    this();
-    set(Parameter.TEST_NAME, name);
-  }
-  
-  public TrackingTestKs() {
-    _I_eKshortsPFraction = createIndex("Fraction of energy carried by Kshorts");
-  }
-  
-// -- Processing event :  ------------------------------------------------------
-  
-  protected void analyzeEvent(EventHeader event) {
-    
-    // Calculate fraction of charged track momenta carried by Kshorts
-    
-    List<MCParticle> mcParticleList = event.getMCParticles();
-    double eTotal = 0.;
-    double eKs = 0.;
-    for (MCParticle mcPart : mcParticleList) {
-      if (mcPart.getGeneratorStatus() == Particle.FINAL_STATE) eTotal += mcPart.getEnergy();
-      if (mcPart.getPDGID() == 310) eKs += mcPart.getEnergy();
-    }
-    _statE[_I_eKshortsPFraction] = eKs / eTotal;
-    
-    super.analyzeEvent(event);
-    
-  }
-
-  protected boolean mcTrackFilter(MCTrack mcTrack) {
-    
-    if (!super.mcTrackFilter(mcTrack)) return false;
-    
-    MCParticle mcPart = mcTrack.getMCParticle();
-    List<MCParticle> parentList = mcPart.getParents();
-    return (((mcPart.getPDGID() == 211) || (mcPart.getPDGID() == -211))
-         && (parentList != null) && (parentList.size() == 1)
-         && (parentList.get(0).getPDGID() == 310));
-  }
-  
-}

lcsim/src/org/lcsim/contrib/garfield/tester
package-info.java.bkp removed after 1.1
diff -N package-info.java.bkp
--- package-info.java.bkp	29 Nov 2006 11:10:02 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,5 +0,0 @@
-/**
- * Contains classes necessary for running simple performance tests on track finders.
- */
-package org.lcsim.contrib.garfield.tester;
-
CVSspam 0.2.8