Print

Print


Commit in hps-java/src/main/java/org/lcsim/hps/users/omoreno on MAIN
SvtHitEfficiency.java+20-61.2 -> 1.3
Make changes to output

hps-java/src/main/java/org/lcsim/hps/users/omoreno
SvtHitEfficiency.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- SvtHitEfficiency.java	21 Nov 2012 08:33:18 -0000	1.2
+++ SvtHitEfficiency.java	8 Jan 2013 08:08:41 -0000	1.3
@@ -406,18 +406,32 @@
         System.out.println("%===================================================================%");
         System.out.println("%======================  Hit Efficiencies ==========================%");
         System.out.println("%===================================================================% \n%");
-        if(numberOfTopTracks > 0)
-        	System.out.println("% All Top: " + (numberOfTopTracksWithHitOnMissingLayer/numberOfTopTracks)*100 + "%");
-        if(numberOfBottomTracks > 0)
-        	System.out.println("% All Bottom: " + (numberOfBottomTracksWithHitOnMissingLayer/numberOfBottomTracks)*100 + "%");
-        for(int index = 0; index < topTracksWithHitOnMissingLayer.length; index++){
+        if(numberOfTopTracks > 0){
+        	double topEfficiency = numberOfTopTracksWithHitOnMissingLayer/numberOfTopTracks;
+        	System.out.println("% Top Hit Efficiency: " + numberOfTopTracksWithHitOnMissingLayer + "/" + 
+        						numberOfTopTracks + " = " + topEfficiency*100 + "%");
+        	System.out.println("% Top Hit Efficiency Error: sigma poisson = " 
+        						+ topEfficiency*Math.sqrt((1/numberOfTopTracksWithHitOnMissingLayer) + (1/numberOfTopTracks))*100 + "%");
+        	System.out.println("% Top Hit Efficiency Error: sigma binomial = " 
+        						+ (1/numberOfTopTracks)*Math.sqrt(numberOfTopTracksWithHitOnMissingLayer*(1-topEfficiency))*100 + "%");
+        }
+        if(numberOfBottomTracks > 0){
+        	double bottomEfficiency = numberOfBottomTracksWithHitOnMissingLayer/numberOfBottomTracks;
+        	System.out.println("% Bottom Hit Efficiency: " + numberOfBottomTracksWithHitOnMissingLayer + "/" 
+        						+ numberOfBottomTracks + " = " + bottomEfficiency*100 + "%");
+        	System.out.println("% Bottom Hit Efficiency Error: sigma poisson= " 
+        						+ bottomEfficiency*Math.sqrt((1/numberOfBottomTracksWithHitOnMissingLayer) + (1/numberOfBottomTracks))*100 + "%");
+        	System.out.println("% Top Hit Efficiency Error: sigma binomial = " 
+								+ (1/numberOfBottomTracks)*Math.sqrt(numberOfBottomTracksWithHitOnMissingLayer*(1-bottomEfficiency))*100 + "%");
+        }
+/*        for(int index = 0; index < topTracksWithHitOnMissingLayer.length; index++){
         	if(topTracksPerMissingLayer[index] > 0)
         		System.out.println("% Top Layer " + (index+1) + ": " + (topTracksWithHitOnMissingLayer[index]/topTracksPerMissingLayer[index])*100 + "%");
         }
         for(int index = 0; index < bottomTracksWithHitOnMissingLayer.length; index++){
         	if(bottomTracksPerMissingLayer[index] > 0)
         		System.out.println("% Bottom Layer " + (index+1) + ": " + (bottomTracksWithHitOnMissingLayer[index]/bottomTracksPerMissingLayer[index])*100 + "%");
-        }
+        }*/
         System.out.println("% \n%===================================================================%");
     }
 }
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