Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 9426)
+++ trunk/MagicSoft/Mars/Changelog	(revision 9427)
@@ -87,6 +87,10 @@
      - write rates to an output container
 
-  * ceres.rc:
-    - adapted
+   * ceres.rc:
+     - adapted
+
+   * msimcamera/MSimAPD.[h,cc]:
+     - take the acidental rate from a container
+
 
 
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 9426)
+++ trunk/MagicSoft/Mars/NEWS	(revision 9427)
@@ -32,4 +32,7 @@
    * PDEs and mirror reflectivities have been linearily extrapolated
      to match the wavelegth range between 290nm and 900nm
+
+   * There is no default pulse shape anymoe it must be given in 
+     the resource file
 
  ;callisto:
Index: trunk/MagicSoft/Mars/msimcamera/MSimAPD.cc
===================================================================
--- trunk/MagicSoft/Mars/msimcamera/MSimAPD.cc	(revision 9426)
+++ trunk/MagicSoft/Mars/msimcamera/MSimAPD.cc	(revision 9427)
@@ -66,4 +66,7 @@
 #include "MPhotonData.h"
 
+#include "MPedestalCam.h"
+#include "MPedestalPix.h"
+
 #include "MAvalanchePhotoDiode.h"
 
@@ -122,4 +125,12 @@
     }
 
+    fRates = (MPedestalCam*)pList->FindObject("AccidentalPhotonRates", "MPedestalCam");
+    if (!fRates)
+    {
+        *fLog << inf;
+        *fLog << "AccidentalPhotonRates [MPedestalCam] not found..." << endl;
+        *fLog << " using " << fFreq << " as default for all G-APDs." << endl;
+    }
+
     return kTRUE;
 }
@@ -197,5 +208,8 @@
 
     for (UInt_t idx=0; idx<npix; idx++)
-        static_cast<APD*>(fAPDs.UncheckedAt(idx))->FillRandom(fFreq, fStat->GetTimeFirst());
+    {
+        const Double_t freq = fRates ? (*fRates)[idx].GetPedestal() : fFreq;
+        static_cast<APD*>(fAPDs.UncheckedAt(idx))->FillRandom(freq, fStat->GetTimeFirst());
+    }
 
     // Get number of photons
Index: trunk/MagicSoft/Mars/msimcamera/MSimAPD.h
===================================================================
--- trunk/MagicSoft/Mars/msimcamera/MSimAPD.h	(revision 9426)
+++ trunk/MagicSoft/Mars/msimcamera/MSimAPD.h	(revision 9427)
@@ -14,4 +14,5 @@
 class MPhotonEvent;
 class MPhotonStatistics;
+class MPedestalCam;
 
 class MSimAPD : public MTask
@@ -21,4 +22,5 @@
     MPhotonEvent      *fEvt;     //! Event storing the photon information
     MPhotonStatistics *fStat;    //! Storing event statistics (needed for the start-time)
+    MPedestalCam      *fRates;   //! Accidental Photon Rates for all pixels
 
     TObjArray fAPDs;             //! Array keeping the necessary number of APDs
