Index: trunk/MagicSoft/Mars/melectronics/MAvalanchePhotoDiode.cc
===================================================================
--- trunk/MagicSoft/Mars/melectronics/MAvalanchePhotoDiode.cc	(revision 9252)
+++ trunk/MagicSoft/Mars/melectronics/MAvalanchePhotoDiode.cc	(revision 9261)
@@ -165,15 +165,8 @@
         case 2: if (y<fHist.GetNbinsY()) n += HitCellImp(x, y+1, t); break;
         case 3: if (y>1)                 n += HitCellImp(x, y-1, t); break;
-        /*
-         case 0: x++; if (x>fHist.GetNbinsX()) continue; break;
-         case 1: x--; if (x<1) continue;                 break;
-         case 2: y++; if (y>fHist.GetNbinsY()) continue; break;
-         case 3: y--; if (y<1) continue;                 break;*/
         }
 
         // In the unlikely case the calculated direction is out-of-range,
         // i.e. <0 or >3, we would just try to fill the same cell again which
-
-        //n += HitCellImp(x, y, t);
     }
 
@@ -236,4 +229,6 @@
     for (int i=0; i<n; i++)
         fHist.GetArray()[i] = tm;
+
+    fHist.SetEntries(1);
 }
 
Index: trunk/MagicSoft/Mars/melectronics/MAvalanchePhotoDiode.h
===================================================================
--- trunk/MagicSoft/Mars/melectronics/MAvalanchePhotoDiode.h	(revision 9252)
+++ trunk/MagicSoft/Mars/melectronics/MAvalanchePhotoDiode.h	(revision 9261)
@@ -6,5 +6,5 @@
 #endif
 
-class APD : public TObject
+class APD : public TObject  // FIXME: Derive from TH2?
 {
 private:
@@ -29,4 +29,14 @@
     Int_t CountRecoveringCells(Float_t t=0) const;
 
+    Float_t GetCellContent(Int_t x, Int_t y) const { return fHist.GetBinContent(x, y); }
+    Int_t   GetNumCellsX() const { return fHist.GetNbinsX(); }
+
+    Float_t GetCrosstalkProb() const { return fCrosstalkProb; }
+    Float_t GetDeadTime() const { return fDeadTime; }
+    Float_t GetRecoveryTime() const { return fRecoveryTime; }
+
+    void Draw(Option_t *o="") { fHist.Draw(o); }
+    void DrawCopy(Option_t *o="") { fHist.DrawCopy(o); }
+
     ClassDef(APD, 1) // An object representing a Geigermode APD
 };
