Index: trunk/MagicSoft/Mars/mtemp/mifae/programs/makeHillas.cc
===================================================================
--- trunk/MagicSoft/Mars/mtemp/mifae/programs/makeHillas.cc	(revision 5826)
+++ trunk/MagicSoft/Mars/mtemp/mifae/programs/makeHillas.cc	(revision 5827)
@@ -61,4 +61,6 @@
 #include "MContinue.h"
 #include "MReportDrive.h"
+#include "MTopology.h"
+#include "MTopologyCalc.h"
 
 #include "TApplication.h"
@@ -93,4 +95,5 @@
 Float_t  ltail     = 1.5;
 Int_t    islflag   = 0;
+Int_t    topflag   = 0;
 Float_t  lnew      = 40;
 Int_t    kmethod   = 1;
@@ -207,5 +210,4 @@
           pedloop2.SetNoStorage();
           pedloop2.SetExtractor(extractor);
-          pedloop2.SetExtractorResolution();
           pedloop2.SetPedestals(pedloop1.GetPedestalCam());  
           pedloop2.SetInput(&pedcaliter);
@@ -374,4 +376,5 @@
   MIslands      isl2;
   MIslands      isl3;
+  MTopology     topology;
   
   isl.SetName("MIslands");  
@@ -401,4 +404,5 @@
   plist5.AddToList(&runhead);
   plist5.AddToList(&reportdrive);
+  plist5.AddToList(&topology);
   
   // cuts
@@ -435,4 +439,6 @@
   MHillasCalc       hcalc;
   MHillasSrcCalc    csrc1;
+
+  MTopologyCalc     topcalc;
   
   MContinue applycut(&cut);
@@ -453,4 +459,5 @@
   write.AddContainer("MIslands"       , "Parameters");
   write.AddContainer("MReportDrive"   , "Parameters");
+  write.AddContainer("MTopology",       "Parameters");
   
   if (islflag == 2) 
@@ -494,4 +501,6 @@
   if(filter.Length())
     tlist5.AddToList(&applycut);
+  if(topflag>0)
+    tlist5.AddToList(&topcalc);
   tlist5.AddToList(&write);
   if(display)
@@ -503,4 +512,5 @@
       tlist5.AddToList(disphillas);
     }
+
   
   // Create and setup the eventloop
@@ -635,4 +645,7 @@
 	ifun >> sext >> hifirst >> hilast >> lofirst >> lolast >> wsize;
       
+      if(strcmp(word.Data(),"TOPFLAG")==0)
+	ifun >> topflag;
+
       if(strcmp(word.Data(),"ISLFLAG")==0)
 	{
@@ -674,5 +687,5 @@
   cout << "Maximum number of events: " << nmaxevents << endl;
   if(filter.Length())
-    cout << "Applying rejection cut: " << filter << endl;
+    cout << "Applying selection cut: " << filter << endl;
   cout << "Output file name: " << outname << endl;
   if(display)
@@ -692,4 +705,6 @@
   if (islflag == 1 || islflag == 2)
     cout << "Island calcultation..." << "using algorithm #" << kalgorithm <<endl;
+  if (topflag > 0)
+    cout << "Topology parameters will be computed" << endl;
   if (islflag == 2)
     {
Index: trunk/MagicSoft/Mars/mtemp/mifae/programs/makehillas.datacard
===================================================================
--- trunk/MagicSoft/Mars/mtemp/mifae/programs/makehillas.datacard	(revision 5826)
+++ trunk/MagicSoft/Mars/mtemp/mifae/programs/makehillas.datacard	(revision 5827)
@@ -11,5 +11,5 @@
 
 // Maximun number of (data) events to be processed)
-NEVENTS 5000
+NEVENTS 999999
 
 // data file directory
@@ -30,5 +30,5 @@
 // Enclose all conditions between brakets, like: "(x<y) && (z<5)"
 // (see MF description class for more details)
-// FILTER (MHillas.fLength<100) && (MHillas.fLength>50)
+FILTER (MNewImagePar.fNumUsedPixels<400)
 
 // Display flag 
@@ -61,5 +61,5 @@
 
 // Cleaning level (tail cut, boundary cut, number of rings, cleaning method - 1=standard, 2=democratic)
-CLEANLEVEL 2.5 2.0 1 1
+CLEANLEVEL 4.0 3.5 1 1
 
 //Island calculations
@@ -74,2 +74,7 @@
 ISLANDCLEAN 1 40
 
+// topology flag
+// 0: do not calculate topology parameters
+// 1: calculate topology parameters
+TOPFLAG 1
+
