Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 1393)
+++ trunk/MagicSoft/Mars/Changelog	(revision 1394)
@@ -1,3 +1,21 @@
                                                                   -*-*- END -*-*-
+ 2002/07/10: Thomas Bretz
+
+   * mmain/Makefile:
+     - added -I../mfileio
+
+   * manalysis/MCerPhotPix.h:
+     - renamed IsCorePixel to IsPixelCore
+     - renamed SetCorePixel to SetPixelCore
+
+   * manalysis/MHillas.[h,cc]:
+     - added fNumCorePixel
+     - added fNumUsedPixel
+
+   * manalysis/MImgCleanStd.cc:
+     - renamed IsCorePixel and SetCorePixel
+
+
+
  2002/07/08: Thomas Bretz
 
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 1393)
+++ trunk/MagicSoft/Mars/NEWS	(revision 1394)
@@ -31,4 +31,7 @@
    
    - Added three buttons to the camera display to change the palette
+
+   - Added the number of used and core pixels after image cleaning
+     to MHillas
 
 
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 1393)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 1394)
@@ -143,5 +143,5 @@
         const MCerPhotPix &pix = (*this)[i];
 
-        if (id == pix.GetPixId() && pix.IsCorePixel())
+        if (id == pix.GetPixId() && pix.IsPixelCore())
             return kTRUE;
     } 
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotPix.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotPix.h	(revision 1393)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotPix.h	(revision 1394)
@@ -34,6 +34,6 @@
     void    SetPixelUsed()           { fIsUsed = kTRUE;  }
 
-    void    SetCorePixel()           { fIsCore = kTRUE; }
-    Bool_t  IsCorePixel() const      { return fIsCore;  }
+    void    SetPixelCore()           { fIsCore = kTRUE; }
+    Bool_t  IsPixelCore() const      { return fIsCore;  }
 
     void    SetNumPhotons(Float_t f) { fPhot    = f; }
Index: trunk/MagicSoft/Mars/manalysis/MHillas.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MHillas.cc	(revision 1393)
+++ trunk/MagicSoft/Mars/manalysis/MHillas.cc	(revision 1394)
@@ -32,4 +32,7 @@
 //
 //    basic image parameters
+//
+// Version 1:
+// ----------
 // fLength   major axis of ellipse
 // fWidth    minor axis
@@ -39,4 +42,9 @@
 // fMeanY    y of center of ellipse
 //
+// Version 2:
+// ----------
+// fNumCorePixels  number of pixels called core
+// fNumUsedPixels  number of pixels which survived the cleaning
+//
 /////////////////////////////////////////////////////////////////////////////
 #include "MHillas.h"
@@ -88,7 +96,11 @@
     fWidth  = 0;
     fDelta  = 0;
-    fSize   = 0;
-    fMeanX  = 0;
-    fMeanY  = 0;
+
+    fSize   = -1;
+    fMeanX  = -1;
+    fMeanY  = -1;
+
+    fNumUsedPixels = -1;
+    fNumCorePixels = -1;
 
     Clear();
@@ -220,8 +232,10 @@
     fSize  = 0;
 
+    fNumUsedPixels = 0;
+    fNumCorePixels = 0;
+
     //
     // FIXME! npix should be retrieved from MCerPhotEvt
     //
-    UShort_t npix=0;
     for (UInt_t i=0; i<npixevt; i++)
     {
@@ -239,5 +253,8 @@
         fMeanY += nphot * gpix.GetY();               // [mm]
 
-        npix++;
+        if (pix.IsPixelCore())
+            fNumCorePixels++;
+
+        fNumUsedPixels++;
     }
 
@@ -245,5 +262,5 @@
     // sanity check
     //
-    if (fSize==0 || npix<=2)
+    if (fSize==0 || fNumUsedPixels<=2)
         return kFALSE;
 
Index: trunk/MagicSoft/Mars/manalysis/MHillas.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MHillas.h	(revision 1393)
+++ trunk/MagicSoft/Mars/manalysis/MHillas.h	(revision 1394)
@@ -24,4 +24,7 @@
     Float_t   fSinDelta; //! [1] sin of Delta (to be used in derived classes)
     Float_t   fCosDelta; //! [1] cos of Delta (to be used in derived classes)
+
+    Short_t fNumUsedPixels; // Number of pixels which survived the image cleaning
+    Short_t fNumCorePixels; // number of core pixels
 
     TEllipse *fEllipse;  //! Graphical Object to Display Ellipse
@@ -56,8 +59,11 @@
     Float_t GetMeanY() const  { return fMeanY; }
 
+    Int_t GetNumUsedPixels() const { return fNumUsedPixels; }
+    Int_t GetNumCorePixels() const { return fNumCorePixels; }
+
     virtual void AsciiRead(ifstream &fin);
     //virtual void AsciiWrite(ofstream &fout) const;
 
-    ClassDef(MHillas, 1) // Storage Container for Hillas Parameter
+    ClassDef(MHillas, 2) // Storage Container for Hillas Parameter
 };
 
Index: trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc	(revision 1393)
+++ trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc	(revision 1394)
@@ -187,5 +187,5 @@
 
         if (pix.IsPixelUsed())
-            pix.SetCorePixel();
+            pix.SetPixelCore();
     }
 } 
@@ -211,5 +211,5 @@
         // if pixel is a core pixel go to the next pixel
         //
-        if (pix.IsCorePixel())
+        if (pix.IsPixelCore())
             continue;
 
Index: trunk/MagicSoft/Mars/mmain/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mmain/Makefile	(revision 1393)
+++ trunk/MagicSoft/Mars/mmain/Makefile	(revision 1394)
@@ -23,5 +23,5 @@
 #
 INCLUDES = -I. -I../mbase -I../manalysis -I../mdatacheck -I../meventdisp \
-	   -I../mgui -I../mhist -I../mmontecarlo
+	   -I../mgui -I../mhist -I../mmontecarlo -I../mfileio
 
 #------------------------------------------------------------------------------
