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:

r3836 - in /java/trunk/users/src/main/java/org/hps/users/kmccarty: MTEAnalysis.java RafoAnalysis.java plots/formatter/TriggerPlotsFormat.java

From:

[log in to unmask]

Reply-To:

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

Date:

Sat, 10 Oct 2015 03:16:47 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (203 lines)

Author: [log in to unmask]
Date: Fri Oct  9 20:16:44 2015
New Revision: 3836

Log:
 Updated trident analysis plotting logic.

Modified:
    java/trunk/users/src/main/java/org/hps/users/kmccarty/MTEAnalysis.java
    java/trunk/users/src/main/java/org/hps/users/kmccarty/RafoAnalysis.java
    java/trunk/users/src/main/java/org/hps/users/kmccarty/plots/formatter/TriggerPlotsFormat.java

Modified: java/trunk/users/src/main/java/org/hps/users/kmccarty/MTEAnalysis.java
 =============================================================================
--- java/trunk/users/src/main/java/org/hps/users/kmccarty/MTEAnalysis.java	(original)
+++ java/trunk/users/src/main/java/org/hps/users/kmccarty/MTEAnalysis.java	Fri Oct  9 20:16:44 2015
@@ -66,8 +66,8 @@
 	private IHistogram1D trTimeCoincidenceFiducial     = aida.histogram1D("Trident/Time Coincidence (Fiducial Region)",  300, -15.0, 15.0);
 	private IHistogram1D trEnergySumAll                = aida.histogram1D("Trident/Energy Sum",                          300,   0.0,  1.5);
 	private IHistogram1D trEnergySumFiducial           = aida.histogram1D("Trident/Energy Sum (Fiducial Region)",        300,   0.0,  1.5);
-	private IHistogram2D trEnergySum2DAll              = aida.histogram2D("Trident/First Cluster Energy vs. Second Cluster Energy",                   300, 0, 1.5, 220,   0, 1.5);
-	private IHistogram2D trEnergySum2DFiducial         = aida.histogram2D("Trident/First Cluster Energy vs. Second Cluster Energy (Fiducial Region)", 300, 0, 1.5, 220,   0, 1.5);
+	private IHistogram2D trEnergySum2DAll              = aida.histogram2D("Trident/First Cluster Energy vs. Second Cluster Energy",                   300, 0, 1.5, 300,   0, 1.5);
+	private IHistogram2D trEnergySum2DFiducial         = aida.histogram2D("Trident/First Cluster Energy vs. Second Cluster Energy (Fiducial Region)", 300, 0, 1.5, 300,   0, 1.5);
 	private IHistogram2D trSumCoplanarityAll           = aida.histogram2D("Trident/Hardware Coplanarity vs. Energy Sum",                              300, 0, 1.5, 115,   0, 180);
 	private IHistogram2D trSumCoplanarityFiducial      = aida.histogram2D("Trident/Hardware Coplanarity vs. Energy Sum (Fiducial Region)",            300, 0, 1.5, 115,   0, 180);
 	private IHistogram2D trSumCoplanarityCalcAll       = aida.histogram2D("Trident/Calculated Coplanarity vs. Energy Sum",                            300, 0, 1.5, 115, 130, 230);

Modified: java/trunk/users/src/main/java/org/hps/users/kmccarty/RafoAnalysis.java
 =============================================================================
--- java/trunk/users/src/main/java/org/hps/users/kmccarty/RafoAnalysis.java	(original)
+++ java/trunk/users/src/main/java/org/hps/users/kmccarty/RafoAnalysis.java	Fri Oct  9 20:16:44 2015
@@ -23,11 +23,11 @@
 	private AIDA aida = AIDA.defaultInstance();
 	private IHistogram1D t0TimeCoincidenceAll          = aida.histogram1D("Tier 0/Time Coincidence",                    300, -15.0, 15.0);
 	private IHistogram1D t0TimeCoincidenceFiducial     = aida.histogram1D("Tier 0/Time Coincidence (Fiducial Region)",  300, -15.0, 15.0);
-	private IHistogram1D t0EnergySumAll                = aida.histogram1D("Tier 0/Energy Sum",                          220,   0.0,  1.1);
-	private IHistogram1D t0EnergySumFiducial           = aida.histogram1D("Tier 0/Energy Sum (Fiducial Region)",        220,   0.0,  1.1);
+	private IHistogram1D t0EnergySumAll                = aida.histogram1D("Tier 0/Energy Sum",                          300,   0.0,  1.5);
+	private IHistogram1D t0EnergySumFiducial           = aida.histogram1D("Tier 0/Energy Sum (Fiducial Region)",        300,   0.0,  1.5);
 	private IHistogram1D t0InvariantMassAll            = aida.histogram1D("Tier 0/Invariant Mass",                     2200,   0.0,  1.1);
-	private IHistogram2D t0EnergySum2DAll              = aida.histogram2D("Tier 0/Top Cluster Energy vs. Bottom Cluster Energy",                   300, 0, 1.5, 220,   0, 1.1);
-	private IHistogram2D t0EnergySum2DFiducial         = aida.histogram2D("Tier 0/Top Cluster Energy vs. Bottom Cluster Energy (Fiducial Region)", 300, 0, 1.5, 220,   0, 1.1);
+	private IHistogram2D t0EnergySum2DAll              = aida.histogram2D("Tier 0/Top Cluster Energy vs. Bottom Cluster Energy",                   300, 0, 1.5, 300,   0, 1.5);
+	private IHistogram2D t0EnergySum2DFiducial         = aida.histogram2D("Tier 0/Top Cluster Energy vs. Bottom Cluster Energy (Fiducial Region)", 300, 0, 1.5, 300,   0, 1.5);
 	private IHistogram2D t0SumCoplanarityAll           = aida.histogram2D("Tier 0/Hardware Coplanarity vs. Energy Sum",                            300, 0, 1.5, 115,   0, 230);
 	private IHistogram2D t0SumCoplanarityFiducial      = aida.histogram2D("Tier 0/Hardware Coplanarity vs. Energy Sum (Fiducial Region)",          300, 0, 1.5, 115,   0, 230);
 	private IHistogram2D t0SumCoplanarityCalcAll       = aida.histogram2D("Tier 0/Calculated Coplanarity vs. Energy Sum",                          300, 0, 1.5, 115, 130, 230);
@@ -37,11 +37,11 @@
 	
 	private IHistogram1D t1TimeCoincidenceAll          = aida.histogram1D("Tier 1/Time Coincidence",                    300, -15.0, 15.0);
 	private IHistogram1D t1TimeCoincidenceFiducial     = aida.histogram1D("Tier 1/Time Coincidence (Fiducial Region)",  300, -15.0, 15.0);
-	private IHistogram1D t1EnergySumAll                = aida.histogram1D("Tier 1/Energy Sum",                          220,   0.0,  1.1);
-	private IHistogram1D t1EnergySumFiducial           = aida.histogram1D("Tier 1/Energy Sum (Fiducial Region)",        220,   0.0,  1.1);
+	private IHistogram1D t1EnergySumAll                = aida.histogram1D("Tier 1/Energy Sum",                          300,   0.0,  1.5);
+	private IHistogram1D t1EnergySumFiducial           = aida.histogram1D("Tier 1/Energy Sum (Fiducial Region)",        300,   0.0,  1.5);
 	private IHistogram1D t1InvariantMassAll            = aida.histogram1D("Tier 1/Invariant Mass",                     2200,   0.0,  1.1);
-	private IHistogram2D t1EnergySum2DAll              = aida.histogram2D("Tier 1/Top Cluster Energy vs. Bottom Cluster Energy",                   300, 0, 1.5, 220,   0, 1.1);
-	private IHistogram2D t1EnergySum2DFiducial         = aida.histogram2D("Tier 1/Top Cluster Energy vs. Bottom Cluster Energy (Fiducial Region)", 300, 0, 1.5, 220,   0, 1.1);
+	private IHistogram2D t1EnergySum2DAll              = aida.histogram2D("Tier 1/Top Cluster Energy vs. Bottom Cluster Energy",                   300, 0, 1.5, 300,   0, 1.5);
+	private IHistogram2D t1EnergySum2DFiducial         = aida.histogram2D("Tier 1/Top Cluster Energy vs. Bottom Cluster Energy (Fiducial Region)", 300, 0, 1.5, 300,   0, 1.5);
 	private IHistogram2D t1SumCoplanarityAll           = aida.histogram2D("Tier 1/Hardware Coplanarity vs. Energy Sum",                            300, 0, 1.5, 115,   0, 230);
 	private IHistogram2D t1SumCoplanarityFiducial      = aida.histogram2D("Tier 1/Hardware Coplanarity vs. Energy Sum (Fiducial Region)",          300, 0, 1.5, 115,   0, 230);
 	private IHistogram2D t1SumCoplanarityCalcAll       = aida.histogram2D("Tier 1/Calculated Coplanarity vs. Energy Sum",                          300, 0, 1.5, 115, 130, 230);
@@ -51,11 +51,11 @@
 	
 	private IHistogram1D t2TimeCoincidenceAll          = aida.histogram1D("Tier 2/Time Coincidence",                    300, -15.0, 15.0);
 	private IHistogram1D t2TimeCoincidenceFiducial     = aida.histogram1D("Tier 2/Time Coincidence (Fiducial Region)",  300, -15.0, 15.0);
-	private IHistogram1D t2EnergySumAll                = aida.histogram1D("Tier 2/Energy Sum",                          220,   0.0,  1.1);
-	private IHistogram1D t2EnergySumFiducial           = aida.histogram1D("Tier 2/Energy Sum (Fiducial Region)",        220,   0.0,  1.1);
+	private IHistogram1D t2EnergySumAll                = aida.histogram1D("Tier 2/Energy Sum",                          300,   0.0,  1.5);
+	private IHistogram1D t2EnergySumFiducial           = aida.histogram1D("Tier 2/Energy Sum (Fiducial Region)",        300,   0.0,  1.5);
 	private IHistogram1D t2InvariantMassAll            = aida.histogram1D("Tier 2/Invariant Mass",                     2200,   0.0,  1.1);
-	private IHistogram2D t2EnergySum2DAll              = aida.histogram2D("Tier 2/Top Cluster Energy vs. Bottom Cluster Energy",                   300, 0, 1.5, 220,   0, 1.1);
-	private IHistogram2D t2EnergySum2DFiducial         = aida.histogram2D("Tier 2/Top Cluster Energy vs. Bottom Cluster Energy (Fiducial Region)", 300, 0, 1.5, 220,   0, 1.1);
+	private IHistogram2D t2EnergySum2DAll              = aida.histogram2D("Tier 2/Top Cluster Energy vs. Bottom Cluster Energy",                   300, 0, 1.5, 300,   0, 1.5);
+	private IHistogram2D t2EnergySum2DFiducial         = aida.histogram2D("Tier 2/Top Cluster Energy vs. Bottom Cluster Energy (Fiducial Region)", 300, 0, 1.5, 300,   0, 1.5);
 	private IHistogram2D t2SumCoplanarityAll           = aida.histogram2D("Tier 2/Hardware Coplanarity vs. Energy Sum",                            300, 0, 1.5, 115,   0, 230);
 	private IHistogram2D t2SumCoplanarityFiducial      = aida.histogram2D("Tier 2/Hardware Coplanarity vs. Energy Sum (Fiducial Region)",          300, 0, 1.5, 115,   0, 230);
 	private IHistogram2D t2SumCoplanarityCalcAll       = aida.histogram2D("Tier 2/Calculated Coplanarity vs. Energy Sum",                          300, 0, 1.5, 115, 130, 230);
@@ -109,7 +109,7 @@
 		// Perform tier 1 analysis. This requires that there be at
 		// least one top/bottom cluster pair with a time difference
 		// of less then 4 ns.
-		double t1TimeThreshold = 2.5;
+		double t1TimeThreshold = 1.5;
 		
 		// Get a list of cluster pairs.
 		List<Cluster[]> pairList = getClusterPairs(clusterList);
@@ -214,6 +214,11 @@
 			}
 			
 			for(Cluster[] pair : pairList) {
+				// Only include clusters that pass the time coincidence.
+				if(TriggerModule.getValueTimeCoincidence(pair) > t1TimeThreshold) {
+					continue;
+				}
+				
 				// Fill the all pairs plots.
 				double pairEnergy = pair[0].getEnergy() + pair[1].getEnergy();
 				t1EnergySumAll.fill(pairEnergy);
@@ -266,6 +271,11 @@
 			}
 			
 			for(Cluster[] pair : pairList) {
+				// Only include clusters that pass the time coincidence.
+				if(TriggerModule.getValueTimeCoincidence(pair) > t1TimeThreshold) {
+					continue;
+				}
+				
 				// Fill the all pairs plots.
 				double pairEnergy = pair[0].getEnergy() + pair[1].getEnergy();
 				t2EnergySumAll.fill(pairEnergy);
@@ -312,8 +322,8 @@
 		energy[1] = Math.sqrt(pair[1].getMomentum().magnitudeSquared() + electronMassSquared);
 		
 		// Calculate the invariant mass.
-		return Math.sqrt(Math.pow(energy[0] + energy[1], 2) - Math.pow(pair[0].getMomentum().x() - pair[1].getMomentum().x(), 2)
-				+ Math.pow(pair[0].getMomentum().y() - pair[1].getMomentum().y(), 2) + Math.pow(pair[0].getMomentum().z() - pair[1].getMomentum().z(), 2));
+		return Math.sqrt(Math.pow(energy[0] + energy[1], 2) - Math.pow(pair[0].getMomentum().x() + pair[1].getMomentum().x(), 2)
+				+ Math.pow(pair[0].getMomentum().y() + pair[1].getMomentum().y(), 2) + Math.pow(pair[0].getMomentum().z() + pair[1].getMomentum().z(), 2));
 	}
 	
 	public static final double getCalculatedCoplanarity(Cluster[] pair) {

Modified: java/trunk/users/src/main/java/org/hps/users/kmccarty/plots/formatter/TriggerPlotsFormat.java
 =============================================================================
--- java/trunk/users/src/main/java/org/hps/users/kmccarty/plots/formatter/TriggerPlotsFormat.java	(original)
+++ java/trunk/users/src/main/java/org/hps/users/kmccarty/plots/formatter/TriggerPlotsFormat.java	Fri Oct  9 20:16:44 2015
@@ -57,23 +57,24 @@
 	 */
 	public static void main(String[] args) throws IOException {
 		// Define the root directory for the plots.
-		String rootDir = "D:\\cygwin64\\home\\Kyle\\"; //plots\\no-cuts\\2-hit\\";
+		String rootDir = "D:\\cygwin64\\home\\Kyle\\aprime-plots\\";
 		
 		// Define the new name of the file containing the trigger plots.
 		String[] plotFile = {
-				rootDir + "5568-ana.aida"
 				//rootDir + "background-ana_triggerPlots.aida"
-				//rootDir + "15MeV-ana_triggerPlots.aida",
-				//rootDir + "30MeV-ana_triggerPlots.aida",
-				//rootDir + "40MeV-ana_triggerPlots.aida",
-				//rootDir + "50MeV-ana_triggerPlots.aida"
+				rootDir + "15-MeV\\compiled-plots.aida",
+				rootDir + "20-MeV\\compiled-plots.aida",
+				rootDir + "30-MeV\\compiled-plots.aida",
+				rootDir + "40-MeV\\compiled-plots.aida",
+				rootDir + "50-MeV\\compiled-plots.aida"
 		};
 		
 		// Define the names of each plot. This will be used for the
 		// legend in the case of multiple plots.
 		String[] treeName = {
-			"Background",
+			//"Background",
 			"15 MeV A'",
+			"20 MeV A'",
 			"30 MeV A'",
 			"40 MeV A'",
 			"50 MeV A'"
@@ -81,11 +82,14 @@
 		
 		// Define the color style for the plots.
 		ColorStyle[] dataColorStyle = {
-				ColorStyle.GREY,
+				//ColorStyle.GREY,
 				ColorStyle.MS_GREEN,
 				ColorStyle.MS_BLUE,
 				ColorStyle.MS_ORANGE,
-				ColorStyle.MS_RED
+				ColorStyle.MS_RED,
+				ColorStyle.CRIMSON,
+				ColorStyle.TEAL,
+				ColorStyle.FOREST
 		};
 		
 		// Get the plots file and open it.
@@ -99,7 +103,7 @@
 		// Get a list of all the histograms in the file.
 		List<List<String>> treeHistograms = new ArrayList<List<String>>(plotFile.length);
 		for(int i = 0; i < plotFile.length; i++) {
-			treeHistograms.add(getHistograms(tree[i]));//, "/PassedAll/"));
+			treeHistograms.add(getHistograms(tree[i], "/NoCuts/"));//, "/PassedAll/"));
 		}
 		
 		// Create a plotter factory.
@@ -170,10 +174,10 @@
 			
 			// Show the plotter.
 			plotter.region(0).setTitle(plotTitle);
-			//plotter.setParameter("plotterWidth", "1600");
-			//plotter.setParameter("plotterHeight", "1550");
-			plotter.setParameter("plotterWidth", "2000");
-			plotter.setParameter("plotterHeight", "1200");
+			plotter.setParameter("plotterWidth", "750");
+			plotter.setParameter("plotterHeight", "600");
+			//plotter.setParameter("plotterWidth", "2000");
+			//plotter.setParameter("plotterHeight", "1200");
 			plotter.show();
 		}
 		

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