Index: /trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc
===================================================================
--- /trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc	(revision 9259)
+++ /trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc	(revision 9260)
@@ -2,5 +2,5 @@
 !
 ! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * This file is part of CheObs, the Modular Analysis and Reconstruction
 ! * Software. It is distributed to you in the hope that it can be a useful
 ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
@@ -9,5 +9,5 @@
 ! * Permission to use, copy, modify and distribute this software and its
 ! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
+! * provided that the above copyright notice appears in all copies and
 ! * that both that copyright notice and this permission notice appear
 ! * in supporting documentation. It is provided "as is" without express
@@ -16,7 +16,7 @@
 !
 !
-!   Author(s): Thomas Bretz  11/2008 <mailto:tbretz@astro.uni-wuerzburg.de>
+!   Author(s): Thomas Bretz,  1/2009 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: Software Development, 2000-2008
+!   Copyright: CheObs Software Development, 2000-2009
 !
 !
@@ -67,5 +67,5 @@
     : fEvt(0), fMirror0(0), fMirror1(0), fMirror2(0), fMirror3(0),
     fMirror4(0), /*fRunHeader(0),*/ fEvtHeader(0), fReflector(0),
-    fGeomCam(0), fPointing(0)
+    fGeomCam(0), fPointing(0), fDetectorMargin(0)
 {
     fName  = name  ? name  : "MSimReflector";
@@ -522,6 +522,8 @@
         *static_cast<MPhotonData*>(cpy4.UncheckedAt(cnt[4]++)) = *dat;
 
+        // FIXME: It make make sense to move this out of this class
+        // It is detector specific not reflector specific
         // Discard all photons which definitly can not hit the detector surface
-        if (!fGeomCam->HitDetector(p))
+        if (!fGeomCam->HitDetector(p, fDetectorMargin))
             continue;
 
Index: /trunk/MagicSoft/Mars/msimreflector/MSimReflector.h
===================================================================
--- /trunk/MagicSoft/Mars/msimreflector/MSimReflector.h	(revision 9259)
+++ /trunk/MagicSoft/Mars/msimreflector/MSimReflector.h	(revision 9260)
@@ -32,4 +32,6 @@
     TString fNameGeomCam;        // Name of the geometry container storing the APD gemeotry
 
+    Double_t fDetectorMargin;    // A margin around the detector (MGeomCam::HitCamera) in which photons are also stored
+
     // MTask
     Int_t PreProcess(MParList *pList);
