Index: trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc
===================================================================
--- trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc	(revision 6985)
+++ trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc	(revision 6986)
@@ -126,10 +126,8 @@
     }
 
-    MMuonSetup *setup = (MMuonSetup*)plist->FindObject("MMuonSetup");
+    MMuonSetup *setup = (MMuonSetup*)const_cast<MParList*>(plist)->FindCreateObj("MMuonSetup");
     if (!setup)
-    {
-        *fLog << warn << "MMuonSetup not found... abort." << endl;
-        return kFALSE;
-    }
+        return kFALSE;
+
     fMargin = setup->GetMargin()/fGeomCam->GetConvMm2Deg();
 
@@ -185,10 +183,9 @@
     //  Up to now, the error of pedestal is not taken into accout. This is not
     // of course correct. We will include this soon.
-    Double_t ADC2PhEl = 0.14;
-    Double_t Ffactor  = 1.4;
+    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/ADC2PhEl)*Ffactor;
+        const Float_t rougherr = TMath::Sqrt(abs)*Ffactor;
 
         fHistPhi.SetBinError(i, rougherr);
@@ -198,5 +195,5 @@
     {
         const Float_t abs      = TMath::Abs(fHistWidth.GetBinContent(i));
-        const Float_t rougherr = TMath::Sqrt(abs/ADC2PhEl)*Ffactor;
+        const Float_t rougherr = TMath::Sqrt(abs)*Ffactor;
 
         fHistWidth.SetBinError(i, rougherr);
@@ -298,4 +295,7 @@
             first = 0; // If maximum is on the left side of histogram
 
+    if (last-first<=3)
+        return kFALSE;
+
     // Now get the fit range
     const Float_t startfitval = fHistWidth.GetBinLowEdge(first+1);
@@ -316,6 +316,5 @@
     fHistWidth.Fit(&f1, "NQR");
 
-    if (last-first>3)
-        chi = f1.GetChisquare()/(last-first-3);
+    chi = f1.GetChisquare()/f1.GetNDF();
 
     Double_t err;
Index: trunk/MagicSoft/Mars/mmuon/MMuonCalibParCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mmuon/MMuonCalibParCalc.cc	(revision 6985)
+++ trunk/MagicSoft/Mars/mmuon/MMuonCalibParCalc.cc	(revision 6986)
@@ -187,6 +187,6 @@
 {
     // Calculation of Arc Phi etc...
-    const Float_t thresphi   = fMuonSetup->GetThresholdArcPhi()  /fGeomCam->GetConvMm2Deg();
-    const Float_t threswidth = fMuonSetup->GetThresholdArcWidth()/fGeomCam->GetConvMm2Deg();
+    const Float_t thresphi   = fMuonSetup->GetThresholdArcPhi();
+    const Float_t threswidth = fMuonSetup->GetThresholdArcWidth();
 
     Double_t peakphi, arcphi;
Index: trunk/MagicSoft/Mars/mmuon/MMuonSetup.cc
===================================================================
--- trunk/MagicSoft/Mars/mmuon/MMuonSetup.cc	(revision 6985)
+++ trunk/MagicSoft/Mars/mmuon/MMuonSetup.cc	(revision 6986)
@@ -45,5 +45,5 @@
 //
 MMuonSetup::MMuonSetup(const char *name, const char *title)
-    : fMargin(0.2), fThresholdArcPhi(0.1), fThresholdArcWidth(0.1)
+    : fMargin(0.2), fThresholdArcPhi(30), fThresholdArcWidth(30)
 {
     fName  = name  ? name  : "MMuonSetup";
@@ -55,6 +55,6 @@
 // Read the setup from a TEnv, eg:
 //   MMuonSetup.Margin:            0.2
-//   MMuonSetup.ThresholdArcPhi:   0.1
-//   MMuonSetup.ThresholdArcWidth: 0.1
+//   MMuonSetup.ThresholdArcPhi:   30
+//   MMuonSetup.ThresholdArcWidth: 30
 //
 Int_t MMuonSetup::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
Index: trunk/MagicSoft/Mars/mmuon/MMuonSetup.h
===================================================================
--- trunk/MagicSoft/Mars/mmuon/MMuonSetup.h	(revision 6985)
+++ trunk/MagicSoft/Mars/mmuon/MMuonSetup.h	(revision 6986)
@@ -10,6 +10,6 @@
 private:
     Float_t fMargin;            // [deg] margin to evaluate muons. The defaut value is 60 mm, corresponding to 0.2 deg. This value can be changed by using the function of SetMargin
-    Float_t fThresholdArcPhi;   // [deg] The threshold value to define arc phi
-    Float_t fThresholdArcWidth; // [deg] The threshold value to define arc width
+    Float_t fThresholdArcPhi;   // [phe] The threshold value to define arc phi
+    Float_t fThresholdArcWidth; // [phe] The threshold value to define arc width
 
     Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
Index: trunk/MagicSoft/Mars/star.rc
===================================================================
--- trunk/MagicSoft/Mars/star.rc	(revision 6985)
+++ trunk/MagicSoft/Mars/star.rc	(revision 6986)
@@ -49,6 +49,6 @@
 # -------------------------------------------------------------------------
 # MMuonSetup.Margin:            0.2
-# MMuonSetup.ThresholdArcPhi:   0.1
-# MMuonSetup.ThresholdArcWidth: 0.1
+# MMuonSetup.ThresholdArcPhi:   30
+# MMuonSetup.ThresholdArcWidth: 30
 # BinningRadius.Raw:            20  0.5  1.5
 # BinningArcWidth.Raw:          60  0.0  0.3
