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  August 2015

HPS-SVN August 2015

Subject:

r3476 - in /java/trunk/tracking/src/main/java/org/hps/recon/tracking: MultipleScattering.java TrackUtils.java gbl/GBLOutput.java

From:

[log in to unmask]

Reply-To:

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

Date:

Tue, 1 Sep 2015 00:18:48 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (94 lines)

Author: [log in to unmask]
Date: Mon Aug 31 17:18:45 2015
New Revision: 3476

Log:
use better initial conditions, add more failsafes

Modified:
    java/trunk/tracking/src/main/java/org/hps/recon/tracking/MultipleScattering.java
    java/trunk/tracking/src/main/java/org/hps/recon/tracking/TrackUtils.java
    java/trunk/tracking/src/main/java/org/hps/recon/tracking/gbl/GBLOutput.java

Modified: java/trunk/tracking/src/main/java/org/hps/recon/tracking/MultipleScattering.java
 =============================================================================
--- java/trunk/tracking/src/main/java/org/hps/recon/tracking/MultipleScattering.java	(original)
+++ java/trunk/tracking/src/main/java/org/hps/recon/tracking/MultipleScattering.java	Mon Aug 31 17:18:45 2015
@@ -294,15 +294,14 @@
             System.out.printf("%s: found simple intercept at %s \n", this.getClass().getSimpleName(), pos_int_trk.toString());
         }
 
-        // TODO Catch special cases where the incidental iteration procedure seem to fail 
-//        if (Math.abs(helix.R()) < 2000) {
-//            if (_debug) {
-//                System.out.printf("%s: momentum is low (p=%f,R=%f,B=%f), skip the iterative calculation\n", this.getClass().getSimpleName(), helix.p(Math.abs(_bfield)), helix.R(), _bfield);
-//            }
-//
-//            return pos_int_trk;
-//        }
-        
+        // TODO Catch special cases where the incidental iteration procedure seems to fail 
+        if (Math.abs(helix.R()) < 2000 && Math.abs(helix.dca()) > 10.0) {
+            if (_debug) {
+                System.out.printf("%s: momentum is low (p=%f,R=%f,B=%f) and d0 is big (d0=%f), skip the iterative calculation\n", this.getClass().getSimpleName(), helix.p(Math.abs(_bfield)), helix.R(), _bfield, helix.dca());
+            }
+            return pos_int_trk;
+        }
+
         if (_debug) {
             System.out.printf("%s: calculate iterative helix intercept\n", this.getClass().getSimpleName());
         }

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	Mon Aug 31 17:18:45 2015
@@ -139,7 +139,7 @@
      * @return point at intercept
      */
     public static Hep3Vector getHelixPlaneIntercept(HelicalTrackFit helfit, Hep3Vector unit_vec_normal_to_plane, Hep3Vector point_on_plane, double bfield) {
-        return getHelixPlaneIntercept(helfit,unit_vec_normal_to_plane,point_on_plane,bfield,0);
+        return getHelixPlaneIntercept(helfit, unit_vec_normal_to_plane, point_on_plane, bfield, 0);
     }
 
     public static Hep3Vector getHelixPlaneIntercept(HelicalTrackFit helfit, Hep3Vector unit_vec_normal_to_plane, Hep3Vector point_on_plane, double bfield, double initial_s) {
@@ -148,8 +148,9 @@
         //WTrack wtrack = new WTrack(helfit, -1.0*bfield); //
         Hep3Vector B = new BasicHep3Vector(0, 0, 1);
         WTrack wtrack = new WTrack(helfit, bfield); //
-        if (initial_s!=0)
+        if (initial_s != 0) {
             wtrack.setTrackParameters(wtrack.getHelixParametersAtPathLength(initial_s, B));
+        }
         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());
         }
@@ -176,7 +177,8 @@
     public static Hep3Vector getHelixPlaneIntercept(HelicalTrackFit helfit, HelicalTrackStripGbl strip, double bfield) {
         Hep3Vector point_on_plane = strip.origin();
         Hep3Vector unit_vec_normal_to_plane = VecOp.cross(strip.u(), strip.v());// strip.w();
-        Hep3Vector intercept_point = getHelixPlaneIntercept(helfit, unit_vec_normal_to_plane, point_on_plane, bfield);
+        double s_origin = HelixUtils.PathToXPlane(helfit, strip.origin().x(), 0., 0).get(0);
+        Hep3Vector intercept_point = getHelixPlaneIntercept(helfit, unit_vec_normal_to_plane, point_on_plane, bfield, s_origin);
         return intercept_point;
     }
 

Modified: java/trunk/tracking/src/main/java/org/hps/recon/tracking/gbl/GBLOutput.java
 =============================================================================
--- java/trunk/tracking/src/main/java/org/hps/recon/tracking/gbl/GBLOutput.java	(original)
+++ java/trunk/tracking/src/main/java/org/hps/recon/tracking/gbl/GBLOutput.java	Mon Aug 31 17:18:45 2015
@@ -292,6 +292,12 @@
 
                 //Find intercept point with sensor in tracking frame
                 Hep3Vector trkpos = TrackUtils.getHelixPlaneIntercept(htf, strip, Math.abs(_B.z()));
+                if (trkpos == null) {
+                    if (_debug > 0) {
+                        System.out.println("Can't find track intercept; use sensor origin");
+                    }
+                    trkpos = strip.origin();
+                }
                 Hep3Vector trkposTruth = htfTruth != null ? TrackUtils.getHelixPlaneIntercept(htfTruth, strip, Math.abs(_B.z())) : new BasicHep3Vector(-999999.9, -999999.9, -999999.9);
                 if (textFile != null) {
                     textFile.printStripTrackPos(trkpos);

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