30 #ifndef _PMUSRCANVAS_H_ 31 #define _PMUSRCANVAS_H_ 36 #include <TRootCanvas.h> 39 #include <TPaveText.h> 43 #include <TGraphErrors.h> 44 #include <TMultiGraph.h> 51 #endif // __MAKECLING__ 59 #define PV_FOURIER_REAL 2 60 #define PV_FOURIER_IMAG 3 61 #define PV_FOURIER_REAL_AND_IMAG 4 62 #define PV_FOURIER_PWR 5 63 #define PV_FOURIER_PHASE 6 64 #define PV_FOURIER_PHASE_OPT_REAL 7 67 #define P_MENU_ID_DATA 10001 68 #define P_MENU_ID_FOURIER 10002 69 #define P_MENU_ID_DIFFERENCE 10003 70 #define P_MENU_ID_AVERAGE 10004 71 #define P_MENU_ID_EXPORT_DATA 10005 73 #define P_MENU_PLOT_OFFSET 1000 75 #define P_MENU_ID_FOURIER_REAL 100 76 #define P_MENU_ID_FOURIER_IMAG 101 77 #define P_MENU_ID_FOURIER_REAL_AND_IMAG 102 78 #define P_MENU_ID_FOURIER_PWR 103 79 #define P_MENU_ID_FOURIER_PHASE 104 80 #define P_MENU_ID_FOURIER_PHASE_OPT_REAL 105 81 #define P_MENU_ID_FOURIER_PHASE_PLUS 106 82 #define P_MENU_ID_FOURIER_PHASE_MINUS 107 94 virtual void SetXRange(Double_t xmin, Double_t xmax);
95 virtual void SetYRange(Double_t ymin, Double_t ymax);
207 PMusrCanvas(
const Int_t number,
const Char_t* title,
208 Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
const Bool_t batch,
209 const Bool_t fourier=
false,
const Bool_t avg=
false,
const Bool_t theoAsData=
false);
210 PMusrCanvas(
const Int_t number,
const Char_t* title,
211 Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
214 const Bool_t fourier=
false,
const Bool_t avg=
false,
const Bool_t theoAsData=
false);
219 #ifndef __MAKECLING__ 222 #endif // __MAKECLING__ 230 virtual void HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected);
236 virtual void ExportData(
const Char_t *fileName);
283 #ifndef __MAKECLING__ 286 #endif // __MAKECLING__ 302 virtual void InitMusrCanvas(
const Char_t* title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh);
320 virtual Double_t
CalculateDiff(
const Double_t x,
const Double_t y, TH1F *theo);
321 virtual Double_t
CalculateDiff(
const Double_t x,
const Double_t y, TGraphErrors *theo);
322 virtual Int_t
FindBin(
const Double_t x, TGraphErrors *graph);
324 virtual Double_t
GetMaximum(TH1F* histo, Double_t xmin=-1.0, Double_t xmax=-1.0);
325 virtual Double_t
GetMinimum(TH1F* histo, Double_t xmin=-1.0, Double_t xmax=-1.0);
326 virtual Double_t
GetMaximum(TGraphErrors* graph, Double_t xmin=-1.0, Double_t xmax=-1.0);
327 virtual Double_t
GetMinimum(TGraphErrors* graph, Double_t xmin=-1.0, Double_t xmax=-1.0);
329 virtual void PlotData(Bool_t unzoom=
false);
343 virtual void GetExportDataSet(
const TH1F *data,
const Double_t xmin,
const Double_t xmax,
349 #endif // _PMUSRCANVAS_H_ virtual void InitDataSet(PMusrCanvasDataSet &dataSet)
Bool_t fValid
if true, everything looks OK
Bool_t fYRangePresent
flag indicating if x-/y-range is present
std::unique_ptr< TGPopupMenu > fPopupFourier
popup menu of the Musrfit/Fourier sub menu
std::unique_ptr< TCanvas > fMainCanvas
main canvas
UInt_t diffFourierTag
0=not relevant, 1=d-f (Fourier of difference time spectra), 2=f-d (difference of Fourier spectra) ...
TH1F * diffFourierIm
imaginary part of the Fourier transform of the diff histogram
PMsrFourierStructure fFourier
structure holding all the information necessary to perform the Fourier transform
virtual Int_t FindBin(const Double_t x, TGraphErrors *graph)
virtual void HandleFourierDifference()
TGraphErrors * data
data error graph
TGraphErrors * diffFourierRe
real part of the Fourier transform of the diff error graph
virtual void PlotFourierPhaseValue(Bool_t unzoom=false)
virtual void HandleNonMusrDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
virtual void ExportData(const Char_t *fileName)
TH1F * dataFourierIm
imaginary part of the Fourier transform of the data histogram
Bool_t fTheoAsData
flag if true, calculate theory points only at the data points
virtual void UpdateInfoPad()
Bool_t fScaleN0AndBkg
true=N0 and background is scaled to (1/ns), otherwise (1/bin) for the single histogram case ...
virtual void DecrementFourierPhase()
TH1F * theoryFourierPhase
phase spectrum of the Fourier transform of the theory histogram
PMusrCanvasNonMusrDataList fNonMusrData
list of all error graphs to be plotted (non-muSR)
TGraphErrors * diffFourierPhase
phase spectrum of the Fourier transform of the diff error graph
virtual Bool_t IsYRangePresent()
virtual void HandleDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
virtual Bool_t IsXRangePresent()
virtual Bool_t IsScaleN0AndBkg()
TH1F * dataFourierRe
real part of the Fourier transform of the data histogram
std::unique_ptr< TStyle > fStyle
A collection of all graphics attributes.
TH1F * dataFourierPhaseOptReal
phase optimized real part spectrum Fourier transform of the data histogram
TGraphErrors * theory
theory histogram belonging to the data error graph
TH1F * dataFourierPwr
power spectrum of the Fourier transform of the data histogram
virtual void UpdateParamTheoryPad()
virtual void PlotFourier(Bool_t unzoom=false)
TGraphErrors * dataFourierPhase
phase spectrum of the Fourier transform of the data error graph
virtual void CreateStyle()
TH1F * theory
theory histogram belonging to the data histogram
Bool_t fAveragedView
tag showing that the averaged view or normal view should be presented.
TGraphErrors * theoryFourierPhase
phase spectrum of the Fourier transform of the theory error graph
TH1F * theoryFourierPhaseOptReal
phase optimized real part spectrum Fourier transform of the theory histogram
TH1F * theoryFourierPwr
power spectrum of the Fourier transform of the theory histogram
virtual void CleanupDataSet(PMusrCanvasDataSet &dataSet)
std::vector< Int_t > PIntVector
std::vector< PMusrCanvasAsciiDump > PMusrCanvasAsciiDumpVector
TH1F * data
data histogram
Double_t fYmax
data/theory frame range
virtual void SetYRange(Double_t ymin, Double_t ymax)
TGraphErrors * dataFourierPwr
power spectrum of the Fourier transform of the data error graph
TH1F * fHistoFrame
fHistoFrame is a 'global' frame needed in order to plot histograms with (potentially) different x-fra...
virtual void WindowClosed()
Int_t fTimeout
timeout after which the Done signal should be emited. If timeout <= 0, no timeout is taking place ...
std::vector< Double_t > PDoubleVector
virtual Double_t GetMaximum(TH1F *histo, Double_t xmin=-1.0, Double_t xmax=-1.0)
PIntVector fMarkerList
list of markers
std::vector< PMusrCanvasNonMusrDataSet > PMusrCanvasNonMusrDataList
PMusrCanvasDataList fData
list of all histogram data to be plotted (asymmetry/single histogram)
TH1F * theoryFourierIm
imaginary part of the Fourier transform of the theory histogram
virtual Double_t GetInterpolatedValue(TH1F *histo, Double_t xVal)
Int_t fPreviousPlotView
tag showing the previous plot view
TGraphErrors * theoryFourierIm
imaginary part of the Fourier transform of the theory error graph
std::unique_ptr< TString > fRRFText
RRF information.
virtual void InitAverage()
virtual void HandleAverage()
TGraphErrors * dataFourierRe
real part of the Fourier transform of the data error graph
virtual Double_t GetYmax()
TMultiGraph * fMultiGraphData
fMultiGraphData is a 'global' graph needed in order to plot error graphs (data) with (potentially) di...
std::unique_ptr< TPaveText > fTheoryPad
theory pad used to display the theory and functions
virtual ~PMusrCanvasPlotRange()
TGraphErrors * theoryFourierPwr
power spectrum of the Fourier transform of the theory error graph
Bool_t fDifferenceView
tag showing that the shown data, fourier, are the difference between data and theory ...
PMusrCanvasDataSet fDataAvg
set of all averaged data to be plotted (asymmetry/single histogram)
std::unique_ptr< TLatex > fCurrentFourierPhaseText
used in Re/Im Fourier to show the current phase in the pad
std::unique_ptr< TLatex > fRRFLatexText
used to display RRF info
virtual void GetExportDataSet(const TH1F *data, const Double_t xmin, const Double_t xmax, PMusrCanvasAsciiDumpVector &dumpData, const Bool_t hasError=true)
virtual Double_t GetXmin()
virtual void HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
virtual void HandleMenuPopup(Int_t id)
virtual void PlotFourierDifference(Bool_t unzoom=false)
Bool_t fStartWithFourier
flag if true, the Fourier transform will be presented bypassing the time domain representation ...
PMusrCanvasPlotRange * dataRange
keep the msr-file plot data range
TH1F * dataFourierPhase
phase spectrum of the Fourier transform of the data histogram
virtual void CleanupFourier()
virtual void CleanupAverage()
std::unique_ptr< TTimer > fTimeoutTimer
timeout timer in order to terminate if no action is taking place for too long
virtual void LastCanvasClosed()
virtual void IncrementFourierPhase()
virtual void PlotAverage(Bool_t unzoom=false)
TH1F * diffFourierRe
real part of the Fourier transform of the diff histogram
TGraphErrors * diff
difference error graph, i.e. data-theory
UInt_t diffFourierTag
0=not relevant, 1=d-f (Fourier of difference time spectra), 2=f-d (difference of Fourier spectra) ...
TH1F * diff
difference histogram, i.e. data-theory
virtual UInt_t GetNeededAccuracy(PMsrParamStructure param)
TMultiGraph * fMultiGraphDiff
fMultiGraphDiff is a 'global' graph needed in order to plot error graphs (data-theory) with (potentia...
virtual void InitMusrCanvas(const Char_t *title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)
virtual void SetMsrHandler(PMsrHandler *msrHandler)
virtual void SetRunListCollection(PRunListCollection *runList)
virtual void InitFourier()
virtual void HandleDifference()
std::unique_ptr< TLegend > fMultiGraphLegend
used for non-muSR plots to display a legend
TGraphErrors * theoryFourierRe
real part of the Fourier transform of the theory error graph
virtual Double_t GetMinimum(TH1F *histo, Double_t xmin=-1.0, Double_t xmax=-1.0)
PDoubleVector dataErr
error of the y-axis data set
PIntVector fColorList
list of colors
TH1F * diffFourierPhaseOptReal
phase optimized real part spectrum Fourier transform of the diff histogram
TH1F * theoryFourierRe
real part of the Fourier transform of the theory histogram
virtual void Done(Int_t status=0)
Bool_t fBatchMode
musrview in ROOT batch mode
PDoubleVector dataX
x-axis data set
std::unique_ptr< TPaveText > fTitlePad
title pad used to display a title
TRootCanvas * fImp
ROOT native GUI version of main window with menubar and drawing area.
TGPopupMenu * fPopupMain
popup menu Musrfit in the main menu bar
virtual void HandleFourier()
TH1F * diffFourierPwr
power spectrum of the Fourier transform of the diff histogram
virtual void CleanupFourierDifference()
PDoubleVector data
y-axis data set
virtual void PlotDifference(Bool_t unzoom=false)
virtual void UpdateDataTheoryPad()
virtual void HandleDifferenceFourier()
Int_t fPlotType
plot type tag: -1 == undefined, MSR_PLOT_SINGLE_HISTO == single histogram, MSR_PLOT_ASYM == asymmetry...
virtual Double_t GetXmax()
PRunListCollection * fRunList
data handler
PDoubleVector fCurrentFourierPhase
holds the current Fourier phase(s)
virtual void CalcPhaseOptReFT()
PMusrCanvas::CalcPhaseOptReFT.
TGraphErrors * diffFourierIm
imaginary part of the Fourier transform of the diff error graph
TH1F * diffFourierPhase
phase spectrum of the Fourier transform of the diff histogram
virtual Double_t CalculateDiff(const Double_t x, const Double_t y, TH1F *theo)
virtual void SetTimeout(Int_t ival)
std::unique_ptr< TLegend > fInfoPad
info pad used to display a legend of the data plotted
virtual void SaveGraphicsAndQuit(Char_t *fileName, Char_t *graphicsFormat)
PMsrHandler * fMsrHandler
msr-file handler
TGraphErrors * diffFourierPwr
power spectrum of the Fourier transform of the diff error graph
virtual Double_t GetYmin()
Bool_t fStartWithAvg
flag if true, the averaged data/Fourier will be presented
virtual void SetXRange(Double_t xmin, Double_t xmax)
Bool_t fToggleColor
tag showing if a single histo theory is color toggled
std::unique_ptr< TPaveText > fParameterPad
parameter pad used to display the fitting parameters
virtual void PlotData(Bool_t unzoom=false)
std::unique_ptr< TPad > fDataTheoryPad
data/theory pad used to display the data/theory
Int_t fCurrentPlotView
tag showing what the current plot view is: data, fourier, ...
TGraphErrors * dataFourierIm
imaginary part of the Fourier transform of the data error graph
std::vector< PMusrCanvasDataSet > PMusrCanvasDataList
PMusrCanvasPlotRange * dataRange
keep the msr-file plot data range
Int_t fPlotNumber
plot number
virtual void CleanupDifference()