Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2036)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2037)
@@ -1,4 +1,20 @@
                                                  -*-*- END OF LINE -*-*-
- 2003/04/29: Abelardo Moralej0
+ 2003/04/29: Thomas Bretz
+ 
+   * mfilter/MFCT1SelBasic.[h,cc], mfilter/MFCT1SelFinal.[h,cc],
+     mfilter/MFCT1SelStandard.[h,cc]:
+     - reordered includes
+     - removed MHillas from constructor (if present)
+     - added corresponding Setter-methods
+     - added many const qualifiers
+     - removed some obsolete data members
+     - made some member functions private
+     - only store fMm2Deg, not the pointer to MGeomCam
+     - don't use the CT1 camera build in... (to be discussed)
+     - fixed MHillas, MHillasExt and MNewImagePar stuff
+
+
+
+ 2003/04/29: Abelardo Moralejo
 
    * mmontecarlo/MMcCollectionareaCalc.[h,cc]
@@ -15,4 +31,6 @@
        to CalcEfficiency.
 
+
+
  2003/04/28: Nadia Tonello 
 
@@ -26,5 +44,7 @@
    * manalysis/MCerPhotPix.[h,cc]
      - added fRing and Get-Set functions 
- 
+
+
+
  2003/04/28: Oscar Blanch
 
@@ -37,4 +57,6 @@
    * mgeom/Makefile 
      - Added class MGeomCamECO1000
+
+
 
  2003/04/28: Abelardo Moralejo
@@ -46,4 +68,6 @@
        Removed couts and used fLog instead. Function fcn is no longer
        declared external.
+
+
 
  2003/04/28: Thomas Bretz
Index: trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.cc
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.cc	(revision 2036)
+++ trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.cc	(revision 2037)
@@ -16,5 +16,6 @@
 !
 !
-!   Author(s): Wolfgang Wittek  04/2003 <mailto:wittek@mppmu.mpg.de>
+!   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
@@ -24,12 +25,14 @@
 
 /////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-//  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)                                  //
-//                                                                         //
+//
+//  MFCT1SelBasic
+//
+//  This is a class to evaluate basic cuts
+//
+//  WHAT ARE THE BASIC CUTS?
+//
+//  to be called after the calibration (when the number of photons is
+//               available for all pixels)
+//
 /////////////////////////////////////////////////////////////////////////////
 
@@ -38,12 +41,14 @@
 #include "MParList.h"
 
-#include "MHillas.h"
+#include "MMcEvt.hxx"
+
 #include "MCerPhotEvt.h"
-#include "MMcEvt.hxx"
-#include "MRawRunHeader.h"
+//nclude "MRawRunHeader.h"
+
+#include "MGeomPix.h"
 #include "MGeomCam.h"
+
+#include "MPedestalPix.h"
 #include "MPedestalCam.h"
-#include "MPedestalPix.h"
-#include "MGeomPix.h"
 
 #include "MLog.h"
@@ -73,10 +78,10 @@
                             Float_t thetamin, Float_t thetamax)
 {
-  fMinPhotons = minphotons;
-  fThetaMin   = thetamin;
-  fThetaMax   = thetamax;
-
-  *fLog << inf << "MFCT1SelBasic cut values : fMinPhotons, fThetaMin, fThetaMax = "
-        << fMinPhotons <<",  " << fThetaMin << ",  " << fThetaMax << endl;
+    fMinPhotons = minphotons;
+    fThetaMin   = thetamin;
+    fThetaMax   = thetamax;
+
+    *fLog << inf << "MFCT1SelBasic cut values : fMinPhotons, fThetaMin, fThetaMax = ";
+    *fLog << fMinPhotons <<",  " << fThetaMin << ",  " << fThetaMax << endl;
 }
 
@@ -88,4 +93,5 @@
 Bool_t MFCT1SelBasic::PreProcess(MParList *pList)
 {
+    /*
     fRawRun = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
     if (!fRawRun)
@@ -94,4 +100,5 @@
         return kFALSE;
     }
+    */
 
     fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");
@@ -109,5 +116,4 @@
     }
 
-
     fCam = (MGeomCam*)pList->FindObject("MGeomCam");
     if (!fCam)
@@ -116,5 +122,5 @@
         return kFALSE;
     }
-
+/*
     fPed = (MPedestalCam*)pList->FindObject("MPedestalCam");
     if (!fPed)
@@ -123,5 +129,5 @@
         return kFALSE;
     }
-
+*/
     memset(fCut, 0, sizeof(fCut));
 
@@ -138,14 +144,9 @@
 Bool_t MFCT1SelBasic::Process()
 {
+    const Double_t theta = kRad2Deg*fMcEvt->GetTelescopeTheta();
+
     Int_t rc = 0;
     fResult  = kFALSE;
 
-    //if ( fRawRun->GetRunNumber() < 16279 ) 
-    //{
-    //   rc = 1;
-    //   fResult = kTRUE;
-    //}
-
-    Double_t theta = kRad2Deg*fMcEvt->GetTelescopeTheta();
     if ( theta < fThetaMin )
     {
@@ -153,5 +154,4 @@
       fResult = kTRUE;
     }    
-
     else if ( theta > fThetaMax )
     {
@@ -159,8 +159,6 @@
       fResult = kTRUE;
     }    
-
     else if ( !SwTrigger() )
     {
-      //*fLog << "MFCT1SelBasic::Process; SwTrigger = " << SwTrigger << endl;
       rc = 3;
       fResult = kTRUE;
@@ -185,31 +183,38 @@
     for (Int_t i=0; i<entries; i++)
     {
-      MCerPhotPix &pix = (*fEvt)[i];
-      Int_t id = pix.GetPixId();
-      if (!pix.IsPixelUsed()) continue;
-
-      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
-
-      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;
-
-        MGeomPix &gpix1 = (*fCam)[id1];
-        if ( gpix1.IsInOutermostRing() ) continue;
-
-        MCerPhotPix &pix1 = *(fEvt->GetPixById(id1));      
-
-        Double_t photons1 = pix1.GetNumPhotons();
-        if (photons1 >= fMinPhotons) return kTRUE;
-      }
+        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;
@@ -228,36 +233,21 @@
     *fLog << GetDescriptor() << " execution statistics:" << endl;
     *fLog << dec << setfill(' ');
-    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) 
-          << (int)(fCut[1]*100/GetNumExecutions()) 
-          << "%) Evts skipped due to: Zenith angle < " << fThetaMin << endl;
-
-    *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) 
-          << (int)(fCut[2]*100/GetNumExecutions()) 
-          << "%) Evts skipped due to: Zenith angle > " << fThetaMax << endl;
-
-    *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) 
-          << (int)(fCut[3]*100/GetNumExecutions()) 
-          << "%) Evts skipped due to: Software trigger not fullfilled" 
-          << " (with fMinPhotons = " << fMinPhotons << ")" << endl;
-
-    *fLog << " " << fCut[0] << " (" << (int)(fCut[0]*100/GetNumExecutions()) 
-          << "%) Evts survived Basic selections!" << endl;
+    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ;
+    *fLog << (int)(fCut[1]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts skipped due to: Zenith angle < " << fThetaMin << endl;
+
+    *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) ;
+    *fLog << (int)(fCut[2]*100/GetNumExecutions()) ;
+    *fLog << "%) Evts skipped due to: Zenith angle > " << fThetaMax << endl;
+
+    *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) ;
+    *fLog << (int)(fCut[3]*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/mfilter/MFCT1SelBasic.h
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.h	(revision 2036)
+++ trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.h	(revision 2037)
@@ -14,19 +14,18 @@
 #endif
 
+class MMcEvt;
 class MGeomCam;
+class MCerPhotEvt;
 class MPedestalCam;
-class MCerPhotEvt;
-class MHillas;
-class MMcEvt;
-class MRawRunHeader;
+//class MRawRunHeader;
 
 class MFCT1SelBasic : public MFilter
 {
 private:
-    const MPedestalCam  *fPed;      // Pedestal information
+    const MMcEvt        *fMcEvt;       
     const MGeomCam      *fCam;      // Camera Geometry 
     const MCerPhotEvt   *fEvt;      // Cerenkov Photon Event 
-    const MMcEvt        *fMcEvt;       
-    const MRawRunHeader *fRawRun;       
+    //const MPedestalCam  *fPed;      // Pedestal information
+    //const MRawRunHeader *fRawRun;
 
     Float_t     fMinPhotons;
@@ -34,12 +33,7 @@
     Float_t     fThetaMax;
 
-    Bool_t      fResult;
-
     Int_t       fCut[4];
 
-public:
-    MFCT1SelBasic(const char *name=NULL, const char *title=NULL);
-
-    Bool_t IsExpressionTrue() const { return fResult; }
+    Bool_t      fResult;
 
     Bool_t PreProcess(MParList *pList);
@@ -47,5 +41,11 @@
     Bool_t PostProcess();
 
+    Bool_t IsExpressionTrue() const { return fResult; }
+
     Bool_t SwTrigger();
+
+public:
+    MFCT1SelBasic(const char *name=NULL, const char *title=NULL);
+
     void SetCuts(Float_t minphotons, Float_t thetamin, Float_t thetamax);
 
Index: trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.cc
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.cc	(revision 2036)
+++ trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.cc	(revision 2037)
@@ -24,32 +24,35 @@
 
 /////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-//  MFCT1SelFinal                                                          //
-//                                                                         //
-//  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                    //
-//                                                                         //
+//
+//  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 "MFCT1SelFinal.h"
+#include <math.h>
 
 #include "MParList.h"
 
-#include "MHillas.h"
-#include "MHillasExt.h"
-#include "MHillasSrc.h"
+#include "MMcEvt.hxx"
+
 #include "MCerPhotEvt.h"
-#include "MMcEvt.hxx"
+
+#include "MGeomPix.h"
 #include "MGeomCam.h"
-#include "MGeomCamCT1.h"
-#include "MGeomPix.h"
-#include "MHadronness.h"
 
 #include "MLog.h"
 #include "MLogManip.h"
+
+#include "MHillasExt.h"
+#include "MHillasSrc.h"
+#include "MHadronness.h"
 
 ClassImp(MFCT1SelFinal);
@@ -59,16 +62,10 @@
 // Default constructor.
 //
-MFCT1SelFinal::MFCT1SelFinal(const char *HilName, const char *HilSrcName,
-                     const char *name, const char *title)
+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";
-
-    fHilName        = HilName;
-    fHilSrcName     = HilSrcName;
-    fHadronnessName = "MHadronness";
-
-    MGeomCamCT1 camct1;
-    fMm2Deg = camct1.GetConvMm2Deg();
 
     // default values of cuts
@@ -83,10 +80,10 @@
 void MFCT1SelFinal::SetCuts(Float_t hadmax, Float_t alphamax, Float_t distmax) 
 { 
-  fHadronnessMax =   hadmax; 
-  fAlphaMax      = alphamax;
-  fDistMax       =  distmax; 
+    fHadronnessMax =   hadmax;
+    fAlphaMax      = alphamax;
+    fDistMax       =  distmax;
 
-  *fLog << inf << "MFCT1SelFinal cut values : fHadronnessMax, fAlphaMax, fDistMax = "
-        << fHadronnessMax << ",  " << fAlphaMax << ",  " << fDistMax <<  endl;
+    *fLog << inf << "MFCT1SelFinal cut values : fHadronnessMax, fAlphaMax, fDistMax = ";
+    *fLog << fHadronnessMax << ",  " << fAlphaMax << ",  " << fDistMax <<  endl;
 }
 
@@ -94,15 +91,7 @@
 //
 // Set the pointers
-// 
 //
 Bool_t MFCT1SelFinal::PreProcess(MParList *pList)
 {
-    fHil    = (MHillasExt*)pList->FindObject(fHilName, "MHillasExt");
-    if (!fHil)
-    {
-      *fLog << dbginf << "MHillasExt object " << fHilName << " not found... aborting." << endl;
-      return kFALSE;
-    }
-
     fHilSrc = (MHillasSrc*)pList->FindObject(fHilSrcName, "MHillasSrc");
     if (!fHilSrc)
@@ -119,10 +108,12 @@
     }
 
-    fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");
-    if (!fMcEvt)
+    MGeomCam *cam = (MGeomCam*)pList->FindObject("MGeomCam");
+    if (!cam)
     {
-        *fLog << dbginf << "MMcEvt not found... aborting." << endl;
+        *fLog << err << "MGeomCam (Camera Geometry) not found... aborting." << endl;
         return kFALSE;
     }
+
+    fMm2Deg = cam->GetConvMm2Deg();
 
     memset(fCut, 0, sizeof(fCut));
@@ -139,10 +130,9 @@
 Bool_t MFCT1SelFinal::Process()
 {
+    const Double_t modalpha = fabs( fHilSrc->GetAlpha() );
+    const Double_t h = fHadronness->GetHadronness();
+
     Int_t rc = 0;
     fResult = kFALSE;
-
-    Double_t modalpha = fabs( fHilSrc->GetAlpha() ); 
-
-    Double_t h = fHadronness->GetHadronness();
 
     if ( h>fHadronnessMax )
@@ -151,5 +141,4 @@
       fResult = kTRUE;
     }    
-
     else if ( modalpha > fAlphaMax )
     {
@@ -157,5 +146,4 @@
       fResult = kTRUE;
     }
-
     else if ( fMm2Deg*fHilSrc->GetDist() > fDistMax )
     {
@@ -181,22 +169,22 @@
     *fLog << GetDescriptor() << " execution statistics:" << endl;
     *fLog << dec << setfill(' ');
-    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) 
-          << (int)(fCut[1]*100/GetNumExecutions()) 
-          << "%) Evts skipped due to: hadronness > "<< fHadronnessMax 
-          << " (hadronness from '" << fHadronnessName << "')" << endl;
+    *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) 
-          << (int)(fCut[2]*100/GetNumExecutions()) 
-          << "%) Evts skipped due to: |ALPHA| > " << fAlphaMax
-          << " [degrees]" << 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) 
-	  << (int)(fCut[3]*100/GetNumExecutions()) 
-	  << "%) Evts skipped due to: DIST > " << fDistMax
-	  << " [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] << " (" 
-          << (int)(fCut[0]*100/GetNumExecutions()) 
-          << "%) Evts survived Final selections!" << endl;
+    *fLog << " " << fCut[0] << " (" ;
+    *fLog << (int)(fCut[0]*100/GetNumExecutions());
+    *fLog << "%) Evts survived Final selections!" << endl;
     *fLog << endl;
 
Index: trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.h
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.h	(revision 2036)
+++ trunk/MagicSoft/Mars/mfilter/MFCT1SelFinal.h	(revision 2037)
@@ -14,9 +14,6 @@
 #endif
 
-class MGeomCam;
-class MCerPhotEvt;
 class MHillas;
 class MHillasSrc;
-class MMcEvt;
 class MHadronness;
 
@@ -24,13 +21,7 @@
 {
 private:
-    MGeomCam    *fCam;      // Camera Geometry 
-    MCerPhotEvt *fEvt;      // Cerenkov Photon Event 
-    MMcEvt      *fMcEvt;       
-    MHillas     *fHil;       
     MHillasSrc  *fHilSrc;       
     MHadronness *fHadronness;       
 
-    Double_t     fMm2Deg;   // conversion mm to degrees in camera
-    Int_t        fCut[4];
     TString      fHilName;
     TString      fHilSrcName;
@@ -41,17 +32,21 @@
     Float_t      fDistMax;
 
+    Double_t     fMm2Deg;   // conversion mm to degrees in camera
+
+    Int_t        fCut[4];
+
     Bool_t       fResult;
-
-
-public:
-    MFCT1SelFinal(const char *HilName="MHillas", const char *HilSrcName="MHillasSrc",
-                  const char *name=NULL, const char *title=NULL);
-
-    void SetHadronnessName(const TString name) { fHadronnessName = name; }
-    Bool_t IsExpressionTrue() const  { return fResult; }
 
     Bool_t PreProcess(MParList *pList);
     Bool_t Process();
     Bool_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); 
Index: trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.cc
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.cc	(revision 2036)
+++ trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.cc	(revision 2037)
@@ -16,5 +16,6 @@
 !
 !
-!   Author(s): Wolfgang Wittek  04/2003 <mailto:wittek@mppmu.mpg.de>
+!   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
@@ -24,12 +25,14 @@
 
 /////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-//  MFCT1SelStandard                                                       //
-//                                                                         //
-//  This is a class to evaluate the Standard Cuts                          //
-//                                                                         //
-//  to be called after the calculation of the image parameters             //
-//               before the g/h separation                                 //
-//                                                                         //
+//
+//  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
+//
 /////////////////////////////////////////////////////////////////////////////
 
@@ -37,15 +40,19 @@
 
 #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 "MCerPhotEvt.h"
-#include "MMcEvt.hxx"
-#include "MGeomCam.h"
-#include "MGeomPix.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
+#include "MNewImagePar.h"
 
 ClassImp(MFCT1SelStandard);
@@ -55,13 +62,11 @@
 // Default constructor.
 //
-MFCT1SelStandard::MFCT1SelStandard(const char *HilName, const char *HilSrcName,
+MFCT1SelStandard::MFCT1SelStandard(const char *hilsrcname,
                                    const char *name, const char *title)
+    : fHilName("MHillas"), fHilSrcName(hilsrcname), fImgParName("MNewImgPar")
 {
     fName  = name  ? name  : "MFCT1SelStandard";
     fTitle = title ? title : "Class to evaluate the Standard Cuts";
 
-    fHilName    = HilName;
-    fHilSrcName = HilSrcName;
-
     // default values of cuts
     SetCuts(92, 4, 60, 0.4, 1.05, 0.0, 0.0);
@@ -74,36 +79,34 @@
 //
 void MFCT1SelStandard::SetCuts(Float_t usedpixelsmax, Float_t corepixelsmin,
-                          Float_t sizemin, Float_t distmin, Float_t distmax,
-                          Float_t lengthmin, Float_t widthmin)
+                               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 = "
-        << fUsedPixelsMax << ",  " << fCorePixelsMin << endl;
-  *fLog << inf << "     fSizeMin, fDistMin, fDistMax = " << fSizeMin 
-        << ",  " << fDistMin << ",  " << fDistMax << endl; 
-  *fLog << inf << "     fLengthMin, fWidthMin = " << fLengthMin 
-        << ",  " << fWidthMin << endl; 
-}
-
-// --------------------------------------------------------------------------
-//
-// 
-// 
-// 
+    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
 //
 Bool_t MFCT1SelStandard::PreProcess(MParList *pList)
 {
-    fHil    = (MHillasExt*)pList->FindObject(fHilName, "MHillasExt");
+    fHil = (MHillas*)pList->FindObject(fHilName, "MHillas");
     if (!fHil)
     {
-      *fLog << dbginf << "MHillasExt object " << fHilName << " not found... aborting." << endl;
-      return kFALSE;
+        *fLog << err << fHilName << " [MHillas] not found... aborting." << endl;
+        return kFALSE;
     }
 
@@ -111,33 +114,23 @@
     if (!fHilSrc)
     {
-      *fLog << dbginf << "MHillasSrc object " << fHilSrcName << " 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;
-    }
-    fMm2Deg = fCam->GetConvMm2Deg();
-
-    //*fLog << "fMm2Deg = " << fMm2Deg << endl;
+        *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));
@@ -155,15 +148,15 @@
 Bool_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();
+
     Int_t rc = 0;
     fResult  = kFALSE;
 
-    Double_t length       = fHil->GetLength() * fMm2Deg;
-    Double_t width        = fHil->GetWidth()  * fMm2Deg;
-    Double_t dist         = fHilSrc->GetDist()* fMm2Deg;
-    //Double_t delta        = fHil->GetDelta()  * kRad2Deg;
-    Double_t size         = fHil->GetSize();
-    Int_t numusedpixels   = fHil->GetNumUsedPixels();
-    Int_t numcorepixels   = fHil->GetNumCorePixels();
-
     if ( numusedpixels >= fUsedPixelsMax  ||  numcorepixels <= fCorePixelsMin )
     {
@@ -171,5 +164,4 @@
       fResult = kTRUE;
     }    
-
     else if ( size <= fSizeMin )
     {
@@ -177,5 +169,4 @@
       fResult = kTRUE;
     }    
-
     else if ( dist< fDistMin   ||  dist > fDistMax )
     {
@@ -183,5 +174,4 @@
       fResult = kTRUE;
     }    
-
     else if ( length <= fLengthMin   ||  width <= fWidthMin )
     {
@@ -207,26 +197,26 @@
     *fLog << GetDescriptor() << " execution statistics:" << endl;
     *fLog << dec << setfill(' ');
-    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) 
-          << (int)(fCut[1]*100/GetNumExecutions()) 
-          << "%) Evts skipped due to: Used pixels >= " << fUsedPixelsMax 
-          << " or Core pixels <= " << fCorePixelsMin << endl;
-
-    *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) 
-          << (int)(fCut[2]*100/GetNumExecutions()) 
-          << "%) Evts skipped due to: SIZE <= " << fSizeMin << endl;
-
-    *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) 
-          << (int)(fCut[3]*100/GetNumExecutions()) 
-          << "%) Evts skipped due to: DIST < " << fDistMin 
-          << " or DIST > " << fDistMax << endl;
-
-    *fLog << " " << setw(7) << fCut[4] << " (" << setw(3) 
-          << (int)(fCut[4]*100/GetNumExecutions()) 
-          << "%) Evts skipped due to: LENGTH <= " << fLengthMin 
-          << " or WIDTH <= " << fWidthMin << endl;
-
-    *fLog << " " << fCut[0] << " (" 
-          << (int)(fCut[0]*100/GetNumExecutions()) 
-          << "%) Evts survived Standard selections!" << endl;
+    *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;
 
Index: trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.h
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.h	(revision 2036)
+++ trunk/MagicSoft/Mars/mfilter/MFCT1SelStandard.h	(revision 2037)
@@ -14,43 +14,45 @@
 #endif
 
-class MGeomCam;
-class MCerPhotEvt;
 class MHillas;
 class MHillasSrc;
-class MMcEvt;
+class MNewImagePar;
 
 class MFCT1SelStandard : public MFilter
 {
 private:
-    MGeomCam    *fCam;      // Camera Geometry 
-    MCerPhotEvt *fEvt;      // Cerenkov Photon Event 
-    MMcEvt      *fMcEvt;       
-    MHillas     *fHil;       
-    MHillasSrc  *fHilSrc;       
+    MHillas      *fHil;
+    MHillasSrc   *fHilSrc;
+    MNewImagePar *fNewImgPar;
 
-    Double_t     fMm2Deg;   // conversion mm to degrees in camera
+    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];
-    TString      fHilName;
-    TString      fHilSrcName; 
 
-    Float_t     fUsedPixelsMax;
-    Float_t     fCorePixelsMin;
-    Float_t     fSizeMin;
-    Float_t     fDistMin;
-    Float_t     fDistMax;
-    Float_t     fLengthMin;
-    Float_t     fWidthMin;
-
-    Bool_t      fResult;
-
-public:
-    MFCT1SelStandard(const char *HilName="MHillas", const char *HilSrcName="MHillasSrc",
-                 const char *name=NULL, const char *title=NULL);
-
-    Bool_t IsExpressionTrue() const  { return fResult; }
+    Bool_t       fResult;
 
     Bool_t PreProcess(MParList *pList);
     Bool_t Process();
     Bool_t PostProcess();
+
+    Bool_t IsExpressionTrue() const  { return fResult; }
+
+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,
Index: trunk/MagicSoft/Mars/mgeom/MGeomCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCam.cc	(revision 2036)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCam.cc	(revision 2037)
@@ -35,5 +35,5 @@
 #include "MGeomCam.h"
 
-#include <TClass.h>
+#include <TClass.h>     // IsA()->New()
 
 #include "MLog.h"
Index: trunk/MagicSoft/Mars/mgeom/MGeomCamCT1.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCamCT1.cc	(revision 2036)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCamCT1.cc	(revision 2037)
@@ -19,5 +19,5 @@
 !   Author(s): Harald Kornmayer 1/2001
 !
-!   Copyright: MAGIC Software Development, 2000-2002
+!   Copyright: MAGIC Software Development, 2000-2003
 !
 !
@@ -33,14 +33,12 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-
 #include "MGeomCamCT1.h"
 
-
 #include <math.h>     // floor
 
-#include "TCanvas.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
+/*
+ #include "MLog.h"
+ #include "MLogManip.h"
+ */
 
 #include "MGeomPix.h"
Index: trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.cc	(revision 2036)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.cc	(revision 2037)
@@ -16,8 +16,7 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
-!   Author(s): Harald Kornmayer 1/2001
+!   Author(s): Oscar Blanch, 4/2003 <mailto:blanch@ifae.es>
 !
-!   Copyright: MAGIC Software Development, 2000-2002
+!   Copyright: MAGIC Software Development, 2000-2003
 !
 !
@@ -28,12 +27,9 @@
 // MGeomCamECO1000
 //
-// This class stores the geometry information of the Magic camera.
+// This class stores the geometry information of the ECO1000 camera.
 // All information are copied from tables, see source code.
 //
 ////////////////////////////////////////////////////////////////////////////
-
 #include "MGeomCamECO1000.h"
-
-#include "TCanvas.h"
 
 #include "MLog.h"
@@ -66,5 +62,5 @@
     //   fill the geometry class with the coordinates of the MAGIC camera
     //
-    *fLog << inf << " Creating Magic geometry " << endl ;
+    *fLog << inf << " Creating ECO1000 geometry " << endl ;
 
     //
@@ -302,5 +298,4 @@
     //   fill the pixels list with this data
     //
-
     for (UInt_t i=0; i<GetNumPixels(); i++)
         (*this)[i].Set(xtemp[i], ytemp[i], rtemp[i]) ;
Index: trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.h
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.h	(revision 2036)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.h	(revision 2037)
@@ -15,5 +15,5 @@
     MGeomCamECO1000(const char *name=NULL);
 
-    ClassDef(MGeomCamECO1000, 1)		// Geometry class for the Magic camera
+    ClassDef(MGeomCamECO1000, 1) // Geometry class for the ECO1000 camera
 };
 
Index: trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc	(revision 2036)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc	(revision 2037)
@@ -19,5 +19,5 @@
 !   Author(s): Harald Kornmayer 1/2001
 !
-!   Copyright: MAGIC Software Development, 2000-2002
+!   Copyright: MAGIC Software Development, 2000-2003
 !
 !
@@ -32,11 +32,10 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-
 #include "MGeomCamMagic.h"
 
-#include "TCanvas.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
+/*
+ #include "MLog.h"
+ #include "MLogManip.h"
+ */
 
 #include "MGeomPix.h"
