Index: trunk/MagicSoft/Mars/mhist/HistLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/HistLinkDef.h	(revision 2718)
+++ trunk/MagicSoft/Mars/mhist/HistLinkDef.h	(revision 2734)
@@ -52,18 +52,5 @@
 #pragma link C++ class MHPixVsTime+;
 
-#pragma link C++ class MHCalibrationPINDiode+;
-#pragma link C++ class MHCalibrationBlindPixel+;
-#pragma link C++ class MHCalibrationPixel+;
-
 #pragma link C++ class MHSimulatedAnnealing+;
 
 #endif
-
-
-
-
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mhist/MHCalibrationBlindPixel.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCalibrationBlindPixel.cc	(revision 2718)
+++ 	(revision )
@@ -1,484 +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-2002
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHCalibrationBlindPixel                                                 //
-//                                                                          //
-//  Performs all the necessary fits to extract the mean number of photons   //
-//              out of the derived light flux                               //
-//                                                                          //
-//////////////////////////////////////////////////////////////////////////////
-#include "MHCalibrationBlindPixel.h"
-#include "MHCalibrationConfig.h"
-#include "MCalibrationFits.h"
-
-#include <TStyle.h>
-#include <TMath.h>
-#include <TPad.h>
-
-#include <TMinuit.h>
-#include <TFitter.h>
-
-#include <TF1.h>
-#include <TH2.h>
-#include <TCanvas.h>
-#include <TPaveText.h>
-#include <TRandom.h>
-
-#include "MBinning.h"
-#include "MParList.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MHCalibrationBlindPixel);
-
-using namespace std;
-// --------------------------------------------------------------------------
-//
-// Default Constructor. 
-//
-MHCalibrationBlindPixel::MHCalibrationBlindPixel(const char *name, const char *title)
-  : fSinglePheFit(NULL), fTimeGausFit(NULL), fSinglePhePedFit(NULL),
-    fLambda(0.), fMu0(0.), fMu1(0.), fSigma0(0.), fSigma1(0.),
-    fLambdaErr(0.), fMu0Err(0.), fMu1Err(0.), fSigma0Err(0.), fSigma1Err(0.),    
-    fChisquare(0.), fProb(0.),  fNdf(0),
-    fMeanTime(0.),  fMeanTimeErr(0.), fSigmaTime(0.), fSigmaTimeErr(0.),
-    fLambdaCheck(0.), fLambdaCheckErr(0.)
-{
-
-    fName  = name  ? name  : "MHCalibrationBlindPixel";
-    fTitle = title ? title : "Fill the accumulated charges and times all Blind Pixel events and perform fits";
-
-    // Create a large number of bins, later we will rebin
-    fBlindPixelChargefirst = -1000.;
-    fBlindPixelChargelast  = gkStartBlindPixelBinNr;
-    fBlindPixelChargenbins = gkStartBlindPixelBinNr+(int)fBlindPixelChargefirst;
-
-    fHBlindPixelCharge = new TH1F("HBlindPixelCharge","Distribution of Summed FADC Slices",
-				  fBlindPixelChargenbins,fBlindPixelChargefirst,fBlindPixelChargelast);
-    fHBlindPixelCharge->SetXTitle("Sum FADC Slices");
-    fHBlindPixelCharge->SetYTitle("Nr. of events");
-    fHBlindPixelCharge->Sumw2();
-
-    Axis_t tfirst = -0.5;
-    Axis_t tlast  = 15.5;
-    Int_t nbins   = 16;
-
-    fHBlindPixelTime = new TH1I("HBlindPixelTime","Distribution of Mean Arrival Times",nbins,tfirst,tlast);
-    fHBlindPixelTime->SetXTitle("Mean Arrival Times [FADC slice nr]");
-    fHBlindPixelTime->SetYTitle("Nr. of events");
-    fHBlindPixelTime->Sumw2();
-
-    // We define a reasonable number and later enlarge it if necessary
-    nbins = 20000;
-    Axis_t nfirst = -0.5;
-    Axis_t nlast  = (Axis_t)nbins - 0.5;
-
-    fHBlindPixelChargevsN = new TH1I("HBlindPixelChargevsN","Sum of Charges vs. Event Number",nbins,nfirst,nlast);
-    fHBlindPixelChargevsN->SetXTitle("Event Nr.");
-    fHBlindPixelChargevsN->SetYTitle("Sum of FADC slices");
-
-    fgSinglePheFitFunc = &gfKto8;
-    fgSinglePheFitNPar = 5;
-}
-
-MHCalibrationBlindPixel::~MHCalibrationBlindPixel()
-{
-
-  delete fHBlindPixelCharge;
-  delete fHBlindPixelTime;
-
-  if (fSinglePheFit)
-    delete fSinglePheFit;
-  if (fSinglePhePedFit)
-    delete fSinglePhePedFit;
-  if (fTimeGausFit)
-    delete fTimeGausFit;
-}
-
-
-
-void MHCalibrationBlindPixel::ResetBin(Int_t i)
-{
-    fHBlindPixelCharge->SetBinContent (i, 1.e-20);
-    fHBlindPixelTime->SetBinContent(i, 1.e-20);
-}
-
-
-// -------------------------------------------------------------------------
-//
-// Draw a legend with the fit results
-//
-void MHCalibrationBlindPixel::DrawLegend()
-{
-
-  fFitLegend = new TPaveText(0.05,0.05,0.95,0.95);
-
-  if (fFitOK) 
-      fFitLegend->SetFillColor(80);
-  else
-      fFitLegend->SetFillColor(2);    
-  
-  fFitLegend->SetLabel("Results of the single PhE Fit (to k=6):");
-  fFitLegend->SetTextSize(0.05);
-
-  const TString line1 = 
-  Form("Mean: #lambda = %2.2f #pm %2.2f",GetLambda(),GetLambdaErr());
-  fFitLegend->AddText(line1);
-
-  const TString line6 =
-  Form("Mean #lambda (check) = %2.2f #pm %2.2f",GetLambdaCheck(),GetLambdaCheckErr());
-  fFitLegend->AddText(line6);
-
-  const TString line2 = 
-  Form("Pedestal: #mu_{0} = %2.2f #pm %2.2f",GetMu0(),GetMu0Err());
-  fFitLegend->AddText(line2);
-
-  const TString line3 =
-  Form("Width Pedestal: #sigma_{0} = %2.2f #pm %2.2f",GetSigma0(),GetSigma0Err());
-  fFitLegend->AddText(line3);
-
-  const TString line4 =
-  Form("1^{st} Phe-peak: #mu_{1} = %2.2f #pm %2.2f",GetMu1(),GetMu1Err());
-  fFitLegend->AddText(line4);
-
-  const TString line5 =
-  Form("Width 1^{st} Phe-peak: #sigma_{1} = %2.2f #pm %2.2f",GetSigma1(),GetSigma1Err());
-  fFitLegend->AddText(line5);
-
-  const TString line7 =
-  Form("#chi^{2} / N_{dof}: %4.2f / %3i",GetChiSquare(),GetNdf());
-  fFitLegend->AddText(line7);
-
-  const TString line8 =
-  Form("Probability: %4.2f ",GetProb());
-  fFitLegend->AddText(line8);
-
-  if (fFitOK)
-    fFitLegend->AddText("Result of the Fit: OK");
-  else
-    fFitLegend->AddText("Result of the Fit: NOT OK");
-
-  fFitLegend->SetBit(kCanDelete);
-  fFitLegend->Draw();
-
-}
-
-
-// -------------------------------------------------------------------------
-//
-// Draw the histogram
-//
-void MHCalibrationBlindPixel::Draw(Option_t *opt) 
-{
-
-    gStyle->SetOptFit(0);
-    gStyle->SetOptStat(1111111);
-
-    TCanvas *c = MakeDefCanvas(this,550,700);
-
-    c->Divide(2,2);
-
-    gROOT->SetSelectedPad(NULL);
-
-    c->cd(1);
-    gPad->SetLogy(1);
-    gPad->SetTicks();
-
-    fHBlindPixelCharge->DrawCopy(opt);
-    
-    if (fSinglePheFit)
-      {
-        if (fFitOK)
-	  fSinglePheFit->SetLineColor(kGreen);          
-        else
-          fSinglePheFit->SetLineColor(kRed);
-
-        fSinglePheFit->DrawCopy("same");
-        c->Modified();
-        c->Update();
-
-	if (fSinglePhePedFit)
-	  {
-	    fSinglePhePedFit->SetLineColor(kBlue);
-	    fSinglePhePedFit->DrawCopy("same");
-	  }
-      }
-
-
-    c->cd(2);
-    DrawLegend();
-    c->Modified();
-    c->Update();
-
-    c->cd(3);
-    gPad->SetLogy(1);
-    gPad->SetBorderMode(0);
-    fHBlindPixelTime->DrawCopy(opt);
-
-    if (fHBlindPixelTime->GetFunction("GausTime"))
-      {
-        TF1 *tfit = fHBlindPixelTime->GetFunction("GausTime");
-        if (tfit->GetProb() < 0.01)
-          tfit->SetLineColor(kRed);
-        else
-          tfit->SetLineColor(kGreen);
-
-        tfit->DrawCopy("same");
-        c->Modified();
-        c->Update();
-      }
-    
-    c->cd(4);
-
-    fHBlindPixelChargevsN->DrawCopy(opt);
-
-    c->Modified();
-    c->Update();
-}
-
-
-
-Bool_t MHCalibrationBlindPixel::SimulateSinglePhe(Double_t lambda, Double_t mu0, Double_t mu1, Double_t sigma0, Double_t sigma1) 
-{
-  gRandom->SetSeed();
-
-  if (fHBlindPixelCharge->GetIntegral() != 0)
-    {
-      *fLog << err << "Histogram " << fHBlindPixelCharge->GetTitle() << " is already filled. " << endl;
-      *fLog << err << "Create new class MHCalibrationBlindPixel for simulation! " << endl;
-      return kFALSE;
-    }
-  
-  TF1 *simulateSinglePhe = new TF1("simulateSinglePhe",fgSinglePheFitFunc,
-                                   fBlindPixelChargefirst,fBlindPixelChargelast,fgSinglePheFitNPar);
-  
-  simulateSinglePhe->SetParameters(lambda,mu0,mu1,sigma0,sigma1);
-  simulateSinglePhe->SetParNames("#lambda","#mu_0","#mu_1","#sigma_0","#sigma_1");
-  simulateSinglePhe->SetNpx(fBlindPixelChargenbins);  
-
-  for (Int_t i=0;i<10000; i++) 
-    {
-      fHBlindPixelCharge->Fill(simulateSinglePhe->GetRandom());
-    }
-  
-  return kTRUE;
-}
-
-
-void MHCalibrationBlindPixel::ChangeFitFunc(BlindPixelFitFunc fitfunc, Int_t par)
-{
-  
-  fgSinglePheFitFunc = fitfunc;
-  fgSinglePheFitNPar = par;
-
-}
-
-
-
-Bool_t MHCalibrationBlindPixel::FitSinglePhe(Axis_t rmin, Axis_t rmax, Option_t *opt) 
-{
-
-  if (fSinglePheFit)
-    return kFALSE;
-
-
-  //
-  // Get the fitting ranges
-  //
-  rmin = (rmin != 0.) ? rmin : fBlindPixelChargefirst;
-  rmax = (rmax != 0.) ? rmax : fBlindPixelChargelast;
-
-  //
-  // First guesses for the fit (should be as close to reality as possible, 
-  // otherwise the fit goes gaga because of high number of dimensions ...
-  //
-  const Stat_t   entries      = fHBlindPixelCharge->Integral();
-  const Double_t lambda_guess = 0.5;
-  const Double_t mu_0_guess = fHBlindPixelCharge->GetBinCenter(fHBlindPixelCharge->GetMaximumBin());
-  const Double_t si_0_guess = 20.;
-  const Double_t mu_1_guess = mu_0_guess + 100.;
-  const Double_t si_1_guess = si_0_guess + si_0_guess;
-
-  fSinglePheFit = new TF1("SinglePheFit",fgSinglePheFitFunc,rmin,rmax,fgSinglePheFitNPar+1);
-  fSinglePheFit->SetParameters(lambda_guess,mu_0_guess,mu_1_guess,si_0_guess,si_1_guess,entries);
-  fSinglePheFit->SetParNames("#lambda","#mu_0","#mu_1","#sigma_0","#sigma_1","area");
-  fSinglePheFit->SetParLimits(0,0.,3.);
-  fSinglePheFit->SetParLimits(1,rmin,rmax);
-  fSinglePheFit->SetParLimits(2,rmin,rmax);
-  fSinglePheFit->SetParLimits(3,1.0,rmax-rmin);
-  fSinglePheFit->SetParLimits(4,1.7,rmax-rmin);
-  fSinglePheFit->SetParLimits(5,0.,1.5*entries);
-  //
-  // Normalize the histogram to facilitate faster fitting of the area
-  // For speed reasons, FKto8 is normalized to Sqrt(2 pi).
-  // Therefore also normalize the histogram to that value 
-  //
-  // ROOT gives us another nice example of user-unfriendly behavior:
-  // Although the normalization of the function fSinglePhe and the 
-  // Histogram fHBlindPixelCharge agree (!!), the fit does not normalize correctly INTERNALLY
-  // in the fitting procedure !!!
-  // 
-  // This has to do with the fact that the internal function histogramming 
-  // uses 100 bins and does not adapt to the binning of the fitted histogram, unlike PAW does
-  // (very important if you use Sumw2, see e.g. ROOTTALK: Mon May 26 1997 - 09:56:03 MEST)
-  // 
-  // So, WE have to adapt to that internal flaw of ROOT:
-  //
-  //  const Int_t  npx     = fSinglePheFit->GetNpx();
-  //  const Int_t  bins    = fHBlindPixelCharge->GetXaxis()->GetLast()-fHBlindPixelCharge->GetXaxis()->GetFirst();
-  //  fHBlindPixelCharge->Scale(gkSq2Pi*(float)bins/npx/entries);
-
-  // 
-  // we need this, otherwise, ROOT does not calculate the area correctly
-  // don't ask me why it does not behave correctly, it's one of the nasty
-  // mysteries of ROOT which takes you a whole day to find out :-)
-  //
-  //  fSinglePheFit->SetNpx(fChargenbins);  
-
-  fHBlindPixelCharge->Fit(fSinglePheFit,opt);
-  fHBlindPixelCharge->Fit(fSinglePheFit,opt);
-
-  fLambda = fSinglePheFit->GetParameter(0);
-  fMu0    = fSinglePheFit->GetParameter(1);
-  fMu1    = fSinglePheFit->GetParameter(2);
-  fSigma0 = fSinglePheFit->GetParameter(3);
-  fSigma1 = fSinglePheFit->GetParameter(4);
-  
-  fLambdaErr = fSinglePheFit->GetParError(0);
-  fMu0Err    = fSinglePheFit->GetParError(1);
-  fMu1Err    = fSinglePheFit->GetParError(2);
-  fSigma0Err = fSinglePheFit->GetParError(3);
-  fSigma1Err = fSinglePheFit->GetParError(4);
-
-  fProb      = fSinglePheFit->GetProb();
-  fChisquare = fSinglePheFit->GetChisquare();
-  fNdf       = fSinglePheFit->GetNDF();
-
-  // Perform the cross-check fitting only the pedestal:
-  fSinglePhePedFit = new TF1("GausPed","gaus",rmin,fMu0);
-  fHBlindPixelCharge->Fit(fSinglePhePedFit,opt);
-
-  Double_t pedarea = fSinglePhePedFit->GetParameter(0)*gkSq2Pi*fSinglePhePedFit->GetParameter(2);
-  cout << "Parameter0: " << fSinglePhePedFit->GetParameter(0) << endl;
-  cout << "Parameter2: " << fSinglePhePedFit->GetParameter(2) << endl;
-  cout << "Pedarea: " << pedarea << endl;
-  cout << "entries: " << entries << endl;
-  fLambdaCheck     = TMath::Log((double)entries/pedarea);
-  fLambdaCheckErr  = fSinglePhePedFit->GetParError(0)/fSinglePhePedFit->GetParameter(0)
-                     + fSinglePhePedFit->GetParError(2)/fSinglePhePedFit->GetParameter(2);
-
-  *fLog << "Results of the Blind Pixel Fit: " << endl;
-  *fLog << "Chisquare: " << fChisquare << endl;
-  *fLog << "DoF: " << fNdf << endl;
-  *fLog << "Probability: " << fProb << endl;
-  *fLog << "Integral: " << fSinglePheFit->Integral(rmin,rmax);
-
-  //
-  // The fit result is accepted under condition
-  // The fit result is accepted under condition
-  // The Probability is greater than gkProbLimit (default 0.001 == 99.7%)
-  //
-  if (fProb < gkProbLimit) 
-    {
-      *fLog << warn << "Prob: " << fProb << " is smaller than the allowed value: " << gkProbLimit << endl;
-      fFitOK = kFALSE;
-      return kFALSE;
-    }
-  
-  
-  fFitOK = kTRUE;
-    
-  return kTRUE;
-}
-
- 
-void MHCalibrationBlindPixel::CutAllEdges()
-{
-
-  Int_t nbins = 50;
-
-  CutEdges(fHBlindPixelCharge,nbins);
-
-  fBlindPixelChargefirst = fHBlindPixelCharge->GetBinLowEdge(fHBlindPixelCharge->GetXaxis()->GetFirst());
-  fBlindPixelChargelast  = fHBlindPixelCharge->GetBinLowEdge(fHBlindPixelCharge->GetXaxis()->GetLast())+fHBlindPixelCharge->GetBinWidth(0);
-  fBlindPixelChargenbins = nbins;
-
-  CutEdges(fHBlindPixelChargevsN,0);
-
-}
-
-Bool_t MHCalibrationBlindPixel::FitTime(Axis_t rmin, Axis_t rmax, Option_t *opt) 
-{
-  
-  if (fTimeGausFit)
-    return kFALSE;
-
-  rmin = (rmin != 0.) ? rmin : 4.;
-  rmax = (rmax != 0.) ? rmax : 9.;
-
-  const Stat_t   entries     = fHBlindPixelTime->Integral();
-  const Double_t mu_guess    = fHBlindPixelTime->GetBinCenter(fHBlindPixelTime->GetMaximumBin());
-  const Double_t sigma_guess = (rmax - rmin)/2.;
-  const Double_t area_guess  = entries/gkSq2Pi;
-
-  fTimeGausFit = new TF1("GausTime","gaus",rmin,rmax);  
-  fTimeGausFit->SetParameters(area_guess,mu_guess,sigma_guess);
-  fTimeGausFit->SetParNames("Area","#mu","#sigma");
-  fTimeGausFit->SetParLimits(0,0.,entries);
-  fTimeGausFit->SetParLimits(1,rmin,rmax);
-  fTimeGausFit->SetParLimits(2,0.,rmax-rmin);
-
-  fHBlindPixelTime->Fit(fTimeGausFit,opt);
-
-  rmin = fTimeGausFit->GetParameter(1) - 2.*fTimeGausFit->GetParameter(2);
-  rmax = fTimeGausFit->GetParameter(1) + 2.*fTimeGausFit->GetParameter(2);
-  fTimeGausFit->SetRange(rmin,rmax);  
-
-  fHBlindPixelTime->Fit(fTimeGausFit,opt);
-
-
-  fMeanTime     = fTimeGausFit->GetParameter(2);
-  fSigmaTime    = fTimeGausFit->GetParameter(3);
-  fMeanTimeErr  = fTimeGausFit->GetParError(2);
-  fSigmaTimeErr = fTimeGausFit->GetParError(3);
-
-  Float_t prob = fTimeGausFit->GetProb();
-
-  *fLog << "Results of the Times Fit: " << endl;
-  *fLog << "Chisquare: "   << fTimeGausFit->GetChisquare() << endl;
-  *fLog << "Ndf: "         << fTimeGausFit->GetNDF() << endl;
-  *fLog << "Probability: " << prob << endl;
-
-  if (prob < gkProbLimit) 
-    {
-      *fLog << warn << "Fit of the Arrival times failed ! " << endl;
-      return kFALSE;
-    }
-  
-  return kTRUE;
-
-}
Index: trunk/MagicSoft/Mars/mhist/MHCalibrationBlindPixel.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCalibrationBlindPixel.h	(revision 2718)
+++ 	(revision )
@@ -1,130 +1,0 @@
-#ifndef MARS_MHCalibrationBlindPixel
-#define MARS_MHCalibrationBlindPixel
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-#ifndef MARS_MHCalibrationConfig
-#include "MHCalibrationConfig.h"
-#endif
-
-#ifndef ROOT_TH1
-#include "TH1.h"
-#endif
-
-#ifndef ROOT_TH1F
-#include "TH1F.h"
-#endif
-
-#ifndef ROOT_TF1
-#include "TF1.h"
-#endif
-
-#ifndef ROOT_TPaveText
-#include "TPaveText.h"
-#endif
-
-class TMath;
-class MParList;
-class MHCalibrationBlindPixel : public MH
-{
-private:
-
-  TH1F* fHBlindPixelCharge;        //-> Histogram with the single Phe spectrum
-  TH1I* fHBlindPixelTime;          //-> Variance of summed FADC slices
-  TH1I* fHBlindPixelChargevsN;     //-> Summed Charge vs. Event Nr. 
-  
-  TF1 *fSinglePheFit;
-  TF1 *fTimeGausFit;  
-  TF1 *fSinglePhePedFit;
-
-  Axis_t  fBlindPixelChargefirst;
-  Axis_t  fBlindPixelChargelast;
-  Int_t   fBlindPixelChargenbins;
-  
-  void ResetBin(Int_t i);
-  void DrawLegend();
-
-  TPaveText *fFitLegend;
-  Bool_t fFitOK;  
-  
-  BlindPixelFitFunc fgSinglePheFitFunc;     // In the beginning, 
-  Int_t     fgSinglePheFitNPar;             // we want to be flexible using different functions
-
-  Double_t  fLambda; 
-  Double_t  fMu0; 
-  Double_t  fMu1; 
-  Double_t  fSigma0; 
-  Double_t  fSigma1; 
-
-  Double_t  fLambdaErr; 
-  Double_t  fMu0Err; 
-  Double_t  fMu1Err; 
-  Double_t  fSigma0Err; 
-  Double_t  fSigma1Err; 
-
-  Double_t  fChisquare; 
-  Double_t  fProb;      
-  Int_t     fNdf;       
-
-  Double_t  fMeanTime; 
-  Double_t  fMeanTimeErr; 
-  Double_t  fSigmaTime; 
-  Double_t  fSigmaTimeErr; 
-  
-  Double_t fLambdaCheck;
-  Double_t fLambdaCheckErr;
-
-public:
-
-  MHCalibrationBlindPixel(const char *name=NULL, const char *title=NULL);
-  ~MHCalibrationBlindPixel();
-
-  Bool_t FillBlindPixelCharge(Float_t q)             { return fHBlindPixelCharge->Fill(q) > -1;  }  
-  Bool_t FillBlindPixelTime(Int_t t)                 { return fHBlindPixelTime->Fill(t) > -1;  }
-  Bool_t FillBlindPixelChargevsN(Stat_t rq, Int_t t) { return fHBlindPixelChargevsN->Fill(t,rq) > -1;  }  
-  
-  const Double_t GetLambda()         const { return fLambda; }
-  const Double_t GetLambdaCheck()    const { return fLambdaCheck; }
-  const Double_t GetMu0()            const { return fMu0; }
-  const Double_t GetMu1()            const { return fMu1; }
-  const Double_t GetSigma0()         const { return fSigma0; }
-  const Double_t GetSigma1()         const { return fSigma1; }
-
-  const Double_t GetLambdaErr()      const { return fLambdaErr; }
-  const Double_t GetLambdaCheckErr() const { return fLambdaCheckErr; }
-  const Double_t GetMu0Err()         const { return fMu0Err; }
-  const Double_t GetMu1Err()         const { return fMu1Err; }
-  const Double_t GetSigma0Err()      const { return fSigma0Err; }
-  const Double_t GetSigma1Err()      const { return fSigma1Err; }
-
-  const Double_t GetChiSquare()      const { return fChisquare; }
-  const Double_t GetProb()           const { return fProb;      }  
-  const Int_t    GetNdf()            const { return fNdf;       }   
-
-  const Double_t GetMeanTime()      const { return fMeanTime; }
-  const Double_t GetMeanTimeErr()    const { return fMeanTimeErr; }
-  const Double_t GetSigmaTime()      const { return fSigmaTime; }
-  const Double_t GetSigmaTimeErr()    const { return fSigmaTimeErr; }
-
-  Bool_t SimulateSinglePhe(Double_t lambda,
-                           Double_t mu0,
-                           Double_t mu1,
-                           Double_t sigma0,
-                           Double_t sigma1);
-  
-  Bool_t FitSinglePhe(Axis_t rmin=0, Axis_t rmax=0, Option_t *opt="RL0+");
-  Bool_t FitTime(Axis_t rmin=0., Axis_t rmax=0.,Option_t *opt="R0+");
-
-  void ChangeFitFunc(BlindPixelFitFunc fitfunc, Int_t par=5);
-
-  void CutAllEdges();
-  void Draw(Option_t *option="");
-
-  Bool_t IsFitOK() { return fFitOK; }
-
-  ClassDef(MHCalibrationBlindPixel, 1) 
-};
-
-#endif  /* MARS_MHCalibrationBlindPixel */
Index: trunk/MagicSoft/Mars/mhist/MHCalibrationConfig.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCalibrationConfig.h	(revision 2718)
+++ 	(revision )
@@ -1,28 +1,0 @@
-#ifndef MARS_MHCalibrationConfig
-#define MARS_MHCalibrationConfig
-
-/////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-// MHCalibrationConfig                                                     //
-//                                                                         //
-// Contains all configuration data of the Calibration                      //
-//                       i                                                  //
-/////////////////////////////////////////////////////////////////////////////
-
-
-// Global rejection criteria for the acceptance of a fit: Prob=0.01 == 99% Probability
-const Float_t gkProbLimit = 0.001;
-
-// Starting number of bins for the histo:
-const Int_t gkStartBlindPixelBinNr = 10000;
-
-// Starting number of bins for the histo: (maximum by hardware: 4080)
-const Int_t gkStartPINDiodeBinNr = 4000;
-
-// Square root of 2 pi:
-const Float_t gkSq2Pi = 2.506628274631;
-
-// typedef to the fitting functions for the blind pixel
-typedef Double_t (*BlindPixelFitFunc)(Double_t *, Double_t *);
-
-#endif /* MARS_MHCalibrationBlindPixelConfig */
Index: trunk/MagicSoft/Mars/mhist/MHCalibrationPINDiode.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCalibrationPINDiode.cc	(revision 2718)
+++ 	(revision )
@@ -1,111 +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-2002
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHCalibrationPINDiode                                                 //
-//                                                                          //
-//  Performs all the necessary fits to extract the mean number of photons   //
-//              out of the derived light flux                               //
-//                                                                          //
-//////////////////////////////////////////////////////////////////////////////
-#include "MHCalibrationPINDiode.h"
-#include "MHCalibrationConfig.h"
-
-#include <TStyle.h>
-#include <TMath.h>
-
-#include <TMinuit.h>
-#include <TFitter.h>
-
-#include <TF1.h>
-#include <TH2.h>
-#include <TCanvas.h>
-#include <TPaveText.h>
-#include <TRandom.h>
-
-#include "MBinning.h"
-#include "MParList.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MHCalibrationPINDiode);
-
-using namespace std;
-// --------------------------------------------------------------------------
-//
-// Default Constructor. 
-//
-MHCalibrationPINDiode::MHCalibrationPINDiode(const char *name, const char *title)
-    : fVarGausFit(NULL)
-{
-
-    fName  = name  ? name  : "MHCalibrationPINDiode";
-    fTitle = title ? title : "Fill the accumulated charges and times all PINDiode events and perform fits";
-
-    // Create a large number of bins, later we will rebin
-    fChargeFirstHiGain = -1000.;
-    fChargeLastHiGain  = gkStartPINDiodeBinNr;
-    fChargeNbinsHiGain = gkStartPINDiodeBinNr;
-
-    fHPCharge = new TH1I("HPCharge","Distribution of Summed FADC Slices",
-			 fChargeNbinsHiGain,fChargeFirstHiGain,fChargeLastHiGain);
-    fHPCharge->SetXTitle("Sum FADC Slices");
-    fHPCharge->SetYTitle("Nr. of events");
-    fHPCharge->Sumw2();
-
-    fErrChargeFirst = 0.;
-    fErrChargeLast  = gkStartPINDiodeBinNr;
-    fErrChargeNbins = gkStartPINDiodeBinNr;
-
-    fHErrCharge = new TH1F("HErrCharge","Distribution of Variances of Summed FADC Slices",fErrChargeNbins,fErrChargeFirst,fErrChargeLast);
-    fHErrCharge->SetXTitle("Variance Summed FADC Slices");
-    fHErrCharge->SetYTitle("Nr. of events");
-    fHErrCharge->Sumw2();
-
-    Int_t tfirst = 0;
-    Int_t tlast  = 31;
-    Int_t nbins   = 32;
-
-    fHPTime = new TH1I("HPTime","Distribution of Mean Arrival Times",nbins,tfirst,tlast);
-    fHPTime->SetXTitle("Mean Arrival Times [FADC slice nr]");
-    fHPTime->SetYTitle("Nr. of events");
-    fHPTime->Sumw2();
-
-}
-
-MHCalibrationPINDiode::~MHCalibrationPINDiode()
-{
-
-  delete fHPCharge;
-  delete fHErrCharge;
-  
-  if (fVarGausFit)
-    delete fVarGausFit;
-  
-  delete fHPTime;
-
-}
-
Index: trunk/MagicSoft/Mars/mhist/MHCalibrationPINDiode.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCalibrationPINDiode.h	(revision 2718)
+++ 	(revision )
@@ -1,51 +1,0 @@
-#ifndef MARS_MHCalibrationPINDiode
-#define MARS_MHCalibrationPINDiode
-
-#ifndef MARS_MHCalibrationPixel
-#include "MHCalibrationPixel.h"
-#endif
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-#ifndef ROOT_TH1
-#include "TH1.h"
-#endif
-
-#ifndef ROOT_TH1F
-#include "TH1F.h"
-#endif
-
-#ifndef ROOT_TF1
-#include "TF1.h"
-#endif
-
-class MHCalibrationPINDiode : public MHCalibrationPixel
-{
-private:
-
-  TH1I* fHPCharge;             //-> Histogram containing the summed 32 PINDiode slices
-  TH1F* fHErrCharge;           //-> Variance of summed FADC slices
-  TH1I* fHPTime;             //-> Histogram with time evolution of summed charges
-  
-  
-  TF1 *fVarGausFit;
-  
-  Float_t  fErrChargeFirst;
-  Float_t  fErrChargeLast;
-  UShort_t fErrChargeNbins;
-
-public:
-
-  MHCalibrationPINDiode(const char *name=NULL, const char *title=NULL);
-  ~MHCalibrationPINDiode();
-
-  const Double_t GetTime()      const { return fVarGausFit->GetParameter(2); }
-  const Double_t GetErrTime()    const { return fVarGausFit->GetParameter(3); }
-
-  ClassDef(MHCalibrationPINDiode, 0) 
-};
-
-#endif
-
Index: trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.cc	(revision 2718)
+++ 	(revision )
@@ -1,897 +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-2002
-!
-!
-\* ======================================================================== */
-
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  MHCalibrationPixel                                                 //
-//                                                                          //
-//  Performs all the necessary fits to extract the mean number of photons   //
-//              out of the derived light flux                               //
-//                                                                          //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "MHCalibrationPixel.h"
-#include "MHCalibrationConfig.h"
-#include "MCalibrationFits.h"
-
-#include <TStyle.h>
-#include <TMath.h>
-
-#include <TFitter.h>
-#include <TGraph.h>
-#include <TAxis.h>
-
-#include <TF1.h>
-#include <TH2.h>
-#include <TProfile.h>
-#include <TCanvas.h>
-#include <TPad.h>
-#include <TPaveText.h>
-
-#include "MParList.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-
-ClassImp(MHCalibrationPixel);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Default Constructor. 
-//
-MHCalibrationPixel::MHCalibrationPixel(const char *name, const char *title)
-      : fPixId(-1),
-	fTotalEntries(0),
-	fHiGains(NULL),
-	fLoGains(NULL),
-        fChargeGausFit(NULL), 
-	fTimeGausFit(NULL), 
-	fHivsLoGain(NULL),
-	fFitLegend(NULL),
-	fLowerFitRange(-2000.),
-	fChargeFirstHiGain(-2000.5),
-	fChargeLastHiGain(9999.5),
-	fChargeNbinsHiGain(12000),
-	fChargeFirstLoGain(-2000.5),
-	fChargeLastLoGain(9999.5),
-	fChargeNbinsLoGain(1200),
-        fFitOK(kFALSE),
-        fChargeChisquare(-1.),
-        fChargeProb(-1.),
-        fChargeNdf(-1),
-        fTimeChisquare(-1.),
-        fTimeProb(-1.),
-        fTimeNdf(-1),
-        fTimeMean(-1.),
-        fTimeSigma(-1.),
-        fTimeLowerFitRange(3.),
-        fTimeUpperFitRange(9.),
-	fUseLoGain(kFALSE),
-	fOffset(0.),
-	fSlope(0.)
-{ 
-
-    fName  = name  ? name  : "MHCalibrationPixel";
-    fTitle = title ? title : "Fill the accumulated charges and times of all events and perform fits";
-
-    // Create a large number of bins, later we will rebin
-    fHChargeHiGain = new TH1F("HChargeHiGain","Distribution of Summed FADC Hi Gain Slices Pixel ",
-			      fChargeNbinsHiGain,fChargeFirstHiGain,fChargeLastHiGain);
-    fHChargeHiGain->SetXTitle("Sum FADC Slices (Hi Gain)");
-    fHChargeHiGain->SetYTitle("Nr. of events");
-    fHChargeHiGain->Sumw2();
-
-    fHChargeHiGain->SetDirectory(NULL);
-
-    fHChargeLoGain = new TH1F("HChargeLoGain","Distribution of Summed FADC Lo Gain Slices Pixel ",
-			      fChargeNbinsLoGain,fChargeFirstLoGain,fChargeLastLoGain);
-    fHChargeLoGain->SetXTitle("Sum FADC Slices (Lo Gain)");
-    fHChargeLoGain->SetYTitle("Nr. of events");
-    fHChargeLoGain->Sumw2();
-
-    fHChargeLoGain->SetDirectory(NULL);
-
-    Axis_t tfirst = -0.5;
-    Axis_t tlast  = 15.5;
-    Int_t  ntbins = 16;
-
-    fHTimeHiGain = new TH1I("HTimeHiGain","Distribution of Mean Arrival Hi Gain Times Pixel ",
-			    ntbins,tfirst,tlast);
-    fHTimeHiGain->SetXTitle("Mean Arrival Times [Hi Gain FADC slice nr]");
-    fHTimeHiGain->SetYTitle("Nr. of events");
-    // fHTimeHiGain->Sumw2();
-
-    fHTimeHiGain->SetDirectory(NULL);
-
-    fHTimeLoGain = new TH1I("HTimeLoGain","Distribution of Mean Arrival Lo Gain Times Pixel ",
-			    ntbins,tfirst,tlast);
-    fHTimeLoGain->SetXTitle("Mean Arrival Times [Lo Gain FADC slice nr]");
-    fHTimeLoGain->SetYTitle("Nr. of events");
-    //    fHTimeLoGain->Sumw2();
-
-    fHTimeLoGain->SetDirectory(NULL);
-
-    // We define a reasonable number and later enlarge it if necessary
-    Int_t  nqbins = 20000;
-    Axis_t nfirst = -0.5;
-    Axis_t nlast  = (Axis_t)nqbins - 0.5;
-
-    fHChargevsNHiGain = new TH1I("HChargevsNHiGain","Sum of Hi Gain Charges vs. Event Number Pixel ",
-				 nqbins,nfirst,nlast);
-    fHChargevsNHiGain->SetXTitle("Event Nr.");
-    fHChargevsNHiGain->SetYTitle("Sum of Hi Gain FADC slices");
-
-    fHChargevsNHiGain->SetDirectory(NULL);
-
-    fHChargevsNLoGain = new TH1I("HChargevsNLoGain","Sum of Lo Gain Charges vs. Event Number Pixel ",
-				 nqbins,nfirst,nlast);
-    fHChargevsNLoGain->SetXTitle("Event Nr.");
-    fHChargevsNLoGain->SetYTitle("Sum of Lo Gain FADC slices");
-
-    fHChargevsNLoGain->SetDirectory(NULL);
-
-    fHiGains = new TArrayF();
-    fLoGains = new TArrayF();
-
-}
-
-MHCalibrationPixel::~MHCalibrationPixel()
-{
-
-  delete fHChargeHiGain;
-  delete fHTimeHiGain;
-  delete fHChargevsNHiGain;
-
-  delete fHChargeLoGain;
-  delete fHTimeLoGain;
-  delete fHChargevsNLoGain;
-
-  delete fHiGains;
-  delete fLoGains;
-
-  if (fChargeGausFit)
-    delete fChargeGausFit;
-  if (fTimeGausFit)
-    delete fTimeGausFit;
-  if (fFitLegend)
-    delete fFitLegend;
-  if (fHivsLoGain)
-    delete fHivsLoGain;
-
-
-}
-
-
-void MHCalibrationPixel::ChangeHistId(Int_t id)
-{
-
-  fPixId = id;
-
-  //
-  // Names Hi gain Histograms
-  //
-  TString nameQHiGain = TString(fHChargeHiGain->GetName());
-  nameQHiGain += id;
-  fHChargeHiGain->SetName(nameQHiGain.Data());
-
-  TString nameTHiGain = TString(fHTimeHiGain->GetName());
-  nameTHiGain += id;
-  fHTimeHiGain->SetName(nameTHiGain.Data());
-
-  TString nameQvsNHiGain  = TString(fHChargevsNHiGain->GetName());
-  nameQvsNHiGain += id;
-  fHChargevsNHiGain->SetName(nameQvsNHiGain.Data());
-
-  //
-  // Title Hi gain Histograms
-  //
-  TString titleQHiGain = TString(fHChargeHiGain->GetTitle());
-  titleQHiGain += id;
-  fHChargeHiGain->SetTitle(titleQHiGain.Data());
-
-  TString titleTHiGain = TString(fHTimeHiGain->GetTitle());
-  titleTHiGain += id;
-  fHTimeHiGain->SetTitle(titleTHiGain.Data());
-
-  TString titleQvsNHiGain  = TString(fHChargevsNHiGain->GetTitle());
-  titleQvsNHiGain += id;
-  fHChargevsNHiGain->SetTitle(titleQvsNHiGain.Data());
-
-  //
-  // Names Low Gain Histograms
-  //
-  TString nameQLoGain = TString(fHChargeLoGain->GetName());
-  nameQLoGain += id;
-  fHChargeLoGain->SetName(nameQLoGain.Data());
-
-  TString nameTLoGain = TString(fHTimeLoGain->GetName());
-  nameTLoGain += id;
-  fHTimeLoGain->SetName(nameTLoGain.Data());
-
-  TString nameQvsNLoGain  = TString(fHChargevsNLoGain->GetName());
-  nameQvsNLoGain += id;
-  fHChargevsNLoGain->SetName(nameQvsNLoGain.Data());
-
-  //
-  // Titles Low Gain Histograms
-  //
-  TString titleQLoGain = TString(fHChargeLoGain->GetTitle());
-  titleQLoGain += id;
-  fHChargeLoGain->SetTitle(titleQLoGain.Data());
-
-  TString titleTLoGain = TString(fHTimeLoGain->GetTitle());
-  titleTLoGain += id;
-  fHTimeLoGain->SetTitle(titleTLoGain.Data());
-
-  TString titleQvsNLoGain  = TString(fHChargevsNLoGain->GetTitle());
-  titleQvsNLoGain += id;
-  fHChargevsNLoGain->SetTitle(titleQvsNLoGain.Data());
-}
-
-
-void MHCalibrationPixel::Reset()
-{
-  
-  for (Int_t i = fHChargeHiGain->FindBin(fChargeFirstHiGain); 
-       i <= fHChargeHiGain->FindBin(fChargeLastHiGain); i++)
-    fHChargeHiGain->SetBinContent(i, 1.e-20);
-
-  for (Int_t i = 0; i < 16; i++)
-      fHTimeHiGain->SetBinContent(i, 1.e-20);
-  
-  fChargeLastHiGain     = 9999.5;
-
-  fHChargeHiGain->GetXaxis()->SetRangeUser(0.,fChargeLastHiGain);
-
- for (Int_t i = fHChargeLoGain->FindBin(fChargeFirstLoGain); 
-       i <= fHChargeLoGain->FindBin(fChargeLastLoGain); i++)
-    fHChargeLoGain->SetBinContent(i, 1.e-20);
-
-  for (Int_t i = 0; i < 16; i++)
-      fHTimeLoGain->SetBinContent(i, 1.e-20);
-  
-  fChargeLastLoGain     = 9999.5;
-
-  fHChargeLoGain->GetXaxis()->SetRangeUser(0.,fChargeLastLoGain);
-
-  return;
-}
-
-
-// -------------------------------------------------------------------------
-//
-// Set the binnings and prepare the filling of the histograms
-//
-Bool_t MHCalibrationPixel::SetupFill(const MParList *plist)
-{
-
-  fHChargeHiGain->Reset();
-  fHTimeHiGain->Reset();
-  fHChargeLoGain->Reset();
-  fHTimeLoGain->Reset();
-
-  return kTRUE;
-}
-
-
-Bool_t MHCalibrationPixel::UseLoGain()
-{
-
-  if (fHChargeHiGain->Integral() > fHChargeLoGain->Integral())
-    {
-      fUseLoGain = kFALSE;
-      return kFALSE;
-    }
-  else
-    {
-      fUseLoGain = kTRUE;
-      return kTRUE;
-    }
-}
-
-void MHCalibrationPixel::SetPointInGraph(Float_t qhi,Float_t qlo)
-{
-
-  fHiGains->Set(++fTotalEntries);
-  fLoGains->Set(fTotalEntries);
-
-  fHiGains->AddAt(qhi,fTotalEntries-1);
-  fLoGains->AddAt(qlo,fTotalEntries-1);
-
-}
-
-
-// -------------------------------------------------------------------------
-//
-// Draw a legend with the fit results
-//
-void MHCalibrationPixel::DrawLegend()
-{
-
-  fFitLegend = new TPaveText(0.05,0.05,0.95,0.95);
-
-  if (fFitOK) 
-      fFitLegend->SetFillColor(80);
-  else
-      fFitLegend->SetFillColor(2);    
-  
-  fFitLegend->SetLabel("Results of the Gauss Fit:");
-  fFitLegend->SetTextSize(0.05);
-
-  const TString line1 = 
-    Form("Mean: Q_{#mu} = %2.2f #pm %2.2f",fChargeMean,fChargeMeanErr);
-
-  fFitLegend->AddText(line1);
-
-
-  const TString line4 =
-    Form("Sigma: #sigma_{Q} = %2.2f #pm %2.2f",fChargeSigma,fChargeSigmaErr);
-
-  fFitLegend->AddText(line4);
-
-
-  const TString line7 =
-    Form("#chi^{2} / N_{dof}: %4.2f / %3i",fChargeChisquare,fChargeNdf);
-
-  fFitLegend->AddText(line7);
-
-
-  const TString line8 =
-    Form("Probability: %4.3f ",fChargeProb);
-
-  fFitLegend->AddText(line8);
-
-  if (fFitOK)
-    fFitLegend->AddText("Result of the Fit: OK");
-  else
-    fFitLegend->AddText("Result of the Fit: NOT OK");
-
-  fFitLegend->SetBit(kCanDelete);
-  fFitLegend->Draw();
-
-}
-
-
-// -------------------------------------------------------------------------
-//
-// Draw the histogram
-//
-void MHCalibrationPixel::Draw(Option_t *opt) 
-{
-
-  if (!fHivsLoGain)
-    FitHiGainvsLoGain();
-      
-  gStyle->SetOptFit(0);
-  gStyle->SetOptStat(1111111);
-  
-  TCanvas *c = MakeDefCanvas(this,600,900); 
-  
-  gROOT->SetSelectedPad(NULL);
-  
-  c->Divide(2,4);
-  
-  c->cd(1);
-  gPad->SetBorderMode(0);
-  gPad->SetTicks();
-
-  if (fHChargeHiGain->Integral() > 0)
-    gPad->SetLogy(1);
-  else
-    gPad->SetLogy(0);
-
-  fHChargeHiGain->DrawCopy(opt);
-  
-  c->Modified();
-  c->Update();
-  
-  if (fUseLoGain)
-    {
-
-      c->cd(2);
-      gPad->SetTicks();
-
-      if (fHChargeLoGain->Integral() > 0)
-        gPad->SetLogy(1);
-      else
-        gPad->SetLogy(0);
-
-      fHChargeLoGain->DrawCopy(opt);
-      
-      if (fChargeGausFit)
-        {
-          if (fFitOK)
-            fChargeGausFit->SetLineColor(kGreen);          
-          else
-            fChargeGausFit->SetLineColor(kRed);
-          
-          fChargeGausFit->DrawCopy("same");
-        }
-      c->Modified();
-      c->Update();
-      
-      c->cd(3);
-      gROOT->SetSelectedPad(NULL);
-      gStyle->SetOptFit();
-      fHivsLoGain->Draw("prof");
-
-      gPad->Modified();
-      gPad->Update();
-      
-      c->cd(4);
-      DrawLegend();
-      
-    }
-  else
-    {
-      if (fChargeGausFit)
-        {
-          if (fFitOK)
-            fChargeGausFit->SetLineColor(kGreen);          
-          else
-            fChargeGausFit->SetLineColor(kRed);
-          
-          fChargeGausFit->DrawCopy("same");
-        }
-
-      c->cd(2);
-      gPad->SetTicks();
-
-      if (fHChargeLoGain->Integral() > 0)
-        gPad->SetLogy(1);
-      else
-        gPad->SetLogy(0);
-      
-      fHChargeLoGain->DrawCopy(opt);
-      c->Modified();
-      c->Update();
-      
-      c->cd(3);
-      DrawLegend();
-      
-      c->cd(4);
-      
-      gROOT->SetSelectedPad(NULL);
-      gStyle->SetOptFit();
-      fHivsLoGain->Draw("prof");
-      gPad->Modified();
-      gPad->Update();
-    }	
-  
-  c->Modified();
-  c->Update();
-  
-  c->cd(5);
-  gStyle->SetOptStat(1111111);
-
-  gPad->SetTicks();  
-  gPad->SetLogy(0);
-  fHTimeHiGain->DrawCopy(opt);
-  c->Modified();
-  c->Update();
-  
-  if (fUseLoGain)
-      {
-        
-	c->cd(6);
-        gPad->SetTicks();
-	gPad->SetLogy(0);
-	fHTimeLoGain->DrawCopy(opt);
-	c->Modified();
-	c->Update();
-	
-	if (fTimeGausFit)
-	  {
-	    if (fTimeChisquare > 20.) 
-	      fTimeGausFit->SetLineColor(kRed);
-	    else
-	      fTimeGausFit->SetLineColor(kGreen);
-	    
-	    fTimeGausFit->DrawCopy("same");
-	    c->Modified();
-	    c->Update();
-	  }
-      }
-    else
-      {  
-	if (fTimeGausFit)
-	  {
-	    if (fTimeChisquare > 20.) 
-	      fTimeGausFit->SetLineColor(kRed);
-	    else
-	      fTimeGausFit->SetLineColor(kGreen);
-	    
-	    fTimeGausFit->DrawCopy("same");
-	    c->Modified();
-	    c->Update();
-	  }
-
-	c->cd(6);
-        gPad->SetTicks();
-	gPad->SetLogy(0);
-	fHTimeLoGain->DrawCopy(opt);	
-	c->Modified();
-	c->Update();
-    
-      }
-    c->Modified();
-    c->Update();
-    
-    c->cd(7);
-    gPad->SetTicks();
-    fHChargevsNHiGain->DrawCopy(opt);
-    c->Modified();
-    c->Update();
-
-    c->cd(8);
-    gPad->SetTicks();
-    fHChargevsNLoGain->DrawCopy(opt);
-    c->Modified();
-    c->Update();
-
-
-}
-
-void MHCalibrationPixel::FitHiGainvsLoGain()
-{
-
-  if (fHivsLoGain)
-    return;
-
-  gStyle->SetOptFit();
-
-  fHivsLoGain = new TProfile("HiGainvsLoGain","Plot the High Gain vs. Low Gain",100,0.,1000.,0.,1000.);
-  fHivsLoGain->GetXaxis()->SetTitle("Sum of Charges High Gain");
-  fHivsLoGain->GetYaxis()->SetTitle("Sum of Charges Low Gain");
-
-  TString titleHiLoGain  = TString(fHivsLoGain->GetName());
-  titleHiLoGain += fPixId;
-  fHivsLoGain->SetName(titleHiLoGain.Data());
-
-  
-  for (Int_t i=0;i<fTotalEntries;i++)
-    fHivsLoGain->Fill(fHiGains->At(i),fLoGains->At(i),1);
-  
-  fHivsLoGain->Fit("pol1","rq","",fHivsLoGain->GetMean()-2.5*fHivsLoGain->GetRMS(),fHivsLoGain->GetMean()+2.*fHivsLoGain->GetRMS());
-  
-  fOffset = fHivsLoGain->GetFunction("pol1")->GetParameter(0);
-  fSlope  = fHivsLoGain->GetFunction("pol1")->GetParameter(1);
-  
-}
-
-
-Bool_t MHCalibrationPixel::FitTimeHiGain(Axis_t rmin, Axis_t rmax, Option_t *option)
-{
-
-  if (fTimeGausFit)
-    return kFALSE;
-
-  rmin = (rmin != 0.) ? rmin : fTimeLowerFitRange;
-  rmax = (rmax != 0.) ? rmax : fTimeUpperFitRange;
-
-  const Stat_t entries       = fHTimeHiGain->Integral();
-  const Double_t mu_guess    = fHTimeHiGain->GetBinCenter(fHTimeHiGain->GetMaximumBin());
-  const Double_t sigma_guess = (rmax - rmin)/2.;
-  const Double_t area_guess  = entries/gkSq2Pi;
-
-  TString name = TString("GausTime");
-  name += fPixId;
-  fTimeGausFit = new TF1(name.Data(),"gaus",rmin,rmax);  
-
-  if (!fTimeGausFit) 
-    {
-    *fLog << err << dbginf << "Could not create fit function for Gauss fit" << endl;
-    return kFALSE;
-    }
-
-  fTimeGausFit->SetParameters(area_guess,mu_guess,sigma_guess);
-  fTimeGausFit->SetParNames("Area","#mu","#sigma");
-  fTimeGausFit->SetParLimits(0,0.,entries);
-  fTimeGausFit->SetParLimits(1,rmin,rmax);
-  fTimeGausFit->SetParLimits(2,0.,(rmax-rmin));
-  fTimeGausFit->SetRange(rmin,rmax);
-
-  fHTimeHiGain->Fit(fTimeGausFit,option);
-
-  rmin = fTimeGausFit->GetParameter(1) - 3.*fTimeGausFit->GetParameter(2);
-  rmax = fTimeGausFit->GetParameter(1) + 3.*fTimeGausFit->GetParameter(2);
-  fTimeGausFit->SetRange(rmin,rmax);  
-
-  fHTimeHiGain->Fit(fTimeGausFit,option);
-
-  fTimeChisquare = fTimeGausFit->GetChisquare();
-  fTimeNdf       = fTimeGausFit->GetNDF();
-  fTimeProb      = fTimeGausFit->GetProb();
-
-  fTimeMean      = fTimeGausFit->GetParameter(1);
-  fTimeSigma     = fTimeGausFit->GetParameter(2);
-
-  if (fTimeChisquare > 20.)  // Cannot use Probability because Ndf is sometimes < 1
-    {
-      *fLog << warn << "Fit of the Arrival times failed ! " << endl;
-      return kFALSE;
-    }
-  
-  return kTRUE;
-
-}
-
-Bool_t MHCalibrationPixel::FitTimeLoGain(Axis_t rmin, Axis_t rmax, Option_t *option)
-{
-
-  if (fTimeGausFit)
-    return kFALSE;
-
-  rmin = (rmin != 0.) ? rmin : fTimeLowerFitRange;
-  rmax = (rmax != 0.) ? rmax : fTimeUpperFitRange;
-
-  const Stat_t   entries     = fHTimeLoGain->Integral();
-  const Double_t mu_guess    = fHTimeLoGain->GetBinCenter(fHTimeLoGain->GetMaximumBin());
-  const Double_t sigma_guess = (rmax - rmin)/2.;
-  const Double_t area_guess  = entries/gkSq2Pi;
-
-  TString name = TString("GausTime");
-  name += fPixId;
-  fTimeGausFit = new TF1(name.Data(),"gaus",rmin,rmax);  
-
-  if (!fTimeGausFit) 
-    {
-    *fLog << err << dbginf << "Could not create fit function for Gauss fit" << endl;
-    return kFALSE;
-    }
-
-  fTimeGausFit->SetParameters(area_guess,mu_guess,sigma_guess);
-  fTimeGausFit->SetParNames("Area","#mu","#sigma");
-  fTimeGausFit->SetParLimits(0,0.,entries);
-  fTimeGausFit->SetParLimits(1,rmin,rmax);
-  fTimeGausFit->SetParLimits(2,0.,(rmax-rmin));
-  fTimeGausFit->SetRange(rmin,rmax);
-
-  fHTimeLoGain->Fit(fTimeGausFit,option);
-
-  rmin = fTimeGausFit->GetParameter(1) - 3.*fTimeGausFit->GetParameter(2);
-  rmax = fTimeGausFit->GetParameter(1) + 3.*fTimeGausFit->GetParameter(2);
-  fTimeGausFit->SetRange(rmin,rmax);  
-
-  fHTimeLoGain->Fit(fTimeGausFit,option);
-
-  fTimeChisquare = fTimeGausFit->GetChisquare();
-  fTimeNdf       = fTimeGausFit->GetNDF();
-  fTimeProb      = fTimeGausFit->GetProb();
-
-  fTimeMean      = fTimeGausFit->GetParameter(1);
-  fTimeSigma     = fTimeGausFit->GetParameter(2);
-
-  if (fTimeChisquare > 20.)  // Cannot use Probability because Ndf is sometimes < 1
-    {
-      *fLog << warn << "Fit of the Arrival times failed ! " << endl;
-      return kFALSE;
-    }
-  
-  return kTRUE;
-
-}
-
-Bool_t MHCalibrationPixel::FitChargeHiGain(Option_t *option)
-{
-
-  if (fChargeGausFit)
-    return kFALSE;
-
-  //
-  // Get the fitting ranges
-  //
-  Axis_t rmin = (fLowerFitRange != 0.) ? fLowerFitRange : fChargeFirstHiGain;
-  Axis_t rmax = 0.;
-
-  //
-  // First guesses for the fit (should be as close to reality as possible, 
-  // otherwise the fit goes gaga because of high number of dimensions ...
-  //
-  const Stat_t   entries    = fHChargeHiGain->Integral();
-  const Double_t area_guess = entries/gkSq2Pi;
-  const Double_t mu_guess   = fHChargeHiGain->GetBinCenter(fHChargeHiGain->GetMaximumBin());
-  const Double_t sigma_guess = mu_guess/15.;
-
-  TString name = TString("ChargeGausFit");
-  name += fPixId;
-
-  fChargeGausFit = new TF1(name.Data(),"gaus",rmin,fChargeLastHiGain);
-
-  if (!fChargeGausFit) 
-    {
-    *fLog << err << dbginf << "Could not create fit function for Gauss fit" << endl;
-    return kFALSE;
-    }
-  
-  fChargeGausFit->SetParameters(area_guess,mu_guess,sigma_guess);
-  fChargeGausFit->SetParNames("Area","#mu","#sigma");
-  fChargeGausFit->SetParLimits(0,0.,entries);
-  fChargeGausFit->SetParLimits(1,rmin,fChargeLastHiGain);
-  fChargeGausFit->SetParLimits(2,0.,fChargeLastHiGain-rmin);
-  fChargeGausFit->SetRange(rmin,fChargeLastHiGain);
-
-  fHChargeHiGain->Fit(fChargeGausFit,option);
-  
-  Axis_t rtry = fChargeGausFit->GetParameter(1) - 2.0*fChargeGausFit->GetParameter(2);
-  
-  rmin = (rtry < rmin ? rmin : rtry);
-  rmax = fChargeGausFit->GetParameter(1) + 3.5*fChargeGausFit->GetParameter(2);
-  fChargeGausFit->SetRange(rmin,rmax);  
-
-  fHChargeHiGain->Fit(fChargeGausFit,option);
-
-  fChargeChisquare = fChargeGausFit->GetChisquare();
-  fChargeNdf       = fChargeGausFit->GetNDF();
-  fChargeProb      = fChargeGausFit->GetProb();
-  fChargeMean      = fChargeGausFit->GetParameter(1);
-  fChargeMeanErr   = fChargeGausFit->GetParError(1);
-  fChargeSigma     = fChargeGausFit->GetParameter(2);
-  fChargeSigmaErr  = fChargeGausFit->GetParError(2);
-
-  //
-  // The fit result is accepted under condition
-  // The Probability is greater than gkProbLimit (default 0.001 == 99.9%)
-  //
-  if (fChargeProb < gkProbLimit) 
-    {
-      *fLog << warn << "Prob: " << fChargeProb 
-            << " is smaller than the allowed value: " << gkProbLimit << endl;
-      fFitOK = kFALSE;
-      return kFALSE;
-    }
-  
-  fFitOK = kTRUE;
-  return kTRUE;
-}
-
-
-Bool_t MHCalibrationPixel::FitChargeLoGain(Option_t *option)
-{
-
-  if (fChargeGausFit)
-    return kFALSE;
-
-  //
-  // Get the fitting ranges
-  //
-  Axis_t rmin = (fLowerFitRange != 0.) ? fLowerFitRange : fChargeFirstLoGain;
-  Axis_t rmax = 0.;
-
-  //
-  // First guesses for the fit (should be as close to reality as possible, 
-  // otherwise the fit goes gaga because of high number of dimensions ...
-  //
-  const Stat_t   entries    = fHChargeLoGain->Integral();
-  const Double_t area_guess = entries/gkSq2Pi;
-  const Double_t mu_guess   = fHChargeLoGain->GetBinCenter(fHChargeLoGain->GetMaximumBin());
-  const Double_t sigma_guess = mu_guess/15.;
-
-  TString name = TString("ChargeGausFit");
-  name += fPixId;
-
-  fChargeGausFit = new TF1(name.Data(),"gaus",rmin,fChargeLastLoGain);
-
-  if (!fChargeGausFit) 
-    {
-    *fLog << err << dbginf << "Could not create fit function for Gauss fit" << endl;
-    return kFALSE;
-    }
-  
-  fChargeGausFit->SetParameters(area_guess,mu_guess,sigma_guess);
-  fChargeGausFit->SetParNames("Area","#mu","#sigma");
-  fChargeGausFit->SetParLimits(0,0.,entries);
-  fChargeGausFit->SetParLimits(1,rmin,fChargeLastLoGain);
-  fChargeGausFit->SetParLimits(2,0.,fChargeLastLoGain-rmin);
-  fChargeGausFit->SetRange(rmin,fChargeLastLoGain);
-
-  fHChargeLoGain->Fit(fChargeGausFit,option);
-  
-  Axis_t rtry = fChargeGausFit->GetParameter(1) - 2.*fChargeGausFit->GetParameter(2);
-  
-  rmin = (rtry < rmin ? rmin : rtry);
-  rmax = fChargeGausFit->GetParameter(1) + 3.5*fChargeGausFit->GetParameter(2);
-  fChargeGausFit->SetRange(rmin,rmax);  
-
-  fHChargeLoGain->Fit(fChargeGausFit,option);
-
-  //  rmin = fChargeGausFit->GetParameter(1) - 2.5*fChargeGausFit->GetParameter(2);
-  //  rmax = fChargeGausFit->GetParameter(1) + 2.5*fChargeGausFit->GetParameter(2);
-  //  fChargeGausFit->SetRange(rmin,rmax);  
-
-  // fHChargeLoGain->Fit(fChargeGausFit,option);
-
-  fChargeChisquare = fChargeGausFit->GetChisquare();
-  fChargeNdf       = fChargeGausFit->GetNDF();
-  fChargeProb      = fChargeGausFit->GetProb();
-  fChargeMean      = fChargeGausFit->GetParameter(1);
-  fChargeMeanErr   = fChargeGausFit->GetParError(1);
-  fChargeSigma     = fChargeGausFit->GetParameter(2);
-  fChargeSigmaErr  = fChargeGausFit->GetParError(2);
-
-  //
-  // The fit result is accepted under condition
-  // The Probability is greater than gkProbLimit (default 0.01 == 99%)
-  //
-  if (fChargeProb < gkProbLimit) 
-    {
-      *fLog << warn << "Prob: " << fChargeProb << " is smaller than the allowed value: " << gkProbLimit << endl;
-      fFitOK = kFALSE;
-      return kFALSE;
-    }
-  
-  
-  fFitOK = kTRUE;
-    
-  return kTRUE;
-}
-
- 
-void MHCalibrationPixel::CutAllEdges()
-{
-
-  Int_t nbins = 30;
-
-  CutEdges(fHChargeHiGain,nbins);
-
-  fChargeFirstHiGain = fHChargeHiGain->GetBinLowEdge(fHChargeHiGain->GetXaxis()->GetFirst());
-  fChargeLastHiGain  = fHChargeHiGain->GetBinLowEdge(fHChargeHiGain->GetXaxis()->GetLast())
-                      +fHChargeHiGain->GetBinWidth(0);
-  fChargeNbinsHiGain = nbins;
-
-  CutEdges(fHChargeLoGain,nbins);
-
-  fChargeFirstLoGain = fHChargeLoGain->GetBinLowEdge(fHChargeLoGain->GetXaxis()->GetFirst());
-  fChargeLastLoGain  = fHChargeLoGain->GetBinLowEdge(fHChargeLoGain->GetXaxis()->GetLast())
-                      +fHChargeLoGain->GetBinWidth(0);
-  fChargeNbinsLoGain = nbins;
-
-  CutEdges(fHChargevsNHiGain,0);
-  CutEdges(fHChargevsNLoGain,0);
-
-}
-
-void MHCalibrationPixel::PrintChargeFitResult()
-{
-  
-  *fLog << "Results of the Summed Charges Fit: "                      << endl;
-  *fLog << "Chisquare: "        << fChargeChisquare                   << endl;
-  *fLog << "DoF: "              << fChargeNdf                         << endl;
-  *fLog << "Probability: "      << fChargeProb                        << endl;
-  *fLog                                                               << endl;
-  
-}
-
-void MHCalibrationPixel::PrintTimeFitResult()
-{
-
-  *fLog << "Results of the Time Slices Fit: "                        << endl;
-  *fLog << "Chisquare: "   << fTimeChisquare                         << endl;
-  *fLog << "Ndf: "         << fTimeNdf                               << endl;
-  *fLog << "Probability: " << fTimeProb                              << endl;
-  *fLog                                                              << endl;
-
-}
Index: trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.h	(revision 2718)
+++ 	(revision )
@@ -1,174 +1,0 @@
-#ifndef MARS_MHCalibrationPixel
-#define MARS_MHCalibrationPixel
-
-#ifndef ROOT_TH1
-#include "TH1.h"
-#endif
-
-#ifndef ROOT_TH1
-#include "TH1F.h"
-#endif
-
-#ifndef MARS_MH
-#include "MH.h"
-#endif
-
-#ifndef ROOT_TF1
-#include "TF1.h"
-#endif
-
-#ifndef ROOT_TProfile
-#include "TProfile.h"
-#endif
-
-#ifndef ROOT_TArrayF
-#include "TArrayF.h"
-#endif
-
-class TPaveText;
-class TMath;
-class MParList;
-
-class MHCalibrationPixel : public MH
-{
-
-private:
-
-  Int_t fPixId;                  // Pixel Nr
-  Int_t fTotalEntries;           // Number of entries
-
-  TArrayF *fHiGains;
-  TArrayF *fLoGains;
-
-protected:
-
-  TH1F* fHChargeHiGain;          // Summed FADC slices High Gain
-  TH1I* fHTimeHiGain;            // Mean arrival time in number of FADC sice
-  TH1I* fHChargevsNHiGain;       // Summed Charge vs. Event Nr. 
-  
-  TH1F* fHChargeLoGain;          // Summed FADC slices Low Gain
-  TH1I* fHTimeLoGain;            // Mean arrival time in number of FADC sice
-  TH1I* fHChargevsNLoGain;       // Summed Charge vs. Event Nr. 
-
-  TF1* fChargeGausFit;
-  TF1* fTimeGausFit;
-  
-  TProfile* fHivsLoGain;
-
-  TPaveText *fFitLegend;  
-  
-  Axis_t  fLowerFitRange;
-  Axis_t  fChargeFirstHiGain;
-  Axis_t  fChargeLastHiGain;
-  Int_t   fChargeNbinsHiGain;
-
-  Axis_t  fChargeFirstLoGain;
-  Axis_t  fChargeLastLoGain;
-  Int_t   fChargeNbinsLoGain;
-
-  Bool_t fFitOK;
-
-  Double_t fChargeChisquare;
-  Double_t fChargeProb;
-  Int_t    fChargeNdf;
-
-  Double_t fChargeMean;
-  Double_t fChargeMeanErr;
-  Double_t fChargeSigma;
-  Double_t fChargeSigmaErr;
-  
-  Double_t fTimeChisquare;
-  Double_t fTimeProb;
-  Int_t    fTimeNdf;
-
-  Double_t fTimeMean;
-  Double_t fTimeSigma;
-
-  Stat_t   fTimeLowerFitRange;
-  Stat_t   fTimeUpperFitRange;
-  
-  Bool_t fUseLoGain;
-
-  Double_t fOffset;
-  Double_t fSlope;
-  
-  virtual void DrawLegend();
-  
-public:
-
-  MHCalibrationPixel(const char *name=NULL, const char *title=NULL);
-  ~MHCalibrationPixel();
-
-  void ChangeHistId(Int_t i);
-  
-  Bool_t SetupFill(const MParList *pList);
-  Bool_t Fill(const MParContainer *, const Stat_t w=1) { return kTRUE; }
-
-  void   SetPointInGraph(Float_t qhi, Float_t qlo);
-  void   FitHiGainvsLoGain();
-
-  Bool_t FillChargeLoGain(Float_t q)             { return (fHChargeLoGain->Fill(q) > -1); }
-  Bool_t FillTimeLoGain(Int_t t)                 { return (fHTimeLoGain->Fill(t)   > -1); }
-  Bool_t FillChargevsNLoGain(Float_t q, Int_t n) { return (fHChargevsNLoGain->Fill(n,q) > -1); }
-
-  Bool_t FillChargeHiGain(Float_t q)             { return (fHChargeHiGain->Fill(q)      > -1); }
-  Bool_t FillTimeHiGain(Int_t t)                 { return (fHTimeHiGain->Fill(t)        > -1); }
-  Bool_t FillChargevsNHiGain(Float_t q, Int_t n) { return (fHChargevsNHiGain->Fill(n,q) > -1); }
-
-  void   SetUseLoGain()                          { fUseLoGain = kTRUE; }
-  Bool_t UseLoGain();
-
-  const TH1F *GetHCharge()                 { return fHChargeHiGain;    }
-  const TH1F *GetHCharge() const           { return fHChargeHiGain;    }
-
-  const Double_t GetChargeMean()     const { return fChargeMean;    }
-  const Double_t GetChargeMeanErr()  const { return fChargeMeanErr; }
-  const Double_t GetChargeSigma()    const { return fChargeSigma;   }
-  const Double_t GetChargeSigmaErr() const { return fChargeSigmaErr; }
-  const Double_t GetArea()           const { return fChargeGausFit->GetParameter(0); }
-  const Double_t GetAreaErr()        const { return fChargeGausFit->GetParError(0);  }
-
-  const Double_t GetChargeChiSquare() const { return fChargeChisquare; }
-  const Double_t GetChargeProb()      const { return fChargeProb;      }  
-  const Int_t    GetChargeNdf()       const { return fChargeNdf;       }   
-
-  const Double_t GetTimeMean()        const { return fTimeMean;  }
-  const Double_t GetTimeSigma()       const { return fTimeSigma; }
-
-  const Stat_t   GetTimeLowerFitRange()  const { return fTimeLowerFitRange;  }
-  const Stat_t   GetTimeUpperFitRange()  const { return fTimeUpperFitRange;  }
-  
-  const Double_t GetTimeChiSquare()   const { return fTimeChisquare; }
-  const Double_t GetTimeProb()        const { return fTimeProb;      }
-  const Int_t    GetTimeNdf()         const { return fTimeNdf;       }   
-  
-  const TH1I *GetHTime()                    { return fHTimeHiGain; }
-  const TH1I *GetHTime()              const { return fHTimeHiGain; }
-  
-  const TH1I *GetHChargevsN()               { return fHChargevsNHiGain; }
-  const TH1I *GetHChargevsN()         const { return fHChargevsNHiGain; }
-
-  Double_t GetOffset()  { return fOffset; }
-  Double_t GetSlope()   { return fSlope;  }
-  
-  Bool_t FitChargeHiGain(Option_t *option="RQ0");  
-  Bool_t FitTimeHiGain(Axis_t rmin=0, Axis_t rmax=0, Option_t *option="RQ0");    
-
-  Bool_t FitChargeLoGain(Option_t *option="RQ0");  
-  Bool_t FitTimeLoGain(Axis_t rmin=0, Axis_t rmax=0, Option_t *option="RQ0");    
-
-  virtual void Draw(Option_t *option="");
-  virtual void CutAllEdges();
-  virtual void Reset();
-
-  void SetLowerFitRange(Axis_t min)                {  fLowerFitRange = min; }
-
-  void PrintChargeFitResult();
-  void PrintTimeFitResult();  
-
-  Bool_t IsFitOK()                           {  return fFitOK;          }
-  
-  ClassDef(MHCalibrationPixel, 1) 
-};
-
-#endif
Index: trunk/MagicSoft/Mars/mhist/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mhist/Makefile	(revision 2718)
+++ trunk/MagicSoft/Mars/mhist/Makefile	(revision 2734)
@@ -66,8 +66,4 @@
 	   MHCT1Supercuts.cc \
            MHCamera.cc \
-           MHCalibrationPixel.cc  \
-           MHCalibrationBlindPixel.cc \
-           MHCalibrationPINDiode.cc \
-           MHCalibrationPINDiode.cc \
            MHSupercuts.cc \
            MHSimulatedAnnealing.cc 
