Index: trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc	(revision 8020)
+++ trunk/MagicSoft/Mars/mhcalib/MHGausEvents.cc	(revision 8023)
@@ -130,7 +130,6 @@
       fPowerSpectrum(NULL),
       fFExpFit(NULL),
-      fFirst(0.), 
       fGraphEvents(NULL), fGraphPowerSpectrum(NULL),
-      fLast(100.), fNbins(100), fFGausFit(NULL)
+      fFirst(0.), fLast(100.), fNbins(100), fFGausFit(NULL)
 { 
 
@@ -272,27 +271,4 @@
     }
 }
-
-
-
-// -----------------------------------------------------------------------------
-// 
-// Create the x-axis for the event graph
-//
-Float_t *MHGausEvents::CreateEventXaxis(Int_t n)
-{
-
-  Float_t *xaxis = new Float_t[n];  
-
-  if (fEventFrequency)
-    for (Int_t i=0;i<n;i++)
-      xaxis[i] = (Float_t)i/fEventFrequency;
-  else
-    for (Int_t i=0;i<n;i++)
-      xaxis[i] = (Float_t)i;
-  
-  return xaxis;
-                 
-}
-
 
 // -------------------------------------------------------------------
@@ -398,11 +374,16 @@
 
   const Int_t n = fEvents.GetSize();
-
   if (n==0)
     return;
 
-  fGraphEvents = new TGraph(n,CreateEventXaxis(n),fEvents.GetArray());  
+  const Float_t freq = fEventFrequency ? fEventFrequency : 1;
+
+  MArrayF xaxis(n);
+  for (Int_t i=0; i<n; i++)
+      xaxis[i] = (Float_t)i/freq;
+
+  fGraphEvents = new TGraph(n, xaxis.GetArray(), fEvents.GetArray());
   fGraphEvents->SetTitle("Evolution of Events with time");
-  fGraphEvents->GetXaxis()->SetTitle((fEventFrequency) ? "Time [s]" : "Event Nr.");
+  fGraphEvents->GetXaxis()->SetTitle(fEventFrequency ? "Time [s]" : "Event Nr.");
   fGraphEvents->GetYaxis()->SetTitle(fHGausHist.GetXaxis()->GetTitle());
   fGraphEvents->GetYaxis()->CenterTitle();
@@ -421,7 +402,13 @@
   const Int_t n = fPowerSpectrum->GetSize();
 
-  fGraphPowerSpectrum = new TGraph(n,CreatePSDXaxis(n),fPowerSpectrum->GetArray());  
+  const Float_t freq = fEventFrequency ? fEventFrequency : 1;
+
+  MArrayF xaxis(n);
+  for (Int_t i=0; i<n; i++)
+      xaxis[i] = 0.5*(Float_t)i*freq/n;
+
+  fGraphPowerSpectrum = new TGraph(n, xaxis.GetArray(), fPowerSpectrum->GetArray());
   fGraphPowerSpectrum->SetTitle("Power Spectrum Density");
-  fGraphPowerSpectrum->GetXaxis()->SetTitle((fEventFrequency) ? "Frequency [Hz]" : "Frequency");
+  fGraphPowerSpectrum->GetXaxis()->SetTitle(fEventFrequency ? "Frequency [Hz]" : "Frequency");
   fGraphPowerSpectrum->GetYaxis()->SetTitle("P(f)");
   fGraphPowerSpectrum->GetYaxis()->CenterTitle();
@@ -429,25 +416,4 @@
 }
 
-
-// -----------------------------------------------------------------------------
-// 
-// Create the x-axis for the event graph
-//
-Float_t *MHGausEvents::CreatePSDXaxis(Int_t n)
-{
-
-  Float_t *xaxis = new Float_t[n];
-
-  if (fEventFrequency)
-    for (Int_t i=0;i<n;i++)
-      xaxis[i] = 0.5*(Float_t)i*fEventFrequency/n;
-  else
-    for (Int_t i=0;i<n;i++)
-    xaxis[i] = 0.5*(Float_t)i/n;
-  
-  return xaxis;
-                 
-}
-  
 // -----------------------------------------------------------------------------
 // 
Index: trunk/MagicSoft/Mars/mhcalib/MHGausEvents.h
===================================================================
--- trunk/MagicSoft/Mars/mhcalib/MHGausEvents.h	(revision 8020)
+++ trunk/MagicSoft/Mars/mhcalib/MHGausEvents.h	(revision 8023)
@@ -28,11 +28,8 @@
 private:
 
-  const static Int_t    fgNDFLimit;             //! Default for fNDFLimit             (now set to: 2)
-  const static Float_t  fgProbLimit;            //! Default for fProbLimit            (now set to: 0.001)
-  const static Int_t    fgPowerProbabilityBins; //! Default for fPowerProbabilityBins (now set to: 20)
+  const static Int_t   fgNDFLimit;             //! Default for fNDFLimit             (now set to: 2)
+  const static Float_t fgProbLimit;            //! Default for fProbLimit            (now set to: 0.001)
+  const static Int_t   fgPowerProbabilityBins; //! Default for fPowerProbabilityBins (now set to: 20)
 
-  Float_t *CreateEventXaxis(Int_t n);           // Create an x-axis for the Event TGraphs
-  Float_t *CreatePSDXaxis  (Int_t n);           // Create an x-axis for the PSD TGraphs
-  
 private:
 
@@ -53,7 +50,7 @@
   MArrayF  fEvents;                    // Array which holds the entries of GausHist
   TF1     *fFExpFit;                   // Exponential fit for FHPowerProbability
-  Axis_t   fFirst;                     // Lower histogram edge  for fHGausHist (used by InitBins()) 
   TGraph  *fGraphEvents;               //! TGraph to display the event array 
   TGraph  *fGraphPowerSpectrum;        //! TGraph to display the power spectrum array 
+  Axis_t   fFirst;                     // Lower histogram edge  for fHGausHist (used by InitBins()) 
   Axis_t   fLast;                      // Upper histogram edge  for fHGausHist (used by InitBins()) 
   Int_t    fNbins;                     // Number histogram bins for fHGausHist (used by InitBins())
