Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3248)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3249)
@@ -25,5 +25,11 @@
      with the results and told to calculate the fluxes in the 
      Finalize function
+
+   * mcalib/MCalibrate.[h,cc]
+   * mcalib/MCalibrateData.[h,cc]
+   * mcalib/MMcCalibrationCalc.[h,cc]
  
+  - replace MCalibrationCam by MCalibrationChargeCam
+
 
  2004/02/19: Markus Gaug
Index: trunk/MagicSoft/Mars/mcalib/MCalibrate.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrate.cc	(revision 3248)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrate.cc	(revision 3249)
@@ -35,5 +35,5 @@
 //   Input Containers:
 //    MExtractedSingal
-//    MCalibrationCam
+//    MCalibrationChargeCam
 //
 //   Output Containers:
@@ -51,5 +51,5 @@
 #include "MGeomCam.h"
 
-#include "MCalibrationCam.h"
+#include "MCalibrationChargeCam.h"
 #include "MCalibrationPix.h"
 
@@ -76,5 +76,5 @@
 // The PreProcess searches for the following input containers:
 //  - MGeomCam
-//  - MCalibrationCam
+//  - MCalibrationChargeCam
 //  - MExtractedSignalCam
 //
@@ -98,8 +98,8 @@
       {
 
-	fCalibrations = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationCam"));
+	fCalibrations = (MCalibrationChargeCam*)pList->FindObject(AddSerialNumber("MCalibrationChargeCam"));
 	if (!fCalibrations)
 	  {
-	    *fLog << err << AddSerialNumber("MCalibrationCam") << " not found ... aborting." << endl;
+	    *fLog << err << AddSerialNumber("MCalibrationChargeCam") << " not found ... aborting." << endl;
 	    return kFALSE;
 	  }
Index: trunk/MagicSoft/Mars/mcalib/MCalibrate.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrate.h	(revision 3248)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrate.h	(revision 3249)
@@ -15,5 +15,5 @@
 
 class MGeomCam;
-class MCalibrationCam;
+class MCalibrationChargeCam;
 class MExtractedSignalCam;
 class MCerPhotEvt;
@@ -22,8 +22,8 @@
 {
 private:
-    MGeomCam            *fGeomCam;      // Camera geometry container
-    MCalibrationCam     *fCalibrations; // Calibration constants 
-    MExtractedSignalCam *fSignals;      // Integrated charge in FADCs counts
-    MCerPhotEvt         *fCerPhotEvt;   // Cerenkov Photon Event used for calculation
+    MGeomCam              *fGeomCam;      // Camera geometry container
+    MCalibrationChargeCam *fCalibrations; // Calibration constants 
+    MExtractedSignalCam   *fSignals;      // Integrated charge in FADCs counts
+    MCerPhotEvt           *fCerPhotEvt;   // Cerenkov Photon Event used for calculation
 
     Float_t fConversionHiLo;
Index: trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc	(revision 3248)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc	(revision 3249)
@@ -60,5 +60,5 @@
 #include "MPedestalPix.h"
 
-#include "MCalibrationCam.h"
+#include "MCalibrationChargeCam.h"
 #include "MCalibrationPix.h"
 
@@ -89,5 +89,5 @@
 //  - MGeomCam
 //  - MPedestalCam
-//  - MCalibrationCam
+//  - MCalibrationChargeCam
 //  - MExtractedSignalCam
 //
@@ -116,8 +116,8 @@
    if(fCalibrationMode>kNone)
       {
-	fCalibrations = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationCam"));
+	fCalibrations = (MCalibrationChargeCam*)pList->FindObject(AddSerialNumber("MCalibrationChargeCam"));
 	if (!fCalibrations)
 	  {
-	    *fLog << err << AddSerialNumber("MCalibrationCam") << " not found ... aborting." << endl;
+	    *fLog << err << AddSerialNumber("MCalibrationChargeCam") << " not found ... aborting." << endl;
 	    return kFALSE;
 	  }
Index: trunk/MagicSoft/Mars/mcalib/MCalibrateData.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrateData.h	(revision 3248)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrateData.h	(revision 3249)
@@ -24,5 +24,5 @@
 class MGeomCam;
 class MPedestalCam;
-class MCalibrationCam;
+class MCalibrationChargeCam;
 class MExtractedSignalCam;
 
@@ -33,7 +33,7 @@
 {
 private:
-    MPedestalCam        *fPedestal;     // Pedestals/slice [ADC counts]
-    MCalibrationCam     *fCalibrations; // Calibration constants 
-    MExtractedSignalCam *fSignals;      // Integrated charge in FADCs counts
+    MPedestalCam          *fPedestal;     // Pedestals/slice [ADC counts]
+    MCalibrationChargeCam *fCalibrations; // Calibration constants 
+    MExtractedSignalCam   *fSignals;      // Integrated charge in FADCs counts
 
     MPedPhotCam         *fPedPhot;      // Pedestals/(used slices) [photons]
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h	(revision 3248)
+++ 	(revision )
@@ -1,158 +1,0 @@
-#ifndef MARS_MCalibrationCam
-#define MARS_MCalibrationCam
-
-#ifndef MARS_MParContainer
-#include "MParContainer.h"
-#endif
-#ifndef MARS_MCamEvent
-#include "MCamEvent.h"
-#endif
-
-class TH1D;
-class TH2D;
-class TClonesArray;
-
-class MCalibrationPix;
-class MCalibrationBlindPix;
-class MCalibrationPINDiode;
-
-class MCalibrationCam : public MParContainer, public MCamEvent
-{
-private:
-  
-  static const Int_t   gkBlindPixelId;
-  static const Int_t   gkPINDiodeId;
-  static const Float_t gkBlindPixelArea;       // The Blind Pixel area in mm^2
-  static const Float_t gkPINDiodeArea;         // The Blind Pixel area in mm^2  
-
-  static const Float_t gkCalibrationBlindPixelQEGreen;
-  static const Float_t gkCalibrationBlindPixelQEBlue ;
-  static const Float_t gkCalibrationBlindPixelQEUV   ;
-  static const Float_t gkCalibrationBlindPixelQECT1  ;
-
-  static const Float_t gkCalibrationBlindPixelQEGreenErr;
-  static const Float_t gkCalibrationBlindPixelQEBlueErr ;
-  static const Float_t gkCalibrationBlindPixelQEUVErr   ;
-  static const Float_t gkCalibrationBlindPixelQECT1Err  ;
- 
-  static const Float_t gkCalibrationBlindPixelAttGreen;
-  static const Float_t gkCalibrationBlindPixelAttBlue ;
-  static const Float_t gkCalibrationBlindPixelAttUV   ;
-  static const Float_t gkCalibrationBlindPixelAttCT1  ;
-
-  static const Float_t gkCalibrationFluxCameravsPINDiode     ;
-  static const Float_t gkCalibrationFluxCameravsPINDiodeErr  ;
-  
-  static const Float_t gkCalibrationPINDiodeQEGreen;
-  static const Float_t gkCalibrationPINDiodeQEBlue ;
-  static const Float_t gkCalibrationPINDiodeQEUV   ;
-  static const Float_t gkCalibrationPINDiodeQECT1  ;
-  
-  static const Float_t gkCalibrationPINDiodeQEGreenErr;
-  static const Float_t gkCalibrationPINDiodeQEBlueErr ;
-  static const Float_t gkCalibrationPINDiodeQEUVErr   ;
-  static const Float_t gkCalibrationPINDiodeQECT1Err  ;
- 
-  Int_t fNumPixels;
-  TClonesArray *fPixels;                      //-> Array of MCalibrationPix with fit results
-  
-  MCalibrationBlindPix *fBlindPixel;          //-> Pointer to the Blind Pixel with fit results
-  MCalibrationPINDiode *fPINDiode;            //-> Pointer to the PIN Diode with fit results
-
-  MGeomCam             *fGeomCam;             //! Need geom cam to know which pixel in inner or outer
-
-  TH1D* fOffsets;                             //! 
-  TH1D* fSlopes;                              //! 
-  
-  TH2D* fOffvsSlope;                          //! 
-
-  Float_t fMeanFluxInsidePlexiglass;     //  The mean number of photons in an INNER PIXEL inside the plexiglass
-  Float_t fMeanFluxErrInsidePlexiglass;  //  The uncertainty about the number of photons in an INNER PIXEL  
-  Float_t fMeanFluxOutsidePlexiglass;    //  The mean number of photons in an INNER PIXEL outside the plexiglass
-  Float_t fMeanFluxErrOutsidePlexiglass; //  The uncertainty about the number of photons in an INNER PIXEL  
-
-  UInt_t fNumExcludedPixels;
-
-  Byte_t fFlags;
-
-  enum  { kBlindPixelMethodValid, kPINDiodeMethodValid,
-          kFluxInsidePlexiglassAvailable, kFluxOutsidePlexiglassAvailable  };
-  
-public:
-  
-  enum CalibrationColor_t { kECGreen, kECBlue, kECUV, kECCT1 };
-
-private:
-
-  CalibrationColor_t fColor;  
-  
-public:
-
-  MCalibrationCam(const char *name=NULL, const char *title=NULL);
-  ~MCalibrationCam();
-  
-  void Clear(Option_t *o="");
-  void InitSize(const UInt_t i);
-
-  // Setters
-  void SetColor(const CalibrationColor_t color)       {  fColor = color; }
-  void SetNumPixelsExcluded(const UInt_t n)               {  fNumExcludedPixels = n;    }
-
-  void SetBlindPixelMethodValid(const Bool_t b = kTRUE);
-  void SetPINDiodeMethodValid(const Bool_t b = kTRUE);  
-
-  void SetGeomCam(MGeomCam *geom)               {  fGeomCam = geom;     }
-  
-  // Getters
-  Int_t GetSize()                        const;
-  UInt_t GetNumPixels()                  const { return fNumPixels; }
-
-  MCalibrationBlindPix *GetBlindPixel()  const { return fBlindPixel;  }
-  MCalibrationPINDiode *GetPINDiode()    const { return fPINDiode;    }
-  MCalibrationBlindPix *GetBlindPixel()       { return fBlindPixel;  }
-  MCalibrationPINDiode *GetPINDiode()         { return fPINDiode;    }
-
-  Float_t GetMeanFluxInsidePlexiglass()     const { return fMeanFluxInsidePlexiglass;     }
-  Float_t GetMeanFluxErrInsidePlexiglass()  const { return fMeanFluxErrInsidePlexiglass;  }
-  Float_t GetMeanFluxOutsidePlexiglass()    const { return fMeanFluxOutsidePlexiglass;    }
-  Float_t GetMeanFluxErrOutsidePlexiglass() const { return fMeanFluxErrOutsidePlexiglass; }
-
-  Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
-  Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
-  Bool_t GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
-  Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
-
-  Bool_t IsPixelUsed(Int_t idx)      const;
-  Bool_t IsPixelFitted(Int_t idx)    const;
-
-  Bool_t IsBlindPixelMethodValid()   const;
-  Bool_t IsPINDiodeMethodValid()     const;  
-
-  Bool_t IsFluxInsidePlexiglassAvailable() const;
-  Bool_t IsFluxOutsidePlexiglassAvailable() const;
-
-  // Others
-  MCalibrationPix &operator[](Int_t i);
-  MCalibrationPix &operator[](Int_t i) const;
-  
-  void CutEdges();
-  Bool_t CheckBounds(Int_t i) const;
-
-  // Prints
-  void Print(Option_t *o="") const;
-  
-  // Draws
-  void DrawPixelContent(Int_t num) const;    
-  void DrawHiLoFits();
-  
-  // Others
-  Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
-
-  Bool_t CalcFluxInsidePlexiglass();
-  Bool_t CalcFluxOutsidePlexiglass();
-
-  ClassDef(MCalibrationCam, 1)	// Container for calibration information of the camera
-};
-
-#endif
-
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationPINDiode.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationPINDiode.cc	(revision 3248)
+++ 	(revision )
@@ -1,282 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Markus Gaug   11/2003 <mailto:markus@ifae.es>
-!
-!   Copyright: MAGIC Software Development, 2000-2001
-!
-!
-\* ======================================================================== */
-
-/////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-// MCalibrationPINDiode                                                            //
-//                                                                         //
-// This is the storage container to hold informations about the pedestal   //
-// (offset) value of one Pixel (PMT).                                      //
-//                                                                         //
-/////////////////////////////////////////////////////////////////////////////
-#include "MCalibrationPINDiode.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MCalibrationPINDiode);
-
-using namespace std;
-// --------------------------------------------------------------------------
-//
-// Default Constructor. 
-//
-MCalibrationPINDiode::MCalibrationPINDiode(const char *name, const char *title)
-    : fChargeLimit(3.),
-      fChargeErrLimit(0.),
-      fChargeRelErrLimit(1.),
-      fFlags(0)
-{
-
-  fName  = name  ? name  : "MCalibrationPINDiode";
-  fTitle = title ? title : "Container of the MHCalibrationPINDiode and the fit results";
-
-  fHist = new MHCalibrationPINDiode();
-
-  if (!fHist)
-    *fLog << warn << dbginf << " Could not create MHCalibrationPINDiode " << endl;
- 
-  Clear();
-
-}
-
-MCalibrationPINDiode::~MCalibrationPINDiode() 
-{
-  delete fHist;
-}
-
-// ------------------------------------------------------------------------
-//
-// Invalidate values
-//
-void MCalibrationPINDiode::Clear(Option_t *o)
-{
-  fHist->Reset();
-
-  CLRBIT(fFlags, kExcluded);
-  CLRBIT(fFlags, kChargeFitValid);
-  CLRBIT(fFlags, kChargeFitValid);
-  CLRBIT(fFlags, kFitted);
-
-  fCharge                           =  -1.;
-  fErrCharge                        =  -1.;
-  fSigmaCharge                      =  -1.;
-  fErrSigmaCharge                   =  -1.;
-  fRSigmaSquare                     =  -1.;
-  fChargeProb                       =  -1.;
-  fPed                              =  -1.;
-  fPedRms                           =  -1.;
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Set the pedestals from outside
-//
-void MCalibrationPINDiode::SetPedestal(Float_t ped, Float_t pedrms)
-{
-
-  fPed    = ped;    
-  fPedRms = pedrms;
-  
-}
-
-// --------------------------------------------------------------------------
-//
-// Set the Excluded Bit from outside 
-//
-void MCalibrationPINDiode::SetExcluded(Bool_t b )
-{ 
-  b ?  SETBIT(fFlags, kExcluded) : CLRBIT(fFlags, kExcluded); 
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Set the Excluded Bit from outside 
-//
-void MCalibrationPINDiode::SetExcludeQualityCheck(Bool_t b )
-{ 
-  b ?  SETBIT(fFlags, kExcludeQualityCheck) : CLRBIT(fFlags, kExcludeQualityCheck); 
-}
-
-// --------------------------------------------------------------------------
-//
-// Set the Excluded Bit from outside 
-//
-void MCalibrationPINDiode::SetChargeFitValid(Bool_t b )    
-{ 
-  b ?  SETBIT(fFlags, kChargeFitValid) : CLRBIT(fFlags, kChargeFitValid); 
-}
-
-// --------------------------------------------------------------------------
-//
-// Set the Excluded Bit from outside 
-//
-void MCalibrationPINDiode::SetTimeFitValid(Bool_t b )    
-{ 
-  b ?  SETBIT(fFlags, kTimeFitValid) : CLRBIT(fFlags, kTimeFitValid); 
-}
-
-// --------------------------------------------------------------------------
-//
-// Set the Excluded Bit from outside 
-//
-void MCalibrationPINDiode::SetFitted(Bool_t b )
-{ 
-  b ?  SETBIT(fFlags, kFitted) : CLRBIT(fFlags, kFitted); 
-}
-
-Bool_t MCalibrationPINDiode::IsExcluded() const
- { 
-   return TESTBIT(fFlags,kExcluded);  
- }
-
-Bool_t MCalibrationPINDiode::IsChargeFitValid() const 
-{
-  return TESTBIT(fFlags, kChargeFitValid);  
-}
-
-Bool_t MCalibrationPINDiode::IsTimeFitValid() const 
-{
-  return TESTBIT(fFlags, kTimeFitValid);  
-}
-
-Bool_t MCalibrationPINDiode::IsFitted() const 
-{ 
-  return TESTBIT(fFlags, kFitted);    
-}
-
-Bool_t MCalibrationPINDiode::FitCharge() 
-{
-
-  //
-  // 1) Return if the charge distribution is already succesfully fitted  
-  //    or if the histogram is empty
-  //
-  if (fHist->IsChargeFitOK() || fHist->IsEmpty())
-    return kTRUE;
-
-  //
-  // 4) Fit the Lo Gain histograms with a Gaussian
-  //
-  if(fHist->FitCharge())
-    {
-      SETBIT(fFlags,kFitted);
-    }
-  else
-    {
-      *fLog << warn << "WARNING: Could not fit charges of PINDiode " << endl;
-      //          
-      // 5) In case of failure print out the fit results
-      //
-      //	  fHist->PrintChargeFitResult();
-      CLRBIT(fFlags,kFitted);
-    }
-
-  //
-  // 6) Retrieve the results and store them in this class
-  //
-  fCharge         = fHist->GetChargeMean();
-  fErrCharge      = fHist->GetChargeMeanErr(); 
-  fSigmaCharge    = fHist->GetChargeSigma();
-  fErrSigmaCharge = fHist->GetChargeSigmaErr();
-  fChargeProb     = fHist->GetChargeProb();
-
-  if (CheckChargeFitValidity())
-    SETBIT(fFlags,kChargeFitValid);
-  else
-    {
-      CLRBIT(fFlags,kChargeFitValid);
-      return kFALSE;
-    }
-
-  return kTRUE;
-  
-}
-
-//
-// The check return kTRUE if:
-//
-// 1) PINDiode has a fitted charge greater than 5*PedRMS
-// 2) PINDiode has a fit error greater than 0.
-// 3) PINDiode has a fitted charge greater its charge error
-// 4) PINDiode has a fit Probability greater than 0.0001 
-// 5) PINDiode has a charge sigma bigger than its Pedestal RMS
-// 
-Bool_t MCalibrationPINDiode::CheckChargeFitValidity()
-{
-
-  if (TESTBIT(fFlags,kExcludeQualityCheck))
-    return kTRUE;
-
-  if (fCharge < fChargeLimit*GetPedRms())
-    {
-      *fLog << warn << "WARNING: Fitted Charge is smaller than "
-            << fChargeLimit << " Pedestal RMS in PINDiode " << endl;
-      return kFALSE;
-    }
-  
-  if (fErrCharge < fChargeErrLimit) 
-    {
-      *fLog << warn << "WARNING: Error of Fitted Charge is smaller than "
-            << fChargeErrLimit << " in PINDiode " << endl;
-      return kFALSE;
-    }
-      
-  if (fCharge < fChargeRelErrLimit*fErrCharge) 
-    {
-      *fLog << warn << "WARNING: Fitted Charge is smaller than "
-            << fChargeRelErrLimit << "* its error in PINDiode " << endl;
-      return kFALSE;
-    }
-      
-  if (!fHist->IsChargeFitOK()) 
-    {
-      *fLog << warn << "WARNING: Probability of Fitted Charge too low in PINDiode " << endl;
-      return kFALSE;
-    }
-
-  if (fSigmaCharge < GetPedRms())
-    {
-      *fLog << warn << "WARNING: Sigma of Fitted Charge smaller than Pedestal RMS in PINDiode " << endl;
-      return kFALSE;
-    }
-  return kTRUE;
-}
-
-//
-// The check returns kTRUE if:
-//
-// The mean arrival time is at least 1.0 slices from the used edge slices 
-//
-Bool_t MCalibrationPINDiode::CheckTimeFitValidity()
-{
-
-  if (TESTBIT(fFlags,kExcludeQualityCheck))
-    return kTRUE;
-
-  return kTRUE;
-}
-
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationPINDiode.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationPINDiode.h	(revision 3248)
+++ 	(revision )
@@ -1,90 +1,0 @@
-#ifndef MARS_MCalibrationPINDiode
-#define MARS_MCalibrationPINDiode
-
-#ifndef MARS_MHCalibrationPINDiode
-#include "MHCalibrationPINDiode.h"
-#endif
-
-class MCalibrationPINDiode : public MParContainer
-{
-private:
-
-  MHCalibrationPINDiode *fHist; // Pointer to the histograms performing the fits, etc.  
-
-  const Float_t fChargeLimit;       // The limit (in units of PedRMS) for acceptance of the fitted mean charge
-  const Float_t fChargeErrLimit;    // The limit (in units of PedRMS) for acceptance of the fitted charge sigma
-  const Float_t fChargeRelErrLimit; // The limit (in units of Error of fitted charge) for acceptance of the fitted mean  
-  
-  Float_t fPed;                   // The mean pedestal (from MPedestalPix)
-  Float_t fPedRms;                // The pedestal  RMS (from MPedestalPix)
-
-  Float_t fCharge;                // The mean charge after the fit
-  Float_t fErrCharge;             // The error of mean charge after the fit
-  Float_t fSigmaCharge;           // The sigma of the mean charge after the fit
-  Float_t fErrSigmaCharge;        // The error of the sigma of the mean charge after the fit
-  Float_t fRSigmaSquare;          // The reduced squares of sigmas after the fit
-  Float_t fChargeProb;            // The probability of the fit function 
-
-  Byte_t  fFlags;                 // Flag for the set Bits
-
-  enum  { kExcluded, kExcludeQualityCheck,
-          kChargeFitValid, kTimeFitValid, kFitted  };
-  
-  Bool_t CheckChargeFitValidity();
-  Bool_t CheckTimeFitValidity();
-  Bool_t CheckOscillations();  
-  
-public:
-
-  MCalibrationPINDiode(const char *name=NULL, const char *title=NULL);
-  ~MCalibrationPINDiode();
-  
-  void Clear(Option_t *o="");
-  
-  // Getter
-  MHCalibrationPINDiode *GetHist() const   { return fHist;     }
-
-  // Charges
-  Float_t GetCharge()              const { return fCharge;         }
-  Float_t GetErrCharge()           const { return fErrCharge;      }
-  Float_t GetChargeProb()          const { return fChargeProb;     }    
-  Float_t GetSigmaCharge()         const { return fSigmaCharge;    }
-  Float_t GetErrSigmaCharge()      const { return fErrSigmaCharge; }
-  Float_t GetRSigmaSquare()        const { return fRSigmaSquare;   }
-
-
-  // Pedestals
-  Float_t GetPed()                 const { return fPed;    }
-  Float_t GetPedRms()              const { return fPedRms; }
-
-  Bool_t IsExcluded()              const;
-  Bool_t IsChargeFitValid()        const;
-  Bool_t IsTimeFitValid()          const;
-  Bool_t IsFitted()                const;
-
-  // Setters
-  void SetPedestal(Float_t ped, Float_t pedrms);
-  void SetExcluded(Bool_t b = kTRUE);
-  void SetExcludeQualityCheck(Bool_t b = kTRUE);
-  void SetChargeFitValid(Bool_t b = kTRUE);
-  void SetTimeFitValid(Bool_t b = kTRUE);
-  void SetFitted(Bool_t b = kTRUE);
-
-  // Fill histos
-  Bool_t FillCharge(Float_t q)      { return fHist->FillChargeHiGain(q); }
-  Bool_t FillAbsTime(Float_t t)     { return fHist->FillAbsTimeHiGain(t); }
-
-  Bool_t FillGraphs(Float_t qhi,Float_t qlo) const { return fHist->FillGraphs(qhi,qlo); }  
-  
-  // Fits
-  Bool_t FitCharge();
-
-  // Draws
-  void Draw(Option_t *opt="")                    { fHist->Draw(opt); }
-  TObject *DrawClone(Option_t *opt="") const    { return fHist->DrawClone(opt); }  
-  
-  ClassDef(MCalibrationPINDiode, 1)	// Container for Calibration PIN Diode
-};
-
-#endif   /* MARS_MCalibrationPINDiode */
-
Index: trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc	(revision 3248)
+++ trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc	(revision 3249)
@@ -35,5 +35,5 @@
 //
 //  Output Containers:
-//   MCalibrationCam
+//   MCalibrationChargeCam
 //
 /////////////////////////////////////////////////////////////////////////////
@@ -48,5 +48,5 @@
 
 #include "MCalibrationPix.h"
-#include "MCalibrationCam.h"
+#include "MCalibrationChargeCam.h"
 
 #include "MGeomCam.h"
@@ -99,8 +99,8 @@
     fADC2Phot = 0;
 
-    fCalCam = (MCalibrationCam*) pList->FindObject(AddSerialNumber("MCalibrationCam"));
+    fCalCam = (MCalibrationChargeCam*) pList->FindObject(AddSerialNumber("MCalibrationChargeCam"));
     if (!fCalCam)
     {
-        *fLog << err << AddSerialNumber("MCalibrationCam") << "not found... aborting." << endl;
+        *fLog << err << AddSerialNumber("MCalibrationChargeCam") << "not found... aborting." << endl;
         return kFALSE;
     }
Index: trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.h	(revision 3248)
+++ trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.h	(revision 3249)
@@ -6,5 +6,5 @@
 #endif
 
-class MCalibrationCam;
+class MCalibrationChargeCam;
 class MGeomCam;
 class MHillas;
@@ -18,10 +18,10 @@
 {
 private:
-    MCalibrationCam     *fCalCam;
-    MGeomCam            *fGeom;
-    MHillas             *fHillas;
-    MNewImagePar        *fNew;
-    MMcEvt              *fMcEvt;
-    MMcFadcHeader       *fHeaderFadc;
+    MCalibrationChargeCam     *fCalCam;
+    MGeomCam                  *fGeom;
+    MHillas                   *fHillas;
+    MNewImagePar              *fNew;
+    MMcEvt                    *fMcEvt;
+    MMcFadcHeader             *fHeaderFadc;
 
     Float_t fADC2Phot;
@@ -32,7 +32,7 @@
     Bool_t CheckRunType(MParList *pList) const;
     Int_t  PreProcess(MParList *pList);
+    Bool_t ReInit(MParList *pList);
     Int_t  Process();
     Int_t  PostProcess();
-    Bool_t ReInit(MParList *pList);
 
 public:
