Print

Print


Commit in lcsim/src/org/lcsim/recon/cluster/util on MAIN
BasicCluster.java+45-431.7 -> 1.8
Reformatting

lcsim/src/org/lcsim/recon/cluster/util
BasicCluster.java 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- BasicCluster.java	25 Aug 2005 23:09:21 -0000	1.7
+++ BasicCluster.java	26 Sep 2005 21:52:54 -0000	1.8
@@ -34,16 +34,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.;
-		}
-	}
+    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
@@ -51,14 +51,14 @@
     public void addHit(CalorimeterHit hit)
     {
         hits.add(hit);
-		double hre = hit.getRawEnergy();
-		raw_energy += hre;
-		double hce = hit.getCorrectedEnergy();
-		corrected_energy += hce;
-		IDDecoder idc = hit.getIDDecoder();
-		idc.setID(hit.getCellID());
-		int detector_index = idc.getValue("system");
-		if((detector_index > 9 )|(detector_index < 0))detector_index = 0;
+        double hre = hit.getRawEnergy();
+        raw_energy += hre;
+        double hce = hit.getCorrectedEnergy();
+        corrected_energy += hce;
+        IDDecoder idc = hit.getIDDecoder();
+        idc.setID(hit.getCellID());
+        int detector_index = idc.getValue("system");
+        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;
@@ -72,18 +72,18 @@
     {
         int indx = hits.indexOf(hit);
         hits.remove(hit);
-		double hre = hit.getRawEnergy();
-		raw_energy -= hre;
-		double hce = hit.getCorrectedEnergy();
-		corrected_energy -= hce;
+        double hre = hit.getRawEnergy();
+        raw_energy -= hre;
+        double hce = hit.getCorrectedEnergy();
+        corrected_energy -= hce;
         hit_energies.remove(indx);
-		IDDecoder idc = hit.getIDDecoder();
-		idc.setID(hit.getCellID());
-		int detector_index = idc.getValue("system");
-		if((detector_index > 20 )|(detector_index < 0))detector_index = 0;
-		subdetector_raw_energies[detector_index] -= hre;
-		subdetector_corrected_energies[detector_index] -= hce;
-		needsPropertyCalculation = true;
+        IDDecoder idc = hit.getIDDecoder();
+        idc.setID(hit.getCellID());
+        int detector_index = idc.getValue("system");
+        if((detector_index > 20 )|(detector_index < 0))detector_index = 0;
+        subdetector_raw_energies[detector_index] -= hre;
+        subdetector_corrected_energies[detector_index] -= hce;
+        needsPropertyCalculation = true;
     }
     /**
      * Add a Cluster to the cluster
@@ -103,17 +103,17 @@
         else
         {
             corrected_energy += cluster.getEnergy();
-			if(cluster instanceof BasicCluster)
-			{
-				BasicCluster bcl = (BasicCluster) cluster;
-				raw_energy += bcl.getRawEnergy();
-			}
+            if(cluster instanceof BasicCluster)
+            {
+                BasicCluster bcl = (BasicCluster) cluster;
+                raw_energy += bcl.getRawEnergy();
+            }
             double[] sde = cluster.getSubdetectorEnergies();
             for(int i=0;i<sde.length;i++)
             {
-				subdetector_corrected_energies[i] += sde[i];
-				subdetector_raw_energies[i] += sde[i];
-			}
+                subdetector_corrected_energies[i] += sde[i];
+                subdetector_raw_energies[i] += sde[i];
+            }
         }
     }
     
@@ -288,11 +288,13 @@
      * subclusters, as per interface.  Hits belonging to more than one
      * cluster/subcluster should be counted only once.
      */
-    public int getSize() {
-	Set<CalorimeterHit> hitSet = new HashSet<CalorimeterHit>(this.hits);
-	for( Cluster clus : clusters ) {
-	    hitSet.addAll( clus.getCalorimeterHits() );
-	}
-	return hitSet.size();
+    public int getSize()
+    {
+        Set<CalorimeterHit> hitSet = new HashSet<CalorimeterHit>(this.hits);
+        for( Cluster clus : clusters )
+        {
+            hitSet.addAll( clus.getCalorimeterHits() );
+        }
+        return hitSet.size();
     }
 }
CVSspam 0.2.8