Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 9614)
+++ trunk/MagicSoft/Mars/Changelog	(revision 9615)
@@ -19,4 +19,22 @@
                                                  -*-*- END OF LINE -*-*-
 
+ 2010/07/09 Thomas Bretz
+
+   * mpointing/MSrcPosCam.[h,cc]:
+     - now the particle position is stored in any case in the headers
+       so in case we have a view cone we must keep the position fixed
+     - added the fix for the MC monte carlos (for them X needs to
+       change its sign due to a bug in the reflector program)
+
+   * mars.rc, star.rc:
+     - changed time contraint in cleaning from aboslute values
+       to relative values (units now ns/deg)
+
+   * mimage/MImgCleanStd.cc:
+     - changed time contraint in cleaning from aboslute values
+       to relative values (units now ns/deg)
+
+
+
  2010/07/07 Daniela Dorner
 
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 9614)
+++ trunk/MagicSoft/Mars/NEWS	(revision 9615)
@@ -38,4 +38,11 @@
      has been implemented to set an artificial run-number:
         ---run-number=12345
+
+ ;star:
+
+   * The time constraint in the image cleaning is now scaled with the
+     pixel distance. Consequently, the value given is not absolute in
+     ns anymore, but in ns/deg. This means that the values for MAGIC
+     have to be scaled by a factor of 10.
 
 
Index: trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc
===================================================================
--- trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc	(revision 9614)
+++ trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc	(revision 9615)
@@ -664,4 +664,7 @@
     MArrayI indices;
 
+    // Add conversion factor for dx here
+    const Double_t dtmax = lvl*fCam->GetConvMm2Deg();
+
     const UInt_t npixevt = fEvt->GetNumPixels();
     for (UInt_t idx=0; idx<npixevt; idx++)
@@ -689,6 +692,9 @@
                 continue;
 
+            const Double_t dt = TMath::Abs(npix.GetArrivalTime()-tm0);
+            const Double_t dx = gpix.GetDist((*fCam)[idx2]);
+
             // If this pixel is to far away (in arrival time) don't count
-            if (TMath::Abs(npix.GetArrivalTime()-tm0)>lvl)
+            if (dt>dtmax*dx)
                 continue;
 
