Index: /trunk/MagicSoft/Mars/mhcalib/HCalibLinkDef.h
===================================================================
--- /trunk/MagicSoft/Mars/mhcalib/HCalibLinkDef.h	(revision 4938)
+++ /trunk/MagicSoft/Mars/mhcalib/HCalibLinkDef.h	(revision 4939)
@@ -14,5 +14,4 @@
 #pragma link C++ class MHCalibrationRelTimeCam+;
 #pragma link C++ class MHCalibrationTestCam+;
-#pragma link C++ class MHCalibrationTestPix+;
 #pragma link C++ class MHCalibrationTestTimeCam+;
 #pragma link C++ class MHCalibrationTestTimePix+;
Index: /trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc	(revision 4938)
+++ /trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc	(revision 4939)
@@ -168,8 +168,4 @@
 // - MHCalibrationCam::fAverageHiGainSectors
 // 
-// Sets number of bins to MHCalibrationCam::fAverageNbins for:
-// - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas
-// - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors
-//
 Bool_t MHCalibrationRelTimeCam::ReInitHists(MParList *pList)
 {
@@ -217,6 +213,10 @@
           pix.SetLast (fRelTimeLast);
 
-          pix.GetHGausHist()->SetName ("HRelTimeHiGainPix");
-          pix.GetHGausHist()->SetTitle("Rel. Times High Gain Pixel ");  
+          TH1F *h =  pix.GetHGausHist();
+          
+          h->SetName ("HRelTimeHiGainPix");
+          h->SetTitle("Rel. Times High Gain Pixel ");  
+          h->SetXTitle("Rel. Arr. Time [FADC slices]");
+          h->SetYTitle("Nr. of events");
 
           InitHists(pix,(*fBadPixels)[i],i);
@@ -237,6 +237,10 @@
           pix.SetLast (fRelTimeLast);
 
-          pix.GetHGausHist()->SetName ("HRelTimeLoGainPix");
-          pix.GetHGausHist()->SetTitle("Rel. Times Low Gain Pixel ");  
+          TH1F *h =  pix.GetHGausHist();
+          
+          h->SetName ("HRelTimeLoGainPix");
+          h->SetTitle("Rel. Times Low Gain Pixel ");  
+          h->SetXTitle("Rel. Arr. Time [FADC slices]");
+          h->SetYTitle("Nr. of events");
 
           InitHists((*this)(i),(*fBadPixels)[i],i);
@@ -261,11 +265,14 @@
         pix.SetLast (fRelTimeLast);
         
-        pix.GetHGausHist()->SetName ("HRelTimeHiGainPix");
-        pix.GetHGausHist()->SetTitle("Rel. Times average High Gain Area Idx ");  
+        TH1F *h =  pix.GetHGausHist();
+
+        h->SetName ("HRelTimeHiGainArea");
+        h->SetXTitle("Rel. Arr. Time [FADC slices]");
+        h->SetYTitle("Nr. of events");
 
         if (fGeom->InheritsFrom("MGeomCamMagic"))
           {
-            pix.GetHGausHist()->SetTitle(Form("%s%s%s","Rel. Times averaged on event-by-event basis ",
-                                               j==0 ? "Inner Pixels " : "Outer Pixels ","High Gain Runs: "));
+            h->SetTitle(Form("%s%s%s","Rel. Times averaged on event-by-event basis ",
+                             j==0 ? "Inner Pixels " : "Outer Pixels ","High Gain Runs: "));
             pix.InitBins();
             pix.SetEventFrequency(fPulserFrequency);
@@ -273,5 +280,5 @@
         else
           {
-            pix.GetHGausHist()->SetTitle("Signal averaged on event-by-event basis High Gain Area Idx ");
+            h->SetTitle("Signal averaged on event-by-event basis High Gain Area Idx ");
             InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
           }
@@ -295,11 +302,14 @@
         pix.SetLast (fRelTimeLast);
         
-        pix.GetHGausHist()->SetName ("HRelTimeLoGainPix");
-        pix.GetHGausHist()->SetTitle("Rel. Times average Low Gain Area Idx ");  
+        TH1F *h =  pix.GetHGausHist();
+
+        h->SetName ("HRelTimeLoGainArea");
+        h->SetXTitle("Rel. Arr. Time [FADC slices]");
+        h->SetYTitle("Nr. of events");
 
         if (fGeom->InheritsFrom("MGeomCamMagic"))
           {
-            pix.GetHGausHist()->SetTitle(Form("%s%s%s","Rel. Times averaged on event-by-event basis ",
-                                               j==0 ? "Inner Pixels " : "Outer Pixels ","Low Gain Runs: "));
+            h->SetTitle(Form("%s%s%s","Rel. Times averaged on event-by-event basis ",
+                             j==0 ? "Inner Pixels " : "Outer Pixels ","Low Gain Runs: "));
             pix.InitBins();
             pix.SetEventFrequency(fPulserFrequency);
@@ -307,5 +317,5 @@
         else
           {
-            pix.GetHGausHist()->SetTitle("Rel. Times averaged on event-by-event basis Low Gain Area Idx ");
+            h->SetTitle("Rel. Times averaged on event-by-event basis Low Gain Area Idx ");
             InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
           }
@@ -329,6 +339,10 @@
           pix.SetLast (fRelTimeLast);
           
-          pix.GetHGausHist()->SetName ("HRelTimeHiGainPix");
-          pix.GetHGausHist()->SetTitle("Rel. Times average High Gain Sector ");  
+          TH1F *h =  pix.GetHGausHist();
+
+          h->SetName ("HRelTimeHiGainSector");
+          h->SetTitle("Rel. Times average High Gain Sector ");  
+          h->SetXTitle("Rel. Arr. Time [FADC slices]");
+          h->SetYTitle("Nr. of events");
 
           InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
@@ -352,6 +366,10 @@
           pix.SetLast (fRelTimeLast);
           
-          pix.GetHGausHist()->SetName ("HRelTimeLoGainPix");
-          pix.GetHGausHist()->SetTitle("Rel. Times average Low Gain Sector ");  
+          TH1F *h =  pix.GetHGausHist();
+          
+          h->SetName ("HRelTimeLoGainSector");
+          h->SetTitle("Rel. Times average Low Gain Sector ");  
+          h->SetXTitle("Rel. Arr. Time [FADC slices]");
+          h->SetYTitle("Nr. of events");
 
           InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
Index: /trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.cc	(revision 4938)
+++ /trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.cc	(revision 4939)
@@ -27,5 +27,5 @@
 //                                                                        
 // Fills the calibrated signal from an MCerPhotEvt into 
-// MHCalibrationTestPix for every:
+// MHCalibrationPix for every:
 //
 // - Pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray  
@@ -83,5 +83,4 @@
 /////////////////////////////////////////////////////////////////////////////
 #include "MHCalibrationTestCam.h"
-#include "MHCalibrationTestPix.h"
 
 #include "MHCalibrationPix.h"
@@ -109,7 +108,16 @@
 
 using namespace std;
+
+const Int_t   MHCalibrationTestCam::fgTestNbins    = 900;
+const Axis_t  MHCalibrationTestCam::fgTestFirst    = -5.;
+const Axis_t  MHCalibrationTestCam::fgTestLast     =  5.;
 // --------------------------------------------------------------------------
 //
 // Default Constructor. 
+//
+// Sets: 
+// - fTestNbins to fgTestNbins
+// - fTestFirst to fgTestFirst
+// - fTestLast  to fgTestLast 
 //
 MHCalibrationTestCam::MHCalibrationTestCam(const char *name, const char *title) 
@@ -119,6 +127,7 @@
   fTitle = title ? title : "Histogram class for testing the calibration";
   
-  SetAverageNbins(5000);
-
+  SetTestNbins();
+  SetTestFirst();
+  SetTestLast ();
 }
 
@@ -146,8 +155,4 @@
 // - MHCalibrationCam::fAverageHiGainSectors
 // 
-// Sets number of bins to MHCalibrationCam::fAverageNbins for:
-// - MHCalibrationCam::fAverageHiGainAreas
-// - MHCalibrationCam::fAverageHiGainSectors
-//
 Bool_t MHCalibrationTestCam::ReInitHists(MParList *pList)
 {
@@ -170,6 +175,20 @@
       for (Int_t i=0; i<npixels; i++)
       {
-	  (*fHiGainArray)[i] = new MHCalibrationTestPix("Calibrated Events",
+	  (*fHiGainArray)[i] = new MHCalibrationPix("Calibrated Events",
                                                 "Test Calibration Pixel");
+
+          MHCalibrationPix &pix = (*this)[i];          
+
+          pix.SetNbins(fTestNbins);
+          pix.SetFirst(fTestFirst);
+          pix.SetLast (fTestLast);
+
+          TH1F *h =  pix.GetHGausHist();
+        
+          h->SetName ("HTestHiGainPix");
+          h->SetTitle("Distribution of calibrated Photons Pixel ");  
+          h->SetXTitle("Nr. Photons");
+          h->SetYTitle("Nr. of events");
+
           InitHists((*this)[i],(*fBadPixels)[i],i);
       }
@@ -184,14 +203,24 @@
       {
         (*fAverageHiGainAreas)[j] = 
-          new MHCalibrationTestPix("MHCalibrationTestAverageArea",
+          new MHCalibrationPix("MHCalibrationTestAverageArea",
                            "Average Test Calibrations Area Idx ");
 
-        GetAverageHiGainArea(j).GetHGausHist()->SetTitle("Test Calibrations Area Idx ");
-        GetAverageHiGainArea(j).SetNbins(fAverageNbins);
-        GetAverageHiGainArea(j).InitBins();
-        GetAverageHiGainArea(j).ChangeHistId(j);
-        GetAverageHiGainArea(j).SetEventFrequency(fPulserFrequency);
-
-        TH1F *h =  GetAverageHiGainArea(j).GetHGausHist();
+        MHCalibrationPix &pix = GetAverageHiGainArea(j);
+
+        pix.SetNbins(fTestNbins*3);
+        pix.SetFirst(fTestFirst);
+        pix.SetLast (fTestLast);
+        
+        TH1F *h =  pix.GetHGausHist();
+
+        h->SetName ("HTestPix");
+        h->SetTitle("Test Calibrations Area Idx ");
+        h->SetXTitle("Nr. Photons");
+        h->SetYTitle("Nr. of events");
+
+        pix.InitBins();
+        pix.ChangeHistId(j);
+        pix.SetEventFrequency(fPulserFrequency);
+
         h->SetTitle( Form("%s%s", h->GetTitle()," Runs: "));
       }
@@ -206,16 +235,25 @@
       {
 	  (*fAverageHiGainSectors)[j] = 
-            new MHCalibrationTestPix("MHCalibrationTestAverageSector",
-                             "Average Test Calibrations Sector ");
-
-          GetAverageHiGainSector(j).GetHGausHist()->SetTitle("Test Calibrations Sector ");
-          GetAverageHiGainSector(j).SetNbins(fAverageNbins);
-          GetAverageHiGainSector(j).InitBins();
-          GetAverageHiGainSector(j).ChangeHistId(j);
-          GetAverageHiGainSector(j).SetEventFrequency(fPulserFrequency);
-
-          TH1F *h =  GetAverageHiGainSector(j).GetHGausHist();
-          h->SetTitle( Form("%s%s", h->GetTitle()," Runs: "));
-
+            new MHCalibrationPix("MHCalibrationTestAverageSector",
+                                 "Average Test Calibrations Sector ");
+
+        MHCalibrationPix &pix = GetAverageHiGainSector(j);
+
+        pix.SetNbins(fTestNbins*3);
+        pix.SetFirst(fTestFirst);
+        pix.SetLast (fTestLast);
+        
+        TH1F *h =  pix.GetHGausHist();
+
+        h->SetName ("HTestPix");
+        h->SetTitle("Test Calibrations Sector ");
+        h->SetXTitle("Nr. Photons");
+        h->SetYTitle("Nr. of events");
+
+        pix.InitBins();
+        pix.ChangeHistId(j);
+        pix.SetEventFrequency(fPulserFrequency);
+
+        h->SetTitle( Form("%s%s", h->GetTitle()," Runs: "));
       }
   }
Index: /trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.h
===================================================================
--- /trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.h	(revision 4938)
+++ /trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.h	(revision 4939)
@@ -18,4 +18,12 @@
 private:
 
+  static const Int_t   fgTestNbins;        // Default for fNBins  (now set to: 2000  )
+  static const Axis_t  fgTestFirst;        // Default for fFirst  (now set to: -0.5  )
+  static const Axis_t  fgTestLast;         // Default for fLast   (now set to: 1999.5)
+
+  Int_t   fTestNbins;            // Number of bins        (now set to: 2000   )
+  Axis_t  fTestFirst;            // Lower histogram limit (now set to: -0.5   )
+  Axis_t  fTestLast;             // Upper histogram limit (now set to:  1999.5) 
+  
   TArrayF fMeanMeanPhotPerArea;
   TArrayF fRmsMeanPhotPerArea   ;
@@ -42,4 +50,8 @@
   void CalcAverageSigma();
   
+  void  SetTestNbins  ( const Int_t  i=fgTestNbins  ) { fTestNbins   = i; }
+  void  SetTestFirst  ( const Axis_t f=fgTestFirst  ) { fTestFirst   = f; }
+  void  SetTestLast   ( const Axis_t f=fgTestLast   ) { fTestLast    = f; }  
+
   ClassDef(MHCalibrationTestCam, 1)	// Histogram class for Relative Time Camera Calibration
 };
Index: /trunk/MagicSoft/Mars/mhcalib/Makefile
===================================================================
--- /trunk/MagicSoft/Mars/mhcalib/Makefile	(revision 4938)
+++ /trunk/MagicSoft/Mars/mhcalib/Makefile	(revision 4939)
@@ -41,5 +41,4 @@
            MHCalibrationRelTimeCam.cc \
            MHCalibrationTestCam.cc \
-           MHCalibrationTestPix.cc  \
            MHCalibrationTestTimeCam.cc \
            MHCalibrationTestTimePix.cc \
