Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 3579)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 3580)
@@ -134,4 +134,9 @@
    * mimage/MNewImagePar.[h,cc]:
      - added some comments
+
+   * mhist/MHStarMap.[h,cc]: 
+     - fixed to use the correct MPointingPos instead of the
+       deprecated MMcEvt. Use MPointingPosCalc to copy the
+       pointing position from MMcEvt to MPointingPos
 
 
Index: /trunk/MagicSoft/Mars/mhist/MHStarMap.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHStarMap.cc	(revision 3579)
+++ /trunk/MagicSoft/Mars/mhist/MHStarMap.cc	(revision 3580)
@@ -48,4 +48,5 @@
 #include <TColor.h>   // SetRGB
 #include <TCanvas.h>  // TCanvas
+#include <TVector2.h>
 
 #include "MLog.h"
@@ -58,7 +59,7 @@
 #include "MHillas.h"
 #include "MBinning.h"
-#include "MMcEvt.hxx"
 #include "MSrcPosCam.h"
 #include "MObservatory.h"
+#include "MPointingPos.h"
 
 ClassImp(MHStarMap);
@@ -131,8 +132,8 @@
     }
 
-   fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt");
-   if (!fMcEvt)
+   fPointPos = (MPointingPos*)plist->FindObject("MPointingPos");
+   if (!fPointPos)
    {
-       *fLog << err << "MMcEvt not found... aborting." << endl;
+       *fLog << err << "MPointingPos not found... aborting." << endl;
        return kFALSE;
    }
@@ -190,14 +191,4 @@
 // --------------------------------------------------------------------------
 //
-// Calls MObservatory::RotationAngle
-//
-void MHStarMap::GetRotationAngle(Double_t &sin, Double_t &cos)
-{
-    fObservatory->RotationAngle(fMcEvt->GetTelescopeTheta(),
-                                fMcEvt->GetTelescopePhi(), sin, cos);
-}
-
-// --------------------------------------------------------------------------
-//
 // Fill the four histograms with data from a MHillas-Container.
 // Be careful: Only call this with an object of type MHillas
@@ -216,12 +207,10 @@
     Float_t t = h.GetMeanY() - m*h.GetMeanX();
 
-    Float_t xSource = fSrcPos->GetX();
-    Float_t ySource = fSrcPos->GetY();
+    TVector2 src(fSrcPos->GetXY());
 
     if (!fUseMmScale)
     {
-        t *= fMm2Deg;
-        xSource *= fMm2Deg;
-        ySource *= fMm2Deg;
+        t   *= fMm2Deg;
+        src *= fMm2Deg;
     }
 
@@ -239,7 +228,5 @@
     //   - and perform a rotation to compensate the rotation of the
     //     sky image in the camera
-    Double_t cosal;
-    Double_t sinal;
-    GetRotationAngle(sinal, cosal);
+    const Double_t rho = fPointPos->RotationAngle(*fObservatory);
 
     if (m>-1 && m<1)
@@ -248,11 +235,10 @@
 
         for (float x=xmin+dx/2; x<(xmax-xmin)+dx; x+=dx)
-	{
-            const Float_t xorig = x     - xSource;
-            const Float_t yorig = m*x+t - ySource;
-
-            const Float_t xfill =  cosal*xorig + sinal*yorig;
-            const Float_t yfill = -sinal*xorig + cosal*yorig;
-            fStarMap->Fill(xfill, yfill, w);
+        {
+            TVector2 v(x, m*x+t);
+            v -= src;
+            v.Rotate(-rho);
+
+            fStarMap->Fill(v.X(), v.Y(), w);
         }
     }
@@ -266,11 +252,10 @@
 
         for (float y=ymin+dy/2; y<(ymax-ymin)+dy; y+=dy)
-	{
-            const Float_t xorig = (y-t)/m - xSource;
-            const Float_t yorig = y       - ySource;
-
-            const Float_t xfill =  cosal*xorig + sinal*yorig;
-            const Float_t yfill = -sinal*xorig + cosal*yorig;
-            fStarMap->Fill(xfill, yfill, w);
+        {
+            TVector2 v((y-t)/m, y);
+            v -= src;
+            v.Rotate(-rho);
+
+            fStarMap->Fill(v.X(), v.Y(), w);
         }
     }
Index: /trunk/MagicSoft/Mars/mhist/MHStarMap.h
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHStarMap.h	(revision 3579)
+++ /trunk/MagicSoft/Mars/mhist/MHStarMap.h	(revision 3580)
@@ -9,12 +9,12 @@
 class MHillas;
 class MSrcPosCam;
-class MMcEvt;
 class MObservatory;
+class MPointingPos;
 
 class MHStarMap : public MH
 {
 private:
-    MSrcPosCam   *fSrcPos; //!
-    MMcEvt       *fMcEvt;  //!
+    MSrcPosCam   *fSrcPos;      //!
+    MPointingPos *fPointPos;    //!
     MObservatory *fObservatory; //!
 
