Index: /trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc	(revision 1291)
+++ /trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc	(revision 1292)
@@ -26,6 +26,7 @@
 //////////////////////////////////////////////////////////////////////////////
 //                                                                          //
-//  MHAlphaEnergyTheta                                                       //
+//  MHAlphaEnergyTheta                                                      //
 //                                                                          //
+//  3D-histogram in alpha, E-est and Theta                                  //
 //                                                                          //
 //////////////////////////////////////////////////////////////////////////////
@@ -34,4 +35,6 @@
 
 #include <TCanvas.h>
+
+#include <math.h>
 
 #include "MMcEvt.hxx"
@@ -49,6 +52,5 @@
 // --------------------------------------------------------------------------
 //
-// Default Constructor. It sets name and title only. Typically you won't
-// need to change this.
+// Default Constructor. It sets name and title of the histogram. 
 //
 MHAlphaEnergyTheta::MHAlphaEnergyTheta(const char *name, const char *title)
@@ -62,9 +64,14 @@
     fHist.SetDirectory(NULL);
 
-    fHist.GetXaxis()->SetTitle("\\alpha [\\circ]");
-    fHist.GetYaxis()->SetTitle("E_{est} [GeV]");
-    fHist.GetZaxis()->SetTitle("\\Theta [\\circ]");
-}
-
+    fHist.SetTitle("3D-plot of alpha, E-est, Theta");
+    fHist.SetXTitle("\\alpha [\\circ]");
+    fHist.SetYTitle("E-est [GeV]            ");
+    fHist.SetZTitle("\\Theta [\\circ]");
+}
+
+// --------------------------------------------------------------------------
+//
+// Set binnings and prepare filling of the histogram
+// 
 Bool_t MHAlphaEnergyTheta::SetupFill(const MParList *plist)
 {
@@ -94,7 +101,13 @@
    SetBinning(&fHist, binsalpha, binsenergy, binstheta);
 
+   fHist.Sumw2(); 
+
    return kTRUE;
 }
 
+// --------------------------------------------------------------------------
+//
+// Fill the histogram
+// 
 Bool_t MHAlphaEnergyTheta::Fill(const MParContainer *par)
 {
@@ -106,8 +119,12 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Draw the histogram
+// 
 void MHAlphaEnergyTheta::Draw(Option_t *opt)
 {
     if (!gPad)
-        MakeDefCanvas("AlphaEnergyTheta", "Distrib of alpha, E, Theta");
+        MakeDefCanvas("AlphaEnergyTheta", fTitle);
 
     gPad->Divide(2,2);
@@ -116,15 +133,31 @@
 
     gPad->cd(1);
-    h = fHist.Project3D("x");
+    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);
-    h = fHist.Project3D("y");
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
+    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);
-    h = fHist.Project3D("z");
+    h = fHist.Project3D("ezpro");
+
+    h->SetTitle("Distribution of \\Theta [\\circ]");
+    h->SetXTitle("\\Theta [\\circ]");
+    h->SetYTitle("Counts");
+
     h->Draw(opt);
     h->SetBit(kCanDelete);
@@ -137,65 +170,187 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Draw copies of the histogram
+// 
 TObject *MHAlphaEnergyTheta::DrawClone(Option_t *opt) const
 {
-    TCanvas *c = MakeDefCanvas("AlphaEnergyTheta", "Distrib of alpha, E, Theta");
-    c->Divide(2, 2);
+    TCanvas &c = *MakeDefCanvas("AlphaEnergyTheta", fTitle);
+    c.Divide(2, 2);
 
     gROOT->SetSelectedPad(NULL);
 
-    //
-    // FIXME: ProjectionX,Y is not const within root
-    //
     TH1 *h;
 
-    c->cd(1);
-    h = ((TH3*)(&fHist))->Project3D("x");
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-
-    c->cd(2);
-    h = ((TH3*)(&fHist))->Project3D("y");
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-
-    c->cd(3);
-    h = ((TH3*)(&fHist))->Project3D("z");
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-
-    c->cd(4);
+    c.cd(1);
+    h = ((TH3*)(&fHist))->Project3D("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("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("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;
-}
-
-void MHAlphaEnergyTheta::Substract(const TH3D *h1, const TH3D *h2)
-{
-    MH::SetBinning(&fHist, (TH1*)h1);
-
-    fHist.Sumw2();
+    c.Modified();
+    c.Update();
+
+    return &c;
+}
+
+// --------------------------------------------------------------------------
+//
+// Calculate the histogram as the difference of two histograms :
+//          fHist(gamma) = h1(source) - h2(antisource)
+// 
+void MHAlphaEnergyTheta::Subtract(const TH3D *h1, const TH3D *h2)
+{
+    // MH::SetBinning(&fHist, (TH1*)h1);
+
+    //    fHist.Sumw2();
     fHist.Add((TH1*)h1, (TH1*)h2, 1, -1); // Root: FIXME
 }
 
-void MHAlphaEnergyTheta::SetAlphaRange(Axis_t lo, Axis_t up)
-{
+
+// --------------------------------------------------------------------------
+//
+// Integrate fHist(gamma) in the alpha range (lo, up)
+// 
+TH2D *MHAlphaEnergyTheta::GetAlphaProjection(Axis_t lo, Axis_t up)
+{
+    if (up < lo)
+    {
+        *fLog << err << fName << ": Alpha projection not possible: lo=" << lo << " up=" << up << endl;
+        return NULL;
+    }
+
     TAxis &axe = *fHist.GetXaxis();
 
-    //
-    // FIXME: ROOT Binning??? of projection
-    // root 3.02: SetRangeUser
-#if ROOT_VERSION_CODE < ROOT_VERSION(3,02,06)
-    axe.SetRange(axe.FindFixBin(lo), axe.FindFixBin(up));
-#else
-    axe.SetRangeUser(lo, up);
-#endif
-}
-
-TH2D *MHAlphaEnergyTheta::GetAlphaProjection(Axis_t lo, Axis_t up)
-{
-    SetAlphaRange(lo, up);
-    return (TH2D*)fHist.Project3D("yz");
-}
+    Int_t ilo = axe.FindFixBin(lo);
+    Int_t iup = axe.FindFixBin(up);
+
+    const Double_t epslo1 = lo-axe.GetBinLowEdge(ilo);
+    const Double_t epslo2 = axe.GetBinUpEdge(ilo)-lo;
+
+    const Double_t epsup1 = up-axe.GetBinLowEdge(iup);
+    const Double_t epsup2 = axe.GetBinUpEdge(iup)-up;
+
+    const Double_t epslo = epslo1<epslo2 ? epslo1 : epslo2;
+    const Double_t epsup = epsup1<epsup2 ? epsup1 : epsup2;
+
+    if (epslo1>epslo2)
+        ilo++;
+
+    if (epsup1<epsup2)
+        iup--;
+
+    if (epslo>0.01*axe.GetBinWidth(ilo) || epsup>0.01*axe.GetBinWidth(iup))
+    {
+        *fLog << err << fName << ": binning is not adequate for the requested projection:" << endl;
+        *fLog << "Please specify a lower or upper limit which is not more than 1% away from a bin edge" << endl;
+        *fLog << " epslo = " << epslo << endl;
+        *fLog << " epsup = " << epsup << endl;
+        *fLog << " dwl   = " << axe.GetBinWidth(ilo) << endl;
+        *fLog << " dwu   = " << axe.GetBinWidth(iup) << endl;
+        return NULL;
+    }
+
+    axe.SetRange(ilo, iup);
+
+    TH2D &h2D = *(TH2D *)fHist.Project3D("ezypro");
+
+    h2D.SetTitle("2D-plot  of Theta vs. E-est");
+    h2D.SetXTitle("E-est [GeV]            ");
+    h2D.SetYTitle("\\Theta [\\circ]");
+
+    return &h2D;
+}
+
+// --------------------------------------------------------------------------
+//
+// Draw the integrated histogram
+// 
+TH2D *MHAlphaEnergyTheta::DrawAlphaProjection(Axis_t lo, Axis_t up, Option_t *opt)
+{
+    TH2D *h2D = GetAlphaProjection(lo, up);
+
+    if (!h2D)
+        return NULL;
+
+    char txt[100];
+    sprintf(txt, "No.of Gammas vs. E-est and Theta (%.1f < alpha < %.1f deg)", lo, up);
+
+    //    TCanvas *c = MakeDefCanvas("AlphaEnergyTheta", "2D histogram of gamma signal in energy and theta");
+    TCanvas &c = *MakeDefCanvas("AlphaEnergyTheta", txt);
+
+    c.Divide(2, 2);
+
+    gROOT->SetSelectedPad(NULL);
+
+    TH1 *h;
+
+    c.cd(1);
+    h = h2D->ProjectionX("Eest", -1, 9999, "E");
+    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(2);
+    h = h2D->ProjectionY("theta", -1, 9999, "E");
+    h->SetTitle("Distribution of \\Theta [\\circ]");
+    h->SetXTitle("\\Theta [\\circ]");
+    h->SetYTitle("Counts");
+
+    h->Draw(opt);
+    h->SetBit(kCanDelete);
+
+    c.cd(3);
+
+    h2D->DrawCopy(opt);
+    gPad->SetLogx();
+
+    c.Modified();
+    c.Update();
+
+    return h2D;
+}
+
+
+
+
+
+
+
+
+
+
+
+
Index: /trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.h
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.h	(revision 1291)
+++ /trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.h	(revision 1292)
@@ -5,6 +5,11 @@
 #include "MH.h"
 #endif
+
 #ifndef ROOT_TH3
 #include "TH3.h"
+#endif
+
+#ifndef ROOT_TH2
+#include "TH2.h"
 #endif
 
@@ -25,6 +30,4 @@
     TH3D fHist;
 
-    void SetAlphaRange(Axis_t lo, Axis_t up);
-
 public:
     MHAlphaEnergyTheta(const char *name=NULL, const char *title=NULL);
@@ -39,13 +42,14 @@
     TObject *DrawClone(Option_t *option="") const;
 
-    void Substract(const TH3D *h1, const TH3D *h2);
-    void Substract(const MHAlphaEnergyTheta *h1, const MHAlphaEnergyTheta *h2)
+    void Subtract(const TH3D *h1, const TH3D *h2);
+    void Subtract(const MHAlphaEnergyTheta *h1, const MHAlphaEnergyTheta *h2)
     {
-        Substract(h1->GetHist(), h2->GetHist());
+        Subtract(h1->GetHist(), h2->GetHist());
     }
 
+    TH2D *DrawAlphaProjection(Axis_t lo, Axis_t up, Option_t *opt="");
     TH2D *GetAlphaProjection(Axis_t lo, Axis_t up);
 
-    ClassDef(MHAlphaEnergyTheta, 1) //Histogram to store a 3-Dim histogram in alpha, Energy and theta
+    ClassDef(MHAlphaEnergyTheta, 1) //3D-histogram in alpha, Energy and theta
 };
 
Index: /trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc	(revision 1291)
+++ /trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc	(revision 1292)
@@ -28,4 +28,5 @@
 //  MHAlphaEnergyTime                                                       //
 //                                                                          //
+//  3D-histogram in alpha, E-est and time                                   //
 //                                                                          //
 //////////////////////////////////////////////////////////////////////////////
@@ -34,4 +35,6 @@
 
 #include <TCanvas.h>
+
+#include <math.h>
 
 #include "MHillasSrc.h"
@@ -50,8 +53,6 @@
 // --------------------------------------------------------------------------
 //
-// Default Constructor. It sets name and title only. Typically you won't
-// need to change this.
-//
-#include <iostream.h>
+// Default Constructor. It sets name and title of the histogram. 
+//
 MHAlphaEnergyTime::MHAlphaEnergyTime(const char *name, const char *title) 
   : fHist()
@@ -65,9 +66,14 @@
     fHist.SetDirectory(NULL);
 
-    fHist.GetXaxis()->SetTitle("\\alpha [\\circ]");
-    fHist.GetYaxis()->SetTitle("E_{est} [GeV]");
-    fHist.GetZaxis()->SetTitle("t [s]");
-}
-
+    fHist.SetTitle("3D-plot of alpha, E-est, time");
+    fHist.SetXTitle("\\alpha [\\circ]");
+    fHist.SetYTitle("E-est [GeV]            ");
+    fHist.SetZTitle("time [s]");
+}
+
+// --------------------------------------------------------------------------
+//
+// Set binnings and prepare filling of the histogram
+// 
 Bool_t MHAlphaEnergyTime::SetupFill(const MParList *plist)
 {
@@ -102,4 +108,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Fill the histogram
+// 
 Bool_t MHAlphaEnergyTime::Fill(const MParContainer *par)
 {
@@ -110,8 +120,12 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Draw the histogram
+// 
 void MHAlphaEnergyTime::Draw(Option_t *opt)
 {
     if (!gPad)
-        MakeDefCanvas("AlphaEnergyTime", "Distrib of alpha, E, t");
+        MakeDefCanvas("AlphaEnergyTime", fTitle);
 
     gPad->Divide(2,2);
@@ -120,15 +134,31 @@
 
     gPad->cd(1);
-    h = fHist.Project3D("x");
+    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);
-    h = fHist.Project3D("y");
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
+    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);
-    h = fHist.Project3D("z");
+    h = fHist.Project3D("ez");
+
+    h->SetTitle("Distribution of time [s]");
+    h->SetXTitle("time [s]");
+    h->SetYTitle("Counts");
+
     h->Draw(opt);
     h->SetBit(kCanDelete);
@@ -139,63 +169,179 @@
     gPad->Modified();
     gPad->Update();
-}
-
+
+}
+
+// --------------------------------------------------------------------------
+//
+// Draw copies of the histogram
+// 
 TObject *MHAlphaEnergyTime::DrawClone(Option_t *opt) const
 {
-    TCanvas *c = MakeDefCanvas("AlphaEnergyTime", "Distrib of alpha, E, t");
-    c->Divide(2, 2);
+    TCanvas &c = *MakeDefCanvas("AlphaEnergyTime", fTitle);
+
+    c.Divide(2, 2);
 
     gROOT->SetSelectedPad(NULL);
 
-    //
-    // FIXME: ProjectionX,Y is not const within root
-    //
     TH1 *h;
 
-    c->cd(1);
-    h = ((TH3D*)(&fHist))->Project3D("x");
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-
-    c->cd(2);
-    h = ((TH3D*)(&fHist))->Project3D("y");
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-
-    c->cd(3);
-    h = ((TH3D*)(&fHist))->Project3D("z");
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-
-    c->cd(4);
+    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;
-}
-
-void MHAlphaEnergyTime::Substract(const TH3D *h1, const TH3D *h2)
-{
-    MH::SetBinning(&fHist, (TH1*)h1);
-
-    fHist.Sumw2();
+    c.Modified();
+    c.Update();
+
+    return &c;
+}
+
+// --------------------------------------------------------------------------
+//
+// Calculate the histogram as the difference of two histograms :
+//          fHist(gamma) = h1(source) - h2(antisource)
+// 
+void MHAlphaEnergyTime::Subtract(const TH3D *h1, const TH3D *h2)
+{
+  //    MH::SetBinning(&fHist, (TH1*)h1);
+
+  //    fHist.Sumw2();
     fHist.Add((TH1*)h1, (TH1*)h2, 1, -1); // ROOT: FIXME!
 }
 
-void MHAlphaEnergyTime::SetAlphaRange(Axis_t lo, Axis_t up)
-{
+// --------------------------------------------------------------------------
+//
+// Integrate fHist(gamma) in the alpha range (lo, up)
+// 
+TH2D *MHAlphaEnergyTime::GetAlphaProjection(Axis_t lo, Axis_t up)
+{
+    if (up < lo)
+    {
+        *fLog << err << fName << ": Alpha projection not possible: lo=" << lo << " up=" << up << endl;
+        return NULL;
+    }
+
     TAxis &axe = *fHist.GetXaxis();
 
-    //
-    // FIXME: ROOT Binning??? of projection
-    // root 3.02: SetRangeUser
-    axe.SetRange(axe.FindFixBin(lo), axe.FindFixBin(up));
-}
-
-TH2D *MHAlphaEnergyTime::GetAlphaProjection(Axis_t lo, Axis_t up)
-{
-    SetAlphaRange(lo, up);
-    return (TH2D*)fHist.Project3D("yz");
-}
+    Int_t ilo = axe.FindFixBin(lo);
+    Int_t iup = axe.FindFixBin(up);
+
+    const Double_t epslo1 = lo-axe.GetBinLowEdge(ilo);
+    const Double_t epslo2 = axe.GetBinUpEdge(ilo)-lo;
+
+    const Double_t epsup1 = up-axe.GetBinLowEdge(iup);
+    const Double_t epsup2 = axe.GetBinUpEdge(iup)-up;
+
+    const Double_t epslo = epslo1<epslo2 ? epslo1 : epslo2;
+    const Double_t epsup = epsup1<epsup2 ? epsup1 : epsup2;
+
+    if (epslo1>epslo2)
+        ilo++;
+
+    if (epsup1<epsup2)
+        iup--;
+
+    if (epslo>0.01*axe.GetBinWidth(ilo) || epsup>0.01*axe.GetBinWidth(iup))
+    {
+        *fLog << err << fName << ": binning is not adequate for the requested projection:" << endl;
+        *fLog << "Please specify a lower or upper limit which is not more than 1% away from a bin edge" << endl;
+        *fLog << " epslo = " << epslo << endl;
+        *fLog << " epsup = " << epsup << endl;
+        *fLog << " dwl   = " << axe.GetBinWidth(ilo) << endl;
+        *fLog << " dwu   = " << axe.GetBinWidth(iup) << endl;
+        return NULL;
+    }
+
+    axe.SetRange(ilo, iup);
+
+    TH2D &h2D = *(TH2D *)fHist.Project3D("ezy");
+
+    h2D.SetTitle("2D-plot  of time vs. E-est");
+    h2D.SetXTitle("E-est [GeV]            ");
+    h2D.SetYTitle("time [s]");
+
+    return &h2D;
+}
+
+//---------------------------------------------------------
+//
+// Draw the projected histogram
+//
+TH2D *MHAlphaEnergyTime::DrawAlphaProjection(Axis_t lo, Axis_t up, Option_t *opt)
+{
+    TH2D *h2D = GetAlphaProjection(lo, up);
+
+    if (!h2D)
+        return NULL;
+
+    char txt[100];
+    sprintf(txt, "No.of Gammas vs. E-est and Time (%.1f < alpha < %.1f deg)", lo, up);
+
+    //    TCanvas *c = MakeDefCanvas("AlphaEnergyTime", "2D histogram of gamma signal in energy and time");
+    TCanvas &c = *MakeDefCanvas("AlphaEnergyTime", txt);
+
+    c.Divide(2, 2);
+
+    gROOT->SetSelectedPad(NULL);
+
+    TH1 *h;
+
+    c.cd(1);
+    h = h2D->ProjectionX("Eest", -1, 9999, "E");
+    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(2);
+    h = h2D->ProjectionY("time", -1, 9999, "E");
+    h->SetTitle("Distribution of time [s]");
+    h->SetXTitle("time [s]");
+    h->SetYTitle("Counts");
+
+    h->Draw(opt);
+    h->SetBit(kCanDelete);
+
+    c.cd(3);
+
+    h2D->DrawCopy(opt);
+    gPad->SetLogx();
+
+    c.Modified();
+    c.Update();
+
+    return h2D;
+}
+
Index: /trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.h
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.h	(revision 1291)
+++ /trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.h	(revision 1292)
@@ -5,6 +5,11 @@
 #include "MH.h"
 #endif
+
 #ifndef ROOT_TH3
 #include "TH3.h"
+#endif
+
+#ifndef ROOT_TH2
+#include "TH2.h"
 #endif
 
@@ -24,5 +29,4 @@
     TH3D    fHist;
 
-    void SetAlphaRange(Axis_t lo, Axis_t up);
 
 public:
@@ -38,15 +42,21 @@
     TObject *DrawClone(Option_t *option="") const;
 
-    void Substract(const TH3D *h1, const TH3D *h2);
-    void Substract(const MHAlphaEnergyTime *h1, const MHAlphaEnergyTime *h2)
+    void Subtract(const TH3D *h1, const TH3D *h2);
+    void Subtract(const MHAlphaEnergyTime *h1, const MHAlphaEnergyTime *h2)
     {
-        Substract(h1->GetHist(), h2->GetHist());
+        Subtract(h1->GetHist(), h2->GetHist());
     }
 
+    TH2D *DrawAlphaProjection(Axis_t lo, Axis_t up, Option_t *opt="");
     TH2D *GetAlphaProjection(Axis_t lo, Axis_t up);
 
-    ClassDef(MHAlphaEnergyTime, 1) //Histogram to store a 3-Dim histogram in alpha, Energy and time
+    ClassDef(MHAlphaEnergyTime, 1) //3D-histogram in alpha, Energy and time
 };
 
 #endif
 
+
+
+
+
+
Index: /trunk/MagicSoft/Mars/mhist/MHEffOnTimeTheta.h
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHEffOnTimeTheta.h	(revision 1291)
+++ /trunk/MagicSoft/Mars/mhist/MHEffOnTimeTheta.h	(revision 1292)
@@ -16,5 +16,8 @@
 {
 private:
-    TH1D   fHist;
+    TH1D fHEffOn;
+    TH1D fHChi2;
+    TH1D fHN0del;
+    TH1D fHLambda;
 
 public:
@@ -24,6 +27,6 @@
     virtual Bool_t Fill(const MParContainer *par);
 
-    const TH1D *GetHist() { return &fHist; }
-    const TH1D *GetHist() const { return &fHist; }
+    const TH1D *GetHist() { return &fHEffOn; }
+    const TH1D *GetHist() const { return &fHEffOn; }
 
     void Calc(TH2D *hist);
@@ -32,7 +35,8 @@
     TObject *DrawClone(Option_t *option="") const;
 
-    ClassDef(MHEffOnTimeTheta, 1) //Histogram to store a 3-Dim histogram in alpha, Energy and time
+    ClassDef(MHEffOnTimeTheta, 1) //1D-plot of Delta t vs. Theta
 };
 
 #endif
 
+
