Print

Print


Commit in lcsim/src/org/lcsim/recon/pfa/structural on MAIN
ReclusterDTreeDriver.java+38-11.23 -> 1.24
ReclusterDriver.java+2-11.19 -> 1.20
+40-2
2 modified files
add debug lines for event display

lcsim/src/org/lcsim/recon/pfa/structural
ReclusterDTreeDriver.java 1.23 -> 1.24
diff -u -r1.23 -r1.24
--- ReclusterDTreeDriver.java	11 Mar 2009 13:36:18 -0000	1.23
+++ ReclusterDTreeDriver.java	19 Oct 2009 15:56:45 -0000	1.24
@@ -26,6 +26,7 @@
 import org.lcsim.geometry.*;
 import org.lcsim.util.decision.*;
 import org.lcsim.recon.pfa.structural.sharing.*;
+import org.lcsim.util.lcio.LCIOConstants;
 
 /**
   * An algorithm to recluster showers using E/p information
@@ -36,7 +37,7 @@
   * in this package, which uses the implementation in
   * org.lcsim.recon.cluster.directedtree developed by NIU).
   *
-  * @version $Id: ReclusterDTreeDriver.java,v 1.23 2009/03/11 13:36:18 tjkim Exp $
+  * @version $Id: ReclusterDTreeDriver.java,v 1.24 2009/10/19 15:56:45 tjkim Exp $
   * @author Mat Charles <[log in to unmask]>
   */
 
@@ -681,6 +682,42 @@
 	    printStatus("FINAL STATUS:", tracksSortedByMomentum, allSharedClusters, newMapTrackToShowerComponents, newMapShowerComponentToTrack, newMapTrackToThreshold, newMapTrackToTolerance, newMapJetToShowerComponents, newMapShowerComponentToJet, mapTrackToJet, photons, mips, clumps, treesWithNoStructure, seedLeftoverHitClusters, newMapTrackToVetoedAdditions);
 	}
 
+        if (m_tj_debug){
+            // Write out clusters for tracks
+            Vector<Cluster> TrackClusterList = new Vector<Cluster>();
+            for (Track tr : tracksSortedByMomentum) {
+                Set<Cluster> showerComponents = newMapTrackToShowerComponents.get(tr);
+                BasicCluster outputCluster = new BasicCluster();
+                for(Cluster clus : showerComponents){
+                    for(CalorimeterHit hit : clus.getCalorimeterHits()){
+                        outputCluster.addHit(hit);
+                    }
+                }
+            }
+
+            // Remove shared hits from RefinedCheatClusters
+            Set<CalorimeterHit> allSharedHits = new HashSet<CalorimeterHit>();
+            for(Cluster c : smallClustersToShare){
+                allSharedHits.addAll(c.getCalorimeterHits());
+            }
+            for(Cluster c : leftoverHitClustersToShare){
+                allSharedHits.addAll(c.getCalorimeterHits());
+            }
+            List<Cluster> RefinedCheatClusters = event.get(Cluster.class, "RefinedCheatClusters");            List<Cluster> RefinedCheatClustersWithoutSharedHits = new Vector<Cluster>();
+            for(Cluster clus : RefinedCheatClusters){
+                BasicCluster outputCluster = new BasicCluster();
+                for(CalorimeterHit h : clus.getCalorimeterHits()){
+                    if(allSharedHits.contains(h)) continue;
+                    outputCluster.addHit(h);
+                }
+                RefinedCheatClustersWithoutSharedHits.add(outputCluster);
+            }
+
+            int flag = 1<<LCIOConstants.CLBIT_HITS;
+            m_event.put("TrackToShowerComponents", TrackClusterList, Cluster.class, flag);
+            m_event.put("RefinedCheatClustersWithoutSharedHits", RefinedCheatClustersWithoutSharedHits, Cluster.class, flag);
+        }
+
 	// Outputs
 	List<ReconstructedParticle> muonParticles = makeMuons();
 	List<ReconstructedParticle> electronParticles = makeElectrons();

lcsim/src/org/lcsim/recon/pfa/structural
ReclusterDriver.java 1.19 -> 1.20
diff -u -r1.19 -r1.20
--- ReclusterDriver.java	7 Feb 2009 05:06:57 -0000	1.19
+++ ReclusterDriver.java	19 Oct 2009 15:56:45 -0000	1.20
@@ -41,7 +41,7 @@
   * This version is superseded by ReclusterDTreeDriver,
   * which derives from it.
   *
-  * @version $Id: ReclusterDriver.java,v 1.19 2009/02/07 05:06:57 tjkim Exp $
+  * @version $Id: ReclusterDriver.java,v 1.20 2009/10/19 15:56:45 tjkim Exp $
   * @author Mat Charles <[log in to unmask]>
   */
 
@@ -67,6 +67,7 @@
     boolean m_debugTiming = false;
     boolean m_debugLinkScores = false;
     boolean m_debugEoverP = false;
+    boolean m_tj_debug = false; 
     String m_outputParticleListName = "ReclusteredParticles";
     String m_mcList;
     String m_inputSmallClusters;
CVSspam 0.2.8