Author: [log in to unmask]
Date: Fri Sep 25 08:20:56 2015
New Revision: 3713
Log:
Added SVT check to MTE analysis driver.
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 Fri Sep 25 08:20:56 2015
@@ -27,6 +27,7 @@
// Define track LCIO information.
private String bankCollectionName = "TriggerBank";
private String particleCollectionName = "FinalStateParticles";
+ private boolean useGoodSVT = true;
private static final AIDA aida = AIDA.defaultInstance();
private IHistogram1D[] chargedTracksPlot = {
aida.histogram1D("MTE Analysis/Møller Event Tracks", 10, -0.5, 9.5),
@@ -157,6 +158,19 @@
@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 is not properly running, skip the event.
+ if(!svtGood && useGoodSVT) { return; }
+
if(event.hasCollection(ReconstructedParticle.class, particleCollectionName)) {
// Get the list of tracks.
List<ReconstructedParticle> trackList = event.get(ReconstructedParticle.class, particleCollectionName);
@@ -180,7 +194,7 @@
// Populate the all cluster plots.
List<Cluster> topClusters = new ArrayList<Cluster>();
List<Cluster> botClusters = new ArrayList<Cluster>();
- List<Cluster> clusters = event.get(Cluster.class, "EcalClusters");
+ List<Cluster> clusters = event.get(Cluster.class, "EcalClustersCorr");
for(Cluster cluster : clusters) {
allPlots.addCluster(cluster);
if(cluster.getCalorimeterHits().get(0).getIdentifierFieldValue("iy") > 0) { topClusters.add(cluster); }
@@ -509,6 +523,10 @@
excludeNoTrackEvents = state;
}
+ public void setUseGoodSVT(boolean state) {
+ useGoodSVT = state;
+ }
+
private static final boolean inFiducialRegion(Cluster cluster) {
// Get the x and y indices for the cluster.
int ix = TriggerModule.getClusterXIndex(cluster);
|