Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 7565)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 7566)
@@ -26,4 +26,7 @@
      - fixed the scaling. MSrcPosCam has to be in mm
 
+   * ganymed.rc:
+     - added line and comments with new resource 
+
 
 
Index: /trunk/MagicSoft/Mars/NEWS
===================================================================
--- /trunk/MagicSoft/Mars/NEWS	(revision 7565)
+++ /trunk/MagicSoft/Mars/NEWS	(revision 7566)
@@ -26,6 +26,13 @@
    - ganymed: now stops in requested source isn't found in catalog file
 
-   - ganymed: fixed plot for Eý.dN/dE. The spectrum was multiplied with two
+   - ganymed: fixed plot for E^2*dN/dE. The spectrum was multiplied with two
      times the bin-width instead of the absolute energy
+
+   - ganymed: added a new option for on-/off-observations
+       MJCut.RandomSourcePosition
+     If switched on the distribution of observation time of the source
+     position in the camera is calculated from the on-data and randomly
+     applied with this distrbution to the off-data.
+
 
 
Index: /trunk/MagicSoft/Mars/ganymed.rc
===================================================================
--- /trunk/MagicSoft/Mars/ganymed.rc	(revision 7565)
+++ /trunk/MagicSoft/Mars/ganymed.rc	(revision 7566)
@@ -82,4 +82,10 @@
 MHDisp.Smearing: 0.03
 #MHDisp.Wobble:   Yes
+
+# -------------------------------------------------------------------------
+# To get use a random source position in the off data with the distribution
+# in the camera of the on-data
+# -------------------------------------------------------------------------
+#MJCut.RandomSourcePosition: Yes
 
 # -------------------------------------------------------------------------
Index: /trunk/MagicSoft/Mars/mjobs/MJCut.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MJCut.cc	(revision 7565)
+++ /trunk/MagicSoft/Mars/mjobs/MJCut.cc	(revision 7566)
@@ -655,4 +655,5 @@
     taskenv3.SetDefault(fCalcDisp);
 
+    //    MFillH fill0a("OnPos [MHSrcPosCam]", "MSrcPosCam", "FillSrcPosCam");
     MFillH fill1a("MHHillasOffPre  [MHHillas]",      "MHillas",      "FillHillasPre");
     MFillH fill2a("MHHillasOffPost [MHHillas]",      "MHillas",      "FillHillasPost");
@@ -692,4 +693,6 @@
     tlist2.AddToList(&scor);
     tlist2.AddToList(&srcrndm);
+    //if (fRndmSrcPos && !fIsWobble)
+    //   tlist2.AddToList(&fill0a);
     tlist2.AddToList(&hcalc);
     if (fIsWobble)
@@ -863,4 +866,9 @@
 
     tlist.Replace(&readon);
+    if (fRndmSrcPos && !fIsWobble)
+    {
+//        tlist2.RemoveFromList(&fill0a);
+        tlist2.RemoveFromList(&srcrndm);
+    }
     if (!fWriteOnly)
     {
Index: /trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.cc	(revision 7565)
+++ /trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.cc	(revision 7566)
@@ -137,4 +137,6 @@
     }
 
+//    if (fName=="MHSrcPosCam")
+//    {
     fXY += cam->GetXY();
     fNum++;
@@ -149,4 +151,7 @@
 
     fHist.Fill(fXY.X(), fXY.Y(), fEffOnTime->GetVal());
+//    }
+//    else
+//        fHist.Fill(cam->GetX()*fConvMm2Deg, cam->GetY()*fConvMm2Deg);
 
     fXY            = TVector2();
@@ -159,5 +164,5 @@
 void MHSrcPosCam::Paint(Option_t *)
 {
-    MH::SetPalette("glow1");
+    MH::SetPalette("glow1", 99);
 }
 
