Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7689)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7690)
@@ -32,4 +32,8 @@
        at which the normalization is calculated instead of
        the integral
+
+   * mpointing/MSrcPosRndm.[h,cc]:
+     - added new option which allows to create a random wobble
+       source position
 
 
Index: trunk/MagicSoft/Mars/mpointing/MSrcPosRndm.cc
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MSrcPosRndm.cc	(revision 7689)
+++ trunk/MagicSoft/Mars/mpointing/MSrcPosRndm.cc	(revision 7690)
@@ -36,4 +36,6 @@
 #include "MSrcPosRndm.h"
 
+#include <TRandom.h>
+
 #include "MLog.h"
 #include "MLogManip.h"
@@ -66,12 +68,17 @@
         return kFALSE;
 
-    fHist = (MHSrcPosCam*)plist->FindObject("MHSrcPosCam");
-    if (!fHist)
+    if (fDistOfSource<0)
     {
-        *fLog << inf << "MHSrcPosCam not found... skipping." << endl;
-        return kSKIP;
+        fHist = (MHSrcPosCam*)plist->FindObject("MHSrcPosCam");
+        if (!fHist)
+        {
+            *fLog << inf << "MHSrcPosCam not found... skipping." << endl;
+            return kSKIP;
+        }
+
+        *fLog << inf << "MHSrcPosCam found... taken to produce a random distribution." << endl;
     }
-
-    *fLog << inf << "MHSrcPosCam found... taken to produce a random distribution." << endl;
+    else
+        *fLog << inf << "Source position will be produced randomly in a distance of " << fDistOfSource << "° from the camera center!" << endl;
 
     fConvMm2Deg = geom->GetConvMm2Deg();
@@ -87,9 +94,14 @@
 {
     Axis_t x, y;
-
-    fHist->GetHist().GetRandom2(x, y);
+    if (fDistOfSource<0)
+        fHist->GetHist().GetRandom2(x, y);
+    else
+    {
+        const Double_t phi = gRandom->Uniform(TMath::TwoPi());
+        x = TMath::Cos(phi)*fDistOfSource;
+        y = TMath::Sin(phi)*fDistOfSource;
+    }
 
     fSrcPos->SetXY(x/fConvMm2Deg, y/fConvMm2Deg);
-
     return kTRUE;
 }
Index: trunk/MagicSoft/Mars/mpointing/MSrcPosRndm.h
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MSrcPosRndm.h	(revision 7689)
+++ trunk/MagicSoft/Mars/mpointing/MSrcPosRndm.h	(revision 7690)
@@ -17,9 +17,11 @@
     Double_t fConvMm2Deg;
 
+    Double_t fDistOfSource; // [deg] Distance of the source from the camera center
+
     Int_t  PreProcess(MParList *plist);
     Int_t  Process();
 
 public:
-    MSrcPosRndm() : fSrcPos(0), fHist(0)
+    MSrcPosRndm() : fSrcPos(0), fHist(0), fDistOfSource(-1)
     {
         fName  = "MSrcPosRndm";
@@ -27,4 +29,6 @@
     }
 
+    void SetDistOfSource(Double_t dist=-1) { fDistOfSource=dist; }
+
     ClassDef(MSrcPosRndm, 0) //Overwrite the source position with a random one from MHSrcPosCam
 };
