Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 8659)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 8660)
@@ -59,4 +59,9 @@
    * mimage/MHVsSize.cc:
      - changes some comments
+
+   * mmuon/MHSingleMuon.cc:
+     - skip the "error estimation" step. It is just a multiplication
+       with a fixed value. This doesn't influence enaything. And the
+       absolute avlue of the error is not used at all.
 
 
Index: /trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc
===================================================================
--- /trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc	(revision 8659)
+++ /trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc	(revision 8660)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MHSingleMuon.cc,v 1.15 2007-06-29 12:29:47 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MHSingleMuon.cc,v 1.16 2007-08-06 16:50:45 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -217,4 +217,6 @@
         if (TMath::Abs(dist-fMuonSearchPar->GetRadius())<fMargin)
         {
+            // The arrival time is aligned around 0 for smaller
+            // and more stable histogram range
             fHistTime.Fill(pix.GetArrivalTime()-fMuonSearchPar->GetTime());
         }
@@ -250,4 +252,8 @@
     gMinuit->GetParameter(2, sig,  dummy);  // get the sigma value
 
+    // The mean arrival time which was subtracted before will
+    // be added again, now
+    const Double_t tm0 = fMuonSearchPar->GetTime()+mean;
+
     for (Int_t i=0; i<entries; i++)
     {
@@ -262,5 +268,5 @@
         // if the signal is not near the estimated circle, it is ignored.
         if (TMath::Abs(dist-fMuonSearchPar->GetRadius())<fMargin &&
-            TMath::Abs(pix.GetArrivalTime()-fMuonSearchPar->GetTime()-mean) < 2*sig)
+            TMath::Abs(pix.GetArrivalTime()-tm0) < 2*sig)
         {
             fHistPhi.Fill(TMath::ATan2(dx, dy)*TMath::RadToDeg(), pix.GetNumPhotons());
@@ -268,5 +274,12 @@
     }
 
-    // error estimation (temporaly)
+    return kTRUE;
+
+/*
+    // Because the errors (sqrt(content)) are only scaled by a fixed
+    // factor, and the absolute value of the error is nowhere
+    // needed we skip this step
+
+    // error estimation (temporarily)
     //  The error is estimated from the signal. In order to do so, we have to
     // once convert the signal from ADC to photo-electron. Then we can get
@@ -276,20 +289,11 @@
     const Double_t Ffactor  = 1.4;
     for (Int_t i=0; i<fHistPhi.GetNbinsX()+1; i++)
-    {
-        const Float_t abs      = TMath::Abs(fHistPhi.GetBinContent(i));
-        const Float_t rougherr = TMath::Sqrt(abs)*Ffactor;
-
-        fHistPhi.SetBinError(i, rougherr);
-    }
+        fHistPhi.SetBinError(i, fHistPhi.GetBinError(i)*Ffactor);
 
     for (Int_t i=0; i<fHistWidth.GetNbinsX()+1; i++)
-    {
-        const Float_t abs      = TMath::Abs(fHistWidth.GetBinContent(i));
-        const Float_t rougherr = TMath::Sqrt(abs)*Ffactor;
-
-        fHistWidth.SetBinError(i, rougherr);
-    }
+        fHistWidth.SetBinError(i, fHistWidth.GetBinError(i)*Ffactor);
 
     return kTRUE;
+ */
 }
 
