Index: trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc	(revision 6926)
+++ 	(revision )
@@ -1,173 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Thomas Bretz    1/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
-!   Author(s): Wolfgang Wittek 1/2002 <mailto:wittek@mppmu.mpg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2002
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHAlphaEnergyTheta                                                      //
-//                                                                          //
-//  3D-histogram in alpha, E-est and Theta                                  //
-//                                                                          //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "MHAlphaEnergyTheta.h"
-
-#include <TCanvas.h>
-
-#include <math.h>
-
-#include "MMcEvt.hxx"
-#include "MHillasSrc.h"
-#include "MEnergyEst.h"
-
-#include "MBinning.h"
-#include "MParList.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MHAlphaEnergyTheta);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Default Constructor. It sets name and title of the histogram. 
-//
-MHAlphaEnergyTheta::MHAlphaEnergyTheta(const char *name, const char *title)
-{
-    //
-    //   set the name and title of this object
-    //
-    fName  = name  ? name  : "MHAlphaEnergyTheta";
-    fTitle = title ? title : "3-D histogram in alpha, energy and theta";
-
-    fHist.SetDirectory(NULL);
-
-    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)
-{
-   fEnergy = (MEnergyEst*)plist->FindObject("MEnergyEst");
-   if (!fEnergy)
-   {
-       *fLog << err << dbginf << "MEnergyEst not found... aborting." << endl;
-       return kFALSE;
-   }
-
-   fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt");
-   if (!fMcEvt)
-   {
-       *fLog << err << dbginf << "MMcEvt not found... aborting." << endl;
-       return kFALSE;
-   }
-
-   MBinning* binsenergy = (MBinning*)plist->FindObject("BinningE");
-   MBinning* binsalphaflux  = (MBinning*)plist->FindObject("BinningAlphaFlux");
-   MBinning* binstheta  = (MBinning*)plist->FindObject("BinningTheta");
-   if (!binsenergy || !binsalphaflux || !binstheta)
-   {
-       *fLog << err << dbginf << "At least one MBinning not found... aborting." << endl;
-       return kFALSE;      
-   }
-
-   SetBinning(&fHist, binsalphaflux, binsenergy, binstheta);
-
-   fHist.Sumw2(); 
-
-   return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the histogram
-// 
-Bool_t MHAlphaEnergyTheta::Fill(const MParContainer *par, const Stat_t w)
-{
-    MHillasSrc &hil = *(MHillasSrc*)par;
-
-    fHist.Fill(hil.GetAlpha(), fEnergy->GetEnergy(),
-               fMcEvt->GetTelescopeTheta()*kRad2Deg, w);
-    
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw the histogram
-// 
-void MHAlphaEnergyTheta::Draw(Option_t *opt)
-{
-    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
-    pad->SetBorderMode(0);
-
-    AppendPad("");
-
-    pad->Divide(2,2);
-
-    TH1 *h;
-
-    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);
-
-    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);
-
-    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);
-
-    pad->cd(4);
-    gPad->SetBorderMode(0);
-    fHist.Draw(opt);
-
-    pad->Modified();
-    pad->Update();
-}
Index: trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.h	(revision 6926)
+++ 	(revision )
@@ -1,42 +1,0 @@
-#ifndef MARS_MHAlphaEnergyTheta
-#define MARS_MHAlphaEnergyTheta
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-#ifndef ROOT_TH3
-#include <TH3.h>
-#endif
-
-class MMcEvt;
-class MHillasSrc;
-class MEnergyEst;
-class MParList;
-
-class MHAlphaEnergyTheta : public MH
-{
-private:
-    MMcEvt     *fMcEvt;  //!
-    MHillasSrc *fHillas; //!
-    MEnergyEst *fEnergy; //!
-
-    TH3D fHist;
-
-public:
-    MHAlphaEnergyTheta(const char *name=NULL, const char *title=NULL);
-
-    Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
-
-    const TH3D *GetHist()       { return &fHist; }
-    const TH3D *GetHist() const { return &fHist; }
-
-    TH1 *GetHistByName(const TString name) { return &fHist; }
-
-    void Draw(Option_t *option="");
-
-    ClassDef(MHAlphaEnergyTheta, 0) //3D-histogram in alpha, Energy and theta
-};
-
-#endif
Index: trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc	(revision 6926)
+++ 	(revision )
@@ -1,279 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Thomas Bretz    1/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
-!   Author(s): Wolfgang Wittek 1/2002 <mailto:wittek@mppmu.mpg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2002
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHAlphaEnergyTime                                                       //
-//                                                                          //
-//  3D-histogram in alpha, E-est and time                                   //
-//                                                                          //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "MHAlphaEnergyTime.h"
-
-#include <TCanvas.h>
-
-#include <math.h>
-
-#include "MHillasSrc.h"
-#include "MEnergyEst.h"
-#include "MTime.h"
-
-#include "MBinning.h"
-#include "MParList.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MHAlphaEnergyTime);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Default Constructor. It sets name and title of the histogram. 
-//
-MHAlphaEnergyTime::MHAlphaEnergyTime(const char *name, const char *title) 
-  : fHist()
-{
-    //
-    //   set the name and title of this object
-    //
-    fName  = name  ? name  : "MHAlphaEnergyTime";
-    fTitle = title ? title : "3-D histogram in alpha, energy and time";
-
-    fHist.SetDirectory(NULL);
-
-    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)
-{
-   fEnergy = (MEnergyEst*)plist->FindObject("MEnergyEst");
-   if (!fEnergy)
-   {
-       *fLog << err << dbginf << "MHAlphaEnergyTime : MEnergyEst not found... aborting." << endl;
-       return kFALSE;
-   }
-
-   fTime = (MTime*)plist->FindObject("MTime");
-   if (!fTime)
-   {
-       *fLog << err << dbginf << "MHAlphaEnergyTime : MTime not found... aborting." << endl;
-       return kFALSE;
-   }
-
-   MBinning* binsenergy = (MBinning*)plist->FindObject("BinningE");
-   MBinning* binsalphaflux  = (MBinning*)plist->FindObject("BinningAlphaFlux");
-   MBinning* binstime   = (MBinning*)plist->FindObject("BinningTime");
-   if (!binsenergy || !binsalphaflux || !binstime)
-   {
-       *fLog << err << dbginf << "MHAlphaEnergyTime : At least one MBinning not found... aborting." << endl;
-       return kFALSE;      
-   }
-
-   SetBinning(&fHist, binsalphaflux, binsenergy, binstime);
-
-   fHist.Sumw2();
-
-   return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the histogram
-// 
-Bool_t MHAlphaEnergyTime::Fill(const MParContainer *par, const Stat_t w)
-{
-    MHillasSrc &hil = *(MHillasSrc*)par;
-
-    fHist.Fill(fabs(hil.GetAlpha()), fEnergy->GetEnergy(), *fTime, w);
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw the histogram
-// 
-void MHAlphaEnergyTime::Draw(Option_t *opt)
-{
-    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
-    pad->SetBorderMode(0);
-
-    pad->Divide(2,2);
-
-    TH1 *h;
-
-    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);
-
-    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);
-
-    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);
-
-    pad->cd(4);
-    gPad->SetBorderMode(0);
-    fHist.Draw(opt);
-
-    pad->Modified();
-    pad->Update();
-
-}
-
-// --------------------------------------------------------------------------
-//
-// Integrate fHist     (Alpha,E-est,Time) over the Time to get
-//           fAlphaEest(Alpha,E-est)
-// 
-TH2D *MHAlphaEnergyTime::IntegrateTime(const char *title, Bool_t draw)
-{
-    Int_t nzbins = fHist.GetNbinsZ();
-    TAxis &axez  = *fHist.GetZaxis();
-    axez.SetRange(1,nzbins);
-
-    TH2D &fAlphaEest = *(TH2D *)fHist.Project3D("exy");
-
-    fAlphaEest.SetTitle(title);
-    fAlphaEest.SetXTitle("E-est [GeV]            ");
-    fAlphaEest.SetYTitle("\\alpha  [  \\circ]");
-
-    if (draw == kTRUE)
-    {
-      TCanvas &c = *MakeDefCanvas(title, title);
-
-      gROOT->SetSelectedPad(NULL);
-
-      fAlphaEest.DrawCopy();
-      gPad->SetLogx();
-
-      c.Modified();
-      c.Update();
-    }
-
-    return &fAlphaEest;
-}
-
-// --------------------------------------------------------------------------
-//
-// Integrate fHist     (Alpha,E-est,Time) over E-est to get
-//           fAlphaTime(Alpha,Time)
-// 
-TH2D *MHAlphaEnergyTime::IntegrateEest(const char *title, Bool_t draw)
-{
-    Int_t nybins = fHist.GetNbinsY();
-    TAxis &axey  = *fHist.GetYaxis();
-    axey.SetRange(1,nybins);
-
-    TH2D &fAlphaTime = *(TH2D *)fHist.Project3D("exz");
-
-    fAlphaTime.SetTitle(title);
-    fAlphaTime.SetXTitle("Time [s]");
-    fAlphaTime.SetYTitle("\\alpha  [  \\circ]");
-
-    if (draw == kTRUE)
-    {
-      TCanvas &c = *MakeDefCanvas(title, title);
-
-      gROOT->SetSelectedPad(NULL);
-
-      fAlphaTime.DrawCopy();
-
-      c.Modified();
-      c.Update();
-    }
-
-    return &fAlphaTime;
-}
-
-// --------------------------------------------------------------------------
-//
-// Integrate fHist (Alpha,E-est,Time) over Eest and Time to get
-//           fAlpha(Alpha)
-// 
-TH1D *MHAlphaEnergyTime::IntegrateEestTime(const char *title, Bool_t draw)
-{
-    Int_t nybins = fHist.GetNbinsY();
-    TAxis &axey  = *fHist.GetYaxis();
-    axey.SetRange(1,nybins);
-
-    Int_t nzbins = fHist.GetNbinsZ();
-    TAxis &axez  = *fHist.GetZaxis();
-    axez.SetRange(1,nzbins);
-
-    TH1D &fAlpha = *(TH1D *)fHist.Project3D("ex");
-
-    fAlpha.SetTitle(title);
-    fAlpha.SetXTitle("\\alpha  [  \\circ]");
-    fAlpha.SetYTitle("Counts");
-
-    if (draw == kTRUE)
-    {
-      TCanvas &c = *MakeDefCanvas(title, title);
-
-      gROOT->SetSelectedPad(NULL);
-
-      fAlpha.DrawCopy();
-
-      c.Modified();
-      c.Update();
-    }
-
-    return &fAlpha;
-}
-
-
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.h	(revision 6926)
+++ 	(revision )
@@ -1,57 +1,0 @@
-#ifndef MARS_MHAlphaEnergyTime
-#define MARS_MHAlphaEnergyTime
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-#ifndef ROOT_TH3
-#include "TH3.h"
-#endif
-
-#ifndef ROOT_TH2
-#include "TH2.h"
-#endif
-
-class MHillasSrc;
-class MEnergyEst;
-class MTime;
-class TH2D;
-class MParList;
-
-class MHAlphaEnergyTime : public MH
-{
-private:
-    MHillasSrc *fHillas; //!
-    MEnergyEst *fEnergy; //!
-    MTime      *fTime;   //!
-
-    TH3D    fHist;
-
-public:
-    MHAlphaEnergyTime(const char *name=NULL, const char *title=NULL);
-
-    Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
-
-    const TH3D *GetHist()       { return &fHist; }
-    const TH3D *GetHist() const { return &fHist; }
-
-    TH1 *GetHistByName(const TString name) { return &fHist; }
-
-    void Draw(Option_t *option="");
-
-    TH2D *IntegrateTime    (const char *title, Bool_t Draw);
-    TH2D *IntegrateEest    (const char *title, Bool_t Draw);
-    TH1D *IntegrateEestTime(const char *title, Bool_t Draw);
-   
-    ClassDef(MHAlphaEnergyTime, 0) //3D-histogram in alpha, Energy and time
-};
-
-#endif
-
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mhist/MHCT1Supercuts.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCT1Supercuts.cc	(revision 6926)
+++ 	(revision )
@@ -1,225 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Wolfgang Wittek  2003 <mailto:wittek@mppmu.mpg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2003
-!
-!
-\* ======================================================================== */
-
-///////////////////////////////////////////////////////////////////////
-//
-// MHCT1Supercuts
-//
-// This class contains histograms for the supercuts
-//
-// the histograms are filled during the optimization of the supercuts
-//
-///////////////////////////////////////////////////////////////////////
-#include "MHCT1Supercuts.h"
-
-#include <math.h>
-
-#include <TH1.h>
-#include <TH2.h>
-#include <TPad.h>
-#include <TCanvas.h>
-
-#include "MParList.h"
-#include "MHFindSignificance.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MHCT1Supercuts);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Setup four histograms for Alpha, and Dist
-//
-MHCT1Supercuts::MHCT1Supercuts(const char *name, const char *title)
-{
-    //
-    //   set the name and title of this object
-    //
-    fName  = name  ? name  : "MHCT1Supercuts";
-    fTitle = title ? title : "Container for histograms for the supercuts";
-
-
-    fDegree = new TH1F("Degree", "Degree of polynomial",   5, -0.5,  4.5);
-    fProb   = new TH1F("Prob",   "chi2 probability",      40,    0,  1.0);
-    fNdf    = new TH1F("NDF",    "NDF of polynomial fit", 60, -0.5, 59.5);
-    fGamma  = new TH1F("gamma",  "gamma",                 40,  0.0,  8.0);
-    fNexNon = new TH1F("NexNon", "Nex / Non",             50,  0.0,  1.0);
-    fSigLiMa= new TH1F("Significance", "significance of gamma signal",   
-                                                          60,  0.0, 120.0);
-    fSigtoBackg= new TH2F("SigtoBackg", "Significance vs signal/backg ratio",
-                          50,  0.0,  10.0, 60, 0.0, 120.0);
-    fSigDegree = new TH2F("SigDegree", "Significance vs Degree of polynomial",
-                           5, -0.5,   4.5, 60, 0.0, 120.0);
-    fSigNbins  = new TH2F("SigNbins", "Significance vs number of bins",
-                           40, -0.5, 79.5, 60, 0.0, 120.0);
-
-    fDegree->SetDirectory(NULL);
-    fProb->SetDirectory(NULL);
-    fNdf->SetDirectory(NULL);
-    fGamma->SetDirectory(NULL);
-    fNexNon->SetDirectory(NULL);
-    fSigLiMa->SetDirectory(NULL);
-    fSigtoBackg->SetDirectory(NULL);
-    fSigDegree->SetDirectory(NULL);
-    fSigNbins->SetDirectory(NULL);
-
-    fDegree->SetXTitle("order of polynomial");
-    fProb->SetXTitle("chi2 probability of polynomial fit");
-    fNdf->SetXTitle("NDF of polynomial fit");
-    fGamma->SetXTitle("gamma");
-    fNexNon->SetXTitle("Nex / Non");
-    fSigLiMa->SetXTitle("significance");
-
-    fSigtoBackg->SetXTitle("signa./background ratio");
-    fSigtoBackg->SetYTitle("significance");
-
-    fSigDegree->SetXTitle("order of polynomial");
-    fSigDegree->SetYTitle("significance");
-
-    fSigNbins->SetXTitle("number of bins");
-    fSigNbins->SetYTitle("significance");
-
-    fDegree->SetYTitle("Counts");
-    fProb->SetYTitle("Counts");
-    fNdf->SetYTitle("Counts");
-    fGamma->SetYTitle("Counts");
-    fNexNon->SetYTitle("Counts");
-    fSigLiMa->SetYTitle("Counts");
-
-    fSigtoBackg->SetZTitle("Counts");
-    fSigDegree->SetZTitle("Counts");
-    fSigNbins->SetZTitle("Counts");
-}
-
-// --------------------------------------------------------------------------
-//
-// Delete the histograms
-//
-MHCT1Supercuts::~MHCT1Supercuts()
-{
-    delete fDegree;
-    delete fProb;
-    delete fNdf;
-    delete fGamma;
-    delete fNexNon;
-    delete fSigLiMa;
-
-    delete fSigtoBackg;
-    delete fSigDegree;
-    delete fSigNbins;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the histograms from the 'MHFindSignificance' container
-//
-Bool_t MHCT1Supercuts::Fill(const MParContainer *par, const Stat_t w)
-{
-    if (!par)
-    {
-        *fLog << err << "MHCT1Supercuts::Fill: Pointer (!=NULL) expected." << endl;
-        return kFALSE;
-    }
-
-    MHFindSignificance &h = *(MHFindSignificance*)par;
-
-    fDegree    ->Fill(h.GetDegree( ), w);
-    fProb      ->Fill(h.GetProb(),    w);
-    fNdf       ->Fill(h.GetNdf(),     w);
-    fGamma     ->Fill(h.GetGamma(),   w);
-
-    Double_t ratio = h.GetNon()>0.0 ? h.GetNex()/h.GetNon() : 0.0;
-    fNexNon    ->Fill(ratio,          w);
-
-    fSigLiMa   ->Fill(h.GetSigLiMa(), w);
-
-    Double_t sigtobackg = h.GetNbg()!=0.0 ? h.GetNex() / h.GetNbg() : 0.0;
-    fSigtoBackg->Fill(sigtobackg,    h.GetSigLiMa(), w);
-
-    fSigDegree ->Fill(h.GetDegree(), h.GetSigLiMa(), w);
-    fSigNbins  ->Fill(h.GetMbins(),  h.GetSigLiMa(), w);
-
-    return kTRUE;
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Creates a new canvas and draws the two histograms into it.
-// Be careful: The histograms belongs to this object and won't get deleted
-// together with the canvas.
-//
-void MHCT1Supercuts::Draw(Option_t *)
-{
-  //TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
-  //pad->SetBorderMode(0);
-  //AppendPad("");
-
-    TCanvas *pad = new TCanvas("Supercuts", "Supercut plots", 900, 900);
-    gROOT->SetSelectedPad(NULL);
-
-    pad->Divide(3, 3);
-
-    pad->cd(1);
-    gPad->SetBorderMode(0);
-    fDegree->Draw();
-
-    pad->cd(2);
-    gPad->SetBorderMode(0);
-    fProb->Draw();
-
-    pad->cd(3);
-    gPad->SetBorderMode(0);
-    fNdf->Draw();
-
-    pad->cd(4);
-    gPad->SetBorderMode(0);
-    fGamma->Draw();
-
-    pad->cd(5);
-    gPad->SetBorderMode(0);
-    fNexNon->Draw();
-
-    pad->cd(6);
-    gPad->SetBorderMode(0);
-    fSigLiMa->Draw();
-
-    pad->cd(7);
-    gPad->SetBorderMode(0);
-    fSigtoBackg->Draw();
-
-    pad->cd(8);
-    gPad->SetBorderMode(0);
-    fSigDegree->Draw();
-
-    pad->cd(9);
-    gPad->SetBorderMode(0);
-    fSigNbins->Draw();
-
-    pad->Modified();
-    pad->Update();
-}
Index: trunk/MagicSoft/Mars/mhist/MHCT1Supercuts.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCT1Supercuts.h	(revision 6926)
+++ 	(revision )
@@ -1,42 +1,0 @@
-#ifndef MARS_MHCT1Supercuts
-#define MARS_MHCT1Supercuts
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-class TH1F;
-class TH2F;
-
-class MHCT1Supercuts : public MH
-{
-private:
-    TH1F *fDegree;     // order of polynomial for background fit
-    TH1F *fProb;       // chi2 probability of polynomial fit
-    TH1F *fNdf;        // NDF of polynomial fit
-    TH1F *fGamma;      // Nbg = gamma * Noff
-    TH1F *fNexNon;     // no.of excess events / no.of events in signal region 
-    TH1F *fSigLiMa;    // significance of gamma signal
-
-    TH2F *fSigtoBackg; // significance vs signal to background ratio (Nex/Nbg)
-    TH2F *fSigDegree;  // significance vs order of polynomial
-    TH2F *fSigNbins;   // significance vs number of bins
-
-
-public:
-    MHCT1Supercuts(const char *name=NULL, const char *title=NULL);
-    ~MHCT1Supercuts();
-
-    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
-
-    void Draw(Option_t *opt=NULL);
-
-    ClassDef(MHCT1Supercuts, 1) // Container which holds histograms for the supercuts
-};
-
-#endif
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mhist/MHCurrents.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCurrents.cc	(revision 6926)
+++ 	(revision )
@@ -1,246 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Thomas Bretz  12/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2003
-!
-!
-\* ======================================================================== */
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// MHCurrents
-//
-/////////////////////////////////////////////////////////////////////////////
-#include "MHCurrents.h"
-
-#include <TCanvas.h>
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include "MParList.h"
-#include "MBinning.h"
-#include "MCurrents.h"
-#include "MCamDisplay.h"
-
-#include "MGeomCam.h"
-#include "MGeomPix.h"
-
-ClassImp(MHCurrents);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Reset all pixels to 0 and reset fEntries to 0.
-//
-void MHCurrents::Clear(const Option_t *)
-{
-    const Int_t n = fCam ? fCam->GetNumPixels() : 577;
-
-    // FIXME: Implement a clear function with setmem
-    fSum.Set(n); // also clears memory
-    fRms.Set(n);
-/*    for (int i=0; i<577; i++)
-    {
-        fSum[i] = 0;
-        fRms[i] = 0;
-    }*/
-
-    fEntries = 0;
-}
-
-// --------------------------------------------------------------------------
-//
-// Initialize the name and title of the task.
-// Resets the sum histogram
-//
-MHCurrents::MHCurrents(const char *name, const char *title)
-    : /*fSum(577), fRms(577), */fCam(NULL), fEvt(NULL), fDispl(NULL)
-{
-    //
-    //   set the name and title of this object
-    //
-    fName  = name  ? name  : "MHCurrents";
-    fTitle = title ? title : "Average of MCurrents";
-
-    Clear();
-
-    fHist.SetName("currents;avg");
-    fHist.SetTitle("Avg.Currents [nA]");
-    fHist.SetXTitle("Pixel Index");
-    fHist.SetYTitle("A [nA]");
-    fHist.SetDirectory(NULL);
-    fHist.SetLineColor(kGreen);
-    fHist.SetMarkerStyle(kFullDotMedium);
-    fHist.SetMarkerSize(0.3);
-}
-
-// --------------------------------------------------------------------------
-//
-// Delete the corresponding camera display if available
-//
-MHCurrents::~MHCurrents()
-{
-    if (fDispl)
-        delete fDispl;
-}
-
-// --------------------------------------------------------------------------
-//
-// Get the event (MCerPhotEvt) the histogram might be filled with. If
-// it is not given, it is assumed, that it is filled with the argument
-// of the Fill function.
-// Looks for the camera geometry MGeomCam and resets the sum histogram.
-//
-Bool_t MHCurrents::SetupFill(const MParList *plist)
-{
-    fEvt = (MCurrents*)plist->FindObject("MCurrents");
-    if (!fEvt)
-        *fLog << warn << GetDescriptor() << ": No MCerPhotEvt available..." << endl;
-
-    fCam = (MGeomCam*)plist->FindObject("MGeomCam");
-    /*
-    if (!fCam)
-        *fLog << warn << GetDescriptor() << ": No MGeomCam found... assuming Magic geometry!" << endl;
-    */
-    if (!fCam)
-    {
-        *fLog << err << GetDescriptor() << ": No MGeomCam found... aborting." << endl;
-        return kFALSE;
-    }
-
-    Clear();
-
-    const Int_t n = fSum.GetSize();
-
-    MBinning bins;
-    bins.SetEdges(n, -0.5, n-0.5);
-    bins.Apply(fHist);
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the histograms with data from a MCerPhotEvt-Container.
-//
-Bool_t MHCurrents::Fill(const MParContainer *par, const Stat_t w)
-{
-    const MCurrents *evt = par ? (MCurrents*)par : fEvt;
-    if (!evt)
-    {
-        *fLog << err << dbginf << "No MCurrents found..." << endl;
-        return kFALSE;
-    }
-
-    const Int_t n = fSum.GetSize();
-    for (UInt_t idx=0; idx<n; idx++)
-    {
-        Float_t val;
-        if (!evt->GetPixelContent(val, idx))
-            continue;
-
-        fSum[idx] += val;
-        fRms[idx] += val*val;
-
-    }
-
-    fEntries++;
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Scale the sum container with the number of entries
-//
-Bool_t MHCurrents::Finalize()
-{
-    if (fEntries<2)
-    {
-        *fLog << warn << "WARNING - " << GetDescriptor() << " doesn't contain enough entries." << endl;
-        return kTRUE;
-    }
-
-    const Int_t n = fSum.GetSize();
-    for (UInt_t i=0; i<n; i++)
-    {
-        // calc sdev^2 for pixel index i
-        // var^2 = (sum[xi^2] - sum[xi]^2/n) / (n-1);
-        fRms[i] -= fSum[i]*fSum[i]/fEntries;
-        fRms[i] /= fEntries-1;
-
-        if (fRms[i]<0)
-        {
-            *fLog << warn << "WARNING - fRms[" << i <<"]= " << fRms[i] << " -> was set to 0 " << endl;
-            fRms[i]=0;
-        }
-
-        else
-            fRms[i]  = TMath::Sqrt(fRms[i]);
-
-        // calc mean value for pixel index i
-        fSum[i] /= fEntries;
-
-        fHist.SetBinContent(i+1, fSum[i]);
-        fHist.SetBinError(  i+1, fRms[i]);
-    }
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw the present 'fill status'
-//
-void MHCurrents::Draw(Option_t *o)
-{
-    if (!fCam)
-    {
-        *fLog << warn << "WARNING - Cannot draw " << GetDescriptor() << ": No Camera Geometry available." << endl;
-        return;
-    }
-
-    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this, 750, 600);
-    pad->SetBorderMode(0);
-
-    SetDrawOption(o);
-    AppendPad("");
-}
-
-// --------------------------------------------------------------------------
-//
-// If a camera display is not yet assigned, assign a new one.
-//
-void MHCurrents::Paint(Option_t *option)
-{
-    if (!fCam)
-    {
-        *fLog << warn << "WARNING - Cannot paint " << GetDescriptor() << ": No Camera Geometry available." << endl;
-        return;
-    }
-
-    if (!fDispl)
-        fDispl = new MCamDisplay(fCam);
-
-    TString opt(GetDrawOption());
-
-    fDispl->Fill(opt.Contains("rms", TString::kIgnoreCase) ? fRms : fSum);
-    fDispl->Paint();
-}
Index: trunk/MagicSoft/Mars/mhist/MHCurrents.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCurrents.h	(revision 6926)
+++ 	(revision )
@@ -1,55 +1,0 @@
-#ifndef MARS_MHCurrents
-#define MARS_MHCurrents
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-#ifndef ROOT_TH1
-#include <TH1.h>
-#endif
-
-#ifndef ROOT_TArrayF
-#include <TArrayF.h>
-#endif
-
-class MCurrents;
-class MGeomCam;
-class MCamDisplay;
-
-class MHCurrents : public MH
-{
-private:
-    TArrayF      fSum;      // storing the sum
-    TArrayF      fRms;      // storing the rms
-    Int_t        fEntries;  // number of entries in the histogram
-    MGeomCam    *fCam;      // the present geometry
-    MCurrents   *fEvt;      //! the current event
-    MCamDisplay *fDispl;    //! the camera display
-
-    TH1F         fHist;
-
-public:
-    MHCurrents(const char *name=NULL, const char *title=NULL);
-    ~MHCurrents();
-
-    void Clear(const Option_t *o="");
-
-    Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
-    Bool_t Finalize();
-
-    TH1 *GetHistByName(const TString name) { return NULL; }
-
-    const TArrayF &GetSum() const { return fSum; }
-    const TArrayF &GetRms() const { return fRms; }
-
-    const TH1F    &GetHist() const { return fHist; }
-
-    void Draw(Option_t *opt="");
-    void Paint(Option_t *option="");
-
-    ClassDef(MHCurrents, 1) // Histogram to sum camera events
-};
-
-#endif
Index: trunk/MagicSoft/Mars/mhist/MHEnergyTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEnergyTheta.cc	(revision 6926)
+++ 	(revision )
@@ -1,133 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Thomas Bretz  1/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2002
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHEnergyTheta                                                           //
-//                                                                          //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "MHEnergyTheta.h"
-
-#include <TCanvas.h>
-
-#include "MH.h"
-#include "MBinning.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include "MMcEvt.hxx"
-
-#include "MParList.h"
-
-ClassImp(MHEnergyTheta);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-//  Creates the three necessary histograms:
-//   - selected showers (input)
-//   - all showers (input)
-//   - collection area (result)
-//
-MHEnergyTheta::MHEnergyTheta(const char *name, const char *title)
-{ 
-    //   initialize the histogram for the distribution r vs E
-    //
-    //   we set the energy range from 1 Gev to 10000 GeV (in log 5 orders
-    //   of magnitude) and for each order we take 10 subdivision --> 50 xbins
-    //
-    //   we set the radius range from 0 m to 500 m with 10 m bin --> 50 ybins
-
-  
-    fName  = name  ? name  : "MHEnergyTheta";
-    fTitle = title ? title : "Data to Calculate Collection Area";
-
-    fHist.SetDirectory(NULL);
-
-    fHist.SetXTitle("E [GeV]");
-    fHist.SetYTitle("\\Theta [\\circ]");
-    fHist.SetZTitle("N");
-}
-
-Bool_t MHEnergyTheta::SetupFill(const MParList *plist)
-{
-    MBinning* binsenergy = (MBinning*)plist->FindObject("BinningE");
-    MBinning* binstheta  = (MBinning*)plist->FindObject("BinningTheta");
-    if (!binsenergy || !binstheta)
-    {
-        *fLog << err << dbginf << "At least one MBinning not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    SetBinning(&fHist, binsenergy, binstheta);
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill data into the histogram which contains all showers
-//
-Bool_t MHEnergyTheta::Fill(const MParContainer *par, const Stat_t w)
-{
-    const MMcEvt &mcevt = *(MMcEvt*)par;
-
-    fHist.Fill(mcevt.GetEnergy(), mcevt.GetTheta(), w);
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw the histogram with all showers
-//
-void MHEnergyTheta::Draw(Option_t* option)
-{
-    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
-    pad->SetBorderMode(0);
-    pad->SetLogy();
-
-    fHist.Draw(option);
-
-    pad->Modified();
-    pad->Update();
-}
-
-// --------------------------------------------------------------------------
-//
-//  Calculate the Efficiency (collection area) and set the 'ReadyToSave'
-//  flag
-//
-void MHEnergyTheta::Divide(const TH2D *h1, const TH2D *h2)
-{
-    // Description!
-
-    fHist.Sumw2();
-    fHist.Divide((TH2D*)h1, (TH2D*)h2);
-
-    SetReadyToSave();
-}
Index: trunk/MagicSoft/Mars/mhist/MHEnergyTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEnergyTheta.h	(revision 6926)
+++ 	(revision )
@@ -1,42 +1,0 @@
-#ifndef MARS_MHEnergyTheta
-#define MARS_MHEnergyTheta
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-#ifndef ROOT_TH2
-#include <TH2.h>
-#endif
-
-class MTime;
-class MParList;
-
-class MHEnergyTheta : public MH
-{
-private:
-    TH2D fHist; //! 
-
-public:
-    MHEnergyTheta(const char *name=NULL, const char *title=NULL);
-
-    Bool_t Fill(const MParContainer *cont, const Stat_t w=1);
-
-    void Draw(Option_t *option="");
-
-    Bool_t SetupFill(const MParList *plist);
-
-    const TH2D *GetHist() { return &fHist; }
-    const TH2D *GetHist() const { return &fHist; }
-
-    TH1 *GetHistByName(const TString name) { return &fHist; }
-
-    void Divide(const TH2D *h1, const TH2D *h2);
-    void Divide(const MHEnergyTheta *h1, const MHEnergyTheta *h2)
-    {
-        Divide(h1->GetHist(), h2->GetHist());
-    }
-
-    ClassDef(MHEnergyTheta, 1)  // Histogram: Energy vs. Theta
-};
-
-#endif
Index: trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc	(revision 6926)
+++ 	(revision )
@@ -1,142 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Thomas Bretz  1/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2002
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHEnergyTime                                                            //
-//                                                                          //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "MHEnergyTime.h" 
-
-#include <TCanvas.h>
-
-#include "MMcEvt.hxx"
-#include "MTime.h"
-
-#include "MH.h"
-#include "MBinning.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include "MParList.h"
-
-ClassImp(MHEnergyTime);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-//  Creates the three necessary histograms:
-//   - selected showers (input)
-//   - all showers (input)
-//   - collection area (result)
-//
-MHEnergyTime::MHEnergyTime(const char *name, const char *title)
-{ 
-    //   initialize the histogram for the distribution r vs E
-    //
-    //   we set the energy range from 1 Gev to 10000 GeV (in log 5 orders
-    //   of magnitude) and for each order we take 10 subdivision --> 50 xbins
-    //
-    //   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";
-
-    fHist.SetDirectory(NULL);
-
-    fHist.SetXTitle("E [GeV]");
-    fHist.SetYTitle("t [s]");
-    fHist.SetZTitle("N");
-}
-
-Bool_t MHEnergyTime::SetupFill(const MParList *plist)
-{
-    fTime = (MTime*)plist->FindObject("MTime");
-    if (!fTime)
-    {
-        *fLog << err << dbginf << "MTime not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    const MBinning* binsenergy = (MBinning*)plist->FindObject("BinningE");
-    const MBinning* binstime   = (MBinning*)plist->FindObject("BinningTime");
-    if (!binsenergy || !binstime)
-    {
-        *fLog << err << dbginf << "At least one MBinning not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    SetBinning(&fHist, binsenergy, binstime);
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill data into the histogram which contains all showers
-//
-Bool_t MHEnergyTime::Fill(const MParContainer *par, const Stat_t w)
-{
-    const MMcEvt &mcevt = *(MMcEvt*)par;
-
-    fHist.Fill(mcevt.GetEnergy(), *fTime, w);
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw the histogram with all showers
-//
-void MHEnergyTime::Draw(Option_t* option)
-{
-    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
-    pad->SetBorderMode(0);
-
-    AppendPad("");
-
-    pad->SetLogy();
-    fHist.DrawCopy(option);
-
-    pad->Modified();
-    pad->Update();
-}
-
-// --------------------------------------------------------------------------
-//
-//  Calculate the Efficiency (collection area) and set the 'ReadyToSave'
-//  flag
-//
-void MHEnergyTime::Divide(const TH2D *h1, const TH2D *h2)
-{
-    // Description!
-
-    fHist.Sumw2();
-    fHist.Divide((TH2D*)h1, (TH2D*)h2);
-
-    SetReadyToSave();
-}
Index: trunk/MagicSoft/Mars/mhist/MHEnergyTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEnergyTime.h	(revision 6926)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#ifndef MARS_MHEnergyTime
-#define MARS_MHEnergyTime
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-#ifndef ROOT_TH2
-#include "TH2.h"
-#endif
-
-class MTime;
-class MParList;
-
-class MHEnergyTime : public MH
-{
-private:
-    MTime *fTime;
-    TH2D fHist; //! 
-
-public:
-    MHEnergyTime(const char *name=NULL, const char *title=NULL);
-
-    Bool_t Fill(const MParContainer *cont,  const Stat_t w=1);
-
-    void Draw(Option_t *option="");
-
-    Bool_t SetupFill(const MParList *plist);
-
-    const TH2D *GetHist() { return &fHist; }
-    const TH2D *GetHist() const { return &fHist; }
-
-    TH1 *GetHistByName(const TString name) { return &fHist; }
-
-    void Divide(const TH2D *h1, const TH2D *h2);
-    void Divide(const MHEnergyTime *h1, const MHEnergyTime *h2)
-    {
-        Divide(h1->GetHist(), h2->GetHist());
-    }
-
-    ClassDef(MHEnergyTime, 1)  // Histogram: Energy vs. Time
-};
-
-#endif
Index: trunk/MagicSoft/Mars/mhist/MHSigmaPixel.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmaPixel.cc	(revision 6926)
+++ 	(revision )
@@ -1,138 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Robert Wagner 10/2002 <mailto:magicsoft@rwagner.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2003
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHSigmaPixel                                                            //
-//                                                                          //
-//  2D-Histogram pedestal sigma vs pixel number                             //
-//                                                                          //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "MHSigmaPixel.h"
-
-#include <TCanvas.h>
-
-#include <math.h>
-
-#include "MPedestalCam.h"
-#include "MPedestalPix.h"
-#include "MSigmabar.h"
-
-#include "MBinning.h"
-#include "MParList.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MHSigmaPixel);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Default Constructor. It sets name and title of the histogram. 
-//
-MHSigmaPixel::MHSigmaPixel(const char *name, const char *title)
-{
-    //
-    //   set the name and title of this object
-    //
-    fName  = name  ? name  : "MHSigmaPixel";
-    fTitle = title ? title : "2-D histogram in sigma and pixel";
-
-    fHist.SetDirectory(NULL);
-
-    fHist.SetTitle("Sigma vs pixel #");
-    fHist.SetXTitle("pixel #");
-    fHist.SetYTitle("\\sigma");
-    fHist.SetZTitle("N");
-}
-
-// --------------------------------------------------------------------------
-//
-// Set binnings and prepare filling of the histogram. The binning for the
-// pixel axis is derived automagically from the MPedestalCam container
-// expected to be found in the MParList *plist.
-// 
-Bool_t MHSigmaPixel::SetupFill(const MParList *plist)
-{
-  fPedestalCam = (MPedestalCam*)plist->FindObject("MPedestalCam");
-  if (!fPedestalCam)
-    {
-      *fLog << err << "MPedestalCam not found... aborting." << endl;
-      return kFALSE;
-    }
-  
-  MBinning* binssigma = (MBinning*)plist->FindObject("BinningSigma");
-  if (!binssigma)
-    {
-      *fLog << err << "BinningSigma [MBinning] not found... aborting." << endl;
-      return kFALSE;      
-    }
-
-  const Int_t n = fPedestalCam->GetSize();
-
-  MBinning binspixel;
-  binspixel.SetEdges(n, -0.5, -0.5+n);
-
-  SetBinning(&fHist, &binspixel, binssigma);
-
-  fHist.Sumw2();
-
-  return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the histogram
-// 
-Bool_t MHSigmaPixel::Fill(const MParContainer *par, const Stat_t w)
-{
-    const MPedestalCam &ped = *(MPedestalCam*)par;
-    for (Int_t i=0;i<(ped.GetSize());i++)
-    {
-        const MPedestalPix pix = ped[i];
-        fHist.Fill(i, pix.GetPedestalRms());
-    }
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw the histogram
-// 
-void MHSigmaPixel::Draw(Option_t *opt)
-{
-    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
-    pad->SetBorderMode(0);
-
-    AppendPad("");
-
-    fHist.Draw(opt);
-
-    gPad->Modified();
-    gPad->Update();
-}
-
Index: trunk/MagicSoft/Mars/mhist/MHSigmaPixel.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmaPixel.h	(revision 6926)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#ifndef MARS_MHSigmaPixel
-#define MARS_MHSigmaPixel
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-#ifndef ROOT_TH2
-#include <TH2.h>
-#endif
-
-class TH2D;
-
-class MMcEvt;
-class MParList;
-class MPedestalCam;
-
-class MHSigmaPixel : public MH
-{
-private:
-    MPedestalCam *fPedestalCam; //!
-
-    TH2D fHist;
-
-public:
-    MHSigmaPixel(const char *name=NULL, const char *title=NULL);
-
-    Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
-
-    const TH2D *GetHist()       { return &fHist; }
-    const TH2D *GetHist() const { return &fHist; }
-
-    TH1 *GetHistByName(const TString name) { return &fHist; }
-
-    void Draw(Option_t *option="");
-
-    ClassDef(MHSigmaPixel, 1) //2D-histogram in Sigma and Pixel number
-};
-
-#endif
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc	(revision 6926)
+++ 	(revision )
@@ -1,512 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Wolfgang Wittek 1/2003 <mailto:wittek@mppmu.mpg.de>
-!   Author(s): Thomas Bretz 4/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2003
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHSigmaTheta                                                            //
-//                                                                          //
-//  calculates - the 2D-histogram   sigmabar vs. Theta (Inner), and         //
-//             - the 2D-histogram   sigmabar vs. Theta (Outer)              //
-//             - the 3D-histogram   sigma, pixel no., Theta                 //
-//             - the 3D-histogram   (sigma^2-sigmabar^2), pixel no., Theta  //
-//             - the 2D-histogram   Theta    vs. Phi                        //
-//                                                                          //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "MHSigmaTheta.h"
-
-#include <TCanvas.h>
-
-#include "MTime.h"
-#include "MPointingPos.h"
-
-#include "MBinning.h"
-#include "MParList.h"
-
-#include "MGeomCam.h"
-#include "MGeomPix.h"
-#include "MBadPixelsCam.h"
-
-#include "MPedPhotCam.h"
-#include "MPedPhotPix.h"
-
-#include "MCerPhotEvt.h"
-#include "MCerPhotPix.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MHSigmaTheta);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Constructor. 
-//
-MHSigmaTheta::MHSigmaTheta(const char *name, const char *title)
-{
-    fName  = name  ? name  : "MHSigmaTheta";
-    fTitle = title ? title : "2D histogram sigmabar vs. Theta";
-
-    fThetaPhi = new TH2D;
-    fThetaPhi->SetDirectory(NULL);
-    fThetaPhi->UseCurrentStyle();
-    fThetaPhi->SetName("2D-ThetaPhi");
-    fThetaPhi->SetTitle("2D: \\Theta vs. \\Phi");
-    fThetaPhi->SetXTitle("\\phi [\\circ]");
-    fThetaPhi->SetYTitle("\\Theta [\\circ]");
-    fThetaPhi->SetTitleOffset(1.2,"Y");
-
-    fSigmaTheta = new TH2D;
-    fSigmaTheta->SetDirectory(NULL);
-    fSigmaTheta->UseCurrentStyle();
-    fSigmaTheta->SetName("2D-ThetaSigmabar(Inner)");
-    fSigmaTheta->SetTitle("2D: \\bar{\\sigma}, \\Theta");
-    fSigmaTheta->SetXTitle("\\Theta [\\circ]");
-    fSigmaTheta->SetYTitle("Sigmabar(Inner)");
-    fSigmaTheta->SetTitleOffset(1.2,"Y");
-
-    fSigmaThetaOuter = new TH2D;
-    fSigmaThetaOuter->SetDirectory(NULL);
-    fSigmaThetaOuter->UseCurrentStyle();
-    fSigmaThetaOuter->SetName("2D-ThetaSigmabar(Outer)");
-    fSigmaThetaOuter->SetTitle("2D: \\bar{\\sigma}, \\Theta");
-    fSigmaThetaOuter->SetXTitle("\\Theta [\\circ]");
-    fSigmaThetaOuter->SetYTitle("Sigmabar(Outer)");
-    fSigmaThetaOuter->SetTitleOffset(1.2,"Y");
-
-    fSigmaPixTheta = new TH3D;
-    fSigmaPixTheta->SetDirectory(NULL);
-    fSigmaPixTheta->UseCurrentStyle();
-    fSigmaPixTheta->SetName("3D-ThetaPixSigma");
-    fSigmaPixTheta->SetTitle("3D: \\Theta, Pixel Id, \\sigma");
-    fSigmaPixTheta->SetXTitle("\\Theta [\\circ]");
-    fSigmaPixTheta->SetYTitle("Pixel Id");
-    fSigmaPixTheta->SetZTitle("Sigma");
-
-    fDiffPixTheta = new TH3D;
-    fDiffPixTheta->SetDirectory(NULL);
-    fDiffPixTheta->UseCurrentStyle();
-    fDiffPixTheta->SetName("3D-ThetaPixDiff");
-    //fDiffPixTheta->SetTitle("3D: \\Theta, Pixel Id, {\\sigma}^{2}-\\bar{\\sigma}^{2}");
-    fDiffPixTheta->SetTitle("3D: \\Theta, Pixel Id, (Sigma2-Sigmabar2)/Area");
-    fDiffPixTheta->SetXTitle("\\Theta [\\circ]");
-    fDiffPixTheta->SetYTitle("Pixel Id");
-    fDiffPixTheta->SetZTitle("(Sigma2 - Sigmabar2)/Area");
-
-    // Define default binning
-    fBinsPhi = new MBinning;
-    fBinsPhi->SetEdges( 20, 0.0, 360.0);
-
-    Double_t fThetaLo =  0.0;
-    Double_t fThetaHi = 90.0;
-    fBinsTheta = new MBinning;
-    fBinsTheta->SetEdgesCos( 10,  fThetaLo, fThetaHi);   // theta
-    //fBinsTheta->SetEdges( 1, fThetaLo, fThetaHi);   // theta
-
-    fBinsSigma = new MBinning;
-    fBinsSigma->SetEdges(   100,     0.0, 120.0);   // sigma 
-
-    fBinsSigmabarIn  = new MBinning;
-    fBinsSigmabarOut = new MBinning;;
-    fBinsSigmabarIn->SetEdges( 100,     0.0,  25.0);   // sigmabar (inner)
-    fBinsSigmabarOut->SetEdges(100,     0.0,  60.0);   // sigmabar (outer)
-
-    fBinsPix = new MBinning;
-    fBinsPix->SetEdges(578, -0.5, 577.5);
-
-    fBinsDiff = new MBinning;
-    fBinsDiff->SetEdges(   100,  -500.0, 1500.0);   // (sigma2-sigmabar2)/area
-
-    SetBinning(fThetaPhi,        fBinsPhi,   fBinsTheta);
-    SetBinning(fSigmaTheta,      fBinsTheta, fBinsSigmabarIn);
-    SetBinning(fSigmaThetaOuter, fBinsTheta, fBinsSigmabarOut);
-    SetBinning(fSigmaPixTheta,   fBinsTheta, fBinsPix, fBinsSigma);
-    SetBinning(fDiffPixTheta,    fBinsTheta, fBinsPix, fBinsDiff);
-
-    //--------------------------------------------
-    fNamePedPhotCam = "MPedPhotCamFromData";
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Destructor. 
-//
-MHSigmaTheta::~MHSigmaTheta()
-{
-  delete fThetaPhi;
-  delete fSigmaTheta;
-  delete fSigmaThetaOuter;
-  delete fSigmaPixTheta;
-  delete fDiffPixTheta;
-
-  delete fBinsPhi;
-  delete fBinsTheta;
-  delete fBinsSigma;
-  delete fBinsSigmabarIn;
-  delete fBinsSigmabarOut;
-  delete fBinsPix;
-  delete fBinsDiff;
-}
-
-// --------------------------------------------------------------------------
-//
-// Set the binnings and prepare the filling of the histogram
-//
-Bool_t MHSigmaTheta::SetupFill(const MParList *plist)
-{
-    fCam = (MGeomCam*)plist->FindObject("MGeomCam");
-    if (!fCam)
-    {
-        *fLog << err << "MGeomCam not found (no geometry information available)... aborting." << endl;
-        return kFALSE;
-    }
-
-    fPointPos = (MPointingPos*)plist->FindObject("MPointingPos");
-    if (!fPointPos)
-    {
-        *fLog << err << "MPointingPos not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    fPed = (MPedPhotCam*)plist->FindObject(AddSerialNumber(fNamePedPhotCam), "MPedPhotCam");
-    if (!fPed)
-    {
-        *fLog << err << AddSerialNumber(fNamePedPhotCam) 
-              << "[MPedPhotCam] not found... aborting." << endl;
-        return kFALSE;
-    }
-    fPed->InitSize(fCam->GetNumPixels()); 
-
-    
-    fBad = (MBadPixelsCam*)plist->FindObject("MBadPixelsCam");
-    if (!fBad)
-    {  
-       *fLog << err << "MBadPixelsCam not found... continue. " << endl; 
-    }
-
-
-    fEvt = (MCerPhotEvt*)plist->FindObject("MCerPhotEvt");
-    if (!fEvt)
-    {
-        *fLog << err << "MCerPhotEvt not found... aborting." << endl;
-        return kFALSE;
-    }
-
-
-    //---------------------------------------------------------------
-    *fLog << inf << "Name of MPedPhotCam container : " 
-          << fNamePedPhotCam << endl;
-
-
-    //---------------------------------------------------------------
-
-    // Get Phi Binning
-    MBinning* binsphi  = (MBinning*)plist->FindObject("BinningPhi", "MBinning");
-    if (!binsphi)
-    {
-        *fLog << warn << "Object 'BinningPhi' [MBinning] not found... use default binning." << endl;
-        binsphi = fBinsPhi;
-    }
-
-    // Get Theta Binning
-    MBinning* binstheta  = (MBinning*)plist->FindObject("BinningTheta", "MBinning");
-    if (!binstheta)
-    {
-        *fLog << warn << "Object 'BinningTheta' [MBinning] not found... use default binning." << endl;
-        binstheta = fBinsTheta;
-    }
-
-    // Get Sigma binning
-    MBinning* binssig = (MBinning*)plist->FindObject("BinningSigma", "MBinning");
-    if (!binssig)
-    {
-        *fLog << warn << "Object 'BinningSigma' [MBinning] not found... use default binning." << endl;
-        binssig = fBinsSigma;
-    }
-
-    // Get SigmabarIn binning
-    MBinning* binssigmain = (MBinning*)plist->FindObject("BinningSigmabarIn", "MBinning");
-    if (!binssigmain)
-    {
-        *fLog << warn << "Object 'BinningSigmabarIn' [MBinning] not found... use default binning." << endl;
-        binssigmain = fBinsSigmabarIn;
-    }
-
-    // Get SigmabarOut binning
-    MBinning* binssigmaout = (MBinning*)plist->FindObject("BinningSigmabarOut", "MBinning");
-    if (!binssigmaout)
-    {
-        *fLog << warn << "Object 'BinningSigmabarOut' [MBinning] not found... use default binning." << endl;
-        binssigmaout = fBinsSigmabarOut;
-    }
-
-    // Get binning for (sigma^2-sigmabar^2)
-    MBinning* binsdiff  = (MBinning*)plist->FindObject("BinningDiffsigma2", "MBinning");
-    if (!binsdiff)
-    {
-        *fLog << warn << "Object 'BinningDiffsigma2' [MBinning] not found... use default binning." << endl;
-        binsdiff = fBinsDiff;
-    }
-
-
-    //---------------------------------------------------------------
-
-    // Get binning for pixel number
-    const UInt_t npix1 = fPed->GetSize()+1;
-    //*fLog << "MHSigmaTheata::SetupFill(); npix1 = " << npix1 << endl;
-    MBinning binspix("BinningPixel");
-    binspix.SetEdges(npix1, -0.5, npix1-0.5);
-
-    // Set binnings in histograms
-    SetBinning(fThetaPhi,        binsphi,   binstheta);
-    SetBinning(fSigmaTheta,      binstheta, binssigmain);
-    SetBinning(fSigmaThetaOuter, binstheta, binssigmaout);
-    SetBinning(fSigmaPixTheta,   binstheta, &binspix, binssig);
-    SetBinning(fDiffPixTheta,    binstheta, &binspix, binsdiff);
-
-    *fLog << "MHSigmaTheta::SetupFill(); binnings were set" << endl;
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-//  Fill the histograms
-//
-//  ignore pixels if they are unused or blind
-//
-Bool_t MHSigmaTheta::Fill(const MParContainer *par, const Stat_t w)
-{
-    Double_t theta = fPointPos->GetZd();
-    Double_t phi   = fPointPos->GetAz();
-
-    fPed->ReCalc(*fCam, fBad);
-
-    Double_t mysig      = (fPed->GetArea(0)).GetRms();
-    Double_t mysigouter = (fPed->GetArea(1)).GetRms();
-
-    //*fLog << "theta, mysig, mysigouter = " << theta << ",  " << mysig 
-    //      << ",  " << mysigouter << endl;
-
-    fThetaPhi->Fill(phi, theta);
-    fSigmaTheta->Fill(theta, mysig);
-    fSigmaThetaOuter->Fill(theta, mysigouter);
-
-    MCerPhotPix *cerpix = 0;
-    TIter Next(*fEvt);
-    while ( (cerpix=(MCerPhotPix*)Next()) )
-    {
-        const Int_t id = cerpix->GetPixId();
-
-        if (!cerpix->IsPixelUsed())
-	{
-          //*fLog << all << "MHSigmaTheta::Fill; unused pixel found, id = "
-          //      << id << endl;
-          continue;
-	}
-
-        const MPedPhotPix &pix = (*fPed)[id];
-
-        // ratio is the area of pixel 0 
-        //          divided by the area of the current pixel
-        const Double_t ratio = fCam->GetPixRatio(id);
-        const Double_t sigma = pix.GetRms();
-
-        fSigmaPixTheta->Fill(theta, (Double_t)id, sigma);
-
-	Double_t diff;
-        const Byte_t aidx = (*fCam)[id].GetAidx();
-        if (aidx == 0)
-	{
-          // inner pixel
-          diff = (sigma*sigma - mysig*mysig) * ratio;
-	}
-        else
-	{
-          // outer pixel
-          diff = (sigma*sigma - mysigouter*mysigouter) * ratio;
-	}
-
-        fDiffPixTheta->Fill(theta, (Double_t)id, diff);
-    }
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Update the projections and (if possible) set log scales before painting
-//
-void MHSigmaTheta::Paint(Option_t *opt)
-{
-    TVirtualPad *padsave = gPad;
-
-    TH1D* h;
-
-    padsave->cd(1);
-    if ((h = (TH1D*)gPad->FindObject("ProjX-Theta")))
-    {
-        ProjectionX(*h, *fSigmaTheta);
-        if (h->GetEntries()!=0)
-            gPad->SetLogy();
-    }
-
-    padsave->cd(4);
-    if ((h = (TH1D*)gPad->FindObject("ProjY-sigma")))
-        ProjectionY(*h, *fSigmaTheta);
-
-    gPad = padsave;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw the histogram
-//
-void MHSigmaTheta::Draw(Option_t *opt)
-{
-    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
-    pad->SetBorderMode(0);
-    AppendPad("");
-
-    pad->Divide(3, 3);
-
-    // draw the 2D histogram Sigmabar versus Theta
-    TH1 *h;
-
-    pad->cd(1);
-    gPad->SetBorderMode(0);
-    h = fSigmaTheta->ProjectionX("ProjX-Theta", -1, 9999, "E");
-    h->SetDirectory(NULL);
-    h->UseCurrentStyle();
-    h->SetTitle("Distribution of \\Theta");
-    h->SetXTitle("\\Theta [\\circ]");
-    h->SetYTitle("No.of events");
-    h->SetTitleOffset(1.2,"Y");
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-
-    pad->cd(2);
-    gPad->SetBorderMode(0);
-    h = fDiffPixTheta->Project3D("zx");
-    h->SetDirectory(NULL);
-    h->UseCurrentStyle();
-    //h->SetTitle("\\sigma_{ped}^{2}-\\bar{\\sigma}_{ped}^{2} vs. \\Theta (all pixels)");
-    h->SetTitle("(Sigma2-Sigmabar2)/Area  vs. \\Theta (all pixels)");
-    h->SetXTitle("\\Theta [\\circ]");
-    h->SetYTitle("(Sigma2 - Sigmabar2) / Area");
-    h->SetTitleOffset(1.2,"Y");
-    h->Draw("box");
-    h->SetBit(kCanDelete);
-
-    pad->cd(3);
-    gPad->SetBorderMode(0);
-    h = fSigmaPixTheta->Project3D("zx");
-    h->SetDirectory(NULL);
-    h->UseCurrentStyle();
-    h->SetTitle("\\sigma_{ped} vs. \\Theta (all pixels)");
-    h->SetXTitle("\\Theta [\\circ]");
-    h->SetYTitle("Sigma");
-    h->SetTitleOffset(1.2,"Y");
-    h->Draw("box");
-    h->SetBit(kCanDelete);
-
-    //pad->cd(7);
-    //gPad->SetBorderMode(0);
-    //h = fSigmaTheta->ProjectionY("ProjY-sigma", -1, 9999, "E");
-    //h->SetDirectory(NULL);
-    //h->UseCurrentStyle();
-    //h->SetTitle("Distribution of \\bar{\\sigma}_{ped}");
-    //h->SetXTitle("\\bar{\\sigma}_{ped}");
-    //h->SetYTitle("No.of events");
-    //h->SetTitleOffset(1.2,"Y");
-    //h->Draw(opt);
-    //h->SetBit(kCanDelete);
-
-    pad->cd(5);
-    gPad->SetBorderMode(0);
-    h = fDiffPixTheta->Project3D("zy");
-    h->SetDirectory(NULL);
-    h->UseCurrentStyle();
-    //h->SetTitle("\\sigma_{ped}^{2}-\\bar{\\sigma}_{ped}^{2} vs. pixel Id (all  \\Theta)");
-    h->SetTitle("(Sigma2-Sigmabar2)/Area  vs. pixel Id (all  \\Theta)");
-    h->SetXTitle("Pixel Id");
-    h->SetYTitle("(Sigma2 - sigmabar2) / Area");
-    h->SetTitleOffset(1.2,"Y");
-    h->Draw("box");
-    h->SetBit(kCanDelete);
-
-    pad->cd(6);
-    gPad->SetBorderMode(0);
-    h = fSigmaPixTheta->Project3D("zy");
-    h->SetDirectory(NULL);
-    h->UseCurrentStyle();
-    h->SetTitle("\\sigma_{ped} vs. pixel Id (all  \\Theta)");
-    h->SetXTitle("Pixel Id");
-    h->SetYTitle("Sigma");
-    h->SetTitleOffset(1.2,"Y");
-    h->Draw("box");
-    h->SetBit(kCanDelete);
-
-    pad->cd(4);
-    gPad->SetBorderMode(0);
-    fSigmaTheta->Draw();
-
-    pad->cd(7);
-    gPad->SetBorderMode(0);
-    fSigmaThetaOuter->Draw();
-
-    pad->cd(8);
-    gPad->SetBorderMode(0);
-    fThetaPhi->Draw();
-
-    pad->cd(9);
-    gPad->SetBorderMode(0);
-    h = fThetaPhi->ProjectionX("ProjX-Phi", -1, 9999, "E");
-    h->SetDirectory(NULL);
-    h->UseCurrentStyle();
-    h->SetTitle("Distribution of \\Phi");
-    h->SetXTitle("\\phi [\\circ]");
-    h->SetYTitle("No. of events");
-    h->SetTitleOffset(1.2,"Y");
-    h->Draw(opt);
-    h->SetBit(kCanDelete);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h	(revision 6926)
+++ 	(revision )
@@ -1,89 +1,0 @@
-#ifndef MARS_MHSigmaTheta
-#define MARS_MHSigmaTheta
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-#ifndef ROOT_TH2
-#include <TH2.h>
-#endif
-
-#ifndef ROOT_TH3
-#include <TH3.h>
-#endif
-
-
-class MParList;
-class MGeomCam;
-class MCerPhotEvt;
-class MPointingPos;
-class MPedPhotCam;
-class MBadPixelsCam;
-
-
-class MHSigmaTheta : public MH
-{
-private:
-    const MGeomCam *fCam;        //!
-    MPedPhotCam    *fPed;        //!
-    MCerPhotEvt    *fEvt;        //!
-    MPointingPos   *fPointPos;   //!
-    MBadPixelsCam  *fBad;        //!
-
-    TString  fNamePedPhotCam; //! name of the 'MPedPhotCam' container
-
-                           // sigmabar is the average pedestal sigma  
-    TH2D *fSigmaTheta;      // 2D-distribution sigmabar versus Theta (Inner) 
-    TH2D *fSigmaThetaOuter; // 2D-distribution sigmabar versus Theta (Outer) 
-
-    TH3D *fSigmaPixTheta; // 3D-distr.:Theta, pixel, pedestal sigma
-    TH3D *fDiffPixTheta;  // 3D-distr.:Theta, pixel, sigma^2-sigmabar^2
-
-    TH2D *fThetaPhi;      // 2D-distribution Theta versus Phi 
-
-    MBinning *fBinsPhi;            //!
-    MBinning *fBinsTheta;          //!
-    MBinning *fBinsSigma;          //!
-    MBinning *fBinsSigmabarIn;     //!
-    MBinning *fBinsSigmabarOut;    //!
-    MBinning *fBinsPix;            //!
-    MBinning *fBinsDiff;           //!
-
-    void Paint(Option_t *opt="");
-
-public:
-    MHSigmaTheta(const char *name=NULL, const char *title=NULL);
-    ~MHSigmaTheta();
-
-    void SetNamePedPhotCam(const char *name)  { fNamePedPhotCam = name; }
-
-    Bool_t SetupFill(const MParList *plist);
-    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
-
-    const TH2D *GetThetaPhi() { return fThetaPhi; }
-    const TH2D *GetThetaPhi() const { return fThetaPhi; }
-
-    const TH2D *GetSigmaTheta() { return fSigmaTheta; }
-    const TH2D *GetSigmaTheta() const { return fSigmaTheta; }
-
-    const TH2D *GetSigmaThetaOuter() { return fSigmaThetaOuter; }
-    const TH2D *GetSigmaThetaOuter() const { return fSigmaThetaOuter; }
-
-    const TH3D *GetSigmaPixTheta() { return fSigmaPixTheta; }
-    const TH3D *GetSigmaPixTheta() const { return fSigmaPixTheta; }
-
-    const TH3D *GetDiffPixTheta() { return fDiffPixTheta; }
-    const TH3D *GetDiffPixTheta() const { return fDiffPixTheta; }
-
-    void Draw(Option_t *option="");
-
-    ClassDef(MHSigmaTheta, 1) //2D-histogram  sigmabar vs. Theta
-};
-
-#endif
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mhist/MHSigmabarTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmabarTheta.cc	(revision 6926)
+++ 	(revision )
@@ -1,137 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Robert Wagner 10/2002 <mailto:magicsoft@rwagner.de>
-!   Copyright: MAGIC Software Development, 2000-2002
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHSigmabarTheta                                                         //
-//                                                                          //
-//  2D-Histogram in Sigmabar and Theta                                      //
-//                                                                          //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "MHSigmabarTheta.h"
-
-#include <TCanvas.h>
-
-#include <math.h>
-
-#include "MMcEvt.hxx"
-#include "MSigmabar.h"
-
-#include "MBinning.h"
-#include "MParList.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MHSigmabarTheta);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Default Constructor. It sets name and title of the histogram. 
-//
-MHSigmabarTheta::MHSigmabarTheta(const char *name, const char *title)
-{
-    //
-    //   set the name and title of this object
-    //
-    fName  = name  ? name  : "MHSigmabarTheta";
-    fTitle = title ? title : "3-D histogram in sigmabar and theta";
-
-    fHist.SetDirectory(NULL);
-
-    fHist.SetTitle("3D-plot of sigmabar and theta");
-    fHist.SetXTitle("\\theta [\\circ]");
-    fHist.SetYTitle("\\bar{\\sigma}");
-    fHist.SetZTitle("N");
-}
-
-// --------------------------------------------------------------------------
-//
-// Set binnings and prepare filling of the histogram
-// 
-Bool_t MHSigmabarTheta::SetupFill(const MParList *plist)
-{
-   fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt");
-   if (!fMcEvt)
-   {
-       *fLog << err << "MMcEvt not found... aborting." << endl;
-       return kFALSE;
-   }
-
-   fSigmabar = (MSigmabar*)plist->FindObject("MSigmabar");
-   if (!fSigmabar)
-   {
-       *fLog << err << "MSigmabar not found... aborting." << endl;
-       return kFALSE;
-   }
-
-   MBinning* binstheta  = (MBinning*)plist->FindObject("BinningTheta");
-   if (!binstheta)
-   {
-       *fLog << err << "BinningTheta [MBinning] not found... aborting." << endl;
-       return kFALSE;      
-   }
-   MBinning* binssigmabar = (MBinning*)plist->FindObject("BinningSigmabar");
-   if (!binssigmabar)
-   {
-       *fLog << err << "BinningSigmabar [MBinning] not found... aborting." << endl;
-       return kFALSE;      
-   }
-
-   SetBinning(&fHist, binstheta, binssigmabar);
-
-   fHist.Sumw2(); 
-
-   return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the histogram
-// 
-Bool_t MHSigmabarTheta::Fill(const MParContainer *par, const Stat_t w)
-{
-    fHist.Fill(fMcEvt->GetTheta()*kRad2Deg, fSigmabar->GetSigmabar(), w);
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw the histogram
-// 
-void MHSigmabarTheta::Draw(Option_t *opt)
-{
-    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
-    pad->SetBorderMode(0);
-
-    AppendPad("");
-
-    fHist.Draw(opt);
-    
-    pad->Modified();
-    pad->Update();
-}
-
Index: trunk/MagicSoft/Mars/mhist/MHSigmabarTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSigmabarTheta.h	(revision 6926)
+++ 	(revision )
@@ -1,47 +1,0 @@
-#ifndef MARS_MHSigmabarTheta
-#define MARS_MHSigmabarTheta
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-#ifndef ROOT_TH2
-#include <TH2.h>
-#endif
-
-class MMcEvt;
-class MSigmabar;
-class TH2D;
-class MParList;
-
-
-class MHSigmabarTheta : public MH
-{
-private:
-    MMcEvt    *fMcEvt;        //!
-    MSigmabar *fSigmabar;     //!
-
-    TH2D fHist;
-
-public:
-    MHSigmabarTheta(const char *name=NULL, const char *title=NULL);
-
-    Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
-
-    const TH2D *GetHist()       { return &fHist; }
-    const TH2D *GetHist() const { return &fHist; }
-
-    TH1 *GetHistByName(const TString name) { return &fHist; }
-
-    void Draw(Option_t *option="");
-
-    ClassDef(MHSigmabarTheta, 1) //3D-histogram in alpha, Energy and theta
-};
-
-#endif
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mhist/MHSupercuts.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSupercuts.cc	(revision 6926)
+++ 	(revision )
@@ -1,225 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Wolfgang Wittek  2003 <mailto:wittek@mppmu.mpg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2003
-!
-!
-\* ======================================================================== */
-
-///////////////////////////////////////////////////////////////////////
-//
-// MHSupercuts
-//
-// This class contains histograms for the supercuts
-//
-// the histograms are filled during the optimization of the supercuts
-//
-///////////////////////////////////////////////////////////////////////
-#include "MHSupercuts.h"
-
-#include <math.h>
-
-#include <TH1.h>
-#include <TH2.h>
-#include <TPad.h>
-#include <TCanvas.h>
-
-#include "MParList.h"
-#include "MHFindSignificance.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MHSupercuts);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Setup four histograms for Alpha, and Dist
-//
-MHSupercuts::MHSupercuts(const char *name, const char *title)
-{
-    //
-    //   set the name and title of this object
-    //
-    fName  = name  ? name  : "MHSupercuts";
-    fTitle = title ? title : "Container for histograms for the supercuts";
-
-
-    fDegree = new TH1F("Degree", "Degree of polynomial",   5, -0.5,  4.5);
-    fProb   = new TH1F("Prob",   "chi2 probability",      40,    0,  1.0);
-    fNdf    = new TH1F("NDF",    "NDF of polynomial fit", 60, -0.5, 59.5);
-    fGamma  = new TH1F("gamma",  "gamma",                 40,  0.0,  8.0);
-    fNexNon = new TH1F("NexNon", "Nex / Non",             50,  0.0,  1.0);
-    fSigLiMa= new TH1F("Significance", "significance of gamma signal",   
-                                                          60,  0.0, 120.0);
-    fSigtoBackg= new TH2F("SigtoBackg", "Significance vs signal/backg ratio",
-                          50,  0.0,  10.0, 60, 0.0, 120.0);
-    fSigDegree = new TH2F("SigDegree", "Significance vs Degree of polynomial",
-                           5, -0.5,   4.5, 60, 0.0, 120.0);
-    fSigNbins  = new TH2F("SigNbins", "Significance vs number of bins",
-                           40, -0.5, 79.5, 60, 0.0, 120.0);
-
-    fDegree->SetDirectory(NULL);
-    fProb->SetDirectory(NULL);
-    fNdf->SetDirectory(NULL);
-    fGamma->SetDirectory(NULL);
-    fNexNon->SetDirectory(NULL);
-    fSigLiMa->SetDirectory(NULL);
-    fSigtoBackg->SetDirectory(NULL);
-    fSigDegree->SetDirectory(NULL);
-    fSigNbins->SetDirectory(NULL);
-
-    fDegree->SetXTitle("order of polynomial");
-    fProb->SetXTitle("chi2 probability of polynomial fit");
-    fNdf->SetXTitle("NDF of polynomial fit");
-    fGamma->SetXTitle("gamma");
-    fNexNon->SetXTitle("Nex / Non");
-    fSigLiMa->SetXTitle("significance");
-
-    fSigtoBackg->SetXTitle("signa./background ratio");
-    fSigtoBackg->SetYTitle("significance");
-
-    fSigDegree->SetXTitle("order of polynomial");
-    fSigDegree->SetYTitle("significance");
-
-    fSigNbins->SetXTitle("number of bins");
-    fSigNbins->SetYTitle("significance");
-
-    fDegree->SetYTitle("Counts");
-    fProb->SetYTitle("Counts");
-    fNdf->SetYTitle("Counts");
-    fGamma->SetYTitle("Counts");
-    fNexNon->SetYTitle("Counts");
-    fSigLiMa->SetYTitle("Counts");
-
-    fSigtoBackg->SetZTitle("Counts");
-    fSigDegree->SetZTitle("Counts");
-    fSigNbins->SetZTitle("Counts");
-}
-
-// --------------------------------------------------------------------------
-//
-// Delete the histograms
-//
-MHSupercuts::~MHSupercuts()
-{
-    delete fDegree;
-    delete fProb;
-    delete fNdf;
-    delete fGamma;
-    delete fNexNon;
-    delete fSigLiMa;
-
-    delete fSigtoBackg;
-    delete fSigDegree;
-    delete fSigNbins;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the histograms from the 'MHFindSignificance' container
-//
-Bool_t MHSupercuts::Fill(const MParContainer *par, const Stat_t w)
-{
-    if (!par)
-    {
-        *fLog << err << "MHSupercuts::Fill: Pointer (!=NULL) expected." << endl;
-        return kFALSE;
-    }
-
-    MHFindSignificance &h = *(MHFindSignificance*)par;
-
-    fDegree    ->Fill(h.GetDegree( ), w);
-    fProb      ->Fill(h.GetProb(),    w);
-    fNdf       ->Fill(h.GetNdf(),     w);
-    fGamma     ->Fill(h.GetGamma(),   w);
-
-    Double_t ratio = h.GetNon()>0.0 ? h.GetNex()/h.GetNon() : 0.0;
-    fNexNon    ->Fill(ratio,          w);
-
-    fSigLiMa   ->Fill(h.GetSigLiMa(), w);
-
-    Double_t sigtobackg = h.GetNbg()!=0.0 ? h.GetNex() / h.GetNbg() : 0.0;
-    fSigtoBackg->Fill(sigtobackg,    h.GetSigLiMa(), w);
-
-    fSigDegree ->Fill(h.GetDegree(), h.GetSigLiMa(), w);
-    fSigNbins  ->Fill(h.GetMbins(),  h.GetSigLiMa(), w);
-
-    return kTRUE;
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Creates a new canvas and draws the two histograms into it.
-// Be careful: The histograms belongs to this object and won't get deleted
-// together with the canvas.
-//
-void MHSupercuts::Draw(Option_t *)
-{
-  //TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
-  //pad->SetBorderMode(0);
-  //AppendPad("");
-
-    TCanvas *pad = new TCanvas("Supercuts", "Supercut plots", 900, 900);
-    gROOT->SetSelectedPad(NULL);
-
-    pad->Divide(3, 3);
-
-    pad->cd(1);
-    gPad->SetBorderMode(0);
-    fDegree->Draw();
-
-    pad->cd(2);
-    gPad->SetBorderMode(0);
-    fProb->Draw();
-
-    pad->cd(3);
-    gPad->SetBorderMode(0);
-    fNdf->Draw();
-
-    pad->cd(4);
-    gPad->SetBorderMode(0);
-    fGamma->Draw();
-
-    pad->cd(5);
-    gPad->SetBorderMode(0);
-    fNexNon->Draw();
-
-    pad->cd(6);
-    gPad->SetBorderMode(0);
-    fSigLiMa->Draw();
-
-    pad->cd(7);
-    gPad->SetBorderMode(0);
-    fSigtoBackg->Draw();
-
-    pad->cd(8);
-    gPad->SetBorderMode(0);
-    fSigDegree->Draw();
-
-    pad->cd(9);
-    gPad->SetBorderMode(0);
-    fSigNbins->Draw();
-
-    pad->Modified();
-    pad->Update();
-}
Index: trunk/MagicSoft/Mars/mhist/MHSupercuts.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHSupercuts.h	(revision 6926)
+++ 	(revision )
@@ -1,42 +1,0 @@
-#ifndef MARS_MHSupercuts
-#define MARS_MHSupercuts
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-class TH1F;
-class TH2F;
-
-class MHSupercuts : public MH
-{
-private:
-    TH1F *fDegree;     // order of polynomial for background fit
-    TH1F *fProb;       // chi2 probability of polynomial fit
-    TH1F *fNdf;        // NDF of polynomial fit
-    TH1F *fGamma;      // Nbg = gamma * Noff
-    TH1F *fNexNon;     // no.of excess events / no.of events in signal region 
-    TH1F *fSigLiMa;    // significance of gamma signal
-
-    TH2F *fSigtoBackg; // significance vs signal to background ratio (Nex/Nbg)
-    TH2F *fSigDegree;  // significance vs order of polynomial
-    TH2F *fSigNbins;   // significance vs number of bins
-
-
-public:
-    MHSupercuts(const char *name=NULL, const char *title=NULL);
-    ~MHSupercuts();
-
-    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
-
-    void Draw(Option_t *opt=NULL);
-
-    ClassDef(MHSupercuts, 1) // Container which holds histograms for the supercuts
-};
-
-#endif
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mhist/MHThetabarTheta.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHThetabarTheta.cc	(revision 6926)
+++ 	(revision )
@@ -1,121 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Wolfgang Wittek 1/2002 <mailto:wittek@mppmu.mpg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2002
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHThetabarTheta                                                         //
-//                                                                          //
-//  calculates the average Theta for different bins in Theta                //
-//                                                                          //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "MHThetabarTheta.h"
-
-#include <TCanvas.h>
-
-#include "MMcEvt.hxx"
-
-#include "MBinning.h"
-#include "MParList.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MHThetabarTheta);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Default Constructor. It sets name and title of the histogram.
-//
-MHThetabarTheta::MHThetabarTheta(const char *name, const char *title)
-    : fHist()
-{
-    //
-    //   set the name and title of this object
-    //
-    fName  = name  ? name  : "MHThetabarTheta";
-    fTitle = title ? title : "1-D profile histogram Thetabar vs. Theta";
-
-    fHist.SetDirectory(NULL);
-
-    fHist.SetXTitle("\\Theta [\\circ]");
-    fHist.SetYTitle("\\bar{\\Theta} [ \\circ]");
-}
-
-// --------------------------------------------------------------------------
-//
-// Set the binnings and prepare the filling of the histogram
-//
-Bool_t MHThetabarTheta::SetupFill(const MParList *plist)
-{
-    fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt");
-    if (!fMcEvt)
-    {
-        *fLog << err << dbginf << "MMcEvt not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    const MBinning* binstheta = (MBinning*)plist->FindObject("BinningTheta");
-    if (!binstheta )
-    {
-        *fLog << err << dbginf << "At least one MBinning not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    SetBinning(&fHist, binstheta);
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw the histogram
-//
-void MHThetabarTheta::Draw(Option_t *opt)
-{
-    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
-    pad->SetBorderMode(0);
-
-    AppendPad("");
-
-    fHist.Draw(opt);
-
-    pad->Modified();
-    pad->Update();
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the histogram
-//
-Bool_t MHThetabarTheta::Fill(const MParContainer *par, const Stat_t w)
-{
-    const Double_t theta = fMcEvt->GetTelescopeTheta()*kRad2Deg;
-
-    fHist.Fill(theta, theta, w);
-
-    return kTRUE;
-}
Index: trunk/MagicSoft/Mars/mhist/MHThetabarTheta.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHThetabarTheta.h	(revision 6926)
+++ 	(revision )
@@ -1,52 +1,0 @@
-#ifndef MARS_MHThetabarTheta
-#define MARS_MHThetabarTheta
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-#ifndef ROOT_TProfile
-#include <TProfile.h>
-#endif
-
-class MTime;
-class MMcEvt;
-
-class MParList;
-
-class MHThetabarTheta : public MH
-{
-private:
-    MTime   *fTime;   //!
-    MMcEvt  *fMcEvt;  //!
-
-    TProfile fHist;
-
-public:
-    MHThetabarTheta(const char *name=NULL, const char *title=NULL);
-
-    Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
-
-    const TProfile *GetHist() { return &fHist; }
-    const TProfile *GetHist() const { return &fHist; }
-
-    TH1 *GetHistByName(const TString name) { return &fHist; }
-
-    void Draw(Option_t *option="");
-
-    ClassDef(MHThetabarTheta, 0) //Profile histogram Thetabar vs. time
-
-};
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mhist/MHThetabarTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHThetabarTime.cc	(revision 6926)
+++ 	(revision )
@@ -1,127 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Wolfgang Wittek 3/2002 <mailto:wittek@mppmu.mpg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2002
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHThetabarTime                                                          //
-//                                                                          //
-//  calculates the average Theta for different bins in time                 //
-//                                                                          //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "MHThetabarTime.h"
-
-#include <TCanvas.h>
-
-#include "MTime.h"
-#include "MMcEvt.hxx"
-
-#include "MBinning.h"
-#include "MParList.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MHThetabarTime);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Default Constructor. It sets name and title of the histogram.
-//
-MHThetabarTime::MHThetabarTime(const char *name, const char *title)
-    : fHist()
-{
-    //
-    //   set the name and title of this object
-    //
-    fName  = name  ? name  : "MHThetabarTime";
-    fTitle = title ? title : "1-D profile histogram Thetabar vs. time";
-
-    fHist.SetDirectory(NULL);
-
-    fHist.SetXTitle("t [s]");
-    fHist.SetYTitle("\\bar{\\Theta} [ \\circ]");
-}
-
-// --------------------------------------------------------------------------
-//
-// Set the binnings and prepare the filling of the histogram
-//
-Bool_t MHThetabarTime::SetupFill(const MParList *plist)
-{
-    fTime = (MTime*)plist->FindObject("MTime");
-    if (!fTime)
-    {
-        *fLog << err << dbginf << "MTime not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt");
-    if (!fMcEvt)
-    {
-       *fLog << err << dbginf << "MMcEvt not found... aborting." << endl;
-       return kFALSE;
-    }
-
-    const MBinning* binstime  = (MBinning*)plist->FindObject("BinningTime");
-    if (!binstime )
-    {
-        *fLog << err << dbginf << "At least one MBinning not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    SetBinning(&fHist, binstime);
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw the histogram
-//
-void MHThetabarTime::Draw(Option_t *opt)
-{
-    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
-    pad->SetBorderMode(0);
-
-    AppendPad("");
-
-    fHist.Draw(opt);
-
-    pad->Modified();
-    pad->Update();
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the histogram
-//
-Bool_t MHThetabarTime::Fill(const MParContainer *par, const Stat_t w)
-{
-    fHist.Fill(*fTime, fMcEvt->GetTheta()*kRad2Deg, w);
-
-    return kTRUE;
-}
Index: trunk/MagicSoft/Mars/mhist/MHThetabarTime.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHThetabarTime.h	(revision 6926)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#ifndef MARS_MHThetabarTime
-#define MARS_MHThetabarTime
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-#ifndef ROOT_TProfile
-#include "TProfile.h"
-#endif
-#ifndef ROOT_TH2
-#include "TH2.h"
-#endif
-
-class MTime;
-class MMcEvt;
-
-class MParList;
-
-class MHThetabarTime : public MH
-{
-private:
-    MTime  *fTime;   //!
-    MMcEvt *fMcEvt;
-
-    TProfile   fHist;
-
-public:
-    MHThetabarTime(const char *name=NULL, const char *title=NULL);
-
-    Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
-
-    const TProfile *GetHist() { return &fHist; }
-    const TProfile *GetHist() const { return &fHist; }
-
-    TH1 *GetHistByName(const TString name) { return &fHist; }
-
-    void Draw(Option_t *option="");
-
-    ClassDef(MHThetabarTime, 0) //Profile histogram Thetabar vs. time
-
-};
-
-#endif
Index: trunk/MagicSoft/Mars/mhist/MHTrigLvl0.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHTrigLvl0.cc	(revision 6926)
+++ 	(revision )
@@ -1,234 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Abelardo Moralejo 06/2003 <mailto:moralejo@pd.infn.it>
-!
-!   Copyright: MAGIC Software Development, 2000-2003
-!
-!
-\* ======================================================================== */
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// MHTrigLvl0
-//
-// This is intended to be a sort of "level 0 trigger display". What it really
-// does is to store the number of events of a data file in which each pixel 
-// has gone above a given threshold (fPixelThreshold) which is chosen when
-// calling the constructor. Displaying a camera view with these values can
-// help identify noisy pixels. See the macro pixfixrate.C to see an example
-// of its use. Many things are to be fixed. Only inner pixels are shown now
-// (which are anyhow those involved in the trigger), and the camera geometry
-// (number of pixels, and how many inner ones) is not yet read from the input 
-// file. 
-// The "pedestal" we are using is just the signal in the first ADC slice 
-// (seems reasonable from the inspection of the available test data files).
-//
-//
-/////////////////////////////////////////////////////////////////////////////
-#include "MHTrigLvl0.h"
-
-#include <TCanvas.h>
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include "MParList.h"
-#include "MRawEvtData.h"
-#include "MRawEvtPixelIter.h"
-#include "MCamDisplay.h"
-
-#include "MGeomCam.h"
-#include "MGeomPix.h"
-
-ClassImp(MHTrigLvl0);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Reset all pixels to 0 and reset fEntries to 0.
-//
-void MHTrigLvl0::Clear()
-{
-    fSum.Reset();
-    for (int i=0; i<577; i++)
-    {
-        fSum.AddPixel(i, 0, 0);
-        fSum[i].SetPixelUnused();
-    }
-    fSum.FixSize();
-    fEntries = 0;
-}
-
-// --------------------------------------------------------------------------
-//
-// Initialize the name and title of the task.
-// Resets the sum histogram
-//
-MHTrigLvl0::MHTrigLvl0(const Float_t pixelthreshold, 
-		       const char *name, const char *title)
-    : fCam(NULL), fRawEvt(NULL), fDispl(NULL)
-{
-    //
-    //   set the name and title of this object
-    //
-    fName  = name  ? name  : "MHTrigLvl0";
-    fTitle = title ? title : "Number of hits above per pixel";
-    fPixelThreshold = pixelthreshold;
-
-    Clear();
-}
-
-// --------------------------------------------------------------------------
-//
-// Delete the corresponding camera display if available
-//
-MHTrigLvl0::~MHTrigLvl0()
-{
-    if (fDispl)
-        delete fDispl;
-}
-
-// --------------------------------------------------------------------------
-//
-// Get the event (MRawEvtData) the histogram might be filled with. If
-// it is not given, it is assumed, that it is filled with the argument
-// of the Fill function.
-// Looks for the camera geometry MGeomCam and resets the sum histogram.
-//
-Bool_t MHTrigLvl0::SetupFill(const MParList *plist)
-{
-    fRawEvt = (MRawEvtData*)plist->FindObject("MRawEvtData");
-    if (!fRawEvt)
-    {
-        *fLog << dbginf << "MRawEvtData not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    fCam = (MGeomCam*)plist->FindObject("MGeomCam");
-    if (!fCam)
-        *fLog << warn << GetDescriptor() << ": No MGeomCam found." << endl;
-
-    Clear();
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the histograms with data from a MCerPhotEvt-Container.
-//
-Bool_t MHTrigLvl0::Fill(const MParContainer *par, const Stat_t w)
-{
-    MRawEvtData *rawevt = par ? (MRawEvtData*) par : fRawEvt;
-    if (!rawevt)
-    {
-        *fLog << err << dbginf << "No MRawEvtData found..." << endl;
-        return kFALSE;
-    }
-
-    MRawEvtPixelIter pixel(rawevt);
-
-    while(pixel.Next())
-    {
-      const UInt_t pixid = pixel.GetPixelId();
-
-      // FIXME: number of inner pixels should be read from file
-      if (pixid > 396)
-	break;
-      if (pixid == 0)
-	continue;
-
-      fSum[pixid].SetPixelUsed();
-
-      //
-      // FIXME: we now use as "pedestal" the value of the first ADC slice!
-      //
-      Float_t baseline = rawevt->GetNumHiGainSamples() *
-	pixel.GetHiGainSamples()[0];
-
-      Float_t pixel_signal = pixel.GetSumHiGainSamples() - baseline;
-
-      Float_t pixel_is_on = ( pixel_signal > fPixelThreshold)? 1. : 0.;
-
-      fSum[pixid].AddNumPhotons(pixel_is_on);
-    }
-
-    fEntries++;
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Set to Unused outer pixels.
-//
-Bool_t MHTrigLvl0::Finalize()
-{
-  //
-  // Show only pixels in the inner region of the camera:
-  // (otherwise, problem with the too different ranges) 
-  //
-  for (Int_t i=0; i<577; i++)
-    // FIXME: read number of total and inner pixels from file
-    {
-      if (i > 396)
-	fSum[i].SetPixelUnused();
-    }
-
-  //  fSum.Scale(fEntries); Now disabled, scale was not readable otherwise.
-
-  return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw the present 'fill status'
-//
-void MHTrigLvl0::Draw(Option_t *)
-{
-    if (!fCam)
-    {
-        *fLog << warn << "WARNING - Cannot draw " << GetDescriptor() << ": No Camera Geometry available." << endl;
-        return;
-    }
-
-    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this, 750, 600);
-    pad->SetBorderMode(0);
-
-    AppendPad("");
-}
-
-// --------------------------------------------------------------------------
-//
-// If a camera display is not yet assigned, assign a new one.
-//
-void MHTrigLvl0::Paint(Option_t *option)
-{
-    if (!fCam)
-    {
-        *fLog << warn << "WARNING - Cannot paint " << GetDescriptor() << ": No Camera Geometry available." << endl;
-        return;
-    }
-
-    if (!fDispl)
-        fDispl = new MCamDisplay(fCam);
-
-    fDispl->Fill(fSum);
-    fDispl->Paint();
-}
Index: trunk/MagicSoft/Mars/mhist/MHTrigLvl0.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHTrigLvl0.h	(revision 6926)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#ifndef MARS_MHTrigLvl0
-#define MARS_MHTrigLvl0
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-#ifndef MARS_MCerPhotEvt
-#include "MCerPhotEvt.h"
-#endif
-
-class TH1D;
-class MCamDisplay;
-class MRawEvtData;
-
-class MHTrigLvl0 : public MH
-{
-private:
-    MCerPhotEvt  fSum;            // storing the sum of triggers
-    Int_t        fEntries;        // number of entries in the histogram
-    MGeomCam    *fCam;            // the present geometry
-    MRawEvtData *fRawEvt;         //! ADC info of the current event
-    MCamDisplay *fDispl;          //! the camera display
-    Float_t      fPixelThreshold; // Threshold (ADC counts a.p.) to consider
-                                  // a pixel as "fired".
-
-public:
-    MHTrigLvl0(const Float_t pixelthreshold = 0, 
-	       const char *name=NULL, const char *title=NULL);
-    ~MHTrigLvl0();
-
-    void Clear();
-
-    Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
-    Bool_t Finalize();
-
-    const MCerPhotEvt &GetSum() const { return fSum; }
-
-    void Draw(Option_t *opt="");
-    void Paint(Option_t *option="");
-
-    ClassDef(MHTrigLvl0, 1) // Histogram to sum level 0 triggers in all pixels
-};
-
-#endif
