Index: trunk/MagicSoft/Mars/macros/starmc.C
===================================================================
--- trunk/MagicSoft/Mars/macros/starmc.C	(revision 6333)
+++ trunk/MagicSoft/Mars/macros/starmc.C	(revision 6342)
@@ -53,9 +53,9 @@
   //
   CalibrationFilename = new TString("/users/emc/moralejo/mcdata/Period021_0.73_mirror/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_*1000to1009*w0.root";  // File to be analyzed
+
 
 
@@ -74,30 +74,33 @@
   Float_t accepted_fraction = 1.;
 
-  Float_t CleanLev[2] = {5.75, 3.84}; // Tail cuts for image analysis
+  Float_t CleanLev[2] = {5.75, 3.84}; 
+  // User change: tail cuts for image analysis
+
   MImgCleanStd  clean(CleanLev[0], CleanLev[1]); // Applies tail cuts to image.
-  //  clean.SetMethod(MImgCleanStd::kScaled);
-
-  //  Int_t BinsHigh[2] = {5, 10}; // First and last FADC bin of the range to be integrated,
-  //  Int_t BinsLow[2]  = {5, 10}; // for high and low gain respectively.
-  //  MExtractSignal    sigextract;
-  //  sigextract.SetSaturationLimit(240);
-  // Define ADC slices to be integrated in high and low gain:
-  //  sigextract.SetRange(BinsHigh[0], BinsHigh[1], BinsLow[0], BinsLow[1]);
-
-//     MExtractFixedWindowPeakSearch sigextract;
-//     sigextract.SetWindows(6, 6, 4);
-
-   MExtractTimeAndChargeDigitalFilter sigextract;
-   sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat");
-   sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/cosmics_weights.dat");
-   sigextract.SetRange(1, 14, 3, 14);
+
+
+  //  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);
+
+  ////////// Calibration //////////
+
+  MMcCalibrationUpdate  mccalibupdate;
+  ///// User change: calibrate in photons or phe- :
+  mccalibupdate.SetSignalType(MCalibrateData::kPhe);
+  //  mccalibupdate.SetSignalType(MCalibrateData::kPhot);
+
 
   MSrcPosCam src;
   //
-  // WOBBLE MODE!!
+  // ONLY FOR WOBBLE MODE!!
   //   src.SetX(120.);  // units: mm
 
   src.SetReadyToSave();
-
 
   // -------------------------------------------
@@ -141,9 +144,8 @@
   // information taken from MMcEvt.
 
-  MMcCalibrationUpdate  mccalibupdate;
-
-  MCalibrateData calib; // Transforms signals from ADC counts into photons.
+  MCalibrateData calib; // Applies calibration to the data
   calib.SetCalibrationMode(MCalibrateData::kFfactor);
-  calib.SetSignalType(MCalibrateData::kPhe);
+  // Do not change the CalibrationMode above for MC...!
+  calib.SetSignalType(mccalibupdate.GetSignalType());
 
   //    MBlindPixelCalc   blind;
