Index: trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc	(revision 4589)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc	(revision 4590)
@@ -27,19 +27,39 @@
 \* ======================================================================== */
 
-//////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////
 //
 //   MCalibrateData
 //
-//   This task takes the integrated charge from MExtractedSignal and apply
-//   the calibration constants from MCalibraitionCam to the charge. Then
-//   stores number of photons obtained in MCerPhotEvt. Selection of different
-//   calibration methods is allowed through SetCalibrationMode member function
-//
-//   in ReInit the MPedPhotCam container is filled using the information from
-//   MPedestalCam, MExtractedSignalCam and MCalibrationCam
+//   This task takes the integrated charge from MExtractedSignal and applies
+//   the calibration constants from MCalibrationCam to convert the summed FADC 
+//   slices into photons. The number of photons obtained is stored in MCerPhotEvt. 
+//   Optionally, the calibration of pedestals from an MPedestalCam container into 
+//   an MPedPhotCam container can be chosen with the member functions 
+//   SetPedestalType(). Default is 'kRun', i.e. calibration of pedestals from a 
+//   dedicated pedestal run.
+//   In case, the chosen pedestal type is kRun or kEvt, in ReInit() the MPedPhotCam 
+//   container is filled using the information from MPedestalCam, MExtractedSignalCam, 
+//   MCalibrationChargeCam and MCalibrationQECam
+//
+//   Selection of different calibration methods is allowed through the 
+//   SetCalibrationMode() member function (default: kFfactor)
+//
+//   The calibration modes which exclude non-valid pixels are the following: 
+//
+//   kFfactor:    calibrates using the F-Factor method
+//   kBlindpixel: calibrates using the BlindPixel method 
+//   kBlindpixel: calibrates using the BlindPixel method 
+//   kFlatCharge: perform a charge flat-flatfielding. Outer pixels are area-corrected.
+//   kDummy:      calibrates with fixed conversion factors of 1 and errors of 0.
+//
+//   The calibration modes which include all pixels regardless of their validity is:
+//
+//   kNone:       calibrates with fixed conversion factors of 1 and errors of 0.
+//
+//   Use the kDummy and kNone methods ONLY FOR DEBUGGING!   
 //
 //   Input Containers:
 //    MPedestalCam
-//    MExtractedSingalCam
+//    MExtractedSignalCam
 //    MCalibrationChargeCam
 //    MCalibrationQECam
@@ -49,4 +69,6 @@
 //    MCerPhotEvt
 //
+// See also: MJCalibration, MJPedestal, MJExtractSignal, MJExtractCalibTest
+// 
 //////////////////////////////////////////////////////////////////////////////
 #include "MCalibrateData.h"
@@ -88,5 +110,5 @@
 //
 MCalibrateData::MCalibrateData(CalibrationMode_t calmode,const char *name, const char *title) 
-    : fCam(NULL), fPedestal(NULL), fBadPixels(NULL), fCalibrations(NULL), fSignals(NULL), 
+    : fGeomCam(NULL), fPedestal(NULL), fBadPixels(NULL), fCalibrations(NULL), fSignals(NULL), 
       fPedPhot(NULL), fCerPhotEvt(NULL), fCalibrationMode(calmode), fFlags(kRun), fNamePedADCRunContainer("MPedestalCam"), fNamePedADCEventContainer("MPedestalCamFromData"), fNamePedPhotRunContainer("MPedPhotCam"), fNamePedPhotEventContainer("MPedPhotCamFromData")
 {
@@ -364,5 +386,5 @@
     {
     case kFlatCharge:
-      calibConv        = avMean / pix.GetMean() / fCam->GetPixRatio(pixidx) ;
+      calibConv        = avMean / pix.GetMean() / fGeomCam->GetPixRatio(pixidx) ;
       calibConvVar     = (avMeanRelVar + pix.GetMeanRelVar()) * calibConv * calibConv;
       if (pix.IsFFactorMethodValid())
@@ -424,5 +446,5 @@
     hiloconv       = 1.;
     hiloconverr    = 0.;
-    calibConv      = 1./fCam->GetPixRatio(pixidx);
+    calibConv      = 1./fGeomCam->GetPixRatio(pixidx);
     calibConvVar   = 0.;
     calibFFactor   = 0.;
