Author: [log in to unmask]
Date: Tue Feb 10 14:56:31 2015
New Revision: 2095
Log:
Remove reference to old cluster property calculator. HPSJAVA-418
Modified:
java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterUtilities.java
Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterUtilities.java
=============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterUtilities.java (original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterUtilities.java Tue Feb 10 14:56:31 2015
@@ -369,16 +369,7 @@
ClusterEnergyCorrection.setCorrectedEnergy(baseCluster);
}
}
-
- /**
- * Call {@link org.lcsim.event.base.BaseCluster#calculateProperties()}
- * on all clusters in the list using the default calculator.
- * @param clusters The list of clusters.
- */
- public static void calculateProperties(List<Cluster> clusters) {
- calculateProperties(clusters, new DefaultClusterPropertyCalculator());
- }
-
+
/**
* Call {@link org.lcsim.event.base.BaseCluster#calculateProperties()}
* on all clusters in the list using the given calculator.
@@ -470,5 +461,15 @@
return uniqueHits;
}
-
+ /**
+ * True if cluster has a type code that indicates it was generated by a hardware clustering algorithm.
+ * These are not actually hardware clusters but are generated by Driver code that simulates these algorithms.
+ * @param cluster The Cluster.
+ * @return True if cluster is generated from hardware clustering algorithm.
+ */
+ public static boolean isHardwareCluster(Cluster cluster) {
+ return cluster.getType() == ClusterType.CTP.getType() ||
+ cluster.getType() == ClusterType.GTP.getType() ||
+ cluster.getType() == ClusterType.GTP_ONLINE.getType();
+ }
}
|