Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3076)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3077)
@@ -19,4 +19,12 @@
     - take all pixel areas out of MGeomPix::GetA(), remove all previous
       areas 
+    - calculate photon fluxes from blind pixel and PIN diode, use 
+      area only to fill the conversion factors in MCalibrationPix 
+
+
+  * mcalib/MJCalibration.cc
+    - display of number of photons for Blindpixel and PIN Diode Method 
+      changed to display of photon flux which is the actually 
+      calculated quantity
 
 
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc	(revision 3076)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc	(revision 3077)
@@ -61,4 +61,6 @@
 const Int_t   MCalibrationCam::gkBlindPixelId   =  559;
 const Int_t   MCalibrationCam::gkPINDiodeId     = 9999;
+const Float_t MCalibrationCam::gkBlindPixelArea = 100;
+const Float_t MCalibrationCam::gkPINDiodeArea   = 100;
 
 // --------------------------------------------------------------------------
@@ -311,6 +313,4 @@
                 << pix->GetPedRms() << " Reduced Charge: " << pix->GetCharge() << " +- " 
                 << pix->GetSigmaCharge() << " Reduced Sigma: " << pix->GetRSigmaCharge() << endl;
-          Float_t area = (*fGeomCam)[pix->GetPixId()].GetA();
-          *fLog << "Area: " << area << endl;
           pix->DrawClone();
           id++;
@@ -406,5 +406,5 @@
     return kFALSE;
 
-  Float_t area = cam[idx].GetA()/100.;
+  Float_t area = cam[idx].GetA();
 
  if (area == 0)
@@ -695,8 +695,7 @@
   // Start calculation of number of photons 
   //
-  // The blind pixel has exactly one cm^2 area (with negligible error), 
-  // thus we omit division by 1.
+  // The blind pixel has exactly 100 mm^2 area (with negligible error), 
   //
-  fMeanFluxInsidePlexiglass    = mean;
+  fMeanFluxInsidePlexiglass    = mean*gkBlindPixelArea;
 
   // Start calculation of number of photons relative Variance (!!)
@@ -741,5 +740,5 @@
 
   *fLog << inf << endl;
-  *fLog << inf << " Photon flux [ph/cm^2] inside Plexiglass: " 
+  *fLog << inf << " Photon flux [ph/mm^2] inside Plexiglass: " 
         << fMeanFluxInsidePlexiglass << endl;
 
@@ -764,5 +763,5 @@
   fMeanFluxErrInsidePlexiglass *= fMeanFluxInsidePlexiglass;
 
-  *fLog << inf << " Error on photon flux [ph/cm^2] inside Plexiglass: " 
+  *fLog << inf << " Error on photon flux [ph/mm^2] inside Plexiglass: " 
         << fMeanFluxErrInsidePlexiglass << endl;
   *fLog << inf << endl;
@@ -779,5 +778,5 @@
 
           const Float_t charge    = pix->GetCharge();
-          const Float_t area      = (*fGeomCam)[idx].GetA()/100.;
+          const Float_t area      = (*fGeomCam)[idx].GetA();
           const Float_t chargeerr = pix->GetErrCharge();          
 
@@ -815,6 +814,8 @@
   const Float_t merr = fPINDiode->GetErrCharge();
 
-  // Start calculation of number of photons
-  fMeanFluxOutsidePlexiglass = mean * gkCalibrationFluxCameravsPINDiode;
+  // Start calculation of number of photons per mm^2 on the camera
+  fMeanFluxOutsidePlexiglass  = mean * gkPINDiodeArea;
+  // Correct for the distance between camera and PIN Diode and for different areas.
+  fMeanFluxOutsidePlexiglass *= gkCalibrationFluxCameravsPINDiode;
 
   // Start calculation of number of photons relative Variance (!!)
@@ -850,5 +851,5 @@
 
   *fLog << inf << endl;
-  *fLog << inf << " Mean Photon flux [ph/cm^2] outside Plexiglass: " 
+  *fLog << inf << " Mean Photon flux [ph/mm^2] outside Plexiglass: " 
         << fMeanFluxOutsidePlexiglass << endl;
 
@@ -873,5 +874,5 @@
   fMeanFluxErrOutsidePlexiglass *= fMeanFluxOutsidePlexiglass;
 
-  *fLog << inf << " Error on Photon flux [ph/cm^2] outside Plexiglass: " 
+  *fLog << inf << " Error on Photon flux [ph/mm^2] outside Plexiglass: " 
         << fMeanFluxErrOutsidePlexiglass << endl;
   *fLog << inf << endl;
@@ -888,5 +889,5 @@
 
           const Float_t charge    = pix->GetCharge();
-          const Float_t area      = (*fGeomCam)[idx].GetA()/100.;
+          const Float_t area      = (*fGeomCam)[idx].GetA();
           const Float_t chargeerr = pix->GetErrCharge();          
 
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h	(revision 3076)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h	(revision 3077)
@@ -23,4 +23,6 @@
   static const Int_t   gkBlindPixelId;
   static const Int_t   gkPINDiodeId;
+  static const Float_t gkBlindPixelArea;       // The Blind Pixel area in mm^2
+  static const Float_t gkPINDiodeArea;         // The Blind Pixel area in mm^2  
 
   Int_t fNumPixels;
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationConfig.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationConfig.h	(revision 3076)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationConfig.h	(revision 3077)
@@ -44,23 +44,19 @@
 // Area of Inner Pixel w.r.t. PIN Diode (which is 1 cm²)
 //
-// Hexagone of diagonal axis b = 3.5 cm
-//             straight axis a = 3.0 cm +- 2% 
-// Area =  sqrt(3)*a*a/2 = 7.79 sq.cm +- 4% = 7.8 +- 0.3 sq.cm
-//
 // Distance of PIN Diode to pulser D1:   1.5  +- 0.3 m
 // Distance of Inner Pixel to pulser D2: 18.0 +- 0.5 m
 //
 //
-//                A(Inner Pixel)    D1*D1
-// conversion C = -------------- * ------ = 0.054
-//                A(PIN Diode)      D2*D2
+//                 D1*D1
+// conversion C = ------ = 0.0069
+//                 D2*D2
 //
-// Delta C / C  = sqrt((Delta A(IP)/A(IP))² + 4 * ( (Delta D1/D1)² + (Delta D2/D2)² )
+// Delta C / C  = 2 * Sqrt( (Delta D1/D1)² + (Delta D2/D2)² )
 // Delta C / C  = 0.4
 // 
-// C = 0.05 +- 0.02
+// C = 0.007 +- 0.003
 //
-const Float_t gkCalibrationFluxCameravsPINDiode      = 0.05;
-const Float_t gkCalibrationFluxCameravsPINDiodeError = 0.02;
+const Float_t gkCalibrationFluxCameravsPINDiode      = 0.007;
+const Float_t gkCalibrationFluxCameravsPINDiodeError = 0.003;
 
 //
Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 3076)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 3077)
@@ -212,8 +212,8 @@
     MHCamera disp7  (geomcam, "Cal;FFactorConv",    "Conversion Factor (F-Factor Method)");
     MHCamera disp8  (geomcam, "Cal;FFactorFFactor", "Total F-Factor (F-Factor Method)");
-    MHCamera disp9  (geomcam, "Cal;BlindPixPh",     "Nr. of Photons inside plexiglass (Blind Pixel Method)");
+    MHCamera disp9  (geomcam, "Cal;BlindPixPh",     "Photon flux inside plexiglass (Blind Pixel Method)");
     MHCamera disp10 (geomcam, "Cal;BlindPixConv",   "Conversion Factor (Blind Pixel Method)");
     MHCamera disp11 (geomcam, "Cal;BlindPixFFactor","Total F-Factor (Blind Pixel Method)");
-    MHCamera disp12 (geomcam, "Cal;PINDiodePh",     "Nr. of Photons outside plexiglass (PIN Diode Method)");
+    MHCamera disp12 (geomcam, "Cal;PINDiodePh",     "Photons flux outside plexiglass (PIN Diode Method)");
     MHCamera disp13 (geomcam, "Cal;PINDiodeConv",   "Conversion Factor (PIN Diode Method)");
     MHCamera disp14 (geomcam, "Cal;PINDiodeFFactor","Total F-Factor (PIN Diode Method)");
@@ -284,9 +284,9 @@
     disp8.SetYTitle("\\sqrt{N_{PhE}}*\\sigma_{Charge}/\\mu_{Charge} [1]");
 
-    disp9.SetYTitle("Nr. Photons [1]");
+    disp9.SetYTitle("Photon flux [ph/mm^2]");
     disp10.SetYTitle("Conversion Factor [Phot/FADC Count]");
     disp11.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]");
 
-    disp12.SetYTitle("Nr. Photons [1]");
+    disp12.SetYTitle("Photon flux [ph/mm^2]");
     disp13.SetYTitle("Conversion Factor [Phot/FADC Count]");
     disp14.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]");
