Print

Print


Commit in lcsim/src/org/lcsim/recon/tracking/seedtracker on MAIN
SeedTracker.java+13-81.22 -> 1.23
Added debug flag

lcsim/src/org/lcsim/recon/tracking/seedtracker
SeedTracker.java 1.22 -> 1.23
diff -u -r1.22 -r1.23
--- SeedTracker.java	16 May 2013 17:58:31 -0000	1.22
+++ SeedTracker.java	12 Jul 2013 20:51:57 -0000	1.23
@@ -46,7 +46,7 @@
     protected boolean _timing = false;
     protected String _inputCol = "HelicalTrackHits";
     private int _iterativeConfirmedFits = 0;
-    private boolean debug = false;
+    private boolean _debug = false;
     
     /** Creates a new instance of SeedTracker */
     public SeedTracker() {
@@ -91,7 +91,7 @@
         
         //  Sort the hits for this event
         _hitmanager.OrganizeHits(hitcol);
-
+        
         //  Make the timing plots if requested
         long start_time = System.currentTimeMillis();
         double dtime = ((double) (start_time - last_time)) / 1000.;
@@ -123,29 +123,25 @@
 
         if(_iterativeConfirmedFits>0) {
             // Iteratively re-fit tracks to take into account helix and hit position correlations
-                    if(debug) System.out.printf("%s: Iteratively improve %d seeds\n",this.getClass().getSimpleName(),trackseeds.size());
+            if(_debug) System.out.printf("%s: Iteratively improve %d seeds\n",this.getClass().getSimpleName(),trackseeds.size());
             List<SeedCandidate> seedsToRemove = new ArrayList<SeedCandidate>();
             for(SeedCandidate seed : trackseeds) {
                 SeedStrategy strategy = seed.getSeedStrategy();
-                if(debug) System.out.printf("%s: Iteratively (%d times) improve seed:\n%s",this.getClass().getSimpleName(),_iterativeConfirmedFits,seed.toString());
                 boolean success = false;
                 for(int iterFit=0;iterFit<_iterativeConfirmedFits;++iterFit) {
                     success = _helixfitter.FitCandidate(seed, strategy);
                 }
                 if(!success) {
-                    if(debug) System.out.printf("%s: done iterating, this seed will NOT be added to event:\n%s\n",this.getClass().getSimpleName(),seed.toString());
                     seedsToRemove.add(seed);
                 } else {
-                    if(debug) System.out.printf("%s: done iterating, this seed will be added to event:\n%s\n",this.getClass().getSimpleName(),seed.toString());
+                    if(_debug) System.out.printf("%s: done iterating, this seed will be added to event:\n%s\n",this.getClass().getSimpleName(),seed.toString());
                 }
             }
-            if(debug) System.out.printf("%s: done iterating, removing %d seeds\n",this.getClass().getSimpleName(),seedsToRemove.size());
             for(SeedCandidate badseed : seedsToRemove) {
                 trackseeds.remove(badseed);
             }
         }
 
-        if(debug) System.out.printf("%s: %d track seeds, add these to the event\n",this.getClass().getSimpleName(),trackseeds.size());
 
 
         //  Make tracks from the final list of track seeds
@@ -289,4 +285,13 @@
         _materialmanager.setDefaultXPlaneUsage(useDefault);
         
     }
+
+    /**
+     * Enable or disable the debug output
+     * @param _debug output switch
+     */
+    public void setDebug(boolean _debug) {
+        this._debug = _debug;
+    }
+    
 }
CVSspam 0.2.12


Use REPLY-ALL to reply to list

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