From db4425e3527104746fe543eb5496cf1905e01fd4 Mon Sep 17 00:00:00 2001 From: nemu Date: Wed, 25 May 2011 14:39:54 +0000 Subject: [PATCH] slightly wrong chisq since the 0-bin entries were treated wrongly for scaled N0/Bkg data (MUSR-193) --- ChangeLog | 1 + src/classes/PRunSingleHisto.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bd77ee06..db08efdc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ NEW the chi^2 calculation in single-histogram and asymmetry fits is parallelized if musrfit is built using a compiler supporting OpenMP (e.g. GCC >= 4.2) Using --disable-omp this feature can be disabled on the configure level. NEW any2many: force the user to define the exact NeXus ouput format (HDF4,HDF5,XML) +FIXED slightly wrong chisq since the 0-bin entries were treated wrongly for scaled N0/Bkg data (MUSR-193) FIXED the evaluation of the LF depolarization functions (before numerous unnecessary calculations were performed) FIXED casting problem between uint32 and time_t for some compilers (MUSR-185) FIXED bug reported in MUSR-183: missing background for 2nd histo in asymmetry fits when using musrt0. diff --git a/src/classes/PRunSingleHisto.cpp b/src/classes/PRunSingleHisto.cpp index aa269fee..8c787c64 100644 --- a/src/classes/PRunSingleHisto.cpp +++ b/src/classes/PRunSingleHisto.cpp @@ -708,7 +708,7 @@ Bool_t PRunSingleHisto::PrepareFitData(PRawRunData* runData, const UInt_t histoN value /= normalizer; fData.AppendValue(value); if (value == 0.0) - fData.AppendErrorValue(1.0); + fData.AppendErrorValue(1.0/normalizer); else fData.AppendErrorValue(TMath::Sqrt(value)); } else { // packed data, i.e. fRunInfo->GetPacking() > 1 @@ -716,7 +716,7 @@ Bool_t PRunSingleHisto::PrepareFitData(PRawRunData* runData, const UInt_t histoN value /= normalizer; fData.AppendValue(value); if (value == 0.0) - fData.AppendErrorValue(1.0); + fData.AppendErrorValue(1.0/normalizer); else fData.AppendErrorValue(TMath::Sqrt(value)); // reset values