Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7407)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7408)
@@ -18,4 +18,11 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2005/11/18 Thomas Bretz
+
+   * mhflux/MMcSpectrumWeight.cc:
+     - fixed a problem with using X more than once in the formula
+
+
+
  2005/11/16 Daniela Dorner
 
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 7407)
+++ trunk/MagicSoft/Mars/NEWS	(revision 7408)
@@ -2,4 +2,13 @@
 
  *** Version  <cvs>
+
+   - general: Updated some macros with comments:
+      + macros/optim/optimdisp.C
+      + macros/optim/optimenergy.C
+      + macros/optim/optimwobble.C:
+
+   - general: MTFillMatrix (the class to fill one or two MHMatrix from
+     files) now allows adding a pre-cut like in the optimization. E.g. this
+     is useful to perform g/h-separation cuts before training the random forest.
 
    - general: Updated the random forest classes to support also the
@@ -33,4 +42,6 @@
    - ganymed/sponde: Calculation of the error of single size-/energy-
      bins now uses Li/Ma (5) instead of LiMa (17)
+
+   - sponde: Added a plot E^2*dN/dE
 
 
Index: trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc	(revision 7407)
+++ trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc	(revision 7408)
@@ -61,4 +61,10 @@
 //
 //
+//  If using SetFormula you can specify formulas accepted by TF1, eg:
+//      pow(X, -2.6)
+//  (Rem: all capital (!) 'X' are replaced by the corresponding %s.fEnergy
+//        automatically)
+//
+//
 //  Input Containers:
 //    MMcEvt
@@ -218,5 +224,9 @@
 TString MMcSpectrumWeight::GetFormulaSpecNew() const
 {
-    return fFormula.IsNull() ? Form("pow(%s.fEnergy, %.3f)", fNameMcEvt.Data(), fNewSlope) : fFormula;
+    TString str = fFormula.IsNull() ? Form("pow(%s.fEnergy, %.3f)", fNameMcEvt.Data(), fNewSlope) : fFormula;
+    if (!fFormula.IsNull())
+        str.ReplaceAll("X", Form("(%s.fEnergy)", fNameMcEvt.Data()));
+
+    return str;
 }
 
