lcsim/src/org/lcsim/contrib/uiowa/structural/likelihood
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
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;
}