From 27eb664686ef23b872ecf7cf72535e77f7267ce6 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Thu, 14 Apr 2016 16:33:19 +0200 Subject: [PATCH] added missing DKS selector in GetPhaseOptRealFourier --- ChangeLog | 1 + src/classes/PFourier.cpp | 30 ++++++++++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f218e29..d2ea0fd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ changes since 0.17.0 =================================== NEW 2016-03-08 added a theory translator for DKS NEW 2016-02-23 It is now possible to export the averaged data/Fourier +FIXED 2016-04-14 added missing DKS selector in GetPhaseOptRealFourier. changes since 0.16.0 =================================== diff --git a/src/classes/PFourier.cpp b/src/classes/PFourier.cpp index 0b43fe55..97062ac4 100644 --- a/src/classes/PFourier.cpp +++ b/src/classes/PFourier.cpp @@ -425,9 +425,18 @@ TH1F* PFourier::GetPhaseOptRealFourier(Double_t &phase, const Double_t scale, co // copy the real/imag Fourier from min to max vector realF, imagF; - for (UInt_t i=minBin; i<=maxBin; i++) { - realF.push_back(fOut[i][0]); - imagF.push_back(fOut[i][1]); + if (fUseFFTW) { + for (UInt_t i=minBin; i<=maxBin; i++) { + realF.push_back(fOut[i][0]); + imagF.push_back(fOut[i][1]); + } + } else { + for (UInt_t i=minBin; i<=maxBin; i++) { +#ifdef HAVE_DKS + realF.push_back(fOutDKS[i].real()); + imagF.push_back(fOutDKS[i].imag()); +#endif + } } // rotate trough real/imag Fourier through 360° with a 1/2° resolution and keep the integral @@ -473,9 +482,18 @@ TH1F* PFourier::GetPhaseOptRealFourier(Double_t &phase, const Double_t scale, co } // fill realFourier vector - for (UInt_t i=0; iSetBinContent(i+1, scale*(fOut[i][0]*cos(phase) + fOut[i][1]*sin(phase))); - realPhaseOptFourier->SetBinError(i+1, 0.0); + if (fUseFFTW) { + for (UInt_t i=0; iSetBinContent(i+1, scale*(fOut[i][0]*cos(phase) + fOut[i][1]*sin(phase))); + realPhaseOptFourier->SetBinError(i+1, 0.0); + } + } else { +#ifdef HAVE_DKS + for (UInt_t i=0; iSetBinContent(i+1, scale*(fOutDKS[i].real()*cos(phase) + fOutDKS[i].imag()*sin(phase))); + realPhaseOptFourier->SetBinError(i+1, 0.0); + } +#endif } return realPhaseOptFourier;