lcsim/src/org/lcsim/recon/cluster/structural
diff -u -r1.3 -r1.4
--- LikelihoodLinkDriver.java 24 Apr 2007 22:18:47 -0000 1.3
+++ LikelihoodLinkDriver.java 26 Apr 2007 17:17:52 -0000 1.4
@@ -22,7 +22,7 @@
* LikelihoodEvaluator.
*
* @author Mat Charles <[log in to unmask]>
- * @version $Id: LikelihoodLinkDriver.java,v 1.3 2007/04/24 22:18:47 mcharles Exp $
+ * @version $Id: LikelihoodLinkDriver.java,v 1.4 2007/04/26 17:17:52 mcharles Exp $
*/
public class LikelihoodLinkDriver extends GenericStructuralDriver
@@ -110,6 +110,7 @@
double likelihood = m_eval.getLinkLikelihoodTrackToTrack(clus1, clus2);
if (likelihood > m_cutTrackToTrack) {
m_vlinksTrackToTrack.add(new Link(clus1, clus2));
+ if (m_debug) { System.out.println("DEBUG: Added link between track("+clus1.getCalorimeterHits().size()+" hits) and track("+clus2.getCalorimeterHits().size()+" hits) since linkelihood="+likelihood+" and cut="+m_cutTrackToTrack); }
}
//System.out.println("DEBUG: "+this.getClass().getName()+": linking Track("+clus1.getCalorimeterHits().size()+") to Track("+clus2.getCalorimeterHits().size()+") likelihood="+likelihood+" (c.f. cut="+m_cutTrackToTrack+")");
}
@@ -117,6 +118,7 @@
double likelihood = m_eval.getLinkLikelihoodTrackToClump(clus1, clus2);
if (likelihood > m_cutTrackToClump) {
m_vlinksTrackToClump.add(new Link(clus1, clus2));
+ if (m_debug) { System.out.println("DEBUG: Added link between track("+clus1.getCalorimeterHits().size()+" hits) and clump("+clus2.getCalorimeterHits().size()+" hits) since linkelihood="+likelihood+" and cut="+m_cutTrackToClump); }
}
//System.out.println("DEBUG: "+this.getClass().getName()+": linking Track("+clus1.getCalorimeterHits().size()+") to Clump("+clus2.getCalorimeterHits().size()+") likelihood="+likelihood+" (c.f. cut="+m_cutTrackToClump+")");
}
@@ -124,6 +126,7 @@
double likelihood = m_eval.getLinkLikelihoodClumpToClump(clus1, clus2);
if (likelihood > m_cutClumpToClump) {
m_vlinksClumpToClump.add(new Link(clus1, clus2));
+ if (m_debug) { System.out.println("DEBUG: Added link between clump("+clus1.getCalorimeterHits().size()+" hits) and clump("+clus2.getCalorimeterHits().size()+" hits) since linkelihood="+likelihood+" and cut="+m_cutClumpToClump); }
}
//System.out.println("DEBUG: "+this.getClass().getName()+": linking Clump("+clus1.getCalorimeterHits().size()+") to Clump("+clus2.getCalorimeterHits().size()+") likelihood="+likelihood+" (c.f. cut="+m_cutClumpToClump+")");
}
lcsim/src/org/lcsim/recon/cluster/structural
diff -u -r1.1 -r1.2
--- LikelihoodLinkPlotDriver.java 21 Mar 2007 00:51:09 -0000 1.1
+++ LikelihoodLinkPlotDriver.java 26 Apr 2007 17:17:52 -0000 1.2
@@ -15,7 +15,7 @@
* this class makes some plots evaluating the performance.
*
* @author Mat Charles <[log in to unmask]>
- * @version $Id: LikelihoodLinkPlotDriver.java,v 1.1 2007/03/21 00:51:09 mcharles Exp $
+ * @version $Id: LikelihoodLinkPlotDriver.java,v 1.2 2007/04/26 17:17:52 mcharles Exp $
*/
public class LikelihoodLinkPlotDriver extends LikelihoodLinkDriver
@@ -75,8 +75,26 @@
public void compareTrackSegmentToTrackSegment(Cluster clus1, Cluster clus2)
{
+ boolean truth = checkAssociationComponentToComponent(clus1, clus2);
+ if (m_debug) {
+ System.out.println("DEBUG: For track-track (truth="+truth+"):");
+ String printme1 = new String("DEBUG: track1 ("+clus1.getCalorimeterHits().size()+" hits) contains: ");
+ String printme2 = new String("DEBUG: track2 ("+clus2.getCalorimeterHits().size()+" hits) contains: ");
+ org.lcsim.recon.cluster.analysis.ClusterMCPInfo info1 = findClusterTruthInfo(clus1);
+ org.lcsim.recon.cluster.analysis.ClusterMCPInfo info2 = findClusterTruthInfo(clus2);
+ org.lcsim.event.MCParticle[] contrib1 = info1.getContributers();
+ org.lcsim.event.MCParticle[] contrib2 = info2.getContributers();
+ org.lcsim.event.MCParticle max1 = info1.getMaxContributer();
+ org.lcsim.event.MCParticle max2 = info2.getMaxContributer();
+ for (org.lcsim.event.MCParticle part : contrib1) { printme1 += part.getType().getName()+" (E="+part.getEnergy()+"); "; }
+ for (org.lcsim.event.MCParticle part : contrib2) { printme2 += part.getType().getName()+" (E="+part.getEnergy()+"); "; }
+ printme1 += " max was "+max1.getType().getName()+" (E="+max1.getEnergy()+").";
+ printme2 += " max was "+max2.getType().getName()+" (E="+max2.getEnergy()+").";
+ System.out.println(printme1);
+ System.out.println(printme2);
+ }
double likelihood = m_eval.getLinkLikelihoodTrackToTrack(clus1, clus2);
- if (checkAssociationComponentToComponent(clus1, clus2)) {
+ if (truth) {
m_hTrackTrackSignal.fill(likelihood);
} else {
m_hTrackTrackBckgnd.fill(likelihood);
@@ -85,8 +103,10 @@
}
public void compareTrackSegmentToClump(Cluster clus1, Cluster clus2)
{
+ boolean truth = checkAssociationComponentToComponent(clus1, clus2);
+ if (m_debug) { System.out.println("DEBUG: For track-clump (truth="+truth+"):"); }
double likelihood = m_eval.getLinkLikelihoodTrackToClump(clus1, clus2);
- if (checkAssociationComponentToComponent(clus1, clus2)) {
+ if (truth) {
m_hTrackClumpSignal.fill(likelihood);
} else {
m_hTrackClumpBckgnd.fill(likelihood);
@@ -95,8 +115,10 @@
}
public void compareClumpToClump(Cluster clus1, Cluster clus2)
{
+ boolean truth = checkAssociationComponentToComponent(clus1, clus2);
+ if (m_debug) { System.out.println("DEBUG: For clump-clump (truth="+truth+"):"); }
double likelihood = m_eval.getLinkLikelihoodClumpToClump(clus1, clus2);
- if (checkAssociationComponentToComponent(clus1, clus2)) {
+ if (truth) {
m_hClumpClumpSignal.fill(likelihood);
} else {
m_hClumpClumpBckgnd.fill(likelihood);