Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 9180)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 9181)
@@ -18,4 +18,14 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2008/11/28 Thomas Bretz
+
+   * mjobs/MJSpectrum.cc:
+     - fixed a problem in FormFlux which did not handle the nagative slope
+       correctly
+     - Changed the title of the Spectrum histogram to make the fit
+       result fit better
+     - added a histogram showing the readin source position of the MCs
+
+
 
  2008/11/27 Thomas Bretz
Index: /trunk/MagicSoft/Mars/NEWS
===================================================================
--- /trunk/MagicSoft/Mars/NEWS	(revision 9180)
+++ /trunk/MagicSoft/Mars/NEWS	(revision 9181)
@@ -81,4 +81,12 @@
    * If the source position is more than 1deg away from the camera
      center an error is raised now.
+
+ ;sponde
+
+    * Fixed a problem which causes the fitted spectral slope to be displayed
+      incorrectly. If you use MJSpectrum::FormFlux in your macros make
+      sure that the parameter 0 of your fit is negative.
+
+    * Added a histogram showing the read source position of your MCs
 
 
Index: /trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc	(revision 9180)
+++ /trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc	(revision 9181)
@@ -879,9 +879,9 @@
 TString MJSpectrum::FormFlux(const TF1 &f, const char *unit)
 {
-    Double_t p0 = f.GetParameter(0);
-    Double_t p1 = f.GetParameter(1);
-
-    Double_t e0 = f.GetParError(0);
-    Double_t e1 = f.GetParError(1);
+    Double_t p0 = -f.GetParameter(0);
+    Double_t p1 =  f.GetParameter(1);
+
+    Double_t e0 =  f.GetParError(0);
+    Double_t e1 =  f.GetParError(1);
 
     MMath::Format(p0, e0);
@@ -894,5 +894,5 @@
                        FormFloat(p1/exp).Data(), FormFloat(e1/exp).Data(), i);
 
-    str += Form("#left(#frac{E}{%s}#right)^{%s #pm %s}", unit,
+    str += Form("#left(#frac{E}{%s}#right)^{-%s #pm %s}", unit,
                 FormFloat(p0).Data(), FormFloat(e0).Data());
 
@@ -1013,5 +1013,5 @@
     // collection area and cancel out.
     //spectrum.Multiply(&weights);
-    spectrum.SetNameTitle("Flux", "Spectrum (after unfolding)");
+    spectrum.SetNameTitle("Flux", "Spectrum");
     spectrum.SetBit(TH1::kNoStats);
 
@@ -1728,4 +1728,5 @@
     // ---------------------------------------------------------
 
+    MFillH fillsp("MHSrcPosCam", "MSrcPosCam", "FillSrcPosCam");
     MFillH fill0a(&henergy, "", "FillEventDist");
     MFillH fill1a("MHHillasMCPre  [MHHillas]",      "MHillas",      "FillHillasPre");
@@ -1737,4 +1738,5 @@
     MFillH fill7a("MHNewParMCPost [MHNewImagePar]", "MNewImagePar", "FillNewParPost");
     MFillH fill8a("ExcessMC       [MH3]",           "",             "FillExcessMC");
+    fillsp.SetNameTab("SrcPos");
     fill0a.SetNameTab("EvtDist");
     fill1a.SetNameTab("PreCut");
@@ -1754,4 +1756,5 @@
     fill7a.SetWeight();
     fill8a.SetWeight();
+    fillsp.SetWeight();
 
     // FIXME: To be done: A task checking the lower 1% after the lower
@@ -1785,4 +1788,5 @@
     //tlist2.AddToList(&hcalc2);
     tlist2.AddToList(&weight);
+    tlist2.AddToList(&fillsp);
     tlist2.AddToList(&fill1a);
     tlist2.AddToList(&fill30);
