Index: trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc	(revision 1572)
+++ trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc	(revision 1574)
@@ -93,5 +93,8 @@
 Bool_t MBlindPixelCalc::PreProcess (MParList *pList)
 {
-    fPixels = (MBlindPixels*)pList->FindCreateObj("MBlindPixels");
+    if (TESTBIT(fFlags, kUseBlindPixels))
+        fPixels = (MBlindPixels*)pList->FindObject("MBlindPixels");
+    else
+        fPixels = (MBlindPixels*)pList->FindCreateObj("MBlindPixels");
     if (!fPixels)
 	return kFALSE; 
@@ -106,5 +109,8 @@
     fGeomCam = (MGeomCam*)pList->FindObject("MGeomCam");
     if (!fGeomCam)
-        *fLog << warn << dbginf << "No camera geometry available... can't ude interpolation." << endl;
+        *fLog << warn << dbginf << "No camera geometry available... can't use interpolation." << endl;
+
+    if (TESTBIT(fFlags, kUseBlindPixels))
+        return kTRUE;
 
     const UShort_t size = fPixelsID.GetSize();
@@ -162,6 +168,6 @@
         Int_t num = TESTBIT(fFlags, kUseCentralPixel) ? 1 : 0;
 
-        nphot[i] = TESTBIT(fFlags, kUseCentralPixel) ? (*fEvt)[id].GetNumPhotons() : 0;
-        perr[i]  = TESTBIT(fFlags, kUseCentralPixel) ? (*fEvt)[id].GetErrorPhot()  : 0;
+        nphot[i] = TESTBIT(fFlags, kUseCentralPixel) ? pix.GetNumPhotons() : 0;
+        perr[i]  = TESTBIT(fFlags, kUseCentralPixel) ? pix.GetErrorPhot()  : 0;
         for (int j=0; j<n; j++)
         {
@@ -171,7 +177,10 @@
                 continue;
 
-            nphot[i] += (*fEvt)[nid].GetNumPhotons();
-            perr[i]  += (*fEvt)[nid].GetErrorPhot();
-
+            const MCerPhotPix *evtpix = fEvt->GetPixById(nid);
+            if (evtpix)
+            {
+                nphot[i] += evtpix->GetNumPhotons();
+                perr[i]  += evtpix->GetErrorPhot();
+            }
             num++;
         }
@@ -253,4 +262,7 @@
 Bool_t MBlindPixelCalc::ReInit(MParList *pList)
 {
+    if (TESTBIT(fFlags, kUseBlindPixels))
+        return kTRUE;
+
     //
     // If pixels are given by the user, we are already done
Index: trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.h	(revision 1572)
+++ trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.h	(revision 1574)
@@ -28,5 +28,6 @@
     {
         kUseInterpolation = 1,
-        kUseCentralPixel  = 2
+        kUseCentralPixel  = 2,
+        kUseBlindPixels   = 3
     };
 
@@ -46,4 +47,8 @@
         b ? SETBIT(fFlags, kUseCentralPixel) : CLRBIT(fFlags, kUseCentralPixel);
     }
+    void SetUseBlindPixels(Bool_t b=kTRUE)
+    {
+        b ? SETBIT(fFlags, kUseBlindPixels) : CLRBIT(fFlags, kUseBlindPixels);
+    }
 
     Bool_t PreProcess(MParList *pList);
Index: trunk/MagicSoft/Mars/manalysis/MCameraSmooth.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCameraSmooth.cc	(revision 1572)
+++ trunk/MagicSoft/Mars/manalysis/MCameraSmooth.cc	(revision 1574)
@@ -111,16 +111,23 @@
             const Int_t n = gpix.GetNumNeighbors();
 
-            photons[i] = fUseCentralPixel ? (*fEvt)[id].GetNumPhotons() : 0;
-            errors[i]  = fUseCentralPixel ? (*fEvt)[id].GetErrorPhot()  : 0;
+            Int_t num  = fUseCentralPixel ? 1 : 0;
+            photons[i] = fUseCentralPixel ? pix.GetNumPhotons() : 0;
+            errors[i]  = fUseCentralPixel ? pix.GetErrorPhot()  : 0;
+
             for (int j=0; j<n; j++)
             {
                 const UShort_t nid = gpix.GetNeighbor(j);
 
-                photons[i] += (*fEvt)[nid].GetNumPhotons();
-                errors[i]  += (*fEvt)[nid].GetErrorPhot();
+                const MCerPhotPix *evtpix = fEvt->GetPixById(nid);
+                if (evtpix)
+                {
+                    photons[i] += evtpix->GetNumPhotons();
+                    errors[i]  += evtpix->GetErrorPhot();
+                }
+                num++;
             }
 
-            photons[i] /= fUseCentralPixel ? n+1 : n;
-            errors[i]  /= fUseCentralPixel ? n+1 : n;
+            photons[i] /= num;
+            errors[i]  /= num;
         }
 
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 1572)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 1574)
@@ -306,2 +306,18 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Return a pointer to the pixel with the requested id. NULL if it doesn't
+// exist.
+//
+MCerPhotPix *MCerPhotEvt::GetPixById(int id) const
+{
+    TIter Next(fPixels);
+    MCerPhotPix *pix = NULL;
+
+    while ((pix=(MCerPhotPix*)Next()))
+        if (pix->GetPixId()==id)
+            return pix;
+
+    return NULL;
+}
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h	(revision 1572)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h	(revision 1574)
@@ -47,4 +47,6 @@
     MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
 
+    MCerPhotPix *GetPixById(int id) const;
+
     void Reset();
 
Index: trunk/MagicSoft/Mars/manalysis/MCompProbCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCompProbCalc.cc	(revision 1572)
+++ trunk/MagicSoft/Mars/manalysis/MCompProbCalc.cc	(revision 1574)
@@ -77,5 +77,5 @@
 //  - MHCompProb
 //  - all data values which were used to build the MHCompProb
-//  - MHadroness
+//  - MHadronness
 //
 Bool_t MCompProbCalc::PreProcess(MParList *plist)
@@ -136,5 +136,5 @@
 //  - For all data members multiply the probabilities.
 //  - For normalization take the n-th root of the result.
-//  - This is the hadroness stored in the MHadroness container
+//  - This is the hadroness stored in the MHadronness container
 //
 Bool_t MCompProbCalc::Process()
Index: trunk/MagicSoft/Mars/manalysis/MCompProbCalc.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCompProbCalc.h	(revision 1572)
+++ trunk/MagicSoft/Mars/manalysis/MCompProbCalc.h	(revision 1574)
@@ -13,5 +13,5 @@
 {
 private:
-    MHadronness *fHadronness; //! Output container (Hadroness)
+    MHadronness *fHadronness; //! Output container (Hadronness)
 
     TList *fData;           //! List of MDataChains to be used
Index: trunk/MagicSoft/Mars/manalysis/MHillasExt.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MHillasExt.cc	(revision 1572)
+++ trunk/MagicSoft/Mars/manalysis/MHillasExt.cc	(revision 1574)
@@ -39,5 +39,5 @@
 //
 // WARNING: Before you can use fAsym, fM3Long and fM3Trans you must
-//          multiply by the sign of MHillasSrc::fCosAlphaDelta
+//          multiply by the sign of MHillasSrc::fCosDeltaAlpha
 //
 ////////////////////////////////////////////////////////////////////////////
