Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 8624)
+++ trunk/MagicSoft/Mars/Changelog	(revision 8625)
@@ -48,4 +48,21 @@
    * mfilter/MFMagicCuts.[h,cc]:
      - added the usage of the new SlopeLong parameter for ghostbusting
+
+   * mjobs/MJStar.cc:
+     - preselect events for muon analysis not only by size but also
+       by fConcCOG.
+
+   * mmuon/MMuonSearchPar.[h,cc]:
+     - added a new member function to return the dist (sqrt(x^2+y^2))
+     - to create outliers which are outling as much as possible we
+       let the fit change x and y to infinity.
+
+   * mmuon/MHSingleMuon.cc:
+     - adapted the histogram binning from Siegen slices to ns.
+     - adapted the par limits for the fit to ns
+     - adapted the starting value for the rms to ns
+     - removed the fit range, it was anyhow identical to the histogram 
+     - changed the condition of the pixel index into a condition
+       of the pixel size
 
 
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 8624)
+++ trunk/MagicSoft/Mars/NEWS	(revision 8625)
@@ -64,5 +64,11 @@
      some timimng parameters (Muon Analysis and MFSoftwareTrigger)
      to obtain optimal results. The plot in the PulsePos tab 
-     will now be in ns, too.
+     will now be in ns, too. This might also mean that the Muon
+     analysis in star might not work as perfect as expected as long
+     as old files read in.
+
+   - star: For speed reasons events suitable for the muon analysis 
+     are now also preselected by fConcCOG<0.1 which seems to be a very
+     good preselector for muons.
 
    - star: is now calculating a new timing parameter the Slope along
Index: trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc
===================================================================
--- trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc	(revision 8624)
+++ trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc	(revision 8625)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MHSingleMuon.cc,v 1.14 2006-10-18 10:35:52 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MHSingleMuon.cc,v 1.15 2007-06-29 12:29:47 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -144,5 +144,5 @@
     bins.Apply(fHistWidth);
 
-    bins.SetEdges(101, -10, 10);
+    bins.SetEdges(101, -33, 33);   // +/- 33ns
     bins.Apply(fHistTime);
 }
@@ -221,5 +221,5 @@
 
         // use only the inner pixles. FIXME: This is geometry dependent
-        if(i>397)
+        if(gpix.GetAidx()>0)
             continue;
 
@@ -227,18 +227,21 @@
     }
     // Setup the function and perform the fit
-    TF1 g1("g1", "gaus", -10, 10);
+    TF1 g1("g1", "gaus");//, -fHistTime.GetXmin(), fHistTime.GetXmax());
 
     // Choose starting values as accurate as possible
     g1.SetParameter(0, fHistTime.GetMaximum());
     g1.SetParameter(1, 0);
-    g1.SetParameter(2, 0.2);
-
-    g1.SetParLimits(1, -0.5, 0.5);
-    g1.SetParLimits(2, 0, 1);
+    g1.SetParameter(2, 0.7); // FIXME! GetRMS instead???
+
+    // According to fMuonSearchPar->GetTimeRMS() identified muons
+    // do not have an arrival time rms>3
+    g1.SetParLimits(1, -1.7, 1.7);
+    g1.SetParLimits(2,  0,   3.4);
+
     // options : N  do not store the function, do not draw
     //           I  use integral of function in bin rather than value at bin center
     //           R  use the range specified in the function range
     //           Q  quiet mode
-    fHistTime.Fit(&g1, "QNRB");
+    fHistTime.Fit(&g1, "QNB");
 
     //    Double_t err;
Index: trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.cc
===================================================================
--- trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.cc	(revision 8624)
+++ trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.cc	(revision 8625)
@@ -197,5 +197,5 @@
     // ----------------- Setup and call minuit -------------------
     const Float_t  delta = 30.;  // 3 mm (1/10 of an inner pixel size) Step to move.
-    const Double_t r     = geom.GetMaxRadius()*2;
+    //const Double_t r     = geom.GetMaxRadius()*2;
 
     // Save gMinuit
@@ -207,6 +207,6 @@
     minuit.Command("set nowarn"); // Switch off warning
     // Define Parameters
-    minuit.DefineParameter(0, "x",     x, delta, -r, r);
-    minuit.DefineParameter(1, "y",     y, delta, -r, r);
+    minuit.DefineParameter(0, "x",     x, delta,  0, 0);//-r, r);
+    minuit.DefineParameter(1, "y",     y, delta,  0, 0);//-r, r);
     minuit.DefineParameter(2, "r",     0, 1,      0, 0);
     minuit.DefineParameter(3, "sigma", 0, 1,      0, 0);
Index: trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.h
===================================================================
--- trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.h	(revision 8624)
+++ trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.h	(revision 8625)
@@ -42,4 +42,5 @@
     Float_t GetCenterX()   const { return fCenterX; }
     Float_t GetCenterY()   const { return fCenterY; }
+    Float_t GetDist()      const { return TMath::Hypot(fCenterX, fCenterY); }
     Float_t GetTime()      const { return fTime; }
     Float_t GetTimeRms()   const { return fTimeRms; }
