Author: [log in to unmask]
Date: Tue Jan 13 15:31:58 2015
New Revision: 1922
Log:
Add method to apply corrections to a single cluster.
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 Jan 13 15:31:58 2015
@@ -344,6 +344,27 @@
}
/**
+ * Apply HPS-specific energy and position corrections to a cluster.
+ *
+ * @see DefaultClusterPropertyCalculator
+ * @see ClusterPositionCorrection
+ * @see ClusterEnergyCorrection
+ */
+ public static void applyCorrections(Cluster cluster) {
+
+ if (cluster instanceof BaseCluster) {
+
+ BaseCluster baseCluster = (BaseCluster)cluster;
+
+ // Apply PID based position correction, which should happen before final energy correction.
+ ClusterPositionCorrection.setCorrectedPosition(baseCluster);
+
+ // Apply PID based energy correction.
+ ClusterEnergyCorrection.setCorrectedEnergy(baseCluster);
+ }
+ }
+
+ /**
* Call {@link org.lcsim.event.base.BaseCluster#calculateProperties()}
* on all clusters in the list.
* @param clusters The list of clusters.
|