From 52e2c20527c0e720852e50ba7f7b8ea95ba45aca Mon Sep 17 00:00:00 2001 From: Suter Andreas Date: Thu, 7 Jan 2016 16:10:47 +0100 Subject: [PATCH] some tweaking in order to supress ghost lines. --- src/classes/PRunSingleHistoRRF.cpp | 22 +++++++++++++++++----- src/include/PRunSingleHistoRRF.h | 2 +- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/classes/PRunSingleHistoRRF.cpp b/src/classes/PRunSingleHistoRRF.cpp index 8f1dfb50..2cc7c2a6 100644 --- a/src/classes/PRunSingleHistoRRF.cpp +++ b/src/classes/PRunSingleHistoRRF.cpp @@ -630,12 +630,24 @@ Bool_t PRunSingleHistoRRF::PrepareFitData(PRawRunData* runData, const UInt_t his Double_t n0 = EstimateN0(errN0); // 4a) A(t) = exp(+t/tau) [N(t)-Nbkg] / N0 - 1.0 - for (Int_t i=fGoodBins[0]; i this is introduced to reduce ghost lines. + // This is a dirty trick and should be put on a better quantitative base! + Double_t dc_offset=0.0; + for (Int_t i=fGoodBins[0]; i<=fGoodBins[1]; i++) { + dc_offset += fForward[i]; + } + dc_offset /= (Double_t)(fGoodBins[1]-fGoodBins[0]+1); + cout << "info> dc_offset = " << dc_offset << endl; + for (Int_t i=fGoodBins[0]; i<=fGoodBins[1]; i++) { + fForward[i] -= dc_offset; + } + // 4b) error estimate of A(t): errA(t) = exp(+t/tau)/N0 sqrt( N(t) + ([N(t)-N_bkg]/N0)^2 errN0^2 ) - for (Int_t i=fGoodBins[0]; iGetRRFFreq("Mc"); Double_t phaseRRF = globalBlock->GetRRFPhase()*TMath::TwoPi()/180.0; Double_t time = 0.0; - for (Int_t i=fGoodBins[0]; i 1 @@ -671,7 +683,7 @@ Bool_t PRunSingleHistoRRF::PrepareFitData(PRawRunData* runData, const UInt_t his // the error estimate of the unpacked RRF asymmetry is: errA_RRF(t) \simeq exp(t/tau)/N0 sqrt( [N(t) + ((N(t)-N_bkg)/N0)^2 errN0^2] ) dval = 0.0; // the packed RRF asymmetry error - for (Int_t i=fGoodBins[0]; i