Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 9340)
+++ trunk/MagicSoft/Mars/Changelog	(revision 9341)
@@ -19,4 +19,27 @@
                                                  -*-*- END OF LINE -*-*-
  2009/02/15 Thomas Bretz
+
+   * mpointing/MHSrcPosCam.[h,cc], mpointing/MSrcPosRndm.[h,cc],
+     mfilter/MFMagicCuts.[h,cc], mmuon/MHMuonPar.[h,cc],
+     mhflux/MHThetaSqN.[h,cc]:
+     - support changing geometries (conversion factors) reading
+       a new geometry from a run header
+
+   * mimage/MHVsSize.[h,cc], mimage/MHNewImagePar.[h,cc],
+     mimage/MHHillasSrc.[h,cc], mimage/MHHillasExt.[h,cc],
+     mimage/MHHillas.[h,cc], mimage/MNewImagePar2.[h,cc]:
+     - removed option to set conversion factor manually
+     - support changing geometries (conversion factors) reading
+       a new geometry from a run header
+
+   * mhflux/MMcSpectrumWeight.cc:
+     - replaced Form by MString::Format
+     - made sure that nobody is mixing different energy-range monte
+       carlos and normalizes by integral (to be implemented)
+
+   * manalysis/MMcCalibrationUpdate.cc:
+     - switched off file Ceres files (this might only be temporary
+       but it makes the display work quite well even without
+       calibrated units.
 
    * mjobs/MJCalibrateSignal.cc:
Index: trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc	(revision 9340)
+++ trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc	(revision 9341)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MHThetaSqN.cc,v 1.10 2008-11-11 11:42:14 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MHThetaSqN.cc,v 1.11 2009-02-15 15:43:30 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -167,11 +167,10 @@
     }
 
-    MGeomCam *geom = (MGeomCam*)pl->FindObject("MGeomCam");
-    if (!geom)
+    fGeom = (MGeomCam*)pl->FindObject("MGeomCam");
+    if (!fGeom)
     {
         *fLog << err << "MGeomCam not found... abort." << endl;
         return kFALSE;
     }
-    fMm2Deg = geom->GetConvMm2Deg();
 
     if (fFit.GetScaleMode()==MAlphaFitter::kNone)
@@ -217,4 +216,6 @@
 Int_t MHThetaSqN::Fill(const MParContainer *par, const Stat_t weight)
 {
+    const Double_t fMm2Deg = fGeom->GetConvMm2Deg();
+
     const TVector2 norm(GetVec(fHillas->GetNormAxis(), 6));
     const TVector2 mean(GetVec(fHillas->GetMean(),     8));
Index: trunk/MagicSoft/Mars/mhflux/MHThetaSqN.h
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHThetaSqN.h	(revision 9340)
+++ trunk/MagicSoft/Mars/mhflux/MHThetaSqN.h	(revision 9341)
@@ -8,4 +8,5 @@
 class TVector2;
 
+class MGeomCam;
 class MTaskList;
 class MSrcPosCam;
@@ -14,8 +15,8 @@
 {
 private:
+    MGeomCam    *fGeom;      //! conversion mm to deg
     MParameterD *fDisp;      //!
     MSrcPosCam  *fSrcPosCam; //!
 
-    Double_t fMm2Deg;        //!
     Double_t fThetaSqCut;    //!
     Double_t fSignificanceCutLevel;
Index: trunk/MagicSoft/Mars/mimage/MHNewImagePar2.h
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHNewImagePar2.h	(revision 9340)
+++ trunk/MagicSoft/Mars/mimage/MHNewImagePar2.h	(revision 9341)
@@ -20,7 +20,4 @@
     TH1F fHistBorder2;  //
 
-    Float_t fMm2Deg;
-    Bool_t  fUseMmScale;
-
 public:
     MHNewImagePar2(const char *name=NULL, const char *title=NULL);
Index: trunk/MagicSoft/Mars/mimage/MHVsSize.cc
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHVsSize.cc	(revision 9340)
+++ trunk/MagicSoft/Mars/mimage/MHVsSize.cc	(revision 9341)
@@ -59,5 +59,5 @@
 //
 MHVsSize::MHVsSize(const char *name, const char *title)
-    : fHillas(NULL), fHillasExt(NULL), fNewImagePar(NULL), fMm2Deg(1), fUseMmScale(kTRUE)
+    : fGeom(0), fHillas(0), fHillasExt(0), fNewImagePar(0)
 {
     //
@@ -88,18 +88,18 @@
     fM3Long.SetXTitle("Size [phe]");
 
-    fLength.SetYTitle("Length [mm]");
-    fWidth.SetYTitle("Width [mm]");
-    fDist.SetYTitle("Distance [mm]");
+    fLength.SetYTitle("Length [\\circ]");
+    fWidth.SetYTitle("Width [\\circ]");
+    fDist.SetYTitle("Distance [\\circ]");
     fConc1.SetYTitle("Conc1 [ratio]");
-    fArea.SetYTitle("Conc1 [mm^{2}]");
-    fM3Long.SetYTitle("M3Long [mm]");
+    fArea.SetYTitle("Area [\\circ^{2}]");
+    fM3Long.SetYTitle("M3Long [\\circ]");
 
     MBinning binse, binsl, binsd, binsc, binsa, binsm;
     binse.SetEdgesLog( 50,   10, 1e5);
-    binsl.SetEdges(   100,    0, 296.7/2);
-    binsd.SetEdges(   100,    0, 600);
+    binsl.SetEdges(   100,    0, 0.5);
+    binsd.SetEdges(   100,    0, 2.0);
     binsc.SetEdgesLog(100, 3e-3, 1);
-    binsa.SetEdges(   100,    0, 445*45);
-    binsm.SetEdges(   100, -445, 445);
+    binsa.SetEdges(   100,    0, 0.25);
+    binsm.SetEdges(   100, -1.5, 1.5);
 
     MH::SetBinning(&fLength, &binse, &binsl);
@@ -130,11 +130,9 @@
 Bool_t MHVsSize::SetupFill(const MParList *plist)
 {
-    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);
+    fGeom = (MGeomCam*)plist->FindObject("MGeomCam");
+    if (!fGeom)
+    {
+        *fLog << err << "MGeomCam not found... abort." << endl;
+        return kFALSE;
     }
 
@@ -173,68 +171,4 @@
 // --------------------------------------------------------------------------
 //
-// 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 MHVsSize::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 MHVsSize::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, 1, scale);
-    MH::ScaleAxis(&fWidth,  1, scale);
-    MH::ScaleAxis(&fDist,   1, scale);
-    MH::ScaleAxis(&fM3Long, 1, scale);
-    MH::ScaleAxis(&fArea,   1, scale*scale);
-
-    if (mmscale)
-    {
-        fLength.SetYTitle("Length [mm]");
-        fWidth.SetYTitle("Width [mm]");
-        fDist.SetYTitle("Distance [mm]");
-        fArea.SetYTitle("Area [mm^{2}]");
-        fM3Long.SetYTitle("M3Long [mm]");
-    }
-    else
-    {
-        fLength.SetYTitle("Length [\\circ]");
-        fWidth.SetYTitle("Width [\\circ]");
-        fDist.SetYTitle("Distance [\\circ]");
-        fArea.SetYTitle("Area [\\circ^{2}]");
-        fM3Long.SetYTitle("M3Long [\\circ]");
-    }
-
-    fUseMmScale = mmscale;
-}
-
-// --------------------------------------------------------------------------
-//
 // Fill the histograms with data from a MHillas-Container.
 // Be careful: Only call this with an object of type MHillas
@@ -249,5 +183,5 @@
     }
 
-    const Double_t scale = fUseMmScale ? 1 : fMm2Deg;
+    const Double_t scale = fGeom->GetConvMm2Deg();
 
     fLength.Fill(fHillas->GetSize(), scale*fHillas->GetLength(),     w);
Index: trunk/MagicSoft/Mars/mimage/MHVsSize.h
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHVsSize.h	(revision 9340)
+++ trunk/MagicSoft/Mars/mimage/MHVsSize.h	(revision 9341)
@@ -10,4 +10,5 @@
 #endif
 
+class MGeomCam;
 class MHillas;
 class MHillasExt;
@@ -17,4 +18,5 @@
 {
 private:
+    MGeomCam     *fGeom;        //! Conversion from mm to deg
     MHillas      *fHillas;      //!
     MHillasExt   *fHillasExt;   //!
@@ -30,12 +32,6 @@
     TH2F fArea;    // 
 
-    Float_t fMm2Deg;
-    Bool_t  fUseMmScale;
-
 public:
     MHVsSize(const char *name=NULL, const char *title=NULL);
-
-    void SetMmScale(Bool_t mmscale=kTRUE);
-    virtual void SetMm2Deg(Float_t mmdeg);
 
     Bool_t SetupFill(const MParList *pList);
