Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 6846)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 6847)
@@ -36,4 +36,8 @@
    * mcalib/MCalibrateData.cc:
      - undocumented change from Markus Gaug
+
+   * mfilter/MFCT1SelBasic.[h,cc], mfilter/MFCT1SelStandard.[h,cc],
+     mfilter/MFCT1SelFinal.[h,cc]:
+     - moved to manalysisct1
 
 
Index: /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelBasic.cc
===================================================================
--- /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelBasic.cc	(revision 6847)
+++ /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelBasic.cc	(revision 6847)
@@ -0,0 +1,261 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Wolfgang Wittek, 04/2003 <mailto:wittek@mppmu.mpg.de>
+!   Author(s): Thomas Bretz, 04/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2003
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//
+//  MFCT1SelBasic
+//
+//  This is a class to evaluate basic cuts
+//
+//  to be called after the calibration (when the number of photons is
+//               available for all pixels)
+//
+//  The basic cuts are :
+//
+//      remove bad runs
+//      thetamin < theta < thetamax
+//      software trigger fullfilled (with minimum no.of photons = minphotons)
+//
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#include "MFCT1SelBasic.h"
+
+#include "MParList.h"
+
+#include "MMcEvt.hxx"
+
+#include "MCerPhotEvt.h"
+#include "MRawRunHeader.h"
+
+#include "MGeomPix.h"
+#include "MGeomCam.h"
+
+#include "MLog.h"
+#include "MLogManip.h"
+
+ClassImp(MFCT1SelBasic);
+
+using namespace std;
+
+// --------------------------------------------------------------------------
+//
+// Default constructor.
+//
+MFCT1SelBasic::MFCT1SelBasic(const char *name, const char *title)
+{
+    fName  = name  ? name  : "MFCT1SelBasic";
+    fTitle = title ? title : "Filter to evaluate basic cuts";
+
+    // default values of cuts
+    SetCuts(13.0, 0.0, 60.0);
+}
+
+// --------------------------------------------------------------------------
+//
+// Set the cut values
+// 
+//
+void MFCT1SelBasic::SetCuts(Float_t minphotons, 
+                            Float_t thetamin, Float_t thetamax)
+{
+    fMinPhotons = minphotons;
+    fThetaMin   = thetamin;
+    fThetaMax   = thetamax;
+
+    *fLog << inf << "MFCT1SelBasic cut values : fMinPhotons, fThetaMin, fThetaMax = ";
+    *fLog << fMinPhotons <<",  " << fThetaMin << ",  " << fThetaMax << endl;
+}
+
+// --------------------------------------------------------------------------
+//
+// Set the pointers
+// 
+//
+Int_t MFCT1SelBasic::PreProcess(MParList *pList)
+{
+    fRawRun = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
+    if (!fRawRun)
+    {
+        *fLog << dbginf << "MRawRunHeader not found... aborting." << endl;
+        return kFALSE;
+    }
+
+    fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");
+    if (!fMcEvt)
+    {
+        *fLog << dbginf << "MMcEvt not found... aborting." << endl;
+        return kFALSE;
+    }
+
+    fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt");
+    if (!fEvt)
+    {
+        *fLog << dbginf << "MCerPhotEvt not found... aborting." << endl;
+        return kFALSE;
+    }
+
+    fCam = (MGeomCam*)pList->FindObject("MGeomCam");
+    if (!fCam)
+    {
+        *fLog << dbginf << "MGeomCam (Camera Geometry) missing in Parameter List... aborting." << endl;
+        return kFALSE;
+    }
+
+    memset(fCut, 0, sizeof(fCut));
+
+    return kTRUE;
+}
+
+Int_t MFCT1SelBasic::Set(Int_t rc)
+{
+    fCut[rc]++;
+    fResult=kTRUE;
+    return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Evaluate basic cuts
+// 
+//     bad events    : fResult = kTRUE;
+//     good events   : fResult = kFALSE;
+//
+Int_t MFCT1SelBasic::Process()
+{
+    const Double_t theta = kRad2Deg*fMcEvt->GetTelescopeTheta();
+
+    fResult  = kFALSE;
+
+    // remove bad runs for MC gammas
+    if (fMcEvt->GetEnergy() == 0.0  &&  fMcEvt->GetImpact() == 0.0)
+    {
+      if (fRawRun->GetRunNumber() == 601  ||
+          fRawRun->GetRunNumber() == 613  ||
+          fRawRun->GetRunNumber() == 614    )
+	return Set(1);
+    }
+
+    if (theta<fThetaMin)
+        return Set(2);
+
+    if (theta>fThetaMax)
+        return Set(3);
+
+    if (!SwTrigger())
+        return Set(4);
+
+    fCut[0]++;
+
+    return kTRUE;
+}
+// --------------------------------------------------------------------------
+//
+// Software trigger
+// 
+// require 2 neighboring pixels (which are not in the outermost ring), 
+//                       each having at least 'fMinPhotons' photons
+// 
+// 
+Bool_t MFCT1SelBasic::SwTrigger()
+{
+    const Int_t entries = fEvt->GetNumPixels();
+ 
+    for (Int_t i=0; i<entries; i++)
+    {
+        const MCerPhotPix &pix = (*fEvt)[i];
+
+        const Int_t id = pix.GetPixId();
+        if (!pix.IsPixelUsed())
+            continue;
+
+        const Double_t photons = pix.GetNumPhotons();
+        if (photons < fMinPhotons)
+            continue;
+
+        // this pixel is used and has the required no.of photons
+        // check whether this is also true for a neigboring pixel
+
+        const MGeomPix &gpix = (*fCam)[id];
+        if ( gpix.IsInOutermostRing() )
+            continue;
+
+        const Int_t nneighbors = gpix.GetNumNeighbors();
+        for (Int_t n=0; n<nneighbors; n++)
+        {
+            const Int_t id1 =  gpix.GetNeighbor(n);
+            if ( !fEvt->IsPixelUsed(id1) )
+                continue;
+
+            const MGeomPix &gpix1 = (*fCam)[id1];
+            if ( gpix1.IsInOutermostRing() )
+                continue;
+
+            const MCerPhotPix &pix1 = *fEvt->GetPixById(id1);
+
+            const Double_t photons1 = pix1.GetNumPhotons();
+            if (photons1 >= fMinPhotons)
+                return kTRUE;
+        }
+    }
+    return kFALSE;
+}
+
+// --------------------------------------------------------------------------
+//
+//  Prints some statistics about the Basic selections.
+//
+Int_t MFCT1SelBasic::PostProcess()
+{
+    if (GetNumExecutions()==0)
+        return kTRUE;
+
+    *fLog << inf << endl;
+    *fLog << GetDescriptor() << " execution statistics:" << endl;
+    *fLog << dec << setfill(' ');
+
+    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ;
+    *fLog << (int)(fCut[1]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts skipped due to: bad run " << endl;
+
+    *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) ;
+    *fLog << (int)(fCut[2]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts skipped due to: Zenith angle < " << fThetaMin << endl;
+
+    *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) ;
+    *fLog << (int)(fCut[3]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts skipped due to: Zenith angle > " << fThetaMax << endl;
+
+    *fLog << " " << setw(7) << fCut[4] << " (" << setw(3) ;
+    *fLog << (int)(fCut[4]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts skipped due to: Software trigger not fullfilled" ;
+    *fLog << " (with fMinPhotons = " << fMinPhotons << ")" << endl;
+
+    *fLog << " " << fCut[0] << " (" << (int)(fCut[0]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts survived Basic selections!" << endl;
+    *fLog << endl;
+
+    return kTRUE;
+}
Index: /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelFinal.cc
===================================================================
--- /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelFinal.cc	(revision 6847)
+++ /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelFinal.cc	(revision 6847)
@@ -0,0 +1,193 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Wolfgang Wittek  04/2003 <mailto:wittek@mppmu.mpg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2003
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//
+//  MFCT1SelFinal
+//
+//  WHAT ARE THE FINAL CUTS?
+//
+//  This is a class to evaluate the Final Cuts
+//  (these cuts define the final sample of gammas;
+//   relevant for the calculation of the effective collection areas)
+//
+//  to be called after the calculation of the hadroness
+//
+/////////////////////////////////////////////////////////////////////////////
+#include "MFCT1SelFinal.h"
+
+#include <math.h>
+
+#include "MParList.h"
+
+#include "MMcEvt.hxx"
+
+#include "MCerPhotEvt.h"
+
+#include "MGeomPix.h"
+#include "MGeomCam.h"
+
+#include "MLog.h"
+#include "MLogManip.h"
+
+#include "MHillasExt.h"
+#include "MHillasSrc.h"
+#include "MHadronness.h"
+
+ClassImp(MFCT1SelFinal);
+
+using namespace std;
+
+// --------------------------------------------------------------------------
+//
+// Default constructor.
+//
+MFCT1SelFinal::MFCT1SelFinal(const char *hilsrcname,
+                             const char *name, const char *title)
+    : fHilSrcName(hilsrcname), fHadronnessName("MHadronness")
+{
+    fName  = name  ? name  : "MFCT1SelFinal";
+    fTitle = title ? title : "Class to evaluate the Final Cuts";
+
+    // default values of cuts
+    SetCuts(1.0, 100.0, 10.);
+}
+
+// --------------------------------------------------------------------------
+//
+// Set cut values
+// 
+//
+void MFCT1SelFinal::SetCuts(Float_t hadmax, Float_t alphamax, Float_t distmax) 
+{ 
+    fHadronnessMax =   hadmax;
+    fAlphaMax      = alphamax;
+    fDistMax       =  distmax;
+
+    *fLog << inf << "MFCT1SelFinal cut values : fHadronnessMax, fAlphaMax, fDistMax = ";
+    *fLog << fHadronnessMax << ",  " << fAlphaMax << ",  " << fDistMax <<  endl;
+}
+
+// --------------------------------------------------------------------------
+//
+// Set the pointers
+//
+Int_t MFCT1SelFinal::PreProcess(MParList *pList)
+{
+    fHilSrc = (MHillasSrc*)pList->FindObject(fHilSrcName, "MHillasSrc");
+    if (!fHilSrc)
+    {
+      *fLog << dbginf << "MHillasSrc object " << fHilSrcName << " not found... aborting." << endl;
+      return kFALSE;
+    }
+
+    fHadronness = (MHadronness*)pList->FindObject(fHadronnessName, "MHadronness");
+    if (!fHadronness)
+    {
+      *fLog << dbginf << "MHadronness not found... aborting." << endl;
+      return kFALSE;
+    }
+
+    MGeomCam *cam = (MGeomCam*)pList->FindCreateObj("MGeomCamCT1","MGeomCam");
+    if (!cam)
+    {
+        *fLog << err << "MGeomCam (Camera Geometry) not found... aborting." << endl;
+        return kFALSE;
+    }
+
+    fMm2Deg = cam->GetConvMm2Deg();
+
+    memset(fCut, 0, sizeof(fCut));
+
+    return kTRUE;
+}
+
+Int_t MFCT1SelFinal::Set(Int_t rc)
+{
+    fCut[rc]++;
+    fResult=kTRUE;
+    return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Evaluate final cuts
+// 
+// if cuts are fulfilled set fResult = kTRUE
+//
+Int_t MFCT1SelFinal::Process()
+{
+    const Double_t modalpha = fabs( fHilSrc->GetAlpha() );
+    const Double_t h = fHadronness->GetHadronness();
+
+    fResult = kFALSE;
+
+    if (h>fHadronnessMax)
+        return Set(1);
+
+    if (modalpha>fAlphaMax)
+        return Set(2);
+
+    if (fMm2Deg*fHilSrc->GetDist()>fDistMax)
+        return Set(3);
+
+    fCut[0]++;
+
+    return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+//  Prints some statistics about the Final selections.
+//
+Int_t MFCT1SelFinal::PostProcess()
+{
+    if (GetNumExecutions()==0)
+        return kTRUE;
+
+    *fLog << inf << endl;
+    *fLog << GetDescriptor() << " execution statistics:" << endl;
+    *fLog << dec << setfill(' ');
+    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ;
+    *fLog << (int)(fCut[1]*100/GetNumExecutions());
+    *fLog << "%) Evts skipped due to: hadronness > "<< fHadronnessMax;
+    *fLog << " (hadronness from '" << fHadronnessName << "')" << endl;
+
+    *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) ;
+    *fLog << (int)(fCut[2]*100/GetNumExecutions());
+    *fLog << "%) Evts skipped due to: |ALPHA| > " << fAlphaMax;
+    *fLog << " [degrees]" << endl;
+
+    *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) ;
+    *fLog << (int)(fCut[3]*100/GetNumExecutions());
+    *fLog << "%) Evts skipped due to: DIST > " << fDistMax;
+    *fLog << " [degrees]" << endl;
+
+    *fLog << " " << fCut[0] << " (" ;
+    *fLog << (int)(fCut[0]*100/GetNumExecutions());
+    *fLog << "%) Evts survived Final selections!" << endl;
+    *fLog << endl;
+
+    return kTRUE;
+}
Index: /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelFinal.h
===================================================================
--- /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelFinal.h	(revision 6847)
+++ /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelFinal.h	(revision 6847)
@@ -0,0 +1,70 @@
+#ifndef MARS_MFCT1SelFinal
+#define MARS_MFCT1SelFinal
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// MSelFinal                                                               //
+//                                                                         //
+// Class to evaluate final cuts                                            //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef MARS_MFilter
+#include "MFilter.h"
+#endif
+
+class MHillas;
+class MHillasSrc;
+class MHadronness;
+
+class MFCT1SelFinal : public MFilter
+{
+private:
+    MHillasSrc  *fHilSrc;       
+    MHadronness *fHadronness;       
+
+    TString      fHilName;
+    TString      fHilSrcName;
+    TString      fHadronnessName;
+ 
+    Float_t      fHadronnessMax;
+    Float_t      fAlphaMax;
+    Float_t      fDistMax;
+
+    Double_t     fMm2Deg;   // conversion mm to degrees in camera
+
+    Int_t        fCut[4];
+
+    Bool_t       fResult;
+
+    Int_t Set(Int_t rc);
+
+    Int_t PreProcess(MParList *pList);
+    Int_t Process();
+    Int_t PostProcess();
+
+    Bool_t IsExpressionTrue() const  { return fResult; }
+
+public:
+    MFCT1SelFinal(const char *HilSrcName="MHillasSrc",
+                  const char *name=NULL, const char *title=NULL);
+
+    void SetHadronnessName(const TString name) { fHadronnessName = name; }
+
+    void SetCuts(Float_t hadmax, Float_t alphamax, Float_t distmax); 
+
+    ClassDef(MFCT1SelFinal, 0)   // Class to evaluate final cuts
+};
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
Index: /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelStandard.cc
===================================================================
--- /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelStandard.cc	(revision 6847)
+++ /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelStandard.cc	(revision 6847)
@@ -0,0 +1,221 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Wolfgang Wittek, 04/2003 <mailto:wittek@mppmu.mpg.de>
+!   Author(s): Thomas Bretz, 04/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2003
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//
+//  MFCT1SelStandard
+//
+//  This is a class to evaluate the Standard Cuts
+//
+//  WHAT ARE THE STANDARD CUTS?                                                                       //
+//
+//  to be called after the calculation of the image parameters
+//               before the g/h separation
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#include "MFCT1SelStandard.h"
+
+#include "MParList.h"
+
+#include "MMcEvt.hxx"
+
+#include "MGeomPix.h"
+#include "MGeomCam.h"
+
+#include "MCerPhotEvt.h"
+
+#include "MLog.h"
+#include "MLogManip.h"
+
+#include "MHillas.h"
+#include "MHillasExt.h"
+#include "MHillasSrc.h"
+#include "MNewImagePar.h"
+
+ClassImp(MFCT1SelStandard);
+
+using namespace std;
+
+// --------------------------------------------------------------------------
+//
+// Default constructor.
+//
+MFCT1SelStandard::MFCT1SelStandard(const char *hilsrcname,
+                                   const char *name, const char *title)
+    : fHilName("MHillas"), fHilSrcName(hilsrcname), fImgParName("MNewImagePar")
+{
+    fName  = name  ? name  : "MFCT1SelStandard";
+    fTitle = title ? title : "Class to evaluate the Standard Cuts";
+
+    // default values of cuts
+    SetCuts(92, 4, 60, 0.4, 1.05, 0.0, 0.0);
+}
+
+// --------------------------------------------------------------------------
+//
+// Set the values for the cuts 
+// 
+//
+void MFCT1SelStandard::SetCuts(Float_t usedpixelsmax, Float_t corepixelsmin,
+                               Float_t sizemin, Float_t distmin, Float_t distmax,
+                               Float_t lengthmin, Float_t widthmin)
+{ 
+    fUsedPixelsMax = usedpixelsmax;
+    fCorePixelsMin = corepixelsmin;
+    fSizeMin       = sizemin;
+    fDistMin       = distmin;
+    fDistMax       = distmax;
+    fLengthMin     = lengthmin;
+    fWidthMin      = widthmin;
+
+    *fLog << inf << "MFCT1SelStandard cut values : fUsedPixelsMax, fCorePixelsMin = ";
+    *fLog << fUsedPixelsMax << ",  " << fCorePixelsMin << endl;
+    *fLog << inf << "     fSizeMin, fDistMin, fDistMax = " << fSizeMin ;
+    *fLog << ",  " << fDistMin << ",  " << fDistMax << endl;
+    *fLog << inf << "     fLengthMin, fWidthMin = " << fLengthMin ;
+    *fLog << ",  " << fWidthMin << endl;
+}
+
+// --------------------------------------------------------------------------
+//
+// MISSING
+//
+Int_t MFCT1SelStandard::PreProcess(MParList *pList)
+{
+    fHil = (MHillas*)pList->FindObject(fHilName, "MHillas");
+    if (!fHil)
+    {
+        *fLog << err << fHilName << " [MHillas] not found... aborting." << endl;
+        return kFALSE;
+    }
+
+    fHilSrc = (MHillasSrc*)pList->FindObject(fHilSrcName, "MHillasSrc");
+    if (!fHilSrc)
+    {
+        *fLog << err << fHilSrcName << " [MHillasSrc] not found... aborting." << endl;
+        return kFALSE;
+    }
+
+    fNewImgPar = (MNewImagePar*)pList->FindObject(fImgParName, "MNewImagePar");
+    if (!fNewImgPar)
+    {
+        *fLog << err << fImgParName << " [MNewImagePar] not found... aborting." << endl;
+        return kFALSE;
+    }
+
+    MGeomCam *cam = (MGeomCam*)pList->FindObject("MGeomCam");
+    if (!cam)
+    {
+        *fLog << err << "MGeomCam (Camera Geometry) not found... aborting." << endl;
+        return kFALSE;
+    }
+
+    fMm2Deg = cam->GetConvMm2Deg();
+
+    memset(fCut, 0, sizeof(fCut));
+
+    return kTRUE;
+}
+
+Bool_t MFCT1SelStandard::Set(Int_t rc)
+{
+    fResult = kTRUE;
+    fCut[rc]++;
+    return kTRUE;
+}
+// --------------------------------------------------------------------------
+//
+// Evaluate standard cuts
+// 
+// if selections are fulfilled set fResult = kTRUE;
+// 
+//
+Int_t MFCT1SelStandard::Process()
+{
+    const Double_t length     = fHil->GetLength() * fMm2Deg;
+    const Double_t width      = fHil->GetWidth()  * fMm2Deg;
+    const Double_t dist       = fHilSrc->GetDist()* fMm2Deg;
+    //const Double_t delta      = fHil->GetDelta()  * kRad2Deg;
+    const Double_t size       = fHil->GetSize();
+    const Int_t numusedpixels = fNewImgPar->GetNumUsedPixels();
+    const Int_t numcorepixels = fNewImgPar->GetNumCorePixels();
+
+    fResult  = kFALSE;
+
+    if (numusedpixels>=fUsedPixelsMax || numcorepixels<=fCorePixelsMin)
+        return Set(1);
+
+    if (size<=fSizeMin )
+        return Set(2);
+
+    if (dist<fDistMin || dist>fDistMax)
+        return Set(3);
+
+    if (length<=fLengthMin || width<=fWidthMin)
+        return Set(4);
+
+    fCut[0]++;
+    return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+//  Prints some statistics about the Standard selections.
+//
+Int_t MFCT1SelStandard::PostProcess()
+{
+    if (GetNumExecutions()==0)
+        return kTRUE;
+
+    *fLog << inf << endl;
+    *fLog << GetDescriptor() << " execution statistics:" << endl;
+    *fLog << dec << setfill(' ');
+    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3);
+    *fLog << (int)(fCut[1]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts skipped due to: Used pixels >= " << fUsedPixelsMax ;
+    *fLog << " or Core pixels <= " << fCorePixelsMin << endl;
+
+    *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) ;
+    *fLog << (int)(fCut[2]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts skipped due to: SIZE <= " << fSizeMin << endl;
+
+    *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) ;
+    *fLog << (int)(fCut[3]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts skipped due to: DIST < " << fDistMin;
+    *fLog << " or DIST > " << fDistMax << endl;
+
+    *fLog << " " << setw(7) << fCut[4] << " (" << setw(3) ;
+    *fLog << (int)(fCut[4]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts skipped due to: LENGTH <= " << fLengthMin;
+    *fLog << " or WIDTH <= " << fWidthMin << endl;
+
+    *fLog << " " << fCut[0] << " (" ;
+    *fLog << (int)(fCut[0]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts survived Standard selections!" << endl;
+    *fLog << endl;
+
+    return kTRUE;
+}
Index: /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelStandard.h
===================================================================
--- /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelStandard.h	(revision 6847)
+++ /trunk/MagicSoft/Mars/manalysisct1/MFCT1SelStandard.h	(revision 6847)
@@ -0,0 +1,78 @@
+#ifndef MARS_MFCT1SelStandard
+#define MARS_MFCT1SelStandard
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// MFCT1SelStandard                                                        //
+//                                                                         //
+// Class to evaluate standard cuts                                         //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef MARS_MFilter
+#include "MFilter.h"
+#endif
+
+class MHillas;
+class MHillasSrc;
+class MNewImagePar;
+
+class MFCT1SelStandard : public MFilter
+{
+private:
+    MHillas      *fHil;
+    MHillasSrc   *fHilSrc;
+    MNewImagePar *fNewImgPar;
+
+    TString      fHilName;
+    TString      fHilSrcName;
+    TString      fImgParName;
+
+    Float_t      fUsedPixelsMax;
+    Float_t      fCorePixelsMin;
+    Float_t      fSizeMin;
+    Float_t      fDistMin;
+    Float_t      fDistMax;
+    Float_t      fLengthMin;
+    Float_t      fWidthMin;
+
+    Double_t     fMm2Deg;    // conversion mm to degrees in camera
+
+    Int_t        fCut[5];
+
+    Bool_t       fResult;
+
+    Int_t PreProcess(MParList *pList);
+    Int_t Process();
+    Int_t PostProcess();
+
+    Bool_t IsExpressionTrue() const  { return fResult; }
+
+    Bool_t Set(Int_t rc);
+
+public:
+    MFCT1SelStandard(const char *HilSrcName="MHillasSrc",
+                     const char *name=NULL, const char *title=NULL);
+
+    void SetHillasName(const char *name) { fHilName = name; }
+    void SetImgParName(const char *name) { fImgParName = name; }
+
+    void SetCuts(Float_t usedpixelsmax, Float_t corepixelsmin,
+                 Float_t sizemin, Float_t distmin, Float_t distmax,
+                 Float_t lengthmin, Float_t widthmin);
+
+    ClassDef(MFCT1SelStandard, 0)   // Class to evaluate standard cuts
+};
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
Index: /trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h	(revision 6846)
+++ /trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h	(revision 6847)
@@ -12,7 +12,4 @@
 #pragma link C++ class MFParticleId+;
 
-#pragma link C++ class MFCT1SelBasic+;
-#pragma link C++ class MFCT1SelStandard+;
-#pragma link C++ class MFCT1SelFinal+;
 #pragma link C++ class MFSelBasic+;
 #pragma link C++ class MFSelStandard+;
Index: unk/MagicSoft/Mars/mfilter/MFCT1SelBasic.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.cc	(revision 6846)
+++ 	(revision )
@@ -1,261 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Wolfgang Wittek, 04/2003 <mailto:wittek@mppmu.mpg.de>
-!   Author(s): Thomas Bretz, 04/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2003
-!
-!
-\* ======================================================================== */
-
-/////////////////////////////////////////////////////////////////////////////
-//
-//  MFCT1SelBasic
-//
-//  This is a class to evaluate basic cuts
-//
-//  to be called after the calibration (when the number of photons is
-//               available for all pixels)
-//
-//  The basic cuts are :
-//
-//      remove bad runs
-//      thetamin < theta < thetamax
-//      software trigger fullfilled (with minimum no.of photons = minphotons)
-//
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#include "MFCT1SelBasic.h"
-
-#include "MParList.h"
-
-#include "MMcEvt.hxx"
-
-#include "MCerPhotEvt.h"
-#include "MRawRunHeader.h"
-
-#include "MGeomPix.h"
-#include "MGeomCam.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MFCT1SelBasic);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Default constructor.
-//
-MFCT1SelBasic::MFCT1SelBasic(const char *name, const char *title)
-{
-    fName  = name  ? name  : "MFCT1SelBasic";
-    fTitle = title ? title : "Filter to evaluate basic cuts";
-
-    // default values of cuts
-    SetCuts(13.0, 0.0, 60.0);
-}
-
-// --------------------------------------------------------------------------
-//
-// Set the cut values
-// 
-//
-void MFCT1SelBasic::SetCuts(Float_t minphotons, 
-                            Float_t thetamin, Float_t thetamax)
-{
-    fMinPhotons = minphotons;
-    fThetaMin   = thetamin;
-    fThetaMax   = thetamax;
-
-    *fLog << inf << "MFCT1SelBasic cut values : fMinPhotons, fThetaMin, fThetaMax = ";
-    *fLog << fMinPhotons <<",  " << fThetaMin << ",  " << fThetaMax << endl;
-}
-
-// --------------------------------------------------------------------------
-//
-// Set the pointers
-// 
-//
-Int_t MFCT1SelBasic::PreProcess(MParList *pList)
-{
-    fRawRun = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
-    if (!fRawRun)
-    {
-        *fLog << dbginf << "MRawRunHeader not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");
-    if (!fMcEvt)
-    {
-        *fLog << dbginf << "MMcEvt not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    fEvt = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt");
-    if (!fEvt)
-    {
-        *fLog << dbginf << "MCerPhotEvt not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    fCam = (MGeomCam*)pList->FindObject("MGeomCam");
-    if (!fCam)
-    {
-        *fLog << dbginf << "MGeomCam (Camera Geometry) missing in Parameter List... aborting." << endl;
-        return kFALSE;
-    }
-
-    memset(fCut, 0, sizeof(fCut));
-
-    return kTRUE;
-}
-
-Int_t MFCT1SelBasic::Set(Int_t rc)
-{
-    fCut[rc]++;
-    fResult=kTRUE;
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Evaluate basic cuts
-// 
-//     bad events    : fResult = kTRUE;
-//     good events   : fResult = kFALSE;
-//
-Int_t MFCT1SelBasic::Process()
-{
-    const Double_t theta = kRad2Deg*fMcEvt->GetTelescopeTheta();
-
-    fResult  = kFALSE;
-
-    // remove bad runs for MC gammas
-    if (fMcEvt->GetEnergy() == 0.0  &&  fMcEvt->GetImpact() == 0.0)
-    {
-      if (fRawRun->GetRunNumber() == 601  ||
-          fRawRun->GetRunNumber() == 613  ||
-          fRawRun->GetRunNumber() == 614    )
-	return Set(1);
-    }
-
-    if (theta<fThetaMin)
-        return Set(2);
-
-    if (theta>fThetaMax)
-        return Set(3);
-
-    if (!SwTrigger())
-        return Set(4);
-
-    fCut[0]++;
-
-    return kTRUE;
-}
-// --------------------------------------------------------------------------
-//
-// Software trigger
-// 
-// require 2 neighboring pixels (which are not in the outermost ring), 
-//                       each having at least 'fMinPhotons' photons
-// 
-// 
-Bool_t MFCT1SelBasic::SwTrigger()
-{
-    const Int_t entries = fEvt->GetNumPixels();
- 
-    for (Int_t i=0; i<entries; i++)
-    {
-        const MCerPhotPix &pix = (*fEvt)[i];
-
-        const Int_t id = pix.GetPixId();
-        if (!pix.IsPixelUsed())
-            continue;
-
-        const Double_t photons = pix.GetNumPhotons();
-        if (photons < fMinPhotons)
-            continue;
-
-        // this pixel is used and has the required no.of photons
-        // check whether this is also true for a neigboring pixel
-
-        const MGeomPix &gpix = (*fCam)[id];
-        if ( gpix.IsInOutermostRing() )
-            continue;
-
-        const Int_t nneighbors = gpix.GetNumNeighbors();
-        for (Int_t n=0; n<nneighbors; n++)
-        {
-            const Int_t id1 =  gpix.GetNeighbor(n);
-            if ( !fEvt->IsPixelUsed(id1) )
-                continue;
-
-            const MGeomPix &gpix1 = (*fCam)[id1];
-            if ( gpix1.IsInOutermostRing() )
-                continue;
-
-            const MCerPhotPix &pix1 = *fEvt->GetPixById(id1);
-
-            const Double_t photons1 = pix1.GetNumPhotons();
-            if (photons1 >= fMinPhotons)
-                return kTRUE;
-        }
-    }
-    return kFALSE;
-}
-
-// --------------------------------------------------------------------------
-//
-//  Prints some statistics about the Basic selections.
-//
-Int_t MFCT1SelBasic::PostProcess()
-{
-    if (GetNumExecutions()==0)
-        return kTRUE;
-
-    *fLog << inf << endl;
-    *fLog << GetDescriptor() << " execution statistics:" << endl;
-    *fLog << dec << setfill(' ');
-
-    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ;
-    *fLog << (int)(fCut[1]*100/GetNumExecutions()) ;
-    *fLog << "%) Evts skipped due to: bad run " << endl;
-
-    *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) ;
-    *fLog << (int)(fCut[2]*100/GetNumExecutions()) ;
-    *fLog << "%) Evts skipped due to: Zenith angle < " << fThetaMin << endl;
-
-    *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) ;
-    *fLog << (int)(fCut[3]*100/GetNumExecutions()) ;
-    *fLog << "%) Evts skipped due to: Zenith angle > " << fThetaMax << endl;
-
-    *fLog << " " << setw(7) << fCut[4] << " (" << setw(3) ;
-    *fLog << (int)(fCut[4]*100/GetNumExecutions()) ;
-    *fLog << "%) Evts skipped due to: Software trigger not fullfilled" ;
-    *fLog << " (with fMinPhotons = " << fMinPhotons << ")" << endl;
-
-    *fLog << " " << fCut[0] << " (" << (int)(fCut[0]*100/GetNumExecutions()) ;
-    *fLog << "%) Evts survived Basic selections!" << endl;
-    *fLog << endl;
-
-    return kTRUE;
-}
Index: unk/MagicSoft/Mars/mfilter/MFCT1SelFinal.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.cc	(revision 6846)
+++ 	(revision )
@@ -1,193 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Wolfgang Wittek  04/2003 <mailto:wittek@mppmu.mpg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2003
-!
-!
-\* ======================================================================== */
-
-/////////////////////////////////////////////////////////////////////////////
-//
-//  MFCT1SelFinal
-//
-//  WHAT ARE THE FINAL CUTS?
-//
-//  This is a class to evaluate the Final Cuts
-//  (these cuts define the final sample of gammas;
-//   relevant for the calculation of the effective collection areas)
-//
-//  to be called after the calculation of the hadroness
-//
-/////////////////////////////////////////////////////////////////////////////
-#include "MFCT1SelFinal.h"
-
-#include <math.h>
-
-#include "MParList.h"
-
-#include "MMcEvt.hxx"
-
-#include "MCerPhotEvt.h"
-
-#include "MGeomPix.h"
-#include "MGeomCam.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include "MHillasExt.h"
-#include "MHillasSrc.h"
-#include "MHadronness.h"
-
-ClassImp(MFCT1SelFinal);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Default constructor.
-//
-MFCT1SelFinal::MFCT1SelFinal(const char *hilsrcname,
-                             const char *name, const char *title)
-    : fHilSrcName(hilsrcname), fHadronnessName("MHadronness")
-{
-    fName  = name  ? name  : "MFCT1SelFinal";
-    fTitle = title ? title : "Class to evaluate the Final Cuts";
-
-    // default values of cuts
-    SetCuts(1.0, 100.0, 10.);
-}
-
-// --------------------------------------------------------------------------
-//
-// Set cut values
-// 
-//
-void MFCT1SelFinal::SetCuts(Float_t hadmax, Float_t alphamax, Float_t distmax) 
-{ 
-    fHadronnessMax =   hadmax;
-    fAlphaMax      = alphamax;
-    fDistMax       =  distmax;
-
-    *fLog << inf << "MFCT1SelFinal cut values : fHadronnessMax, fAlphaMax, fDistMax = ";
-    *fLog << fHadronnessMax << ",  " << fAlphaMax << ",  " << fDistMax <<  endl;
-}
-
-// --------------------------------------------------------------------------
-//
-// Set the pointers
-//
-Int_t MFCT1SelFinal::PreProcess(MParList *pList)
-{
-    fHilSrc = (MHillasSrc*)pList->FindObject(fHilSrcName, "MHillasSrc");
-    if (!fHilSrc)
-    {
-      *fLog << dbginf << "MHillasSrc object " << fHilSrcName << " not found... aborting." << endl;
-      return kFALSE;
-    }
-
-    fHadronness = (MHadronness*)pList->FindObject(fHadronnessName, "MHadronness");
-    if (!fHadronness)
-    {
-      *fLog << dbginf << "MHadronness not found... aborting." << endl;
-      return kFALSE;
-    }
-
-    MGeomCam *cam = (MGeomCam*)pList->FindCreateObj("MGeomCamCT1","MGeomCam");
-    if (!cam)
-    {
-        *fLog << err << "MGeomCam (Camera Geometry) not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    fMm2Deg = cam->GetConvMm2Deg();
-
-    memset(fCut, 0, sizeof(fCut));
-
-    return kTRUE;
-}
-
-Int_t MFCT1SelFinal::Set(Int_t rc)
-{
-    fCut[rc]++;
-    fResult=kTRUE;
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Evaluate final cuts
-// 
-// if cuts are fulfilled set fResult = kTRUE
-//
-Int_t MFCT1SelFinal::Process()
-{
-    const Double_t modalpha = fabs( fHilSrc->GetAlpha() );
-    const Double_t h = fHadronness->GetHadronness();
-
-    fResult = kFALSE;
-
-    if (h>fHadronnessMax)
-        return Set(1);
-
-    if (modalpha>fAlphaMax)
-        return Set(2);
-
-    if (fMm2Deg*fHilSrc->GetDist()>fDistMax)
-        return Set(3);
-
-    fCut[0]++;
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-//  Prints some statistics about the Final selections.
-//
-Int_t MFCT1SelFinal::PostProcess()
-{
-    if (GetNumExecutions()==0)
-        return kTRUE;
-
-    *fLog << inf << endl;
-    *fLog << GetDescriptor() << " execution statistics:" << endl;
-    *fLog << dec << setfill(' ');
-    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ;
-    *fLog << (int)(fCut[1]*100/GetNumExecutions());
-    *fLog << "%) Evts skipped due to: hadronness > "<< fHadronnessMax;
-    *fLog << " (hadronness from '" << fHadronnessName << "')" << endl;
-
-    *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) ;
-    *fLog << (int)(fCut[2]*100/GetNumExecutions());
-    *fLog << "%) Evts skipped due to: |ALPHA| > " << fAlphaMax;
-    *fLog << " [degrees]" << endl;
-
-    *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) ;
-    *fLog << (int)(fCut[3]*100/GetNumExecutions());
-    *fLog << "%) Evts skipped due to: DIST > " << fDistMax;
-    *fLog << " [degrees]" << endl;
-
-    *fLog << " " << fCut[0] << " (" ;
-    *fLog << (int)(fCut[0]*100/GetNumExecutions());
-    *fLog << "%) Evts survived Final selections!" << endl;
-    *fLog << endl;
-
-    return kTRUE;
-}
Index: unk/MagicSoft/Mars/mfilter/MFCT1SelFinal.h
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.h	(revision 6846)
+++ 	(revision )
@@ -1,70 +1,0 @@
-#ifndef MARS_MFCT1SelFinal
-#define MARS_MFCT1SelFinal
-
-/////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-// MSelFinal                                                               //
-//                                                                         //
-// Class to evaluate final cuts                                            //
-//                                                                         //
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef MARS_MFilter
-#include "MFilter.h"
-#endif
-
-class MHillas;
-class MHillasSrc;
-class MHadronness;
-
-class MFCT1SelFinal : public MFilter
-{
-private:
-    MHillasSrc  *fHilSrc;       
-    MHadronness *fHadronness;       
-
-    TString      fHilName;
-    TString      fHilSrcName;
-    TString      fHadronnessName;
- 
-    Float_t      fHadronnessMax;
-    Float_t      fAlphaMax;
-    Float_t      fDistMax;
-
-    Double_t     fMm2Deg;   // conversion mm to degrees in camera
-
-    Int_t        fCut[4];
-
-    Bool_t       fResult;
-
-    Int_t Set(Int_t rc);
-
-    Int_t PreProcess(MParList *pList);
-    Int_t Process();
-    Int_t PostProcess();
-
-    Bool_t IsExpressionTrue() const  { return fResult; }
-
-public:
-    MFCT1SelFinal(const char *HilSrcName="MHillasSrc",
-                  const char *name=NULL, const char *title=NULL);
-
-    void SetHadronnessName(const TString name) { fHadronnessName = name; }
-
-    void SetCuts(Float_t hadmax, Float_t alphamax, Float_t distmax); 
-
-    ClassDef(MFCT1SelFinal, 0)   // Class to evaluate final cuts
-};
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
Index: unk/MagicSoft/Mars/mfilter/MFCT1SelStandard.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.cc	(revision 6846)
+++ 	(revision )
@@ -1,221 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Wolfgang Wittek, 04/2003 <mailto:wittek@mppmu.mpg.de>
-!   Author(s): Thomas Bretz, 04/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2003
-!
-!
-\* ======================================================================== */
-
-/////////////////////////////////////////////////////////////////////////////
-//
-//  MFCT1SelStandard
-//
-//  This is a class to evaluate the Standard Cuts
-//
-//  WHAT ARE THE STANDARD CUTS?                                                                       //
-//
-//  to be called after the calculation of the image parameters
-//               before the g/h separation
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#include "MFCT1SelStandard.h"
-
-#include "MParList.h"
-
-#include "MMcEvt.hxx"
-
-#include "MGeomPix.h"
-#include "MGeomCam.h"
-
-#include "MCerPhotEvt.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-#include "MHillas.h"
-#include "MHillasExt.h"
-#include "MHillasSrc.h"
-#include "MNewImagePar.h"
-
-ClassImp(MFCT1SelStandard);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Default constructor.
-//
-MFCT1SelStandard::MFCT1SelStandard(const char *hilsrcname,
-                                   const char *name, const char *title)
-    : fHilName("MHillas"), fHilSrcName(hilsrcname), fImgParName("MNewImagePar")
-{
-    fName  = name  ? name  : "MFCT1SelStandard";
-    fTitle = title ? title : "Class to evaluate the Standard Cuts";
-
-    // default values of cuts
-    SetCuts(92, 4, 60, 0.4, 1.05, 0.0, 0.0);
-}
-
-// --------------------------------------------------------------------------
-//
-// Set the values for the cuts 
-// 
-//
-void MFCT1SelStandard::SetCuts(Float_t usedpixelsmax, Float_t corepixelsmin,
-                               Float_t sizemin, Float_t distmin, Float_t distmax,
-                               Float_t lengthmin, Float_t widthmin)
-{ 
-    fUsedPixelsMax = usedpixelsmax;
-    fCorePixelsMin = corepixelsmin;
-    fSizeMin       = sizemin;
-    fDistMin       = distmin;
-    fDistMax       = distmax;
-    fLengthMin     = lengthmin;
-    fWidthMin      = widthmin;
-
-    *fLog << inf << "MFCT1SelStandard cut values : fUsedPixelsMax, fCorePixelsMin = ";
-    *fLog << fUsedPixelsMax << ",  " << fCorePixelsMin << endl;
-    *fLog << inf << "     fSizeMin, fDistMin, fDistMax = " << fSizeMin ;
-    *fLog << ",  " << fDistMin << ",  " << fDistMax << endl;
-    *fLog << inf << "     fLengthMin, fWidthMin = " << fLengthMin ;
-    *fLog << ",  " << fWidthMin << endl;
-}
-
-// --------------------------------------------------------------------------
-//
-// MISSING
-//
-Int_t MFCT1SelStandard::PreProcess(MParList *pList)
-{
-    fHil = (MHillas*)pList->FindObject(fHilName, "MHillas");
-    if (!fHil)
-    {
-        *fLog << err << fHilName << " [MHillas] not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    fHilSrc = (MHillasSrc*)pList->FindObject(fHilSrcName, "MHillasSrc");
-    if (!fHilSrc)
-    {
-        *fLog << err << fHilSrcName << " [MHillasSrc] not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    fNewImgPar = (MNewImagePar*)pList->FindObject(fImgParName, "MNewImagePar");
-    if (!fNewImgPar)
-    {
-        *fLog << err << fImgParName << " [MNewImagePar] not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    MGeomCam *cam = (MGeomCam*)pList->FindObject("MGeomCam");
-    if (!cam)
-    {
-        *fLog << err << "MGeomCam (Camera Geometry) not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    fMm2Deg = cam->GetConvMm2Deg();
-
-    memset(fCut, 0, sizeof(fCut));
-
-    return kTRUE;
-}
-
-Bool_t MFCT1SelStandard::Set(Int_t rc)
-{
-    fResult = kTRUE;
-    fCut[rc]++;
-    return kTRUE;
-}
-// --------------------------------------------------------------------------
-//
-// Evaluate standard cuts
-// 
-// if selections are fulfilled set fResult = kTRUE;
-// 
-//
-Int_t MFCT1SelStandard::Process()
-{
-    const Double_t length     = fHil->GetLength() * fMm2Deg;
-    const Double_t width      = fHil->GetWidth()  * fMm2Deg;
-    const Double_t dist       = fHilSrc->GetDist()* fMm2Deg;
-    //const Double_t delta      = fHil->GetDelta()  * kRad2Deg;
-    const Double_t size       = fHil->GetSize();
-    const Int_t numusedpixels = fNewImgPar->GetNumUsedPixels();
-    const Int_t numcorepixels = fNewImgPar->GetNumCorePixels();
-
-    fResult  = kFALSE;
-
-    if (numusedpixels>=fUsedPixelsMax || numcorepixels<=fCorePixelsMin)
-        return Set(1);
-
-    if (size<=fSizeMin )
-        return Set(2);
-
-    if (dist<fDistMin || dist>fDistMax)
-        return Set(3);
-
-    if (length<=fLengthMin || width<=fWidthMin)
-        return Set(4);
-
-    fCut[0]++;
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-//  Prints some statistics about the Standard selections.
-//
-Int_t MFCT1SelStandard::PostProcess()
-{
-    if (GetNumExecutions()==0)
-        return kTRUE;
-
-    *fLog << inf << endl;
-    *fLog << GetDescriptor() << " execution statistics:" << endl;
-    *fLog << dec << setfill(' ');
-    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3);
-    *fLog << (int)(fCut[1]*100/GetNumExecutions()) ;
-    *fLog << "%) Evts skipped due to: Used pixels >= " << fUsedPixelsMax ;
-    *fLog << " or Core pixels <= " << fCorePixelsMin << endl;
-
-    *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) ;
-    *fLog << (int)(fCut[2]*100/GetNumExecutions()) ;
-    *fLog << "%) Evts skipped due to: SIZE <= " << fSizeMin << endl;
-
-    *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) ;
-    *fLog << (int)(fCut[3]*100/GetNumExecutions()) ;
-    *fLog << "%) Evts skipped due to: DIST < " << fDistMin;
-    *fLog << " or DIST > " << fDistMax << endl;
-
-    *fLog << " " << setw(7) << fCut[4] << " (" << setw(3) ;
-    *fLog << (int)(fCut[4]*100/GetNumExecutions()) ;
-    *fLog << "%) Evts skipped due to: LENGTH <= " << fLengthMin;
-    *fLog << " or WIDTH <= " << fWidthMin << endl;
-
-    *fLog << " " << fCut[0] << " (" ;
-    *fLog << (int)(fCut[0]*100/GetNumExecutions()) ;
-    *fLog << "%) Evts survived Standard selections!" << endl;
-    *fLog << endl;
-
-    return kTRUE;
-}
Index: unk/MagicSoft/Mars/mfilter/MFCT1SelStandard.h
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.h	(revision 6846)
+++ 	(revision )
@@ -1,78 +1,0 @@
-#ifndef MARS_MFCT1SelStandard
-#define MARS_MFCT1SelStandard
-
-/////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-// MFCT1SelStandard                                                        //
-//                                                                         //
-// Class to evaluate standard cuts                                         //
-//                                                                         //
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef MARS_MFilter
-#include "MFilter.h"
-#endif
-
-class MHillas;
-class MHillasSrc;
-class MNewImagePar;
-
-class MFCT1SelStandard : public MFilter
-{
-private:
-    MHillas      *fHil;
-    MHillasSrc   *fHilSrc;
-    MNewImagePar *fNewImgPar;
-
-    TString      fHilName;
-    TString      fHilSrcName;
-    TString      fImgParName;
-
-    Float_t      fUsedPixelsMax;
-    Float_t      fCorePixelsMin;
-    Float_t      fSizeMin;
-    Float_t      fDistMin;
-    Float_t      fDistMax;
-    Float_t      fLengthMin;
-    Float_t      fWidthMin;
-
-    Double_t     fMm2Deg;    // conversion mm to degrees in camera
-
-    Int_t        fCut[5];
-
-    Bool_t       fResult;
-
-    Int_t PreProcess(MParList *pList);
-    Int_t Process();
-    Int_t PostProcess();
-
-    Bool_t IsExpressionTrue() const  { return fResult; }
-
-    Bool_t Set(Int_t rc);
-
-public:
-    MFCT1SelStandard(const char *HilSrcName="MHillasSrc",
-                     const char *name=NULL, const char *title=NULL);
-
-    void SetHillasName(const char *name) { fHilName = name; }
-    void SetImgParName(const char *name) { fImgParName = name; }
-
-    void SetCuts(Float_t usedpixelsmax, Float_t corepixelsmin,
-                 Float_t sizemin, Float_t distmin, Float_t distmax,
-                 Float_t lengthmin, Float_t widthmin);
-
-    ClassDef(MFCT1SelStandard, 0)   // Class to evaluate standard cuts
-};
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
Index: /trunk/MagicSoft/Mars/mfilter/Makefile
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/Makefile	(revision 6846)
+++ /trunk/MagicSoft/Mars/mfilter/Makefile	(revision 6847)
@@ -24,7 +24,4 @@
 	   MFParticleId.cc \
 	   MFAlpha.cc \
-	   MFCT1SelBasic.cc \
-	   MFCT1SelStandard.cc \
-	   MFCT1SelFinal.cc \
 	   MFSelBasic.cc \
 	   MFSelStandard.cc \
