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:

r3391 - /java/trunk/tracking/src/main/java/org/hps/recon/tracking/MultipleScattering.java

From:

[log in to unmask]

Reply-To:

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

Date:

Fri, 21 Aug 2015 00:25:51 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (167 lines)

Author: [log in to unmask]
Date: Thu Aug 20 17:25:49 2015
New Revision: 3391

Log:
turn off check that is only used for debug

Modified:
    java/trunk/tracking/src/main/java/org/hps/recon/tracking/MultipleScattering.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	Thu Aug 20 17:25:49 2015
@@ -40,6 +40,7 @@
      * @param helix
      * @return a list of ScatterAngle.
      */
+    @Override
     public List<ScatterAngle> FindScatters(HelicalTrackFit helix) {
         if (_debug)
             System.out.printf("\n%s: FindScatters() for helix:\n%s\n", this.getClass().getSimpleName(), helix.toString());
@@ -226,19 +227,13 @@
             System.out.printf("%s: take step %f to get intercept position in sensor frame %s (det: %s trk: %s)\n", this.getClass().getSimpleName(), delta_w, pos_int, pos_int_det.toString(), pos_int_trk.toString());
 
         // check if it's inside the sensor
-        Inside result_inside = plane.getDetectorElement().getGeometry().getPhysicalVolume().getMotherLogicalVolume().getSolid().inside(pos_int);
-        Inside result_inside_module = plane.getSensor().getGeometry().getDetectorElement().getParent().getGeometry().inside(pos_int_det);
-
-        if (this._debug)
+        Inside result_inside = null;
+        Inside result_inside_module = null;
+        if (_debug) {
+            result_inside = plane.getDetectorElement().getGeometry().getPhysicalVolume().getMotherLogicalVolume().getSolid().inside(pos_int);
+            result_inside_module = plane.getSensor().getGeometry().getDetectorElement().getParent().getGeometry().inside(pos_int_det);
             System.out.printf("%s: Inside result sensor: %s module: %s\n", this.getClass().getSimpleName(), result_inside.toString(), result_inside_module.toString());
-
-        boolean isInsideSolid = false;
-        if (result_inside.equals(Inside.INSIDE) || result_inside.equals(Inside.SURFACE))
-            isInsideSolid = true;
-
-        boolean isInsideSolidModule = false;
-        if (result_inside_module.equals(Inside.INSIDE) || result_inside_module.equals(Inside.SURFACE))
-            isInsideSolidModule = true;
+        }
 
         boolean isInside = true;
         if (Math.abs(pos_int.x()) > plane.getMeasuredDimension() / 2.0) {
@@ -252,7 +247,7 @@
                 System.out.printf("%s: intercept is outside in v\n", this.getClass().getSimpleName());
             isInside = false;
         }
-
+        
         if (!isInside)
             return null;
 
@@ -261,15 +256,29 @@
 
         // Check if it's inside sensor and module and if it contradicts the manual calculation
         // For now: trust manual calculation and output warning if it's outside BOTH sensor AND module 
-        if (!isInsideSolid) {
-            if (_debug)
-                System.out.printf("%s: manual calculation says inside sensor, inside solid says outside -> contradiction \n", this.getClass().getSimpleName());
-            if (isInsideSolidModule) {
-                if (_debug)
-                    System.out.printf("%s: this intercept is outside sensor but inside module\n", this.getClass().getSimpleName());
-            } else
-                if (_debug)
+        if (_debug) {
+            boolean isInsideSolid = false;
+            if (result_inside.equals(Inside.INSIDE) || result_inside.equals(Inside.SURFACE)) {
+                isInsideSolid = true;
+            }
+
+            boolean isInsideSolidModule = false;
+            if (result_inside_module.equals(Inside.INSIDE) || result_inside_module.equals(Inside.SURFACE)) {
+                isInsideSolidModule = true;
+            }
+
+            if (!isInsideSolid) {
+                if (_debug) {
+                    System.out.printf("%s: manual calculation says inside sensor, inside solid says outside -> contradiction \n", this.getClass().getSimpleName());
+                }
+                if (isInsideSolidModule) {
+                    if (_debug) {
+                        System.out.printf("%s: this intercept is outside sensor but inside module\n", this.getClass().getSimpleName());
+                    }
+                } else if (_debug) {
                     System.out.printf("%s: warning: this intercept at %s, in sensor frame %s, (sensor origin at %s ) is outside sensor and module!\n", this.getClass().getSimpleName(), pos_int_trk.toString(), pos_int.toString(), plane.origin().toString());
+                }
+            }
         }
 
         // TODO Catch special cases where the incidental iteration procedure seem to fail 
@@ -302,22 +311,12 @@
         if (this._debug)
             System.out.printf("%s: found iterative helix intercept in sensor coordinates at %s\n", this.getClass().getSimpleName(), pos_iter_sensor.toString());
 
-        result_inside = plane.getDetectorElement().getGeometry().getPhysicalVolume().getMotherLogicalVolume().getSolid().inside(pos_iter_sensor);
-        result_inside_module = plane.getSensor().getGeometry().getDetectorElement().getParent().getGeometry().inside(pos_iter_det);
-
-        if (this._debug)
+        if (_debug) {
+            result_inside = plane.getDetectorElement().getGeometry().getPhysicalVolume().getMotherLogicalVolume().getSolid().inside(pos_iter_sensor);
+            result_inside_module = plane.getSensor().getGeometry().getDetectorElement().getParent().getGeometry().inside(pos_iter_det);
             System.out.printf("%s: Inside result sensor: %s module: %s\n", this.getClass().getSimpleName(), result_inside.toString(), result_inside_module.toString());
-
-        isInsideSolid = false;
-
-        if (result_inside.equals(Inside.INSIDE) || result_inside.equals(Inside.SURFACE))
-            isInsideSolid = true;
-
-        isInsideSolidModule = false;
-
-        if (result_inside_module.equals(Inside.INSIDE) || result_inside_module.equals(Inside.SURFACE))
-            isInsideSolidModule = true;
-
+        }
+        
         isInside = true;
         if (Math.abs(pos_iter_sensor.x()) > plane.getMeasuredDimension() / 2.0) {
             if (this._debug)
@@ -331,18 +330,32 @@
             isInside = false;
         }
 
+        if (_debug) {
+            boolean isInsideSolid = false;
+            if (result_inside.equals(Inside.INSIDE) || result_inside.equals(Inside.SURFACE)) {
+                isInsideSolid = true;
+            }
+
+            boolean isInsideSolidModule = false;
+            if (result_inside_module.equals(Inside.INSIDE) || result_inside_module.equals(Inside.SURFACE)) {
+                isInsideSolidModule = true;
+            }
+
         // Check if it's inside sensor and module and if it contradicts the manual calculation
-        // For now: trust manual calculation and output warning if it's outside BOTH sensor AND
-        // module -> FIX THIS!?
-        if (!isInsideSolid) {
-            if (_debug)
-                System.out.printf("%s: manual iterative calculation says inside sensor, inside solid says outside -> contradiction \n", this.getClass().getSimpleName());
-            if (isInsideSolidModule) {
-                if (_debug)
-                    System.out.printf("%s: this iterative intercept is outside sensor but inside module\n", this.getClass().getSimpleName());
-            } else
-                if (_debug)
+            // For now: trust manual calculation and output warning if it's outside BOTH sensor AND
+            // module -> FIX THIS!?
+            if (!isInsideSolid) {
+                if (_debug) {
+                    System.out.printf("%s: manual iterative calculation says inside sensor, inside solid says outside -> contradiction \n", this.getClass().getSimpleName());
+                }
+                if (isInsideSolidModule) {
+                    if (_debug) {
+                        System.out.printf("%s: this iterative intercept is outside sensor but inside module\n", this.getClass().getSimpleName());
+                    }
+                } else if (_debug) {
                     System.out.printf("%s: warning: this iterative intercept %s, sensor frame %s, (sensor origin %s ) is outside sensor and module!\n", this.getClass().getSimpleName(), pos_iter_trk.toString(), pos_iter_sensor.toString(), plane.origin().toString());
+                }
+            }
         }
 
         if (!isInside)

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