Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 8694)
+++ trunk/MagicSoft/Mars/Changelog	(revision 8695)
@@ -18,4 +18,49 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+
+ 2007/08/22 Thomas Bretz
+
+   * mbase/MEnv.cc:
+     - changed title print out for untouched resources
+
+   * mhbase/HBaseLinkDef.h, mhbase/Makefile:
+     - added new class MHn
+
+   * mhbase/MH.[h,cc]
+     - changed start bin to search for GetRange
+     - added GetRangeX and GetRangeY member functions
+     - added GetRangeUserX and GetRangeUserY member functions
+     - added default to SetPalette
+
+   * mhbase/MH3.[h,cc]:
+     - chnaged to tokenize the name allowing to have different
+       Binning names for all axes
+     - added a style bit which allow to auto scale an axis if the
+       histogram is finally filled
+     - replaced 9999 with -1 in ProfileX/Y
+     - moved SetLog from Paint to Draw
+     - increased class version
+
+   * mhflux/MAlphaFitter.cc, mhflux/MHAlpha.cc, mhflux/MHCollectionArea.cc,
+     mhflux/MHEffectiveOnTime.cc, mhflux/MHEnergyEst.cc,
+     mreflector/MHReflector.cc:
+     - replaced 9999 with -1 in ProjectionX/Y/Z
+     - replaced 9999 with -1 in ProfileX/Y
+
+   * mhflux/MMcSpectrumWeight.cc:
+     - tiny change to output of Print
+
+   * mjobs/MJCut.cc:
+     - added a new Tab CuT displaying VsSize a second time, but with a 
+       user definable cut "CutT" applied
+
+   * mjobs/MSequence.[h,cc]:
+     - added "Comment" to resources
+     - increased class version nimber
+
+   * mmuon/MHMuonPar.cc:
+     - enable all grids
+
 
 
Index: trunk/MagicSoft/Mars/mbase/MEnv.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MEnv.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mbase/MEnv.cc	(revision 8695)
@@ -875,5 +875,5 @@
     gLog << inf << flush;
 
-    TString sep = "Untouched Resources - ";
+    TString sep = "Untouched Resources in ";
     sep += GetRcName();
     gLog.Separator(sep);
Index: trunk/MagicSoft/Mars/mhbase/HBaseLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mhbase/HBaseLinkDef.h	(revision 8694)
+++ trunk/MagicSoft/Mars/mhbase/HBaseLinkDef.h	(revision 8695)
@@ -9,4 +9,5 @@
 #pragma link C++ class MH+;
 #pragma link C++ class MH3+;
+#pragma link C++ class MHn+;
 #pragma link C++ class MHArray+;
 #pragma link C++ class MHMatrix+;
Index: trunk/MagicSoft/Mars/mhbase/MH3.cc
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 8695)
@@ -54,7 +54,7 @@
 // If the binning should have a different name than the histogram name
 // the binning name can be added to the name, eg.:
-//    SetName("MyHistName;MyBinning")
+//    SetName("MyHistName;MyXBins;MyYBins")
 // Instead of BinningMyHistName[XYZ] the parameter list will be searched
-// for BinningMyBinning[XYZ].
+// for BinningMyXBinning, BinningMyYBins and BinningMyHistNameZ
 //
 //
@@ -86,4 +86,7 @@
 //   + MData      *fData[3];        // Object from which the data is filled
 //
+// Class Version 3:
+// ----------------
+//   - Byte_t fStyleBits
 //
 /////////////////////////////////////////////////////////////////////////////
@@ -93,5 +96,5 @@
 #include <fstream>
 
-#include <TPad.h>
+//#include <TPad.h>
 #include <TStyle.h>
 #include <TCanvas.h>
@@ -121,5 +124,5 @@
 //
 MH3::MH3(const unsigned int dim)
-    : fDimension(dim>3?3:dim), fHist(NULL)
+    : fDimension(dim>3?3:dim), fHist(NULL), fStyleBits(0)
 {  
     switch (fDimension)
@@ -162,5 +165,5 @@
 //
 MH3::MH3(const char *memberx)
-    : fDimension(1)
+    : fDimension(1), fStyleBits(0)
 {
     fHist = new TH1D;
@@ -182,5 +185,6 @@
 }
 
-MH3::MH3(const TH1 &h1) : fDimension(1)
+MH3::MH3(const TH1 &h1)
+    : fDimension(1), fStyleBits(0)
 {
     if (h1.InheritsFrom(TH3::Class()))
@@ -221,5 +225,5 @@
 //
 MH3::MH3(const char *memberx, const char *membery)
-    : fDimension(2)
+    : fDimension(2), fStyleBits(0)
 {
     fHist = new TH2D;
@@ -248,5 +252,5 @@
 //
 MH3::MH3(const char *memberx, const char *membery, const char *memberz)
-    : fDimension(3)
+    : fDimension(3), fStyleBits(0)
 {
     fHist = new TH3D;
@@ -312,11 +316,19 @@
     fHist->Reset();
 
-    const Int_t split = fName.First(';');
-
-    const TString name = split<0 ? fName : fName(0, split);
-    const TString bins = split<0 ? fName : fName(split+1, fName.Length());
-
-    TString bname("Binning");
-    bname += bins;
+    // Tokenize name into name and binnings names
+    TObjArray *tok = fName.Tokenize(";");
+
+    const TString name = (*tok)[0] ? (*tok)[0]->GetName() : fName.Data();
+
+    TString bx = (*tok)[1] ? (*tok)[1]->GetName() : Form("%sX", name.Data());
+    TString by = (*tok)[2] ? (*tok)[2]->GetName() : Form("%sY", name.Data());
+    TString bz = (*tok)[3] ? (*tok)[3]->GetName() : Form("%sZ", name.Data());
+
+    bx.Prepend("Binning");
+    by.Prepend("Binning");
+    bz.Prepend("Binning");
+
+    delete tok;
+
 
     MBinning *binsx = NULL;
@@ -327,8 +339,8 @@
     {
     case 3:
-        binsz = (MBinning*)plist->FindObject(bname+"Z", "MBinning");
+        binsz = (MBinning*)plist->FindObject(bz, "MBinning");
         if (!binsz)
         {
-            *fLog << err << dbginf << "MBinning '" << bname << "X' not found... aborting." << endl;
+            *fLog << err << dbginf << "MBinning '" << bz << "' not found... aborting." << endl;
             return kFALSE;
         }
@@ -342,8 +354,8 @@
             fHist->SetBit(kIsLogz);
     case 2:
-        binsy = (MBinning*)plist->FindObject(bname+"Y", "MBinning");
+        binsy = (MBinning*)plist->FindObject(by, "MBinning");
         if (!binsy)
         {
-            *fLog << err << dbginf << "MBinning '" << bname << "Y' not found... aborting." << endl;
+            *fLog << err << dbginf << "MBinning '" << by << "' not found... aborting." << endl;
             return kFALSE;
         }
@@ -357,13 +369,13 @@
             fHist->SetBit(kIsLogy);
     case 1:
-        binsx = (MBinning*)plist->FindObject(bname+"X", "MBinning");
+        binsx = (MBinning*)plist->FindObject(bx, "MBinning");
         if (!binsx)
         {
             if (fDimension==1)
-                binsx = (MBinning*)plist->FindObject(bname, "MBinning");
+                binsx = (MBinning*)plist->FindObject("Binning"+fName, "MBinning");
 
             if (!binsx)
             {
-                *fLog << err << dbginf << "Neither MBinning '" << bname << "X' nor '" << bname << "' found... aborting." << endl;
+                *fLog << err << dbginf << "Neither '" << bx << "' nor '" << binsx << fName << "' found... aborting." << endl;
                 return kFALSE;
             }
@@ -477,52 +489,40 @@
     return kFALSE;
 }
-/*
-// --------------------------------------------------------------------------
-//
-// Set the palette you wanna use:
-//  - you could set the root "Pretty Palette Violet->Red" by
-//    gStyle->SetPalette(1, 0), but in some cases this may look
-//    confusing
-//  - The maximum colors root allowes us to set by ourself
-//    is 50 (idx: 51-100). This colors are set to a grayscaled
-//    palette
-//  - the number of contours must be two less than the number
-//    of palette entries
-//
-void MHStarMap::PrepareDrawing() const
-{
-    const Int_t numg = 32; // number of gray scaled colors
-    const Int_t numw = 32; // number of white
-
-    Int_t palette[numg+numw];
-
-    //
-    // The first half of the colors are white.
-    // This is some kind of optical background supression
-    //
-    gROOT->GetColor(51)->SetRGB(1, 1, 1);
-
-    Int_t i;
-    for (i=0; i<numw; i++)
-        palette[i] = 51;
-
-    //
-    // now the (gray) scaled part is coming
-    //
-    for (;i<numw+numg; i++)
-    {
-        const Float_t gray = 1.0-(float)(i-numw)/(numg-1.0);
-
-        gROOT->GetColor(52+i)->SetRGB(gray, gray, gray);
-        palette[i] = 52+i;
-    }
-
-    //
-    // Set the palette and the number of contour levels
-    //
-    gStyle->SetPalette(numg+numw, palette);
-    fStarMap->SetContour(numg+numw-2);
-}
-*/
+
+// --------------------------------------------------------------------------
+//
+// If an auto range bit is set the histogram range of the corresponding
+// axis is set to show only the non-empty bins (with a single empty bin
+// on both sides)
+//
+Bool_t MH3::Finalize()
+{
+    Bool_t autorangex=TESTBIT(fStyleBits, 0);
+    Bool_t autorangey=TESTBIT(fStyleBits, 1);
+    //Bool_t autorangez=TESTBIT(fStyleBits, 2);
+
+    Int_t lo, hi;
+
+    if (autorangex)
+    {
+        GetRangeX(*fHist, lo, hi);
+        cout << "====> " << GetName() << " " << fHist->GetName() << ": " << lo << " " << hi <<" " << fHist->GetNbinsX() <<  endl;
+        fHist->GetXaxis()->SetRange(lo-2, hi+1);
+    }
+    if (autorangey)
+    {
+        GetRangeY(*fHist, lo, hi);
+        fHist->GetYaxis()->SetRange(lo-2, hi+1);
+    }
+    /*
+    if (autorangez)
+    {
+        GetRangeZ(*fHist, lo, hi);
+        fHist->GetZaxis()->SetRange(lo-2, hi+1);
+    }
+    */
+    return kTRUE;
+}
+
 // --------------------------------------------------------------------------
 //
@@ -547,5 +547,5 @@
     {
         Int_t col = p->GetLineColor();
-        p = ((TH2*)fHist)->ProfileX(pfx, -1, 9999, "s");
+        p = ((TH2*)fHist)->ProfileX(pfx, -1, -1, "s");
         p->SetLineColor(col);
     }
@@ -555,11 +555,12 @@
     {
         Int_t col = p->GetLineColor();
-        p = ((TH2*)fHist)->ProfileY(pfy, -1, 9999, "s");
+        p = ((TH2*)fHist)->ProfileY(pfy, -1, -1, "s");
         p->SetLineColor(col);
     }
-
+/*
     if (fHist->TestBit(kIsLogx) && fHist->GetEntries()>0) gPad->SetLogx();
     if (fHist->TestBit(kIsLogy) && fHist->GetEntries()>0) gPad->SetLogy();
     if (fHist->TestBit(kIsLogz) && fHist->GetEntries()>0) gPad->SetLogz();
+    */
 }
 
@@ -587,4 +588,8 @@
     pad->SetGridy();
 
+    if (fHist->TestBit(kIsLogx)) pad->SetLogx();
+    if (fHist->TestBit(kIsLogy)) pad->SetLogy();
+    if (fHist->TestBit(kIsLogz)) pad->SetLogz();
+
     fHist->SetFillStyle(4000);
 
@@ -624,5 +629,5 @@
             *fLog << warn << "TProfile " << pfx << " already in pad." << endl;
 
-        p = ((TH2*)fHist)->ProfileX(pfx, -1, 9999, "s");
+        p = ((TH2*)fHist)->ProfileX(pfx, -1, -1, "s");
         p->UseCurrentStyle();
         p->SetLineColor(blue ? kBlue : fHist->GetLineColor());
@@ -640,5 +645,5 @@
             *fLog << warn << "TProfile " << pfy << " already in pad." << endl;
 
-        p = ((TH2*)fHist)->ProfileY(pfy, -1, 9999, "s");
+        p = ((TH2*)fHist)->ProfileY(pfy, -1, -1, "s");
         p->UseCurrentStyle();
         p->SetLineColor(blue ? kBlue : fHist->GetLineColor());
Index: trunk/MagicSoft/Mars/mhbase/MH3.h
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH3.h	(revision 8694)
+++ trunk/MagicSoft/Mars/mhbase/MH3.h	(revision 8695)
@@ -10,5 +10,4 @@
 
 class TH1;
-class TMethodCall;
 class MData;
 
@@ -25,4 +24,5 @@
     MData      *fData[3];        // Object from which the data is filled
     Double_t    fScale[3];       // Scale for the three axis (eg unit)
+    Byte_t      fStyleBits;      // Set the range of a histogram automatically in Finalize
 
     void StreamPrimitive(ostream &out) const;
@@ -46,8 +46,15 @@
     void SetScaleY(Double_t scale) { fScale[1] = scale; }
     void SetScaleZ(Double_t scale) { fScale[2] = scale; }
+    void SetScale(Double_t x, Double_t y=1, Double_t z=2) { SetScaleX(x); SetScaleY(y); SetScaleZ(z); }
 
     void SetLogx(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogx) : fHist->ResetBit(kIsLogx); }
     void SetLogy(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogy) : fHist->ResetBit(kIsLogy); }
     void SetLogz(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogz) : fHist->ResetBit(kIsLogz); }
+    void SetLog(Bool_t x=kTRUE, Bool_t y=kTRUE, Bool_t z=kTRUE) { SetLogx(x); SetLogy(y); SetLogz(z); }
+
+    void SetAutoRangeX(Bool_t b=kTRUE) { b ? SETBIT(fStyleBits, 0) : CLRBIT(fStyleBits, 0); }
+    void SetAutoRangeY(Bool_t b=kTRUE) { b ? SETBIT(fStyleBits, 1) : CLRBIT(fStyleBits, 1); }
+    void SetAutoRangeZ(Bool_t b=kTRUE) { b ? SETBIT(fStyleBits, 2) : CLRBIT(fStyleBits, 2); }
+    void SetAutoRange(Bool_t x=kTRUE, Bool_t y=kTRUE, Bool_t z=kTRUE) { SetAutoRangeX(x); SetAutoRangeY(y); SetAutoRangeZ(z); }
 
     void Sumw2() const { if (fHist) fHist->Sumw2(); }
@@ -67,4 +74,5 @@
     Bool_t SetupFill(const MParList *pList);
     Bool_t Fill(const MParContainer *par, const Stat_t w=1);
+    Bool_t Finalize();
 
     TH1 *GetHistByName(const TString name="") const { return fHist; }
@@ -86,5 +94,5 @@
     void Paint(Option_t *opt="");
 
-    ClassDef(MH3, 2) // Generalized 1/2/3D-histogram for Mars variables
+    ClassDef(MH3, 3) // Generalized 1/2/3D-histogram for Mars variables
 };
 
Index: trunk/MagicSoft/Mars/mhbase/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mhbase/Makefile	(revision 8694)
+++ trunk/MagicSoft/Mars/mhbase/Makefile	(revision 8695)
@@ -25,4 +25,5 @@
            MH.cc \
            MH3.cc \
+	   MHn.cc \
            MHArray.cc \
            MHMatrix.cc
Index: trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc	(revision 8695)
@@ -526,5 +526,5 @@
 {
     const TString name(Form("TempAlphaEnergy%06d", gRandom->Integer(1000000)));
-    TH1D *h = hon.ProjectionZ(name, -1, 9999, bin, bin, "E");
+    TH1D *h = hon.ProjectionZ(name, -1, -1, bin, bin, "E");
     h->SetDirectory(0);
 
@@ -537,5 +537,5 @@
 {
     const TString name(Form("TempAlphaTheta%06d", gRandom->Integer(1000000)));
-    TH1D *h = hon.ProjectionZ(name, bin, bin, -1, 9999, "E");
+    TH1D *h = hon.ProjectionZ(name, bin, bin, -1, -1, "E");
     h->SetDirectory(0);
 
@@ -551,5 +551,5 @@
     hon.GetZaxis()->SetRange(bin,bin);
     TH1D *h = (TH1D*)hon.Project3D("ye");
-    hon.GetZaxis()->SetRange(-1,9999);
+    hon.GetZaxis()->SetRange(-1,-1);
 
     h->SetDirectory(0);
@@ -563,5 +563,5 @@
 {
     const TString name(Form("TempAlpha%06d", gRandom->Integer(1000000)));
-    TH1D *h = hon.ProjectionZ(name, -1, 9999, -1, 9999, "E");
+    TH1D *h = hon.ProjectionZ(name, -1, -1, -1, -1, "E");
     h->SetDirectory(0);
 
@@ -576,6 +576,6 @@
     const TString name0(Form("TempAlpha%06d_off", gRandom->Integer(1000000)));
 
-    TH1D *h1 = hon.ProjectionZ(name1, -1, 9999, bin, bin, "E");
-    TH1D *h0 = hof.ProjectionZ(name0, -1, 9999, bin, bin, "E");
+    TH1D *h1 = hon.ProjectionZ(name1, -1, -1, bin, bin, "E");
+    TH1D *h0 = hof.ProjectionZ(name0, -1, -1, bin, bin, "E");
     h1->SetDirectory(0);
     h0->SetDirectory(0);
@@ -594,6 +594,6 @@
     const TString name0(Form("TempAlpha%06d_off", gRandom->Integer(1000000)));
 
-    TH1D *h1 = hon.ProjectionZ(name1, bin, bin, -1, 9999, "E");
-    TH1D *h0 = hof.ProjectionZ(name0, bin, bin, -1, 9999, "E");
+    TH1D *h1 = hon.ProjectionZ(name1, bin, bin, -1, -1, "E");
+    TH1D *h0 = hof.ProjectionZ(name0, bin, bin, -1, -1, "E");
     h1->SetDirectory(0);
     h0->SetDirectory(0);
@@ -614,10 +614,10 @@
     hon.GetZaxis()->SetRange(bin,bin);
     TH1D *h1 = (TH1D*)hon.Project3D("ye");
-    hon.GetZaxis()->SetRange(-1,9999);
+    hon.GetZaxis()->SetRange(-1,-1);
     h1->SetDirectory(0);
 
     hof.GetZaxis()->SetRange(bin,bin);
     TH1D *h0 = (TH1D*)hof.Project3D("ye");
-    hof.GetZaxis()->SetRange(-1,9999);
+    hof.GetZaxis()->SetRange(-1,-1);
     h0->SetDirectory(0);
 
@@ -635,6 +635,6 @@
     const TString name0(Form("TempAlpha%06d_off", gRandom->Integer(1000000)));
 
-    TH1D *h1 = hon.ProjectionZ(name1, -1, 9999, -1, 9999, "E");
-    TH1D *h0 = hof.ProjectionZ(name0, -1, 9999, -1, 9999, "E");
+    TH1D *h1 = hon.ProjectionZ(name1, -1, -1, -1, -1, "E");
+    TH1D *h0 = hof.ProjectionZ(name0, -1, -1, -1, -1, "E");
     h1->SetDirectory(0);
     h0->SetDirectory(0);
Index: trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHAlpha.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mhflux/MHAlpha.cc	(revision 8695)
@@ -401,5 +401,5 @@
     MAlphaFitter fit(fFit);
 
-    TH1D *h = fOffData ? fOffData->ProjectionZ("ProjTimeTemp", -1, 9999, -1, 9999, "E") : 0;
+    TH1D *h = fOffData ? fOffData->ProjectionZ("ProjTimeTemp", -1, -1, -1, -1, "E") : 0;
     const Bool_t rc = fit.ScaleAndFit(fHistTime, h);
     if (h)
Index: trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc	(revision 8695)
@@ -121,6 +121,6 @@
 void MHCollectionArea::CalcEfficiency()
 {
-    TH1D *hsel = fHistSel.ProjectionY("Spy", -1, 9999, "E");;
-    TH1D *hall = fHistAll.ProjectionY("Apy", -1, 9999, "E");
+    TH1D *hsel = fHistSel.ProjectionY("Spy", -1, -1, "E");;
+    TH1D *hall = fHistAll.ProjectionY("Apy", -1, -1, "E");
 
     //
@@ -327,11 +327,11 @@
     pad->cd(1);
     if (gPad->FindObject("ProjSelX"))
-        fHistSel.ProjectionX("ProjSelX", -1, 9999, "E");
+        fHistSel.ProjectionX("ProjSelX", -1, -1, "E");
 
     pad->cd(2);
     if (gPad->FindObject("ProjAllY"))
-        h1=fHistAll.ProjectionY("ProjAllY", -1, 9999, "E");
+        h1=fHistAll.ProjectionY("ProjAllY", -1, -1, "E");
     if (gPad->FindObject("ProjSelY"))
-        h2=fHistSel.ProjectionY("ProjSelY", -1, 9999, "E");
+        h2=fHistSel.ProjectionY("ProjSelY", -1, -1, "E");
 
     if (h1 && h1->GetMaximum()>0)
@@ -381,5 +381,5 @@
         gPad->SetGridy();
         /*
-        h = fHistAll.ProjectionX("ProjAllX", -1, 9999, "E");
+        h = fHistAll.ProjectionX("ProjAllX", -1, -1, "E");
         h->SetXTitle("\\Theta [\\circ]");
         h->SetDirectory(NULL);
@@ -388,5 +388,5 @@
         h->Draw();
         */
-        h = fHistSel.ProjectionX("ProjSelX", -1, 9999, "E");
+        h = fHistSel.ProjectionX("ProjSelX", -1, -1, "E");
         h->SetXTitle("\\Theta [\\circ]");
         h->SetDirectory(NULL);
@@ -405,5 +405,5 @@
         gPad->SetGridy();
 
-        h1 = fHistAll.ProjectionY("ProjAllY", -1, 9999, "E");
+        h1 = fHistAll.ProjectionY("ProjAllY", -1, -1, "E");
         h1->SetDirectory(NULL);
         h1->SetLineColor(kGreen);
@@ -412,5 +412,5 @@
         h1->Draw();
 
-        h2 = fHistSel.ProjectionY("ProjSelY", -1, 9999, "E");
+        h2 = fHistSel.ProjectionY("ProjSelY", -1, -1, "E");
         h2->SetDirectory(NULL);
         h2->SetLineColor(kRed);
Index: trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc	(revision 8695)
@@ -866,5 +866,5 @@
         if ((h = (TH1D*)gPad->FindObject("ProjDeltaT"/*fNameProjDeltaT*/)))
         {
-            h = fH2DeltaT.ProjectionX("ProjDeltaT"/*fNameProjDeltaT*/, -1, 9999, "E");
+            h = fH2DeltaT.ProjectionX("ProjDeltaT"/*fNameProjDeltaT*/, -1, -1, "E");
             if (h->GetEntries()>0)
                 gPad->SetLogy();
@@ -873,5 +873,5 @@
         pad->GetPad(2)->cd(1);
         if ((h = (TH1D*)gPad->FindObject("ProjTheta"/*fNameProjTheta*/)))
-            fH2DeltaT.ProjectionY("ProjTheta"/*fNameProjTheta*/, -1, 9999, "E");
+            fH2DeltaT.ProjectionY("ProjTheta"/*fNameProjTheta*/, -1, -1, "E");
 
         if (!fIsFinalized)
@@ -963,5 +963,5 @@
     pad->GetPad(1)->cd(1);
     gPad->SetBorderMode(0);
-    h = fH2DeltaT.ProjectionX("ProjDeltaT"/*fNameProjDeltaT*/, -1, 9999, "E");
+    h = fH2DeltaT.ProjectionX("ProjDeltaT"/*fNameProjDeltaT*/, -1, -1, "E");
     h->SetTitle("Distribution of \\Delta t [s]");
     h->SetXTitle("\\Delta t [s]");
@@ -993,5 +993,5 @@
     pad->GetPad(2)->cd(1);
     gPad->SetBorderMode(0);
-    h = fH2DeltaT.ProjectionY("ProjTheta"/*fNameProjTheta*/, -1, 9999, "E");
+    h = fH2DeltaT.ProjectionY("ProjTheta"/*fNameProjTheta*/, -1, -1, "E");
     h->SetTitle("Distribution of  \\Theta [\\circ]");
     h->SetXTitle("\\Theta [\\circ]");
Index: trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc	(revision 8695)
@@ -364,5 +364,5 @@
     if ((hx=(TH1D*)gPad->FindObject(MString::Format("Prof%s", h.GetName()))))
     {
-        hx = hyx->ProfileX(Form("Prof%s", h.GetName()), -1, 9999, "s");
+        hx = hyx->ProfileX(Form("Prof%s", h.GetName()), -1, -1, "s");
 
         if (logy && hx->GetMaximum()>0)
@@ -387,5 +387,5 @@
     h2->SetLineColor(kRed);
 
-    TH1D *h1 = h2->ProfileX(Form("Prof%s", h.GetName()), -1, 9999, "s");
+    TH1D *h1 = h2->ProfileX(Form("Prof%s", h.GetName()), -1, -1, "s");
     h1->SetDirectory(NULL);
     h1->SetBit(kCanDelete);
@@ -478,5 +478,5 @@
     gPad->SetGridy();
     /*
-    h = fHImpact.ProjectionX("Impact", -1, 9999, "e");
+    h = fHImpact.ProjectionX("Impact", -1, -1, "e");
     h->SetBit(TH1::kNoStats);
     h->SetTitle("Distribution of Impact");
Index: trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc	(revision 8695)
@@ -485,5 +485,5 @@
         *fLog << " New spectral slope:       ";
         if (fNewSlope==-99)
-            *fLog << "undefined" << endl;
+            *fLog << "undefined/no change" << endl;
         else
             *fLog << fNewSlope << endl;
Index: trunk/MagicSoft/Mars/mimage/MNewImagePar.cc
===================================================================
--- trunk/MagicSoft/Mars/mimage/MNewImagePar.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mimage/MNewImagePar.cc	(revision 8695)
@@ -271,4 +271,8 @@
     fConcCOG /= hillas.GetSize();                        // [ratio]
 
+    // This can for example happen in case of Muon Rings
+    if (fConcCOG<0)
+        fConcCOG=0;
+
     // Concentration of signal contained in ellipse
     fConcCore /= hillas.GetSize();
Index: trunk/MagicSoft/Mars/mjobs/MJCut.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCut.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mjobs/MJCut.cc	(revision 8695)
@@ -62,5 +62,5 @@
 
 // Filter
-//#include "MFDataMember.h"
+#include "MFDataPhrase.h"
 
 // Fit signal environment
@@ -665,4 +665,8 @@
     cont3.SetAllowEmpty();
 
+    // Filter for VsSize
+    MFDataPhrase ftheta("", "CutT");
+    ftheta.SetAllowEmpty();
+
     // ------------- Loop Off Data --------------------
     MReadReports readoffdata;
@@ -712,4 +716,5 @@
     MFillH fill2a("MHHillasOffPost [MHHillas]",      "MHillas",      "FillHillasPost");
     MFillH fill3a("MHVsSizeOffPost [MHVsSize]",      "MHillasSrc",   "FillVsSizePost");
+    MFillH fill3c("MHVsSizeOffTheta [MHVsSize]",     "MHillasSrc",   "FillVsSizeTheta");
     MFillH fill4a("MHHilExtOffPost [MHHillasExt]",   "MHillasSrc",   "FillHilExtPost");
     MFillH fill5a("MHHilSrcOffPost [MHHillasSrc]",   "MHillasSrc",   "FillHilSrcPost");
@@ -720,4 +725,5 @@
     fill2a.SetNameTab("PostCut");
     fill3a.SetNameTab("VsSize");
+    fill3c.SetNameTab("CutT");
     fill4a.SetNameTab("HilExt");
     fill5a.SetNameTab("HilSrc");
@@ -726,4 +732,6 @@
     //fill9a.SetNameTab("EffOffT");
 
+    fill3c.SetFilter(&ftheta);
+
     //MFDataMember fbin("Bin.fVal", '>', 0);
     //fill9a.SetFilter(&fbin);
@@ -738,4 +746,5 @@
         fill2a.SetWeight(&scale);
         fill3a.SetWeight(&scale);
+        fill3c.SetWeight(&scale);
         fill4a.SetWeight(&scale);
         fill5a.SetWeight(&scale);
@@ -797,5 +806,7 @@
         if (fFullDisplay)
         {
+            tlist2.AddToList(&ftheta);
             tlist2.AddToList(&fill3a);
+            tlist2.AddToList(&fill3c);
             tlist2.AddToList(&fill4a);
             tlist2.AddToList(&fill5a);
@@ -905,4 +916,5 @@
     MFillH fill2b("MHHillasOnPost [MHHillas]",      "MHillas",      "FillHillasPost");
     MFillH fill3b("MHVsSizeOnPost [MHVsSize]",      "MHillasSrc",   "FillVsSizePost");
+    MFillH fill3d("MHVsSizeOnTheta [MHVsSize]",     "MHillasSrc",   "FillVsSizeTheta");
     MFillH fill4b("MHHilExtOnPost [MHHillasExt]",   "MHillasSrc",   "FillHilExtPost");
     MFillH fill5b("MHHilSrcOnPost [MHHillasSrc]",   "MHillasSrc",   "FillHilSrcPost");
@@ -913,4 +925,5 @@
     fill2b.SetNameTab("PostCut");
     fill3b.SetNameTab("VsSize");
+    fill3d.SetNameTab("CutT");
     fill4b.SetNameTab("HilExt");
     fill5b.SetNameTab("HilSrc");
@@ -921,4 +934,5 @@
     fill2b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
     fill3b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
+    fill3d.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
     fill4b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
     fill5b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
@@ -926,4 +940,6 @@
     fill7b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
     //fill9b.SetFilter(&fbin);
+
+    fill3d.SetFilter(&ftheta);
 
     /*
@@ -985,15 +1001,10 @@
     {
         tlist.Replace(&fill1b);
-/*        if (fIsWobble)
-        {
-            tlist2.AddToListAfter(&fill2b, &fill2a);
-            tlist2.AddToListAfter(&fill3b, &fill3a);
-        }
-        else
-        */
+
         tlist2.Replace(&fill2b);
         if (fFullDisplay)
         {
             tlist2.Replace(&fill3b);
+            tlist2.Replace(&fill3d);
             tlist2.Replace(&fill4b);
             tlist2.Replace(&fill5b);
Index: trunk/MagicSoft/Mars/mjobs/MSequence.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MSequence.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mjobs/MSequence.cc	(revision 8695)
@@ -123,4 +123,7 @@
 //   + fMonteCarlo
 //
+//  Class Version 3:
+//   + fComment
+//
 /////////////////////////////////////////////////////////////////////////////
 #include "MSequence.h"
@@ -450,4 +453,5 @@
     fHvSettings   = env.GetValue("HvSettings", "");
     fMonteCarlo   = env.GetValue("MonteCarlo", kFALSE);
+    fComment      = env.GetValue("Comment",    "");
 
     str = env.GetValue("Runs", "");
@@ -544,4 +548,7 @@
     if (!fDataPath.IsNull())
         gLog << endl << "DataPath: " << fDataPath << endl;
+
+    gLog << endl << "Comment: " << fComment << endl;
+
 }
 
Index: trunk/MagicSoft/Mars/mjobs/MSequence.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MSequence.h	(revision 8694)
+++ trunk/MagicSoft/Mars/mjobs/MSequence.h	(revision 8695)
@@ -45,4 +45,5 @@
     TString fTriggerTable;
     TString fHvSettings;
+    TString fComment;
 
     TArrayI fRuns;
@@ -144,5 +145,5 @@
     static Bool_t InflatePath(TString &seq, Bool_t ismc=kFALSE);
 
-    ClassDef(MSequence, 2)
+    ClassDef(MSequence, 3)
 };
 
Index: trunk/MagicSoft/Mars/mmuon/MHMuonPar.cc
===================================================================
--- trunk/MagicSoft/Mars/mmuon/MHMuonPar.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mmuon/MHMuonPar.cc	(revision 8695)
@@ -201,12 +201,18 @@
     pad->cd(1);
     gPad->SetBorderMode(0);
+    gPad->SetGridx();
+    gPad->SetGridy();
     fHistRadius.Draw();
 
     pad->cd(2);
     gPad->SetBorderMode(0);
+    gPad->SetGridx();
+    gPad->SetGridy();
     fHistArcWidth.Draw();
 
     pad->cd(3);
     gPad->SetBorderMode(0);
+    gPad->SetGridx();
+    gPad->SetGridy();
     fHistSize.Draw();
 
@@ -228,4 +234,6 @@
     pad->cd(4);
     gPad->SetBorderMode(0);
+    gPad->SetGridx();
+    gPad->SetGridy();
     fHistBroad.Draw();
 
Index: trunk/MagicSoft/Mars/mreflector/MHReflector.cc
===================================================================
--- trunk/MagicSoft/Mars/mreflector/MHReflector.cc	(revision 8694)
+++ trunk/MagicSoft/Mars/mreflector/MHReflector.cc	(revision 8695)
@@ -196,5 +196,5 @@
     pad->cd(2);
     gPad->SetBorderMode(0);
-    TH1 *h = fHistRad.ProjectionY("ProfRad", -1, 9999, "e");
+    TH1 *h = fHistRad.ProjectionY("ProfRad", -1, -1, "e");
     h->SetTitle("RadialProfile");
     h->SetDirectory(NULL);
@@ -209,5 +209,5 @@
     gPad->SetLogx();
     gPad->SetLogy();
-    h = fHistSize.ProjectionY("ProfSize", -1, 9999, "e");
+    h = fHistSize.ProjectionY("ProfSize", -1, -1, "e");
     h->SetTitle("Size distribution");
     h->SetDirectory(NULL);
@@ -279,5 +279,5 @@
     if (gPad->FindObject("ProfRad"))
     {
-        h = fHistRad.ProjectionY("ProfRad", -1, 9999, "e");
+        h = fHistRad.ProjectionY("ProfRad", -1, -1, "e");
         h->Scale(1./h->Integral());
     }
@@ -287,5 +287,5 @@
     if (gPad->FindObject("ProfSize"))
     {
-        h = fHistSize.ProjectionY("ProfSize", -1, 9999, "e");
+        h = fHistSize.ProjectionY("ProfSize", -1, -1, "e");
         h->Scale(1./h->Integral());
     }
