Print

Print


Commit in lcsim/src/org/lcsim/contrib/JanStrube/standalone on MAIN
fitPullDist.py+22added 1.1
script to fit pull distributions for the Kalman fitter

lcsim/src/org/lcsim/contrib/JanStrube/standalone
fitPullDist.py added at 1.1
diff -N fitPullDist.py
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ fitPullDist.py	9 Oct 2006 16:40:39 -0000	1.1
@@ -0,0 +1,22 @@
+#! /usr/bin/env jython
+from hep.aida import IAnalysisFactory
+import sys
+
+filename = sys.argv[1]
+
+af = IAnalysisFactory.create()
+tf = af.createTreeFactory()
+ff = af.createFitFactory('jminuit')
+
+fitter = ff.createFitter('chi2')
+
+tree = tf.create(filename)
+
+
+for pull in 'pull_x', 'pull_y', 'pull_z':
+    p = tree.find(pull)
+    p.convertToHistogram()
+    h = p.histogram()
+    result = fitter.fit(h, 'g')
+    print result.fitStatus(), result.fittedParameterNames(), result.fittedParameters()
+
CVSspam 0.2.8