Index: trunk/MagicSoft/Mars/mastro/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mastro/Makefile	(revision 4666)
+++ trunk/MagicSoft/Mars/mastro/Makefile	(revision 4667)
@@ -19,5 +19,5 @@
 #  connect the include files defined in the config.mk file
 #
-INCLUDES =  -I. -I../mbase -I../mgeom -I../mtemp
+INCLUDES =  -I. -I../mbase -I../mgeom -I../mtemp -I../mstarcam
 # mgeom (MAstroCamera): MGeomCam, MGeomMirror
 
Index: trunk/MagicSoft/Mars/mstarcam/MStarCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mstarcam/MStarCam.cc	(revision 4667)
+++ trunk/MagicSoft/Mars/mstarcam/MStarCam.cc	(revision 4667)
@@ -0,0 +1,113 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without expressed
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Javier Lopez 04/2004 <mailto:jlopez@ifae.es>
+!   Author(s): Jordi Albert 04/2004 <mailto:albert@astro.uni-wuerzburg.de>
+!   Author(s): Robert Wagner 08/2004 <mailto:rwagner@mppmu.mpg.de>
+!                 
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// MStarCam                                                                //
+//                                                                         //
+// A Container to hold star positions in the camera                        //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+
+#include "MStarCam.h"
+
+#include <TList.h>
+
+#include "MLog.h"
+#include "MLogManip.h"
+
+#include "MStarPos.h"
+
+using namespace std;
+
+// --------------------------------------------------------------------------
+// Default constructor. 
+//
+//
+MStarCam::MStarCam(const char *name, const char *title) 
+{
+  fName  = name  ? name  : "MStarCam";
+  fTitle = title ? title : "";
+  
+  fStars = new TList;
+
+  fInnerPedestalDC = 0.;
+  fOuterPedestalDC = 0.;
+  fInnerPedestalRMSDC = 0.;
+  fOuterPedestalRMSDC = 0.;
+  
+}
+
+MStarCam::~MStarCam()
+{
+    fStars->SetOwner();
+    fStars->Delete();
+}
+
+// --------------------------------------------------------------------------
+//
+// Get i-th
+//
+MStarPos &MStarCam::operator[] (Int_t i)
+{
+  MStarPos& star = *static_cast<MStarPos*>(fStars->At(i));
+  return star;
+}
+
+// --------------------------------------------------------------------------
+//
+// Get i-th
+//
+const MStarPos &MStarCam::operator[] (Int_t i) const
+{
+    return *static_cast<MStarPos*>(fStars->At(i));
+}
+
+void MStarCam::Paint(Option_t *o)
+{
+	TIter Next(fStars);
+	MStarPos* star;
+	while ((star=(MStarPos*)Next())) 
+	    star->Paint(o);
+}
+
+void MStarCam::Print(Option_t *o) const
+{
+      *fLog << inf << "DCs baseline:" << endl;
+      *fLog << inf << " Inner Pixels Mean pedestal \t" << setw(4) << fInnerPedestalDC << " uA  and RMS " << setw(4) << fInnerPedestalRMSDC << " uA for DCs" << endl;
+      *fLog << inf << " Outer Pixels Mean pedestal \t" << setw(4) << fOuterPedestalDC << " uA  and RMS " << setw(4) << fOuterPedestalRMSDC << " uA for DCs" << endl;
+      
+      TIter Next(fStars);
+      MStarPos* star;
+      UInt_t starnum = 0;
+      while ((star=(MStarPos*)Next())) 
+        {
+          *fLog << inf << "Star[" << starnum << "] info:" << endl;
+          star->Print(o);
+          starnum++;
+        }
+}
Index: trunk/MagicSoft/Mars/mstarcam/MStarCam.h
===================================================================
--- trunk/MagicSoft/Mars/mstarcam/MStarCam.h	(revision 4667)
+++ trunk/MagicSoft/Mars/mstarcam/MStarCam.h	(revision 4667)
@@ -0,0 +1,64 @@
+#ifndef MARS_MStarCam
+#define MARS_MStarCam
+
+#ifndef MARS_MParContainer
+#include "MParContainer.h"
+#endif
+
+#ifndef MARS_MHCamera
+#include "MHCamera.h"
+#endif
+
+class TList;
+
+class MGeomCam;
+class MStarPos;
+
+class MStarCam : public MParContainer
+{
+private:
+
+  TList  *fStars;  //-> FIXME: Change TClonesArray away from a pointer?
+
+  // BaseLine DCs info
+  Float_t fInnerPedestalDC;         //[ua]
+  Float_t fOuterPedestalDC;         //[ua]
+
+  Float_t fInnerPedestalRMSDC;      //[ua]
+  Float_t fOuterPedestalRMSDC;      //[ua]
+
+  MHCamera fDisplay;
+
+ public:
+
+  MStarCam(const char *name=NULL, const char *title=NULL);
+  ~MStarCam();
+
+  MStarPos &operator[] (Int_t i);
+  const MStarPos &operator[] (Int_t i) const;
+
+  TList *GetList() const { return fStars; }
+  UInt_t GetNumStars() const { return fStars->GetSize(); }
+
+  //Getters
+
+  Float_t GetInnerPedestalDC() {return fInnerPedestalDC;}
+  Float_t GetOuterPedestalDC() {return fOuterPedestalDC;}
+  Float_t GetInnerPedestalRMSDC() { return fInnerPedestalRMSDC;}
+  Float_t GetOuterPedestalRMSDC() { return fOuterPedestalRMSDC;}
+
+  MHCamera& GetDisplay() { return fDisplay; }
+
+    //Setters
+  void SetInnerPedestalDC(Float_t ped) {fInnerPedestalDC = ped;}
+  void SetOuterPedestalDC(Float_t ped) {fOuterPedestalDC = ped;}
+  void SetInnerPedestalRMSDC(Float_t rms){fInnerPedestalRMSDC = rms;}
+  void SetOuterPedestalRMSDC(Float_t rms){fOuterPedestalRMSDC = rms;}
+
+  void Paint(Option_t *o=NULL);
+  void Print(Option_t *o=NULL) const;
+
+  ClassDef(MStarCam, 1)	// Storage Container for star positions in the camera
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mstarcam/MStarPos.cc
===================================================================
--- trunk/MagicSoft/Mars/mstarcam/MStarPos.cc	(revision 4667)
+++ trunk/MagicSoft/Mars/mstarcam/MStarPos.cc	(revision 4667)
@@ -0,0 +1,309 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without expressed
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Javier López ,   4/2004 <mailto:jlopez@ifae.es>
+!              Robert Wagner,   7/2004 <mailto:rwagner@mppmu.mpg.de>
+!              Wolfgang Wittek, 8/2004 <mailto:wittek@mppmu.mpg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+#include "MStarPos.h"
+
+#include <TEllipse.h>
+#include <TMarker.h>
+
+#include "MLog.h"
+#include "MLogManip.h"
+
+ClassImp(MStarPos);
+
+using namespace std;
+
+MStarPos::MStarPos(const char *name, const char *title)
+{
+
+    fName  = name  ? name  : "MStarPos";
+    fTitle = title ? title : "";
+    
+    Reset();
+}
+
+void MStarPos::Reset()
+{
+
+    //Expected position on camera
+     fMagExp = 0.;
+     fXExp = 0.;
+     fYExp = 0.;
+
+    //Info from calculation
+     fMagCalc = 0.;
+     fMaxCalc = 0.;
+     fMeanXCalc = 0.;
+     fMeanYCalc = 0.;
+     fSigmaMinorAxisCalc = 0.;
+     fSigmaMajorAxisCalc = 0.;
+
+    //Info from uncorrelated Gauss fit
+     fMagFit = 0.;
+     fMaxFit = 0.;
+     fMeanXFit = 0.;
+     fMeanYFit = 0.;
+     fSigmaMinorAxisFit = 0.;
+     fSigmaMajorAxisFit = 0.;
+
+     fChiSquare = 0.;
+     fNdof = 1;
+
+    //Info from correlated Gauss fit
+     fMagCGFit    = 0.;
+     fMaxCGFit    = 0.;
+     fMeanXCGFit  = 0.;
+     fMeanYCGFit  = 0.;
+     fSigmaXCGFit = 0.;
+     fSigmaYCGFit = 0.;
+     fCorrXYCGFit = 0.;
+     fXXErrCGFit  = 0.;
+     fXYErrCGFit  = 0.;
+     fYYErrCGFit  = 0.;
+
+     fChiSquareCGFit = 0.;
+     fNdofCGFit      = 1;
+
+}
+
+void MStarPos::SetExpValues(Float_t mag, Float_t x, Float_t y)
+{
+     fMagExp = mag;
+     fXExp = x;
+     fYExp = y;
+}
+
+void MStarPos::SetIdealValues(Float_t mag, Float_t x, Float_t y)
+{
+     fMagIdeal = mag;
+     fXIdeal = x;
+     fYIdeal = y;
+}
+
+void MStarPos::SetCalcValues(Float_t mag, Float_t max, 
+        Float_t x, Float_t y, Float_t sigmaMinorAxis, Float_t sigmaMajorAxis)
+{
+     fMagCalc = mag;
+     fMaxCalc = max;
+     fMeanXCalc = x;
+     fMeanYCalc = y;
+     fSigmaMinorAxisCalc = sigmaMinorAxis;
+     fSigmaMajorAxisCalc = sigmaMajorAxis;
+}
+
+void MStarPos::SetFitValues(Float_t mag, Float_t max, 
+        Float_t x, Float_t y, Float_t sigmaMinorAxis, Float_t sigmaMajorAxis, 
+        Float_t chiSquare, Int_t ndof)
+{
+     fMagFit = mag;
+     fMaxFit = max;
+     fMeanXFit = x;
+     fMeanYFit = y;
+     fSigmaMinorAxisFit = sigmaMinorAxis;
+     fSigmaMajorAxisFit = sigmaMajorAxis;
+     fChiSquare = chiSquare;
+     fNdof = ndof;
+}
+
+void MStarPos::SetFitValues(Float_t mag, Float_t max, 
+        Float_t x, Float_t y, Float_t sigmaMinorAxis, Float_t sigmaMajorAxis, 
+        Float_t chiSquare, Int_t ndof, 
+        Float_t xx, Float_t xy, Float_t yy)
+{
+  SetFitValues(mag, max, x, y, sigmaMinorAxis, sigmaMajorAxis, chiSquare, ndof);
+  fXXErr = xx;
+  fYYErr = yy;
+  fXYErr = xy;
+}
+
+void MStarPos::SetCGFitValues(
+               Float_t mag,       Float_t max,    Float_t x,    Float_t y, 
+               Float_t sigmaX,    Float_t sigmaY, Float_t correlation, 
+               Float_t xx,        Float_t xy,     Float_t yy,
+               Float_t chiSquare, Int_t ndof)
+{
+     fMagCGFit    = mag;
+     fMaxCGFit    = max;
+     fMeanXCGFit  = x;
+     fMeanYCGFit  = y;
+     fSigmaXCGFit = sigmaX;
+     fSigmaYCGFit = sigmaY;
+     fCorrXYCGFit = correlation;
+     fXXErrCGFit  = xx;
+     fXYErrCGFit  = xy;
+     fYYErrCGFit  = yy;
+
+     fChiSquareCGFit = chiSquare;
+     fNdofCGFit      = ndof;
+}
+
+
+// --------------------------------------------------------------------------
+//
+// Paint the ellipse corresponding to the parameters
+//
+void MStarPos::Paint(Option_t *opt)
+{
+  //Print a cross in the expected position
+  TMarker mexp(fXExp, fYExp, 29);
+  mexp.SetMarkerSize(3);
+  mexp.SetMarkerColor(94);
+  mexp.Paint(); 
+
+  if (fSigmaMinorAxisCalc>0. && fSigmaMajorAxisCalc>0.)
+    {
+      TEllipse ecalc(fMeanXCalc, fMeanYCalc, fSigmaMinorAxisCalc, fSigmaMajorAxisCalc, 0, 360, 0);
+      ecalc.SetLineWidth(3);
+      ecalc.SetLineColor(kBlue);
+      ecalc.Paint();
+    }
+
+  if (fSigmaMinorAxisFit>0. && fSigmaMajorAxisFit>0.)
+    {
+      TEllipse efit(fMeanXFit, fMeanYFit, fSigmaMinorAxisFit, fSigmaMajorAxisFit, 0, 360, 0);
+      efit.SetLineWidth(3);
+      efit.SetLineColor(kBlack);
+      efit.Paint();
+    }
+
+  if (fSigmaXCGFit>0. && fSigmaYCGFit>0.)
+    {
+      //Print a cross in the fitted position
+      //TMarker mCGFit(fMeanXCGFit, fMeanYCGFit, 3);
+      //mCGFit.SetMarkerSize(3);
+      //mCGFit.SetMarkerColor(1);
+      //mCGFit.Paint(); 
+
+      Double_t cxx = fSigmaXCGFit*fSigmaXCGFit;
+      Double_t cyy = fSigmaYCGFit*fSigmaYCGFit;
+      Double_t d   = cyy - cxx;
+      Double_t cxy = fCorrXYCGFit * fSigmaXCGFit * fSigmaYCGFit;
+      Double_t tandel;
+      if (cxy != 0.0)
+        tandel = ( d + sqrt(d*d + 4.0*cxy*cxy) ) / (2.0*cxy); 
+      else
+        tandel = 0.0;
+
+      Double_t sindel = tandel / sqrt(1.0 + tandel*tandel);
+      Double_t delta = TMath::ASin(sindel);
+
+      Double_t major =   (cxx + 2.0*tandel*cxy + tandel*tandel*cyy)
+	                / (1.0 + tandel*tandel);  
+
+      Double_t minor =   (tandel*tandel*cxx - 2.0*tandel*cxy + cyy)
+	                / (1.0 + tandel*tandel);  
+
+      TEllipse efit(fMeanXCGFit, fMeanYCGFit, sqrt(major), sqrt(minor), 
+                    0, 360,      delta*kRad2Deg);
+      efit.SetLineWidth(3);
+      efit.SetLineColor(kMagenta);
+      efit.Paint();
+    }
+}
+  
+void MStarPos::Print(Option_t *opt) const
+{
+  TString o = opt;
+
+  if (o.Contains("name", TString::kIgnoreCase) || opt == NULL)
+    {
+      *fLog << inf << "Star Name: \"" << this->GetName() << "\"" << endl;
+    }
+      
+  if (o.Contains("mag", TString::kIgnoreCase) || opt == NULL)
+    {
+  
+      *fLog << inf << "Star magnitude:" << endl;
+      *fLog << inf << " Expected \t" << setw(4) << fMagExp << endl;
+      *fLog << inf << " Calcultated \t " << setw(4) << fMagCalc << endl;
+      *fLog << inf << " Fitted \t " << setw(4) << fMagFit << endl;
+      *fLog << inf << " CGFitted \t " << setw(4) << fMagCGFit << endl;
+    }
+  
+  if (o.Contains("max", TString::kIgnoreCase) || opt == NULL)
+    {
+      *fLog << inf << "Star Maximum:" << endl;
+      *fLog << inf << " Calcultated \t " << setw(4) << fMaxCalc << " uA" 
+            << endl;
+      *fLog << inf << " Fitted \t " << setw(4) << fMaxFit << " uA" << endl;
+      *fLog << inf << " CGFitted \t " << setw(4) << fMaxCGFit << " uA" << endl;
+    }
+  
+  if (o.Contains("pos", TString::kIgnoreCase) || opt == NULL)
+    {
+      *fLog << inf << "Star position:" << endl;
+      *fLog << inf << " Expected \t X " << setw(4) << fXExp 
+            << " mm \tY " << setw(4) << fYExp << " mm" << endl;
+      *fLog << inf << " Calcultated \t X " << setw(4) << fMeanXCalc 
+            << " mm \tY " << setw(4) << fMeanYCalc << " mm" << endl;
+      *fLog << inf << " Fitted \t X " << setw(4) << fMeanXFit 
+            << " mm \tY " << setw(4) << fMeanYFit << " mm" << endl;
+      *fLog << inf << " CGFitted \t X " << setw(4) << fMeanXCGFit 
+            << " mm \tY " << setw(4) << fMeanYCGFit << " mm" << endl;
+    }
+
+  if (o.Contains("siz", TString::kIgnoreCase) || opt == NULL)
+    {
+      *fLog << inf << "Star size:" << endl;
+      *fLog << inf << " Calcultated \t X " << setw(4) << fSigmaMinorAxisCalc 
+            << " mm \tY " << setw(4) << fSigmaMajorAxisCalc << " mm" << endl;
+      *fLog << inf << " Fitted \t X " << setw(4) << fSigmaMinorAxisFit 
+            << " mm \tY " << setw(4) << fSigmaMajorAxisFit << " mm" << endl;
+      *fLog << inf << " CGFitted \t X " << setw(4) << fSigmaXCGFit 
+            << " mm \tY " << setw(4) << fSigmaYCGFit << " mm \t correlation" 
+            << setw(4) << fCorrXYCGFit << endl;
+    }
+
+  if (o.Contains("chi", TString::kIgnoreCase) || opt == NULL)
+    {
+      *fLog << inf << "Star Fit Quality:" << endl;
+      *fLog << inf << " ChiSquare/Ndof \t " << setw(3) << fChiSquare 
+            << "/" << fNdof << endl;
+
+      *fLog << inf << "Star CGFit Quality:" << endl;
+      *fLog << inf << " ChiSquareCGFit/NdofCGFit \t " << setw(3) 
+            << fChiSquareCGFit << "/" << fNdofCGFit << endl;
+    }
+
+  if (o.Contains("err", TString::kIgnoreCase) || opt == NULL)
+    {
+      *fLog << inf << "CGFit Error Matrix of (fMeanXCGFit,fMeanYCGFit) :" 
+            << endl;
+      *fLog << inf << " xx,xy,yy \t " << setw(3) << fXXErrCGFit << ", " 
+            << fXYErrCGFit << ", " << fYYErrCGFit << endl;
+    }
+
+
+}
+//--------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
Index: trunk/MagicSoft/Mars/mstarcam/MStarPos.h
===================================================================
--- trunk/MagicSoft/Mars/mstarcam/MStarPos.h	(revision 4667)
+++ trunk/MagicSoft/Mars/mstarcam/MStarPos.h	(revision 4667)
@@ -0,0 +1,142 @@
+#ifndef MARS_MStarPos
+#define MARS_MStarPos
+
+#ifndef MARS_MParContainer
+#include "MParContainer.h"
+#endif
+
+class MStarPos : public MParContainer
+{
+private:
+
+    //Expected position on camera
+    Float_t fMagExp;
+    Float_t fXExp;    //[mm]
+    Float_t fYExp;    //[mm]
+
+    //Ideal position on camera
+    Float_t fMagIdeal;
+    Float_t fXIdeal;    //[mm]
+    Float_t fYIdeal;    //[mm]
+
+    //Info from calculation
+    Float_t fMagCalc;
+    Float_t fMaxCalc;            //[uA]
+    Float_t fMeanXCalc;          //[mm]
+    Float_t fMeanYCalc;          //[mm]
+    Float_t fSigmaMinorAxisCalc; //[mm]
+    Float_t fSigmaMajorAxisCalc; //[mm]
+
+    //Info from uncorrelated Gauss fit
+    Float_t fMagFit;
+    Float_t fMaxFit;             //[uA]
+    Float_t fMeanXFit;           //[mm]
+    Float_t fMeanYFit;           //[mm]
+    Float_t fSigmaMinorAxisFit;  //[mm]
+    Float_t fSigmaMajorAxisFit;  //[mm]
+    Float_t fXXErr;          
+    Float_t fXYErr;
+    Float_t fYYErr;
+
+    Float_t fChiSquare;
+    Int_t   fNdof;
+
+    //Info from correlated Gauss fit
+    Float_t fMagCGFit;
+    Float_t fMaxCGFit;             //[uA]
+    Float_t fMeanXCGFit;           //[mm]
+    Float_t fMeanYCGFit;           //[mm]
+    Float_t fSigmaXCGFit;          //[mm]
+    Float_t fSigmaYCGFit;          //[mm]
+    Float_t fCorrXYCGFit;          // correlation coefficient
+    Float_t fXXErrCGFit;           // error matrix of (fMeanXCGFit,fMeanYCGFit)
+    Float_t fXYErrCGFit;
+    Float_t fYYErrCGFit;
+
+    Float_t fChiSquareCGFit;
+    Int_t   fNdofCGFit;
+
+
+public:
+
+    MStarPos(const char *name=NULL, const char *title=NULL);
+    //~MStarPos();
+
+    Float_t GetMagExp() {return fMagExp;}
+    Float_t GetXExp() {return fXExp;}
+    Float_t GetYExp() {return fYExp;}
+
+    Float_t GetMagIdeal() {return fMagIdeal;}
+    Float_t GetXIdeal() {return fXIdeal;}
+    Float_t GetYIdeal() {return fYIdeal;}
+
+    Float_t GetMagCalc() {return fMagCalc;}
+    Float_t GetMaxCalc() {return fMaxCalc;}
+    Float_t GetMeanXCalc() {return fMeanXCalc;}
+    Float_t GetMeanYCalc() {return fMeanYCalc;}
+    Float_t GetSigmaMinorAxisCalc() {return fSigmaMinorAxisCalc;}
+    Float_t GetSigmaMajorAxisCalc() {return fSigmaMajorAxisCalc;}
+
+    Float_t GetMagFit() {return fMagFit;}
+    Float_t GetMaxFit() {return fMaxFit;}
+    Float_t GetMeanXFit() {return fMeanXFit;}
+    Float_t GetMeanYFit() {return fMeanYFit;}
+    Float_t GetSigmaMinorAxisFit() {return fSigmaMinorAxisFit;}
+    Float_t GetSigmaMajorAxisFit() {return fSigmaMajorAxisFit;}
+    Float_t GetChiSquare() {return fChiSquare;}
+    UInt_t GetNdof() {return fNdof;}
+    Float_t GetChiSquareNdof() {return fChiSquare/fNdof;}
+
+    Float_t GetMeanX() {return fMeanXFit!=0?fMeanXFit:fMeanXCalc;}
+    Float_t GetMeanY() {return fMeanXFit!=0?fMeanYFit:fMeanYCalc;}
+    Float_t GetSigmaMinorAxis() {return fSigmaMinorAxisFit!=0?fSigmaMinorAxisFit:fSigmaMinorAxisCalc;}
+    Float_t GetSigmaMajorAxis() {return fSigmaMajorAxisFit!=0?fSigmaMajorAxisFit:fSigmaMajorAxisCalc;}
+    
+    // getters for the correlated Gauss fit
+    Float_t GetMagCGFit()           {return fMagCGFit;}
+    Float_t GetMaxCGFit()           {return fMaxCGFit;}
+    Float_t GetMeanXCGFit()         {return fMeanXCGFit;}
+    Float_t GetMeanYCGFit()         {return fMeanYCGFit;}
+    Float_t GetSigmaXCGFit()        {return fSigmaXCGFit;}
+    Float_t GetSigmaYCGFit()        {return fSigmaYCGFit;}
+    Float_t GetCorrXYCGFit()        {return fCorrXYCGFit;}
+    Float_t GetXXErrCGFit()         {return fXXErrCGFit;}
+    Float_t GetXYErrCGFit()         {return fXYErrCGFit;}
+    Float_t GetYYErrCGFit()         {return fYYErrCGFit;}
+    Float_t GetChiSquareCGFit()     {return fChiSquareCGFit;}
+    UInt_t GetNdofCGFit()           {return fNdofCGFit;}
+    Float_t GetChiSquareNdofCGFit() {return fChiSquareCGFit/fNdofCGFit;}
+
+
+    void Reset();
+
+    void SetExpValues(Float_t mag, Float_t x, Float_t y);
+
+    void SetIdealValues(Float_t mag, Float_t x, Float_t y);
+
+    void SetCalcValues(Float_t mag, Float_t max, Float_t x, Float_t y, 
+                       Float_t sigmaMinorAxis, Float_t sigmaMajorAxis);
+
+    void SetFitValues(Float_t mag, Float_t max, Float_t x, Float_t y, 
+                      Float_t sigmaMinorAxis, Float_t sigmaMajorAxis, 
+                      Float_t chi, Int_t ndof);
+
+    void SetFitValues(Float_t mag, Float_t max, Float_t x, Float_t y, 
+                      Float_t sigmaX, Float_t sigmaY, 
+                      Float_t chi, Int_t ndof, 
+                      Float_t xx, Float_t xy, Float_t yy);
+
+    void SetCGFitValues(Float_t mag, Float_t max, Float_t x, Float_t y, 
+                        Float_t sigmaX, Float_t sigmaY, Float_t correlation, 
+                        Float_t xx, Float_t xy, Float_t yy,
+                        Float_t chi, Int_t ndof);
+
+    void Paint(Option_t *opt=NULL);
+    void Print(Option_t *opt=NULL) const;
+
+    ClassDef(MStarPos, 1) // Container that holds the star information in the PMT camera
+};
+
+#endif
+
+
Index: trunk/MagicSoft/Mars/mstarcam/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mstarcam/Makefile	(revision 4667)
+++ trunk/MagicSoft/Mars/mstarcam/Makefile	(revision 4667)
@@ -0,0 +1,46 @@
+##################################################################
+#
+#   subdirectory makefile
+# 
+#   for the MARS software
+#
+##################################################################
+include ../Makefile.conf.$(OSTYPE)
+include ../Makefile.conf.general
+
+#------------------------------------------------------------------------------
+
+INCLUDES = -I. \
+           -I../mbase \
+           -I../mjobs \
+           -I../mpedestal \
+           -I../mbadpixels \
+           -I../mfileio \
+           -I../mraw \
+           -I../manalysis \
+           -I../mgui \
+           -I../mgeom \
+           -I../msignal \
+           -I../mcalib \
+           -I../mfilter \
+           -I../mhbase \
+           -I../mimage \
+           -I../mpointing \
+           -I../mcamera \
+           -I../mhist \
+           -I../mmc \
+           -I../mreport \
+           -I../mastro
+
+CINT = Starcam
+
+SRCFILES = MStarCam.cc \
+	   MStarPos.cc
+
+############################################################
+
+all: $(OBJS)
+
+include ../Makefile.rules
+
+mrproper:	clean rmbak
Index: trunk/MagicSoft/Mars/mstarcam/StarcamIncl.h
===================================================================
--- trunk/MagicSoft/Mars/mstarcam/StarcamIncl.h	(revision 4667)
+++ trunk/MagicSoft/Mars/mstarcam/StarcamIncl.h	(revision 4667)
@@ -0,0 +1,3 @@
+#ifndef __CINT__
+
+#endif // __CINT__
Index: trunk/MagicSoft/Mars/mstarcam/StarcamLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mstarcam/StarcamLinkDef.h	(revision 4667)
+++ trunk/MagicSoft/Mars/mstarcam/StarcamLinkDef.h	(revision 4667)
@@ -0,0 +1,11 @@
+#ifdef __CINT__
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class MStarPos+;
+#pragma link C++ class MStarCam+;
+
+#endif
+
