Index: trunk/MagicSoft/Mars/manalysis/MSelStandard.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MSelStandard.cc	(revision 1762)
+++ trunk/MagicSoft/Mars/manalysis/MSelStandard.cc	(revision 1809)
@@ -1,2 +1,3 @@
+
 /* ======================================================================== *\
 !
@@ -39,4 +40,5 @@
 
 #include "MHillas.h"
+#include "MHillasExt.h"
 #include "MHillasSrc.h"
 #include "MCerPhotEvt.h"
@@ -54,5 +56,5 @@
 // Default constructor.
 //
-MSelStandard::MSelStandard(const MHillas *parhil, const MHillasSrc *parhilsrc,
+MSelStandard::MSelStandard(const char *HilName, const char *HilSrcName,
                            const char *name, const char *title)
 {
@@ -60,6 +62,6 @@
     fTitle = title ? title : "Task to evaluate the Standard Cuts";
 
-    fHil    = parhil;
-    fHilsrc = parhilsrc;
+    fHilName    = HilName;
+    fHilSrcName = HilSrcName;
 }
 
@@ -72,4 +74,19 @@
 Bool_t MSelStandard::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)
+    {
+      *fLog << dbginf << "MHillasSrc object " << fHilSrcName << " not found... aborting." << endl;
+      return kFALSE;
+    }
+
+
     fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");
     if (!fMcEvt)
@@ -95,5 +112,5 @@
     fMm2Deg = fCam->GetConvMm2Deg();
 
-    *fLog << "fMm2Deg = " << fMm2Deg << endl;
+    //*fLog << "fMm2Deg = " << fMm2Deg << endl;
 
     memset(fErrors, 0, sizeof(fErrors));
@@ -114,7 +131,7 @@
     Int_t rc = 0;
 
-    //Double_t fLength       = fHil->GetLength() * fMm2Deg;
-    //Double_t fWidth        = fHil->GetWidth()  * fMm2Deg;
-    Double_t fDist         = fHilsrc->GetDist()* fMm2Deg;
+    Double_t fLength       = fHil->GetLength() * fMm2Deg;
+    Double_t fWidth        = fHil->GetWidth()  * fMm2Deg;
+    Double_t fDist         = fHilSrc->GetDist()* fMm2Deg;
     //Double_t fDelta        = fHil->GetDelta()  * kRad2Deg;
     Double_t fSize         = fHil->GetSize();
@@ -122,6 +139,5 @@
     Int_t fNumCorePixels   = fHil->GetNumCorePixels();
 
-    if (     fSize <= 60.0         ||  fDist< 0.4           ||  fDist > 1.1  
-         ||  fNumUsedPixels >= 92  ||  fNumCorePixels < 4)
+    if ( fNumUsedPixels >= 92  ||  fNumCorePixels < 4 )
     {
       //*fLog << "MSelStandard::Process; fSize, fDist, fNumUsedPixels, fNumCorePixels = "
@@ -129,4 +145,19 @@
       //      << fNumCorePixels << endl;
       rc = 1;
+    }    
+
+    else if ( fSize <= 60.0         ||  fDist< 0.4           ||  fDist > 1.1 )
+    {
+      //*fLog << "MSelStandard::Process; fSize, fDist, fNumUsedPixels, fNumCorePixels = "
+      //      << fSize << ",  " << fDist << ",  " << fNumUsedPixels << ",  "
+      //      << fNumCorePixels << endl;
+      rc = 2;
+    }    
+
+    else if ( fLength <= 0.0         ||  fWidth <= 0.0 )
+    {
+      //*fLog << "MSelStandard::Process; fLength, fWidth = "
+      //      << fLength << ",  " << fWidth << endl;
+      rc = 3;
     }    
 
@@ -149,5 +180,9 @@
     *fLog << GetDescriptor() << " execution statistics:" << endl;
     *fLog << dec << setfill(' ');
-    *fLog << " " << setw(7) << fErrors[1] << " (" << setw(3) << (int)(fErrors[1]*100/GetNumExecutions()) << "%) Evts skipped due to: Standard selections are not fullfilled" << endl;
+    *fLog << " " << setw(7) << fErrors[1] << " (" << setw(3) << (int)(fErrors[1]*100/GetNumExecutions()) << "%) Evts skipped due to: Requirements on no.of used or core pxels not fullfilled" << endl;
+
+    *fLog << " " << setw(7) << fErrors[2] << " (" << setw(3) << (int)(fErrors[2]*100/GetNumExecutions()) << "%) Evts skipped due to: Requirements on SIZE or DIST not fullfilled" << endl;
+
+    *fLog << " " << setw(7) << fErrors[3] << " (" << setw(3) << (int)(fErrors[3]*100/GetNumExecutions()) << "%) Evts skipped due to: Length or Width is <= 0" << endl;
 
     *fLog << " " << fErrors[0] << " (" << (int)(fErrors[0]*100/GetNumExecutions()) << "%) Evts survived Standard selections!" << endl;
@@ -156,2 +191,4 @@
     return kTRUE;
 }
+
+
