Index: trunk/MagicSoft/Mars/mjobs/MJCut.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCut.cc	(revision 9369)
+++ trunk/MagicSoft/Mars/mjobs/MJCut.cc	(revision 9374)
@@ -259,22 +259,36 @@
     if (fNameResult.IsNull() && fStoreResult)
     {
+        // If no special name fNameResult is given but the result should be stored,
+        // search for a file named oname (fNameOutput or ganymed%08d.root)
         file = (TFile*)gROOT->GetListOfFiles()->FindObject(oname);
-        if (file)
-            file->cd();
+        if (!file)
+        {
+            *fLog << err << "ERROR - File " << oname << " expected to be open, but isn't..." << endl;
+            return kFALSE;
+        }
+
+        file->cd();
     }
     else
+    {
+        // If special name fNameResult is given or no storage requested,
+        // open a new file named oname (fNameOutput or ganymed%08d.root)
         file = TFile::Open(oname, fOverwrite?"RECREATE":"NEW", "File created by MJCut", 9);
 
-    if (!file)
-    {
-        *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl;
-        return kFALSE;
-    }
-
+        if (!file)
+        {
+            *fLog << err << "ERROR - Couldn't open new file " << oname << " for writing..." << endl;
+            return kFALSE;
+        }
+    }
+
+    // Write container to output file
     const Bool_t rc = WriteContainer(cont);
 
+    // If file was newly opened, close it
     if (!(fNameResult.IsNull() && fStoreResult))
         delete file;
 
+    // Return result of writing
     return rc;
 }
@@ -301,6 +315,9 @@
         arr.Add((TObject*)(&halpha->GetAlphaFitter()));
 
-    // Save also the dataset
+    // Save also the dataset, environment and display
     arr.Add(const_cast<MDataSet*>(&set));
+    arr.Add(const_cast<TEnv*>(GetEnv()));
+    if (fDisplay)
+        arr.Add(fDisplay);
 
     const Int_t num = set.GetNumAnalysis();
@@ -317,9 +334,4 @@
         }
     }
-
-    if (fDisplay)
-        arr.Add(fDisplay);
-
-    arr.Add(const_cast<TEnv*>(GetEnv()));
 
     return WriteContainer(arr, fname, "UPDATE");
@@ -995,5 +1007,5 @@
     fillsrc.SetNameTab("SrcPos");
 
-    if (set.IsWobbleMode() && !set.IsMonteCarlo())
+    if (set.IsWobbleMode()/* && !set.IsMonteCarlo()*/)
         tlist2.AddToListBefore(&fillsrc, &hcalc);
 
Index: trunk/MagicSoft/Mars/mjobs/MJSimulation.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJSimulation.cc	(revision 9369)
+++ trunk/MagicSoft/Mars/mjobs/MJSimulation.cc	(revision 9374)
@@ -496,5 +496,9 @@
     //  NSB = 0.2*6e-3
 
-    // FIXME: Simulate photons before QE!
+    // MAGIC: 84MHz       / Pixel
+    // DWARF: 14MHz-25Mhz / APD
+
+
+    // FIXME: Simulate photons before cones and QE!
 
     MSimRandomPhotons  simnsb;
@@ -520,5 +524,6 @@
 
     MParameterD pulpos("IntendedPulsePos");
-//    pulpos.SetVal(40);  // [ns]
+    // FIXME: Set a default which could be 1/3 of the digitization window
+    //    pulpos.SetVal(40);  // [ns]
     plist.AddToList(&pulpos);
 
Index: trunk/MagicSoft/Mars/mjobs/MJStar.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJStar.cc	(revision 9369)
+++ trunk/MagicSoft/Mars/mjobs/MJStar.cc	(revision 9374)
@@ -174,4 +174,5 @@
     MBinning bins5("BinningMuonWidth");
     MBinning bins6("BinningArcPhi");
+    MBinning binsd("BinningDist");
     plist.AddToList(&bins1);
     plist.AddToList(&bins2);
@@ -180,4 +181,5 @@
     plist.AddToList(&bins5);
     plist.AddToList(&bins6);
+    plist.AddToList(&binsd);
 
 
@@ -434,8 +436,8 @@
     MFDataPhrase fmuon1("MHillas.fSize>150 && MNewImagePar.fConcCOG<0.1", "MuonPreCut");
     // Filter to calculate further muon parameters
-    MFDataPhrase fmuon2("(MMuonSearchPar.fRadius>180) && (MMuonSearchPar.fRadius<400) &&"
-                        "(MMuonSearchPar.fDeviation<45)", "MuonSearchCut");
+    MFDataPhrase fmuon2("(MMuonSearchPar.fRadius*MGeomCam.fConvMm2Deg>0.6) && (MMuonSearchPar.fRadius*MGeomCam.fConvMm2Deg<1.35) &&"
+                        "(MMuonSearchPar.fDeviation*MGeomCam.fConvMm2Deg<0.152)", "MuonSearchCut");
     // Filter to fill the MHMuonPar
-    MFDataPhrase fmuon3("(MMuonCalibPar.fArcPhi>190) && (MMuonSearchPar.fDeviation<35) &&"
+    MFDataPhrase fmuon3("(MMuonCalibPar.fArcPhi>190) && (MMuonSearchPar.fDeviation*MGeomCam.fConvMm2Deg<0.118) &&"
                         "(MMuonCalibPar.fArcWidth<0.20) && (MMuonCalibPar.fArcWidth>0.04) &&"
                         "MMuonCalibPar.fRelTimeSigma<1.5",
