Index: /trunk/MagicSoft/Mars/macros/CT1Analysis.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/CT1Analysis.C	(revision 2316)
+++ /trunk/MagicSoft/Mars/macros/CT1Analysis.C	(revision 2317)
@@ -235,7 +235,7 @@
     //  - update the input files with the hadroness (ON1.root or MC1.root)
 
-    Bool_t JobB_SC_UP  = kFALSE;
+    Bool_t JobB_SC_UP  = kTRUE;
     Bool_t RMatrix     = kFALSE;  // read matrices from file  
-    Bool_t WParSC      = kFALSE;  // do optimization and write supercuts 
+    Bool_t WParSC      = kTRUE;  // do optimization and write supercuts 
                                   // parameter values onto a file
     Bool_t WSC         = kFALSE;  // update input root file ?
@@ -299,6 +299,6 @@
     //  - write root file for ON data after final cuts 
 
-    Bool_t JobF_XX  = kTRUE;  
-    Bool_t WFX      = kTRUE;  // write out root file  ?
+    Bool_t JobF_XX  = kFALSE;  
+    Bool_t WFX      = kFALSE;  // write out root file  ?
 
 
@@ -1413,7 +1413,6 @@
 
     gLog << "" << endl;
-    gLog << "Macro CT1Analysis : JobB_SC_UP, WParSC, WSC = " 
-         << JobB_SC_UP  << ",  " << WParSC << ",  " << WSC << endl;
-
+    //gLog << "Macro CT1Analysis : JobB_SC_UP, WParSC, WSC = "
+    //     << JobB_SC_UP  << ",  " << WParSC << ",  " << WSC << endl;
 
 
@@ -1509,12 +1508,26 @@
       if (filenameTrain == filenameTest)
       {
-        findsuper.DefineTrainTestMatrix(filenameTrain, 
-                                        howManyTrain, mh3,
-                                        howManyTest,  mh3);
+        if ( !findsuper.DefineTrainTestMatrix(filenameTrain, 
+                                              howManyTrain, mh3,
+                                              howManyTest,  mh3) )
+        {
+          *fLog << "CT1Analysis.C : DefineTrainTestMatrix failed" << endl;
+          return;
+        }
+
       }
       else
       {
-        findsuper.DefineTrainMatrix(filenameTrain, howManyTrain, mh3);
-        findsuper.DefineTestMatrix( filenameTest,  howManyTest,  mh3);
+        if ( !findsuper.DefineTrainMatrix(filenameTrain, howManyTrain, mh3) )
+        {
+          *fLog << "CT1Analysis.C : DefineTrainMatrix failed" << endl;
+          return;
+        }
+
+	if ( !findsuper.DefineTestMatrix( filenameTest,  howManyTest,  mh3) )
+        {
+          *fLog << "CT1Analysis.C : DefineTestMatrix failed" << endl;
+          return;
+        }
       }
  
@@ -1570,6 +1583,6 @@
          << parSCfile << "'" << endl;
 
-    TArrayD supercutsPar(72);
-    scin.GetParams(72, supercutsPar);
+    TArrayD supercutsPar;
+    supercutsPar =  scin.GetParameters();
 
     gLog << "Optimum parameter values for supercuts : " << endl;
@@ -1587,8 +1600,8 @@
     // set the parameters of the supercuts
     MCT1Supercuts supercuts;
-    supercuts.SetParams(72, supercutsPar);
+    supercuts.SetParameters(supercutsPar);
     gLog << "parameter values for the supercuts used for updating the input file ' " 
          << filenameData << "'" << endl;
-    supercuts.GetParams(72, supercutsPar);
+    supercutsPar = supercuts.GetParameters();
     for (Int_t i=0; i<72; i++)
     {
@@ -1767,5 +1780,5 @@
     Double_t alphamin = 30.0;
     Double_t alphamax = 90.0;
-    Int_t    degree   =    2;
+    Int_t    degree   =    4;
     Double_t significance = -99.0;
     Bool_t   drawpoly  = kTRUE;
@@ -1775,5 +1788,5 @@
     MHFindSignificance findsig;
     findsig.SetRebin(kTRUE);
-    findsig.SetReduceDegree(kFALSE);
+    findsig.SetReduceDegree(kTRUE);
 
     findsig.FindSigma(&alphaHist, alphamin, alphamax, degree, 
