Index: trunk/MagicSoft/Mars/mhist/MFillH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MFillH.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MFillH.cc	(revision 2015)
@@ -326,7 +326,17 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Creates a new tab in a status display with the name of the MH class,
+// if fDisplay is set and the MH-class overwrites the Draw function
+//
 Bool_t MFillH::DrawToDisplay()
 {
+    fCanvas = NULL;
+
     if (!fDisplay)
+        return kTRUE;
+
+    if (!fH->OverwritesDraw())
         return kTRUE;
 
@@ -485,5 +495,9 @@
     fH->SetReadyToSave();
 
-    if (fDisplay)
+    //
+    // Check whether fDisplay has previously been used (fCanvas)
+    // and fDisplay is still open.
+    //
+    if (fCanvas && fDisplay)
     {
         fCanvas->cd();
Index: trunk/MagicSoft/Mars/mhist/MH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MH.cc	(revision 2015)
@@ -59,4 +59,5 @@
 #include <TLegend.h>
 #include <TPaveStats.h>
+#include <TBaseClass.h>
 #if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
 #include <THLimitsFinder.h>
@@ -589,8 +590,14 @@
 
     // FIXME: Also align max/min with set Maximum/Minimum
-     const Double_t max = TMath::Max(hist1.GetBinContent(hist1.GetMaximumBin()), hist2.GetBinContent(hist2.GetMaximumBin()));
-     const Double_t min = TMath::Min(hist1.GetBinContent(hist1.GetMinimumBin()), hist2.GetBinContent(hist2.GetMinimumBin()));
-     h1->SetMaximum(max);
-     h1->SetMinimum(min);
+    const Double_t maxbin1 = hist1.GetBinContent(hist1.GetMaximumBin());
+    const Double_t maxbin2 = hist2.GetBinContent(hist2.GetMaximumBin());
+    const Double_t minbin1 = hist1.GetBinContent(hist1.GetMinimumBin());
+    const Double_t minbin2 = hist2.GetBinContent(hist2.GetMinimumBin());
+
+    const Double_t max = TMath::Max(maxbin1, maxbin2);
+    const Double_t min = TMath::Min(minbin1, minbin2);
+
+    h1->SetMaximum(max>0?max*1.05:max*0.95);
+    h1->SetMinimum(max>0?min*0.95:min*1.05);
 
     TPaveText *t = (TPaveText*)gPad->FindObject("title");
@@ -658,10 +665,15 @@
     gPad->Update();
 
-    // FIXME: Also align max/min with set Maximum/Minimum
     /*
-     const Double_t max = TMath::Max(hist1.GetBinContent(hist1.GetMaximumBin()), hist2.GetBinContent(hist2.GetMaximumBin()));
-     const Double_t min = TMath::Min(hist1.GetBinContent(hist1.GetMinimumBin()), hist2.GetBinContent(hist2.GetMinimumBin()));
-     hist1.SetMaximum(max);
-     hist1.SetMinimum(min);
+     const Double_t maxbin1 = hist1.GetBinContent(hist1.GetMaximumBin());
+     const Double_t maxbin2 = hist2.GetBinContent(hist2.GetMaximumBin());
+     const Double_t minbin1 = hist1.GetBinContent(hist1.GetMinimumBin());
+     const Double_t minbin2 = hist2.GetBinContent(hist2.GetMinimumBin());
+
+     const Double_t max = TMath::Max(maxbin1, maxbin2);
+     const Double_t min = TMath::Min(minbin1, minbin2);
+
+     hist1.SetMaximum(max>0?max*1.05:max*0.95);
+     hist1.SetMinimum(max>0?min*0.95:min*1.05);
      */
 
@@ -751,2 +763,40 @@
     return o;
 }
+
+// --------------------------------------------------------------------------
+//
+// Check whether a class inheriting from MH overwrites the Draw function
+//
+Bool_t MH::OverwritesDraw(TClass *cls) const
+{
+    if (!cls)
+        cls = IsA();
+
+    //
+    // Check whether we reached the base class MTask
+    //
+    if (TString(cls->GetName())=="MH")
+        return kFALSE;
+
+    //
+    // Check whether the class cls overwrites Draw
+    //
+    if (cls->GetMethodAny("Draw"))
+    {
+        *fLog << all << "FOUND: " << cls->GetName() << " " << (cls->GetName()=="MH") << endl;
+        return kTRUE;
+    }
+
+    //
+    // If the class itself doesn't overload it check all it's base classes
+    //
+    TBaseClass *base=NULL;
+    TIter NextBase(cls->GetListOfBases());
+    while ((base=(TBaseClass*)NextBase()))
+    {
+        if (OverwritesDraw(base->GetClassPointer()))
+            return kTRUE;
+    }
+
+    return kFALSE;
+}
Index: trunk/MagicSoft/Mars/mhist/MH.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH.h	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MH.h	(revision 2015)
@@ -21,4 +21,6 @@
     MH(const char *name=NULL, const char *title=NULL);
 
+    Bool_t OverwritesDraw(TClass *cls=NULL) const;
+
     virtual Bool_t SetupFill(const MParList *pList) { return kTRUE; }
     virtual Bool_t Fill(const MParContainer *par, Double_t weight=1);
@@ -30,7 +32,7 @@
 
     static TCanvas *MakeDefCanvas(TString name="", const char *title="",
-                                  const UInt_t w=580, const UInt_t h=435);
+                                  const UInt_t w=625, const UInt_t h=440);
     static TCanvas *MakeDefCanvas(const TObject *obj,
-                                  const UInt_t w=580, const UInt_t h=435);
+                                  const UInt_t w=625, const UInt_t h=440);
 
     static void SetBinning(TH1 *h, const MBinning *binsx);
@@ -63,5 +65,5 @@
     TObject *DrawClone(Option_t *opt="") const
     {
-        return MH::DrawClone(opt, 580, 435);
+        return MH::DrawClone(opt, 625, 440);
     }
 
Index: trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc	(revision 2015)
@@ -126,100 +126,46 @@
 void MHAlphaEnergyTheta::Draw(Option_t *opt)
 {
-    if (!gPad)
-        MakeDefCanvas("AlphaEnergyTheta", fTitle);
+    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
+    pad->SetBorderMode(0);
 
-    gPad->Divide(2,2);
+    AppendPad("");
+
+    pad->Divide(2,2);
 
     TH1 *h;
 
-    gPad->cd(1);
+    pad->cd(1);
+    gPad->SetBorderMode(0);
     h = fHist.Project3D("expro");
-
     h->SetTitle("Distribution of \\alpha [\\circ]");
     h->SetXTitle("\\alpha [\\circ]");
     h->SetYTitle("Counts");
-
     h->Draw(opt);
     h->SetBit(kCanDelete);
 
-    gPad->cd(2);
+    pad->cd(2);
+    gPad->SetBorderMode(0);
+    gPad->SetLogx();
     h = fHist.Project3D("eypro");
-
     h->SetTitle("Distribution of E-est [GeV]");
     h->SetXTitle("E_{est} [GeV]");
     h->SetYTitle("Counts");
-
     h->Draw(opt);
     h->SetBit(kCanDelete);
-    gPad->SetLogx();
 
-    gPad->cd(3);
+    pad->cd(3);
+    gPad->SetBorderMode(0);
     h = fHist.Project3D("ezpro");
-
     h->SetTitle("Distribution of \\Theta [\\circ]");
     h->SetXTitle("\\Theta [\\circ]");
     h->SetYTitle("Counts");
-
     h->Draw(opt);
     h->SetBit(kCanDelete);
 
-    gPad->cd(4);
+    pad->cd(4);
+    gPad->SetBorderMode(0);
     fHist.Draw(opt);
 
-    gPad->Modified();
-    gPad->Update();
+    pad->Modified();
+    pad->Update();
 }
-
-// --------------------------------------------------------------------------
-//
-// Draw copies of the histogram
-// 
-TObject *MHAlphaEnergyTheta::DrawClone(Option_t *opt) const
-{
-    TCanvas &c = *MakeDefCanvas("AlphaEnergyTheta", fTitle);
-    c.Divide(2, 2);
-
-    gROOT->SetSelectedPad(NULL);
-
-    TH1 *h;
-
-    c.cd(1);
-    h = ((TH3*)(&fHist))->Project3D(fName+"_expro");
-
-    h->SetTitle("Distribution of \\alpha [\\circ]");
-    h->SetXTitle("\\alpha [\\circ]");
-    h->SetYTitle("Counts");
-
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-
-    c.cd(2);
-    h = ((TH3*)(&fHist))->Project3D(fName+"_eypro");
-
-    h->SetTitle("Distribution of E-est [GeV]");
-    h->SetXTitle("E_{est} [GeV]");
-    h->SetYTitle("Counts");
-
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-    gPad->SetLogx();
-
-    c.cd(3);
-    h = ((TH3*)(&fHist))->Project3D(fName+"_ezpro");
-
-    h->SetTitle("Distribution of \\Theta [\\circ]");
-    h->SetXTitle("\\Theta [\\circ]");
-    h->SetYTitle("Counts");
-
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-
-    c.cd(4);
-    ((TH3&)fHist).DrawCopy(opt);
-
-    c.Modified();
-    c.Update();
-
-    return &c;
-}
-
Index: trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.h	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.h	(revision 2015)
@@ -42,5 +42,4 @@
 
     void Draw(Option_t *option="");
-    TObject *DrawClone(Option_t *option="") const;
 
     ClassDef(MHAlphaEnergyTheta, 0) //3D-histogram in alpha, Energy and theta
Index: trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc	(revision 2015)
@@ -126,104 +126,47 @@
 void MHAlphaEnergyTime::Draw(Option_t *opt)
 {
-    if (!gPad)
-        MakeDefCanvas("AlphaEnergyTime", fTitle);
-
-    gPad->Divide(2,2);
+    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
+    pad->SetBorderMode(0);
+
+    pad->Divide(2,2);
 
     TH1 *h;
 
-    gPad->cd(1);
+    pad->cd(1);
+    gPad->SetBorderMode(0);
     h = fHist.Project3D("ex");
-
     h->SetTitle("Distribution of \\alpha [\\circ]");
     h->SetXTitle("\\alpha [\\circ]");
     h->SetYTitle("Counts");
-
     h->Draw(opt);
     h->SetBit(kCanDelete);
 
-    gPad->cd(2);
+    pad->cd(2);
+    gPad->SetBorderMode(0);
+    gPad->SetLogx();
     h = fHist.Project3D("ey");
-
     h->SetTitle("Distribution of E-est [GeV]");
     h->SetXTitle("E-est [GeV]            ");
     h->SetYTitle("Counts");
-
     h->Draw(opt);
     h->SetBit(kCanDelete);
-    gPad->SetLogx();
-
-    gPad->cd(3);
+
+    pad->cd(3);
+    gPad->SetBorderMode(0);
     h = fHist.Project3D("ez");
-
     h->SetTitle("Distribution of time [s]");
     h->SetXTitle("time [s]");
     h->SetYTitle("Counts");
-
     h->Draw(opt);
     h->SetBit(kCanDelete);
 
-    gPad->cd(4);
+    pad->cd(4);
+    gPad->SetBorderMode(0);
     fHist.Draw(opt);
 
-    gPad->Modified();
-    gPad->Update();
-
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw copies of the histogram
-// 
-TObject *MHAlphaEnergyTime::DrawClone(Option_t *opt) const
-{
-    TCanvas &c = *MakeDefCanvas("AlphaEnergyTime", fTitle);
-
-    c.Divide(2, 2);
-
-    gROOT->SetSelectedPad(NULL);
-
-    TH1 *h;
-
-    c.cd(1);
-    h = ((TH3D*)(&fHist))->Project3D("ex");
-
-    h->SetTitle("Distribution of \\alpha [\\circ]");
-    h->SetXTitle("\\alpha [\\circ]");
-    h->SetYTitle("Counts");
-
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-
-    c.cd(2);
-    h = ((TH3D*)(&fHist))->Project3D("ey");
-
-    h->SetTitle("Distribution of E-est [GeV]");
-    h->SetXTitle("E-est [GeV]            ");
-    h->SetYTitle("Counts");
-
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-    gPad->SetLogx();
-
-    c.cd(3);
-    h = ((TH3D*)(&fHist))->Project3D("ez");
-
-    h->SetTitle("Distribution of time [s]");
-    h->SetXTitle("time [s]");
-    h->SetYTitle("Counts");
-
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-
-    c.cd(4);
-    ((TH3D&)fHist).DrawCopy(opt);
-
-    c.Modified();
-    c.Update();
-
-    return &c;
-}
-
+    pad->Modified();
+    pad->Update();
+
+}
 
 // --------------------------------------------------------------------------
Index: trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.h	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.h	(revision 2015)
@@ -41,5 +41,4 @@
 
     void Draw(Option_t *option="");
-    TObject *DrawClone(Option_t *option="") const;
 
     TH2D *IntegrateTime    (const char *title, Bool_t Draw);
Index: trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.cc	(revision 2015)
@@ -152,13 +152,4 @@
 // --------------------------------------------------------------------------
 //
-// Draw clone
-//
-TObject *MHCerPhotEvt::DrawClone(Option_t *opt) const
-{
-    return MH::DrawClone(opt, 750, 600);
-}
-
-// --------------------------------------------------------------------------
-//
 // Draw the present 'fill status'
 //
Index: trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.h	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHCerPhotEvt.h	(revision 2015)
@@ -37,6 +37,5 @@
     const MCerPhotEvt &GetSum() const { return fSum; }
 
-    TObject *DrawClone(Option_t *opt) const;
-    void Draw(Option_t *);
+    void Draw(Option_t *opt="");
     void Paint(Option_t *option="");
 
Index: trunk/MagicSoft/Mars/mhist/MHEffOnTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEffOnTime.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHEffOnTime.cc	(revision 2015)
@@ -361,58 +361,31 @@
 // -------------------------------------------------------------------------
 //
-// Draw a copy of the histogram
-//
-TObject *MHEffOnTime::DrawClone(Option_t *opt) const
-{
-    TCanvas &c = *MakeDefCanvas(TString("EffOnTime")+fVarname,
-                                TString("Results from on time fit vs. ")+fVarname);
-    c.Divide(2, 2);
-
-    gROOT->SetSelectedPad(NULL);
-
-    c.cd(1);
-    ((TH2*)&fHEffOn)->DrawCopy(opt);
-
-    c.cd(2);
-    ((TH2*)&fHProb)->DrawCopy(opt);
-
-    c.cd(3);
-    ((TH2*)&fHLambda)->DrawCopy(opt);
-
-    c.cd(4);
-    ((TH2*)&fHRdead)->DrawCopy(opt);
-
-    c.Modified();
-    c.Update();
-
-    return &c;
-}
-
-// -------------------------------------------------------------------------
-//
 // Draw the histogram
 //
 void MHEffOnTime::Draw(Option_t *opt) 
 {
-    if (!gPad)
-        MakeDefCanvas(TString("EffOnTime")+fVarname,
-                      TString("Results from on time fit vs. ")+fVarname);
-
-    gPad->Divide(2,2);
-
-    gPad->cd(1);
+    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
+    pad->SetBorderMode(0);
+
+    pad->Divide(2,2);
+
+    pad->cd(1);
+    gPad->SetBorderMode(0);
     fHEffOn.Draw(opt);
 
-    gPad->cd(2);
+    pad->cd(2);
+    gPad->SetBorderMode(0);
     fHProb.Draw(opt);
 
-    gPad->cd(3);
+    pad->cd(3);
+    gPad->SetBorderMode(0);
     fHLambda.Draw(opt);
 
-    gPad->cd(4);
+    pad->cd(4);
+    gPad->SetBorderMode(0);
     fHRdead.Draw(opt);
 
-    gPad->Modified();
-    gPad->Update();
+    pad->Modified();
+    pad->Update();
 }
 
Index: trunk/MagicSoft/Mars/mhist/MHEffOnTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEffOnTime.h	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHEffOnTime.h	(revision 2015)
@@ -41,5 +41,4 @@
 
     void Draw(Option_t *option="");
-    TObject *DrawClone(Option_t *option="") const;
 
     ClassDef(MHEffOnTime, 0) //1D-plot of Delta t vs. Var
Index: trunk/MagicSoft/Mars/mhist/MHEffOnTimeTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEffOnTimeTheta.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHEffOnTimeTheta.cc	(revision 2015)
@@ -257,56 +257,30 @@
 // -------------------------------------------------------------------------
 //
-// Draw a copy of the histogram
-//
-TObject *MHEffOnTimeTheta::DrawClone(Option_t *opt) const
-{
-    TCanvas &c = *MakeDefCanvas("EffOnTimeTheta", "Results from on time fit vs. Theta");
-
-    c.Divide(2, 2);
-
-    gROOT->SetSelectedPad(NULL);
-
-    c.cd(1);
-    ((TH2*)&fHEffOn)->DrawCopy(opt);
-
-    c.cd(2);
-    ((TH2*)&fHChi2)->DrawCopy(opt);
-
-    c.cd(3);
-    ((TH2*)&fHLambda)->DrawCopy(opt);
-
-    c.cd(4);
-    ((TH2*)&fHN0del)->DrawCopy(opt);
-
-    c.Modified();
-    c.Update();
-
-    return &c;
-}
-
-// -------------------------------------------------------------------------
-//
 // Draw the histogram
 //
 void MHEffOnTimeTheta::Draw(Option_t *opt)
 {
-    if (!gPad)
-        MakeDefCanvas("EffOnTimeTheta", "Results from on time fit vs. Theta");
-
-    gPad->Divide(2,2);
-
-    gPad->cd(1);
+    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
+    pad->SetBorderMode(0);
+
+    pad->Divide(2,2);
+
+    pad->cd(1);
+    gPad->SetBorderMode(0);
     fHEffOn.Draw(opt);
 
-    gPad->cd(2);
+    pad->cd(2);
+    gPad->SetBorderMode(0);
     fHChi2.Draw(opt);
 
-    gPad->cd(3);
+    pad->cd(3);
+    gPad->SetBorderMode(0);
     fHLambda.Draw(opt);
 
-    gPad->cd(4);
+    pad->cd(4);
+    gPad->SetBorderMode(0);
     fHN0del.Draw(opt);
 
-    gPad->Modified();
-    gPad->Update();
-}
+    pad->Modified();
+    pad->Update();
+}
Index: trunk/MagicSoft/Mars/mhist/MHEffOnTimeTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEffOnTimeTheta.h	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHEffOnTimeTheta.h	(revision 2015)
@@ -32,5 +32,4 @@
 
     void Draw(Option_t *option="");
-    TObject *DrawClone(Option_t *option="") const;
 
     ClassDef(MHEffOnTimeTheta, 0) //1D-plot of Delta t vs. Theta
Index: trunk/MagicSoft/Mars/mhist/MHEffOnTimeTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEffOnTimeTime.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHEffOnTimeTime.cc	(revision 2015)
@@ -264,60 +264,35 @@
 // -------------------------------------------------------------------------
 //
-// Draw a copy of the histogram
-//
-TObject *MHEffOnTimeTime::DrawClone(Option_t *opt) const
-{
-    TCanvas &c = *MakeDefCanvas("EffOnTimeTime", "Results from on time fit vs. time");
-    c.Divide(2, 2);
-
-    gROOT->SetSelectedPad(NULL);
-
-    c.cd(1);
-    ((TH2*)&fHEffOn)->DrawCopy(opt);
-
-    c.cd(2);
-    ((TH2*)&fHChi2)->DrawCopy(opt);
-
-    c.cd(3);
-    ((TH2*)&fHLambda)->DrawCopy(opt);
-
-    c.cd(4);
-    ((TH2*)&fHN0del)->DrawCopy(opt);
-
-    c.Modified();
-    c.Update();
-
-    return &c;
-}
-
-// -------------------------------------------------------------------------
-//
 // Draw the histogram
 //
 void MHEffOnTimeTime::Draw(Option_t *opt)
 {
-    if (!gPad)
-        MakeDefCanvas("EffOnTimeTime", "Results from on time fit vs. time");
-
-    gPad->Divide(2,2);
-
-    gPad->cd(1);
+    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
+    pad->SetBorderMode(0);
+
+    pad->Divide(2,2);
+
+    pad->cd(1);
+    gPad->SetBorderMode(0);
     fHEffOn.Draw(opt);
 
-    gPad->cd(2);
+    pad->cd(2);
+    gPad->SetBorderMode(0);
     fHChi2.Draw(opt);
 
-    gPad->cd(3);
+    pad->cd(3);
+    gPad->SetBorderMode(0);
     fHLambda.Draw(opt);
 
-    gPad->cd(4);
+    pad->cd(4);
+    gPad->SetBorderMode(0);
     fHN0del.Draw(opt);
 
-    gPad->Modified();
-    gPad->Update();
-}
-
-
-
-
-
+    pad->Modified();
+    pad->Update();
+}
+
+
+
+
+
Index: trunk/MagicSoft/Mars/mhist/MHEffOnTimeTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEffOnTimeTime.h	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHEffOnTimeTime.h	(revision 2015)
@@ -32,5 +32,4 @@
 
     void Draw(Option_t *option="");
-    TObject *DrawClone(Option_t *option="") const;
 
     ClassDef(MHEffOnTimeTime, 0) //1D-plot of Delta t vs. time
Index: trunk/MagicSoft/Mars/mhist/MHEnergyTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEnergyTheta.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHEnergyTheta.cc	(revision 2015)
@@ -89,12 +89,4 @@
 // --------------------------------------------------------------------------
 //
-// Delete the three histograms
-//
-MHEnergyTheta::~MHEnergyTheta()
-{
-}
-
-// --------------------------------------------------------------------------
-//
 // Fill data into the histogram which contains all showers
 //
@@ -114,36 +106,12 @@
 void MHEnergyTheta::Draw(Option_t* option)
 {
-    if (!gPad)
-        MakeDefCanvas(&fHist);
+    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
+    pad->SetBorderMode(0);
+    pad->SetLogy();
 
-    fHist.DrawCopy(option);
-    gPad->SetLogy();
+    fHist.Draw(option);
 
-    gPad->Modified();
-    gPad->Update();
-}
-
-// --------------------------------------------------------------------------
-//
-// Creates a new canvas and draws the histogram into it.
-// Be careful: The histogram belongs to this object and won't get deleted
-// together with the canvas.
-//
-TObject *MHEnergyTheta::DrawClone(Option_t* option) const
-{
-    TCanvas *c = MakeDefCanvas(&fHist);
-
-    //
-    // This is necessary to get the expected bahviour of DrawClone
-    //
-    gROOT->SetSelectedPad(NULL);
-
-    ((TH2D&)fHist).DrawCopy(option);
-    gPad->SetLogy();
-
-    c->Modified();
-    c->Update();
-
-    return c;
+    pad->Modified();
+    pad->Update();
 }
 
Index: trunk/MagicSoft/Mars/mhist/MHEnergyTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEnergyTheta.h	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHEnergyTheta.h	(revision 2015)
@@ -18,12 +18,9 @@
 
 public:
-
     MHEnergyTheta(const char *name=NULL, const char *title=NULL);
-    ~MHEnergyTheta();
 
     Bool_t Fill(const MParContainer *cont, Double_t w=1);
 
     void Draw(Option_t *option="");
-    TObject *DrawClone(Option_t *option="") const;
 
     Bool_t SetupFill(const MParList *plist);
Index: trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc	(revision 2015)
@@ -62,5 +62,4 @@
     //   we set the radius range from 0 m to 500 m with 10 m bin --> 50 ybins
 
-  
     fName  = name  ? name  : "MHEnergyTime";
     fTitle = title ? title : "Data to Calculate Collection Area";
@@ -97,12 +96,4 @@
 // --------------------------------------------------------------------------
 //
-// Delete the three histograms
-//
-MHEnergyTime::~MHEnergyTime()
-{
-}
-
-// --------------------------------------------------------------------------
-//
 // Fill data into the histogram which contains all showers
 //
@@ -122,36 +113,14 @@
 void MHEnergyTime::Draw(Option_t* option)
 {
-    if (!gPad)
-        MakeDefCanvas(&fHist);
+    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(fHist);
+    pad->SetBorderMode(0);
 
+    AppendPad("");
+
+    pad->SetLogy();
     fHist.DrawCopy(option);
-    gPad->SetLogy();
 
-    gPad->Modified();
-    gPad->Update();
-}
-
-// --------------------------------------------------------------------------
-//
-// Creates a new canvas and draws the histogram into it.
-// Be careful: The histogram belongs to this object and won't get deleted
-// together with the canvas.
-//
-TObject *MHEnergyTime::DrawClone(Option_t* option) const
-{
-    TCanvas *c = MakeDefCanvas(&fHist);
-
-    //
-    // This is necessary to get the expected bahviour of DrawClone
-    //
-    gROOT->SetSelectedPad(NULL);
-
-    ((TH2D&)fHist).DrawCopy(option);
-    gPad->SetLogy();
-
-    c->Modified();
-    c->Update();
-
-    return c;
+    pad->Modified();
+    pad->Update();
 }
 
Index: trunk/MagicSoft/Mars/mhist/MHEnergyTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEnergyTime.h	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHEnergyTime.h	(revision 2015)
@@ -19,12 +19,9 @@
 
 public:
-
     MHEnergyTime(const char *name=NULL, const char *title=NULL);
-    ~MHEnergyTime();
 
     Bool_t Fill(const MParContainer *cont);
 
     void Draw(Option_t *option="");
-    TObject *DrawClone(Option_t *option="") const;
 
     Bool_t SetupFill(const MParList *plist);
Index: trunk/MagicSoft/Mars/mhist/MHFlux.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHFlux.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHFlux.cc	(revision 2015)
@@ -503,53 +503,29 @@
 // -------------------------------------------------------------------------
 //
-//  Draw copies of the histograms
-//
-TObject *MHFlux::DrawClone(Option_t *opt) const
-{
-    TCanvas &c = *MakeDefCanvas("flux", "Orig - Unfold - Flux plots");
-    c.Divide(2, 2);
-
-    gROOT->SetSelectedPad(NULL);
-
-    c.cd(1);
-    ((TH2*)&fHOrig)->DrawCopy("");
-    gPad->SetLogx();
-
-    c.cd(2);
-    ((TH2*)&fHUnfold)->DrawCopy("");
-    gPad->SetLogx();
-
-    c.cd(3);
-    ((TH2*)&fHFlux)->DrawCopy("");
-    gPad->SetLogx();
-
-    c.Modified();
-    c.Update();
-
-    return &c;
-}
-
-// -------------------------------------------------------------------------
-//
 //  Draw the histograms
 //
 void MHFlux::Draw(Option_t *opt)
 {
-    if (!gPad)
-        MakeDefCanvas("flux", "orig-unfold-flux plots");
-
-    gPad->Divide(2,2);
-
-    gPad->cd(1);
+    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(fHist);
+    pad->SetBorderMode(0);
+
+    AppendPad("");
+
+    pad->Divide(2,2);
+
+    pad->cd(1);
+    gPad->SetBorderMode(0);
     fHOrig.Draw(opt);
 
-    gPad->cd(2);
+    pad->cd(2);
+    gPad->SetBorderMode(0);
     fHUnfold.Draw(opt);
 
-    gPad->cd(3);
+    pad->cd(3);
+    gPad->SetBorderMode(0);
     fHFlux.Draw(opt);
 
-    gPad->Modified();
-    gPad->Update();
+    pad->Modified();
+    pad->Update();
 }
 
Index: trunk/MagicSoft/Mars/mhist/MHFlux.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHFlux.h	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHFlux.h	(revision 2015)
@@ -59,5 +59,5 @@
 
     void Draw(Option_t *option="");
-    TObject *DrawClone(Option_t *option="") const;
+
     void DrawFluxProjectionX(Option_t *opt="") const;
     void DrawOrigProjectionX(Option_t *opt="") const;
Index: trunk/MagicSoft/Mars/mhist/MHMatrix.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHMatrix.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHMatrix.cc	(revision 2015)
@@ -880,8 +880,6 @@
         DrawDefRefInfo(hth, hthd, thsh, refcolumn);
 
-    if (!rest)
-        return kTRUE;
-
-    CopyCrop(*rest, mrest, evtcount2);
+    if (rest)
+        CopyCrop(*rest, mrest, evtcount2);
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc	(revision 2015)
@@ -180,7 +180,7 @@
 {
     Double_t theta = fMcEvt->GetTelescopeTheta()*kRad2Deg;
-    Double_t mySig = fSigmabar->Calc(*fCam, *fPed, *fEvt);
-
-    fSigmaTheta.Fill(theta, mySig);
+    Double_t mysig = fSigmabar->Calc(*fCam, *fPed, *fEvt);
+
+    fSigmaTheta.Fill(theta, mysig);
 
     const UInt_t npix = fEvt->GetNumPixels();
@@ -188,31 +188,21 @@
     for (UInt_t i=0; i<npix; i++)
     {
-      MCerPhotPix cerpix = (*fEvt)[i];
-      if (!cerpix.IsPixelUsed())
-          continue;
-
-      const Int_t id = cerpix.GetPixId();
-      const MPedestalPix &pix = (*fPed)[id];
-
-      const Double_t sigma = pix.GetMeanRms();
-      const Double_t area  = fCam->GetPixRatio(id);
-
-
-      fSigmaPixTheta.Fill(theta, (Double_t)id, sigma);
-
-      const Double_t diff = sigma*sigma/area - mySig*mySig;
-      fDiffPixTheta.Fill(theta, (Double_t)id, diff);
+        MCerPhotPix cerpix = (*fEvt)[i];
+        if (!cerpix.IsPixelUsed())
+            continue;
+
+        const Int_t id = cerpix.GetPixId();
+        const MPedestalPix &pix = (*fPed)[id];
+
+        const Double_t sigma = pix.GetMeanRms();
+        const Double_t area  = fCam->GetPixRatio(id);
+
+        fSigmaPixTheta.Fill(theta, (Double_t)id, sigma);
+
+        const Double_t diff = sigma*sigma/area - mysig*mysig;
+        fDiffPixTheta.Fill(theta, (Double_t)id, diff);
     }
 
     return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw a copy of the histogram
-//
-TObject *MHSigmaTheta::DrawClone(Option_t *opt) 
-{
-    return MH::DrawClone(opt, 900, 900);
 }
 
Index: trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h	(revision 2010)
+++ trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h	(revision 2015)
@@ -32,6 +32,4 @@
     MMcEvt         *fMcEvt;      //!
  
-    TH1D fNpix;          // 1D-distribution no.of pixels in MCerPhotEvt; 
-    TH1D fBlindId;       // 1D-distribution Id of blind pixel; 
     TH2D fSigmaTheta;    // 2D-distribution sigmabar versus Theta; 
                          // sigmabar is the average pedestasl sigma in an event
@@ -48,16 +46,12 @@
     const TH2D *GetSigmaTheta() { return &fSigmaTheta; }
     const TH2D *GetSigmaTheta() const { return &fSigmaTheta; }
-    TH2D *GetSigmaThetaByName(const TString name) { return &fSigmaTheta; }
 
     const TH3D *GetSigmaPixTheta() { return &fSigmaPixTheta; }
     const TH3D *GetSigmaPixTheta() const { return &fSigmaPixTheta; }
-    TH3D *GetSigmaPixThetaByName(const TString name) { return &fSigmaPixTheta; }
 
     const TH3D *GetDiffPixTheta() { return &fDiffPixTheta; }
     const TH3D *GetDiffPixTheta() const { return &fDiffPixTheta; }
-    TH3D *GetDiffPixThetaByName(const TString name) { return &fDiffPixTheta; }
 
     void Draw(Option_t *option="");
-    TObject *DrawClone(Option_t *option="");
 
     ClassDef(MHSigmaTheta, 0) //2D-histogram  sigmabar vs. Theta
