Print

Print


Commit in lcsim/src/org/lcsim/contrib/onoprien/crux on MAIN
algorithms/ClusteringDriver.java+6-21.1 -> 1.2
tests/TestDriverClustering.java+19-191.1 -> 1.2
util/ConstList.java+8-11.1 -> 1.2
package.html+9added 1.1
+42-22
1 added + 3 modified, total 4 files


lcsim/src/org/lcsim/contrib/onoprien/crux/algorithms
ClusteringDriver.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- ClusteringDriver.java	2 Apr 2008 22:30:10 -0000	1.1
+++ ClusteringDriver.java	4 Apr 2008 18:29:02 -0000	1.2
@@ -11,10 +11,14 @@
 import org.lcsim.contrib.onoprien.crux.infrastructure.*;
 
 /**
- *
+ * Driver that controls clustering of hits in the calorimeter.
+ * <p>
+ * The actual work is done by one or more {@link Clusterer} objects supplied through
+ * calls to {@link #set set(String name, Object... value)} method. This driver fetches
+ * input hit map from the event, 
  *
  * @author D. Onoprienko
- * @version $Id: ClusteringDriver.java,v 1.1 2008/04/02 22:30:10 onoprien Exp $
+ * @version $Id: ClusteringDriver.java,v 1.2 2008/04/04 18:29:02 onoprien Exp $
  */
 public class ClusteringDriver extends CruxDriver {
   

lcsim/src/org/lcsim/contrib/onoprien/crux/tests
TestDriverClustering.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- TestDriverClustering.java	2 Apr 2008 22:30:11 -0000	1.1
+++ TestDriverClustering.java	4 Apr 2008 18:29:02 -0000	1.2
@@ -21,7 +21,7 @@
  *
  *
  * @author D. Onoprienko
- * @version $Id: TestDriverClustering.java,v 1.1 2008/04/02 22:30:11 onoprien Exp $
+ * @version $Id: TestDriverClustering.java,v 1.2 2008/04/04 18:29:02 onoprien Exp $
  */
 public class TestDriverClustering extends CruxDriver {
   
@@ -60,30 +60,30 @@
     hitMapCreator.set("OUTPUT", null, "CalHitMap_All", "MAP");
     add(hitMapCreator);
 
-    add(new CruxDriver() {
-      public void process(EventHeader event) {
-        int nHits = 0;
-        List<CalorimeterHit> hits = event.get(CalorimeterHit.class, "EcalBarrDigiHits");
-        log("EcalBarrDigiHits " + hits.size()); nHits += hits.size();
-        hits = event.get(CalorimeterHit.class, "EcalEndcapDigiHits");
-        log("EcalEndcapDigiHits " + hits.size()); nHits += hits.size();
-        hits = event.get(CalorimeterHit.class, "HcalBarrDigiHits");
-        log("HcalBarrDigiHits " + hits.size()); nHits += hits.size();
-        hits = event.get(CalorimeterHit.class, "HcalEndcapDigiHits");
-        log("HcalEndcapDigiHits " + hits.size()); nHits += hits.size();
-        log("Total = " + nHits);
-        CruxHitMap map = (CruxHitMap) event.get("CalHitMap_All");
-        log("CalHitMap_All " + map.size());
-      }
-    });
+//    add(new CruxDriver() {
+//      public void process(EventHeader event) {
+//        int nHits = 0;
+//        List<CalorimeterHit> hits = event.get(CalorimeterHit.class, "EcalBarrDigiHits");
+//        log("EcalBarrDigiHits " + hits.size()); nHits += hits.size();
+//        hits = event.get(CalorimeterHit.class, "EcalEndcapDigiHits");
+//        log("EcalEndcapDigiHits " + hits.size()); nHits += hits.size();
+//        hits = event.get(CalorimeterHit.class, "HcalBarrDigiHits");
+//        log("HcalBarrDigiHits " + hits.size()); nHits += hits.size();
+//        hits = event.get(CalorimeterHit.class, "HcalEndcapDigiHits");
+//        log("HcalEndcapDigiHits " + hits.size()); nHits += hits.size();
+//        log("Total = " + nHits);
+//        CruxHitMap map = (CruxHitMap) event.get("CalHitMap_All");
+//        log("CalHitMap_All " + map.size());
+//      }
+//    });
 
     // -- Initial clustering :  ------------------------------------------------
     
     ClusteringDriver clusteringDriver = new ClusteringDriver();
     clusteringDriver.set("INPUT_HIT_MAP", "CalHitMap_All");
     clusteringDriver.set("SPLIT_BY_MODULE");
-//    Clusterer clusterer = new NearestNeighborClusterer(1, 1, 1, 1, 0.);
-    Clusterer clusterer = new org.lcsim.recon.cluster.cheat.CheatClusterer();
+    Clusterer clusterer = new NearestNeighborClusterer(1, 1, 1, 1, 0.);
+//    Clusterer clusterer = new org.lcsim.recon.cluster.cheat.CheatClusterer();
     clusteringDriver.set("OUTPUT", null, clusterer, "FirstPassClusters");
     add(clusteringDriver);
     

lcsim/src/org/lcsim/contrib/onoprien/crux/util
ConstList.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- ConstList.java	2 Apr 2008 22:30:11 -0000	1.1
+++ ConstList.java	4 Apr 2008 18:29:02 -0000	1.2
@@ -4,9 +4,16 @@
 
 /**
  * Immutable list backed by the list supplied to the constructor.
+ * Useful for passing the original list to client code without copying it, when the
+ * client should not be able to modify the list, or when the client expects 
+ * <tt>List&lt;E&gt;</tt> but the original list is of type <tt>List&lt;<i>Subclass of</i> E&gt;</tt>.
+ * <p>
+ * An attempt to modify a list of this type will result in <tt>UnsupportedOperationException</tt>.
+ * The <tt>ConstList</tt> object is backed by the list that was supplied to its constructor, 
+ * so changes in the original list are reflected in the <tt>ConstList</tt>.
  *
  * @author D. Onoprienko
- * @version $Id: ConstList.java,v 1.1 2008/04/02 22:30:11 onoprien Exp $
+ * @version $Id: ConstList.java,v 1.2 2008/04/04 18:29:02 onoprien Exp $
  */
 public class ConstList<E> implements List<E> {
   

lcsim/src/org/lcsim/contrib/onoprien/crux
package.html added at 1.1
diff -N package.html
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ package.html	4 Apr 2008 18:29:02 -0000	1.1
@@ -0,0 +1,9 @@
+<html>
+<head>
+</head>
+<body bgcolor="white">
+
+PFA related tools.
+
+</body>
+</html>
CVSspam 0.2.8