LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SVN Home

HPS-SVN Home

HPS-SVN  January 2015

HPS-SVN January 2015

Subject:

r2006 - in /java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster: GTPClusterDriver.java GTPClusterer.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the hps svn repository <[log in to unmask]>

Date:

Fri, 30 Jan 2015 19:08:52 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (134 lines)

Author: [log in to unmask]
Date: Fri Jan 30 11:08:46 2015
New Revision: 2006

Log:
Updated the GTPClusterDriver to allow for all parameters to be set through a steering file and also modified the clustering algorithm to support the writing of diagnostic text.

Modified:
    java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPClusterDriver.java
    java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPClusterer.java

Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPClusterDriver.java
 =============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPClusterDriver.java	(original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPClusterDriver.java	Fri Jan 30 11:08:46 2015
@@ -1,18 +1,28 @@
 package org.hps.recon.ecal.cluster;
 
 /**
- * This is a Driver to wrap the GTPClusterer algorithm,
- * allowing the <code>limitClusterRange</code> to be
- * set publicly.
+ * Class <code>GTPClusterDriver</code> instantiates an instance of
+ * the clustering algorithm framework for the Monte Carlo version
+ * of the GTP algorithm. This version assumes that events are equal
+ * to 2 ns beam bunches. The class also allows the seed energy threshold
+ * and cluster window to be set as well as whether or not the algorithm
+ * should employ an asymmetric time window and write out verbose debug
+ * text.
  * 
+ * @author Kyle McCarty <[log in to unmask]>
+ * @author Jeremy McCormick <[log in to unmask]>
  * @see GTPClusterer
- * 
- * @author Jeremy McCormick <[log in to unmask]>
  */
 public class GTPClusterDriver extends ClusterDriver {
-    
+    // The GTP clustering algorithm.
+	private final GTPClusterer gtp;
+	
+	/**
+	 * Instantiates a new <code>GTPClusterer</code>.
+	 */
     public GTPClusterDriver() {
         clusterer = ClustererFactory.create("GTPClusterer");
+        gtp = (GTPClusterer) clusterer;
     }
     
     /**
@@ -24,20 +34,55 @@
      * the asymmetric clustering window should be used and <code>
      * false</code> that the symmetric window should be used.
      */
+    @Deprecated
     void setLimitClusterRange(boolean limitClusterRange) {
-        GTPClusterer gtpClusterer = getClusterer();
-        gtpClusterer.setLimitClusterRange(limitClusterRange);
+        gtp.setLimitClusterRange(limitClusterRange);
     }        
     
+    /**
+     * Sets the number of clock-cycles (4 ns) before and after a hit
+     * in which the hit must be the maximum energy hit in its 3 x 3
+     * window in order to be considered a seed hit and form a cluster.
+     * @param clusterWindow - The number of clock-cycles around the
+     * hit in one direction; i.e. a value of 1 indicates that the full
+     * window will include the current clock-cycle, plus one cycle both
+     * before and after the current cycle. This gives a total number
+     * of cycles equal to (2 * clusterWindow) + 1.
+     */
     public void setClusterWindow(int clusterWindow) {
-        getClusterer().getCuts().setValue("clusterWindow", clusterWindow);
+        gtp.getCuts().setValue("clusterWindow", clusterWindow);
     }
     
+    /**
+     * Sets the minimum energy needed for a seed hit to form a cluster.
+     * @param seedEnergyThreshold - The minimum seed energy in GeV.
+     */
     public void setSeedEnergyThreshold(double seedEnergyThreshold) {
-    	getClusterer().getCuts().setValue("seedEnergyThreshold", seedEnergyThreshold);
+    	gtp.getCuts().setValue("seedEnergyThreshold", seedEnergyThreshold);
     }
     
+    /**
+     * Sets whether the clustering algorithm should use an asymmetric
+     * clustering window. The asymmetric window will include hits in
+     * a cluster that are present within the full time window ahead of
+     * the seed hit, but only one clock-cycle behind it. This is to
+     * allow for variation in hit timing with respect to the seed due
+     * to jitter in the hardware.
+     * @param asymmetricWindow - <code>true</code> indicates that the
+     * asymmetric window should be used and <code>false</code> that it
+     * should not.
+     */
     public void setAsymmetricWindow(boolean asymmetricWindow) {
-    	((GTPClusterer) getClusterer()).setLimitClusterRange(asymmetricWindow);
+    	gtp.setLimitClusterRange(asymmetricWindow);
+    }
+    
+    /**
+     * Sets whether the clustering algorithm should output diagnostic
+     * text or not.
+     * @param verbose <code>true</code> indicates that the driver should
+     * output diagnostic text and <code>false</code> that it should not.
+     */
+    public void setVerbose(boolean verbose) {
+    	gtp.setVerbose(verbose);
     }
 }

Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPClusterer.java
 =============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPClusterer.java	(original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/cluster/GTPClusterer.java	Fri Jan 30 11:08:46 2015
@@ -344,6 +344,16 @@
     }
     
     /**
+     * Sets whether diagnostic text should be written out or not.
+     * @param verbose - <code>true</code> indicates that diagnostic
+     * text will be written out and <code>false</code> that it will
+     * not.
+     */
+    void setVerbose(boolean verbose) {
+    	this.verbose = verbose;
+    }
+    
+    /**
      * Indicates the type of cluster that is generated by this algorithm.
      * @return Returns the type of cluster as a <code>ClusterType</code>
      * object, specifically, <code>ClusterType.GTP</code>.

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use