Author: [log in to unmask] Date: Tue Jan 13 12:12:24 2015 New Revision: 1921 Log: Change some file names. Added: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterEnergyCorrection.java - copied, changed from r1909, java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterEnergyCorrection.java java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterPositionCorrection.java - copied, changed from r1909, java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterPositionCorrection.java java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/DefaultClusterPropertyCalculator.java - copied, changed from r1909, java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterPropertyCalculator.java Removed: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterEnergyCorrection.java java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterPositionCorrection.java java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterPropertyCalculator.java Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterUtilities.java Copied: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterEnergyCorrection.java (from r1909, java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterEnergyCorrection.java) ============================================================================= --- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterEnergyCorrection.java (original) +++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterEnergyCorrection.java Tue Jan 13 12:12:24 2015 @@ -8,7 +8,7 @@ * * @author Jeremy McCormick <[log in to unmask]> */ -public final class ReconClusterEnergyCorrection { +public final class ClusterEnergyCorrection { // Variables for electron energy corrections. static final double ELECTRON_ENERGY_A = -0.0027; Copied: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterPositionCorrection.java (from r1909, java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterPositionCorrection.java) ============================================================================= --- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterPositionCorrection.java (original) +++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ClusterPositionCorrection.java Tue Jan 13 12:12:24 2015 @@ -11,7 +11,7 @@ * * @author Jeremy McCormick <[log in to unmask]> */ -public final class ReconClusterPositionCorrection { +public final class ClusterPositionCorrection { // Variables for electron position corrections. static final double ELECTRON_POS_A = 0.0066; 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 12:12:24 2015 @@ -23,9 +23,6 @@ * @see org.lcsim.event.base.BaseCluster */ public final class ClusterUtilities { - - // Use the HPS specific property calculator. - private static final ReconClusterPropertyCalculator propertyCalculator = new ReconClusterPropertyCalculator(); private ClusterUtilities() { } @@ -324,9 +321,9 @@ /** * Apply HPS-specific energy and position corrections to a list of clusters in place. * - * @see ReconClusterPropertyCalculator - * @see ReconClusterPositionCorrection - * @see ReconClusterEnergyCorrection + * @see DefaultClusterPropertyCalculator + * @see ClusterPositionCorrection + * @see ClusterEnergyCorrection */ public static void applyCorrections(List<Cluster> clusters) { @@ -336,46 +333,14 @@ if (cluster instanceof BaseCluster) { BaseCluster baseCluster = (BaseCluster)cluster; + + // Apply PID based position correction, which should happen before final energy correction. + ClusterPositionCorrection.setCorrectedPosition(baseCluster); - // First calculate the cluster properties, if needed. - if (baseCluster.needsPropertyCalculation()) { - // Calculate the properties of the cluster. - baseCluster.setPropertyCalculator(propertyCalculator); - baseCluster.calculateProperties(); - } - - // Apply position correction, which should happen before final energy correction. - ReconClusterPositionCorrection.setCorrectedPosition(baseCluster); - - // Apply energy correction. - ReconClusterEnergyCorrection.setCorrectedEnergy(baseCluster); - } - } - } - - /** - * Apply HPS-specific energy and position corrections to a single Cluster. - * - * @see ReconClusterPropertyCalculator - * @see ReconClusterPositionCorrection - * @see ReconClusterEnergyCorrection - */ - public static void applyCorrections(Cluster cluster) { - - BaseCluster baseCluster = (BaseCluster)cluster; - - // First calculate the cluster properties, if needed. - if (baseCluster.needsPropertyCalculation()) { - // Calculate the properties of the cluster. - baseCluster.setPropertyCalculator(propertyCalculator); - baseCluster.calculateProperties(); - } - - // Apply position correction, which should happen before final energy correction. - ReconClusterPositionCorrection.setCorrectedPosition(baseCluster); - - // Apply energy correction. - ReconClusterEnergyCorrection.setCorrectedEnergy(baseCluster); + // Apply PID based energy correction. + ClusterEnergyCorrection.setCorrectedEnergy(baseCluster); + } + } } /** @@ -384,7 +349,7 @@ * @param clusters The list of clusters. */ public static void calculateProperties(List<Cluster> clusters) { - ReconClusterPropertyCalculator calc = new ReconClusterPropertyCalculator(); + DefaultClusterPropertyCalculator calc = new DefaultClusterPropertyCalculator(); for (Cluster cluster : clusters) { if (cluster instanceof BaseCluster) { BaseCluster baseCluster = (BaseCluster)cluster; Copied: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/DefaultClusterPropertyCalculator.java (from r1909, java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterPropertyCalculator.java) ============================================================================= --- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterPropertyCalculator.java (original) +++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/DefaultClusterPropertyCalculator.java Tue Jan 13 12:12:24 2015 @@ -21,7 +21,7 @@ * * @author Jeremy McCormick <[log in to unmask]> */ -public final class ReconClusterPropertyCalculator extends AbstractClusterPropertyCalculator { +public final class DefaultClusterPropertyCalculator extends AbstractClusterPropertyCalculator { static final double eCriticalW = 800.0 * ECalUtils.MeV / (74 + 1); static final double radLenW = 8.8; // mm @@ -43,7 +43,7 @@ * <p> * Perform the cluster property calculations, which sets this object's state. * <p> - * Copied and modified from + * This algorithm is copied and modified from * {@link org.lcsim.event.base.TensorClusterPropertyCalculator#calculateProperties(List)}. */ public void calculateProperties(Cluster cluster) {