Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 7615)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 7616)
@@ -24,4 +24,12 @@
      - if the pixels to be swaped are both not found, assume they are
        intentially not mapped. Changed the Error to a Warning
+
+   * mhflux/MHDisp.[h,cc]:
+     - made the scale region a parameter which can be changed from
+       within the display
+     - allow the scale parameters to be setup from the resource-file
+
+   * ganymed.rc, ganymed_onoff.rc, ganymed_wobble.rc:
+     - added example how to change the new scale parameters in MHDisp
 
 
@@ -118,6 +126,6 @@
 
    * mhflux/MHPhi.[h,cc]:
-     - many improvements to the algorithm, it now takes also inhomgeneities
-       into account
+     - many improvements to the algorithm, it now takes also
+       inhomgeneities into account
      - restructured the display, display more histograms
      - increased class version to 2
@@ -127,8 +135,10 @@
 
    * mpointing/MPointingDevCalc.[h,cc]:
-     - allowed to set the starguider offset calibration from the resource file
+     - allowed to set the starguider offset calibration from the
+       resource file
 
    * callisto_Dec04Jan05.rc:
-     - replaced Calibration scale factor by usage of resources/calibration_spline.rc
+     - replaced Calibration scale factor by usage of
+       resources/calibration_spline.rc
 
 
@@ -326,6 +336,6 @@
 
    * datacenter/db/dowebplots: 
-     - added option -p to the script, to be able to call the script for 
-       different programs independently
+     - added option -p to the script, to be able to call the script
+       for different programs independently
      - fixed find
 
@@ -367,6 +377,7 @@
 
    * mbase/MTaskList.[h,cc]:
-     - implemented the usabe of MTask::fAccelerator to switch off resetting
-       of all parameter containers which can be very time-consuming
+     - implemented the usabe of MTask::fAccelerator to switch off
+       resetting of all parameter containers which can be very
+       time-consuming
 
    * mimage/MImagePar.cc:
Index: /trunk/MagicSoft/Mars/NEWS
===================================================================
--- /trunk/MagicSoft/Mars/NEWS	(revision 7615)
+++ /trunk/MagicSoft/Mars/NEWS	(revision 7616)
@@ -30,4 +30,10 @@
      mode if no starguider information was available due to an incorrect
      initialization of the starguider calibration
+
+   - ganymed: The scale region in the False Source Plot (MHDisp) can now
+     be changed from within the plot. It can also be setup from the
+     resource file using:
+       + MHDisp.fScaleMin: 0.325
+       + MHDisp.fScaleMax: 0.475
 
 
Index: /trunk/MagicSoft/Mars/ganymed.rc
===================================================================
--- /trunk/MagicSoft/Mars/ganymed.rc	(revision 7615)
+++ /trunk/MagicSoft/Mars/ganymed.rc	(revision 7616)
@@ -84,4 +84,6 @@
 MHDisp.Smearing: 0.06
 #MHDisp.Wobble:   Yes
+#MHDisp.ScaleMin: 0.325
+#MHDisp.ScaleMax: 0.475
 
 # -------------------------------------------------------------------------
Index: /trunk/MagicSoft/Mars/ganymed_onoff.rc
===================================================================
--- /trunk/MagicSoft/Mars/ganymed_onoff.rc	(revision 7615)
+++ /trunk/MagicSoft/Mars/ganymed_onoff.rc	(revision 7616)
@@ -83,4 +83,6 @@
 
 MHDisp.Smearing: 0.06
+#MHDisp.ScaleMin: 0.325
+#MHDisp.ScaleMax: 0.475
 
 # -------------------------------------------------------------------------
Index: /trunk/MagicSoft/Mars/ganymed_wobble.rc
===================================================================
--- /trunk/MagicSoft/Mars/ganymed_wobble.rc	(revision 7615)
+++ /trunk/MagicSoft/Mars/ganymed_wobble.rc	(revision 7616)
@@ -77,6 +77,8 @@
 MJCut.NameHistFS: MHDisp
 
+MHDisp.Wobble:   Yes
 MHDisp.Smearing: 0.06
-MHDisp.Wobble:   Yes
+#MHDisp.ScaleMin: 0.325
+#MHDisp.ScaleMax: 0.475
 
 # -------------------------------------------------------------------------
Index: /trunk/MagicSoft/Mars/mhflux/MHDisp.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhflux/MHDisp.cc	(revision 7615)
+++ /trunk/MagicSoft/Mars/mhflux/MHDisp.cc	(revision 7616)
@@ -32,4 +32,9 @@
 // in the tasklist. Switching of the M3L cut in MFMagicCuts is recommended.
 //
+// Class Version 3:
+// ----------------
+//  + Double_t fScaleMin;    // [deg] Minimum circle for integration of off-data for scaling
+//  + Double_t fScaleMax;    // [deg] Maximum circle for integration of off-data for scaling
+//
 //////////////////////////////////////////////////////////////////////////////
 #include "MHDisp.h"
@@ -65,5 +70,6 @@
 //
 MHDisp::MHDisp(const char *name, const char *title)
-    : fDisp(0), fDeviation(0), fSmearing(-1), fWobble(kFALSE)
+    : fDisp(0), fDeviation(0), fSmearing(-1), fWobble(kFALSE),
+    fScaleMin(0.325), fScaleMax(0.475)
 {
     //
@@ -165,5 +171,5 @@
         if (!fHistOff)
         {
-            if (delta>165)
+            if (delta>180-25)
                 return kTRUE;
 
@@ -175,5 +181,5 @@
             // increased uncertainty
             // FIXME: The delta stuff could be replaced by a 2*antitheta cut...
-            w0 = delta>15 ? 1 : 2;
+            w0 = delta>25 ? 1 : 2;
         }
 
@@ -331,4 +337,18 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Make sure that if the scale is changed by the context menu all subpads
+// are redrawn.
+//
+void MHDisp::Update()
+{
+    TVirtualPad *pad = gPad;
+    for (int i=1; i<=6; i++)
+    {
+        if (pad->GetPad(i))
+            pad->GetPad(i)->Modified();
+    }
+}
 
 // --------------------------------------------------------------------------
@@ -348,5 +368,5 @@
         {
             const Double_t d = TMath::Hypot(axex.GetBinCenter(x+1), axey.GetBinCenter(y+1));
-            if (d>0.325 && d<0.475)
+            if (d>fScaleMin && d<fScaleMax)
             {
                 sum += h.GetBinContent(x+1,y+1);
@@ -354,4 +374,5 @@
             }
         }
+
     return sum/cnt;
 }
@@ -611,5 +632,5 @@
     // ----- Pad number 4 -----
     TString name = Form("%s_4", pad->GetName());
-    TPad *p = new TPad(name,name, 0.5025, 0.3355, 0.995, 0.995, col, 0, 0);
+    TPad *p = new TPad(name,name, 0.525/*0.5025*/, 0.3355, 0.995, 0.995, col, 0, 0);
     p->SetNumber(4);
     p->Draw();
@@ -631,5 +652,5 @@
     pad->cd();
     name = Form("%s_1", pad->GetName());
-    p = new TPad(name,name, 0.005, 0.3355, 0.4975, 0.995, col, 0, 0);
+    p = new TPad(name,name, 0.005, 0.3355, 0.475/*0.4975*/, 0.995, col, 0, 0);
     p->SetNumber(1);
     p->Draw();
@@ -733,4 +754,14 @@
         SetWobble(GetEnvValue(env, prefix, "Wobble", fWobble));
     }
+    if (IsEnvDefined(env, prefix, "ScaleMin", print))
+    {
+        rc = kTRUE;
+        SetScaleMin(GetEnvValue(env, prefix, "ScaleMin", fScaleMin));
+    }
+    if (IsEnvDefined(env, prefix, "ScaleMax", print))
+    {
+        rc = kTRUE;
+        SetScaleMax(GetEnvValue(env, prefix, "ScaleMax", fScaleMax));
+    }
 
     return rc;
Index: /trunk/MagicSoft/Mars/mhflux/MHDisp.h
===================================================================
--- /trunk/MagicSoft/Mars/mhflux/MHDisp.h	(revision 7615)
+++ /trunk/MagicSoft/Mars/mhflux/MHDisp.h	(revision 7616)
@@ -17,10 +17,12 @@
 class MParameterD;
 class MPointingDev;
+class MSrcPosCam;
 
 class MHDisp : public MHFalseSource
 {
 private:
-    MParameterD  *fDisp;    //!
+    MParameterD  *fDisp;      //!
     MPointingDev *fDeviation; //!
+    //MSrcPosCam   *fAxis;      //!
 
     TH2D         fHistBg;
@@ -31,10 +33,15 @@
     Bool_t       fHalf;
 
-    Double_t     fSmearing;
-    Bool_t       fWobble;
+    Double_t     fSmearing;    // [deg] Width of Gaus to fold with the events
+    Bool_t       fWobble;      // This is for Wobble-Mode observations
+
+    Double_t     fScaleMin;    // [deg] Minimum circle for integration of off-data for scaling
+    Double_t     fScaleMax;    // [deg] Maximum circle for integration of off-data for scaling
 
     // MHDisp
     Double_t GetOffSignal(TH1 &h) const;
     Double_t DeltaPhiSrc(const TVector2 &v) const;
+
+    void Update();
 
     void Profile1D(const char *name, const TH2 &h) const;
@@ -51,4 +58,11 @@
     void SetSmearing(Double_t s=-1) { fSmearing=s; }
     void SetWobble(Bool_t w=kTRUE)  { fWobble=w;   }
+
+    void SetScaleMin(Double_t scale) { fScaleMin = scale; Update(); } //*MENU* *ARGS={scale=>fScaleMin}
+    void SetScaleMax(Double_t scale) { fScaleMax = scale; Update(); } //*MENU* *ARGS={scale=>fScaleMax}
+    void SetScale(Double_t min, Double_t max) { fScaleMin = min; fScaleMax = max; Update(); } //*MENU* *ARGS={min=>fScaleMin,max=>fScaleMax}
+
+    Double_t GetScaleMin() { return fScaleMin; }
+    Double_t GetScaleMax() { return fScaleMax; }
 
     // MHFalseSource (to be moved!)
@@ -82,5 +96,5 @@
     Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
 
-    ClassDef(MHDisp, 2) //Class to provide a Disp map
+    ClassDef(MHDisp, 3) //Class to provide a Disp map
 };
 
