Author: [log in to unmask]
Date: Thu Mar 5 10:05:31 2015
New Revision: 2262
Log:
Fixed an issue where clustering in verbose mode was ordering the hits incorrectly for cluster reconstruction.
Modified:
java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPOnlineClusterer.java
Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPOnlineClusterer.java
=============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPOnlineClusterer.java (original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPOnlineClusterer.java Thu Mar 5 10:05:31 2015
@@ -94,21 +94,7 @@
System.out.println("======================================================================");
System.out.println("=== GTP Readout Clusterer ============================================");
System.out.println("======================================================================");
- }
-
- // Track the valid clusters.
- List<Cluster> clusterList = new ArrayList<Cluster>();
-
- // Sort the hits by time in reverse order.
- Collections.sort(hitList, new Comparator<CalorimeterHit>() {
- @Override
- public int compare(CalorimeterHit firstHit, CalorimeterHit secondHit) {
- return Double.compare(secondHit.getTime(), firstHit.getTime());
- }
- });
-
- // VERBOSE :: Print the hit information.
- if(verbose) {
+
Collections.sort(hitList, new Comparator<CalorimeterHit>() {
@Override
public int compare(CalorimeterHit firstHit, CalorimeterHit secondHit) {
@@ -131,6 +117,17 @@
}
System.out.println();
}
+
+ // Track the valid clusters.
+ List<Cluster> clusterList = new ArrayList<Cluster>();
+
+ // Sort the hits by time in reverse order.
+ Collections.sort(hitList, new Comparator<CalorimeterHit>() {
+ @Override
+ public int compare(CalorimeterHit firstHit, CalorimeterHit secondHit) {
+ return Double.compare(secondHit.getTime(), firstHit.getTime());
+ }
+ });
// A seed hit is a hit that is the largest both within its
// spatial range (+/- 1 in the ix and iy direction) and
|