Print

Print


Commit in hps-java/src/main/java/org/lcsim/hps/users/omoreno on MAIN
SvtTrackRecoEfficiency.java+16-161.8 -> 1.9
Changes to text output

hps-java/src/main/java/org/lcsim/hps/users/omoreno
SvtTrackRecoEfficiency.java 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- SvtTrackRecoEfficiency.java	18 Dec 2012 08:53:00 -0000	1.8
+++ SvtTrackRecoEfficiency.java	21 Dec 2012 09:26:05 -0000	1.9
@@ -52,7 +52,7 @@
 /**
  * 
  * @author Omar Moreno <[log in to unmask]>
- * @version $Id: SvtTrackRecoEfficiency.java,v 1.8 2012/12/18 08:53:00 omoreno Exp $ 
+ * @version $Id: SvtTrackRecoEfficiency.java,v 1.9 2012/12/21 09:26:05 omoreno Exp $ 
  */
 public class SvtTrackRecoEfficiency extends Driver {
 
@@ -165,15 +165,15 @@
         }
 
         if(trackingEfficiencyPlots){
-        	plotters.add(PlotUtils.setupPlotter("Tracking Efficiency", 0, 0));
-        	histo1D.add(aida.histogram1D("Tracking Efficiency", 60, 0, 6));
-        	PlotUtils.setup1DRegion(plotters.get(plotterIndex), "Tracking Efficiency", 0, "Momentum [GeV]", histo1D.get(histo1DIndex));
+        	plotters.add(PlotUtils.setupPlotter("Track Momentum", 0, 0));
+        	histo1D.add(aida.histogram1D("Momentum - Reconstructed Tracks", 14, 0, 5.6));
+        	PlotUtils.setup1DRegion(plotters.get(plotterIndex), "Reconstructed Tracks", 0, "Momentum [GeV]", histo1D.get(histo1DIndex));
             histo1DIndex++;
             plotterIndex++;
             
             plotters.add(PlotUtils.setupPlotter("Momentum", 0, 0));
-            histo1D.add(aida.histogram1D("Momentum", 60, 0, 6));
-        	PlotUtils.setup1DRegion(plotters.get(plotterIndex), "Momentum", 0, "Momentum [GeV]", histo1D.get(histo1DIndex));
+            histo1D.add(aida.histogram1D("Momentum - Findable Tracks", 14, 0, 5.6));
+        	PlotUtils.setup1DRegion(plotters.get(plotterIndex), "Findable Tracks", 0, "Momentum [GeV]", histo1D.get(histo1DIndex));
         	plotterIndex++;
         	histo1DIndex++;
         }
@@ -298,8 +298,8 @@
                     this.printDebug("Track match found");
                 foundTracks++;
                 if(trackingEfficiencyPlots){
-                    aida.histogram1D("Tracking Efficiency").fill(trkAnalysis.getMCParticle().getMomentum().magnitude(), 1);
-                    aida.histogram1D("Momentum").fill(trkAnalysis.getMCParticle().getMomentum().magnitude());
+                    aida.histogram1D("Momentum - Reconstructed Tracks").fill(trkAnalysis.getMCParticle().getMomentum().magnitude());
+                    aida.histogram1D("Momentum - Findable Tracks").fill(trkAnalysis.getMCParticle().getMomentum().magnitude());
                 }
                 mcParticles.remove(trkAnalysis.getMCParticle());
             }
@@ -367,8 +367,7 @@
                     }
                 }
       
-                aida.histogram1D("Tracking Efficiency").fill(mcParticle.getMomentum().magnitude(), 0);
-                aida.histogram1D("Momentum").fill(mcParticle.getMomentum().magnitude());
+                aida.histogram1D("Momentum - Findable Tracks").fill(mcParticle.getMomentum().magnitude());
                 
             }
         }
@@ -415,7 +414,7 @@
                         }
                     }
                     else if(layerToSimTrackerHit.get(strip.layer()) != null && layerToSimTrackerHit.get(strip.layer()).size() > 1){
-                        System.out.println(this.getClass().getSimpleName() + ": Layer with multiple hits found.");
+                        //System.out.println(this.getClass().getSimpleName() + ": Layer with multiple hits found.");
                         double deltaZ = Double.MAX_VALUE;
                         SimTrackerHit simTrackerHitMatch = null;
                         for(SimTrackerHit simTrackerHit : layerToSimTrackerHit.get(strip.layer())){
@@ -458,12 +457,13 @@
 	   
        if(trackingEfficiencyPlots && efficiencyOutputFile != null && momentumOutputFile != null){
 	   	   try{ 
-	   		   for(int index = 0; index < 60; index++){
-	   			   if(aida.histogram1D("Tracking Efficiency").binEntries(index) == 0) efficiencyOutput.write(index + " " + 0 + "\n");
-	   			   else	efficiencyOutput.write(index + " " + (aida.histogram1D("Tracking Efficiency").binHeight(index)/aida.histogram1D("Tracking Efficiency").binEntries(index)) + "\n");
+	   		   int bins = aida.histogram1D("Momentum - Findable Tracks").axis().bins();
+	   		   for(int index = 0; index < bins; index++){
+	   			   if(aida.histogram1D("Momentum - Reconstructed Tracks").binEntries(index) == 0) efficiencyOutput.write(index + " " + 0 + "\n");
+	   			   else	efficiencyOutput.write(index + " " + aida.histogram1D("Momentum - Reconstructed Tracks").binEntries(index) + "\n");
 	   			   
-                   if(aida.histogram1D("Momentum").binEntries(index) == 0) momentumOutput.write(index + " " + 0 + "\n");
-	   			   else momentumOutput.write(index + " " + aida.histogram1D("Momentum").binEntries(index) + "\n");
+                   if(aida.histogram1D("Momentum - Findable Tracks").binEntries(index) == 0) momentumOutput.write(index + " " + 0 + "\n");
+	   			   else momentumOutput.write(index + " " + aida.histogram1D("Momentum - Findable Tracks").binEntries(index) + "\n");
 	   		   }
 	   		   efficiencyOutput.close();
                momentumOutput.close();
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1