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  December 2014

HPS-SVN December 2014

Subject:

r1731 - /java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/GTPOnlineClusterer.java

From:

[log in to unmask]

Reply-To:

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

Date:

Mon, 15 Dec 2014 08:58:24 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (130 lines)

Author: [log in to unmask]
Date: Mon Dec 15 00:58:20 2014
New Revision: 1731

Log:
Updating work-in-progress online GTP clustering algorithm with the correct version that has comments.

Modified:
    java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/GTPOnlineClusterer.java

Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/GTPOnlineClusterer.java
 =============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/GTPOnlineClusterer.java	(original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/GTPOnlineClusterer.java	Mon Dec 15 00:58:20 2014
@@ -9,11 +9,29 @@
 import org.lcsim.event.EventHeader;
 import org.lcsim.util.Driver;
 
+/**
+ * Class <code>GTPOnlineClusterer</code> is an implementation of the
+ * GTP clustering algorithm for EVIO readout data for use in either
+ * online reconstruction/diagnostics or for general analysis of EVIO
+ * readout data.<br/>
+ * <br/>
+ * <font color=red><b>WARNING:</b></font> This code is under construction
+ * and does not currently function. It will crash the simulation with a
+ * <code>RuntimeException</code> if any cluster is formed! 
+ * 
+ * @author Kyle McCarty <[log in to unmask]>
+ */
 public class GTPOnlineClusterer extends Driver {
-	private String hitCollectionName = "EcalCalHits";
 	private int eventNum = 0;
+	
+	// The size of the temporal window in nanoseconds. By default,
+	// this is 1 clock-cycle before and 3 clock-cycles after.
 	private double timeBefore = 4;
 	private double timeAfter = 12;
+	
+	// The LCIO collection name for hits. This defaults to the collection
+	// name used by the EVIO to LCIO converter.
+	private String hitCollectionName = "EcalCalHits";
 	
 	public void process(EventHeader event) {
 		// Increment the event number.
@@ -119,6 +137,17 @@
 		System.out.println();
 	}
 	
+	/**
+	 * Checks whether the hit <code>hit</code> keeps the hit <code>seed
+	 * </code> from meeting the criteria for being a seed hit. Note that
+	 * this does not check to see if the two hits are within the valid
+	 * spatiotemporal window of one another.
+	 * @param seed - The potential seed hit.
+	 * @param hit - The hit to compare with the seed.
+	 * @return Returns <code>true</code> if either the two hits are the
+	 * same hit or if the hit does not invalidate the potential seed.
+	 * Returns <code>false</code> otherwise.
+	 */
 	private boolean isValidSeed(CalorimeterHit seed, CalorimeterHit hit) {
 		// Get the hit and seed energies.
 		double henergy = hit.getCorrectedEnergy();
@@ -166,6 +195,18 @@
 		else { return false; }
 	}
 	
+	/**
+	 * Checks whether the hit <code>hit</code> falls within the spatial
+	 * window of the hit <code>Seed</code>. This is defined as within
+	 * 1 index of the seed's x-index and similarly for the seed's
+	 * y-index. 
+	 * @param seed - The seed hit.
+	 * @param hit - The comparison hit.
+	 * @return Returns <code>true</code> if either both hits are the
+	 * the same hit or if the comparison hit is within 1 index of the
+	 * seed's x-index and within 1 index of the seed's y-index. Returns
+	 * <code>false</code> otherwise.
+	 */
 	private boolean withinSpatialWindow(CalorimeterHit seed, CalorimeterHit hit) {
 		// Get the x-indices of each hit.
 		int six = seed.getIdentifierFieldValue("ix");
@@ -187,6 +228,15 @@
 		return false;
 	}
 	
+	/**
+	 * Checks whether the hit <code>hit</code> is within the temporal
+	 * window of the hit <code>seed</code>.
+	 * @param seed - The seed hit.
+	 * @param hit - The comparison hit.
+	 * @return Returns <code>true</code> if the comparison hit is within
+	 * the temporal window of the seed hit and <code>false</code>
+	 * otherwise.
+	 */
 	private boolean withinTimeWindow(CalorimeterHit seed, CalorimeterHit hit) {
 		// Get the hit time and seed time.
 		double hitTime = hit.getTime();
@@ -218,14 +268,30 @@
 		System.out.printf("\tTime Window After  :: %.0f ns%n", timeAfter);
 	}
 	
+	/**
+	 * Sets the name of the input LCIO hit collection. 
+	 * @param hitCollectionName - The collection name.
+	 */
 	public void setHitCollectionName(String hitCollectionName) {
 		this.hitCollectionName = hitCollectionName;
 	}
 	
+	/**
+	 * Sets the number of clock-cycles to include in the clustering
+	 * window before the seed hit. One clock-cycle is four nanoseconds.
+	 * @param cyclesBefore - The length of the clustering window before
+	 * the seed hit in clock cycles.
+	 */
 	public void setWindowBefore(int cyclesBefore) {
 		timeBefore = cyclesBefore * 4;
 	}
 	
+	/**
+	 * Sets the number of clock-cycles to include in the clustering
+	 * window after the seed hit. One clock-cycle is four nanoseconds.
+	 * @param cyclesAfter - The length of the clustering window after
+	 * the seed hit in clock cycles.
+	 */
 	public void setWindowAfter(int cyclesAfter) {
 		timeAfter = cyclesAfter * 4;
 	}

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