Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 8889)
+++ trunk/MagicSoft/Mars/Changelog	(revision 8890)
@@ -18,4 +18,12 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2008/05/15 Thomas Bretz
+
+   * mfilter/MFMagicCuts.[h,cc]:
+     - fixed a few typos in comments and in the output
+     - added an option kAreaLin with a linear cut in area for special studies
+
+
 
  2008/05/14 Thomas Bretz
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 8889)
+++ trunk/MagicSoft/Mars/NEWS	(revision 8890)
@@ -39,4 +39,7 @@
    * the Random Forest Train-classes (MJTRain*) now store the used datasets
      in the output file
+
+   * the MFMagicCuts have a new option to allow a linear area cut (for
+     special studies)
 
  ;merpp
Index: trunk/MagicSoft/Mars/mfilter/MFMagicCuts.cc
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFMagicCuts.cc	(revision 8889)
+++ trunk/MagicSoft/Mars/mfilter/MFMagicCuts.cc	(revision 8890)
@@ -57,5 +57,5 @@
 //          sign2       = (dist-c[7])*c[6]-slope
 //          disp        = sign1<0 ||sign2<0 ? -disp : disp
-//          thetasq     = disp^2 + dist^2 - 2*disp*dist*alpha
+//          thetasq     = disp^2 + dist^2 - 2*disp*dist*cos(alpha)
 //
 //    And the values with respect to the antisource position respectively.
@@ -195,4 +195,6 @@
     }
 
+    // Geometry in SPONDE?
+
     fMm2Deg = cam->GetConvMm2Deg();
 
@@ -448,4 +450,6 @@
     fDisp->SetVal(-p*sign);
 
+    // FIXME: Allow to use ThetaSq from INPUT!
+
     // Calculate corresponding Theta^2
     const Double_t thetasq = GetThetaSq(p, dist, alpha);
@@ -461,5 +465,15 @@
     {
         const Double_t area = fMatrix ? GetVal(kEArea) : fHil->GetArea()*fMm2Deg*fMm2Deg;
-        const Double_t A    = lgsize>c[3] ? c[2] : c[2]*(1 - c[4]*(lgsize-c[3])*(lgsize-c[3]));
+        const Double_t A    = (c[2]*c[4]>0 ? (lgsize>c[3]) : (lgsize<c[3])) ?
+            c[2] : c[2]*(1 - c[4]*(lgsize-c[3])*(lgsize-c[3]));
+        //const Double_t A    = lgsize>c[3] ? c[2] : c[2] - c[4]/c[2]*(lgsize-c[3])*(lgsize-c[3]));
+        if (area>=A)
+            return kTRUE;
+    }
+
+    if (fHadronnessCut&kAreaLin)
+    {
+        const Double_t area = fMatrix ? GetVal(kEArea) : fHil->GetArea()*fMm2Deg*fMm2Deg;
+        const Double_t A    = c[2] + c[4]*(lgsize-c[3]);
         if (area>=A)
             return kTRUE;
@@ -556,4 +570,7 @@
         *fLog << "hadronness" << endl;
         break;
+    case kAreaLin:
+        *fLog << "arealin" << endl;
+        break;
     case kAll:
         *fLog << "all" << endl;
@@ -561,9 +578,9 @@
     }
     if (fCalcDisp)
-        *fLog << "Disp is calculated from c0, c7, c8." << endl;
+        *fLog << "Disp is calculated from c0, c8-c11." << endl;
     else
         *fLog << "Disp.fVal from the parameter list is used as disp." << endl;
     if (fCalcGhostbuster)
-        *fLog << "Ghostbusting is calculated from c5, c6, c7." << endl;
+        *fLog << "Ghostbusting is calculated from c5-c7." << endl;
     else
         *fLog << "Ghostbuster.fVal from the parameter list is used for ghostbusting." << endl;
Index: trunk/MagicSoft/Mars/mfilter/MFMagicCuts.h
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFMagicCuts.h	(revision 8889)
+++ trunk/MagicSoft/Mars/mfilter/MFMagicCuts.h	(revision 8890)
@@ -35,4 +35,5 @@
         kArea      =BIT(1),
         kHadronness=BIT(2),
+        kAreaLin   =BIT(3),
         kAll       =kArea|kHadronness
     };
