Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 4222)
+++ trunk/MagicSoft/Mars/Changelog	(revision 4223)
@@ -32,4 +32,11 @@
    * mcalib/MHCalibrationChargeBlindPix.[h,cc]
      - put some protection against zero-division in fitFuncMichele
+
+   * mcalib/MCalibrationQEPix.[h,cc]
+     - set a global variable CollEfficiency and LightguidesEfficiency. 
+       The more precise result for the QE calculated with 
+       the F-Factor method differs now by about 5% (while the statistical
+       error remains around 20%). 
+
 
  2004/05/27: Thomas Bretz
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h	(revision 4222)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h	(revision 4223)
@@ -61,5 +61,5 @@
   void  SetNumPhotonsPINDiodeMethodErr  ( const Float_t f )  { fNumPhotonsPINDiodeMethodErr   = f; }   
   
-  ClassDef(MCalibrationChargeCam, 2) // Container Charge Calibration Results Camera
+  ClassDef(MCalibrationChargeCam, 3) // Container Charge Calibration Results Camera
 };
 
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.cc	(revision 4222)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.cc	(revision 4223)
@@ -111,5 +111,5 @@
 // "Concerning the light guides effiency estimation... Daniel Ferenc 
 //  is preparing some work (simulations) to estimate it. Yet so far, he has 
-//  been busy with other stuff, and this work is still UNfinished.
+//  been busy with other stuff, and this work is still Unfinished.
 //
 //  The estimation I did comes from:
@@ -175,6 +175,10 @@
 const Float_t MCalibrationQEPix::gkDefaultQEUVErr      = 0.07 ;
 const Float_t MCalibrationQEPix::gkDefaultQECT1Err     = 0.07 ;
-const Float_t MCalibrationQEPix::gkDefaultAverageQE    = 0.18;     
-const Float_t MCalibrationQEPix::gkDefaultAverageQEErr = 0.02;  
+const Float_t MCalibrationQEPix::gkDefaultAverageQE    = 0.18 ;     
+const Float_t MCalibrationQEPix::gkDefaultAverageQEErr = 0.02 ;  
+const Float_t MCalibrationQEPix::gkPMTCollectionEff    = 0.90 ;
+const Float_t MCalibrationQEPix::gkLightGuidesEff      = 0.94 ;
+const Float_t MCalibrationQEPix::gkPMTCollectionEffErr = 0.01 ;
+const Float_t MCalibrationQEPix::gkLightGuidesEffErr   = 0.03 ;
 // --------------------------------------------------------------------------
 //
@@ -223,4 +227,5 @@
     const Float_t newavqevar = ( GetQEBlindPixelRelVar(col) + GetDefaultQERelVar(col) ) * newavqe * newavqe;
     const Float_t weight     = 1./newavqevar;
+
     wav  += newavqe * weight;
     sumw += weight;
@@ -266,4 +271,5 @@
     const Float_t newavqevar = ( GetQEFFactorRelVar(col) + GetDefaultQERelVar(col) ) * newavqe * newavqe;
     const Float_t weight     = 1./newavqevar;
+
     wav  += newavqe *weight;
     sumw += weight;
@@ -449,17 +455,17 @@
     {
     case MCalibrationCam::kGREEN:
-      return gkDefaultQEGreen;
+      return gkDefaultQEGreen * gkPMTCollectionEff * gkLightGuidesEff;
       break;
     case MCalibrationCam::kBLUE:
-      return gkDefaultQEBlue;
+      return gkDefaultQEBlue * gkPMTCollectionEff * gkLightGuidesEff;
       break;
     case MCalibrationCam::kUV:
-      return gkDefaultQEUV;
+      return gkDefaultQEUV * gkPMTCollectionEff * gkLightGuidesEff;
       break;
     case MCalibrationCam::kCT1:
-      return gkDefaultQECT1;
+      return gkDefaultQECT1 * gkPMTCollectionEff * gkLightGuidesEff;
       break;
     default:
-      return gkDefaultQECT1;
+      return gkDefaultQECT1 * gkPMTCollectionEff * gkLightGuidesEff;
       break;
     }
@@ -473,20 +479,27 @@
 Float_t MCalibrationQEPix::GetDefaultQERelVar( const MCalibrationCam::PulserColor_t col )  const
 {
+
+  Float_t collpluslgrelvar = gkPMTCollectionEffErr * gkPMTCollectionEffErr 
+                           / gkPMTCollectionEff / gkPMTCollectionEff;
+  
+  collpluslgrelvar        += gkLightGuidesEffErr   * gkLightGuidesEffErr
+                           / gkLightGuidesEff   / gkLightGuidesEffErr;
+
   switch (col)
     {
     case MCalibrationCam::kGREEN:
-      return gkDefaultQEGreenErr * gkDefaultQEGreenErr / (gkDefaultQEGreen * gkDefaultQEGreen );
+      return collpluslgrelvar + gkDefaultQEGreenErr * gkDefaultQEGreenErr / (gkDefaultQEGreen * gkDefaultQEGreen );
       break;
     case MCalibrationCam::kBLUE:
-      return gkDefaultQEBlueErr  * gkDefaultQEBlueErr  / (gkDefaultQEBlue  * gkDefaultQEBlue  );
+      return collpluslgrelvar + gkDefaultQEBlueErr  * gkDefaultQEBlueErr  / (gkDefaultQEBlue  * gkDefaultQEBlue  );
       break;
     case MCalibrationCam::kUV:
-      return gkDefaultQEUVErr    * gkDefaultQEUVErr    / (gkDefaultQEUV    * gkDefaultQEUV    );
+      return collpluslgrelvar + gkDefaultQEUVErr    * gkDefaultQEUVErr    / (gkDefaultQEUV    * gkDefaultQEUV    );
       break;
     case MCalibrationCam::kCT1:
-      return gkDefaultQECT1Err   * gkDefaultQECT1Err   / (gkDefaultQECT1   * gkDefaultQECT1   );
+      return collpluslgrelvar + gkDefaultQECT1Err   * gkDefaultQECT1Err   / (gkDefaultQECT1   * gkDefaultQECT1   );
       break;
     default: 
-      return gkDefaultQECT1Err   * gkDefaultQECT1Err   / (gkDefaultQECT1   * gkDefaultQECT1   );
+      return collpluslgrelvar + gkDefaultQECT1Err   * gkDefaultQECT1Err   / (gkDefaultQECT1   * gkDefaultQECT1   );
       break;
     }
@@ -1154,5 +1167,5 @@
   fAvNormFFactor     = weightedav / sumweights;
   fAvNormFFactorVar  = 1./ sumweights ;
-
+  
   SetAverageQEFFactorAvailable();
 
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.h	(revision 4222)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.h	(revision 4223)
@@ -30,4 +30,8 @@
   static const Float_t gkDefaultQEUVErr;      //! Uncertainty Def. QE  at 370 nm (now set to: 0.07)
   static const Float_t gkDefaultQECT1Err;     //! Uncertainty Def. QE  at 370 nm (now set to: 0.07)
+  static const Float_t gkPMTCollectionEff;    //! Default Collection efficiency of the PMTs
+  static const Float_t gkLightGuidesEff;      //! Default overall Light guides efficiency 
+  static const Float_t gkPMTCollectionEffErr; //! Uncertainty Def. Collection efficiency of the PMTs (0.01)
+  static const Float_t gkLightGuidesEffErr;   //! Uncertainty Def.overall Light guides efficiency (0.03)
   
   TArrayF fQEBlindPixel;                     // Calibrated QEs    (Blind Pixel Method)
@@ -156,5 +160,5 @@
   Bool_t  UpdatePINDiodeMethod  ();
 
-  ClassDef(MCalibrationQEPix, 1)     // Container Quantum Efficieny Calibration Results Pixel
+  ClassDef(MCalibrationQEPix, 2)     // Container Quantum Efficieny Calibration Results Pixel
 };
 
