LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SVN Home

HPS-SVN Home

HPS-SVN  May 2016

HPS-SVN May 2016

Subject:

r4375 - in /java/trunk: recon/src/main/java/org/hps/recon/vertexing/BilliorTrack.java tracking/src/main/java/org/hps/recon/tracking/TrackUtils.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the hps svn repository <[log in to unmask]>

Date:

Wed, 25 May 2016 00:45:33 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (346 lines)

Author: [log in to unmask]
Date: Tue May 24 17:45:30 2016
New Revision: 4375

Log:
add methods for using track states

Modified:
    java/trunk/recon/src/main/java/org/hps/recon/vertexing/BilliorTrack.java
    java/trunk/tracking/src/main/java/org/hps/recon/tracking/TrackUtils.java

Modified: java/trunk/recon/src/main/java/org/hps/recon/vertexing/BilliorTrack.java
 =============================================================================
--- java/trunk/recon/src/main/java/org/hps/recon/vertexing/BilliorTrack.java	(original)
+++ java/trunk/recon/src/main/java/org/hps/recon/vertexing/BilliorTrack.java	Tue May 24 17:45:30 2016
@@ -5,7 +5,6 @@
  *
  * $Id: BilliorTrack.java,v 1.1 2011/06/01 17:10:13 jeremy Exp $
  */
-
 
 import hep.physics.matrix.BasicMatrix;
 import hep.physics.matrix.Matrix;
@@ -21,8 +20,9 @@
 import org.lcsim.fit.helicaltrack.MultipleScatter;
 
 /**
- * Converts from HelicalTrackFit formalism to formalism in Billior paper
- * See (e.g.) Billior, Qian NIM A311, 1992
+ * Converts from HelicalTrackFit formalism to formalism in Billior paper See
+ * (e.g.) Billior, Qian NIM A311, 1992
+ *
  * @author Matt Graham
  * @version 1.0
  */
@@ -53,8 +53,8 @@
     private double[] _chisq = new double[2];
     private double _nhchisq;
     private int[] _ndf = new int[2];
-    private double[] _parameters;
-    private Matrix _covmatrix;
+    private final double[] _parameters;
+    private final Matrix _covmatrix;
     private Map<HelicalTrackHit, Double> _smap;
     private Map<HelicalTrackHit, MultipleScatter> _msmap;
     /**
@@ -83,19 +83,31 @@
         _msmap = helix.ScatterMap();
     }
 
-      public BilliorTrack(Track track) {
-         TrackState ts=track.getTrackStates().get(0);
+    public BilliorTrack(Track track) {
+        TrackState ts = track.getTrackStates().get(0);
         double[] helixparameters = ts.getParameters();
         _parameters = convertParsToBillior(helixparameters);
-        SymmetricMatrix helixcovmatrix = new SymmetricMatrix(5,ts.getCovMatrix(),true);
+        SymmetricMatrix helixcovmatrix = new SymmetricMatrix(5, ts.getCovMatrix(), true);
         _covmatrix = convertCovarianceToBillior(helixcovmatrix, helixparameters);
-        _chisq[0]= track.getChi2();
+        _chisq[0] = track.getChi2();
         _nhchisq = 0.;
         _ndf[0] = track.getNDF();
 //        _smap = helix.PathMap();
 //        _msmap = helix.ScatterMap();
     }
-    
+
+    public BilliorTrack(TrackState ts, double chisq, int ndf) {
+        double[] helixparameters = ts.getParameters();
+        _parameters = convertParsToBillior(helixparameters);
+        SymmetricMatrix helixcovmatrix = new SymmetricMatrix(5, ts.getCovMatrix(), true);
+        _covmatrix = convertCovarianceToBillior(helixcovmatrix, helixparameters);
+        _chisq[0] = chisq;
+        _nhchisq = 0.;
+        _ndf[0] = ndf;
+//        _smap = helix.PathMap();
+//        _msmap = helix.ScatterMap();
+    }
+
     private double[] convertParsToBillior(double[] helixpars) {
         double[] billior = {0, 0, 0, 0, 0};
         billior[0] = -helixpars[0];
@@ -124,6 +136,7 @@
 
     /**
      * Return the helix parameters as an array.
+     *
      * @return helix parameters
      */
     public double[] parameters() {
@@ -132,6 +145,7 @@
 
     /**
      * Return the signed helix DCA.
+     *
      * @return DCA
      */
     public double eps() {
@@ -140,6 +154,7 @@
 
     /**
      * Return the azimuthal direction at the DCA
+     *
      * @return azimuthal direction
      */
     public double phi0() {
@@ -148,6 +163,7 @@
 
     /**
      * Return the signed helix curvature.
+     *
      * @return helix curvature
      */
     public double curvature() {
@@ -156,6 +172,7 @@
 
     /**
      * Return the z coordinate for the DCA.
+     *
      * @return z coordinate
      */
     public double z0() {
@@ -164,6 +181,7 @@
 
     /**
      * Return the helix slope tan(lambda).
+     *
      * @return slope
      */
     public double theta() {
@@ -172,6 +190,7 @@
 
     /**
      * Return the helix covariance matrix.
+     *
      * @return covariance matrix
      */
     public Matrix covariance() {
@@ -179,8 +198,9 @@
     }
 
     /**
-     * Return the helix fit chisqs.  chisq[0] is for the circle fit, chisq[1] is
+     * Return the helix fit chisqs. chisq[0] is for the circle fit, chisq[1] is
      * for the s-z fit.
+     *
      * @return chisq array
      */
     public double[] chisq() {
@@ -189,15 +209,16 @@
 
     /**
      * Set the chisq for non-holonomic constraints (e.g., pT > xx).
+     *
      * @param nhchisq non-holonomic constraint chisq
      */
     public void setnhchisq(double nhchisq) {
         _nhchisq = nhchisq;
-        return;
     }
 
     /**
      * Return the non-holenomic constraint chisq.
+     *
      * @return non-holenomic constraint chisq
      */
     public double nhchisq() {
@@ -206,6 +227,7 @@
 
     /**
      * Return the total chisq: chisq[0] + chisq[1] + nhchisq.
+     *
      * @return total chisq
      */
     public double chisqtot() {
@@ -213,8 +235,9 @@
     }
 
     /**
-     * Return the degrees of freedom for the fits.  ndf[0] is for the circle fit
+     * Return the degrees of freedom for the fits. ndf[0] is for the circle fit
      * and ndf[1] is for the s-z fit.
+     *
      * @return dof array
      */
     public int[] ndf() {
@@ -223,6 +246,7 @@
 
     /**
      * Return cos(theta).
+     *
      * @return cos(theta)
      */
     public double cth() {
@@ -231,6 +255,7 @@
 
     /**
      * Return sin(theta).
+     *
      * @return sin(theta)
      */
     public double sth() {
@@ -239,6 +264,7 @@
 
     /**
      * Return transverse momentum pT for the helix.
+     *
      * @param bfield magnetic field
      * @return pT
      */
@@ -248,6 +274,7 @@
 
     /**
      * Return the momentum.
+     *
      * @param bfield magnetic field
      * @return momentum
      */
@@ -257,6 +284,7 @@
 
     /**
      * Return the radius of curvature for the helix.
+     *
      * @return radius of curvature
      */
     public double R() {
@@ -265,6 +293,7 @@
 
     /**
      * Return the x coordinate of the helix center/axis.
+     *
      * @return x coordinate of the helix axis
      */
     public double xc() {
@@ -273,6 +302,7 @@
 
     /**
      * Return the y coordinate of the helix center/axis.
+     *
      * @return y coordinate of the helix axis
      */
     public double yc() {
@@ -289,6 +319,7 @@
 
     /**
      * Return a map of x-y path lengths for the hits used in the helix fit.
+     *
      * @return path length map
      */
     public Map<HelicalTrackHit, Double> PathMap() {
@@ -297,6 +328,7 @@
 
     /**
      * Return a map of the MultipleScatter objects supplied for the fit.
+     *
      * @return map of multiple scattering uncertainties
      */
     public Map<HelicalTrackHit, MultipleScatter> ScatterMap() {
@@ -305,6 +337,7 @@
 
     /**
      * Return the error for curvature, omega
+     *
      * @return a double curveerror
      */
     public double getCurveError() {
@@ -314,6 +347,7 @@
 
     /**
      * Return the error for slope dz/ds, tan(lambda)
+     *
      * @return double a slopeerror
      */
     public double getThetaError() {
@@ -323,6 +357,7 @@
 
     /**
      * Return the error for distance of closest approach, dca
+     *
      * @return a double dcaerror
      */
     public double getEpsError() {
@@ -331,7 +366,9 @@
     }
 
     /**
-     * Return the error for phi0, azimuthal angle of the momentum at the DCA ref. point
+     * Return the error for phi0, azimuthal angle of the momentum at the DCA
+     * ref. point
+     *
      * @return a double phi0error
      */
     public double getPhi0Error() {
@@ -341,6 +378,7 @@
 
     /**
      * Return the error for z0, the z position of the particle at the DCA
+     *
      * @return a double z0error
      */
     public double getZ0Error() {
@@ -348,9 +386,9 @@
         return z0error;
     }
 
-        /**
-     * Returns the transpose of the matrix (inexplicably not handled by
-     * the matrix package for non-square matrices).
+    /**
+     * Returns the transpose of the matrix (inexplicably not handled by the
+     * matrix package for non-square matrices).
      *
      * @param m matrix to be transposed
      * @return transposed matrix
@@ -367,6 +405,7 @@
 
     /**
      * Create a string with the helix parameters.
+     *
      * @return string containing the helix parameters
      */
     public String toString() {
@@ -378,4 +417,4 @@
         sb.append("theta= " + theta() + "\n");
         return sb.toString();
     }
-}
+}

Modified: java/trunk/tracking/src/main/java/org/hps/recon/tracking/TrackUtils.java
 =============================================================================
--- java/trunk/tracking/src/main/java/org/hps/recon/tracking/TrackUtils.java	(original)
+++ java/trunk/tracking/src/main/java/org/hps/recon/tracking/TrackUtils.java	Tue May 24 17:45:30 2016
@@ -338,6 +338,10 @@
      * @return position at ECAL
      */
     public static Hep3Vector getTrackPositionAtEcal(Track track) {
+        return extrapolateTrack(track, BeamlineConstants.ECAL_FACE);
+    }
+
+    public static Hep3Vector getTrackPositionAtEcal(TrackState track) {
         return extrapolateTrack(track, BeamlineConstants.ECAL_FACE);
     }
 

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use