Print

Print


Commit in lcsim-cal-calib on MAIN
sf.plt+33added 1.1
gnuplot script for fitting sampling fractions

lcsim-cal-calib
sf.plt added at 1.1
diff -N sf.plt
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sf.plt	20 May 2008 21:34:38 -0000	1.1
@@ -0,0 +1,33 @@
+set terminal postscript
+set output "sf.ps"
+set xlabel "Theta"
+set xrange [ 80 : 180 ]
+#plot "sf.txt" using 1:2 title 'Theta vs EM1 SF'
+
+# break fitting region into barrel and endcap
+sf(x)=sf0+a*sin(2*pi*(x-90)/360-pi/2)
+sf_2(x)=sf0_2+a_2*sin(2*pi*(x-90)/360)
+
+# EM1 Sampling Fractions
+
+fit [80.:145.]  sf(x)   "sf.txt" using 1:2 via sf0,   a
+fit [145.:180.] sf_2(x) "sf.txt" using 1:2 via sf0_2, a_2
+
+#only plot function within range of validity
+set ylabel "EM1 Sampling Fraction"
+plot "sf.txt" using 1:2 title 'Theta vs EM1 SF', (x>145. ? 1/0 : sf(x)), (x<145. ? 1/0 : sf_2(x))
+
+# EM2 Sampling Fractions
+
+fit [80.:145.] sf(x) "sf.txt" using 1:3 via sf0, a
+fit [145.:180.] sf_2(x) "sf.txt" using 1:3 via sf0_2, a_2
+set ylabel "EM2 Sampling Fraction"
+plot "sf.txt" using 1:3 title 'Theta vs EM2 SF', (x>145. ? 1/0 : sf(x)), (x<145. ? 1/0 : sf_2(x))
+
+# HCal Sampling Fractions
+
+fit [80.:145.] sf(x) "sf.txt" using 1:4 via sf0, a
+fit [145.:180.] sf_2(x) "sf.txt" using 1:4 via sf0_2, a_2
+set ylabel "HCal Sampling Fraction"
+plot "sf.txt" using 1:4 title 'Theta vs HCal SF', (x>145. ? 1/0 : sf(x)), (x<145. ? 1/0 : sf_2(x))
+
CVSspam 0.2.8