Changeset 9181


Ignore:
Timestamp:
Nov 28, 2008, 12:07:19 PM (12 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9180 r9181  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2008/11/28 Thomas Bretz
     21
     22   * mjobs/MJSpectrum.cc:
     23     - fixed a problem in FormFlux which did not handle the nagative slope
     24       correctly
     25     - Changed the title of the Spectrum histogram to make the fit
     26       result fit better
     27     - added a histogram showing the readin source position of the MCs
     28
     29
    2030
    2131 2008/11/27 Thomas Bretz
  • trunk/MagicSoft/Mars/NEWS

    r9178 r9181  
    8181   * If the source position is more than 1deg away from the camera
    8282     center an error is raised now.
     83
     84 ;sponde
     85
     86    * Fixed a problem which causes the fitted spectral slope to be displayed
     87      incorrectly. If you use MJSpectrum::FormFlux in your macros make
     88      sure that the parameter 0 of your fit is negative.
     89
     90    * Added a histogram showing the read source position of your MCs
    8391
    8492
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r9067 r9181  
    879879TString MJSpectrum::FormFlux(const TF1 &f, const char *unit)
    880880{
    881     Double_t p0 = f.GetParameter(0);
    882     Double_t p1 = f.GetParameter(1);
    883 
    884     Double_t e0 = f.GetParError(0);
    885     Double_t e1 = f.GetParError(1);
     881    Double_t p0 = -f.GetParameter(0);
     882    Double_t p1 =  f.GetParameter(1);
     883
     884    Double_t e0 =  f.GetParError(0);
     885    Double_t e1 =  f.GetParError(1);
    886886
    887887    MMath::Format(p0, e0);
     
    894894                       FormFloat(p1/exp).Data(), FormFloat(e1/exp).Data(), i);
    895895
    896     str += Form("#left(#frac{E}{%s}#right)^{%s #pm %s}", unit,
     896    str += Form("#left(#frac{E}{%s}#right)^{-%s #pm %s}", unit,
    897897                FormFloat(p0).Data(), FormFloat(e0).Data());
    898898
     
    10131013    // collection area and cancel out.
    10141014    //spectrum.Multiply(&weights);
    1015     spectrum.SetNameTitle("Flux", "Spectrum (after unfolding)");
     1015    spectrum.SetNameTitle("Flux", "Spectrum");
    10161016    spectrum.SetBit(TH1::kNoStats);
    10171017
     
    17281728    // ---------------------------------------------------------
    17291729
     1730    MFillH fillsp("MHSrcPosCam", "MSrcPosCam", "FillSrcPosCam");
    17301731    MFillH fill0a(&henergy, "", "FillEventDist");
    17311732    MFillH fill1a("MHHillasMCPre  [MHHillas]",      "MHillas",      "FillHillasPre");
     
    17371738    MFillH fill7a("MHNewParMCPost [MHNewImagePar]", "MNewImagePar", "FillNewParPost");
    17381739    MFillH fill8a("ExcessMC       [MH3]",           "",             "FillExcessMC");
     1740    fillsp.SetNameTab("SrcPos");
    17391741    fill0a.SetNameTab("EvtDist");
    17401742    fill1a.SetNameTab("PreCut");
     
    17541756    fill7a.SetWeight();
    17551757    fill8a.SetWeight();
     1758    fillsp.SetWeight();
    17561759
    17571760    // FIXME: To be done: A task checking the lower 1% after the lower
     
    17851788    //tlist2.AddToList(&hcalc2);
    17861789    tlist2.AddToList(&weight);
     1790    tlist2.AddToList(&fillsp);
    17871791    tlist2.AddToList(&fill1a);
    17881792    tlist2.AddToList(&fill30);
Note: See TracChangeset for help on using the changeset viewer.