Index: trunk/MagicSoft/Mars/macros/mccalibrate.C
===================================================================
--- trunk/MagicSoft/Mars/macros/mccalibrate.C	(revision 6669)
+++ trunk/MagicSoft/Mars/macros/mccalibrate.C	(revision 7005)
@@ -63,15 +63,25 @@
 
   //
-  //  Set signal extractor
+  //  USER CHANGE: Set signal extractor
   //
   //    MExtractFixedWindowPeakSearch sigextract;
   //    sigextract.SetWindows(6, 6, 4);
   //
-  MExtractTimeAndChargeDigitalFilter sigextract;
-  sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat");
-  sigextract.SetRange(1, 14, 3, 14);
-
+
+  //    MExtractTimeAndChargeDigitalFilter sigextract;
+  //    sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat");
+  //    sigextract.SetRange(1, 14, 3, 14);
+
+  MExtractTimeAndChargeSpline sigextract;
+  sigextract.SetRiseTimeHiGain(0.5);
+  sigextract.SetFallTimeHiGain(0.5);
+
+
+  // USER CHANGE: high to low gain ratio. DEPENDS on EXTRACTOR!!
+  // One should calculate somewhere else what this factor is for each extractor!
+  Float_t hi2low = 12.; // tentative value for spline with risetime 0.5, fall time 0.5
 
   MMcCalibrationUpdate  mccalibupdate;
+  mccalibupdate.SetUserLow2HiGainFactor(hi2low);
   ///// User change: calibrate in photons or phe- :
   mccalibupdate.SetSignalType(MCalibrateData::kPhe);
Index: trunk/MagicSoft/Mars/macros/starmc.C
===================================================================
--- trunk/MagicSoft/Mars/macros/starmc.C	(revision 6669)
+++ trunk/MagicSoft/Mars/macros/starmc.C	(revision 7005)
@@ -52,9 +52,9 @@
   // differences in gain of outer pixels)
   //
-  CalibrationFilename = new TString("/users/emc/moralejo/mcdata/Period021_0.73_mirror/gammas_nonoise/Gamma_zbin0_*.root");
+  CalibrationFilename = new TString("/data1/magic/mc_data/root/Period025/gammas_nonoise/Gamma_zbin0_*.root");
   // File to be used in the calibration (must be a camera file without added noise)
 
 
-  Char_t* AnalysisFilename = "Gamma_*w0.root";  // File to be analyzed
+  Char_t* AnalysisFilename = "Gamma_zbin1_0_*.root";  // File to be analyzed
 
 
@@ -74,23 +74,34 @@
   Float_t accepted_fraction = 1.;
 
-  Float_t CleanLev[2] = {5., 4.}; 
-  // User change: tail cuts for image analysis
-
+  // USER CHANGE: tail cuts for image analysis
+
+  Float_t CleanLev[2] = {7., 5.}; 
   MImgCleanStd  clean(CleanLev[0], CleanLev[1]); // Applies tail cuts to image.
-
-
-  //  User change: signal extraction
+  clean.SetMethod(MImgCleanStd::kAbsolute);      // In absolute units (phot or phe- as chosen below)
+
+
+  //  USER CHANGE: signal extraction
   //
   //  MExtractFixedWindowPeakSearch sigextract;
   //  sigextract.SetWindows(6, 6, 4);
 
-  MExtractTimeAndChargeDigitalFilter sigextract;
-  sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat");
-  sigextract.SetRange(1, 14, 3, 14);
+  //  MExtractTimeAndChargeDigitalFilter sigextract;
+  //  sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat");
+  //  sigextract.SetRange(1, 14, 3, 14);
+
+  MExtractTimeAndChargeSpline sigextract;
+  sigextract.SetRiseTimeHiGain(0.5);
+  sigextract.SetFallTimeHiGain(0.5);
+
+  // USER CHANGE: high to low gain ratio. DEPENDS on EXTRACTOR!!
+  // One should calculate somewhere else what this factor is for each extractor!
+  Float_t hi2low = 12.; // tentative value for spline with risetime 0.5, fall time 0.5
+
 
   ////////// Calibration //////////
-
   MMcCalibrationUpdate  mccalibupdate;
-  ///// User change: calibrate in photons or phe- :
+  mccalibupdate.SetUserLow2HiGainFactor(hi2low);
+
+  ///// USER CHANGE: calibrate in photons or phe- :
   mccalibupdate.SetSignalType(MCalibrateData::kPhe);
   //  mccalibupdate.SetSignalType(MCalibrateData::kPhot);
@@ -233,9 +244,9 @@
   //
 
-  //  MProgressBar bar;
-  //  bar.SetWindowName("Calibrating...");
+  MProgressBar bar;
+  bar.SetWindowName("Calibrating...");
 
   MEvtLoop evtloop;
-  //  evtloop.SetProgressBar(&bar);
+  evtloop.SetProgressBar(&bar);
   evtloop.SetParList(&plist);
 
@@ -271,5 +282,5 @@
   tlist.AddToListBefore(&skip, &sigextract);
 
-  //  bar.SetWindowName("Analyzing...");
+  bar.SetWindowName("Analyzing...");
 
   tlist.RemoveFromList(&mccalibcalc); // Removes calibration task from list.
