Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3285)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3286)
@@ -29,4 +29,7 @@
      - test validity of every calibration method before retrieving
        conversion factors
+
+   * mcalib/MHGausEvents.[h,cc]
+     - add possibility to set fit ranges in call to FitGaus
 
 
Index: trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc	(revision 3285)
+++ trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc	(revision 3286)
@@ -396,5 +396,5 @@
 // fNDFLimit and whether results are NaNs.
 //
-Bool_t MHGausEvents::FitGaus(Option_t *option)
+Bool_t MHGausEvents::FitGaus(Option_t *option, const Double_t xmin, const Double_t xmax)
 {
 
@@ -414,6 +414,6 @@
   // Get the fitting ranges
   //
-  Axis_t rmin = fHGausHist.GetBinCenter(fHGausHist.GetXaxis()->GetFirst());
-  Axis_t rmax = fHGausHist.GetBinCenter(fHGausHist.GetXaxis()->GetLast()); 
+  Axis_t rmin = (xmin==0.) && (xmax==0.) ? fHGausHist.GetBinCenter(fHGausHist.GetXaxis()->GetFirst()) : xmin;
+  Axis_t rmax = (xmin==0.) && (xmax==0.) ? fHGausHist.GetBinCenter(fHGausHist.GetXaxis()->GetLast())  : xmax;
 
   //
Index: trunk/MagicSoft/Mars/mcalib/MHGausEvents.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHGausEvents.h	(revision 3285)
+++ trunk/MagicSoft/Mars/mcalib/MHGausEvents.h	(revision 3286)
@@ -47,5 +47,5 @@
   Byte_t fFlags;                       //   Byte to hold the bits fit result bits
   
-  UInt_t fCurrentSize;                 //   Current size of the array fEvents
+  Int_t fCurrentSize;                  //   Current size of the array fEvents
   
 protected:
@@ -142,5 +142,5 @@
   
   // Fits
-  Bool_t FitGaus(Option_t *option="RQ0");     // Fit the histogram HGausHist with a Gaussian
+  Bool_t FitGaus(Option_t *option="RQ0", const Double_t xmin=0., const Double_t xmax=0.);     // Fit the histogram HGausHist with a Gaussian
 
   // Draws
