Print

Print


Commit in lcsim/src/org/lcsim/recon/tracking/digitization/sisim on MAIN
StripHitMaker.java+24-31.2 -> 1.3
Add fully qualified constructor

lcsim/src/org/lcsim/recon/tracking/digitization/sisim
StripHitMaker.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- StripHitMaker.java	7 May 2009 22:36:21 -0000	1.2
+++ StripHitMaker.java	7 May 2009 23:20:31 -0000	1.3
@@ -63,14 +63,35 @@
     
     // Temporary map connecting hits to strip numbers for sake of speed (reset once per sensor)
     Map<RawTrackerHit,Integer> _strip_map = new HashMap<RawTrackerHit,Integer>();
-    
-    /** Creates a new instance of StripHitMaker */
+
+        /**
+     * Create a new instance of StripHitMaker that uses the default clustering algorithm
+     *
+     * @param simulation charge collection simulation
+     * @param readout_chip readout chip
+     */
     public StripHitMaker(SiSensorSim simulation, ReadoutChip readout_chip)
     {
+        this(simulation, readout_chip, new NearestNeighbor());
+    }
+
+    /**
+     * Fully qualified constructor for StripHitMaker
+     *
+     * @param simulation charge collection simulation
+     * @param readout_chip readout chip
+     * @param clustering clustering algorithm
+     */
+    public StripHitMaker(SiSensorSim simulation, ReadoutChip readout_chip, ClusteringAlgorithm clustering) {
         _simulation = simulation;
         _readout_chip = readout_chip;
+        _clustering = clustering;
     }
-        
+
+    public void setClusteringAlgorithm(ClusteringAlgorithm clustering_algorithm) {
+        _clustering = clustering_algorithm;
+    }
+
     public void setCentralStripAveragingThreshold(int max_noaverage_nstrips)
     {
         _max_noaverage_nstrips = max_noaverage_nstrips;
CVSspam 0.2.8