Index: fact/tools/rootmacros/slicecalculation.C
===================================================================
--- fact/tools/rootmacros/slicecalculation.C	(revision 13426)
+++ fact/tools/rootmacros/slicecalculation.C	(revision 13427)
@@ -1,4 +1,7 @@
 #include "slicecalculation.h"
 #include <TROOT.h>
+#include <TH1F.h>
+#include <TH2F.h>
+#include <TMath.h>
 
 //compute the median for 1-d histogram h1
@@ -110,2 +113,16 @@
 }
 
+//fit a function to the given histogram
+void
+FitMaxPropabilityPuls(
+        TH1*           phInputHistogram,
+        float           left_border,
+        float           right_border,
+        int             verbosityLevel
+        )
+    {
+      if (verbosityLevel > 2) cout << "...fit Landau in histograms" ;
+      if (verbosityLevel > 2) cout << "\t...calculating Landaufit" ;
+      phInputHistogram->Fit("landau", "", "", left_border, right_border);
+      if (verbosityLevel > 2) cout << "...done" << endl;
+    }
