Print

Print


Commit in lcsim/src/org/lcsim/contrib/uiowa/structural/likelihood on MAIN
StructuralLikelihoodQuantityWithEventInfo.java+22added 1.1
StructuralLikelihoodQuantity.java+101.1 -> 1.2
+32
1 added + 1 modified, total 2 files
Added the possibility to cache per-event information in a Quantity -- this is needed for proper geometry handling. Also added comments.

lcsim/src/org/lcsim/contrib/uiowa/structural/likelihood
StructuralLikelihoodQuantityWithEventInfo.java added at 1.1
diff -N StructuralLikelihoodQuantityWithEventInfo.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ StructuralLikelihoodQuantityWithEventInfo.java	18 Oct 2005 17:29:43 -0000	1.1
@@ -0,0 +1,22 @@
+package structural.likelihood; // package org.lcsim.recon.cluster.structural.likelihood;
+
+import org.lcsim.event.Cluster;
+import org.lcsim.event.EventHeader;
+
+/**
+  * This is an extension of the StructuralLikelihoodQuantity interface to cover the
+  * case where a quantity needs per-event information. (For example, if a quantity
+  * needs access to geometry information, or to the list of all hits in the event.)
+  * Once per event, the method setEventInfo() must be called; the object then caches
+  * this information in an implementation-dependent way. The value of the quantity
+  * for a given pair of clusters is still calculated with the parent interface's
+  * evaluate() method.
+  */
+public interface StructuralLikelihoodQuantityWithEventInfo extends StructuralLikelihoodQuantity
+{
+    /**
+      * Cache the per-event information. Must be done every event before any calls
+      * to evaluate().
+      */
+    public void setEventInfo(EventHeader event);
+}

lcsim/src/org/lcsim/contrib/uiowa/structural/likelihood
StructuralLikelihoodQuantity.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- StructuralLikelihoodQuantity.java	29 Sep 2005 21:04:50 -0000	1.1
+++ StructuralLikelihoodQuantity.java	18 Oct 2005 17:29:43 -0000	1.2
@@ -5,7 +5,17 @@
 
 import org.lcsim.event.Cluster;
 
+/**
+  * Interface for individual likelihood quantities used in structural algorithm.
+  */
+
 public interface StructuralLikelihoodQuantity extends java.io.Serializable
 {
+    /**
+      * Evaluate the quantity for a pair of clusters. (For example, this could return
+      * the separation between two clusters.) If the quantity is not well-defined for
+      * these two clusters, a QuantityNotDefinedException is thrown. (For example, if
+      * the algorithm tries to calculate the moments of a cluster with only one hit.)
+      */
     public double evaluate(Cluster clus1, Cluster clus2) throws QuantityNotDefinedException;
 }
CVSspam 0.2.8