Print

Print


Author: [log in to unmask]
Date: Tue Jan 20 06:42:32 2015
New Revision: 1957

Log:
persist cluster position calculation

Modified:
    java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterer.java

Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterer.java
 =============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterer.java	(original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterer.java	Tue Jan 20 06:42:32 2015
@@ -400,7 +400,7 @@
 
         // Remove clusters that do not pass cluster threshold and add to rejectedHitList.
         for (int j = 0; j <= clusterList.size() - 1; j++) {
-            Cluster checkcluster = clusterList.get(j);
+            BaseCluster checkcluster = (BaseCluster) clusterList.get(j);
             if (checkcluster.getEnergy() < clusterEnergyThreshold) {
                 List<CalorimeterHit> clusterHits = checkcluster.getCalorimeterHits();
                 for (CalorimeterHit nhit : clusterHits) {
@@ -447,7 +447,7 @@
      * HPS Note 2014-001.
      * @param cluster
      */
-    private void calculatePosition(Cluster cluster) {
+    private void calculatePosition(BaseCluster cluster) {
         final double w0 = 3.1;
         // calculated cluster x position
         double xCl = 0.0;
@@ -488,8 +488,9 @@
         int iy = clusterHits.get(0).getIdentifierFieldValue("iy");
         Point hitIndex = new Point(ix, iy);
         clusterPosition[2] = correctedPositionMap.get(hitIndex)[2];
-
-        ((BaseCluster) cluster).setPosition(clusterPosition);
+        
+        cluster.setPosition(clusterPosition);
+        cluster.setNeedsPropertyCalculation(false);
     }
 
     /**