Index: /trunk/Mars/mimage/MHillas.cc
===================================================================
--- /trunk/Mars/mimage/MHillas.cc	(revision 19157)
+++ /trunk/Mars/mimage/MHillas.cc	(revision 19158)
@@ -291,7 +291,9 @@
             continue;
 
+        const Float_t nphot = pix.GetNumPhotons();   // [#phot]
+        if (nphot<0)
+            continue;
+
         const MGeom &gpix = geom[i];
-
-        const Float_t nphot = pix.GetNumPhotons();
 
         fSize  += nphot;		             // [counter]
@@ -339,10 +341,12 @@
             continue;
 
+        const Float_t nphot = pix.GetNumPhotons();   // [#phot]
+        if (nphot<0)
+            continue;
+
         const MGeom &gpix = geom[i];
 
         const Float_t dx = gpix.GetX() - fMeanX;     // [mm]
         const Float_t dy = gpix.GetY() - fMeanY;     // [mm]
-
-        const Float_t nphot = pix.GetNumPhotons();   // [#phot]
 
         corrxx += nphot * dx*dx;                     // [mm^2]
Index: /trunk/Mars/mimage/MHillasExt.cc
===================================================================
--- /trunk/Mars/mimage/MHillasExt.cc	(revision 19157)
+++ /trunk/Mars/mimage/MHillasExt.cc	(revision 19158)
@@ -191,4 +191,8 @@
             continue;
 
+        Double_t nphot = pix.GetNumPhotons();   // [#phot]
+        if (nphot<0)
+            continue;
+
         const MGeom &gpix = geom[i];
 
@@ -196,6 +200,4 @@
         const Double_t y = gpix.GetY();
         const Double_t t = pix.GetArrivalTime();
-
-        Double_t nphot = pix.GetNumPhotons();        // [1]
 
         // --- time slope ----
Index: /trunk/Mars/mimage/MNewImagePar.cc
===================================================================
--- /trunk/Mars/mimage/MNewImagePar.cc	(revision 19157)
+++ /trunk/Mars/mimage/MNewImagePar.cc	(revision 19158)
@@ -159,4 +159,9 @@
             continue;
 
+        // signal in pixel
+        Double_t nphot = pix.GetNumPhotons();
+        if (nphot<0)
+            continue;
+
         // Get geometry of pixel
         const MGeom &gpix = geom[i];
@@ -211,7 +216,4 @@
         fNumUsedPixels++;
         fUsedArea += gpix.GetA();
-
-        // signal in pixel
-        Double_t nphot = pix.GetNumPhotons();
 
         //
