Print

Print


Commit in lcsim/src/org/lcsim/contrib/uiowa on MAIN
ReclusterDTreeDriver.java+14-201.46 -> 1.47
MJC: (contrib) Always try reassignment; set cone limit to pi/2 instead of pi.

lcsim/src/org/lcsim/contrib/uiowa
ReclusterDTreeDriver.java 1.46 -> 1.47
diff -u -r1.46 -r1.47
--- ReclusterDTreeDriver.java	31 Aug 2008 00:37:31 -0000	1.46
+++ ReclusterDTreeDriver.java	31 Aug 2008 00:42:05 -0000	1.47
@@ -34,7 +34,7 @@
   * in this package, which uses the implementation in
   * org.lcsim.recon.cluster.directedtree developed by NIU).
   *
-  * @version $Id: ReclusterDTreeDriver.java,v 1.46 2008/08/31 00:37:31 mcharles Exp $
+  * @version $Id: ReclusterDTreeDriver.java,v 1.47 2008/08/31 00:42:05 mcharles Exp $
   * @author Mat Charles <[log in to unmask]>
   */
 
@@ -1147,7 +1147,7 @@
             Map<Track, BasicCluster> mapTrackToMIP = (Map<Track, BasicCluster>) (m_event.get(mapName));
             MIPGeometryHandler geomHandler = new LayerBasedMIPGeometryHandler(mapTrackToMIP, findCluster);
             //MIPGeometryHandler geomHandler = new HelixTangentMIPGeometryHandler(mapTrackToMIP, findCluster);
-            algorithm = new ConeMIPReassignmentAlgorithm(geomHandler, 800.0, 3.14);
+            algorithm = new ConeMIPReassignmentAlgorithm(geomHandler, 800.0, Math.PI*0.5);
 	}
 	if (m_fixSingleTracksWithCone) {
 	    // First, try to fix the simplest case: single tracks with E/p < 1
@@ -1223,16 +1223,12 @@
                                               Map<Track, Cluster> tweakedTracksMatchedToClusters)
     {
 	Set<Cluster> showerComponents = newMapTrackToShowerComponents.get(tr);
-	Set<Track> tmpJet = new HashSet<Track>();
-	tmpJet.add(tr);
-	if ( checkIfReassignmentNeeded(tmpJet, showerComponents, allSharedClusters, toleranceOfTrack) ) {
-	    List<Cluster> reassignedClusters = reassignClustersToTrack(tr, showerComponents, unassignedClusters, allSharedClusters, toleranceOfTrack, algorithm, newMapShowerComponentToTrack, tweakedTracksMatchedToClusters, newMapTrackToShowerComponents);
-	    if (reassignedClusters != null && reassignedClusters.size()>0) {
-		for (Cluster clus : reassignedClusters) {
-		    showerComponents.add(clus);
-		    unassignedClusters.remove(clus);
-		    newMapShowerComponentToTrack.put(clus, tr);
-		}
+	List<Cluster> reassignedClusters = reassignClustersToTrack(tr, showerComponents, unassignedClusters, allSharedClusters, toleranceOfTrack, algorithm, newMapShowerComponentToTrack, tweakedTracksMatchedToClusters, newMapTrackToShowerComponents);
+	if (reassignedClusters != null && reassignedClusters.size()>0) {
+	    for (Cluster clus : reassignedClusters) {
+		showerComponents.add(clus);
+		unassignedClusters.remove(clus);
+		newMapShowerComponentToTrack.put(clus, tr);
 	    }
 	}
     }
@@ -1248,14 +1244,12 @@
                                             Map<Track, Set<Cluster>> newMapTrackToShowerComponents)
     {
 	Set<Cluster> showerComponents = newMapJetToShowerComponents.get(jet);
-	if ( checkIfReassignmentNeeded(jet, showerComponents, allSharedClusters, m_jetTolerance) ) {
-	    List<Cluster> reassignedClusters = reassignClustersToJet(jet, showerComponents, unassignedClusters, allSharedClusters, m_jetTolerance, algorithm, newMapShowerComponentToTrack, tweakedTracksMatchedToClusters,newMapTrackToShowerComponents);
-	    if (reassignedClusters != null && reassignedClusters.size()>0) {
-		for (Cluster clus : reassignedClusters) {
-		    showerComponents.add(clus);
-		    unassignedClusters.remove(clus);
-		    newMapShowerComponentToJet.put(clus, jet);
-		}
+	List<Cluster> reassignedClusters = reassignClustersToJet(jet, showerComponents, unassignedClusters, allSharedClusters, m_jetTolerance, algorithm, newMapShowerComponentToTrack, tweakedTracksMatchedToClusters,newMapTrackToShowerComponents);
+	if (reassignedClusters != null && reassignedClusters.size()>0) {
+	    for (Cluster clus : reassignedClusters) {
+		showerComponents.add(clus);
+		unassignedClusters.remove(clus);
+		newMapShowerComponentToJet.put(clus, jet);
 	    }
 	}
     }
CVSspam 0.2.8