Index: trunk/MagicSoft/Mars/mcalib/MCalibrationPix.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationPix.cc	(revision 3676)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationPix.cc	(revision 3677)
@@ -22,7 +22,7 @@
 \* ======================================================================== */
 /////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-// MCalibrationPix                                                         //
-//                                                                         //
+//                                                     
+// MCalibrationPix                                     
+//                                                     
 // Base Storage container for a calibration pixel. Holds mean and sigmas,  
 // their errors, the fit probability and the number of pickup events for 
@@ -38,4 +38,5 @@
 //
 // The three flags: kValid, kExcluded and kHiGainSaturation may be set.
+// The colors: kGREEN, kBLUE, kUV and kCT1 may be set. 
 //
 /////////////////////////////////////////////////////////////////////////////
@@ -53,5 +54,5 @@
 // - fPixId to -1
 // - fFlags to 0
-// 
+//
 // Calls:
 // - Clear()
@@ -152,4 +153,19 @@
 // --------------------------------------------------------------------------
 //
+// Get the Square of either High Gain or Low Gain Mean 
+// depending on IsHighGainSaturation()
+//
+Float_t MCalibrationPix::GetMeanSquare()  const
+{
+
+  if (IsHiGainSaturation())
+    return fLoGainMean == -1. ? -1. : fLoGainMean * fLoGainMean;
+  else
+    return fHiGainMean == -1. ? -1. : fHiGainMean * fHiGainMean;
+}
+
+
+// --------------------------------------------------------------------------
+//
 // Get the Relative Variance of either High Gain or Low Gain Sigma 
 // depending on IsHighGainSaturation()
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationPix.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationPix.h	(revision 3676)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationPix.h	(revision 3677)
@@ -10,6 +10,5 @@
 protected:
 
-  Int_t   fPixId;             // the pixel Id
-
+  Int_t   fPixId;             // Software PixId (needed to get Id in calls to Next())
   UInt_t  fFlags;             // Flag for the set bits
   Float_t fHiGainMean;        // Mean from fit to high gain values
@@ -28,6 +27,6 @@
   Float_t fLoGainProb;        // Probability of fit to low gain values
 
-  enum  { kHiGainSaturation, kExcluded, kValid };
-  
+  enum { kHiGainSaturation, kExcluded, kValid };   // Possible bits to be sets
+
 public:
 
@@ -65,5 +64,5 @@
   void SetHiGainSaturation( const Bool_t  b = kTRUE );
   void SetValid           ( const Bool_t  b = kTRUE );
-
+  
   // Getters
   Float_t GetHiGainMean       () const { return fHiGainMean   ;     }
@@ -87,4 +86,5 @@
   Float_t GetMeanErr    () const { return IsHiGainSaturation() ? GetLoGainMeanErr()     : GetHiGainMeanErr()  ;   }
   Float_t GetMeanRelVar () const;
+  Float_t GetMeanSquare () const;  
   Float_t GetProb       () const { return IsHiGainSaturation() ? GetLoGainProb()        : GetHiGainProb()     ;   }
   Float_t GetSigma      () const { return IsHiGainSaturation() ? GetLoGainSigma()       : GetHiGainSigma()    ;   }
@@ -94,5 +94,5 @@
   Float_t GetNumBlackout() const { return IsHiGainSaturation() ? GetLoGainNumBlackout() : GetHiGainNumBlackout(); }
   Int_t   GetPixId      () const { return fPixId ;  }
-
+  
   Bool_t  IsHiGainSaturation() const;
   Bool_t  IsExcluded()         const;
Index: trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc	(revision 3676)
+++ trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc	(revision 3677)
@@ -133,7 +133,7 @@
       fPowerSpectrum(NULL),
       fGraphEvents(NULL), fGraphPowerSpectrum(NULL),
-      fNbins(100), fFirst(0.), fLast(100.), fPixId(-1),
-      fHGausHist(), fEvents(0),
-      fFGausFit(NULL), fFExpFit(NULL)
+      fEvents(0), fFGausFit(NULL), fFExpFit(NULL),
+      fFirst(0.), fHGausHist(), fLast(100.), 
+      fNbins(100), fPixId(-1)
 { 
 
