Index: trunk/MagicSoft/Mars/mhist/MBinning.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MBinning.cc	(revision 1463)
+++ trunk/MagicSoft/Mars/mhist/MBinning.cc	(revision 1465)
@@ -31,4 +31,6 @@
 #include "MBinning.h"
 
+#include "MH.h"
+
 ClassImp(MBinning);
 
@@ -49,2 +51,7 @@
 }
 
+
+void MBinning::Apply(TH1 &h)
+{
+    MH::SetBinning(&h, this);
+}
Index: trunk/MagicSoft/Mars/mhist/MBinning.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MBinning.h	(revision 1463)
+++ trunk/MagicSoft/Mars/mhist/MBinning.h	(revision 1465)
@@ -10,4 +10,6 @@
 #endif
 
+class TH1;
+
 class MBinning : public MParContainer
 {
@@ -20,9 +22,5 @@
     void SetEdges(const TArrayD &arr)
     {
-        fEdges = arr;/*
-        const Int_t nbins = arr.GetSize();
-        fEdges.Set(nbins);
-        for (int i=0; i<nbins; i++)
-            fEdges[i] = (*(TArrayD*)(&arr))[i];*/
+        fEdges = arr;
     }
 
@@ -54,4 +52,6 @@
     Double_t *GetEdges() const { return fEdges.GetArray(); }
 
+    void Apply(TH1 &);
+
     ClassDef(MBinning, 1) //Container to store the binning of a histogram
 };
Index: trunk/MagicSoft/Mars/mhist/MHHillas.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHillas.cc	(revision 1463)
+++ trunk/MagicSoft/Mars/mhist/MHHillas.cc	(revision 1465)
@@ -99,5 +99,5 @@
     fSize->GetXaxis()->SetLabelOffset(-0.015);
 
-    MH::SetBinning(fSize, &bins);
+    bins.Apply(*fSize);
 
     fCenter = new TH2F("Center", "Center of Ellipse", 51, -445, 445, 51, -445, 445);
@@ -138,5 +138,5 @@
     const MGeomCam *geom = (MGeomCam*)plist->FindObject("MGeomCam");
     if (!geom)
-        *fLog << warn << dbginf << "No Camera Geometry available. Using mm-scale for histograms." << endl;
+        *fLog << warn << GetDescriptor() << ": No Camera Geometry available. Using mm-scale for histograms." << endl;
     else
     {
Index: trunk/MagicSoft/Mars/mhist/MHHillasExt.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHillasExt.cc	(revision 1463)
+++ trunk/MagicSoft/Mars/mhist/MHHillasExt.cc	(revision 1465)
@@ -43,6 +43,10 @@
 
 #include "MGeomCam.h"
+
 #include "MParList.h"
+
+#include "MBinning.h"
 #include "MHillasExt.h"
+#include "MHillasSrc.h"
 
 ClassImp(MHHillasExt);
@@ -88,4 +92,18 @@
     fHM3Long.SetYTitle("Counts");
     fHM3Trans.SetYTitle("Counts");
+
+
+    MBinning bins;
+
+    bins.SetEdges(100, 0, 1);
+    bins.Apply(fHConc);
+    bins.Apply(fHConc1);
+
+    bins.SetEdges(101, -326, 326);
+    bins.Apply(fHM3Long);
+    bins.Apply(fHM3Trans);
+
+    bins.SetEdges(89, -297, 593);
+    bins.Apply(fHAsym);
 }
 
@@ -110,31 +128,22 @@
 Bool_t MHHillasExt::SetupFill(const MParList *plist)
 {
-    const MBinning* binsc  = (MBinning*)plist->FindObject("BinningConc");
-    const MBinning* binsc1 = (MBinning*)plist->FindObject("BinningConc1");
-    const MBinning* binsa  = (MBinning*)plist->FindObject("BinningAsym");
-    const MBinning* binsl  = (MBinning*)plist->FindObject("BinningM3Long");
-    const MBinning* binst  = (MBinning*)plist->FindObject("BinningM3Trans");
-    if (!binsc || !binsc1 || !binsa || !binsl || !binst)
-    {
-        *fLog << err << dbginf << "At least one MBinning not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    SetBinning(&fHConc,    binsc);
-    SetBinning(&fHConc1,   binsc1);
-    SetBinning(&fHAsym,    binsa);
-    SetBinning(&fHM3Long,  binsl);
-    SetBinning(&fHM3Trans, binst);
-
     const MGeomCam *geom = (MGeomCam*)plist->FindObject("MGeomCam");
     if (!geom)
-    {
-        *fLog << warn << dbginf << "No Camera Geometry available. Using mm-scale for histograms." << endl;
-        return kTRUE;
-    }
-
-    fHAsym.SetXTitle("Asym [\\circ]");
-    fHM3Long.SetXTitle("3^{rd} M_{l} [\\circ]");
-    fHM3Trans.SetXTitle("3^{rd} M_{t} [\\circ]");
+        *fLog << warn << GetDescriptor() << ": No Camera Geometry available. Using mm-scale for histograms." << endl;
+    else
+    {
+        fMm2Deg = geom->GetConvMm2Deg();
+        SetMmScale(kFALSE);
+    }
+
+    ApplyBinning(*plist, "Conc",    &fHConc);
+    ApplyBinning(*plist, "Conc1",   &fHConc1);
+    ApplyBinning(*plist, "Asym",    &fHAsym);
+    ApplyBinning(*plist, "M3Long",  &fHM3Long);
+    ApplyBinning(*plist, "M3Trans", &fHM3Trans);
+
+    fHillasSrc = (MHillasSrc*)plist->FindObject("HillasSource");
+    if (!fHillasSrc)
+        *fLog << warn << dbginf << "Sorry 'HillasSource' [MHillasSrc] not found. Histograms will be source independant." << endl;
 
     return MHHillas::SetupFill(plist);
@@ -148,21 +157,16 @@
 Bool_t MHHillasExt::Fill(const MParContainer *par)
 {
-    const MHillasExt &h = *(MHillasExt*)par;
-
-    fHConc.Fill(h.GetConc());
-    fHConc1.Fill(h.GetConc1());
-
-    if (fUseMmScale)
-    {
-        fHAsym.Fill(h.GetAsym());
-        fHM3Long.Fill(h.GetM3Long());
-        fHM3Trans.Fill(h.GetM3Trans());
-    }
-    else
-    {
-        fHAsym.Fill(fMm2Deg*h.GetAsym());
-        fHM3Long.Fill(fMm2Deg*h.GetM3Long());
-        fHM3Trans.Fill(fMm2Deg*h.GetM3Trans());
-    }
+    const MHillasExt &ext = *(MHillasExt*)par;
+
+    const Double_t scale = fHillasSrc ? TMath::Sign(fUseMmScale?1:fMm2Deg, fHillasSrc->GetCosDeltaAlpha()) : 1;
+
+    fHConc.Fill(ext.GetConc());
+    fHConc1.Fill(ext.GetConc1());
+
+    fHAsym.Fill(scale*ext.GetAsym());
+    fHM3Long.Fill(scale*ext.GetM3Long());
+    fHM3Trans.Fill(scale*ext.GetM3Trans());
+    //fHAsymna.Fill(scale*ext.GetAsymna());
+    //fHAsym0.Fill(scale*ext.GetAsym0());
 
     return MHHillas::Fill(par);
@@ -185,13 +189,14 @@
     }
 
-    if (fUseMmScale)
+    const Double_t scale = mmscale ? 1./fMm2Deg : fMm2Deg;
+    MH::ScaleAxis(&fHAsym,    scale);
+    MH::ScaleAxis(&fHM3Long,  scale);
+    MH::ScaleAxis(&fHM3Trans, scale);
+
+    if (mmscale)
     {
         fHAsym.SetXTitle("Asym [mm]");
         fHM3Long.SetXTitle("3^{rd} M_{l}[mm]");
         fHM3Trans.SetXTitle("3^{rd} M_{t} [mm]");
-
-        fHAsym.Scale(1./fMm2Deg);
-        fHM3Long.Scale(1./fMm2Deg);
-        fHM3Trans.Scale(1./fMm2Deg);
     }
     else
@@ -200,8 +205,4 @@
         fHM3Long.SetXTitle("3^{rd} M_{l} [\\circ]");
         fHM3Trans.SetXTitle("3^{rd} M_{t} [\\circ]");
-
-        fHAsym.Scale(fMm2Deg);
-        fHM3Long.Scale(fMm2Deg);
-        fHM3Trans.Scale(fMm2Deg);
     }
 
@@ -220,6 +221,6 @@
 {
     TCanvas &c = *MakeDefCanvas("Hillas", "Histograms of Hillas Parameters",
-                               3*350, 2*250);
-    c.Divide(3, 2);
+                                720, 810);
+    c.Divide(2, 3);
 
     gROOT->SetSelectedPad(NULL);
@@ -231,8 +232,8 @@
     ((TH1F&)fHConc).DrawCopy();
 
-    c.cd(4);
+    c.cd(2);
     ((TH1F&)fHConc1).DrawCopy();
 
-    c.cd(2);
+    c.cd(5);
     ((TH1F&)fHAsym).DrawCopy();
 
@@ -240,5 +241,5 @@
     ((TH1F&)fHM3Long).DrawCopy();
 
-    c.cd(6);
+    c.cd(4);
     ((TH1F&)fHM3Trans).DrawCopy();
 
@@ -260,15 +261,16 @@
 {
     if (!gPad)
-        MakeDefCanvas("Hillas", "Histograms of Hillas Parameters", 350, 3*250);
-
-    gPad->Divide(3, 2);
+        MakeDefCanvas("Hillas", "Histograms of Hillas Parameters",
+                      720, 810);
+
+    gPad->Divide(2, 3);
 
     gPad->cd(1);
     fHConc.DrawCopy();
 
-    gPad->cd(4);
+    gPad->cd(2);
     fHConc1.DrawCopy();
 
-    gPad->cd(2);
+    gPad->cd(5);
     fHAsym.DrawCopy();
 
@@ -276,5 +278,5 @@
     fHM3Long.DrawCopy();
 
-    gPad->cd(6);
+    gPad->cd(4);
     fHM3Trans.DrawCopy();
 
Index: trunk/MagicSoft/Mars/mhist/MHHillasExt.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHillasExt.h	(revision 1463)
+++ trunk/MagicSoft/Mars/mhist/MHHillasExt.h	(revision 1465)
@@ -9,7 +9,11 @@
 #endif
 
+class MHillasSrc;
+
 class MHHillasExt : public MHHillas
 {
 private:
+    MHillasSrc *fHillasSrc; //! Pointer to an MHillasSrc to be able to add sign to Asym, M3Long and M3Trans
+
     TH1F fHConc;    // [ratio] concentration ratio: sum of the two highest pixels / fSize
     TH1F fHConc1;   // [ratio] concentration ratio: sum of the highest pixel / fSize
Index: trunk/MagicSoft/Mars/mhist/MHHillasSrc.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHillasSrc.cc	(revision 1463)
+++ trunk/MagicSoft/Mars/mhist/MHHillasSrc.cc	(revision 1465)
@@ -179,5 +179,5 @@
     if (fMm2Deg<0)
     {
-        *fLog << warn << dbginf << "Warning - Sorry, no conversion factor for conversion available." << endl;
+        *fLog << warn << GetDescriptor() << ": Warning - Sorry, no conversion factor for conversion available." << endl;
         return;
     }
