Commit in lcsim/src/org/lcsim/recon/cluster/directedtree on MAIN
LoadMyCalorimeterHit.java+16-111.1 -> 1.2
GL: Make some getters public

lcsim/src/org/lcsim/recon/cluster/directedtree
LoadMyCalorimeterHit.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- LoadMyCalorimeterHit.java	8 Jan 2006 14:28:22 -0000	1.1
+++ LoadMyCalorimeterHit.java	9 Feb 2006 21:18:02 -0000	1.2
@@ -43,8 +43,12 @@
       _densityMap.clear();
     }
 
-    // assign densities to every hit in *new* hitmap,
-    // thus density=0 for hits failing energy cut
+    /** assign densities to every hit in the hitmap.  No energy cut is
+     * required, but input hitmap may have hit selection requirements,
+     * such as energy and time thresholds.
+     * @param colName collection name, used to determine neighborhood
+     * @param hitmap  input map used to determine cell densities
+     */
     public void setDensities(String colName, Map<Long,CalorimeterHit> hitmap) {
 
       if( colName.contains("Ecal") ) {
@@ -63,7 +67,7 @@
       for( CalorimeterHit khit : hitmap.values() ) {
 	long cellid = khit.getCellID();
 	IDDecoder decoder = khit.getSubdetector().getIDDecoder();
-	SegmentationBase segm = (SegmentationBase)decoder;	  
+	SegmentationBase segm = (SegmentationBase)decoder;
 
 	double nNeigh = 1.0;  // count hit itself + neighbors (never zero)
 	segm.setID(cellid);
@@ -75,25 +79,26 @@
 	}
 
 	_densityMap.put(cellid,nNeigh);
+	AIDA.defaultInstance().cloud1D("density (all)").fill(nNeigh);
 	if(nNeigh<50) AIDA.defaultInstance().cloud1D("density").fill(nNeigh);
       }
     }
 
     // Get hit density from a hit reference
-    double getDensity(final CalorimeterHit hit) {
+    public double getDensity(final CalorimeterHit hit) {
 	if(hit==null) return 0.0;
 	return this.getDensity( hit.getCellID() );
     }
 
     // Get hit density from cellID
-    double getDensity(long cellid) {
-	try {
+    public double getDensity(long cellid) {
+ 	try {
 	    return _densityMap.get( cellid );
-	}
-	catch(NullPointerException e) {
-	    // Hits below threshold end up here, should return density=0
-	    return 0.0;
-	}
+ 	}
+ 	catch(NullPointerException e) {
+ 	    // Hits below threshold end up here, should return density=0
+ 	    return 0.0;
+ 	}
     }
 
     //*** FIELDS ***
CVSspam 0.2.8