Print

Print


Author: [log in to unmask]
Date: Tue Nov 25 15:48:06 2014
New Revision: 3434

Log:
Lower debug level.

Modified:
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/converter/compact/HPSTracker2014ConverterBase.java
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014LCDDBuilder.java
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014GeometryDefinition.java
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014LCDDBuilder.java
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerGeometryDefinition.java
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolume.java
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolumeImpl.java
    projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/lcdd/HPSTracker2014Base.java

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/converter/compact/HPSTracker2014ConverterBase.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/converter/compact/HPSTracker2014ConverterBase.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/converter/compact/HPSTracker2014ConverterBase.java	Tue Nov 25 15:48:06 2014
@@ -36,7 +36,7 @@
 public abstract class HPSTracker2014ConverterBase extends
         AbstractSubdetectorConverter {
 
-    protected boolean _debug = true;
+    protected boolean _debug = false;
     protected IMaterial trackingMaterial = null;
     protected static HPSTrackerJavaBuilder builder;
 

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014LCDDBuilder.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014LCDDBuilder.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTestRunTracker2014LCDDBuilder.java	Tue Nov 25 15:48:06 2014
@@ -105,13 +105,13 @@
 
 
 
-		//if(isDebug()) {
-		System.out.printf("%s: DONE building the LCDD geometry objects\n", getClass().getSimpleName());
-		System.out.printf("%s: List of all %d LCDD geometry objects built\n", this.getClass().getSimpleName(), lcddSurveyVolumes.size());
-		for(SurveyVolumeImpl bg : lcddSurveyVolumes) {
-			System.out.printf("-------\n%s\n", bg.toString());
+		if(isDebug()) {
+		    System.out.printf("%s: DONE building the LCDD geometry objects\n", getClass().getSimpleName());
+		    System.out.printf("%s: List of all %d LCDD geometry objects built\n", this.getClass().getSimpleName(), lcddSurveyVolumes.size());
+		    for(SurveyVolumeImpl bg : lcddSurveyVolumes) {
+		        System.out.printf("-------\n%s\n", bg.toString());
+		    }
 		}
-		//}
 
 
 

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014GeometryDefinition.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014GeometryDefinition.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014GeometryDefinition.java	Tue Nov 25 15:48:06 2014
@@ -1663,13 +1663,13 @@
         }
 
 
-        
-        //if(isDebug()) {
-        System.out.printf("%s: created module bundle:\n", this.getClass().getSimpleName());
-        bundle.print();
-        System.out.printf("%s: Now there are %d  modules\n", this.getClass().getSimpleName(),modules.size());
-        //}
-        
+
+        if(isDebug()) {
+            System.out.printf("%s: created module bundle:\n", this.getClass().getSimpleName());
+            bundle.print();
+            System.out.printf("%s: Now there are %d  modules\n", this.getClass().getSimpleName(),modules.size());
+        }
+
         
 
     }
@@ -1852,7 +1852,6 @@
     protected HalfModuleBundle getHalfModuleBundle(BaseModule module, String halfModuleName) {
         BaseModuleBundle moduleBundle = getModuleBundle(module);
         HalfModuleBundle hm = null;
-        // TODO this should to change when I build quarter-modules for the long half-modules. I think. I should probably not rely on names but types btu not sure how to fix that one now.
         if(moduleBundle!=null) {
             if( moduleBundle instanceof TestRunModuleBundle) {   
                 TestRunModuleBundle mtr = (TestRunModuleBundle) moduleBundle;

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014LCDDBuilder.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014LCDDBuilder.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTracker2014LCDDBuilder.java	Tue Nov 25 15:48:06 2014
@@ -133,14 +133,14 @@
 
        
         
-        
-        //if(isDebug()) {
-        System.out.printf("%s: DONE building the LCDD geometry objects\n", getClass().getSimpleName());
-        System.out.printf("%s: List of all %d LCDD geometry objects built\n", this.getClass().getSimpleName(), lcddSurveyVolumes.size());
-        for(SurveyVolumeImpl bg : lcddSurveyVolumes) {
-            System.out.printf("-------\n%s\n", bg.toString());
+
+        if(isDebug()) {
+            System.out.printf("%s: DONE building the LCDD geometry objects\n", getClass().getSimpleName());
+            System.out.printf("%s: List of all %d LCDD geometry objects built\n", this.getClass().getSimpleName(), lcddSurveyVolumes.size());
+            for(SurveyVolumeImpl bg : lcddSurveyVolumes) {
+                System.out.printf("-------\n%s\n", bg.toString());
+            }
         }
-        //}
 
 
 

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerGeometryDefinition.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerGeometryDefinition.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/HPSTrackerGeometryDefinition.java	Tue Nov 25 15:48:06 2014
@@ -121,8 +121,6 @@
         if(isAxial) {
             halfModule = createTestRunHalfModuleAxial(volName, mother, alignmentCorrection, layer, half);
             halfModuleBundle = new TestRunHalfModuleBundle(halfModule);
-            System.out.printf("halfModuleBundle is null? %s\n", halfModuleBundle==null?"true":"false");
-            System.out.printf("bundle.halfModuleAxial is null? %s\n", bundle.halfModuleAxial==null?"true":"false");
             bundle.halfModuleAxial = halfModuleBundle;
         } else {
             halfModule = createTestRunHalfModuleStereo(volName, mother, alignmentCorrection, layer, half);
@@ -211,27 +209,7 @@
     
     }
 
-    /*
-    void makeHalfModuleComponentKapton(TestRunHalfModule mother) {
-        
-        if(isDebug()) System.out.printf("%s: makeHalfModuleComponentKapton for %s \n", this.getClass().getSimpleName(), mother.getName());
-    
-        String volName = mother.getName() + "_lamination";
-    
-        // Build the half-module
-    
-        //  id is hard coded
-        int component_number = 2;
-    
-        HalfModuleLamination lamination = new HalfModuleLamination(volName,mother,component_number);
-        lamination.setMaterial("Kapton");
-    
-    
-        TestRunHalfModuleBundle hm = (TestRunHalfModuleBundle) getHalfModuleBundle((BaseModule) mother.getMother(), mother.getName());
-        hm.lamination = lamination;
-    
-    }
-*/
+   
     
     protected void makeHalfModuleComponentSensor(BaseModule mother) {
     
@@ -269,45 +247,7 @@
     
     }
     
-    /*
-    void makeHalfModuleComponentSensor(TestRunHalfModule mother) {
-        
-        if(isDebug()) System.out.printf("%s: makeHalfModuleComponentSensor for %s \n", this.getClass().getSimpleName(), mother.getName());
-    
-        String volName = mother.getName() + "_sensor";
-    
-        // sensor id is hard coded in old geometry to be zero by counting over the components of the module
-        int component_number = 0;
-    
-        //  
-        Sensor sensor = new Sensor(volName, mother, null, component_number);
-        sensor.setMaterial("Silicon");
-    
-        TestRunHalfModuleBundle hm = (TestRunHalfModuleBundle) getHalfModuleBundle((BaseModule)mother.getMother(), mother.getName());
-        hm.sensor = sensor;
-    
-    
-        makeHalfModuleComponentActiveSensor(sensor);
-    
-    
-    }
-
-    private void makeHalfModuleComponentActiveSensor(Sensor mother) {
-    
-        if(isDebug()) System.out.printf("%s: makeHalfModuleComponentActiveSensor for %s \n", this.getClass().getSimpleName(), mother.getName());
-    
-        String volName = mother.getName() + "_active";
-    
-        ActiveSensor active_sensor = new ActiveSensor(volName, mother);
-        active_sensor.setMaterial("Silicon");
-    
-        TestRunHalfModuleBundle hm = (TestRunHalfModuleBundle) getHalfModuleBundle((BaseModule) mother.getMother().getMother(), mother.getMother().getName());
-        hm.activeSensor = active_sensor;
-    
-    }
-    */
-
-
+    
     /**
      * Tracking volume geometry definition. 
      */

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolume.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolume.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolume.java	Tue Nov 25 15:48:06 2014
@@ -1,16 +1,12 @@
 package org.lcsim.geometry.compact.converter;
 
-import hep.physics.vec.BasicHep3Matrix;
 import hep.physics.vec.BasicHep3Vector;
-import hep.physics.vec.Hep3Matrix;
 import hep.physics.vec.Hep3Vector;
 
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.math3.geometry.euclidean.threed.RotationOrder;
 import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
-import org.lcsim.detector.Rotation3D;
 import org.lcsim.geometry.util.TransformationUtils;
 
 /**
@@ -19,7 +15,7 @@
  * 
  */
 public abstract class SurveyVolume {
-	protected boolean debug = true;
+	protected boolean debug = false;
 	private String name;
 	private String material = "Vacuum";
 	private SurveyVolume mother;
@@ -104,34 +100,34 @@
 	
 	private void applyLocalAlignmentCorrections() {
 	    // Apply alignment corrections to local coordinate system that is already built
-	    boolean debug_local = true;
+	    boolean debug_local = false;
 	    if(this.coord==null) throw new RuntimeException("no coordinate system was set before trying to apply alignment corrections.");
 
 	    if(alignmentCorrections!=null) {
 
-	        if(debug_local) System.out.printf("%s: Apply alignment corrections to this coord system:\n%s\n",this.getClass().getSimpleName(),getCoord().toString());
+	        if(debug_local || debug) System.out.printf("%s: Apply alignment corrections to this coord system:\n%s\n",this.getClass().getSimpleName(),getCoord().toString());
 
 	        // translate
 	        if(alignmentCorrections.getTranslation()!=null) {			    
 
-	            if(debug_local) System.out.printf("%s: Apply local translation %s\n", this.getClass().getSimpleName(),alignmentCorrections.getTranslation().toString());			    
+	            if(debug_local || debug) System.out.printf("%s: Apply local translation %s\n", this.getClass().getSimpleName(),alignmentCorrections.getTranslation().toString());			    
 	            
 	            // rotate into mother coordinate system
 	            Hep3Vector translation_mother = getCoord().getTransformation().rotated(alignmentCorrections.getTranslation());
 	            
-	            if(debug_local) System.out.printf("%s: after rotation apply translation %s to coordinate system\n", this.getClass().getSimpleName(),translation_mother.toString());
+	            if(debug_local || debug) System.out.printf("%s: after rotation apply translation %s to coordinate system\n", this.getClass().getSimpleName(),translation_mother.toString());
 	            
 	            //apply translation
 	            getCoord().translate(translation_mother);
 
 	        } else {
-	            if(debug_local) System.out.printf("%s: No translation to coordinate system\n", this.getClass().getSimpleName());
+	            if(debug_local || debug) System.out.printf("%s: No translation to coordinate system\n", this.getClass().getSimpleName());
 	        }
 
 	        // rotate
 	        if(alignmentCorrections.getRotation()!=null) {  
 	            
-                if(debug_local) {
+                if(debug_local || debug) {
                     System.out.printf("%s: Apply rotation matrix:\n", this.getClass().getSimpleName());   
                     TransformationUtils.printMatrix(alignmentCorrections.getRotation().getMatrix());
                     System.out.printf("%s: coord system before:\n%s\n", this.getClass().getSimpleName(),getCoord().toString());   
@@ -153,7 +149,7 @@
 	            getCoord().v(v_rot);
 	            getCoord().w(w_rot);
 
-                if(debug_local) {
+                if(debug_local || debug) {
                     System.out.printf("%s: coord system after:\n%s\n", this.getClass().getSimpleName(),getCoord().toString());   
                 }
 
@@ -169,7 +165,7 @@
                 // get the rotation correction in the mother coordinate system
                 //Rotation3D r = Rotation3D.multiply(getCoord().getTransformation().getRotation(),rotMP);
 	            
-//                if(debug_local) {
+//                if(debug_local || debug) {
 //	                System.out.printf("%s: Apply rotation matrix:\n", this.getClass().getSimpleName());             
 //	                double mat[][] = alignmentCorrections.getRotation().getMatrix();
 //	                TransformationUtils.printMatrix(mat);
@@ -190,13 +186,13 @@
                 //getCoord().rotate(r);
 
 	        } else {
-	            if(debug_local) System.out.printf("%s: No rotation to coordinate system\n", this.getClass().getSimpleName());
+	            if(debug_local || debug) System.out.printf("%s: No rotation to coordinate system\n", this.getClass().getSimpleName());
 	        }
 
-	        if(debug_local) System.out.printf("%s: coordinate system after alignment corrections:\n%s\n",this.getClass().getSimpleName(),getCoord().toString());
+	        if(debug_local || debug) System.out.printf("%s: coordinate system after alignment corrections:\n%s\n",this.getClass().getSimpleName(),getCoord().toString());
 
 	    } else {
-	        if(debug_local) System.out.printf("%s: No aligment corrections to coordinate system\n", this.getClass().getSimpleName());
+	        if(debug_local || debug) System.out.printf("%s: No aligment corrections to coordinate system\n", this.getClass().getSimpleName());
 	    }
 
 	}

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolumeImpl.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolumeImpl.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/SurveyVolumeImpl.java	Tue Nov 25 15:48:06 2014
@@ -2,7 +2,7 @@
 
 public abstract class SurveyVolumeImpl extends SurveyVolumeVisualization {
 
-    private boolean debug = true;
+    private boolean debug = false;
     private String name;
 
     public SurveyVolumeImpl() {

Modified: projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/lcdd/HPSTracker2014Base.java
 =============================================================================
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/lcdd/HPSTracker2014Base.java	(original)
+++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/geometry/compact/converter/lcdd/HPSTracker2014Base.java	Tue Nov 25 15:48:06 2014
@@ -32,7 +32,7 @@
  */
 public abstract class HPSTracker2014Base extends LCDDSubdetector {
 
-    protected boolean _debug = true;
+    protected boolean _debug = false;
     protected static HPSTrackerLCDDBuilder builder;
     private final boolean buildBeamPlane = false;
     private final double beamPlaneWidth = 385.00;

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1