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  October 2015

HPS-SVN October 2015

Subject:

r3903 - /java/trunk/record-util/src/main/java/org/hps/record/triggerbank/TriggerModule.java

From:

[log in to unmask]

Reply-To:

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

Date:

Wed, 28 Oct 2015 15:12:04 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (95 lines)

Author: [log in to unmask]
Date: Wed Oct 28 08:12:03 2015
New Revision: 3903

Log:
Added method for checking whether a cluster is in the fiducial region to trigger module.

Modified:
    java/trunk/record-util/src/main/java/org/hps/record/triggerbank/TriggerModule.java

Modified: java/trunk/record-util/src/main/java/org/hps/record/triggerbank/TriggerModule.java
 =============================================================================
--- java/trunk/record-util/src/main/java/org/hps/record/triggerbank/TriggerModule.java	(original)
+++ java/trunk/record-util/src/main/java/org/hps/record/triggerbank/TriggerModule.java	Wed Oct 28 08:12:03 2015
@@ -979,6 +979,28 @@
     }
     
     /**
+	 * Indicates whether the argument cluster is located in the fiducial
+	 * region or not.
+	 * @param cluster - The cluster to check.
+	 * @return Returns <code>true</code> if the cluster is located in
+	 * the fiducial region and <code>false</code> otherwise.
+	 */
+	public static final boolean inFiducialRegion(Cluster cluster) {
+		return inFiducialRegion(getClusterXIndex(cluster), getClusterYIndex(cluster));
+	}
+    
+    /**
+	 * Indicates whether the argument cluster is located in the fiducial
+	 * region or not.
+	 * @param cluster - The cluster to check.
+	 * @return Returns <code>true</code> if the cluster is located in
+	 * the fiducial region and <code>false</code> otherwise.
+	 */
+	public static final boolean inFiducialRegion(SSPCluster cluster) {
+		return inFiducialRegion(getClusterXIndex(cluster), getClusterYIndex(cluster));
+	}
+    
+    /**
      * Checks if a cluster pair is coplanar to the beam within a given
      * angle. This is defined as <code>θ <= PAIR_COPLANARITY_HIGH</code>.
      * @param clusterPair - The cluster pair to check.
@@ -1381,6 +1403,50 @@
     private static double getValueTimeCoincidence(double[] time) {
     	return Math.abs(time[0] - time[1]);
     }
+    
+    /**
+	 * Indicates whether the argument cluster is located in the fiducial
+	 * region or not.
+	 * @param cluster - The cluster to check.
+	 * @return Returns <code>true</code> if the cluster is located in
+	 * the fiducial region and <code>false</code> otherwise.
+	 */
+	private static final boolean inFiducialRegion(int ix, int iy) {
+		// Get the x and y indices for the cluster.
+		int absx = Math.abs(ix);
+		int absy = Math.abs(iy);
+		
+		// Check if the cluster is on the top or the bottom of the
+		// calorimeter, as defined by |y| == 5. This is an edge cluster
+		// and is not in the fiducial region.
+		if(absy == 5) {
+			return false;
+		}
+		
+		// Check if the cluster is on the extreme left or right side
+		// of the calorimeter, as defined by |x| == 23. This is also
+		// and edge cluster is not in the fiducial region.
+		if(absx == 23) {
+			return false;
+		}
+		
+		// Check if the cluster is along the beam gap, as defined by
+		// |y| == 1. This is an internal edge cluster and is not in the
+		// fiducial region.
+		if(absy == 1) {
+			return false;
+		}
+		
+		// Lastly, check if the cluster falls along the beam hole, as
+		// defined by clusters with -11 <= x <= -1 and |y| == 2. This
+		// is not the fiducial region.
+		if(absy == 2 && ix <= -1 && ix >= -11) {
+			return false;
+		}
+		
+		// If all checks fail, the cluster is in the fiducial region.
+		return true;
+	}
     
     /**
      * Checks if a coplanarity angle is within threshold.

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