Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3739)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3740)
@@ -43,4 +43,7 @@
  2004/04/14: Markus Gaug
   
+   * mcalib/MCalibrationQEPix.cc
+     - found a bug in the calculation of the error, fixed
+
    * macros/mccalibrate.C, mmain/MEventDisplay.cc:
      - replaced SetCalibrationMethod by SetCalibrationMode
Index: trunk/MagicSoft/Mars/macros/calibration.C
===================================================================
--- trunk/MagicSoft/Mars/macros/calibration.C	(revision 3739)
+++ trunk/MagicSoft/Mars/macros/calibration.C	(revision 3740)
@@ -28,14 +28,11 @@
   const MCalibrationCam::PulserColor_t color = MCalibrationCam::kGREEN;
 
-  //  const TString inpath = "/mnt/Data/rootdata/CrabNebula/2004_01_27/";
-  const TString inpath = "/mnt/Data/rootdata/Miscellaneous/2004_03_03/";
-  //  const TString inpath = "/home/rootdata/BlindPixel/";
+  const TString inpath = "/home/rootdata/Calib/2004_04_08/";
 
   MRunIter pruns;
   MRunIter cruns;
 
-  pruns.AddRun(20132,inpath);
-  cruns.AddRun(20134,inpath);
-  //  cruns.AddRun(16774,inpath);
+  pruns.AddRun(22254,inpath);
+  cruns.AddRun(22253,inpath);
 
   gStyle->SetOptStat(1111);
@@ -82,9 +79,17 @@
   static_cast<MRead&>(read).AddFiles(pruns);
 
-  // 
-  // Now the short version: 
-  //
   MJCalibration calloop;
   calloop.SetColor(color);
+
+  //
+  // If you want only the most necessary plots, choose:
+  // calloop.SetDataCheck();
+  // 
+  // For everything, you ever dreamed of, choose:
+  // calloop.SetFullDisplay();
+
+  //
+  // If you want to calibrate the times as well, choose:
+  //  calloop.SetRelTimeCalibration();
   calloop.SetInput(&cruns);
   calloop.SetDisplay(display);
@@ -93,4 +98,6 @@
   if (!calloop.Process(pedloop.GetPedestalCam()))
     return;
+
+
 
 #if 0
@@ -157,4 +164,5 @@
   MArrivalTimeCalc2      timecalc;
   MCalibrationChargeCalc calcalc;
+  calcalc.SetPulserColor(color);
   MGeomApply             geomapl;
   
@@ -163,10 +171,4 @@
   MFillH fillblind("MHCalibrationChargeBlindPix", "MExtractedSignalBlindPixel");
   MFillH fillcam  ("MHCalibrationChargeCam"     , "MExtractedSignalCam");
-  
-  //
-  // As long, as we don't have digital modules,
-  // we have to set the color of the pulser LED by hand
-  //
-  calcalc.SetPulserColor(MCalibrationCam::kCT1);
   
   //
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.cc	(revision 3739)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.cc	(revision 3740)
@@ -225,4 +225,5 @@
     wav  += newavqe / newavqevar;
     sumw += 1./ newavqevar;
+
   }
 }
@@ -245,5 +246,9 @@
     wav  += newavqe / newavqevar;
     sumw += 1./ newavqevar;
+
+    *fLog << err << GetQEFFactorRelVar(col) << "   " << GetDefaultQERelVar(col) << endl;
   }
+
+
 }
 
@@ -675,5 +680,5 @@
 Float_t MCalibrationQEPix::GetQECascadesBlindPixelErr( const Float_t zenith  )  const
 {
-  const Float_t var = GetQECascadesBlindPixel(zenith);
+  const Float_t var = GetQECascadesBlindPixelVar(zenith);
   
   if (var < 0.)
@@ -702,5 +707,5 @@
 Float_t MCalibrationQEPix::GetQECascadesCombinedErr( const Float_t zenith  )  const
 {
-  const Float_t var = GetQECascadesCombined(zenith);
+  const Float_t var = GetQECascadesCombinedVar(zenith);
   
   if (var < 0.)
@@ -740,5 +745,5 @@
 Float_t MCalibrationQEPix::GetQECascadesFFactorErr( const Float_t zenith  )  const
 {
-  const Float_t var = GetQECascadesFFactor(zenith);
+  const Float_t var = GetQECascadesFFactorVar(zenith);
   
   if (var < 0.)
@@ -778,5 +783,5 @@
 Float_t MCalibrationQEPix::GetQECascadesPINDiodeErr( const Float_t zenith  )  const
 {
-  const Float_t var = GetQECascadesPINDiode(zenith);
+  const Float_t var = GetQECascadesPINDiodeVar(zenith);
   
   if (var < 0.)
Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 3739)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 3740)
@@ -73,4 +73,8 @@
 // i=1: Use MArrivalTimeCalc  (using MCubicSpline, arrival time == position at half maximum)
 // i=2: Use MArrivalTimeCalc2 (mean time of fWindowSize time slices with the highest integral content: default)
+//
+// See also: MHCalibrationRelTimePix, MHCalibrationRelTimeCam, MHGausEvents
+//           MCalibrationRelTimePix, MCalibrationRelTimeCam
+//           MBadPixelsPix, MBadPixelsCam
 //
 /////////////////////////////////////////////////////////////////////////////
