From e3a89b9b7e6578b7ed1d099bff82dffedc6cda94 Mon Sep 17 00:00:00 2001 From: nemu Date: Mon, 5 Jan 2009 13:36:04 +0000 Subject: [PATCH] added real_and_imag Fourier --- src/classes/PMusrCanvas.cpp | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/classes/PMusrCanvas.cpp b/src/classes/PMusrCanvas.cpp index a6a30417..9412a619 100644 --- a/src/classes/PMusrCanvas.cpp +++ b/src/classes/PMusrCanvas.cpp @@ -1713,6 +1713,64 @@ cout << endl << ">> in PlotFourier() ..." << endl; break; case PV_FOURIER_REAL_AND_IMAG: + // plot first histo + fData[0].dataFourierRe->Draw("pe"); + + // set x-range + if ((fFourier.fPlotRange[0] != -1) && (fFourier.fPlotRange[1] != -1)) { + min = fFourier.fPlotRange[0]; + max = fFourier.fPlotRange[1]; + } else { + min = fData[0].dataFourierRe->GetBinLowEdge(1); + max = fData[0].dataFourierRe->GetBinLowEdge(fData[0].dataFourierRe->GetNbinsX())+fData[0].dataFourierRe->GetBinWidth(1); + } + fData[0].dataFourierRe->GetXaxis()->SetRangeUser(min, max); + + // set y-range + // first find minimum/maximum of all histos + // real part first + min = GetGlobalMinimum(fData[0].dataFourierRe); + max = GetGlobalMaximum(fData[0].dataFourierRe); + for (unsigned int i=1; i max) + max = binContent; + } + // imag part min/max + for (unsigned int i=0; i max) + max = binContent; + } + fData[0].dataFourierRe->GetYaxis()->SetRangeUser(1.05*min, 1.05*max); + + // set x-axis title + fData[0].dataFourierRe->GetXaxis()->SetTitle(xAxisTitle.Data()); + + // set y-axis title + fData[0].dataFourierRe->GetYaxis()->SetTitle("Real/Imag Fourier"); + + // plot all remaining data + fData[0].dataFourierIm->Draw("pesame"); + for (unsigned int i=1; iDraw("pesame"); + fData[i].dataFourierIm->Draw("pesame"); + } + + // plot theories + for (unsigned int i=0; iDraw("esame"); + fData[i].theoryFourierIm->Draw("esame"); + } + + PlotFourierPhaseValue(); + break; case PV_FOURIER_PWR: // plot first histo