Index: trunk/MagicSoft/Mars/macros/train/traindisp.C
===================================================================
--- trunk/MagicSoft/Mars/macros/train/traindisp.C	(revision 8728)
+++ trunk/MagicSoft/Mars/macros/train/traindisp.C	(revision 8729)
@@ -94,5 +94,5 @@
      MFMagicCuts cuts;
      cuts.SetHadronnessCut(MFMagicCuts::kArea);
-     cuts.SetThetaCut(MFMagicCuts::kOn);
+     cuts.SetThetaCut(MFMagicCuts::kNone);
 
      TArrayD arr(13);
@@ -112,5 +112,5 @@
      cuts.SetVariables(arr);
 
-     opt.AddPreCut(&cuts);
+     opt.AddTestCut(&cuts);
 
      // -------------------- Other cuts ----------------------
@@ -119,7 +119,9 @@
      opt.AddPreCut("MHillasSrc.fDCA*MGeomCam.fConvMm2Deg<0.3");
      opt.AddPreCut("MPointingPos.fZd<25");
+     opt.AddTestCut("MHillasExt.fM3Long   *sign(MHillasSrc.fCosDeltaAlpha)*MGeomCam.fConvMm2Deg>-0.07");
+     opt.AddTestCut("MHillasExt.fSlopeLong*sign(MHillasSrc.fCosDeltaAlpha)/MGeomCam.fConvMm2Deg<(MHillasSrc.fDist*MGeomCam.fConvMm2Deg-0.5)*7.2");
 
      // ---------------------- Histogram  --------------------
-     MHn hist("MyHist", "Energy Residual (lg E_{est} - lg E_{mc})");
+     MHn hist("MyHist", "Dist Residual (Disp-Dist)");
 
      MBinning bins(50, -0.5, 0.5);
@@ -166,6 +168,20 @@
      opt.AddPreTask(&weight);
 
+     // ------- A trick for testing the parametrization -------
+     // This will overwrite the random forest calculated disp.
+     // Therefore you can test our disp-parametrization.
+     MParameterCalc calc("(1.15136 +"
+                         "0.0681437*MHillasExt.fSlopeLong*sign(MHillasSrc.fCosDeltaAlpha)/3.37e-3 +"
+                         "0.0507821*(log10(MHillas.fSize)-1.51279)^2*(log10(MHillas.fSize)>1.51279) +"
+                         "2.62932*MNewImagePar.fLeakage1)*"
+                         "(1-MHillas.fWidth/MHillas.fLength)");
+     calc.SetNameParameter("Disp");
+     opt.AddPostTask(&calc);
+
      // ------------------------------------------------------
     */
+
+     // To allow overwrite of existing files
+     // opt.SetOverwrite();
 
      // The number is the number of events read from the file
Index: trunk/MagicSoft/Mars/macros/train/trainenergy.C
===================================================================
--- trunk/MagicSoft/Mars/macros/train/trainenergy.C	(revision 8728)
+++ trunk/MagicSoft/Mars/macros/train/trainenergy.C	(revision 8729)
@@ -165,4 +165,7 @@
     */
 
+     // To allow overwrite of existing files
+     // opt.SetOverwrite();
+
      opt.Train("rf-energy.root", set, 30000);
 }
