Index: trunk/MagicSoft/Mars/mhist/HistLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/HistLinkDef.h	(revision 1936)
+++ trunk/MagicSoft/Mars/mhist/HistLinkDef.h	(revision 1940)
@@ -20,7 +20,4 @@
 #pragma link C++ class MHCerPhotEvt+;
 
-#pragma link C++ class MHHillas+;
-#pragma link C++ class MHHillasSrc+;
-#pragma link C++ class MHHillasExt+;
 #pragma link C++ class MHStarMap+;
 #pragma link C++ class MHEnergyTime+;
@@ -59,17 +56,3 @@
 #pragma link C++ class MHMcTriggerLvl2+;
 
-#pragma link C++ class MHNewImagePar+;
-
 #endif
-
-
-
-
-
-
-
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mhist/MHHillas.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHillas.cc	(revision 1936)
+++ 	(revision )
@@ -1,388 +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  2001 <mailto:tbretz@uni-sw.gwdg.de>
-!              Wolfgang Wittek  2002 <mailto:wittek@mppmu.mpg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2002
-!
-!
-\* ======================================================================== */
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// MHHillas
-//
-// This class contains histograms for the source independent image parameters
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#include "MHHillas.h"
-
-#include <math.h>
-
-#include <TH1.h>
-#include <TH2.h>
-#include <TPad.h>
-#include <TStyle.h>
-#include <TCanvas.h>
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include "MParList.h"
-
-#include "MHillas.h"
-#include "MGeomCam.h"
-#include "MBinning.h"
-
-
-ClassImp(MHHillas);
-
-// --------------------------------------------------------------------------
-//
-// Setup four histograms for Width, Length
-//
-MHHillas::MHHillas(const char *name, const char *title)
-    : fMm2Deg(1), fUseMmScale(kTRUE)
-{
-    //
-    //   set the name and title of this object
-    //
-    fName  = name  ? name  : "MHHillas";
-    fTitle = title ? title : "Source independent image parameters";
-
-    fLength  = new TH1F("Length",  "Length of Ellipse",               100,   0, 296.7);
-    fWidth   = new TH1F("Width",   "Width of Ellipse",                100,   0, 296.7);
-    fDistC   = new TH1F("DistC",   "Distance from center of camera",  100,   0, 445);
-    fDelta   = new TH1F("Delta",   "Angle (Main axis - x-axis)",      101, -90,  90);
-    fUsedPix = new TH1F("UsedPix", "Number of used pixels",           150,   0, 150);
-    fCorePix = new TH1F("CorePix", "Number of core pixels",           150,   0, 150);
-
-    fLength->SetLineColor(kBlue);
-    fCorePix->SetLineColor(kRed);
-    fUsedPix->SetLineColor(kGreen);
-
-    fLength->SetDirectory(NULL);
-    fWidth->SetDirectory(NULL);
-    fDistC->SetDirectory(NULL);
-    fDelta->SetDirectory(NULL);
-    fUsedPix->SetDirectory(NULL);
-    fCorePix->SetDirectory(NULL);
-
-    fLength->SetXTitle("Length [mm]");
-    fWidth->SetXTitle("Width [mm]");
-    fDistC->SetXTitle("Distance [mm]");
-    fDelta->SetXTitle("Delta [\\circ]");
-    fUsedPix->SetXTitle("Number of Pixels");
-    fCorePix->SetXTitle("Number of Pixels");
-
-    fLength->SetYTitle("Counts");
-    fWidth->SetYTitle("Counts");
-    fDistC->SetYTitle("Counts");
-    fDelta->SetYTitle("Counts");
-    fUsedPix->SetYTitle("Counts");
-    fCorePix->SetYTitle("Counts");
-
-    MBinning bins;
-    bins.SetEdgesLog(50, 1, 1e7);
-
-    fSize  = new TH1F;
-    fSize->SetName("Size");
-    fSize->SetTitle("Number of Photons");
-    fSize->SetDirectory(NULL);
-    fSize->SetXTitle("Size");
-    fSize->SetYTitle("Counts");
-    fSize->GetXaxis()->SetTitleOffset(1.2);
-    fSize->GetXaxis()->SetLabelOffset(-0.015);
-
-    bins.Apply(*fSize);
-
-    fCenter = new TH2F("Center", "Center of Ellipse", 51, -445, 445, 51, -445, 445);
-    fCenter->SetDirectory(NULL);
-    fCenter->SetXTitle("x [mm]");
-    fCenter->SetYTitle("y [mm]");
-    fCenter->SetZTitle("Counts");
-}
-
-// --------------------------------------------------------------------------
-//
-// Delete the histograms
-//
-MHHillas::~MHHillas()
-{
-    delete fLength;
-    delete fWidth;
-
-    delete fDistC;
-    delete fDelta;
-
-    delete fSize;
-    delete fCenter;
-
-    delete fUsedPix;
-    delete fCorePix;
-}
-
-// --------------------------------------------------------------------------
-//
-// Setup the Binning for the histograms automatically if the correct
-// instances of MBinning (with the names 'BinningWidth' and 'BinningLength')
-// are found in the parameter list
-// Use this function if you want to set the conversion factor which
-// is used to convert the mm-scale in the camera plain into the deg-scale
-// used for histogram presentations. The conversion factor is part of
-// the camera geometry. Please create a corresponding MGeomCam container.
-//
-Bool_t MHHillas::SetupFill(const MParList *plist)
-{
-    const MGeomCam *geom = (MGeomCam*)plist->FindObject("MGeomCam");
-    if (!geom)
-        *fLog << warn << GetDescriptor() << ": No Camera Geometry available. Using mm-scale for histograms." << endl;
-    else
-    {
-        fMm2Deg = geom->GetConvMm2Deg();
-        SetMmScale(kFALSE);
-    }
-
-    ApplyBinning(*plist, "Width",  fWidth);
-    ApplyBinning(*plist, "Length", fLength);
-    ApplyBinning(*plist, "Dist",   fDistC);
-    ApplyBinning(*plist, "Delta",  fDelta);
-    ApplyBinning(*plist, "Size",   fSize);
-    ApplyBinning(*plist, "Pixels", fUsedPix);
-    ApplyBinning(*plist, "Pixels", fCorePix);
-
-    const MBinning *bins = (MBinning*)plist->FindObject("BinningCamera");
-    if (!bins)
-    {
-        float r = geom ? geom->GetMaxRadius() : 600;
-        r *= 0.9;
-        if (!fUseMmScale)
-            r *= fMm2Deg;
-
-        MBinning b;
-        b.SetEdges(61, -r, r);
-        SetBinning(fCenter, &b, &b);
-    }
-    else
-        SetBinning(fCenter, bins, bins);
-
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Use this function to setup your own conversion factor between degrees
-// and millimeters. The conversion factor should be the one calculated in
-// MGeomCam. Use this function with Caution: You could create wrong values
-// by setting up your own scale factor.
-//
-void MHHillas::SetMm2Deg(Float_t mmdeg)
-{
-    if (mmdeg<0)
-    {
-        *fLog << warn << dbginf << "Warning - Conversion factor < 0 - nonsense. Ignored." << endl;
-        return;
-    }
-
-    if (fMm2Deg>=0)
-        *fLog << warn << dbginf << "Warning - Conversion factor already set. Overwriting" << endl;
-
-    fMm2Deg = mmdeg;
-}
-
-// --------------------------------------------------------------------------
-//
-// With this function you can convert the histogram ('on the fly') between
-// degrees and millimeters.
-//
-void MHHillas::SetMmScale(Bool_t mmscale)
-{
-    if (fUseMmScale == mmscale)
-        return;
-
-    if (fMm2Deg<0)
-    {
-        *fLog << warn << dbginf << "Warning - Sorry, no conversion factor for conversion available." << endl;
-        return;
-    }
-
-    const Double_t scale = mmscale ? 1./fMm2Deg : fMm2Deg;
-    MH::ScaleAxis(fLength, scale);
-    MH::ScaleAxis(fWidth,  scale);
-    MH::ScaleAxis(fDistC,  scale);
-    MH::ScaleAxis(fCenter, scale, scale);
-
-    if (mmscale)
-    {
-        fLength->SetXTitle("Length [mm]");
-        fWidth->SetXTitle("Width [mm]");
-        fDistC->SetXTitle("Distance [mm]");
-        fCenter->SetXTitle("x [mm]");
-        fCenter->SetYTitle("y [mm]");
-    }
-    else
-    {
-        fLength->SetXTitle("Length [\\circ]");
-        fWidth->SetXTitle("Width [\\circ]");
-        fDistC->SetXTitle("Distance [\\circ]");
-        fCenter->SetXTitle("x [\\circ]");
-        fCenter->SetYTitle("y [\\circ]");
-    }
-
-    fUseMmScale = mmscale;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the histograms with data from a MHillas-Container.
-// Be careful: Only call this with an object of type MHillas
-//
-Bool_t MHHillas::Fill(const MParContainer *par)
-{
-    const MHillas &h = *(MHillas*)par;
-
-    const Double_t d = sqrt(h.GetMeanX()*h.GetMeanX() + h.GetMeanY()*h.GetMeanY());
-    const Double_t scale = fUseMmScale ? 1 : fMm2Deg;
-
-    fLength ->Fill(scale*h.GetLength());
-    fWidth  ->Fill(scale*h.GetWidth());
-    fDistC  ->Fill(scale*d);
-    fCenter ->Fill(scale*h.GetMeanX(), scale*h.GetMeanY());
-    fDelta  ->Fill(kRad2Deg*h.GetDelta());
-    fSize   ->Fill(h.GetSize());
-    fUsedPix->Fill(h.GetNumUsedPixels());
-    fCorePix->Fill(h.GetNumCorePixels());
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Setup a inversed deep blue sea palette for the fCenter histogram.
-//
-void MHHillas::SetColors() const
-{
-    // FIXME: This must be redone each time the canvas is repainted....
-    gStyle->SetPalette(51, NULL);
-    Int_t c[50];
-    for (int i=0; i<50; i++)
-        c[49-i] = gStyle->GetColorPalette(i);
-    gStyle->SetPalette(50, c);
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw clones of four histograms. So that the object can be deleted
-// and the histograms are still visible in the canvas.
-// The cloned object are deleted together with the canvas if the canvas is
-// destroyed. If you want to handle dostroying the canvas you can get a
-// pointer to it from this function
-//
-TObject *MHHillas::DrawClone(Option_t *opt) const
-{
-    TCanvas *c = MakeDefCanvas(this, 720, 810);
-    c->Divide(2,3);
-
-    gROOT->SetSelectedPad(NULL);
-
-    c->cd(1);
-    DrawCopy(*fWidth, *fLength, "Width / Length");
-
-    c->cd(2);
-    gPad->SetLogx();
-    fSize->DrawCopy();
-
-    c->cd(3);
-    DrawCopy(*fCorePix, *fUsedPix, "Number of core/used Pixels");
-
-    c->cd(4);
-    fDelta->DrawCopy();
-
-    c->cd(5);
-    fDistC->DrawCopy();
-
-    c->cd(6);
-    SetColors();
-    fCenter->DrawCopy("colz");
-
-    c->Modified();
-    c->Update();
-
-    return c;
-}
-
-// --------------------------------------------------------------------------
-//
-// Creates a new canvas and draws the four histograms into it.
-// Be careful: The histograms belongs to this object and won't get deleted
-// together with the canvas.
-//
-void MHHillas::Draw(Option_t *)
-{
-    if (!gPad)
-        MakeDefCanvas(this, 720, 810);
-
-    gPad->Divide(2,3);
-
-    gPad->cd(1);
-    MH::Draw(*fWidth, *fLength, "Width / Length");
-
-    gPad->cd(2);
-    gPad->SetLogx();
-    fSize->Draw();
-
-    gPad->cd(3);
-    MH::Draw(*fCorePix, *fUsedPix, "Number of core/used Pixels");
-
-    gPad->cd(4);
-    fDelta->Draw();
-
-    gPad->cd(5);
-    fDistC->Draw();
-
-    gPad->cd(6);
-    SetColors();
-    fCenter->Draw("colz");
-
-    gPad->Modified();
-    gPad->Update();
-}
-
-TH1 *MHHillas::GetHistByName(const TString name)
-{
-    if (name.Contains("Width", TString::kIgnoreCase))
-        return fWidth;
-    if (name.Contains("Length", TString::kIgnoreCase))
-        return fLength;
-    if (name.Contains("Size", TString::kIgnoreCase))
-        return fSize;
-    if (name.Contains("Core", TString::kIgnoreCase))
-        return fCorePix;
-    if (name.Contains("Used", TString::kIgnoreCase))
-        return fUsedPix;
-    if (name.Contains("Delta", TString::kIgnoreCase))
-        return fDelta;
-    if (name.Contains("DistC", TString::kIgnoreCase))
-        return fDistC;
-    if (name.Contains("Center", TString::kIgnoreCase))
-        return fCenter;
-
-    return NULL;
-}
Index: trunk/MagicSoft/Mars/mhist/MHHillas.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHillas.h	(revision 1936)
+++ 	(revision )
@@ -1,60 +1,0 @@
-#ifndef MARS_MHHillas
-#define MARS_MHHillas
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-class TH1F;
-class TH2F;
-class MHillas;
-
-class MHHillas : public MH
-{
-private:
-
-    TH1F *fLength; //->
-    TH1F *fWidth;  //->
-
-    TH1F *fDistC;  //->
-    TH1F *fDelta;  //->
-
-    TH1F *fSize;   //->
-    TH2F *fCenter; //->
-
-    TH1F *fUsedPix; //->
-    TH1F *fCorePix; //->
-
-    void SetColors() const;
-
-    Float_t fMm2Deg;
-    Bool_t  fUseMmScale;
-
-public:
-    MHHillas(const char *name=NULL, const char *title=NULL);
-    ~MHHillas();
-
-    void SetMmScale(Bool_t mmscale=kTRUE);
-    virtual void SetMm2Deg(Float_t mmdeg);
-
-    Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par);
-
-    TH1 *GetHistByName(const TString name);
-
-    TH1F *GetHistLength() { return fLength; }
-    TH1F *GetHistWidth()  { return fWidth; }
-
-    TH1F *GetHistDistC()  { return fDistC; }
-    TH1F *GetHistDelta()  { return fDelta; }
-
-    TH1F *GetHistSize()   { return fSize; }
-    TH2F *GetHistCenter() { return fCenter; }
-
-    void Draw(Option_t *opt=NULL);
-    TObject *DrawClone(Option_t *opt=NULL) const;
-
-    ClassDef(MHHillas, 1) // Container which holds histograms for the source independent image parameters
-};
-
-#endif
Index: trunk/MagicSoft/Mars/mhist/MHHillasExt.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHillasExt.h	(revision 1936)
+++ 	(revision )
@@ -1,50 +1,0 @@
-#ifndef MARS_MHHillasExt
-#define MARS_MHHillasExt
-
-#ifndef ROOT_TH1
-#include <TH1.h>
-#endif
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-class MHillasExt;
-
-class MHHillasExt : public MH
-{
-private:
-    MHillasExt *fHillasExt; //! Pointer to the MHillasExt container
-
-    TH1F fHConc;    // [ratio] concentration ratio: sum of the two highest pixels / fSize
-    TH1F fHConc1;   // [ratio] concentration ratio: sum of the highest pixel / fSize
-    TH1F fHAsym;    // [mm]    fDist minus dist: center of ellipse, highest pixel
-    TH1F fHM3Long;  // [mm]    3rd moment (e-weighted) along major axis
-    TH1F fHM3Trans; // [mm]    3rd moment (e-weighted) along minor axis
-
-    Float_t fMm2Deg;
-    Bool_t  fUseMmScale;
-
-    TString fHilName;
-
-public:
-    //MHHillasExt(const char *name=NULL, const char *title=NULL);
-    MHHillasExt(const char *name=NULL, const char *title=NULL,
-                const char *hil="MHillas");
-
-    ~MHHillasExt();
-
-    void SetMmScale(Bool_t mmscale=kTRUE);
-    virtual void SetMm2Deg(Float_t mmdeg);
-
-    Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par);
-
-    TH1 *GetHistByName(const TString name);
-
-    void Draw(Option_t *opt=NULL);
-    TObject *DrawClone(Option_t *opt=NULL) const;
-
-    ClassDef(MHHillasExt, 1) // Container which holds histograms for the extended hillas parameters
-};
-
-#endif
Index: trunk/MagicSoft/Mars/mhist/MHHillasSrc.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHillasSrc.cc	(revision 1936)
+++ 	(revision )
@@ -1,286 +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  2001 <mailto:tbretz@uni-sw.gwdg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2001
-!
-!
-\* ======================================================================== */
-
-///////////////////////////////////////////////////////////////////////
-//
-// MHHillasSrc
-//
-// This class contains histograms for every Hillas parameter
-//
-///////////////////////////////////////////////////////////////////////
-#include "MHHillasSrc.h"
-
-#include <math.h>
-
-#include <TH1.h>
-#include <TPad.h>
-#include <TCanvas.h>
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include "MGeomCam.h"
-
-#include "MParList.h"
-
-#include "MHillas.h"
-#include "MHillasSrc.h"
-
-ClassImp(MHHillasSrc);
-
-// --------------------------------------------------------------------------
-//
-// Setup four histograms for Alpha, and Dist
-//
-MHHillasSrc::MHHillasSrc(const char *name, const char *title)
-    : fUseMmScale(kTRUE)
-{
-    //
-    //   set the name and title of this object
-    //
-    fName  = name  ? name  : "MHHillasSrc";
-    fTitle = title ? title : "Container for Hillas histograms";
-
-    //
-    // loop over all Pixels and create two histograms
-    // one for the Low and one for the High gain
-    // connect all the histogram with the container fHist
-    //
-    fAlpha    = new TH1F("Alpha",    "Alpha of Ellipse",            181,  -90,  90);
-    fDist     = new TH1F("Dist",     "Dist of Ellipse",             100,    0, 445);
-    fHeadTail = new TH1F("HeadTail", "HeadTail of Ellipse",         101, -445, 445);
-    fCosDA    = new TH1F("CosDA",    "cos(Delta,Alpha) of Ellipse", 101,   -1,   1);
-
-    fAlpha->SetDirectory(NULL);
-    fDist->SetDirectory(NULL);
-    fHeadTail->SetDirectory(NULL);
-    fCosDA->SetDirectory(NULL);
-
-    fAlpha->SetXTitle("\\alpha [\\circ]");
-    fDist->SetXTitle("Dist [mm]");
-    fHeadTail->SetXTitle("Head-Tail [mm]");
-    fCosDA->SetXTitle("cos(\\delta,\\alpha)");
-
-    fAlpha->SetYTitle("Counts");
-    fDist->SetYTitle("Counts");
-    fHeadTail->SetYTitle("Counts");
-    fCosDA->SetYTitle("Counts");
-}
-
-// --------------------------------------------------------------------------
-//
-// Delete the four histograms
-//
-MHHillasSrc::~MHHillasSrc()
-{
-    delete fAlpha;
-    delete fDist;
-    delete fHeadTail;
-    delete fCosDA;
-}
-
-// --------------------------------------------------------------------------
-//
-// Setup the Binning for the histograms automatically if the correct
-// instances of MBinning (with the names 'BinningAlpha' and 'BinningDist')
-// are found in the parameter list
-// Use this function if you want to set the conversion factor which
-// is used to convert the mm-scale in the camera plain into the deg-scale
-// used for histogram presentations. The conversion factor is part of
-// the camera geometry. Please create a corresponding MGeomCam container.
-//
-Bool_t MHHillasSrc::SetupFill(const MParList *plist)
-{
-    const MGeomCam *geom = (MGeomCam*)plist->FindObject("MGeomCam");
-    if (!geom)
-        *fLog << warn << dbginf << "No Camera Geometry available. Using mm-scale for histograms." << endl;
-    else
-    {
-        fMm2Deg = geom->GetConvMm2Deg();
-        SetMmScale(kFALSE);
-    }
-
-    ApplyBinning(*plist, "Alpha",    fAlpha);
-    ApplyBinning(*plist, "Dist",     fDist);
-    ApplyBinning(*plist, "HeadTail", fHeadTail);
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the four histograms with data from a MHillas-Container.
-// Be careful: Only call this with an object of type MHillas
-//
-Bool_t MHHillasSrc::Fill(const MParContainer *par)
-{
-    const MHillasSrc &h = *(MHillasSrc*)par;
-
-    fAlpha   ->Fill(h.GetAlpha());
-    fDist    ->Fill(fUseMmScale ? h.GetDist() : fMm2Deg*h.GetDist());
-    fHeadTail->Fill(fUseMmScale ? h.GetHeadTail() : fMm2Deg*h.GetHeadTail());
-    fCosDA   ->Fill(h.GetCosDeltaAlpha());
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Use this function to setup your own conversion factor between degrees
-// and millimeters. The conversion factor should be the one calculated in
-// MGeomCam. Use this function with Caution: You could create wrong values
-// by setting up your own scale factor.
-//
-void MHHillasSrc::SetMm2Deg(Float_t mmdeg)
-{
-    if (mmdeg<=0)
-    {
-        *fLog << warn << dbginf << "Warning - Conversion factor <= 0 - nonsense. Ignored." << endl;
-        return;
-    }
-
-    if (fMm2Deg>0)
-        *fLog << warn << dbginf << "Warning - Conversion factor already set. Overwriting" << endl;
-
-    fMm2Deg = mmdeg;
-}
-
-// --------------------------------------------------------------------------
-//
-// With this function you can convert the histogram ('on the fly') between
-// degrees and millimeters.
-//
-void MHHillasSrc::SetMmScale(Bool_t mmscale)
-{
-    if (fUseMmScale == mmscale)
-        return;
-
-    if (fMm2Deg<0)
-    {
-        *fLog << warn << GetDescriptor() << ": Warning - Sorry, no conversion factor for conversion available." << endl;
-        return;
-    }
-
-    const Double_t scale = mmscale ? 1./fMm2Deg : fMm2Deg;
-    MH::ScaleAxis(fDist,     scale);
-    MH::ScaleAxis(fHeadTail, scale);
-
-    if (mmscale)
-    {
-        fDist->SetXTitle("Dist [mm]");
-        fHeadTail->SetXTitle("Head-Tail [mm]");
-    }
-    else
-    {
-        fDist->SetXTitle("Dist [\\circ]");
-        fHeadTail->SetXTitle("Head-Tail [\\circ]");
-    }
-
-    fUseMmScale = mmscale;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw clones of all two histograms. So that the object can be deleted
-// and the histograms are still visible in the canvas.
-// The cloned object are deleted together with the canvas if the canvas is
-// destroyed. If you want to handle dostroying the canvas you can get a
-// pointer to it from this function
-//
-TObject *MHHillasSrc::DrawClone(Option_t *opt) const
-{
-    TCanvas *c = MakeDefCanvas(this, 700, 500);
-    c->Divide(2, 2);
-
-    // FIXME: Display Source position
-
-    gROOT->SetSelectedPad(NULL);
-
-    //
-    // This is necessary to get the expected bahviour of DrawClone
-    //
-    c->cd(1);
-    fAlpha->DrawCopy();
-
-    c->cd(2);
-    fDist->DrawCopy();
-
-    c->cd(3);
-    fHeadTail->DrawCopy();
-
-    c->cd(4);
-    gPad->SetLogy();
-    fCosDA->DrawCopy();
-
-    c->Modified();
-    c->Update();
-
-    return c;
-}
-
-// --------------------------------------------------------------------------
-//
-// 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 MHHillasSrc::Draw(Option_t *)
-{
-    if (!gPad)
-        MakeDefCanvas(this, 700, 500);
-
-    // FIXME: Display Source position
-
-    gPad->Divide(2, 2);
-
-    gPad->cd(1);
-    fAlpha->Draw();
-
-    gPad->cd(2);
-    fDist->Draw();
-
-    gPad->cd(1);
-    fHeadTail->Draw();
-
-    gPad->cd(2);
-    gPad->SetLogy();
-    fCosDA->Draw();
-
-    gPad->Modified();
-    gPad->Update();
-}
-
-TH1 *MHHillasSrc::GetHistByName(const TString name)
-{
-    if (name.Contains("Alpha", TString::kIgnoreCase))
-        return fAlpha;
-    if (name.Contains("Dist", TString::kIgnoreCase))
-        return fDist;
-    if (name.Contains("HeadTail", TString::kIgnoreCase))
-        return fHeadTail;
-    if (name.Contains("CosDA", TString::kIgnoreCase))
-        return fCosDA;
-
-    return NULL;
-}
Index: trunk/MagicSoft/Mars/mhist/MHHillasSrc.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHillasSrc.h	(revision 1936)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#ifndef MARS_MHHillasSrc
-#define MARS_MHHillasSrc
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-class TH1F;
-class MHillas;
-
-class MHHillasSrc : public MH
-{
-private:
-    TH1F *fAlpha;     //->
-    TH1F *fDist;      //->
-    TH1F *fHeadTail;  //->   
-    TH1F *fCosDA;     //->
-
-    Float_t fMm2Deg;
-    Bool_t  fUseMmScale;
-
-public:
-    MHHillasSrc(const char *name=NULL, const char *title=NULL);
-    ~MHHillasSrc();
-
-    void SetMmScale(Bool_t mmscale=kTRUE);
-    void SetMm2Deg(Float_t mmdeg);
-
-    Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par);
-
-    TH1 *GetHistByName(const TString name);
-
-    TH1F *GetHistAlpha()         { return fAlpha; }
-    TH1F *GetHistDist()          { return fDist; }
-    TH1F *GetHistHeadTail()      { return fHeadTail; }
-    TH1F *GetHistCosDeltaAlpha() { return fCosDA; }
-
-    void Draw(Option_t *opt=NULL);
-    TObject *DrawClone(Option_t *opt=NULL) const;
-
-    ClassDef(MHHillasSrc, 1) // Container which holds histograms for the source dependant parameters
-};
-
-#endif
Index: trunk/MagicSoft/Mars/mhist/MHNewImagePar.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHNewImagePar.cc	(revision 1936)
+++ 	(revision )
@@ -1,256 +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  03/2003   <mailto:wittek@mppmu.mpg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2003
-!
-!
-\* ======================================================================== */
-
-///////////////////////////////////////////////////////////////////////
-//
-// MHNewImagePar
-//
-// This class contains histograms for every Hillas parameter
-//
-///////////////////////////////////////////////////////////////////////
-#include "MHNewImagePar.h"
-
-#include <math.h>
-
-#include <TH1.h>
-#include <TPad.h>
-#include <TCanvas.h>
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include "MGeomCam.h"
-
-#include "MParList.h"
-
-#include "MHillas.h"
-#include "MNewImagePar.h"
-
-ClassImp(MHNewImagePar);
-
-// --------------------------------------------------------------------------
-//
-// Setup histograms 
-//
-MHNewImagePar::MHNewImagePar(const char *name, const char *title)
-    : fUseMmScale(kTRUE)
-{
-    fName  = name  ? name  : "MHNewImagePar";
-    fTitle = title ? title : "Container for histograms of new image parameters";
-
-    fLeakage1 = new TH1F("Leakage1", "Leakage1", 100, 0.0, 1.0);
-    fLeakage1->SetDirectory(NULL);
-    fLeakage1->SetXTitle("Leakage1");
-    fLeakage1->SetYTitle("Counts");
-
-    fLeakage2 = new TH1F("Leakage2", "Leakage2", 100, 0.0, 1.0);
-    fLeakage2->SetDirectory(NULL);
-    fLeakage2->SetXTitle("Leakage2");
-    fLeakage2->SetYTitle("Counts");
-}
-
-// --------------------------------------------------------------------------
-//
-// Delete the four histograms
-//
-MHNewImagePar::~MHNewImagePar()
-{
-    delete fLeakage1;
-    delete fLeakage2;
-}
-
-// --------------------------------------------------------------------------
-//
-// Setup the Binning for the histograms automatically if the correct
-// instances of MBinning (with the names 'BinningAlpha' and 'BinningDist')
-// are found in the parameter list
-// Use this function if you want to set the conversion factor which
-// is used to convert the mm-scale in the camera plain into the deg-scale
-// used for histogram presentations. The conversion factor is part of
-// the camera geometry. Please create a corresponding MGeomCam container.
-//
-Bool_t MHNewImagePar::SetupFill(const MParList *plist)
-{
-    const MGeomCam *geom = (MGeomCam*)plist->FindObject("MGeomCam");
-    if (!geom)
-        *fLog << warn << dbginf << "No Camera Geometry available. Using mm-scale for histograms." << endl;
-    else
-    {
-        fMm2Deg = geom->GetConvMm2Deg();
-        SetMmScale(kFALSE);
-    }
-
-    //ApplyBinning(*plist, "Alpha",    fAlpha);
-    //ApplyBinning(*plist, "Dist",     fDist);
-    //ApplyBinning(*plist, "HeadTail", fHeadTail);
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Fill the histograms with data from a MNewImagePar container.
-//
-Bool_t MHNewImagePar::Fill(const MParContainer *par)
-{
-    const MNewImagePar &h = *(MNewImagePar*)par;
-
-    fLeakage1->Fill(h.GetLeakage1());
-    fLeakage2->Fill(h.GetLeakage2());
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Use this function to setup your own conversion factor between degrees
-// and millimeters. The conversion factor should be the one calculated in
-// MGeomCam. Use this function with Caution: You could create wrong values
-// by setting up your own scale factor.
-//
-void MHNewImagePar::SetMm2Deg(Float_t mmdeg)
-{
-    if (mmdeg<=0)
-    {
-        *fLog << warn << dbginf << "Warning - Conversion factor <= 0 - nonsense. Ignored." << endl;
-        return;
-    }
-
-    if (fMm2Deg>0)
-        *fLog << warn << dbginf << "Warning - Conversion factor already set. Overwriting" << endl;
-
-    fMm2Deg = mmdeg;
-}
-
-// --------------------------------------------------------------------------
-//
-// With this function you can convert the histogram ('on the fly') between
-// degrees and millimeters.
-//
-void MHNewImagePar::SetMmScale(Bool_t mmscale)
-{
-    if (fUseMmScale == mmscale)
-        return;
-
-    if (fMm2Deg<0)
-    {
-        *fLog << warn << GetDescriptor() << ": Warning - Sorry, no conversion factor for conversion available." << endl;
-        return;
-    }
-
-    //const Double_t scale = mmscale ? 1./fMm2Deg : fMm2Deg;
-    //MH::ScaleAxis(fDist,     scale);
-    //MH::ScaleAxis(fHeadTail, scale);
-
-    if (mmscale)
-    {
-      //    fDist->SetXTitle("Dist [mm]");
-      //    fHeadTail->SetXTitle("Head-Tail [mm]");
-    }
-    else
-    {
-      //    fDist->SetXTitle("Dist [\\circ]");
-      //    fHeadTail->SetXTitle("Head-Tail [\\circ]");
-    }
-
-    fUseMmScale = mmscale;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw clones of all two histograms. So that the object can be deleted
-// and the histograms are still visible in the canvas.
-// The cloned object are deleted together with the canvas if the canvas is
-// destroyed. If you want to handle dostroying the canvas you can get a
-// pointer to it from this function
-//
-TObject *MHNewImagePar::DrawClone(Option_t *opt) const
-{
-    TCanvas *c = MakeDefCanvas(this, 300, 600);
-    c->Divide(1, 2);
-
-    gROOT->SetSelectedPad(NULL);
-
-    c->cd(1);
-    fLeakage1->DrawCopy();
-
-    c->cd(2);
-    fLeakage2->DrawCopy();
-
-    c->Modified();
-    c->Update();
-
-    return c;
-}
-
-// --------------------------------------------------------------------------
-//
-// 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 MHNewImagePar::Draw(Option_t *)
-{
-    if (!gPad)
-        MakeDefCanvas(this, 300, 600);
-
-    gPad->Divide(2, 2);
-
-    gPad->cd(1);
-    fLeakage1->Draw();
-
-    gPad->cd(2);
-    fLeakage2->Draw();
-
-    gPad->Modified();
-    gPad->Update();
-}
-
-TH1 *MHNewImagePar::GetHistByName(const TString name)
-{
-    if (name.Contains("Leakage1", TString::kIgnoreCase))
-        return fLeakage1;
-
-    if (name.Contains("Leakage2", TString::kIgnoreCase))
-        return fLeakage2;
-
-    return NULL;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mhist/MHNewImagePar.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHNewImagePar.h	(revision 1936)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#ifndef MARS_MHNewImagePar
-#define MARS_MHNewImagePar
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-class TH1F;
-class MHillas;
-
-class MHNewImagePar : public MH
-{
-private:
-    TH1F *fLeakage1;     //->
-    TH1F *fLeakage2;     //->
-
-    Float_t fMm2Deg;
-    Bool_t  fUseMmScale;
-
-public:
-    MHNewImagePar(const char *name=NULL, const char *title=NULL);
-    ~MHNewImagePar();
-
-    void SetMmScale(Bool_t mmscale=kTRUE);
-    void SetMm2Deg(Float_t mmdeg);
-
-    Bool_t SetupFill(const MParList *pList);
-    Bool_t Fill(const MParContainer *par);
-
-    TH1 *GetHistByName(const TString name);
-
-    TH1F *GetHistLeakage1()         { return fLeakage1; }
-    TH1F *GetHistLeakage2()         { return fLeakage2; }
-
-    void Draw(Option_t *opt=NULL);
-    TObject *DrawClone(Option_t *opt=NULL) const;
-
-    ClassDef(MHNewImagePar, 1) // Container which holds histograms for the new image parameters
-};
-
-#endif
-
-
Index: trunk/MagicSoft/Mars/mhist/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mhist/Makefile	(revision 1936)
+++ trunk/MagicSoft/Mars/mhist/Makefile	(revision 1940)
@@ -23,5 +23,5 @@
 #
 INCLUDES = -I. -I../mbase -I../mraw -I../manalysis -I../mmc \
-	   -I../mgui -I../mgeom -I../mdata -I../mfilter
+	   -I../mgui -I../mgeom -I../mdata -I../mfilter -I../mimage
 
 #------------------------------------------------------------------------------
@@ -38,7 +38,4 @@
            MHFadcPix.cc \
            MHFadcCam.cc \
-           MHHillas.cc \
-           MHHillasSrc.cc \
-           MHHillasExt.cc \
            MHStarMap.cc \
            MHEnergyTime.cc \
@@ -69,5 +66,4 @@
 	   MHSigmaPixel.cc \
 	   MHSigmabarTheta.cc \
-	   MHNewImagePar.cc \
 	   MHSigmaTheta.cc \
 	   MHMcCT1CollectionArea.cc \
