Changeset 9181
- Timestamp:
- 11/28/08 12:07:19 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9180 r9181 18 18 19 19 -*-*- 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 20 30 21 31 2008/11/27 Thomas Bretz -
trunk/MagicSoft/Mars/NEWS
r9178 r9181 81 81 * If the source position is more than 1deg away from the camera 82 82 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 83 91 84 92 -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
r9067 r9181 879 879 TString MJSpectrum::FormFlux(const TF1 &f, const char *unit) 880 880 { 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); 886 886 887 887 MMath::Format(p0, e0); … … 894 894 FormFloat(p1/exp).Data(), FormFloat(e1/exp).Data(), i); 895 895 896 str += Form("#left(#frac{E}{%s}#right)^{ %s #pm %s}", unit,896 str += Form("#left(#frac{E}{%s}#right)^{-%s #pm %s}", unit, 897 897 FormFloat(p0).Data(), FormFloat(e0).Data()); 898 898 … … 1013 1013 // collection area and cancel out. 1014 1014 //spectrum.Multiply(&weights); 1015 spectrum.SetNameTitle("Flux", "Spectrum (after unfolding)");1015 spectrum.SetNameTitle("Flux", "Spectrum"); 1016 1016 spectrum.SetBit(TH1::kNoStats); 1017 1017 … … 1728 1728 // --------------------------------------------------------- 1729 1729 1730 MFillH fillsp("MHSrcPosCam", "MSrcPosCam", "FillSrcPosCam"); 1730 1731 MFillH fill0a(&henergy, "", "FillEventDist"); 1731 1732 MFillH fill1a("MHHillasMCPre [MHHillas]", "MHillas", "FillHillasPre"); … … 1737 1738 MFillH fill7a("MHNewParMCPost [MHNewImagePar]", "MNewImagePar", "FillNewParPost"); 1738 1739 MFillH fill8a("ExcessMC [MH3]", "", "FillExcessMC"); 1740 fillsp.SetNameTab("SrcPos"); 1739 1741 fill0a.SetNameTab("EvtDist"); 1740 1742 fill1a.SetNameTab("PreCut"); … … 1754 1756 fill7a.SetWeight(); 1755 1757 fill8a.SetWeight(); 1758 fillsp.SetWeight(); 1756 1759 1757 1760 // FIXME: To be done: A task checking the lower 1% after the lower … … 1785 1788 //tlist2.AddToList(&hcalc2); 1786 1789 tlist2.AddToList(&weight); 1790 tlist2.AddToList(&fillsp); 1787 1791 tlist2.AddToList(&fill1a); 1788 1792 tlist2.AddToList(&fill30);
Note:
See TracChangeset
for help on using the changeset viewer.