Print

Print


Author: [log in to unmask]
Date: Mon Feb 16 01:42:01 2015
New Revision: 2155

Log:
Made a few minor changes to how the verbose setting works in the GTPOnlineClusterer.

Modified:
    java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPOnlineClusterDriver.java
    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/GTPOnlineClusterDriver.java
 =============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPOnlineClusterDriver.java	(original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPOnlineClusterDriver.java	Mon Feb 16 01:42:01 2015
@@ -17,6 +17,27 @@
     public GTPOnlineClusterDriver() {
         clusterer = ClustererFactory.create("GTPOnlineClusterer");
         gtp = (GTPOnlineClusterer) clusterer;
+    }
+    
+    /**
+     * Outputs the clusterer settings.
+     */
+    @Override
+    public void startOfData() {
+    	// VERBOSE :: Output the driver settings.
+    	if(gtp.isVerbose()) {
+			// Print the cluster driver header.
+			System.out.println();
+			System.out.println();
+			System.out.println("======================================================================");
+			System.out.println("=== GTP Readout Clusterer Settings ===================================");
+			System.out.println("======================================================================");
+			
+			// Output the driver settings.
+			System.out.printf("Seed Energy Threshold :: %.3f GeV%n", gtp.getSeedLowThreshold());
+			System.out.printf("Time Window (Before)  :: %.0f ns%n", gtp.getWindowBefore());
+			System.out.printf("Time Window (After)   :: %.0f ns%n", gtp.getWindowAfter());
+    	}
     }
     
     /**

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	Mon Feb 16 01:42:01 2015
@@ -87,12 +87,17 @@
      */
     @Override
     public List<Cluster> createClusters(EventHeader event, List<CalorimeterHit> hitList) {
+    	// VERBOSE :: Print the driver header.
+    	if(verbose) {
+    		System.out.println();
+    		System.out.println();
+    		System.out.println("======================================================================");
+    		System.out.println("=== GTP Readout Clusterer ============================================");
+    		System.out.println("======================================================================");
+    	}
     	
         // Track the valid clusters.
         List<Cluster> clusterList = new ArrayList<Cluster>();
-        
-        // VERBOSE :: Indicate whether the event has hits.
-        //if(verbose) { System.out.printf("Event %7d :: Has hits [%5b]%n", event.getEventNumber(), hasHits); }
         
         // Sort the hits by time in reverse order.
         Collections.sort(hitList, new Comparator<CalorimeterHit>() {
@@ -380,6 +385,36 @@
     }
     
     /**
+     * Gets the seed energy lower bound threshold in units of GeV.
+     * @return Returns the seed energy lower bound threshold.
+     */
+    public double getSeedLowThreshold() { return seedThreshold; }
+    
+    /**
+     * Gets the number of nanoseconds before the seed hit time the
+     * clusterer will look to verify the seed hit.
+     * @return Returns the size of the time window before the seed
+     * hit time.
+     */
+    public double getWindowBefore() { return timeBefore; }
+    
+    /**
+     * Gets the number of nanoseconds after the seed hit time the
+     * clusterer will look to verify the seed hit.
+     * @return Returns the size of the time window after the seed
+     * hit time.
+     */
+    public double getWindowAfter() { return timeAfter; }
+    
+    /**
+     * Returns whether the clusterer will output verbose diagnostic
+     * information.
+     * @return Returns <code>true</code> if the clusterer will output
+     * diagnostic information and <code>false</code> otherwise.
+     */
+    public boolean isVerbose() { return verbose; }
+    
+    /**
      * Sets the minimum energy a hit must have before it will be
      * considered for cluster formation.
      * @param seedThreshold - The seed threshold in GeV.