Commit in lcsim/src/org/lcsim/recon/cluster/util on MAIN
CalorimeterCluster.java+30-301.5 -> 1.6
FixedConeClusterPropertyCalculator.java+28-281.3 -> 1.4
TensorClusterPropertyCalculator.java+6-61.4 -> 1.5
+64-64
3 modified files
GL: Fix warnings

lcsim/src/org/lcsim/recon/cluster/util
CalorimeterCluster.java 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- CalorimeterCluster.java	2 Aug 2005 17:18:04 -0000	1.5
+++ CalorimeterCluster.java	16 Mar 2006 00:21:49 -0000	1.6
@@ -3,7 +3,7 @@
 import java.util.List;
 import org.lcsim.spacegeom.PrincipalAxesLineFitter;
 import org.lcsim.event.CalorimeterHit;
-import org.lcsim.geometry.CalorimeterIDDecoder;
+import org.lcsim.geometry.IDDecoder;
 import org.lcsim.util.fourvec.Lorentz4Vector;
 import org.lcsim.util.fourvec.Momentum4Vector;
 
@@ -15,7 +15,7 @@
  */
 public class CalorimeterCluster extends BasicCluster
 {
-    private CalorimeterIDDecoder _decoder;
+    private IDDecoder _decoder;
     private Lorentz4Vector _vec;
     // second moment of the cluster
     private double _width;
@@ -29,18 +29,18 @@
     private double _highestCellEnergy;
     private boolean _isEndCap;
     private boolean _isNorth;
-    private double _chisq = 99999.;    
-    
+    private double _chisq = 99999.;
+
     /**
      * Fully qualified constructor
      *
-     * @param   decoder  The CalorimeterIDDecoder used for indexing
+     * @param   decoder  The IDDecoder used for indexing
      * @param   vec   The Lorentz four-vector
      * @param   members  A Vector of CalorimeterHits
      * @param   layers  The number of layers in the Calorimeter
      * @param   samplingFraction The conversion from measured to deposited energy
      */
-    public CalorimeterCluster(CalorimeterIDDecoder decoder, Lorentz4Vector vec, List<CalorimeterHit> members, int layers, double samplingFraction)
+    public CalorimeterCluster(IDDecoder decoder, Lorentz4Vector vec, List<CalorimeterHit> members, int layers, double samplingFraction)
     {
         _decoder = decoder;
         _vec = vec;
@@ -50,7 +50,7 @@
         // the array of cell (x,y,z) coordinates
         double[][] points = new double[3][members.size()];
         int npoints=0;
-        
+
         for(CalorimeterHit h : members )
         {
             _decoder.setID(h.getCellID());
@@ -99,7 +99,7 @@
         {
             _layerWidth[i]/=_clusterEnergy;
         }
-        
+
         // fit a straight line through the cells and store the results
         PrincipalAxesLineFitter lf = new PrincipalAxesLineFitter();
         lf.fit(points);
@@ -109,7 +109,7 @@
         // finish up the cluster (base class method)
 //        calculateDerivedQuantities();
     }
-    
+
     /**
      * Calculate the cluster four-momentum.
      * The Lorentz four-vector is derived from the cluster cells.
@@ -124,7 +124,7 @@
             _decoder.setID(p2.getCellID());
             double phi = _decoder.getPhi();
             double theta=_decoder.getTheta();
-            
+
             double cellE = p2.getRawEnergy()/_samplingFraction;
             double px = cellE*Math.cos(_decoder.getPhi())*Math.sin(_decoder.getTheta());
             double py = cellE*Math.sin(_decoder.getPhi())*Math.sin(_decoder.getTheta());
@@ -133,7 +133,7 @@
         }
         _vec = sum;
     }
-    
+
     /**
      * The cluster width (energy second moment).
      *
@@ -143,7 +143,7 @@
     {
         return _width;
     }
-    
+
     /**
      * The cluster four-momentum
      *
@@ -153,7 +153,7 @@
     {
         return _vec;
     }
-    
+
     /**
      * The constituent cells
      *
@@ -163,7 +163,7 @@
     {
         return hits;
     }
-    
+
     /**
      * The cluster energy deposited in a specific layer
      *
@@ -173,7 +173,7 @@
     {
         return _layerEnergy[layer];
     }
-    
+
     /**
      * The cluster layer energies
      *
@@ -183,8 +183,8 @@
     {
         return _layerEnergy;
     }
-    
-    
+
+
     /**
      * The cluster energy corrected for sampling fractions
      *
@@ -194,7 +194,7 @@
     {
         return _clusterEnergy;
     }
-    
+
     /**
      * The energy of the highest energy cell in this cluster
      *
@@ -204,7 +204,7 @@
     {
         return _highestCellEnergy;
     }
-    
+
     /**
      * The CalorimeterHit in this cluster with the highest energy
      *
@@ -214,7 +214,7 @@
     {
         return _hottestCell;
     }
-    
+
     /**
      * The cluster width (energy second moment) deposited in a specific layer
      *
@@ -224,7 +224,7 @@
     {
         return _layerWidth[layer];
     }
-    
+
     /**
      * The unweighted spatial centroid (x,y,z) of the cluster line fit
      *
@@ -234,7 +234,7 @@
     {
         return _centroid;
     }
-    
+
     /**
      * The direction cosines of the cluster line fit
      *
@@ -244,8 +244,8 @@
     {
         return _directionCosines;
     }
-    
-    
+
+
     /**
      * Returns topological position of cluster.
      *
@@ -255,8 +255,8 @@
     {
         return _isEndCap;
     }
-    
-    
+
+
     /**
      * Returns topological position of cluster.
      *
@@ -266,17 +266,17 @@
     {
         return _isNorth;
     }
-    
+
     public void setChisq(double chisq)
     {
         _chisq = chisq;
     }
-    
+
     public double chisq()
     {
         return _chisq;
     }
-    
+
     /**
      * Output stream
      *
@@ -286,6 +286,6 @@
     {
         return "CalorimeterCluster: E= "+clusterEnergy()+" "+hits.size()+" cells"+_vec;
     }
-    
+
 }
 

lcsim/src/org/lcsim/recon/cluster/util
FixedConeClusterPropertyCalculator.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- FixedConeClusterPropertyCalculator.java	8 Nov 2005 17:04:32 -0000	1.3
+++ FixedConeClusterPropertyCalculator.java	16 Mar 2006 00:21:49 -0000	1.4
@@ -3,7 +3,7 @@
 import java.util.List;
 import org.lcsim.spacegeom.PrincipalAxesLineFitter;
 import org.lcsim.event.CalorimeterHit;
-import org.lcsim.geometry.CalorimeterIDDecoder;
+import org.lcsim.geometry.IDDecoder;
 import org.lcsim.util.fourvec.Lorentz4Vector;
 import org.lcsim.util.fourvec.Momentum4Vector;
 
@@ -15,7 +15,7 @@
  */
 public class FixedConeClusterPropertyCalculator implements ClusterPropertyCalculator
 {
-    private CalorimeterIDDecoder _decoder;
+    private IDDecoder _decoder;
     private Lorentz4Vector _vec;
     // second moment of the cluster
     private double _width;
@@ -29,17 +29,17 @@
     private double _highestCellEnergy;
     private boolean _isEndCap;
     private boolean _isNorth;
-    private double _chisq = 99999.;   
+    private double _chisq = 99999.;
 	private int layers;
 	private double _itheta;
 	private double _iphi;
-    
+
     /**
      * Fully qualified constructor
      *
-     * @param   decoder  The CalorimeterIDDecoder used for indexing
+     * @param   decoder  The IDDecoder used for indexing
      */
-	public FixedConeClusterPropertyCalculator(CalorimeterIDDecoder decoder)
+	public FixedConeClusterPropertyCalculator(IDDecoder decoder)
 	{
 		_decoder = decoder;
 		layers = 64;
@@ -53,7 +53,7 @@
         double[][] points = new double[3][hits.size()];
         int npoints=0;
 		_highestCellEnergy = 0.;
-        
+
         for(CalorimeterHit h : hits )
         {
 		//	Subdetector d = hit.getSubdetector();
@@ -102,7 +102,7 @@
         {
             _layerWidth[i]/=_clusterEnergy;
         }
-        
+
         // fit a straight line through the cells and store the results
         PrincipalAxesLineFitter lf = new PrincipalAxesLineFitter();
         lf.fit(points);
@@ -122,7 +122,7 @@
         // finish up the cluster (base class method)
 //        calculateDerivedQuantities();
     }
-    
+
     /**
      * Calculate the cluster four-momentum.
      * The Lorentz four-vector is derived from the cluster cells.
@@ -154,7 +154,7 @@
 		sum.plusEquals(new Momentum4Vector(sums[0], sums[1], sums[2], wtsum));
         return sum;
     }
-    
+
     /**
      * The cluster width (energy second moment).
      *
@@ -164,7 +164,7 @@
     {
         return _width;
     }
-    
+
     /**
      * The cluster four-momentum
      *
@@ -174,7 +174,7 @@
     {
         return _vec;
     }
-    
+
     /**
      * The constituent cells
      *
@@ -189,7 +189,7 @@
     {
         return _layerEnergy[layer];
     }
-    
+
     /**
      * The cluster layer energies
      *
@@ -199,8 +199,8 @@
     {
         return _layerEnergy;
     }
-    
-    
+
+
     /**
      * The cluster energy corrected for sampling fractions
      *
@@ -210,7 +210,7 @@
     {
         return _clusterEnergy;
     }
-    
+
     /**
      * The energy of the highest energy cell in this cluster
      *
@@ -220,7 +220,7 @@
     {
         return _highestCellEnergy;
     }
-    
+
     /**
      * The CalorimeterHit in this cluster with the highest energy
      *
@@ -230,7 +230,7 @@
     {
         return _hottestCell;
     }
-    
+
     /**
      * The cluster width (energy second moment) deposited in a specific layer
      *
@@ -240,7 +240,7 @@
     {
         return _layerWidth[layer];
     }
-    
+
     /**
      * The unweighted spatial centroid (x,y,z) of the cluster line fit
      *
@@ -250,7 +250,7 @@
     {
         return _centroid;
     }
-    
+
     /**
      * The direction cosines of the cluster line fit
      *
@@ -260,8 +260,8 @@
     {
         return _directionCosines;
     }
-    
-    
+
+
     /**
      * Returns topological position of cluster.
      *
@@ -271,8 +271,8 @@
     {
         return _isEndCap;
     }
-    
-    
+
+
     /**
      * Returns topological position of cluster.
      *
@@ -282,12 +282,12 @@
     {
         return _isNorth;
     }
-    
+
     public void setChisq(double chisq)
     {
         _chisq = chisq;
     }
-    
+
     public double chisq()
     {
         return _chisq;
@@ -320,7 +320,7 @@
 		shapeParameters[0] = _width;
 		return shapeParameters;
 	}
-    
-    
+
+
 }
 

lcsim/src/org/lcsim/recon/cluster/util
TensorClusterPropertyCalculator.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- TensorClusterPropertyCalculator.java	2 Aug 2005 17:18:04 -0000	1.4
+++ TensorClusterPropertyCalculator.java	16 Mar 2006 00:21:49 -0000	1.5
@@ -5,7 +5,7 @@
 import java.util.List;
 import org.lcsim.event.CalorimeterHit;
 import org.lcsim.event.Cluster;
-import org.lcsim.geometry.CalorimeterIDDecoder;
+// import org.lcsim.geometry.CalorimeterIDDecoder;
 
 /**
  * Implementation of ClusterPropertyCalculator Interface using
@@ -24,7 +24,7 @@
     protected double[] mm_NE;
     protected double[] mm_CE;
     protected double[][] mm_PA;
-    
+
     /**
      * Calculate the cluster properties from the hits
      */
@@ -109,7 +109,7 @@
             Exy = Exy + Etot*CEx*CEy;
             Eyz = Eyz + Etot*CEy*CEz;
             Exz = Exz + Etot*CEz*CEx;
-            
+
             //
             Tr = Exx + Eyy + Ezz;
             double Dxx = Eyy*Ezz - Eyz*Eyz;
@@ -123,7 +123,7 @@
             double sqrtxt = Math.sqrt(xt);
             // eqn to solve for eigenvalues is x**3 - x**2*Tr + x*M - Det = 0
             // crosses y axis at -Det and inflection points are
-            
+
             double mE1 = 0.;
             double mE2 = 0.;
             double mE3 = 0.;
@@ -194,7 +194,7 @@
                     E3 = mE1;
                 }
             }
-            
+
             NE1 = E1/Etot;
             NE2 = E2/Etot;
             NE3 = E3/Etot;
@@ -284,5 +284,5 @@
     {
         return mm_PA;
     }
-    
+
 }
CVSspam 0.2.8