Index: unk/Mars/melectronics/Afterpulse.cc
===================================================================
--- /trunk/Mars/melectronics/Afterpulse.cc	(revision 17201)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#include "Afterpulse.h"
-
-#include <TRandom.h>
-
-#include "MMath.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(Afterpulse);
-
-using namespace std;
-
-Float_t Afterpulse::Process(APD &apd)
-{
-    // Do not process afterpulses twice (e.g. HitRelative + IncreaseTime)
-    // This should not happen anyway
-    //        if (fAmplitude>0)
-    //            return fAmplitude;
-
-    const UInt_t nx  = apd.GetNumCellsX()+2;
-
-    const UInt_t x = fCellIndex%nx;
-    const UInt_t y = fCellIndex/nx;
-
-    fAmplitude = apd.HitCellImp(x, y, fTime);
-
-    return fAmplitude;
-}
Index: unk/Mars/melectronics/Afterpulse.h
===================================================================
--- /trunk/Mars/melectronics/Afterpulse.h	(revision 17201)
+++ 	(revision )
@@ -1,58 +1,0 @@
-#ifndef MARS_Afterpulse
-#define MARS_Afterpulse
-
-#ifndef ROOT_TH2
-#include <TH2.h>
-#endif
-
-#ifndef ROOT_TSortedList
-#include <TSortedList.h>
-#endif
-
-#ifndef MARS_MAvalanchePhotoDiode
-#include <MAvalanchePhotoDiode.h>
-#endif
-
-class Afterpulse : public TObject
-{
-private:
-    UInt_t  fCellIndex;  // Index of G-APD cell the afterpulse belongs to
-
-    Float_t fTime;       // Time at which the afterpulse avalanch broke through
-    Float_t fAmplitude;  // Amplitude (crosstalk!) the pulse produced
-
-    Int_t Compare(const TObject *obj) const
-    {
-        return static_cast<const Afterpulse*>(obj)->fTime>fTime ? -1 : 1;
-    }
-
-    Bool_t IsSortable() const { return kTRUE; }
-
-public:
-    Afterpulse(UInt_t idx, Float_t t) : fCellIndex(idx), fTime(t), fAmplitude(0) { }
-
-    UInt_t GetCellIndex() const { return fCellIndex; }
-
-    Float_t GetTime() const { return fTime; }
-    Float_t GetAmplitude() const { return fAmplitude; }
-
-    Float_t Process(APD &apd);
-    //~ {
-        //~ // Do not process afterpulses twice (e.g. HitRelative + IncreaseTime)
-        //~ // This should not happen anyway
-        //~ //        if (fAmplitude>0)
-        //~ //            return fAmplitude;
-//~ 
-        //~ const UInt_t nx  = apd.GetNumCellsX()+2;
-//~ 
-        //~ const UInt_t x = fCellIndex%nx;
-        //~ const UInt_t y = fCellIndex/nx;
-//~ 
-        //~ fAmplitude = apd.HitCellImp(x, y, fTime);
-//~ 
-        //~ return fAmplitude;
-    //~ }
-    ClassDef(Afterpulse, 1) // An object representing an Afterpulse
-};
-
-#endif
Index: /trunk/Mars/melectronics/MAvalanchePhotoDiode.cc
===================================================================
--- /trunk/Mars/melectronics/MAvalanchePhotoDiode.cc	(revision 17201)
+++ /trunk/Mars/melectronics/MAvalanchePhotoDiode.cc	(revision 17202)
@@ -71,5 +71,5 @@
 //        apd.IncreaseTime(dtend);
 //
-//        // Now you can access the afterpulses by
+//        // Now you can excess the afterpulses by
 //        TIter Next(&a->GetListOfAfterpulses());
 //        Afterpulse *ap = 0;
@@ -94,5 +94,4 @@
 #include "MLog.h"
 #include "MLogManip.h"
-#include "Afterpulse.h"
 
 ClassImp(APD);
Index: /trunk/Mars/melectronics/MAvalanchePhotoDiode.h
===================================================================
--- /trunk/Mars/melectronics/MAvalanchePhotoDiode.h	(revision 17201)
+++ /trunk/Mars/melectronics/MAvalanchePhotoDiode.h	(revision 17202)
@@ -122,3 +122,45 @@
 };
 
+class Afterpulse : public TObject
+{
+private:
+    UInt_t  fCellIndex;  // Index of G-APD cell the afterpulse belongs to
+
+    Float_t fTime;       // Time at which the afterpulse avalanch broke through
+    Float_t fAmplitude;  // Amplitude (crosstalk!) the pulse produced
+
+    Int_t Compare(const TObject *obj) const
+    {
+        return static_cast<const Afterpulse*>(obj)->fTime>fTime ? -1 : 1;
+    }
+
+    Bool_t IsSortable() const { return kTRUE; }
+
+public:
+    Afterpulse(UInt_t idx, Float_t t) : fCellIndex(idx), fTime(t), fAmplitude(0) { }
+
+    UInt_t GetCellIndex() const { return fCellIndex; }
+
+    Float_t GetTime() const { return fTime; }
+    Float_t GetAmplitude() const { return fAmplitude; }
+
+    Float_t Process(APD &apd)
+    {
+        // Do not process afterpulses twice (e.g. HitRelative + IncreaseTime)
+        // This should not happen anyway
+        //        if (fAmplitude>0)
+        //            return fAmplitude;
+
+        const UInt_t nx  = apd.GetNumCellsX()+2;
+
+        const UInt_t x = fCellIndex%nx;
+        const UInt_t y = fCellIndex/nx;
+
+        fAmplitude = apd.HitCellImp(x, y, fTime);
+
+        return fAmplitude;
+    }
+    ClassDef(Afterpulse, 1) // An Afterpulse object
+};
+
 #endif
Index: /trunk/Mars/melectronics/Makefile
===================================================================
--- /trunk/Mars/melectronics/Makefile	(revision 17201)
+++ /trunk/Mars/melectronics/Makefile	(revision 17202)
@@ -22,5 +22,4 @@
 
 SRCFILES = MAvalanchePhotoDiode.cc \
-           Afterpulse.cc \
            MAnalogSignal.cc \
            MAnalogChannels.cc \
Index: /trunk/Mars/msimcamera/MSimAPD.cc
===================================================================
--- /trunk/Mars/msimcamera/MSimAPD.cc	(revision 17201)
+++ /trunk/Mars/msimcamera/MSimAPD.cc	(revision 17202)
@@ -69,5 +69,4 @@
 
 #include "MAvalanchePhotoDiode.h"
-#include "Afterpulse.h"
 
 ClassImp(MSimAPD);
