Index: trunk/MagicSoft/Mars/macros/calibration.C
===================================================================
--- trunk/MagicSoft/Mars/macros/calibration.C	(revision 2594)
+++ trunk/MagicSoft/Mars/macros/calibration.C	(revision 2599)
@@ -62,8 +62,8 @@
     tlist.AddToList(&fill);
 
-    MStatusDisplay *d1 = new MStatusDisplay;
+    //    MStatusDisplay *d1 = new MStatusDisplay;
  
     // Set update time to 3s
-    d1->SetUpdateTime(3000);
+    //    d1->SetUpdateTime(3000);
  
     //
@@ -72,5 +72,5 @@
     MEvtLoop evtloop;
     evtloop.SetParList(&plist);
-    evtloop.SetDisplay(d1);  	
+    //    evtloop.SetDisplay(d1);  	
 
     //
@@ -82,6 +82,4 @@
     tlist.PrintStatistics();
 
-    MPedestalCam *ped = plist.FindObject("MPedestalCam");
-    ped.Print();
 
     //
@@ -122,5 +120,5 @@
 
     MHCamEvent hist2;
-    hist2.SetType(0);
+    hist2.SetType(8);
     plist2.AddToList(&hist2);
     MFillH fill2("MHCamEvent", "MCalibrationCam");
@@ -145,7 +143,24 @@
     //
     MCalibrationCam *cam = plist2.FindObject("MCalibrationCam");
-    MCalibrationPix *pix = cam->GetCalibrationPix(523);
-    pix->Draw();
-
+    cam.Print();
+
+    Int_t pixnr;
+
+    while (1) 
+      {
+        
+        cout << "Which pixel number do you want to display? (Press 0 to exit)" << endl;
+        cin >> pixnr;
+        if (pixnr == 0)
+          break;
+        
+        if (pixnr >= 577)
+          break;
+        
+        MCalibrationPix *pix = cam->GetCalibrationPix(pixnr);
+        pix->Draw();
+    
+      }
+    
     //
     // Here we are confronted to a serious bug in ROOT:
@@ -170,4 +185,6 @@
     MHCamera disp11  (geomcam, "MCalibrationCam;rq", "Reduced Charges");
     MHCamera disp12  (geomcam, "MCalibrationCam;errrq", "Error of Reduced Charges");
+    MHCamera disp13  (geomcam, "MCalibrationCam;phe", "Nr. of Phe's (F-Factor Method)");
+    MHCamera disp14  (geomcam, "MCalibrationCam;convphe", "Conversion Factor (F-Factor Method)");
 
     disp1.SetCamContent(*cam, 0);
@@ -183,4 +200,6 @@
     disp11.SetCamContent(*cam, 10);
     disp12.SetCamContent(*cam, 11);
+    disp12.SetCamContent(*cam, 12);
+    disp13.SetCamContent(*cam, 13);
 
     disp1.SetYTitle("Q [FADC counts]");
@@ -196,4 +215,6 @@
     disp11.SetYTitle("Q [FADC counts]");
     disp12.SetYTitle("\\Delta_{Q} [FADC counts]");
+    disp13.SetYTitle("Nr Phe's");
+    disp14.SetYTitle("Conversion Factor [Phe/FADC count]");
 
     MStatusDisplay *d2 = new MStatusDisplay;
@@ -202,6 +223,6 @@
     d2->SetUpdateTime(1000);
 
-    TCanvas *c1 = &d2->AddTab("Fitted Charges"); 
-    c1->Divide(5, 2);
+    TCanvas *c1 = &d2->AddTab("Charges Mean"); 
+    c1->Divide(2, 2);
 
     TObject *obj;
@@ -211,5 +232,5 @@
     obj=disp1.DrawCopy("hist");
 
-    c1->cd(6);
+    c1->cd(3);
     gPad->SetBorderMode(0);
     obj->Draw();
@@ -219,29 +240,36 @@
     obj=disp2.DrawCopy("hist");
 
-    c1->cd(7);
-    gPad->SetBorderMode(0);
-    obj->Draw();
-
-    c1->cd(3);
+    c1->cd(4);
+    gPad->SetBorderMode(0);
+    obj->Draw();
+
+    TCanvas *c11 = &d2->AddTab("Charges Sigma"); 
+    c11->Divide(2, 2);
+
+    c11->cd(1);
     gStyle->SetOptStat(1101);
     obj=disp3.DrawCopy("hist");
 
-    c1->cd(8);
-    gPad->SetBorderMode(0);
-    obj->Draw();
-
-    c1->cd(4);
+    c11->cd(3);
+    gPad->SetBorderMode(0);
+    obj->Draw();
+
+    c11->cd(2);
     gStyle->SetOptStat(1101);
     obj=disp4.DrawCopy("hist");
 
-    c1->cd(9);
-    gPad->SetBorderMode(0);
-    obj->Draw();
-
-    c1->cd(5);
+    c11->cd(4);
+    gPad->SetBorderMode(0);
+    obj->Draw();
+
+
+    TCanvas *c12 = &d2->AddTab("Fit Prob."); 
+    c12->Divide(1, 2);
+
+    c12->cd(1);
     gStyle->SetOptStat(1101);
     obj=disp5.DrawCopy("hist");
 
-    c1->cd(10);
+    c12->cd(2);
     gPad->SetBorderMode(0);
     obj->Draw();
@@ -282,5 +310,5 @@
 
     c3->cd(2);
-    gStyle->SetOptStat(1101);
+    gStyle->SetOptStat(1111);
     obj=disp10.DrawCopy("hist");
 
@@ -305,4 +333,22 @@
     obj->Draw();
 
+    TCanvas *c5 = &d2->AddTab("F-Factor Method");
+    c5->Divide(2, 2);
+
+    c5->cd(1);
+    gStyle->SetOptStat(1111);
+    obj=disp13.DrawCopy("hist");
+
+    c5->cd(3);
+    obj->Draw();
+
+    c5->cd(2);
+    gStyle->SetOptStat(1101);
+    obj=disp14.DrawCopy("hist");
+
+    c5->cd(4);
+    obj->Draw();
+
+
 #endif
 
