Index: trunk/MagicSoft/Mars/manalysis/MCameraData.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCameraData.cc	(revision 4833)
+++ trunk/MagicSoft/Mars/manalysis/MCameraData.cc	(revision 4838)
@@ -374,4 +374,35 @@
 // --------------------------------------------------------------------------
 //
+// Function to calculate the cleaning level for all pixels in a given event.
+// The level is the absolute number of photons times the area-ratio.
+//
+void MCameraData::CalcCleaningAbsolute(const MCerPhotEvt &evt, const MGeomCam &geom)
+{
+    const Int_t n = geom.GetNumPixels();
+
+    // Reset arrays
+    fData.Set(n);
+    fData.Reset();
+
+    fValidity.Set(n);
+    fValidity.Reset();
+
+    const Int_t entries = evt.GetNumPixels();
+
+    // calculate cleaning levels
+    for (Int_t i=0; i<entries; i++)
+    {
+        const MCerPhotPix &spix = evt[i];
+
+        const Int_t idx = spix.GetPixId();
+
+        // Set probability
+        fData[idx]     = spix.GetNumPhotons() * geom.GetPixRatio(idx);
+        fValidity[idx] = 1;
+    }
+}
+
+// --------------------------------------------------------------------------
+//
 // Returns the contents of the pixel.
 //
Index: trunk/MagicSoft/Mars/manalysis/MCameraData.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCameraData.h	(revision 4833)
+++ trunk/MagicSoft/Mars/manalysis/MCameraData.h	(revision 4838)
@@ -45,4 +45,5 @@
     void CalcCleaningProbability(const MCerPhotEvt &evt, const MPedPhotCam &pcam,
                                  const MGeomCam &geom,   const MArrivalTime *tcam);
+    void CalcCleaningAbsolute(const MCerPhotEvt &evt, const MGeomCam &geom);
 
     const TArrayD &GetData() const { return fData; }
