Author: [log in to unmask] Date: Sat Sep 26 15:37:18 2015 New Revision: 3720 Log: Minor fix to the MTE analysis. Modified: java/trunk/users/src/main/java/org/hps/users/kmccarty/MTEAnalysis.java Modified: java/trunk/users/src/main/java/org/hps/users/kmccarty/MTEAnalysis.java ============================================================================= --- java/trunk/users/src/main/java/org/hps/users/kmccarty/MTEAnalysis.java (original) +++ java/trunk/users/src/main/java/org/hps/users/kmccarty/MTEAnalysis.java Sat Sep 26 15:37:18 2015 @@ -25,6 +25,7 @@ public class MTEAnalysis extends Driver { // Define track LCIO information. + private boolean skipBadSVT = true; private String bankCollectionName = "TriggerBank"; private String particleCollectionName = "FinalStateParticles"; private static final AIDA aida = AIDA.defaultInstance(); @@ -157,6 +158,21 @@ @Override public void process(EventHeader event) { + // Check whether the SVT was active in this event. + final String[] flagNames = { "svt_bias_good", "svt_burstmode_noise_good", "svt_position_good" }; + boolean svtGood = true; + for(int i = 0; i < flagNames.length; i++) { + int[] flag = event.getIntegerParameters().get(flagNames[i]); + if(flag == null || flag[0] == 0) { + svtGood = false; + } + } + + // If the SVT was bad, then skip the event. + if(!svtGood && skipBadSVT) { + return; + } + if(event.hasCollection(ReconstructedParticle.class, particleCollectionName)) { // Get the list of tracks. List<ReconstructedParticle> trackList = event.get(ReconstructedParticle.class, particleCollectionName); @@ -509,6 +525,10 @@ excludeNoTrackEvents = state; } + public void setSkipBadSVT(boolean state) { + skipBadSVT = state; + } + private static final boolean inFiducialRegion(Cluster cluster) { // Get the x and y indices for the cluster. int ix = TriggerModule.getClusterXIndex(cluster);