Print

Print


Commit in lcsim/src/org/lcsim/recon/pfa/identifier on MAIN
SimpleTrackClusterMatcher.java+9-41.4 -> 1.5
MJC: Minor refactoring to separate creation and propagation of HelixSwimmer in track-cluster matcher

lcsim/src/org/lcsim/recon/pfa/identifier
SimpleTrackClusterMatcher.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- SimpleTrackClusterMatcher.java	16 May 2007 17:41:39 -0000	1.4
+++ SimpleTrackClusterMatcher.java	12 Oct 2007 21:32:48 -0000	1.5
@@ -27,7 +27,7 @@
  * Currently, the match criteria are hard-code. It would be better to
  * supply them as DecisionMaker objects.
  *
- * @version $Id: SimpleTrackClusterMatcher.java,v 1.4 2007/05/16 17:41:39 mcharles Exp $ 
+ * @version $Id: SimpleTrackClusterMatcher.java,v 1.5 2007/10/12 21:32:48 mcharles Exp $ 
  */
 
 public class SimpleTrackClusterMatcher extends Driver implements TrackClusterMatcher
@@ -43,6 +43,12 @@
 	// For now, E/p cut is handled specially
     }
 
+    protected HelixSwimmer createSwimmer(Track tr) {
+	HelixSwimmer swimmer = new HelixSwimmer(m_fieldStrength[2]);
+	swimmer.setTrack(tr);
+	return swimmer;
+    }
+
     /**
       * Match this track to a cluster from the list supplied.
       */
@@ -64,8 +70,7 @@
 	}
 	
 	// Make a HelixSwimmer to propagate the track
-	HelixSwimmer swimmer = new HelixSwimmer(m_fieldStrength[2]);
-	swimmer.setTrack(tr);
+	HelixSwimmer swimmer = createSwimmer(tr);
 
 	// Try swimming to the barrel:
 	double  alphaBarrel = swimToBarrel(swimmer);
@@ -214,7 +219,7 @@
 	    boolean foundMatch = goodSubDet && goodFirstLayer && goodSeparation;
 	    if (m_debug) { 
 		String printme = new String();
-		printme += "Debug: Didn't match track to cluster since";
+		printme += "Debug: Match track to cluster = ["+foundMatch+"] since";
 		printme += " subdet="+subdet.getName()+" ["+goodSubDet+"] and";
 		if (firstHitInECAL!=null) {
 		    printme += " firstlayer="+getLayer(firstHitInECAL)+" ["+goodFirstLayer+"] and";
CVSspam 0.2.8