Index: trunk/MagicSoft/Mars/mhist/MH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH.cc	(revision 1879)
+++ trunk/MagicSoft/Mars/mhist/MH.cc	(revision 1880)
@@ -59,4 +59,7 @@
 #include <TLegend.h>
 #include <TPaveStats.h>
+#if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
+#include <THLimitsFinder.h>
+#endif
 
 #include "MLog.h"
@@ -469,4 +472,7 @@
 void MH::FindGoodLimits(Int_t nbins, Int_t &newbins, Double_t &xmin, Double_t &xmax, Bool_t isInteger)
 {
+#if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
+    THLimitsFinder::OptimizeLimits(nbins, newbins, xmin, xmax, isInteger);
+#else
 //*-*-*-*-*-*-*-*-*Find reasonable bin values*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
 //*-*              ==========================
@@ -486,13 +492,5 @@
     Double_t binwidth=0;
 
-#if ROOT_VERSION_CODE < ROOT_VERSION(3,03,01)
     TGaxis::Optimize(umin, umax, nbins, binlow, binhigh, nbins, binwidth, "");
-#else
-    gLog << all << "*********************************************************" << endl;
-    gLog << all << "ERROR, because Abelardo removed TGaxis::Optimize from" << endl;
-    gLog << all << " MH::FindGoodLimits to be able to compile Mars with newer" << endl;
-    gLog << all << " root versions, whatever you are trying to do will fail!!!" << endl;
-    gLog << all << "*********************************************************" << endl;
-#endif
 
     if (binwidth <= 0 || binwidth > 1.e+39)
@@ -532,4 +530,5 @@
 
     newbins = nbins;
+#endif
 }
 
Index: trunk/MagicSoft/Mars/mhist/MHRanForest.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHRanForest.cc	(revision 1879)
+++ trunk/MagicSoft/Mars/mhist/MHRanForest.cc	(revision 1880)
@@ -114,5 +114,5 @@
 
     Int_t ntrees=fRanForest->GetNumTrees();
-    //cout<<"filling"<<endl;
+
     for (Int_t i=0;i<ntrees;i++)
     {
@@ -120,5 +120,5 @@
             hest+=fRanForest->GetTreeHad(j);
 
-        hest/=Double_t(i+1);
+        hest/=i+1;
         fSigma[i]+=(htrue-hest)*(htrue-hest);
     }
@@ -177,7 +177,8 @@
         g.GetXaxis()->SetTitle("Number of Trees");
         g.GetYaxis()->SetTitle("Standard deviation of estimated hadronness");
-        g.SetMarkerStyle(kFullDotlarge);
-        g.Draw("P");
-
+        g.SetMarkerStyle(kFullDotMedium);
+        gPad->Modified();
+        gPad->Update();
+        //g.Draw("P");
     }
     gPad->SetGrid();
@@ -209,5 +210,5 @@
 
         fGraphSigma->SetMarkerStyle(kFullDotSmall);
-        fGraphSigma->Draw("P");
+        //fGraphSigma->Draw("P");
         gPad->Modified();
         gPad->Update();
Index: trunk/MagicSoft/Mars/mhist/MHRanForest.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHRanForest.h	(revision 1879)
+++ trunk/MagicSoft/Mars/mhist/MHRanForest.h	(revision 1880)
Index: trunk/MagicSoft/Mars/mhist/MHRanForestGini.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHRanForestGini.cc	(revision 1879)
+++ trunk/MagicSoft/Mars/mhist/MHRanForestGini.cc	(revision 1880)
@@ -121,10 +121,13 @@
     for (Int_t i=0; i<n; i++)
     {
+        fGini[i]/=fRanForest->GetNumTrees();
+        fGini[i]/=fRanForest->GetNumData();
+
         Stat_t ip = i+1.;
-        fGini[i]/=Stat_t(fRanForest->GetNumTrees());
-        fGini[i]/=Stat_t(fRanForest->GetNumData());
         Stat_t ig = fGini[i];
+
         max=TMath::Max(max,ig);
         min=TMath::Min(min,ig);
+
         fGraphGini->SetPoint(i,ip,ig);
     }
@@ -157,7 +160,8 @@
         g.GetXaxis()->SetTitle("No. of RF-input parameter");
         g.GetYaxis()->SetTitle("Mean decrease in Gini-index [a.u.]");
-        g.SetMarkerStyle(kFullDotlarge);
-        g.Draw("P");
-
+        g.SetMarkerStyle(kFullDotMedium);
+        //g.Draw("P");
+        gPad->Modified();
+        gPad->Update();
     }
     gPad->SetGrid();
@@ -189,5 +193,5 @@
 
         fGraphGini->SetMarkerStyle(kFullDotSmall);
-        fGraphGini->Draw("P");
+        //fGraphGini->Draw("P");
         gPad->Modified();
         gPad->Update();
Index: trunk/MagicSoft/Mars/mhist/MHRanForestGini.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHRanForestGini.h	(revision 1879)
+++ trunk/MagicSoft/Mars/mhist/MHRanForestGini.h	(revision 1880)
@@ -19,8 +19,8 @@
 {
 private:
-    MRanForest *fRanForest;
+    MRanForest *fRanForest;  //!
 
-    TArrayF fGini;
-    TGraph *fGraphGini;
+    TArrayF fGini;           //!
+    TGraph *fGraphGini;      //->
 
 public:
