Commit in lcsim/src/org/lcsim/recon/cluster/util on MAIN
BasicCluster.java+13-31.5 -> 1.6
Initialize energies

lcsim/src/org/lcsim/recon/cluster/util
BasicCluster.java 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- BasicCluster.java	3 Aug 2005 17:36:24 -0000	1.5
+++ BasicCluster.java	5 Aug 2005 18:17:01 -0000	1.6
@@ -21,8 +21,8 @@
     protected List<Subdetector> detectors = new ArrayList<Subdetector>();
     public double raw_energy;
     public double corrected_energy;
-    protected double[] subdetector_raw_energies = new double[30];
-    protected double[] subdetector_corrected_energies = new double[30];
+    protected double[] subdetector_raw_energies = new double[10];
+    protected double[] subdetector_corrected_energies = new double[10];
     protected List<Double> hit_energies = new ArrayList<Double>();
     protected ClusterPropertyCalculator cluster_property_calculator = new TensorClusterPropertyCalculator();
     protected boolean needsPropertyCalculation = true;
@@ -32,6 +32,16 @@
     protected double itheta;
     protected double[] directionError;
     protected double[] shapeParameters;
+	public BasicCluster()
+	{
+		raw_energy = 0.;
+		corrected_energy = 0.;
+		for(int i=0;i<10;i++)
+		{
+			subdetector_raw_energies[i] = 0.;
+			subdetector_corrected_energies[i] = 0.;
+		}
+	}
     
     /**
      * Add a CalorimeterHit to the cluster
@@ -46,7 +56,7 @@
 		IDDecoder idc = hit.getIDDecoder();
 		idc.setID(hit.getCellID());
 		int detector_index = idc.getValue("system");
-		if((detector_index > 29 )|(detector_index < 0))detector_index = 0;
+		if((detector_index > 9 )|(detector_index < 0))detector_index = 0;
         hit_energies.add(hce);
         subdetector_raw_energies[detector_index] += hre;
         subdetector_corrected_energies[detector_index] += hce;
CVSspam 0.2.8