Index: trunk/MagicSoft/Mars/mcalib/MCalibrationPix.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationPix.h	(revision 3115)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationPix.h	(revision 3128)
@@ -12,4 +12,7 @@
 private:
 
+  static const Float_t gkAverageQE;           // The average quantum efficieny agreed on for the first analysis
+  static const Float_t gkAverageQEErr;        // The error of average quantum efficieny 
+  
   static const Float_t gkElectronicPedRms;    // The pure electronic component of the RMS
   static const Float_t gkErrElectronicPedRms; // The error of the pure electronic component of the RMS
@@ -22,9 +25,11 @@
   static const Float_t gkTimeErrLimit;        // The limit (in units of FADC slices) for acceptance of the fitted time sigma
   static const Float_t gkConvFFactorRelErrorLimit; // The limit (in units of [1]) for acceptance of the rel. error of the conversion factor with the FFactor method
-  
-  
+
   Int_t   fPixId;                     // the pixel Id
 
   UInt_t  fFlags;               // Flag for the set Bits
+ 
+  Float_t fAverageQE;
+  Float_t fAverageQEErr;  
   
   Float_t fCharge;              // The mean reduced charge after the fit
@@ -101,74 +106,13 @@
   MHCalibrationPixel *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 GetRSigmaCharge()        const { return fRSigmaCharge;    }
-  Float_t GetErrRSigmaCharge()     const { return fErrRSigmaCharge; }  
-
-
-  Float_t GetAbsTimeMean()         const { return fAbsTimeMean;    }
-  Float_t GetAbsTimeMeanErr()      const { return fAbsTimeMeanErr; }
-  Float_t GetAbsTimeRms()          const { return fAbsTimeRms;     }
-  
-  // Conversion Factors
-  Float_t GetConversionHiLo()                 const  { return fConversionHiLo;        }
-  Float_t GetConversionHiLoError()            const  { return fConversionHiLoError;   }
-
-  Float_t GetMeanConversionBlindPixelMethod()  const { return fMeanConversionBlindPixelMethod  ; }
-  Float_t GetErrorConversionBlindPixelMethod() const { return fErrorConversionBlindPixelMethod ; }
-  Float_t GetSigmaConversionBlindPixelMethod() const { return fSigmaConversionBlindPixelMethod ; }
-
-  Float_t GetMeanConversionFFactorMethod();
-  Float_t GetErrorConversionFFactorMethod();
-  Float_t GetSigmaConversionFFactorMethod();
-
-  Float_t GetMeanConversionPINDiodeMethod()    const { return fMeanConversionPINDiodeMethod ;  }
-  Float_t GetErrorConversionPINDiodeMethod()   const { return fErrorConversionPINDiodeMethod ; }
-  Float_t GetSigmaConversionPINDiodeMethod()   const { return fSigmaConversionPINDiodeMethod ; }
-
-  Float_t GetMeanConversionCombinedMethod()    const { return fMeanConversionCombinedMethod ;  }
-  Float_t GetErrorConversionCombinedMethod()   const { return fErrorConversionCombinedMethod ; }
-  Float_t GetSigmaConversionCombinedMethod()   const { return fSigmaConversionCombinedMethod ; }
-
-  Float_t GetPheFFactorMethod();    
-  Float_t GetPheFFactorMethodError();
-
-  Int_t   GetPixId()                           const  { return fPixId;   }
-
-  Float_t GetPed()                             const { return fPed;    }
-  Float_t GetPedRms()                          const { return fPedRms; }
-
-  Float_t GetTotalFFactorFFactorMethod();
-  Float_t GetTotalFFactorErrorFFactorMethod();
-  
-  Float_t GetTotalFFactorBlindPixelMethod();
-  Float_t GetTotalFFactorErrorBlindPixelMethod();
-  
-  Float_t GetTotalFFactorPINDiodeMethod();
-  Float_t GetTotalFFactorErrorPINDiodeMethod();
-
-  Float_t GetTotalFFactorCombinedMethod();
-  Float_t GetTotalFFactorErrorCombinedMethod();
-  
-  Bool_t IsExcluded()              const;
-  Bool_t IsExcludeQualityCheck()   const;
-  Bool_t IsHiGainSaturation()      const;
-  Bool_t IsChargeValid()        const;
-  Bool_t IsFitted()                const;
-  Bool_t IsOscillating();
-  Bool_t IsBlindPixelMethodValid() const;
-  Bool_t IsPINDiodeMethodValid()   const;
-  Bool_t IsFFactorMethodValid();
-  Bool_t IsCombinedMethodValid();
-
   // Setter
-  void SetPedestal(Float_t ped, Float_t pedrms, Float_t higainsamp, Float_t logainsamp);
-  void SetConversionHiLo(Float_t c)      { fConversionHiLo      = c;    }
-  void SetConversionHiLoError(Float_t e)  { fConversionHiLoError = e;    }
-
+  void SetPedestal(const Float_t ped, const Float_t pedrms,
+                   const Float_t higainsamp, const Float_t logainsamp);
+  void SetConversionHiLo(const Float_t c)      { fConversionHiLo      = c;    }
+  void SetConversionHiLoError(const Float_t e)  { fConversionHiLoError = e;    }
+  void SetAverageQE(const Float_t qe=gkAverageQE, const Float_t err=gkAverageQEErr)
+    { fAverageQE    = qe;
+      fAverageQEErr = err;  }
+  
   // Setters for MC
   void SetConversionFFactorMethod(Float_t c, Float_t err, Float_t sig);
@@ -190,4 +134,69 @@
   void SetAbsTimeBordersLoGain(Byte_t f, Byte_t l);
   
+  // 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 GetRSigmaCharge()        const { return fRSigmaCharge;    }
+  Float_t GetErrRSigmaCharge()     const { return fErrRSigmaCharge; }  
+
+
+  Float_t GetAbsTimeMean()         const { return fAbsTimeMean;    }
+  Float_t GetAbsTimeMeanErr()      const { return fAbsTimeMeanErr; }
+  Float_t GetAbsTimeRms()          const { return fAbsTimeRms;     }
+  
+  // Conversion Factors
+  Float_t GetConversionHiLo()                 const  { return fConversionHiLo;        }
+  Float_t GetConversionHiLoError()            const  { return fConversionHiLoError;   }
+
+  Float_t GetMeanConversionBlindPixelMethod()  const { return fMeanConversionBlindPixelMethod  ; }
+  Float_t GetErrorConversionBlindPixelMethod() const { return fErrorConversionBlindPixelMethod ; }
+  Float_t GetSigmaConversionBlindPixelMethod() const { return fSigmaConversionBlindPixelMethod ; }
+
+  Float_t GetMeanConversionFFactorMethod();
+  Float_t GetErrorConversionFFactorMethod();
+  Float_t GetSigmaConversionFFactorMethod();
+
+  Float_t GetMeanConversionPINDiodeMethod()    const { return fMeanConversionPINDiodeMethod ;  }
+  Float_t GetErrorConversionPINDiodeMethod()   const { return fErrorConversionPINDiodeMethod ; }
+  Float_t GetSigmaConversionPINDiodeMethod()   const { return fSigmaConversionPINDiodeMethod ; }
+
+  Float_t GetMeanConversionCombinedMethod()    const { return fMeanConversionCombinedMethod ;  }
+  Float_t GetErrorConversionCombinedMethod()   const { return fErrorConversionCombinedMethod ; }
+  Float_t GetSigmaConversionCombinedMethod()   const { return fSigmaConversionCombinedMethod ; }
+
+  Float_t GetPheFFactorMethod();    
+  Float_t GetPheFFactorMethodError();
+
+  Int_t   GetPixId()                           const  { return fPixId;   }
+
+  Float_t GetPed()                             const { return fPed;    }
+  Float_t GetPedRms()                          const { return fPedRms; }
+
+  Float_t GetTotalFFactorFFactorMethod();
+  Float_t GetTotalFFactorErrorFFactorMethod();
+  
+  Float_t GetTotalFFactorBlindPixelMethod();
+  Float_t GetTotalFFactorErrorBlindPixelMethod();
+  
+  Float_t GetTotalFFactorPINDiodeMethod();
+  Float_t GetTotalFFactorErrorPINDiodeMethod();
+
+  Float_t GetTotalFFactorCombinedMethod();
+  Float_t GetTotalFFactorErrorCombinedMethod();
+  
+  Bool_t IsExcluded()              const;
+  Bool_t IsExcludeQualityCheck()   const;
+  Bool_t IsHiGainSaturation()      const;
+  Bool_t IsChargeValid()        const;
+  Bool_t IsFitted()                const;
+  Bool_t IsOscillating();
+  Bool_t IsBlindPixelMethodValid() const;
+  Bool_t IsPINDiodeMethodValid()   const;
+  Bool_t IsFFactorMethodValid();
+  Bool_t IsCombinedMethodValid();
+
   // Fill histos
   Bool_t FillChargeHiGain(Float_t q)         const { return fHist->FillChargeHiGain(q); }
