Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 1553)
+++ trunk/MagicSoft/Mars/Changelog	(revision 1554)
@@ -8,4 +8,8 @@
    * mhist/MHMatrix.cc:
      - changed the Print member function to be more flexible
+
+   * mhist/MHHadroness.[h,cc]:
+     - changed fQfac from TH to TGraph
+     - changed the Qfactor-plot x-axis from Hadronness to Gamma-Acceptance
 
 
Index: trunk/MagicSoft/Mars/macros/multidimdist.C
===================================================================
--- trunk/MagicSoft/Mars/macros/multidimdist.C	(revision 1553)
+++ trunk/MagicSoft/Mars/macros/multidimdist.C	(revision 1554)
@@ -98,6 +98,6 @@
     tlist.PrintStatistics();
 
-    fillmat.Print("size");
-    fillmat2.Print("size");
+    matrix.Print("size");
+    matrix2.Print("size");
 
     // ---------------------------------------------------------
@@ -112,6 +112,6 @@
 
     MMultiDimDistCalc calc;
-    calc.SetUseNumRows(0);
-    calc.SetUseKernelMethod(kTRUE);
+    calc.SetUseNumRows(15);
+    //calc.SetUseKernelMethod(kTRUE);
     tlist2.AddToList(&calc);
 
Index: trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
===================================================================
--- trunk/MagicSoft/Mars/mgui/MCamDisplay.cc	(revision 1553)
+++ trunk/MagicSoft/Mars/mgui/MCamDisplay.cc	(revision 1554)
@@ -190,5 +190,5 @@
     //
     const Float_t ratio = fGeomCam->GetPixRatio(i);
-    const Float_t pnum  = ratio*pix.GetErrorPhot();
+    const Float_t pnum  = sqrt(ratio)*pix.GetErrorPhot();
 
     (*this)[pix.GetPixId()].SetFillColor(GetColor(pnum, min, max));
Index: trunk/MagicSoft/Mars/mhist/MHHadroness.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHadroness.cc	(revision 1553)
+++ trunk/MagicSoft/Mars/mhist/MHHadroness.cc	(revision 1554)
@@ -105,7 +105,11 @@
     fIntPhness->SetYTitle("Acceptance");
 
+    /*
     fQfac = new TH1D("Qfac", "Naive Quality factor", nbins, 0, 1);
     fQfac->SetXTitle("Hadroness");
     fQfac->SetYTitle("Quality");
+    */
+    fQfac = new TGraph;
+    fQfac->SetTitle(" Naive Quality factor ");
 
     fMinDist = new TH1D("MinDist", "Minimum Dist to (0, 1)", nbins, 0, 1);
@@ -113,5 +117,5 @@
     fMinDist->SetYTitle("Distance");
 
-    fQfac->SetDirectory(NULL);
+    //fQfac->SetDirectory(NULL);
     fGhness->SetDirectory(NULL);
     fPhness->SetDirectory(NULL);
@@ -200,4 +204,5 @@
 
     fGraph->Set(n);
+    fQfac->Set(n);
 
     const Stat_t sumg = fGhness->Integral(1, n+1);
@@ -218,5 +223,7 @@
 
         fMinDist->SetBinContent(i, 1-sqrt(ip*ip + (ig-1)*(ig-1)));
-        fQfac->SetBinContent(i, ig/sqrt(ip));
+        fQfac->SetPoint(i, ig, ig/sqrt(ip));
+        //fQfac->SetBinContent(fQfac->FindBin(ig), ig/sqrt(ip));
+        *fLog << all << i << ": " << ig << " " << ig/sqrt(ip) << endl;
     }
 
@@ -279,9 +286,11 @@
     *fLog << "  Acc Gammas = " << Form("%3.0f", fIntGhness->GetBinContent(h)*100) << "%, ";
     *fLog << "Acc Hadrons = " << Form("%3.0f", fIntPhness->GetBinContent(h)*100) << "%" << endl;
-    const Int_t q = GetQfac()->GetMaximumBin();
-    *fLog << "Maximum Q-Factor: " << GetQfac()->GetMaximum() << " @ H=";
-    *fLog << GetQfac()->GetBinCenter(q) << endl;;
-    *fLog << "  Acc Gammas = " << Form("%3.0f", fIntGhness->GetBinContent(q)*100) << "%, ";
-    *fLog << "Acc Hadrons = " << Form("%3.0f", fIntPhness->GetBinContent(q)*100) << "%" << endl;
+    /*
+     const Int_t q = GetQfac()->GetMaximumBin();
+     *fLog << "Maximum Q-Factor: " << GetQfac()->GetMaximum() << " @ H=";
+     *fLog << GetQfac()->GetBinCenter(q) << endl;;
+     *fLog << "  Acc Gammas = " << Form("%3.0f", fIntGhness->GetBinContent(q)*100) << "%, ";
+     *fLog << "Acc Hadrons = " << Form("%3.0f", fIntPhness->GetBinContent(q)*100) << "%" << endl;
+     */
     *fLog << endl;
 }
@@ -303,26 +312,4 @@
     Getphness()->SetLineColor(kRed);
     Getphness()->DrawCopy("same");
-    c.cd(4);
-    TGraph &g = (TGraph&)*fGraph->DrawClone("AC");
-    g.SetBit(kCanDelete);
-    gPad->Modified();
-    gPad->Update();
-    if (g.GetHistogram())
-    {
-        g.GetXaxis()->SetRangeUser(0, 1);
-        g.GetXaxis()->SetTitle("Acceptance Hadrons");
-        g.GetYaxis()->SetTitle("Acceptance Gammas");
-        g.SetMarkerStyle(kFullDotSmall);
-        g.Draw("P");
-
-        gPad->Modified();
-        gPad->Update();
-    }
-    const Int_t h = fMinDist->GetMaximumBin();
-    TMarker *m = new TMarker(fIntPhness->GetBinContent(h),
-                             fIntGhness->GetBinContent(h), kStar);
-    m->SetMarkerColor(kBlue);
-    m->SetBit(kCanDelete);
-    m->Draw();
     c.cd(2);
     gStyle->SetOptStat(0);
@@ -333,36 +320,35 @@
     fMinDist->DrawCopy("same");
     c.cd(3);
-    GetQfac()->DrawCopy();
-
-    return &c;
-}
-
-// --------------------------------------------------------------------------
-//
-// Draw all histograms. (For the Meaning see class description)
-//
-void MHHadroness::Draw(Option_t *)
-{
-    if (!gPad)
-        MakeDefCanvas("Hadroness", fTitle);
-
-    gPad->Divide(2, 2);
-
-    gPad->cd(1);
-    gStyle->SetOptStat(10);
-    Getghness()->Draw();
-    Getphness()->SetLineColor(kRed);
-    Getphness()->Draw("same");
-    gPad->cd(4);
-    fGraph->Draw("AC");
-    gPad->Modified();
-    gPad->Update();
-    if (fGraph->GetHistogram())
-    {
-        fGraph->GetXaxis()->SetRangeUser(0, 1);
-        fGraph->GetXaxis()->SetTitle("Acceptance Hadrons");
-        fGraph->GetYaxis()->SetTitle("Acceptance Gammas");
-        fGraph->SetMarkerStyle(kFullDotSmall);
-        fGraph->Draw("P");
+    //GetQfac()->DrawCopy();
+    TGraph &g2 = (TGraph&)*fQfac->DrawClone("AC");
+    g2.SetBit(kCanDelete);
+    gPad->Modified();
+    gPad->Update();
+    if (g2.GetHistogram())
+    {
+        g2.GetXaxis()->SetRangeUser(0, 1);
+        g2.GetXaxis()->SetTitle("Acceptance Gammas");
+        g2.GetYaxis()->SetTitle("Quality");
+        g2.SetMarkerStyle(kFullDotSmall);
+        g2.Draw("P");
+
+        gPad->Modified();
+        gPad->Update();
+    }
+    c.cd(4);
+    gPad->Modified();
+    gPad->Update();
+    TGraph &g = (TGraph&)*fGraph->DrawClone("AC");
+    g.SetBit(kCanDelete);
+    gPad->Modified();
+    gPad->Update();
+    if (g.GetHistogram())
+    {
+        g.GetXaxis()->SetRangeUser(0, 1);
+        g.GetXaxis()->SetTitle("Acceptance Hadrons");
+        g.GetYaxis()->SetTitle("Acceptance Gammas");
+        g.SetMarkerStyle(kFullDotSmall);
+        g.Draw("P");
+
         gPad->Modified();
         gPad->Update();
@@ -374,4 +360,23 @@
     m->SetBit(kCanDelete);
     m->Draw();
+    return &c;
+}
+
+// --------------------------------------------------------------------------
+//
+// Draw all histograms. (For the Meaning see class description)
+//
+void MHHadroness::Draw(Option_t *)
+{
+    if (!gPad)
+        MakeDefCanvas("Hadroness", fTitle);
+
+    gPad->Divide(2, 2);
+
+    gPad->cd(1);
+    gStyle->SetOptStat(10);
+    Getghness()->Draw();
+    Getphness()->SetLineColor(kRed);
+    Getphness()->Draw("same");
     gPad->cd(2);
     gStyle->SetOptStat(0);
@@ -382,4 +387,40 @@
     fMinDist->Draw("same");
     gPad->cd(3);
-    GetQfac()->Draw();
-}
+    //GetQfac()->Draw();
+    fQfac->Draw("AC");
+    gPad->Modified();
+    gPad->Update();
+    if (fQfac->GetHistogram())
+    {
+        fQfac->GetXaxis()->SetRangeUser(0, 1);
+        fQfac->GetXaxis()->SetTitle("Acceptance Gammas");
+        fQfac->GetYaxis()->SetTitle("Quality");
+        fQfac->SetMarkerStyle(kFullDotSmall);
+        fQfac->Draw("P");
+
+        gPad->Modified();
+        gPad->Update();
+    }
+    gPad->cd(4);
+    gPad->Modified();
+    gPad->Update();
+    fGraph->Draw("AC");
+    gPad->Modified();
+    gPad->Update();
+    if (fGraph->GetHistogram())
+    {
+        fGraph->GetXaxis()->SetRangeUser(0, 1);
+        fGraph->GetXaxis()->SetTitle("Acceptance Hadrons");
+        fGraph->GetYaxis()->SetTitle("Acceptance Gammas");
+        fGraph->SetMarkerStyle(kFullDotSmall);
+        fGraph->Draw("P");
+        gPad->Modified();
+        gPad->Update();
+    }
+    const Int_t h = fMinDist->GetMaximumBin();
+    TMarker *m = new TMarker(fIntPhness->GetBinContent(h),
+                             fIntGhness->GetBinContent(h), kStar);
+    m->SetMarkerColor(kBlue);
+    m->SetBit(kCanDelete);
+    m->Draw();
+}
Index: trunk/MagicSoft/Mars/mhist/MHHadroness.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHadroness.h	(revision 1553)
+++ trunk/MagicSoft/Mars/mhist/MHHadroness.h	(revision 1554)
@@ -22,7 +22,7 @@
     TH1D* fIntPhness;     // Hadrons Acceptance
     TH1D* fIntGhness;     // Gammas Acceptance
-    TH1D* fQfac;          // Quality factor
     TH1D* fMinDist;       // Minimum Distance to optimum acceptance
 
+    TGraph *fQfac;        // Quality factor
     TGraph *fGraph;       // gamma acceptance vs. hadron acceptance
 
@@ -33,5 +33,4 @@
     Double_t GetGammaAcceptance(Double_t acchad) const;
 
-    TH1D *GetQfac() const    { return fQfac; }
     TH1D *Getghness() const  { return fGhness; }
     TH1D *Getphness() const  { return fPhness; }
Index: trunk/MagicSoft/Mars/mhist/MHMatrix.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHMatrix.cc	(revision 1553)
+++ trunk/MagicSoft/Mars/mhist/MHMatrix.cc	(revision 1554)
@@ -324,12 +324,14 @@
     TString str(o);
 
+    *fLog << all << flush;
+
     if (str.Contains("size", TString::kIgnoreCase))
     {
-        *fLog << all << GetDescriptor() << ": NumColumns=" << fM.GetNcols();
+        *fLog << GetDescriptor() << ": NumColumns=" << fM.GetNcols();
         *fLog << " NumRows=" << fM.GetNrows() << endl;
     }
 
     if (!fData && str.Contains("cols", TString::kIgnoreCase))
-        *fLog << all << "Sorry, no column information available." << endl;
+        *fLog << "Sorry, no column information available." << endl;
 
     if (fData && str.Contains("cols", TString::kIgnoreCase))
