Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 4976)
+++ trunk/MagicSoft/Mars/Changelog	(revision 4977)
@@ -30,4 +30,5 @@
 
 
+
  2004/09/13: Markus Gaug 
  
@@ -41,4 +42,6 @@
 	     
 
+
+
  2004/09/13: Thomas Bretz
 
@@ -69,4 +72,5 @@
      - fixed number of bins
      - remove first edge when finalizing
+     - added plots for lambda and NDF
 
    * mjobs/MJStar.cc:
@@ -112,4 +116,12 @@
      - removed some obsolete (empty) destructors
 
+   * mastro/MVector3.[h,cc]:
+     - added from MAstroCatalog
+
+   * mastro/MAstroCatalog.[h,cc]:
+     - removed MVector3
+
+   * mastro/Makefile:
+     - added MVector3
 
 
Index: trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc
===================================================================
--- trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc	(revision 4976)
+++ trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc	(revision 4977)
@@ -154,32 +154,7 @@
 #endif
 
-ClassImp(MVector3);
 ClassImp(MAstroCatalog);
 
 using namespace std;
-
-void MVector3::WriteBinary(ostream &out) const
-{
-    const Double_t t = Theta();
-    const Double_t p = Phi();
-    const Float_t  m = Mag();
-    out.write((char*)&t, 8);
-    out.write((char*)&p, 8);
-    out.write((char*)&m, 4);
-    out << fName << endl;
-}
-
-void MVector3::ReadBinary(istream &in)
-{
-    Double_t t, p;
-    Float_t  m;
-
-    in.read((char*)&t, 8);
-    in.read((char*)&p, 8);
-    in.read((char*)&m, 4);
-    fName.ReadLine(in);
-
-    SetMagThetaPhi(m, t, p);
-}
 
 // --------------------------------------------------------------------------
Index: trunk/MagicSoft/Mars/mastro/MAstroCatalog.h
===================================================================
--- trunk/MagicSoft/Mars/mastro/MAstroCatalog.h	(revision 4976)
+++ trunk/MagicSoft/Mars/mastro/MAstroCatalog.h	(revision 4977)
@@ -2,6 +2,6 @@
 #define MARS_MAstroCatalog
 
-#ifndef ROOT_TVector3
-#include <TVector3.h>
+#ifndef MARS_MVector3
+#include "MVector3.h"
 #endif
 #ifndef ROOT_TList
@@ -16,50 +16,4 @@
 class TArrayI;
 class TGToolTip;
-
-class MVector3 : public TVector3
-{
-private:
-    enum VectorType_t
-    {
-        kIsInvalid,
-        kIsRaDec,
-        kIsZdAz,
-        kIsAltAz,
-        kIsArbitrary
-    };
-
-    VectorType_t fType;
-
-    TString fName;
-
-public:
-    MVector3() { fType=kIsInvalid; }
-    MVector3(const TVector3 &v3) : TVector3(v3) { fType=kIsArbitrary; }
-    Double_t Magnitude() const { return -2.5*TMath::Log10(Mag()); }
-
-    void SetRaDec(Double_t ra, Double_t dec, Double_t mag=0)
-    {
-        fType = kIsRaDec;
-        SetMagThetaPhi(pow(10, -mag/2.5), TMath::Pi()/2-dec, ra);
-    }
-    void SetName(const TString &str) { fName = str.Strip(TString::kBoth); }
-    void SetZdAz(Double_t zd, Double_t az, Double_t mag=0)
-    {
-        fType = kIsZdAz;
-        SetMagThetaPhi(pow(10, -mag/2.5), zd, az);
-    }
-    void SetAltAz(Double_t alt, Double_t az, Double_t mag=0)
-    {
-        fType = kIsAltAz;
-        SetMagThetaPhi(pow(10, -mag/2.5), TMath::Pi()/2-alt, az);
-    }
-
-    const char *GetName() const { return fName; }
-
-    void WriteBinary(ostream &out) const;
-    void ReadBinary(istream &in);
-
-    ClassDef(MVector3, 1) // A specialized TVector3 storing a star-name
-};
 
 class MAstroCatalog : public TObject
Index: trunk/MagicSoft/Mars/mastro/MVector3.cc
===================================================================
--- trunk/MagicSoft/Mars/mastro/MVector3.cc	(revision 4977)
+++ trunk/MagicSoft/Mars/mastro/MVector3.cc	(revision 4977)
@@ -0,0 +1,64 @@
+/* ======================================================================== *\
+!
+! *
+! * 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): Thomas Bretz, 03/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2002-2004
+!
+!
+\* ======================================================================== */
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//  MVector3
+//  ========
+//
+//////////////////////////////////////////////////////////////////////////////
+#include "MVector3.h"
+
+#include <iostream>
+
+#include "MLog.h"
+#include "MLogManip.h"
+
+ClassImp(MVector3);
+
+using namespace std;
+
+void MVector3::WriteBinary(ostream &out) const
+{
+    const Double_t t = Theta();
+    const Double_t p = Phi();
+    const Float_t  m = Mag();
+    out.write((char*)&t, 8);
+    out.write((char*)&p, 8);
+    out.write((char*)&m, 4);
+    out << fName << endl;
+}
+
+void MVector3::ReadBinary(istream &in)
+{
+    Double_t t, p;
+    Float_t  m;
+
+    in.read((char*)&t, 8);
+    in.read((char*)&p, 8);
+    in.read((char*)&m, 4);
+    fName.ReadLine(in);
+
+    SetMagThetaPhi(m, t, p);
+}
Index: trunk/MagicSoft/Mars/mastro/MVector3.h
===================================================================
--- trunk/MagicSoft/Mars/mastro/MVector3.h	(revision 4977)
+++ trunk/MagicSoft/Mars/mastro/MVector3.h	(revision 4977)
@@ -0,0 +1,64 @@
+#ifndef MARS_MVector3
+#define MARS_MVector3
+
+#ifndef ROOT_TVector3
+#include <TVector3.h>
+#endif
+
+class MVector3 : public TVector3
+{
+private:
+    enum VectorType_t
+    {
+        kIsInvalid,
+        kIsRaDec,
+        kIsZdAz,
+        kIsAltAz,
+        kIsArbitrary
+    };
+
+    VectorType_t fType;
+
+    TString fName;
+
+    void SetThetaPhiMag(Double_t theta, Double_t phi, Double_t mag)
+    {
+        SetMagThetaPhi(TMath::Power(10, -mag/2.5), theta, phi);
+    }
+
+public:
+    MVector3() { fType=kIsInvalid; }
+    MVector3(Double_t theta, Double_t phi, Double_t mag=0)
+    {
+        SetThetaPhiMag(theta, phi, mag);
+        fType=kIsArbitrary;
+    }
+    MVector3(const TVector3 &v3) : TVector3(v3) { fType=kIsArbitrary; }
+    Double_t Magnitude() const { return -2.5*TMath::Log10(Mag()); }
+
+    void SetRaDec(Double_t ra, Double_t dec, Double_t mag=0)
+    {
+        fType = kIsRaDec;
+        SetThetaPhiMag(TMath::Pi()/2-dec, ra, mag);
+    }
+    void SetName(const TString &str) { fName = str.Strip(TString::kBoth); }
+    void SetZdAz(Double_t zd, Double_t az, Double_t mag=0)
+    {
+        fType = kIsZdAz;
+        SetThetaPhiMag(zd, az, mag);
+    }
+    void SetAltAz(Double_t alt, Double_t az, Double_t mag=0)
+    {
+        fType = kIsAltAz;
+        SetThetaPhiMag(TMath::Pi()/2-alt, az, mag);
+    }
+
+    const char *GetName() const { return fName; }
+
+    void WriteBinary(ostream &out) const;
+    void ReadBinary(istream &in);
+
+    ClassDef(MVector3, 1) // A specialized TVector3 storing a star-name
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mastro/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mastro/Makefile	(revision 4976)
+++ trunk/MagicSoft/Mars/mastro/Makefile	(revision 4977)
@@ -22,5 +22,6 @@
 # mgeom (MAstroCamera): MGeomCam, MGeomMirror
 
-SRCFILES = MAstro.cc \
+SRCFILES = MVector3.cc \
+	   MAstro.cc \
 	   MAstroSky2Local.cc \
 	   MAstroCatalog.cc \
