Index: trunk/MagicSoft/Mars/mhbase/MH3.cc
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 8657)
+++ trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 8669)
@@ -18,5 +18,5 @@
 !   Author(s): Thomas Bretz  2002 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2000-2002
+!   Copyright: MAGIC Software Development, 2000-2007
 !
 !
@@ -41,10 +41,20 @@
 //   "MyHillas.fLength"
 //
+// If you want to use a different unit for histogramming use SetScaleX,
+// SetScaleY and SetScaleZ.
+//
+//
+// Binning name
+// ============
+//
 // The axis binning is retrieved from the parameter list, too. Create a
 // MBinning with the name "Binning" plus the name of your MH3 container
 // plus the axis name ("X", "Y" or "Z") and add it to the parameter list.
 //
-// If you want to use a different unit for histogramming use SetScaleX,
-// SetScaleY and SetScaleZ.
+// 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")
+// Instead of BinningMyHistName[XYZ] the parameter list will be searched
+// for BinningMyBinning[XYZ].
 //
 //
@@ -59,4 +69,5 @@
 //    the axis titles. For more information see TH1::SetTitle, eg.
 //       SetTitle("MyHist;x[mm];y[cm];Counts");
+//
 //
 // For example:
@@ -301,6 +312,11 @@
     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 += fName;
+    bname += bins;
 
     MBinning *binsx = NULL;
@@ -364,8 +380,8 @@
 
     TString title("Histogram for ");
-    title += fName;
+    title += name;
     title += Form(" (%dD)", fDimension);
 
-    fHist->SetName(fName);
+    fHist->SetName(name);
     fHist->SetTitle(fTitle==gsDefTitle ? title : fTitle);
     fHist->SetDirectory(0);
@@ -577,5 +593,5 @@
 
     const Bool_t only  = str.Contains("only")  && fDimension==2;
-    const Bool_t same  = str.Contains("same")  && fDimension==2;
+    const Bool_t same  = str.Contains("same")  && fDimension<3;
     const Bool_t blue  = str.Contains("blue")  && fDimension==2;
     const Bool_t profx = str.Contains("profx") && fDimension==2;
@@ -587,4 +603,10 @@
     str.ReplaceAll("profy", "");
     str.ReplaceAll(" ", "");
+
+    if (same && fDimension==1)
+    {
+        fHist->SetLineColor(kBlue);
+        fHist->SetMarkerColor(kBlue);
+    }
 
     // FIXME: We may have to remove all our own options from str!
