Print

Print


Author: [log in to unmask]
Date: Fri Sep  4 19:14:27 2015
New Revision: 3541

Log:
change order of operations

Modified:
    java/trunk/tracking/src/main/java/org/hps/recon/tracking/MergeTrackCollections.java

Modified: java/trunk/tracking/src/main/java/org/hps/recon/tracking/MergeTrackCollections.java
 =============================================================================
--- java/trunk/tracking/src/main/java/org/hps/recon/tracking/MergeTrackCollections.java	(original)
+++ java/trunk/tracking/src/main/java/org/hps/recon/tracking/MergeTrackCollections.java	Fri Sep  4 19:14:27 2015
@@ -15,6 +15,9 @@
 import org.lcsim.util.Driver;
 
 /**
+ * Read all track collections in the event, deduplicate tracks with the same hit
+ * content, and put the resulting list of unique tracks in a new collection.
+ * Remove the original track collections (this behavior can be disabled).
  *
  * @author Sho Uemura <[log in to unmask]>
  * @version $Id: $
@@ -82,13 +85,13 @@
             deduplicatedTracks.add(trk);
         }
 
-        int flag = 1 << LCIOConstants.TRBIT_HITS;
-        event.put(outputCollectionName, deduplicatedTracks, Track.class, flag);
-
         if (removeCollections) {
             for (List<Track> tracklist : trackCollections) {
                 event.remove(event.getMetaData(tracklist).getName());
             }
         }
+
+        int flag = 1 << LCIOConstants.TRBIT_HITS;
+        event.put(outputCollectionName, deduplicatedTracks, Track.class, flag);
     }
 }