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

HPS-SVN July 2015

Subject:

r3326 - /java/trunk/users/src/main/java/org/hps/users/kmccarty/TriggerPlotsModule.java

From:

[log in to unmask]

Reply-To:

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

Date:

Sat, 1 Aug 2015 02:46:08 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (83 lines)

Author: [log in to unmask]
Date: Fri Jul 31 19:46:07 2015
New Revision: 3326

Log:
Added another missing file.

Added:
    java/trunk/users/src/main/java/org/hps/users/kmccarty/TriggerPlotsModule.java

Added: java/trunk/users/src/main/java/org/hps/users/kmccarty/TriggerPlotsModule.java
 =============================================================================
--- java/trunk/users/src/main/java/org/hps/users/kmccarty/TriggerPlotsModule.java	(added)
+++ java/trunk/users/src/main/java/org/hps/users/kmccarty/TriggerPlotsModule.java	Fri Jul 31 19:46:07 2015
@@ -0,0 +1,67 @@
+package org.hps.users.kmccarty;
+
+import hep.aida.IHistogram1D;
+import hep.aida.IHistogram2D;
+
+import org.hps.recon.ecal.triggerbank.TriggerModule;
+import org.lcsim.event.Cluster;
+import org.lcsim.util.aida.AIDA;
+
+public class TriggerPlotsModule {
+	// Define plots.
+	private AIDA aida = AIDA.defaultInstance();
+    private IHistogram1D singleSeedEnergy;
+    private IHistogram1D singleHitCount;
+    private IHistogram1D singleTotalEnergy;
+    private IHistogram2D singleDistribution;
+    
+    private IHistogram1D pairSeedEnergy;
+    private IHistogram1D pairHitCount;
+    private IHistogram1D pairTotalEnergy;
+    private IHistogram1D pairEnergySum;
+    private IHistogram1D pairEnergyDifference;
+    private IHistogram1D pairCoplanarity;
+    private IHistogram1D pairEnergySlope;
+    private IHistogram2D pairDistribution;
+    private IHistogram2D pairEnergySum2D;
+    
+	public TriggerPlotsModule(String moduleName) {
+		singleSeedEnergy     = aida.histogram1D(moduleName + " Trigger Plots/Singles Plots/Cluster Seed Energy",  176,   0.0,   1.1);
+		singleHitCount       = aida.histogram1D(moduleName + " Trigger Plots/Singles Plots/Cluster Hit Count",      9,   0.5,   9.5);
+		singleTotalEnergy    = aida.histogram1D(moduleName + " Trigger Plots/Singles Plots/Cluster Total Energy", 176,   0.0,   1.1);
+		singleDistribution   = aida.histogram2D(moduleName + " Trigger Plots/Singles Plots/Cluster Seed",          46, -23.0,  23.0,  11, -5.5, 5.5);
+		pairSeedEnergy       = aida.histogram1D(moduleName + " Trigger Plots/Pair Plots/Cluster Seed Energy",     176,   0.0,   1.1);
+		pairHitCount         = aida.histogram1D(moduleName + " Trigger Plots/Pair Plots/Cluster Hit Count",         9,   0.5,   9.5);
+		pairTotalEnergy      = aida.histogram1D(moduleName + " Trigger Plots/Pair Plots/Cluster Total Energy",    176,   0.0,   1.1);
+		pairEnergySum        = aida.histogram1D(moduleName + " Trigger Plots/Pair Plots/Pair Energy Sum",         176,   0.0,   2.2);
+		pairEnergyDifference = aida.histogram1D(moduleName + " Trigger Plots/Pair Plots/Pair Energy Difference",  176,   0.0,   1.1);
+		pairCoplanarity      = aida.histogram1D(moduleName + " Trigger Plots/Pair Plots/Pair Coplanarity",        180,   0.0, 180.0);
+		pairEnergySlope      = aida.histogram1D(moduleName + " Trigger Plots/Pair Plots/Pair Energy Slope",       200,   0.0,   3.0);
+		pairDistribution     = aida.histogram2D(moduleName + " Trigger Plots/Pair Plots/Cluster Seed",             46, -23.0,  23.0,  11, -5.5, 5.5);
+		pairEnergySum2D      = aida.histogram2D(moduleName + " Trigger Plots/Pair Plots/Pair Energy Sum 2D",      110,   0.0,   1.1, 110,  0.0, 1.1);
+	}
+	
+	public void addCluster(Cluster cluster) {
+		singleSeedEnergy.fill(TriggerModule.getValueClusterSeedEnergy(cluster));
+		singleHitCount.fill(TriggerModule.getValueClusterHitCount(cluster));
+		singleTotalEnergy.fill(TriggerModule.getValueClusterTotalEnergy(cluster));
+		singleDistribution.fill(TriggerModule.getClusterXIndex(cluster), TriggerModule.getClusterYIndex(cluster));
+	}
+	
+	public void addClusterPair(Cluster[] pair) {
+		// Populate the singles plots.
+		for(Cluster cluster : pair) {
+			pairSeedEnergy.fill(TriggerModule.getValueClusterSeedEnergy(cluster));
+			pairHitCount.fill(TriggerModule.getValueClusterHitCount(cluster));
+			pairTotalEnergy.fill(TriggerModule.getValueClusterTotalEnergy(cluster));
+			pairDistribution.fill(TriggerModule.getClusterXIndex(cluster), TriggerModule.getClusterYIndex(cluster));
+		}
+		
+		// Populate the pair plots.
+		pairEnergySum.fill(TriggerModule.getValueEnergySum(pair));
+		pairEnergyDifference.fill(TriggerModule.getValueEnergyDifference(pair));
+		pairCoplanarity.fill(TriggerModule.getValueCoplanarity(pair));
+		pairEnergySlope.fill(TriggerModule.getValueEnergySlope(pair, 0.0055));
+		pairEnergySum2D.fill(TriggerModule.getValueClusterTotalEnergy(pair[0]), TriggerModule.getValueClusterTotalEnergy(pair[1]));
+	}
+}

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