Index: trunk/MagicSoft/Mars/mhist/MHFindSignificance.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHFindSignificance.cc	(revision 2312)
+++ trunk/MagicSoft/Mars/mhist/MHFindSignificance.cc	(revision 2318)
@@ -68,4 +68,5 @@
 #include <TMinuit.h>
 #include <TPaveText.h>
+#include <TStyle.h>
 
 #include "MLog.h"
@@ -297,5 +298,5 @@
     delete fGPoly;
     delete fGBackg;
-    delete fCanvas;
+    //delete fCanvas;
 }
 
@@ -348,5 +349,5 @@
        Bool_t drawpoly,   Bool_t fitgauss, Bool_t print)
 {
-  *fLog << "MHFindSignificance::FindSigma;" << endl;
+  //*fLog << "MHFindSignificance::FindSigma;" << endl;
 
   fHistOrig = fhist;
@@ -503,5 +504,5 @@
   fHist = (TH1*)fHistOrig->Clone("|alpha| plot");
   fHist->Sumw2();
-  fHist->SetNameTitle("Alpha", "alpha plot");
+  fHist->SetNameTitle("alpha", "alpha plot");
   fHist->SetXTitle("|alpha|  [\\circ]");
   fHist->SetYTitle("Counts");
@@ -545,8 +546,4 @@
       continue;
     }
-
-
-    *fLog << "before SigmaLiMa : fNon, fNoff, fGamma = " << fNon << ",  "
-          << fNoff << ",  " << fGamma << endl;
 
     Double_t siglima = 0.0;
@@ -570,4 +567,5 @@
  
   gROOT->SetSelectedPad(NULL);
+  gStyle->SetPadLeftMargin(0.05);
 
   ccc->cd();
@@ -920,4 +918,6 @@
                                          kFALSE);
 
+      *fLog << "FitPolynomial : after CallMinuit()" << endl;
+
       if (rc != 0)
       {
@@ -939,7 +939,7 @@
           gMinuit->mnstat(fmin, fedm, errdef, npari, nparx, fIstat);
 
-      //*fLog << "MHFindSignificance::FitPolynomial; fmin, fedm, errdef, npari, nparx, fIstat = "
-      //      << fmin << ",  " << fedm << ",  " << errdef << ",  " << npari
-      //      << ",  " << nparx << ",  " << fIstat << endl;
+      *fLog << "MHFindSignificance::FitPolynomial; fmin, fedm, errdef, npari, nparx, fIstat = "
+            << fmin << ",  " << fedm << ",  " << errdef << ",  " << npari
+            << ",  " << nparx << ",  " << fIstat << endl;
 
 
@@ -969,4 +969,5 @@
           fErrors[j] = err;
       }
+
 
       //--------------------------------------------------
@@ -1068,4 +1069,5 @@
   for (Int_t i=1; i<=nbins; i++)
       fHist->SetBinError(i, saveError[i-1]);
+
 
   return kTRUE;
@@ -1262,8 +1264,9 @@
   TString formulaBackg = "[0]";
   for (Int_t i=1; i<=fDegree; i++)
-      formulaBackg += Form("+[%d]^%d", i, i);
-
-  const TString formulaGauss = Form("[%d]/[%d]*exp(-0.5*((x-[%d])/[%d])^2)",
-                                    fDegree+1, fDegree+3, fDegree+2, fDegree+3);
+      formulaBackg += Form("+[%d]*x^%d", i, i);
+
+  const TString formulaGauss = 
+        Form("[%d]/[%d]*exp(-0.5*((x-[%d])/[%d])^2)",
+             fDegree+1, fDegree+3, fDegree+2, fDegree+3);
 
   TString formula = formulaBackg;
@@ -1723,6 +1726,4 @@
 Bool_t MHFindSignificance::DrawFit(const Option_t *opt)
 {
-  *fLog << "entry DrawFit" << endl;
-
     if (fHist == NULL)
       *fLog << "MHFindSignificance::DrawFit; fHist = NULL" << endl;
@@ -1733,7 +1734,10 @@
 
     //gStyle->SetOptFit(1011);
+
     gROOT->SetSelectedPad(NULL);    
+    gStyle->SetPadLeftMargin(0.1);
 
     fCanvas->cd();
+
 
     if (fHist)
@@ -1784,5 +1788,4 @@
     }
 
-  *fLog << "DrawFit : before text" << endl;
 
     //-------------------------------
@@ -1864,12 +1867,8 @@
     pt->SetTextAlign(12);
 
-  *fLog << "DrawFit : before pt->Draw()" << endl;
-
     pt->Draw();
 
     fCanvas->Modified();
     fCanvas->Update();
-
-  *fLog << "exit DrawFit" << endl;
 
     return kTRUE;
